aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2007-03-26 00:32:13 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2007-03-26 00:32:13 +0000
commite8cd435eb6b5fadaa0c31b7100ef0e34f4079259 (patch)
treed67a88f6d756e9fc9f1b3e4caf0f9beaf928968c /configure.in
parentb1f89bced9f18e8ed4f94a7772e81b281efbd524 (diff)
If we're using gcc, try to use -Wdeclaration-after-statement to catch more non-portable commits. I'm not sure if this is the Right Way to test to see if the compiler can handle a specific option but it's simple and efficient enough.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21195 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 5dd3a58179..a5eb2119a5 100644
--- a/configure.in
+++ b/configure.in
@@ -174,6 +174,14 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING(to see if we can add '-Wdeclaration-after-statement' to CFLAGS)
+if test x$GCC != x && echo yes | $CC -E -Wdeclaration-after-statement - 2>&1 | grep yes > /dev/null ; then
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
AC_ARG_WITH(warnings-as-errors,
[ --with-warnings-as-errors Treat warnings as errors (if using gcc). [default=no]],
[