summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTommi Komulainen <tommi.komulainen@iki.fi>2008-10-16 17:37:46 +0000
committerTommi Komulainen <tko@src.gnome.org>2008-10-16 17:37:46 +0000
commit8d0c1c116b326603ff1236363ddc430d1f0ccd0e (patch)
tree563a21b8d3fc027b680f82be47ba5487af2b247f /configure.ac
parent7e1fa913da93b142b10ea3a5105f9cb58afe183e (diff)
downloadgobject-introspection-8d0c1c116b326603ff1236363ddc430d1f0ccd0e.tar.gz
enable bunch of gcc warning CFLAGS
2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi> * configure.ac: enable bunch of gcc warning CFLAGS svn path=/trunk/; revision=731
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 230ab2e8..5202bdcf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,29 @@ if test "$YACC" = :; then
AC_MSG_ERROR([bison not found but required])
fi
+changequote(,)dnl
+ensureflag() {
+ flag="$1"; shift
+ result="$@"
+
+ case " ${result} " in
+ *[\ \ ]${flag}[\ \ ]*) ;;
+ *) result="${flag} ${result}" ;;
+ esac
+
+ echo ${result}
+}
+changequote([,])dnl
+
+if test "$GCC" = "yes"; then
+ for flag in -Wall -Wchar-subscripts -Wmissing-declarations \
+ -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align \
+ -Wsign-compare -fno-strict-aliasing;
+ do
+ CFLAGS="$(ensureflag $flag $CFLAGS)"
+ done
+fi
+
# Checks for libraries.
GI_ENABLE_GCOV