From f76132009a38af5d83bf51bca69747dd5eea794b Mon Sep 17 00:00:00 2001 From: Lev Walkin Date: Sun, 10 Jan 2016 13:27:18 -0800 Subject: split --enable-Werror and --enable-test-Werror --- configure.ac | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 588df6d5..2698265a 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT([asn1c], [0.9.28], [vlm@lionet.info]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE([-Wall -Wno-extra-portability -Werror foreign]) +AM_INIT_AUTOMAKE([foreign]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) LT_INIT AC_CONFIG_MACRO_DIR([m4]) @@ -33,15 +33,6 @@ cygwin) ;; esac -AC_ARG_ENABLE(Werror, - [AS_HELP_STRING([--enable-Werror], - [abort compilation after any C compiler warning])], - [enable_werror=$enableval], [enable_werror=no]) - AS_IF([test x$enable_werror != xno], [ - TESTSUITE_CFLAGS="-Werror -W -Wpointer-arith" - ADD_CFLAGS="-Werror -W -Wpointer-arith" - ]) - AC_ARG_ENABLE([ASN_DEBUG], [AS_HELP_STRING([--enable-ASN_DEBUG], [produce debug log during `make check` testing])], @@ -69,6 +60,22 @@ AX_CHECK_COMPILE_FLAG([-Wno-error=parentheses-equality], AX_CHECK_COMPILE_FLAG([-Wno-error=unused-variable], [TESTSUITE_CFLAGS="$TESTSUITE_CFLAGS -Wno-error=unused-variable"]) +AC_ARG_ENABLE(Werror, + [AS_HELP_STRING([--enable-Werror], + [abort compilation after any C compiler warning])], + [enable_werror=$enableval], [enable_werror=no]) + AS_IF([test x$enable_werror != xno], [ + ADD_CFLAGS="-Werror -W -Wpointer-arith" + ]) + +AC_ARG_ENABLE(test-Werror, + [AS_HELP_STRING([--enable-test-Werror], + [abort compiling tests after any C compiler warning])], + [enable_test_werror=$enableval], [enable_test_werror=no]) + AS_IF([test x$enable_test_werror != xno], [ + TESTSUITE_CFLAGS="-Werror -W -Wpointer-arith" + ]) + AC_SUBST(ADD_CFLAGS) AC_SUBST(TESTSUITE_CFLAGS) -- cgit v1.2.3