summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: be4324b)
raw | patch | inline | side by side (parent: be4324b)
author | Sebastian Harl <sh@teamix.net> | |
Mon, 2 Jan 2012 09:44:53 +0000 (10:44 +0100) | ||
committer | Sebastian Harl <sh@teamix.net> | |
Mon, 2 Jan 2012 09:44:53 +0000 (10:44 +0100) |
This way, warnings generated by those headers will be suppressed. Some of the
strict check flags generate warnings which would otherwise result in
unnecessary compile errors.
strict check flags generate warnings which would otherwise result in
unnecessary compile errors.
configure.ac | patch | blob | history |
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