summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2015-09-09 07:42:39 +0200
committerFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2015-09-09 07:42:39 +0200
commitb226ebedc9f7762b07029d77bd3b4a107ae1c087 (patch)
treea44ba8aeb1756891ad5cb8ea77146e5a04c8924d
parentdb47597e0a08161aef1c07156a4d486cb22fb3fc (diff)
downloadtcpdump-b226ebedc9f7762b07029d77bd3b4a107ae1c087.tar.gz
Compile with '-Wold-style-definition' in devel mode
-rw-r--r--aclocal.m41
-rwxr-xr-xconfigure32
2 files changed, 33 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index a50c2f0b..64ed979b 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -982,6 +982,7 @@ AC_DEFUN(AC_LBL_DEVEL,
AC_LBL_CHECK_COMPILER_OPT($1, -Wshadow)
AC_LBL_CHECK_COMPILER_OPT($1, -Wdeclaration-after-statement)
AC_LBL_CHECK_COMPILER_OPT($1, -Wpedantic)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wold-style-definition)
AC_LBL_CHECK_COMPILER_OPT($1, -W)
fi
AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT()
diff --git a/configure b/configure
index db3780a9..e93add3f 100755
--- a/configure
+++ b/configure
@@ -7980,6 +7980,38 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5
+$as_echo_n "checking whether the compiler supports the -Wold-style-definition option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wold-style-definition"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wold-style-definition"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
save_CFLAGS="$CFLAGS"