diff --git a/configure.ac b/configure.ac
index 3ef87037520f52fbe3f297fc50233231558b7783..db3ca4a65bb9715ff9a49c6dc0252bf433233728 100644 (file)
--- a/configure.ac
+++ b/configure.ac
-Wmissing-prototypes \
-Wpointer-arith \
-Wshadow \
+ -Wstrict-prototypes \
-Wunreachable-code; do
AC_MSG_CHECKING([whether $CC accepts $flag])
PKG_CHECK_MODULES([GTK2], [gtk+-2.0])
PKG_CHECK_MODULES([POPPLER_GLIB], [poppler-glib])
+if test "x$enable_strict_checks" = "xyes"; then
+ # Some Gtk headers generate warnings when doing strict checking, which
+ # would result in unnecessary compile errors
+ AC_MSG_NOTICE([Try to suppress warnings from Gtk headers...])
+ for flag in `$PKG_CONFIG --cflags-only-I gtk+-2.0`; do
+ I_dir=${flag#-I}
+
+ flag="-isystem $I_dir"
+ AC_MSG_CHECKING([whether $CC accepts $flag])
+ if test_cc_flags "$flag"; then
+ STRICT_CFLAGS="$STRICT_CFLAGS $flag"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ done
+fi
+
AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile])
AC_OUTPUT