summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2012-01-25 13:04:43 +0100
committerAkim Demaille <demaille@gostai.com>2012-01-25 13:04:43 +0100
commit1890a2a816dab86c23cc1d0af8fac3986335deb7 (patch)
tree08c2c358ed9ef763ce57e589764cb19bd4b28155
parentda1eb15bc9f2147359f5a4d9826303a53e08b447 (diff)
downloadbison-1890a2a816dab86c23cc1d0af8fac3986335deb7.tar.gz
maint: fix --gcc-warnings support.
* configure.ac: Use enable_gcc_warnings instead of enableval, which is valid only with AC_ARG_ENABLE.
-rw-r--r--configure.ac10
1 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 8d42c1d1..48d145d8 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])