summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-06-01 11:35:34 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2010-06-01 11:35:34 +0200
commit64405a78fdce7e028d91bdc68ab497d4c8a53bf0 (patch)
treeb493d01b7e29a085a6f2865d5a7b550a71fb1721
parent8e28de56006377184aa2ac2220afd82c9a2431d1 (diff)
Add --enable-iso-c configure option disabled by default
It uses, if available, -ansic and -pedantic flags. See bug #27735
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index acd6b9a..827a7be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,7 +158,7 @@ dnl skipped and all flags rechecked. So there's no need to do anything
dnl else. If for any reason you need to force a recheck, just change
dnl MAYBE_WARN in an ignorable way (like adding whitespace)
-MAYBE_WARN="-Wall -Wextra -pedantic \
+MAYBE_WARN="-Wall -Wextra \
-Wsign-compare -Werror-implicit-function-declaration \
-Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
@@ -168,6 +168,12 @@ MAYBE_WARN="-Wall -Wextra -pedantic \
-Wno-missing-field-initializers -Wno-unused-parameter \
-Wno-attributes -Wno-long-long -Winline"
+AC_ARG_ENABLE(iso-c,
+ AC_HELP_STRING([--enable-iso-c], [Try to warn if code is not ISO C ]),,[enable_iso_c=no])
+
+if test "x$enable_iso_c" != "xno"; then
+ MAYBE_WARN="$MAYBE_WARN -ansi -pedantic"
+fi
# invalidate cached value if MAYBE_WARN has changed
if test "x$spectre_cv_warn_maybe" != "x$MAYBE_WARN"; then