]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Compile with '-Wold-style-definition' in devel mode
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 9 Sep 2015 05:42:39 +0000 (07:42 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 9 Sep 2015 05:42:39 +0000 (07:42 +0200)
aclocal.m4
configure

index a50c2f0bcd958c157374d00da2c8accba67e9a86..64ed979b405929cb2f9bb85e23b13d50f8237b83 100644 (file)
@@ -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()
index db3780a96f8e72c43c1daa9a8c6f0e83ce293a2c..e93add3f645a5a3493679c28310775b693333b3c 100755 (executable)
--- 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"