From: Michael Wallner Date: Wed, 8 Jan 2020 17:30:06 +0000 (+0100) Subject: configure: provide a cli flag instead of forcing -Werror X-Git-Tag: pre_cmake~62 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=770d4f6b4cc99bff87d27f4cbe52b2c6a2f2fbd2;p=m6w6%2Flibmemcached configure: provide a cli flag instead of forcing -Werror --- diff --git a/configure.ac b/configure.ac index 86f986a7..98de0a3e 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,6 @@ AX_COMPILER_VENDOR AX_COMPILER_VERSION AC_LANG_POP([C++]) - AX_ASSERT AX_PLATFORM @@ -342,6 +341,16 @@ AX_ENDIAN AX_ASSERT AX_HARDEN_COMPILER_FLAGS +AC_ARG_ENABLE([warnings-as-errors], AS_HELP_STRING([--enable-warnings-as-errors], + [Build with -Werror enabled]), , [enable_warnings_as_errors=no]) +AC_CACHE_CHECK([if all warnings should produce an error], [ac_cv_warnings_as_errors], [ + AS_IF([test "x$enable_warnings_as_errors" = "xyes"], [ + ac_cv_warnings_as_errors=yes + ], [ + ac_cv_warnings_as_errors=no + ]) +]) + AX_AM_JOBSERVER([yes]) AC_CONFIG_FILES([Makefile