diff options
-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]),, |