]> git.saurik.com Git - bison.git/blobdiff - configure.ac
style: formatting and comment changes
[bison.git] / configure.ac
index 559b50547d6f6e6a658c21e19884b8f23b5ea073..5dc274fce10b753aa3866779abf6940a78c7398d 100644 (file)
@@ -81,7 +81,7 @@ AC_ARG_ENABLE([gcc-warnings],
               [enable_gcc_warnings=no])
 AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes])
 if test "$enable_gcc_warnings" = yes; then
-  warn_common='-Wall-Wextra -Wno-sign-compare -Wcast-align -Wdocumentation
+  warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation
     -Wformat -Wpointer-arith -Wwrite-strings'
   warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
   warn_cxx='-Wnoexcept'
@@ -90,7 +90,12 @@ if test "$enable_gcc_warnings" = yes; then
   # -fno-color-diagnostics: Clang's use of colors in the error
   # messages is confusing the tests looking at the compiler's output
   # (e.g., synclines.at).
-  warn_tests='-Wundef -pedantic -Wsign-compare -fno-color-diagnostics'
+  #
+  # -Wno-keyword-macro: We use the "#define private public" dirty
+  # trick in the test suite to check some private implementation
+  # details for lalr1.cc.
+  warn_tests='-Wundef -pedantic -Wsign-compare -fno-color-diagnostics
+    -Wno-keyword-macro'
 
   AC_LANG_PUSH([C])
   # Clang supports many of GCC's -W options, but only issues warnings
@@ -220,20 +225,21 @@ AC_CONFIG_FILES([etc/bench.pl], [chmod +x etc/bench.pl])
 AC_CONFIG_TESTDIR(tests)
 AC_CONFIG_FILES([tests/atlocal])
 AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
+
 AC_CHECK_PROGS([VALGRIND], [valgrind])
-case $VALGRIND:$host_os in
+# Use something simpler that $host_os to select our suppression file.
+uname=`uname`
+case $VALGRIND:$uname in
   '':*) ;;
-  *:darwin*)
+  *:Darwin)
     # See README-hacking.
-    # VALGRIND+='-q --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
     VALGRIND=;;
   *:*)
-    suppfile=build-aux/$host_os.valgrind
+    suppfile=build-aux/$uname.valgrind
     if test -f "$srcdir/$suppfile"; then
-      VALGRIND="$VALGRIND --gen-suppressions=all"
-      VALGRIND="$VALGRIND --suppressions=\$(abs_top_srcdir)/$suppfile"
+      AC_SUBST([VALGRIND_OPTS_SUPPRESSION],
+               ["--suppressions=\$(abs_top_srcdir)/$suppfile"])
     fi
-    AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"])
     ;;
 esac