]> The Tcpdump Group git mirrors - tcpdump/blobdiff - configure
Update .gitignore for other configurations
[tcpdump] / configure
index 858c28e37c828e5d75821eb067d2512e91c01a88..b76db5207c21eb9321f370ff49998bfbef5a4cdc 100755 (executable)
--- a/configure
+++ b/configure
@@ -1330,7 +1330,7 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --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 OS X
+  --disable-universal     don't build universal on macOS
   --enable-smb            enable possibly-buggy SMB printer default=yes
   --disable-smb           disable possibly-buggy SMB printer
 
@@ -2413,6 +2413,10 @@ fi
            export CC
     fi
 
+#
+# Try to enable as many C99 features as we can.
+# At minimum, we want C++/C99-style // comments.
+#
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3202,6 +3206,187 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+  int x = 1234;
+  int y = 5678;
+  debug ("Flag");
+  debug ("X = %d\n", x);
+  showlist (The first, second, and third items.);
+  report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
+
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+    continue;
+  return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
+
+  const char *str;
+  int number;
+  float fnumber;
+
+  while (*format)
+    {
+      switch (*format++)
+       {
+       case 's': // string
+         str = va_arg (args_copy, const char *);
+         break;
+       case 'd': // int
+         number = va_arg (args_copy, int);
+         break;
+       case 'f': // float
+         fnumber = va_arg (args_copy, double);
+         break;
+       default:
+         break;
+       }
+    }
+  va_end (args_copy);
+  va_end (args);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  test_varargs ("s, d' f .", "string", 65, 34.234);
+  test_varargs_macros ();
+
+  // Check flexible array members.
+  struct incomplete_array *ia =
+    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+  ia->datasize = 10;
+  for (int i = 0; i < ia->datasize; ++i)
+    ia->data[i] = i * 1.234;
+
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
+
+  ni.number = 58;
+
+  int dynamic_array[ni.number];
+  dynamic_array[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
+if test "$ac_cv_prog_cc_c99" = "no"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5
+$as_echo "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;}
+fi
 
 
 
@@ -3321,7 +3506,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
                    ;;
 
            osf*)
-                   #
+                   #
                    # Presumed to be DEC OSF/1, Digital UNIX, or
                    # Tru64 UNIX.
                    #
@@ -3451,150 +3636,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
-$as_echo_n "checking for __attribute__... " >&6; }
-if ${ac_cv___attribute__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <stdlib.h>
-
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
-  exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
-  foo();
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv___attribute__=yes
-else
-  ac_cv___attribute__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
-
-else
-  #
-  # We can't use __attribute__, so we can't use __attribute__((unused)),
-  # so we define _U_ to an empty string.
-  #
-  V_DEFS="$V_DEFS -D_U_=\"\""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
-$as_echo "$ac_cv___attribute__" >&6; }
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) can be used without warnings" >&5
-$as_echo_n "checking whether __attribute__((unused)) can be used without warnings... " >&6; }
-if ${ac_cv___attribute___unused+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-
-int
-main(int argc  __attribute((unused)), char **argv __attribute((unused)))
-{
-  printf("Hello, world!\n");
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv___attribute___unused=yes
-else
-  ac_cv___attribute___unused=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-CFLAGS="$save_CFLAGS"
-if test "$ac_cv___attribute___unused" = "yes"; then
-  V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
-else
-  V_DEFS="$V_DEFS -D_U_=\"\""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___unused" >&5
-$as_echo "$ac_cv___attribute___unused" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((fallthrough)) can be used without warnings" >&5
-$as_echo_n "checking whether __attribute__((fallthrough)) can be used without warnings... " >&6; }
-if ${ac_cv___attribute___fallthrough+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#include <stdio.h>
-
-int
-main(int argc, char **argv)
-{
-       int x = 1;
-       switch (x)
-       {
-       case 1:
-               printf ("x == %d\n", x);
-               __attribute__ ((fallthrough));
-       case 2:
-               printf ("x == %d\n", x);
-               break;
-       default:
-               return 0;
-       }
-       return x;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv___attribute___fallthrough=yes
-else
-  ac_cv___attribute___fallthrough=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-CFLAGS="$save_CFLAGS"
-if test "$ac_cv___attribute___fallthrough" = "yes"; then
-
-$as_echo "#define __ATTRIBUTE___FALLTHROUGH_OK 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___fallthrough" >&5
-$as_echo "$ac_cv___attribute___fallthrough" >&6; }
-
-fi
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3992,7 +4033,7 @@ fi
 done
 
 
-for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h
+for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -4041,50 +4082,6 @@ done
                LOCALSRC="print-pflog.c $LOCALSRC"
        fi
 fi
-for ac_header in netinet/if_ether.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
-#include <sys/socket.h>
-"
-if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINET_IF_ETHER_H 1
-_ACEOF
-
-fi
-
-done
-
-if test "$ac_cv_header_netinet_if_ether_h" != yes; then
-       #
-       # The simple test didn't work.
-       # Do we need to include <net/if.h> first?
-       # Unset ac_cv_header_netinet_if_ether_h so we don't
-       # treat the previous failure as a cached value and
-       # suppress the next test.
-       #
-       { $as_echo "$as_me:${as_lineno-$LINENO}: Rechecking with some additional includes" >&5
-$as_echo "$as_me: Rechecking with some additional includes" >&6;}
-       unset ac_cv_header_netinet_if_ether_h
-       for ac_header in netinet/if_ether.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-"
-if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINET_IF_ETHER_H 1
-_ACEOF
-
-fi
-
-done
-
-fi
 
 case "$host_os" in
 
@@ -4261,8 +4258,6 @@ fi
 case "$enableval" in
 yes)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&5
-$as_echo "$as_me: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&2;}
 
 $as_echo "#define ENABLE_SMB 1" >>confdefs.h
 
@@ -4918,47 +4913,136 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
        fi
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
-$as_echo_n "checking for dnet_htoa declaration in netdnet/dnetdb.h... " >&6; }
-if ${td_cv_decl_netdnet_dnetdb_h_dnet_htoa+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dnet_htoa" >&5
+$as_echo_n "checking for library containing dnet_htoa... " >&6; }
+if ${ac_cv_search_dnet_htoa+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <netdnet/dnetdb.h>
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_htoa ();
+int
+main ()
+{
+return dnet_htoa ();
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "dnet_htoa" >/dev/null 2>&1; then :
-  td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes
-else
-  td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no
+for ac_lib in '' dnet; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_dnet_htoa=$ac_res
 fi
-rm -f conftest*
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dnet_htoa+:} false; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&5
-$as_echo "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&6; }
-if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
-
-$as_echo "#define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1" >>confdefs.h
+done
+if ${ac_cv_search_dnet_htoa+:} false; then :
 
+else
+  ac_cv_search_dnet_htoa=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dnet_htoa" >&5
+$as_echo "$ac_cv_search_dnet_htoa" >&6; }
+ac_res=$ac_cv_search_dnet_htoa
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-ac_fn_c_check_func "$LINENO" "vfprintf" "ac_cv_func_vfprintf"
-if test "x$ac_cv_func_vfprintf" = xyes; then :
-  $as_echo "#define HAVE_VFPRINTF 1" >>confdefs.h
 
-else
-  case " $LIBOBJS " in
-  *" vfprintf.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS vfprintf.$ac_objext"
- ;;
-esac
+$as_echo "#define HAVE_DNET_HTOA 1" >>confdefs.h
+
+       #
+       # OK, we have dnet_htoa().  Do we have netdnet/dnetdb.h?
+       #
+       for ac_header in netdnet/dnetdb.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "netdnet/dnetdb.h" "ac_cv_header_netdnet_dnetdb_h" "$ac_includes_default"
+if test "x$ac_cv_header_netdnet_dnetdb_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_NETDNET_DNETDB_H 1
+_ACEOF
 
 fi
 
-ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
+done
+
+       if test "$ac_cv_header_netdnet_dnetdb_h" = "yes"; then
+               #
+               # Yes.  Does it declare dnet_htoa()?
+               #
+               ac_fn_c_check_decl "$LINENO" "dnet_htoa" "ac_cv_have_decl_dnet_htoa" "
+$ac_includes_default
+#include <netdnet/dnetdb.h>
+
+"
+if test "x$ac_cv_have_decl_dnet_htoa" = xyes; then :
+
+                       # Yes.
+
+$as_echo "#define NETDNET_DNETDB_H_DECLARES_DNET_HTOA /**/" >>confdefs.h
+
+
+fi
+
+       fi
+
+       #
+       # Do we have netdnet/dn.h?
+       #
+       for ac_header in netdnet/dn.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "netdnet/dn.h" "ac_cv_header_netdnet_dn_h" "$ac_includes_default"
+if test "x$ac_cv_header_netdnet_dn_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_NETDNET_DN_H 1
+_ACEOF
+
+fi
+
+done
+
+       if test "$ac_cv_header_netdnet_dn_h" = "yes"; then
+               #
+               # Yes.  Does it declare struct dn_naddr?
+               #
+               ac_fn_c_check_type "$LINENO" "struct dn_naddr" "ac_cv_type_struct_dn_naddr" "
+#include <netdnet/dn.h>
+
+"
+if test "x$ac_cv_type_struct_dn_naddr" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_DN_NADDR 1
+_ACEOF
+
+
+fi
+
+       fi
+
+fi
+
+
+ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
 if test "x$ac_cv_func_strlcat" = xyes; then :
   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
 
@@ -5085,65 +5169,6 @@ esac
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dnet_htoa" >&5
-$as_echo_n "checking for library containing dnet_htoa... " >&6; }
-if ${ac_cv_search_dnet_htoa+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_htoa ();
-int
-main ()
-{
-return dnet_htoa ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dnet; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_dnet_htoa=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_dnet_htoa+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_dnet_htoa+:} false; then :
-
-else
-  ac_cv_search_dnet_htoa=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dnet_htoa" >&5
-$as_echo "$ac_cv_search_dnet_htoa" >&6; }
-ac_res=$ac_cv_search_dnet_htoa
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-$as_echo "#define HAVE_DNET_HTOA 1" >>confdefs.h
-
-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 :
@@ -5264,39 +5289,62 @@ $as_echo "Using $pfopen" >&6; }
         fi
     fi
     libpcap=FAIL
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
-$as_echo_n "checking for local pcap library... " >&6; }
 
 # Check whether --with-system-libpcap was given.
 if test "${with_system_libpcap+set}" = set; then :
   withval=$with_system_libpcap;
-fi
+            #
+            # Don't look for a local libpcap.
+            #
+            using_local_libpcap=no
 
-    if test "x$with_system_libpcap" != xyes ; then
-        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
-                d=$dir
-                            fi
-        done
-    fi
-    if test $libpcap = FAIL ; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+else
+
+            #
+            # 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)?$'`
+            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 "not found" >&6; }
+                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
+
+
+    if test $using_local_libpcap = no ; then
         #
-        # Look for pcap-config.
+        # We didn't find a local libpcap.
+        # Look for an installed pcap-config.
         #
         if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args.
@@ -5413,7 +5461,7 @@ fi
             libpcap=`"$PCAP_CONFIG" --libs`
         else
             #
-            # Not found; look for pcap.
+            # Not found; look for an installed pcap.
             #
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
 $as_echo_n "checking for main in -lpcap... " >&6; }
@@ -5472,28 +5520,15 @@ $as_echo "found -- -I$d added" >&6; }
             fi
         fi
     else
+        #
+        # We found a local libpcap.  Add it to the dependencies for
+        # tcpdump.
+        #
         V_PCAPDEP=$libpcap
-        places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
-                 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
-        places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
-                 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
-        pcapH=FAIL
-        if test -r $d/pcap.h; then
-            pcapH=$d
-        else
-            for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
-               if test -r $dir/pcap.h ; then
-                   pcapH=$dir
-               fi
-            done
-        fi
 
-        if test $pcapH = FAIL ; then
-            as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
-        fi
-        V_INCLS="-I$pcapH $V_INCLS"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
-$as_echo "$libpcap" >&6; }
+        #
+        # Look for its pcap-config script.
+        #
         # Extract the first word of "pcap-config", so it can be a program name with args.
 set dummy pcap-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5507,7 +5542,7 @@ else
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $d
+for as_dir in $local_pcap_dir
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
@@ -5534,25 +5569,55 @@ $as_echo "no" >&6; }
 fi
 
 
+
+        if test -n "$PCAP_CONFIG"; then
+            #
+            # We don't want its --cflags or --libs output, because
+            # those presume it's installed.  For the C compiler flags,
+            # we add the source directory for the local libpcap, so
+            # we pick up its header files.
+            #
+            # We do, however, want its additional libraries, as required
+            # when linking statically, because it makes calls to
+            # routines in those libraries, so we'll need to link with
+            # them, because we'll be linking statically with it.
+            #
+            V_INCLS="-I$local_pcap_dir $V_INCLS"
+            additional_libs=`"$PCAP_CONFIG" --static --additional-libs`
+            libpcap="$libpcap $additional_libs"
+        else
+            #
+            # It doesn't have a pcap-config script.
+            # Make sure it has a pcap.h file.
+            #
+            places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
+                egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+            places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+                egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+            pcapH=FAIL
+            if test -r $local_pcap_dir/pcap.h; then
+                pcapH=$local_pcap_dir
+            else
+                for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+                    if test -r $dir/pcap.h ; then
+                        pcapH=$dir
+                    fi
+                done
+            fi
+
+            if test $pcapH = FAIL ; then
+                as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
+            fi
+
+            #
+            # Force the compiler to look for header files in the
+            # directory containing pcap.h.
+            #
+            V_INCLS="-I$pcapH $V_INCLS"
+        fi
     fi
 
-    if test -n "$PCAP_CONFIG"; then
-        #
-        # The libpcap directory has a pcap-config script.
-        # Use it to get any additional libraries needed
-        # to link with the libpcap archive library in
-        # that directory.
-        #
-        # Please read section 11.6 "Shell Substitutions"
-        # in the autoconf manual before doing anything
-        # to this that involves quoting.  Especially note
-        # the statement "There is just no portable way to use
-        # double-quoted strings inside double-quoted back-quoted
-        # expressions (pfew!)."
-        #
-        additional_libs=`"$PCAP_CONFIG" --additional-libs --static`
-        libpcap="$libpcap $additional_libs"
-    else
+    if test -z "$PCAP_CONFIG"; then
         #
         # We don't have pcap-config; find out any additional link flags
         # we need.  (If we have pcap-config, we assume it tells us what
@@ -5584,6 +5649,50 @@ $as_echo "yes" >&6; }
             #
             LIBS="$LIBS -lodm -lcfg"
             ;;
+
+       solaris*)
+            # libdlpi is needed for Solaris 11 and later.
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
+$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
+if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldlpi -L/lib $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlpi_walk ();
+int
+main ()
+{
+return dlpi_walk ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dlpi_dlpi_walk=yes
+else
+  ac_cv_lib_dlpi_dlpi_walk=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
+$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
+if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
+  LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
+fi
+
+            ;;
         esac
     fi
 
@@ -5614,11 +5723,12 @@ fi
 #
 # You are in a twisty little maze of UN*Xes, all different.
 # Some might not have ether_ntohost().
-# Some might have it, but not declare it in any header file.
-# Some might have it, but declare it in <netinet/if_ether.h>.
-# Some might have it, but declare it in <netinet/ether.h>
-# (And some might have it but document it as something declared in
-# <netinet/ethernet.h>, although <netinet/if_ether.h> appears to work.)
+# Some might have it and declare it in <net/ethernet.h>.
+# Some might have it and declare it in <netinet/ether.h>
+# Some might have it and declare it in <sys/ethernet.h>.
+# Some might have it and declare it in <arpa/inet.h>.
+# Some might have it and declare it in <netinet/if_ether.h>.
+# Some might have it and not declare it in any header file.
 #
 # Before you is a C compiler.
 #
@@ -5682,27 +5792,46 @@ done
 if test "$ac_cv_func_ether_ntohost" = yes -a \
     "$ac_cv_buggy_ether_ntohost" = "no"; then
        #
-       # OK, we have ether_ntohost().  Do we have <netinet/if_ether.h>?
+       # OK, we have ether_ntohost().  Is it declared in <net/ethernet.h>?
+       #
+       # This test fails if we don't have <net/ethernet.h> or if we do
+       # but it doesn't declare ether_ntohost().
+       #
+       ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
+#include <net/ethernet.h>
+
+"
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
+
+
+$as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+
+
+fi
+
+       #
+       # Did that succeed?
        #
-       if test "$ac_cv_header_netinet_if_ether_h" = yes; then
+       if test "$ac_cv_have_decl_ether_ntohost" != yes; then
+               #
+               # No, how about <netinet/ether.h>, as on Linux?
+               #
+               # This test fails if we don't have <netinet/ether.h>
+               # or if we do but it doesn't declare ether_ntohost().
                #
-               # Yes.  Does it declare ether_ntohost()?
+               # Unset ac_cv_have_decl_ether_ntohost so we don't
+               # treat the previous failure as a cached value and
+               # suppress the next test.
                #
+               unset ac_cv_have_decl_ether_ntohost
                ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-#include <netinet/if_ether.h>
+#include <netinet/ether.h>
 
 "
 if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
 
 
-$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
 
 
 fi
        #
        if test "$ac_cv_have_decl_ether_ntohost" != yes; then
                #
-               # No, how about <netinet/ether.h>, as on Linux?
+               # No, how about <sys/ethernet.h>, as on Solaris 10
+               # and later?
                #
-               for ac_header in netinet/ether.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "netinet/ether.h" "ac_cv_header_netinet_ether_h" "$ac_includes_default"
-if test "x$ac_cv_header_netinet_ether_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINET_ETHER_H 1
-_ACEOF
+               # This test fails if we don't have <sys/ethernet.h>
+               # or if we do but it doesn't declare ether_ntohost().
+               #
+               # Unset ac_cv_have_decl_ether_ntohost so we don't
+               # treat the previous failure as a cached value and
+               # suppress the next test.
+               #
+               unset ac_cv_have_decl_ether_ntohost
+               ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
+#include <sys/ethernet.h>
 
-fi
+"
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
 
-done
 
-               if test "$ac_cv_header_netinet_ether_h" = yes; then
-                       #
-                       # We have it - does it declare ether_ntohost()?
-                       # Unset ac_cv_have_decl_ether_ntohost so we don't
-                       # treat the previous failure as a cached value and
-                       # suppress the next test.
-                       #
-                       unset ac_cv_have_decl_ether_ntohost
-                       ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
-#include <netinet/ether.h>
+$as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+
+
+fi
+
+       fi
+       #
+       # Did that succeed?
+       #
+       if test "$ac_cv_have_decl_ether_ntohost" != yes; then
+               #
+               # No, how about <arpa/inet.h>, as in AIX?
+               #
+               # This test fails if we don't have <arpa/inet.h>
+               # (if we have ether_ntohost(), we should have
+               # networking, and if we have networking, we should
+               # have <arpa/inet.h>) or if we do but it doesn't
+               # declare ether_ntohost().
+               #
+               # Unset ac_cv_have_decl_ether_ntohost so we don't
+               # treat the previous failure as a cached value and
+               # suppress the next test.
+               #
+               unset ac_cv_have_decl_ether_ntohost
+               ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
+#include <arpa/inet.h>
 
 "
 if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
 
 
-$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+$as_echo "#define ARPA_INET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
 
 
 fi
 
-               fi
        fi
        #
-       # Is ether_ntohost() declared?
+       # Did that succeed?
        #
        if test "$ac_cv_have_decl_ether_ntohost" != yes; then
                #
-               # No, we'll have to declare it ourselves.
-               # Do we have "struct ether_addr"?
+               # No, how about <netinet/if_ether.h>?
+               # On some platforms, it requires <net/if.h> and
+               # <netinet/in.h>, and we always include it with
+               # both of them, so test it with both of them.
                #
-               ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
+               # This test fails if we don't have <netinet/if_ether.h>
+               # and the headers we include before it, or if we do but
+               # <netinet/if_ether.h> doesn't declare ether_hostton().
+               #
+               # Unset ac_cv_have_decl_ether_ntohost so we don't
+               # treat the previous failure as a cached value and
+               # suppress the next test.
+               #
+               unset ac_cv_have_decl_ether_ntohost
+               ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-struct mbuf;
-struct rtentry;
 #include <net/if.h>
+#include <netinet/in.h>
 #include <netinet/if_ether.h>
 
 "
-if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_ETHER_ADDR 1
-_ACEOF
+
+$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
 
 
 fi
 
+       fi
+       #
+       # After all that, is ether_ntohost() declared?
+       #
+       if test "$ac_cv_have_decl_ether_ntohost" = yes; then
+               #
+               # Yes.
+               #
 
-$as_echo "#define HAVE_DECL_ETHER_NTOHOST 0" >>confdefs.h
+$as_echo "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
 
        else
+               #
+               # No, we'll have to declare it ourselves.
+               # Do we have "struct ether_addr" if we include
+               # <netinet/if_ether.h>?
+               #
+               ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
+                       #include <sys/types.h>
+                       #include <sys/socket.h>
+                       #include <net/if.h>
+                       #include <netinet/in.h>
+                       #include <netinet/if_ether.h>
 
-$as_echo "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
+"
+if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
 
-       fi
-fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ETHER_ADDR 1
+_ACEOF
 
-# libdlpi is needed for Solaris 11 and later.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
-$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
-if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldlpi -L/lib $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlpi_walk ();
-int
-main ()
-{
-return dlpi_walk ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dlpi_dlpi_walk=yes
-else
-  ac_cv_lib_dlpi_dlpi_walk=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
-$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
-if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
-  LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
 fi
 
+       fi
+fi
 
 ac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks"
 if test "x$ac_cv_func_pcap_list_datalinks" = xyes; then :
@@ -5858,16 +5998,6 @@ esac
 
 fi
 
-for ac_func in pcap_set_datalink
-do :
-  ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
-if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_SET_DATALINK 1
-_ACEOF
-
-fi
-done
 
 ac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val"
 if test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes; then :
@@ -5904,33 +6034,28 @@ esac
 fi
 
 
-for ac_func in pcap_breakloop
+for ac_func in pcap_set_datalink
 do :
-  ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
-if test "x$ac_cv_func_pcap_breakloop" = xyes; then :
+  ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
+if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_BREAKLOOP 1
+#define HAVE_PCAP_SET_DATALINK 1
 _ACEOF
 
 fi
 done
 
 
-ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
-if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
-
-$as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
-
-else
-
-           case " $LIBOBJS " in
-  *" pcap_dump_ftell.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext"
- ;;
-esac
-
+for ac_func in pcap_breakloop
+do :
+  ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
+if test "x$ac_cv_func_pcap_breakloop" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_BREAKLOOP 1
+_ACEOF
 
 fi
+done
 
 
 #
@@ -6085,6 +6210,20 @@ _ACEOF
 fi
 done
 
+ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
+if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
+  $as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" pcap_dump_ftell.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext"
+ ;;
+esac
+
+fi
+
+
 
 #
 # Check for special debugging functions
@@ -6365,68 +6504,18 @@ $as_echo "#define u_int32_t uint32_t" >>confdefs.h
 
 fi
 
-ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
-#include <sys/types.h>
-
-"
-if test "x$ac_cv_type_u_int64_t" = xyes; then :
-
-else
-
-$as_echo "#define u_int64_t uint64_t" >>confdefs.h
-
-fi
-
-
-#
-# Check for some headers introduced in later versions of libpcap
-# and used by some printers.
-#
-# Those headers might use the {u_}intN_t types, so we must do this
-# after we check for what's needed to get them defined.
-#
-savedcppflags="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $V_INCLS"
-for ac_header in pcap/bluetooth.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include \"netdissect-stdinc.h\"
-"
-if test "x$ac_cv_header_pcap_bluetooth_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_BLUETOOTH_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in pcap/nflog.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "pcap/nflog.h" "ac_cv_header_pcap_nflog_h" "#include \"netdissect-stdinc.h\"
-"
-if test "x$ac_cv_header_pcap_nflog_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_NFLOG_H 1
-_ACEOF
-
-fi
-
-done
+ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
+#include <sys/types.h>
 
-for ac_header in pcap/usb.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include \"netdissect-stdinc.h\"
 "
-if test "x$ac_cv_header_pcap_usb_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_USB_H 1
-_ACEOF
+if test "x$ac_cv_type_u_int64_t" = xyes; then :
 
-fi
+else
 
-done
+$as_echo "#define u_int64_t uint64_t" >>confdefs.h
+
+fi
 
-CPPFLAGS="$savedcppflags"
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
@@ -6659,20 +6748,20 @@ 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 -Wall option" >&5
-$as_echo_n "checking whether the compiler supports the -Wall 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"
-       if expr "x-Wall" : "x-W.*" >/dev/null
+       if expr "x-W" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
-       elif expr "x-Wall" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
+       elif expr "x-W" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wall"
-       elif expr "x-Wall" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -W"
+       elif expr "x-W" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wall"
+           CFLAGS="$CFLAGS -Werror -W"
        else
-           CFLAGS="$CFLAGS -Wall"
+           CFLAGS="$CFLAGS -W"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6690,7 +6779,7 @@ 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 -Wall"
+               V_CCOPT="$V_CCOPT -W"
 
 else
 
@@ -6702,20 +6791,20 @@ 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 -Wmissing-prototypes option" >&5
-$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
+       { $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-Wmissing-prototypes" : "x-W.*" >/dev/null
+       if expr "x-Wall" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
-       elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
+       elif expr "x-Wall" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
-       elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wall"
+       elif expr "x-Wall" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
+           CFLAGS="$CFLAGS -Werror -Wall"
        else
-           CFLAGS="$CFLAGS -Wmissing-prototypes"
+           CFLAGS="$CFLAGS -Wall"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6733,7 +6822,7 @@ 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 -Wmissing-prototypes"
+               V_CCOPT="$V_CCOPT -Wall"
 
 else
 
@@ -6745,20 +6834,20 @@ 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 -Wstrict-prototypes option" >&5
-$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
+       { $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-Wstrict-prototypes" : "x-W.*" >/dev/null
+       if expr "x-Wassign-enum" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
-       elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wassign-enum"
+       elif expr "x-Wassign-enum" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
-       elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wassign-enum"
+       elif expr "x-Wassign-enum" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
+           CFLAGS="$CFLAGS -Werror -Wassign-enum"
        else
-           CFLAGS="$CFLAGS -Wstrict-prototypes"
+           CFLAGS="$CFLAGS -Wassign-enum"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6776,7 +6865,7 @@ 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 -Wstrict-prototypes"
+               V_CCOPT="$V_CCOPT -Wassign-enum"
 
 else
 
@@ -6788,20 +6877,20 @@ 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 -Wwrite-strings option" >&5
-$as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
+       { $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-Wwrite-strings" : "x-W.*" >/dev/null
+       if expr "x-Wcast-qual" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wwrite-strings"
-       elif expr "x-Wwrite-strings" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcast-qual"
+       elif expr "x-Wcast-qual" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
-       elif expr "x-Wwrite-strings" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wcast-qual"
+       elif expr "x-Wcast-qual" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
+           CFLAGS="$CFLAGS -Werror -Wcast-qual"
        else
-           CFLAGS="$CFLAGS -Wwrite-strings"
+           CFLAGS="$CFLAGS -Wcast-qual"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6819,7 +6908,7 @@ 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 -Wwrite-strings"
+               V_CCOPT="$V_CCOPT -Wcast-qual"
 
 else
 
@@ -6831,20 +6920,20 @@ 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 -Wpointer-arith option" >&5
-$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
+       { $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-Wpointer-arith" : "x-W.*" >/dev/null
+       if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
-       elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
+       elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
-       elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
+       elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
+           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
        else
-           CFLAGS="$CFLAGS -Wpointer-arith"
+           CFLAGS="$CFLAGS -Wmissing-prototypes"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6862,7 +6951,7 @@ 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 -Wpointer-arith"
+               V_CCOPT="$V_CCOPT -Wmissing-prototypes"
 
 else
 
@@ -6874,20 +6963,20 @@ 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 -Wcast-qual option" >&5
-$as_echo_n "checking whether the compiler supports the -Wcast-qual option... " >&6; }
+       { $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-Wcast-qual" : "x-W.*" >/dev/null
+       if expr "x-Wold-style-definition" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcast-qual"
-       elif expr "x-Wcast-qual" : "x-f.*" >/dev/null
+           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 -Wcast-qual"
-       elif expr "x-Wcast-qual" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
+       elif expr "x-Wold-style-definition" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wcast-qual"
+           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
        else
-           CFLAGS="$CFLAGS -Wcast-qual"
+           CFLAGS="$CFLAGS -Wold-style-definition"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6905,7 +6994,7 @@ 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 -Wcast-qual"
+               V_CCOPT="$V_CCOPT -Wold-style-definition"
 
 else
 
@@ -6917,20 +7006,20 @@ 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 -Wshadow option" >&5
-$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
+       { $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-Wshadow" : "x-W.*" >/dev/null
+       if expr "x-Wpedantic" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
-       elif expr "x-Wshadow" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpedantic"
+       elif expr "x-Wpedantic" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wshadow"
-       elif expr "x-Wshadow" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wpedantic"
+       elif expr "x-Wpedantic" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wshadow"
+           CFLAGS="$CFLAGS -Werror -Wpedantic"
        else
-           CFLAGS="$CFLAGS -Wshadow"
+           CFLAGS="$CFLAGS -Wpedantic"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6948,7 +7037,7 @@ 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 -Wshadow"
+               V_CCOPT="$V_CCOPT -Wpedantic"
 
 else
 
@@ -6960,20 +7049,20 @@ 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 -Wdeclaration-after-statement option" >&5
-$as_echo_n "checking whether the compiler supports the -Wdeclaration-after-statement option... " >&6; }
+       { $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-Wdeclaration-after-statement" : "x-W.*" >/dev/null
+       if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdeclaration-after-statement"
-       elif expr "x-Wdeclaration-after-statement" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
+       elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
-       elif expr "x-Wdeclaration-after-statement" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
+       elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
+           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
        else
-           CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+           CFLAGS="$CFLAGS -Wpointer-arith"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6991,7 +7080,7 @@ 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 -Wdeclaration-after-statement"
+               V_CCOPT="$V_CCOPT -Wpointer-arith"
 
 else
 
@@ -7003,20 +7092,20 @@ 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 -Wpedantic option" >&5
-$as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
+       { $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-Wpedantic" : "x-W.*" >/dev/null
+       if expr "x-Wshadow" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpedantic"
-       elif expr "x-Wpedantic" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
+       elif expr "x-Wshadow" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wpedantic"
-       elif expr "x-Wpedantic" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wshadow"
+       elif expr "x-Wshadow" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wpedantic"
+           CFLAGS="$CFLAGS -Werror -Wshadow"
        else
-           CFLAGS="$CFLAGS -Wpedantic"
+           CFLAGS="$CFLAGS -Wshadow"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -7034,7 +7123,7 @@ 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 -Wpedantic"
+               V_CCOPT="$V_CCOPT -Wshadow"
 
 else
 
@@ -7046,20 +7135,20 @@ 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; }
+       { $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-Wold-style-definition" : "x-W.*" >/dev/null
+       if expr "x-Wstrict-prototypes" : "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
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
+       elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
-       elif expr "x-Wold-style-definition" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
+       elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
+           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
        else
-           CFLAGS="$CFLAGS -Wold-style-definition"
+           CFLAGS="$CFLAGS -Wstrict-prototypes"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -7077,7 +7166,7 @@ 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"
+               V_CCOPT="$V_CCOPT -Wstrict-prototypes"
 
 else
 
@@ -7089,20 +7178,20 @@ 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 -Wused-but-marked-unused option" >&5
-$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
+       { $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-Wused-but-marked-unused" : "x-W.*" >/dev/null
+       if expr "x-Wunreachable-code-return" : "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
+           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 -Wused-but-marked-unused"
-       elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
+       elif expr "x-Wunreachable-code-return" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
+           CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
        else
-           CFLAGS="$CFLAGS -Wused-but-marked-unused"
+           CFLAGS="$CFLAGS -Wunreachable-code-return"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -7120,7 +7209,7 @@ 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 -Wused-but-marked-unused"
+               V_CCOPT="$V_CCOPT -Wunreachable-code-return"
 
 else
 
@@ -7132,20 +7221,20 @@ 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; }
+       { $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-W" : "x-W.*" >/dev/null
+       if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
-       elif expr "x-W" : "x-f.*" >/dev/null
+           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 -W"
-       elif expr "x-W" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
+       elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -W"
+           CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
        else
-           CFLAGS="$CFLAGS -W"
+           CFLAGS="$CFLAGS -Wused-but-marked-unused"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -7163,7 +7252,7 @@ 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 -W"
+               V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
 
 else
 
@@ -7175,20 +7264,20 @@ 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 -Wassign-enum option" >&5
-$as_echo_n "checking whether the compiler supports the -Wassign-enum option... " >&6; }
+       { $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-Wassign-enum" : "x-W.*" >/dev/null
+       if expr "x-Wwrite-strings" : "x-W.*" >/dev/null
        then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wassign-enum"
-       elif expr "x-Wassign-enum" : "x-f.*" >/dev/null
+           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wwrite-strings"
+       elif expr "x-Wwrite-strings" : "x-f.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wassign-enum"
-       elif expr "x-Wassign-enum" : "x-m.*" >/dev/null
+           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
+       elif expr "x-Wwrite-strings" : "x-m.*" >/dev/null
        then
-           CFLAGS="$CFLAGS -Werror -Wassign-enum"
+           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
        else
-           CFLAGS="$CFLAGS -Wassign-enum"
+           CFLAGS="$CFLAGS -Wwrite-strings"
        fi
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -7206,7 +7295,7 @@ 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 -Wassign-enum"
+               V_CCOPT="$V_CCOPT -Wwrite-strings"
 
 else
 
@@ -7289,8 +7378,11 @@ $as_echo_n "checking whether the compiler supports generating dependencies... "
 /* end confdefs.h.  */
 int main(void) { return 0; }
 _ACEOF
-               echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
-               if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+               if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
+  (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
 $as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
                        DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
@@ -7396,7 +7488,7 @@ if test "$want_libcrypto" != "no"; then
        # El Capitan, probably because they don't want you writing
        # nasty portable code that could run on other UN*Xes, they
        # want you writing code that uses their Shiny New Crypto
-       # Library and that only runs on OS X.
+       # Library and that only runs on macOS.
        #
        ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
 if test "x$ac_cv_header_openssl_crypto_h" = xyes; then :