]> The Tcpdump Group git mirrors - tcpdump/blobdiff - configure
DNS: Sync types with IANA
[tcpdump] / configure
index 721352dca1d3c384267205901609b57d9c7a7a9f..954550f83ee52fd6553526be1d00650fec53692e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcpdump 4.10.0-PRE-GIT.
+# Generated by GNU Autoconf 2.69 for tcpdump 4.99.4-PRE-GIT.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tcpdump'
 PACKAGE_TARNAME='tcpdump'
-PACKAGE_VERSION='4.10.0-PRE-GIT'
-PACKAGE_STRING='tcpdump 4.10.0-PRE-GIT'
+PACKAGE_VERSION='4.99.4-PRE-GIT'
+PACKAGE_STRING='tcpdump 4.99.4-PRE-GIT'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -676,7 +676,6 @@ infodir
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -706,7 +705,7 @@ enable_smb
 with_user
 with_chroot
 with_sandbox_capsicum
-with_system_libpcap
+enable_local_libpcap
 with_crypto
 with_cap_ng
 '
@@ -757,7 +756,6 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1010,15 +1008,6 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1156,7 +1145,7 @@ fi
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir runstatedir
+               libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1269,7 +1258,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures tcpdump 4.10.0-PRE-GIT to adapt to many kinds of systems.
+\`configure' configures tcpdump 4.99.4-PRE-GIT to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1309,7 +1298,6 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1335,7 +1323,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tcpdump 4.10.0-PRE-GIT:";;
+     short | recursive ) echo "Configuration of tcpdump 4.99.4-PRE-GIT:";;
    esac
   cat <<\_ACEOF
 
@@ -1344,20 +1332,20 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-universal     don't build universal on macOS
-  --enable-smb            enable possibly-buggy SMB printer default=yes
-  --disable-smb           disable possibly-buggy SMB printer
+  --enable-smb            enable possibly-buggy SMB printer [default=no]
+  --disable-local-libpcap don't look for a local libpcap [default=check for a
+                          local libpcap]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --without-gcc           don't use gcc
-  --with-smi              link with libsmi (allows to load MIBs on the fly to decode SNMP packets. default=yes
-  --without-smi           don't link with libsmi
+  --with-smi              link with libsmi (allows to load MIBs on the fly to
+                          decode SNMP packets) [default=yes, if available]
   --with-user=USERNAME    drop privileges by default to USERNAME
   --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
   --with-sandbox-capsicum use Capsicum security functions [default=yes, if
                           available]
-  --with-system-libpcap   don't use local pcap library
   --with-crypto[=DIR]     use OpenSSL/libressl libcrypto (located in directory
                           DIR, if specified) [default=yes, if available]
   --with-cap-ng           use libcap-ng [default=yes, if available]
@@ -1438,7 +1426,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tcpdump configure 4.10.0-PRE-GIT
+tcpdump configure 4.99.4-PRE-GIT
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1800,6 +1788,189 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_func
 
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
 # ---------------------------------------------
 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -1903,7 +2074,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tcpdump $as_me 4.10.0-PRE-GIT, which was
+It was created by tcpdump $as_me 4.99.4-PRE-GIT, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4009,42 +4180,6 @@ fi
 
 done
 
-for ac_header in net/pfvar.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if.h>
-"
-if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_PFVAR_H 1
-_ACEOF
-
-fi
-
-done
-
-if test "$ac_cv_header_net_pfvar_h" = yes; then
-       for ac_header in net/if_pflog.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "net/if_pflog.h" "ac_cv_header_net_if_pflog_h" "#include <sys/types.h>
-       #include <sys/socket.h>
-       #include <net/if.h>
-       #include <net/pfvar.h>
-"
-if test "x$ac_cv_header_net_if_pflog_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_PFLOG_H 1
-_ACEOF
-
-fi
-
-done
-
-       if test "$ac_cv_header_net_if_pflog_h" = yes; then
-               LOCALSRC="print-pflog.c $LOCALSRC"
-       fi
-fi
 
 case "$host_os" in
 
@@ -4153,8 +4288,11 @@ else
 /* end confdefs.h.  */
 
 /* libsmi available check */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <smi.h>
-main()
+int main()
 {
   int current, revision, age, n;
   const int required = 2;
@@ -4215,7 +4353,7 @@ $as_echo_n "checking whether to enable the possibly-buggy SMB printer... " >&6;
 if test "${enable_smb+set}" = set; then :
   enableval=$enable_smb;
 else
-  enableval=yes
+  enableval=no
 fi
 
 case "$enableval" in
@@ -4294,7 +4432,7 @@ fi
 # XXX - do we need to check for all of them, or are there some that, if
 # present, imply others are present?
 #
-if test ! -z "$with_sandbox_capsicum" && test "$with_sandbox_capsicum" != "no" ; then
+if test -z "$with_sandbox_capsicum" || test "$with_sandbox_capsicum" != "no" ; then
        #
        # First, make sure we have the required header.
        #
@@ -4707,6 +4845,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
+#include <string.h>
 /* AF_INET6 available check */
 #include <sys/types.h>
 #ifdef _WIN32
@@ -4968,7 +5107,7 @@ esac
 fi
 
 
-for ac_func in fork vfork strftime
+for ac_func in fork vfork
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -5010,6 +5149,54 @@ else
 fi
 
 
+#
+# Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that
+# depend on %zu.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf(3) supports the z length modifier" >&5
+$as_echo_n "checking whether printf(3) supports the z length modifier... " >&6; }
+if test "$cross_compiling" = yes; then :
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not while cross-compiling" >&5
+$as_echo "not while cross-compiling" >&6; }
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+  char buf[100];
+  snprintf(buf, sizeof(buf), "%zu", sizeof(buf));
+  return strncmp(buf, "100", sizeof(buf)) ? 1 : 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define HAVE_NO_PRINTF_Z 1" >>confdefs.h
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
 $as_echo_n "checking for main in -lrpc... " >&6; }
 if ${ac_cv_lib_rpc_main+:} false; then :
@@ -5130,57 +5317,68 @@ $as_echo "Using $pfopen" >&6; }
         fi
     fi
     libpcap=FAIL
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for a local libpcap" >&5
+$as_echo_n "checking whether to look for a local libpcap... " >&6; }
+    # Check whether --enable-local-libpcap was given.
+if test "${enable_local_libpcap+set}" = set; then :
+  enableval=$enable_local_libpcap;
+else
+  enableval=yes
+fi
 
-# Check whether --with-system-libpcap was given.
-if test "${with_system_libpcap+set}" = set; then :
-  withval=$with_system_libpcap;
-            #
-            # Don't look for a local libpcap.
-            #
-            using_local_libpcap=no
+    case "$enableval" in
 
-else
+    no)
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        #
+        # Don't look for a local libpcap.
+        #
+        using_local_libpcap=no
+        ;;
 
+    *)
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        #
+        # Look for a local pcap library.
+        #
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
+$as_echo_n "checking for local pcap library... " >&6; }
+        lastdir=FAIL
+        places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
+            egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
+        places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+            egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
+        for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+            basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
+                sed -e 's/-PRE-GIT$//' `
+            if test $lastdir = $basedir ; then
+                                continue;
+            fi
+            lastdir=$dir
+            if test -r $dir/libpcap.a ; then
+                libpcap=$dir/libpcap.a
+                local_pcap_dir=$dir
+                            fi
+        done
+        if test $libpcap = FAIL ; then
             #
-            # Look for a local pcap library.
+            # We didn't find a local libpcap.
             #
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
-$as_echo_n "checking for local pcap library... " >&6; }
-            lastdir=FAIL
-            places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
-                egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
-            places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
-                egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
-            for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
-                basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
-                    sed -e 's/-PRE-GIT$//' `
-                if test $lastdir = $basedir ; then
-                                        continue;
-                fi
-                lastdir=$dir
-                if test -r $dir/libpcap.a ; then
-                    libpcap=$dir/libpcap.a
-                    local_pcap_dir=$dir
-                                    fi
-            done
-            if test $libpcap = FAIL ; then
-                #
-                # We didn't find a local libpcap.
-                #
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-                using_local_libpcap=no;
-            else
-                #
-                # We found a local libpcap.
-                #
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
+            using_local_libpcap=no;
+        else
+            #
+            # We found a local libpcap.
+            #
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
 $as_echo "$libpcap" >&6; }
-                using_local_libpcap=yes
-            fi
-
-fi
-
+            using_local_libpcap=yes
+        fi
+        ;;
+    esac
 
     if test $using_local_libpcap = no ; then
         #
@@ -5441,6 +5639,98 @@ fi
                 # Found - use it to get the include flags for
                 # libpcap and the flags to link with libpcap.
                 #
+                # If this is a vendor-supplied pcap-config, which
+                # we define as being "a pcap-config in /usr/bin
+                # or /usr/ccs/bin" (the latter is for Solaris and
+                # Sun/Oracle Studio), there are some issues.  Work
+                # around them.
+                #
+                if test \( "$PCAP_CONFIG" = "/usr/bin/pcap-config" \) -o \
+                        \( "$PCAP_CONFIG" = "/usr/ccs/bin/pcap-config" \) ; then
+                    #
+                    # It's vendor-supplied.
+                    #
+                    case "$host_os" in
+
+                    darwin*)
+                        #
+                        # This is macOS or another Darwin-based OS.
+                        #
+                        # That means that /usr/bin/pcap-config it
+                        # may provide -I/usr/local/include with --cflags
+                        # and -L/usr/local/lib with --libs, rather than
+                        # pointing to the OS-supplied library and
+                        # Xcode-supplied headers.  Remember that, so we
+                        # ignore those values.
+                        #
+                        _broken_apple_pcap_config=yes
+                        ;;
+
+                    solaris*)
+                        #
+                        # This is Solaris 2 or later, i.e. SunOS 5.x.
+                        #
+                        # At least on Solaris 11; there's /usr/bin/pcap-config,
+                        # which reports -L/usr/lib with --libs, causing
+                        # the 32-bit libraries to be found, and there's
+                        # /usr/bin/{64bitarch}/pcap-config, where {64bitarch}
+                        # is a name for the 64-bit version of the instruction
+                        # set, which reports -L /usr/lib/{64bitarch}, causing
+                        # the 64-bit libraries to be found.
+                        #
+                        # So if we're building 64-bit targets, we replace
+                        # PCAP_CONFIG with /usr/bin/{64bitarch}; we get
+                        # {64bitarch} as the output of "isainfo -n".
+                        #
+                        # Are we building 32-bit or 64-bit?  Get the
+                        # size of void *, and check that.
+                        #
+                        # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if ${ac_cv_sizeof_void_p+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_void_p" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+                        if test ac_cv_sizeof_void_p -eq 8 ; then
+                            isainfo_output=`isainfo -n`
+                            if test ! -z "$isainfo_output" ; then
+                                #
+                                # Success - change PCAP_CONFIG.
+                                #
+                                PCAP_CONFIG=`echo $PCAP_CONFIG | sed "s;/bin/;/bin/$isainfo_output/;"`
+                            fi
+                        fi
+                        ;;
+                    esac
+                fi
+                #
                 # Please read section 11.6 "Shell Substitutions"
                 # in the autoconf manual before doing anything
                 # to this that involves quoting.  Especially note
@@ -5449,8 +5739,30 @@ fi
                 # expressions (pfew!)."
                 #
                 cflags=`"$PCAP_CONFIG" --cflags`
+                #
+                # Work around macOS (and probably other Darwin) brokenness,
+                # by not adding /usr/local/include if it's from the broken
+                # Apple pcap-config.
+                #
+                if test "$_broken_apple_pcap_config" = "yes" ; then
+                    #
+                    # Strip -I/usr/local/include with sed.
+                    #
+                    cflags=`echo $cflags | sed 's;-I/usr/local/include;;'`
+                fi
                 V_INCLS="$cflags $V_INCLS"
                 libpcap=`"$PCAP_CONFIG" --libs`
+                #
+                # Work around macOS (and probably other Darwin) brokenness,
+                # by not adding /usr/local/lib if it's from the broken
+                # Apple pcap-config.
+                #
+                if test "$_broken_apple_pcap_config" = "yes" ; then
+                    #
+                    # Strip -L/usr/local/lib with sed.
+                    #
+                    libpcap=`echo $libpcap | sed 's;-L/usr/local/lib;;'`
+                fi
             else
                 #
                 # Not found; look for an installed pcap.
@@ -5575,8 +5887,44 @@ fi
             # routines in those libraries, so we'll need to link with
             # them, because we'll be linking statically with it.
             #
+            # If it supports --static-pcap-only. use that, as we will be
+            # linking with a static libpcap but won't be linking
+            # statically with any of the libraries on which it depends;
+            # those libraries might not even have static versions
+            # installed.
+            #
+            # That means we need to find out the libraries on which
+            # libpcap directly depends, so we can link with them, but we
+            # don't need to link with the libraries on which those
+            # libraries depend as, on all UN*Xes with which I'm
+            # familiar, the libraries on which a shared library depends
+            # are stored in the library and are automatically loaded by
+            # the run-time linker, without the executable having to be
+            # linked with those libraries.  (This allows a library to be
+            # changed to depend on more libraries without breaking that
+            # library's ABI.)
+            #
+            # The only way to test for that support is to see if the
+            # script contains the string "static-pcap-only"; we can't
+            # try using that flag and checking for errors, as the
+            # versions of the script that didn't have that flag wouldn't
+            # report or return an error for an unsupported command-line
+            # flag.  Those older versions provided, with --static, only
+            # the libraries on which libpcap depends, not the
+            # dependencies of those libraries; the versions with
+            # --static-pcap-only provide all the dependencies with
+            # --static, for the benefit of programs that are completely
+            # statically linked, and provide only the direct
+            # dependencies with --static-pcap-only.
+            #
+            if grep -s -q "static-pcap-only" "$PCAP_CONFIG"
+            then
+                static_opt="--static-pcap-only"
+            else
+                static_opt="--static"
+            fi
             V_INCLS="-I$local_pcap_dir $V_INCLS"
-            additional_libs=`"$PCAP_CONFIG" --static --additional-libs`
+            additional_libs=`"$PCAP_CONFIG" $static_opt --additional-libs`
             libpcap="$libpcap $additional_libs"
         else
             #
@@ -5696,7 +6044,7 @@ if test "x$ac_cv_func_pcap_loop" = xyes; then :
 
 else
 
-        as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING and include the
+        as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING.md and include the
 config.log file in your report.  If you have downloaded libpcap from
 tcpdump.org, and built it yourself, please also include the config.log
 file from the libpcap source directory, the Makefile from the libpcap
@@ -5746,6 +6094,8 @@ else
 /* end confdefs.h.  */
 
                #include <netdb.h>
+               #include <netinet/ether.h>
+               #include <stdlib.h>
                #include <sys/types.h>
                #include <sys/param.h>
                #include <sys/socket.h>
@@ -6705,67 +7055,39 @@ rm -f os-proto.h
            #
            if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
-$as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
+       { $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"
-       CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
-       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: no" >&5
-$as_echo "no" >&6; }
-               #
-               # We're assuming this is clang, where
-               # -Werror=unknown-warning-option is the appropriate
-               # option to force the compiler to fail.
-               #
-               ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
-
-else
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       CFLAGS="$save_CFLAGS"
-
-
-       { $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"
-       if expr "x-W" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
-       elif expr "x-W" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -W"
-       elif expr "x-W" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -W"
-       else
-           CFLAGS="$CFLAGS -W"
-       fi
+       CFLAGS="$CFLAGS -W"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -6782,33 +7104,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
 $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wall" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
-       elif expr "x-Wall" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wall"
-       elif expr "x-Wall" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wall"
-       else
-           CFLAGS="$CFLAGS -Wall"
-       fi
+       CFLAGS="$CFLAGS -Wall"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -6825,33 +7156,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wassign-enum option" >&5
 $as_echo_n "checking whether the compiler supports the -Wassign-enum option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wassign-enum" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wassign-enum"
-       elif expr "x-Wassign-enum" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wassign-enum"
-       elif expr "x-Wassign-enum" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wassign-enum"
-       else
-           CFLAGS="$CFLAGS -Wassign-enum"
-       fi
+       CFLAGS="$CFLAGS -Wassign-enum"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -6868,33 +7208,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5
 $as_echo_n "checking whether the compiler supports the -Wcast-qual option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wcast-qual" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcast-qual"
-       elif expr "x-Wcast-qual" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wcast-qual"
-       elif expr "x-Wcast-qual" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wcast-qual"
-       else
-           CFLAGS="$CFLAGS -Wcast-qual"
-       fi
+       CFLAGS="$CFLAGS -Wcast-qual"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -6911,33 +7260,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
 $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
-       elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
-       elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
-       else
-           CFLAGS="$CFLAGS -Wmissing-prototypes"
-       fi
+       CFLAGS="$CFLAGS -Wmissing-prototypes"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -6954,33 +7312,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
 $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
-       elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
-       elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
-       else
-           CFLAGS="$CFLAGS -Wmissing-variable-declarations"
-       fi
+       CFLAGS="$CFLAGS -Wmissing-variable-declarations"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -6997,33 +7364,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $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"
-       if expr "x-Wold-style-definition" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wold-style-definition"
-       elif expr "x-Wold-style-definition" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
-       elif expr "x-Wold-style-definition" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
-       else
-           CFLAGS="$CFLAGS -Wold-style-definition"
-       fi
+       CFLAGS="$CFLAGS -Wold-style-definition"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7040,33 +7416,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
 $as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wpedantic" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpedantic"
-       elif expr "x-Wpedantic" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpedantic"
-       elif expr "x-Wpedantic" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpedantic"
-       else
-           CFLAGS="$CFLAGS -Wpedantic"
-       fi
+       CFLAGS="$CFLAGS -Wpedantic"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7083,33 +7468,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
 $as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
-       elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
-       elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
-       else
-           CFLAGS="$CFLAGS -Wpointer-arith"
-       fi
+       CFLAGS="$CFLAGS -Wpointer-arith"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7126,33 +7520,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
 $as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wpointer-sign" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-sign"
-       elif expr "x-Wpointer-sign" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-sign"
-       elif expr "x-Wpointer-sign" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-sign"
-       else
-           CFLAGS="$CFLAGS -Wpointer-sign"
-       fi
+       CFLAGS="$CFLAGS -Wpointer-sign"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7169,33 +7572,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
 $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wshadow" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
-       elif expr "x-Wshadow" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wshadow"
-       elif expr "x-Wshadow" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wshadow"
-       else
-           CFLAGS="$CFLAGS -Wshadow"
-       fi
+       CFLAGS="$CFLAGS -Wshadow"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7212,33 +7624,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
 $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wsign-compare" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
-       elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wsign-compare"
-       elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wsign-compare"
-       else
-           CFLAGS="$CFLAGS -Wsign-compare"
-       fi
+       CFLAGS="$CFLAGS -Wsign-compare"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7255,33 +7676,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
 $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
-       elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
-       elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
-       else
-           CFLAGS="$CFLAGS -Wstrict-prototypes"
-       fi
+       CFLAGS="$CFLAGS -Wstrict-prototypes"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7298,33 +7728,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code-return option" >&5
 $as_echo_n "checking whether the compiler supports the -Wunreachable-code-return option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wunreachable-code-return" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code-return"
-       elif expr "x-Wunreachable-code-return" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
-       elif expr "x-Wunreachable-code-return" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
-       else
-           CFLAGS="$CFLAGS -Wunreachable-code-return"
-       fi
+       CFLAGS="$CFLAGS -Wunreachable-code-return"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7341,33 +7780,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
 $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
-       elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
-       elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
-       else
-           CFLAGS="$CFLAGS -Wused-but-marked-unused"
-       fi
+       CFLAGS="$CFLAGS -Wused-but-marked-unused"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7384,33 +7832,42 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
 $as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wwrite-strings" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wwrite-strings"
-       elif expr "x-Wwrite-strings" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
-       elif expr "x-Wwrite-strings" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
-       else
-           CFLAGS="$CFLAGS -Wwrite-strings"
-       fi
+       CFLAGS="$CFLAGS -Wwrite-strings"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # We use AC_LANG_SOURCE() so that we can control the complete
+       # content of the program being compiled.  We do not, for example,
+       # want the default "int main()" that AC_LANG_PROGRAM() generates,
+       # as it will generate a warning with -Wold-style-definition, meaning
+       # that we would treat it as not working, as the test will fail if
+       # *any* error output, including a warning due to the flag we're
+       # testing, is generated; see
+       #
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+       #
+       # This may, as per those two messages, be fixed in autoconf 2.70,
+       # but we only require 2.64 or newer for now.
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -7427,6 +7884,7 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
            fi
 
@@ -8425,7 +8883,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tcpdump $as_me 4.10.0-PRE-GIT, which was
+This file was extended by tcpdump $as_me 4.99.4-PRE-GIT, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8491,7 +8949,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tcpdump config.status 4.10.0-PRE-GIT
+tcpdump config.status 4.99.4-PRE-GIT
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -9180,7 +9638,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     "default-1":C) if test -f .devel; then
        echo timestamp > stamp-h
        cat $srcdir/Makefile-devel-adds >> Makefile
-       make depend
+       make depend || exit 1
 fi ;;
 
   esac