summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2016-11-22 15:18:36 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-11-22 15:19:32 +0300
commit7394bc1af42c8808394f90a7635014e0996269af (patch)
treebe384452011f3806ee6563dc0201b1fae0e3cc19 /configure.ac
parent0cceec20a3d5f665d36dd30551eca460b2fd8ebe (diff)
downloadbdwgc-7394bc1af42c8808394f90a7635014e0996269af.tar.gz
Report gcc/clang pedantic warnings (configure)
* configure.ac [GCC] (WPEDANTIC): New variable (set to "-Wpedantic -Wno-long-long" if supported by the compiler). * configure.ac [GCC] (CFLAGS): Add $WPEDANTIC.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index bf03f454..af4a45ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,7 +407,17 @@ if test "$GCC" = yes; then
CFLAGS="$old_CFLAGS"
AC_MSG_RESULT($ac_cv_cc_wextra)
AS_IF([test "$ac_cv_cc_wextra" = yes], [WEXTRA="-Wextra"], [WEXTRA="-W"])
- CFLAGS="-Wall $WEXTRA $CFLAGS"
+ AC_MSG_CHECKING(for gcc -Wpedantic)
+ CFLAGS="-Wpedantic -Wno-long-long $CFLAGS"
+ AC_TRY_COMPILE([],[
+ extern int quiet;
+ ], [ac_cv_cc_pedantic=yes], [ac_cv_cc_pedantic=no])
+ CFLAGS="$old_CFLAGS"
+ AC_MSG_RESULT($ac_cv_cc_pedantic)
+ WPEDANTIC=
+ AS_IF([test "$ac_cv_cc_pedantic" = yes],
+ [WPEDANTIC="-Wpedantic -Wno-long-long"])
+ CFLAGS="-Wall $WEXTRA $WPEDANTIC $CFLAGS"
fi
AC_MSG_CHECKING(for xlc)