From: Brian Aker Date: Tue, 18 Sep 2012 05:01:18 +0000 (-0400) Subject: If we compile not under a SCM system, assume that we should not use -Werror X-Git-Tag: 1.0.12~21^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=7ab3500b376928c4a621cfa29289aa1eaeecd60d;p=awesomized%2Flibmemcached If we compile not under a SCM system, assume that we should not use -Werror --- diff --git a/m4/ax_harden_compiler_flags.m4 b/m4/ax_harden_compiler_flags.m4 index 4d647996..d8b997f7 100644 --- a/m4/ax_harden_compiler_flags.m4 +++ b/m4/ax_harden_compiler_flags.m4 @@ -62,7 +62,9 @@ AC_LANG_PUSH([C]) AX_APPEND_COMPILE_FLAGS([-O2]) - AX_APPEND_COMPILE_FLAGS([-Werror]) + AS_IF([test "$ac_cv_vcs_checkout" = yes], [ + AX_APPEND_COMPILE_FLAGS([-Werror]) + ]) AX_APPEND_COMPILE_FLAGS([-Wall]) AX_APPEND_COMPILE_FLAGS([-Wextra]) AX_APPEND_COMPILE_FLAGS([-std=c99]) @@ -80,7 +82,9 @@ AC_REQUIRE([AX_HARDEN_C_COMPILER_FLAGS]) AC_LANG_PUSH([C++]) AX_APPEND_COMPILE_FLAGS([-O2]) - AX_APPEND_COMPILE_FLAGS([-Werror]) + AS_IF([test "$ac_cv_vcs_checkout" = yes], [ + AX_APPEND_COMPILE_FLAGS([-Werror]) + ]) AX_APPEND_COMPILE_FLAGS([-Wall]) AX_APPEND_COMPILE_FLAGS([-Wextra]) AX_APPEND_COMPILE_FLAGS([-Wpragmas]) @@ -114,7 +118,9 @@ AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all]) AX_APPEND_COMPILE_FLAGS([-fwrapv]) AX_APPEND_COMPILE_FLAGS([-ggdb]) - AX_CHECK_LINK_FLAG([-Werror]) + AS_IF([test "$ac_cv_vcs_checkout" = yes], [ + AX_CHECK_LINK_FLAG([-Werror]) + ]) AX_CHECK_LINK_FLAG([-z relro -z now]) AC_LANG_POP ])