summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-02-07 00:24:03 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-02-07 00:24:03 +0100
commit73481a350cc5351fca9884f46fa9936ce798e652 (patch)
treec4f6368d3bf6254e57cb60e1a4e725c1a5c84cf3 /configure.ac
parentfa3969de187e606c6690212299e0b0a012315a6f (diff)
downloadmsitools-73481a350cc5351fca9884f46fa9936ce798e652.tar.gz
msitools-73481a350cc5351fca9884f46fa9936ce798e652.tar.xz
msitools-73481a350cc5351fca9884f46fa9936ce798e652.zip
build-sys: enable gcc warnings
Thanks to gnulib manywarnings module
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 31e768d..6404ca2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,25 @@ AC_SUBST(GETTEXT_PACKAGE)
AM_GNU_GETTEXT_VERSION([0.18])
AM_GLIB_GNU_GETTEXT
+gl_MANYWARN_ALL_GCC([warnings])
+
+nw=
+nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
+nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF
+nw="$nw -Wtraditional" # All compilers nowadays support ANSI C
+nw="$nw -Wconversion" # These warnings usually don't point to mistakes.
+nw="$nw -Wsign-conversion" # Likewise.
+nw="$nw -Wunused-parameter" # Likewise.
+nw="$nw -Wunused-macros" # Likewise.
+# Enable all GCC warnings not in this list.
+gl_MANYWARN_COMPLEMENT([warnings], [$warnings], [$nw])
+for w in $warnings; do
+ gl_WARN_ADD([$w])
+done
+gl_WARN_ADD([-Wno-sign-compare])
+gl_WARN_ADD([-Wno-unused-parameter])
+gl_WARN_ADD([-Wno-missing-field-initializers])
+
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AM_MISSING_PROG([AUTOM4TE], [autom4te])