From: Akim Demaille Date: Wed, 25 Jan 2012 12:04:43 +0000 (+0100) Subject: maint: fix --gcc-warnings support. X-Git-Tag: v2.5.1_rc2~119 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/ed2e77eae6ec0f749da3411c114bda06083e60fc maint: fix --gcc-warnings support. * configure.ac: Use enable_gcc_warnings instead of enableval, which is valid only with AC_ARG_ENABLE. (cherry picked from commit 1890a2a816dab86c23cc1d0af8fac3986335deb7) Conflicts: configure.ac --- diff --git a/configure.ac b/configure.ac index bdb2504f..1fffa67c 100644 --- a/configure.ac +++ b/configure.ac @@ -57,14 +57,14 @@ AC_PROG_CC_STDC # Gnulib (early checks). gl_EARLY -AC_ARG_ENABLE(gcc-warnings, +AC_ARG_ENABLE([gcc-warnings], [ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)], -[case "${enableval}" in +[case $enable_gcc_warnings in yes|no) ;; - *) AC_MSG_ERROR([bad value ${enableval} for gcc-warnings option]) ;; + *) AC_MSG_ERROR([invalid value for --gcc-warnings: $enable_gcc_warnings]);; esac], - [enableval=no]) -if test "${enableval}" = yes; then + [enable_gcc_warnings=no]) +if test "$enable_gcc_warnings" = yes; then gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) AC_SUBST([WERROR_CFLAGS]) gl_WARN_ADD([-Wall])