diff options
author | infirit <[email protected]> | 2014-11-21 17:18:30 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-22 20:25:30 +0100 |
commit | e1cbfda259d2bfd2a87cda3519fd2cd69e509556 (patch) | |
tree | d5380c8a6fb257e869b0249b4b5aa615dbb12899 /configure.ac | |
parent | b99f3f5e8080f266affd9734d4f73dac0c67215e (diff) | |
download | engrampa-e1cbfda259d2bfd2a87cda3519fd2cd69e509556.tar.bz2 engrampa-e1cbfda259d2bfd2a87cda3519fd2cd69e509556.tar.xz |
activate compiler warnings
Based on FR commit: 1ceb60e36079e1337aed053b62d327bc2e89fafc
From: Paolo Bacchilega <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4aa833e..96ecc2a 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,26 @@ AC_SUBST([GTK_LIBS]) dnl =========================================================================== +WARN_CFLAGS="-Wall -Wcast-align -Wtype-limits -Wclobbered -Wempty-body -Wignored-qualifiers" + +for option in $WARN_CFLAGS; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + AC_MSG_CHECKING([whether gcc understands $option]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[has_option=yes],[has_option=no]) + if test x$has_option = xyes; then + WARNINGS="$WARNINGS $option" + fi + AC_MSG_RESULT($has_option) + CFLAGS="$SAVE_CFLAGS" + unset has_option + unset SAVE_CFLAGS +done +unset option +CFLAGS="$CFLAGS $WARNINGS" + +dnl =========================================================================== + AC_ARG_ENABLE(run_in_place, AS_HELP_STRING([--enable-run-in-place], [load ui data and extensions from the source tree]),, |