aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6274
1 files changed, 4532 insertions, 1742 deletions
diff --git a/configure b/configure
index fa15fc7314eb..91fd1806e8a4 100755
--- 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 pcap 1.9.1.
+# Generated by GNU Autoconf 2.69 for pcap 1.10.3.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pcap'
PACKAGE_TARNAME='pcap'
-PACKAGE_VERSION='1.9.1'
-PACKAGE_STRING='pcap 1.9.1'
+PACKAGE_VERSION='1.10.3'
+PACKAGE_STRING='pcap 1.10.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -620,65 +620,74 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
+RPCAPD_LIBS
+INSTALL_RPCAPD
+BUILD_RPCAPD
+PTHREAD_LIBS
+REMOTE_C_SRC
+MODULE_C_SRC
+PLATFORM_CXX_SRC
+PLATFORM_C_SRC
+ADDLARCHIVEOBJS
+ADDLOBJS
+RPATH
+V_SONAME_OPT
+V_SHLIB_OPT
+V_SHLIB_CMD
+V_SHLIB_CCOPT
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
-RDMA_SRC
PCAP_SUPPORT_RDMASNIFF
-DBUS_SRC
+LIBIBVERBS_LIBS_STATIC
+LIBIBVERBS_LIBS
+LIBIBVERBS_CFLAGS
PCAP_SUPPORT_DBUS
-PKGCONFIG
-BT_MONITOR_SRC
-BT_SRC
+DBUS_LIBS_STATIC
+DBUS_LIBS
+DBUS_CFLAGS
PCAP_SUPPORT_BT
-NETMAP_SRC
+PCAP_SUPPORT_DPDK
+DPDK_LIBS_STATIC
+DPDK_LIBS
+DPDK_CFLAGS
PCAP_SUPPORT_NETMAP
-NETFILTER_SRC
PCAP_SUPPORT_NETFILTER
-USB_SRC
-PCAP_SUPPORT_USB
-EXTRA_NETWORK_LIBS
-RPCAPD_LIBS
-INSTALL_RPCAPD
-BUILD_RPCAPD
-PTHREAD_LIBS
+PCAP_SUPPORT_LINUX_USBMON
+MKDEP
+DEPENDENCY_CFLAG
+LN_S
+AR
+RANLIB
MAN_ADMIN_COMMANDS
MAN_MISC_INFO
MAN_FILE_FORMATS
MAN_DEVICES
DYEXT
-SSRC
-ADDLARCHIVEOBJS
-ADDLOBJS
-V_YACC
-V_RPATH_OPT
-V_SONAME_OPT
-V_SHLIB_OPT
-V_SHLIB_CMD
-V_SHLIB_CCOPT
-V_PCAP
-V_LEX
-V_INCLS
-V_FINDALLDEVS
-V_DEFS
V_PROG_LDFLAGS_FAT
V_PROG_CCOPT_FAT
V_LIB_LDFLAGS_FAT
V_LIB_CCOPT_FAT
-V_CCOPT
-MKDEP
-DEPENDENCY_CFLAG
-LN_S
-AR
-RANLIB
-YFLAGS
-YACC
+REENTRANT_PARSER
+BISON_BYACC
LEXLIB
LEX_OUTPUT_ROOT
LEX
-PCAP_SUPPORT_PACKET_RING
+OPENSSL_LIBS_STATIC
+OPENSSL_LIBS
+OPENSSL_CFLAGS
+LIBNL_LIBS_STATIC
+LIBNL_LIBS
+LIBNL_CFLAGS
+BREW
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
VALGRINDTEST_SRC
LIBOBJS
+ac_ct_CXX
+CXXFLAGS
+CXX
EGREP
GREP
CPP
@@ -702,6 +711,12 @@ build_os
build_vendor
build_cpu
build
+LIBS_PRIVATE
+REQUIRES_PRIVATE
+LIBS_STATIC
+V_INCLS
+V_DEFS
+V_CCOPT
target_alias
host_alias
build_alias
@@ -721,7 +736,6 @@ infodir
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -747,10 +761,8 @@ enable_option_checking
with_gcc
enable_largefile
enable_protochain
-with_sita
with_pcap
with_libnl
-enable_packet_ring
enable_ipv6
with_dag
with_dag_includes
@@ -767,6 +779,7 @@ enable_universal
enable_shared
enable_usb
enable_netmap
+with_dpdk
enable_bluetooth
enable_dbus
enable_rdma
@@ -780,8 +793,27 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-YACC
-YFLAGS'
+CXX
+CXXFLAGS
+CCC
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+LIBNL_CFLAGS
+LIBNL_LIBS
+LIBNL_LIBS_STATIC
+OPENSSL_CFLAGS
+OPENSSL_LIBS
+OPENSSL_LIBS_STATIC
+DPDK_CFLAGS
+DPDK_LIBS
+DPDK_LIBS_STATIC
+DBUS_CFLAGS
+DBUS_LIBS
+DBUS_LIBS_STATIC
+LIBIBVERBS_CFLAGS
+LIBIBVERBS_LIBS
+LIBIBVERBS_LIBS_STATIC'
# Initialize some variables set by options.
@@ -820,7 +852,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}'
@@ -1073,15 +1104,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=* \
@@ -1219,7 +1241,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.
@@ -1332,7 +1354,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 pcap 1.9.1 to adapt to many kinds of systems.
+\`configure' configures pcap 1.10.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1372,7 +1394,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]
@@ -1399,7 +1420,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pcap 1.9.1:";;
+ short | recursive ) echo "Configuration of pcap 1.10.3:";;
esac
cat <<\_ACEOF
@@ -1409,17 +1430,15 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-largefile omit support for large files
--disable-protochain disable \"protochain\" insn
- --enable-packet-ring enable packet ring support on Linux [default=yes]
--enable-ipv6 build IPv6-capable version [default=yes]
--enable-remote enable remote packet capture [default=no]
- --disable-remote disable remote packet capture
--enable-optimizer-dbg build optimizer debugging code
--enable-yydebug build parser debugging code
--disable-universal don't build universal on macOS
--enable-shared build shared libraries [default=yes, if support
available]
- --enable-usb enable USB capture support [default=yes, if support
- available]
+ --enable-usb enable Linux usbmon USB capture support
+ [default=yes, if support available]
--enable-netmap enable netmap support [default=yes, if support
available]
--enable-bluetooth enable Bluetooth support [default=yes, if support
@@ -1433,7 +1452,6 @@ 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-sita include SITA support
--with-pcap=TYPE use packet capture TYPE
--without-libnl disable libnl support [default=yes, on Linux, if
present]
@@ -1454,6 +1472,8 @@ Optional Packages:
--with-turbocap[=DIR] include Riverbed TurboCap support (located in
directory DIR, if supplied). [default=yes, if
present]
+ --with-dpdk[=DIR] include DPDK support (located in directory DIR, if
+ supplied). [default=yes, if present]
Some influential environment variables:
CC C compiler command
@@ -1464,12 +1484,39 @@ Some influential environment variables:
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
- YACC The `Yet Another Compiler Compiler' implementation to use.
- Defaults to the first program found out of: `bison -y', `byacc',
- `yacc'.
- YFLAGS The list of arguments that will be passed by default to $YACC.
- This script will default YFLAGS to the empty string to avoid a
- default value of `-d' given by some make applications.
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ LIBNL_CFLAGS
+ C compiler flags for libnl-genl-3.0, overriding pkg-config
+ LIBNL_LIBS linker flags for libnl-genl-3.0, overriding pkg-config
+ LIBNL_LIBS_STATIC
+ static-link linker flags for libnl-genl-3.0, overriding
+ pkg-config
+ OPENSSL_CFLAGS
+ C compiler flags for openssl, overriding pkg-config
+ OPENSSL_LIBS
+ linker flags for openssl, overriding pkg-config
+ OPENSSL_LIBS_STATIC
+ static-link linker flags for openssl, overriding pkg-config
+ DPDK_CFLAGS C compiler flags for libdpdk, overriding pkg-config
+ DPDK_LIBS linker flags for libdpdk, overriding pkg-config
+ DPDK_LIBS_STATIC
+ static-link linker flags for libdpdk, overriding pkg-config
+ DBUS_CFLAGS C compiler flags for dbus-1, overriding pkg-config
+ DBUS_LIBS linker flags for dbus-1, overriding pkg-config
+ DBUS_LIBS_STATIC
+ static-link linker flags for dbus-1, overriding pkg-config
+ LIBIBVERBS_CFLAGS
+ C compiler flags for libibverbs, overriding pkg-config
+ LIBIBVERBS_LIBS
+ linker flags for libibverbs, overriding pkg-config
+ LIBIBVERBS_LIBS_STATIC
+ static-link linker flags for libibverbs, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1537,7 +1584,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pcap configure 1.9.1
+pcap configure 1.10.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1589,13 +1636,13 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -1603,37 +1650,216 @@ case "(($ac_try" in
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
+ (eval "$ac_link") 2>&5
ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
- }; then :
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
ac_retval=0
else
- $as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=$ac_status
fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_c_try_link
+} # ac_fn_c_try_run
+
+# 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_try_cpp LINENO
# ----------------------
@@ -1672,6 +1898,300 @@ fi
} # ac_fn_c_try_cpp
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_run LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_cxx_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_run
+
+# ac_fn_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_compute_int
+
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
@@ -1759,79 +2279,6 @@ fi
} # ac_fn_c_check_header_mongrel
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2059,7 +2506,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 pcap $as_me 1.9.1, which was
+It was created by pcap $as_me 1.10.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2410,6 +2857,86 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+#
+# These are the variables that are used in Makefile, pcap-config, and
+# libpcap.pc.
+#
+# CFLAGS: inherited from the environment, not modified by us (except
+# temporarily during tests that involve compilation). Used only when
+# compiling C source.
+#
+# CXXFLAGS: inherited from the environment, not modified by us. Used only
+# when compiling C++ source.
+#
+# LDFLAGS: inherited from the environment, not modified by us.
+#
+# LIBS: inherited from the environment; we add libraries required by
+# libpcap. Librares that the core libpcap code requires are added
+# first; libraries required by additional pcap modules are first
+# added to ADDITIONAL_LIBS, and only added to LIBS at the end, after
+# we're finished doing configuration tests for the modules.
+#
+# LIBS_STATIC: libraries with which a program using the libpcap *static*
+# library needs to be linked. This is a superset of LIBS, used in
+# pcap-config, so that "pcap-config --libs --static" will report them.
+# Initialized to LIBS.
+#
+# REQUIRES_PRIVATE: pkg-config package names for additional libraries
+# with which a program using the libpcap *static* library needs to be
+# linked and for which a .pc file exists. This is used in libpcap.pc,
+# so that "pkg-config --libs --static" will report them, and so that
+# those libraries will be determined using the library's .pc file, not
+# from our .pc file. Initialized to an empty string.
+#
+# V_CCOPT: additional compiler flags other than -I and -D flags
+# needed when compiling libpcap. Used in Makefile for both C and
+# C++ source.
+#
+# V_DEFS: additional -D compiler flags needed when compiling
+# libpcap. Used in Makefile for both C and C++ source.
+#
+# V_INCLS: additional -I compiler flags needed when compiling
+# libpcap. Used in Makefile for both C and C++ source.
+#
+# ADDITIONAL_LIBS: additional libraries with which the libpcap dynamic
+# library needs to be linked. Used in Makwfile; not used in pcap-config
+# or libpcap.pc, as, in all platforms on which we run, if a dynamic
+# library is linked with other dynamic libraries, a program using
+# that dynamic library doesn't have to link with those libraries -
+# they will be automatically loaded at run time. Initialized to an
+# empty string.
+#
+# ADDITIONAL_LIBS_STATIC: additional libraries with which a program
+# using the libpcap *static* library needs to be linked. This is used
+# in pcap-config, so that "pcap-config --libs --static" will report
+# them. Initialized to an empty string.
+#
+# REQUIRES_PRIVATE: pkg-config package names for additional libraries
+# with which a program using the libpcap *static* library needs to be
+# linked and for which a .pc file exists. This is used in libpcap.pc,
+# so that "pkg-config --libs --static" will report them, and so that
+# those libraries will be determined using the library's .pc file, not
+# from our .pc file. Initialized to an empty string.
+#
+# LIBS_PRIVATE: pkg-config package names for additional libraries with
+# which a program using the libpcap *static* library needs to be linked
+# and for which a .pc file does not exist. This is used in libpcap.pc,
+# so that "pkg-config --libs --static" will report them (those libraries
+# cannot be determined using the library's .pc file, as there is no such
+# file, so it has to come from our .pc file. Initialized to an empty
+# string.
+#
+LIBS_STATIC=""
+REQUIRES_PRIVATE=""
+LIBS_PRIVATE=""
+
+
+
+
+
+
+
+
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
@@ -2624,8 +3151,9 @@ fi
fi
#
-# Try to enable as many C99 features as we can.
-# At minimum, we want C++/C99-style // comments.
+# We require C99 or later.
+# Try to get it, which may involve adding compiler flags;
+# if that fails, give up.
#
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -3594,9 +4122,779 @@ 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;}
+ as_fn_error $? "The C compiler does not support C99" "$LINENO" 5
+fi
+
+#
+# Get the size of a void *, to determine whether this is a 32-bit
+# or 64-bit build.
+#
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+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 how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+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 grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# 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
+
+
+ac_lbl_c_sizeof_void_p="$ac_cv_sizeof_void_p"
+
+#
+# We only need a C++ compiler for Haiku; all code except for its
+# pcap module is in C.
+#
+case "$host_os" in
+haiku*)
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+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
+
+
+ #
+ # Make sure C and C++ have the same pointer sizes with the flags
+ # they're given; if they don't, it means that the compilers for the
+ # languages will, with those flags, not produce code that can be
+ # linked together.
+ #
+ # We have to use different data types, because the results of
+ # a test are cached, so if we test for the size of a given type
+ # in C, the subsequent test in C++ will use the cached variable.
+ # We trick autoconf by testing the size of a "void *" in C and a
+ # "const void *" in C++.
+ #
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+# 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 const void *" >&5
+$as_echo_n "checking size of const void *... " >&6; }
+if ${ac_cv_sizeof_const_void_p+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (const void *))" "ac_cv_sizeof_const_void_p" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_const_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 (const void *)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_const_void_p=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_const_void_p" >&5
+$as_echo "$ac_cv_sizeof_const_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CONST_VOID_P $ac_cv_sizeof_const_void_p
+_ACEOF
+
+
+ ac_lbl_cxx_sizeof_void_p="$ac_cv_sizeof_const_void_p"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+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
+
+ if test "$ac_lbl_cxx_sizeof_void_p" -eq 0; then
+ as_fn_error $? "No C++ compiler was found" "$LINENO" 5
+ fi
+ if test "$ac_lbl_c_sizeof_void_p" -ne "$ac_lbl_cxx_sizeof_void_p"; then
+ as_fn_error $? "C compiler $CC produces code with $ac_lbl_c_sizeof_void_p-byte pointers
+while C++ compiler $CXX produces code with $ac_lbl_cxx_sizeof_void_p-byte pointers. This prevents
+code in those languages from being combined." "$LINENO" 5
+ fi
+ ;;
+esac
@@ -3617,28 +4915,36 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
- elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
- elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
- else
- CFLAGS="$CFLAGS -fvisibility=hidden"
- fi
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ #
+ # 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 :
@@ -3694,6 +5000,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"
else
V_INCLS="$V_INCLS -I/usr/local/include"
@@ -3717,28 +5024,36 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
- elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
- elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
- else
- CFLAGS="$CFLAGS -fvisibility=hidden"
- fi
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ #
+ # 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 :
@@ -3794,6 +5109,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"
;;
@@ -3879,28 +5195,36 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
$as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-xldscope=hidden" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden"
- elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -xldscope=hidden"
- elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -xldscope=hidden"
- else
- CFLAGS="$CFLAGS -xldscope=hidden"
- fi
+ CFLAGS="$CFLAGS -xldscope=hidden"
+ #
+ # 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 :
@@ -3956,6 +5280,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"
;;
@@ -4018,11 +5343,12 @@ $as_echo "#define const /**/" >>confdefs.h
aix*)
;;
- freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|midipix*)
- #
- # Platforms where the linker is the GNU linker
- # or accepts command-line arguments like
- # those the GNU linker accepts.
+ freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
+ #
+ # Platforms where the C compiler is GCC or accepts
+ # compatible command-line arguments, and the linker
+ # is the GNU linker or accepts compatible command-line
+ # arguments.
#
# Some instruction sets require -fPIC on some
# operating systems. Check for them. If you
@@ -4043,12 +5369,11 @@ $as_echo "#define const /**/" >>confdefs.h
esac
V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
V_SONAME_OPT="-Wl,-soname,"
- V_RPATH_OPT="-Wl,-rpath,"
;;
hpux*)
V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
- #
+ #
# XXX - this assumes GCC is using the HP linker,
# rather than the GNU linker, and that the "+h"
# option is used on all HP-UX platforms, both .sl
@@ -4056,7 +5381,7 @@ $as_echo "#define const /**/" >>confdefs.h
#
V_SONAME_OPT="-Wl,+h,"
#
- # By default, directories specifed with -L
+ # By default, directories specified with -L
# are added to the run-time search path, so
# we don't add them in pcap-config.
#
@@ -4065,11 +5390,12 @@ $as_echo "#define const /**/" >>confdefs.h
solaris*)
V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
#
- # XXX - this assumes GCC is using the Sun linker,
- # rather than the GNU linker.
+ # Sun/Oracle's C compiler, GCC, and GCC-compatible
+ # compilers support -Wl,{comma-separated list of options},
+ # and we use the C compiler, not ld, for all linking,
+ # including linking to produce a shared library.
#
V_SONAME_OPT="-Wl,-h,"
- V_RPATH_OPT="-Wl,-R,"
;;
esac
else
@@ -4091,7 +5417,7 @@ $as_echo "#define const /**/" >>confdefs.h
# "-Wl,-soname,{soname}" option, with the soname part
# of the option, while on other platforms the C compiler
# driver takes it as a regular option with the soname
- # following the option. The same applies to V_RPATH_OPT.
+ # following the option.
#
case "$host_os" in
@@ -4102,13 +5428,17 @@ $as_echo "#define const /**/" >>confdefs.h
freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
#
- # "cc" is GCC.
+ # Platforms where the C compiler is GCC or accepts
+ # compatible command-line arguments, and the linker
+ # is the GNU linker or accepts compatible command-line
+ # arguments.
+ #
+ # XXX - does 64-bit SPARC require -fPIC?
#
V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
V_SHLIB_CMD="\$(CC)"
V_SHLIB_OPT="-shared"
V_SONAME_OPT="-Wl,-soname,"
- V_RPATH_OPT="-Wl,-rpath,"
;;
hpux*)
@@ -4117,29 +5447,33 @@ $as_echo "#define const /**/" >>confdefs.h
V_SHLIB_OPT="-b"
V_SONAME_OPT="+h "
#
- # By default, directories specifed with -L
+ # By default, directories specified with -L
# are added to the run-time search path, so
# we don't add them in pcap-config.
#
;;
osf*)
- #
+ #
# Presumed to be DEC OSF/1, Digital UNIX, or
# Tru64 UNIX.
#
V_SHLIB_CMD="\$(CC)"
V_SHLIB_OPT="-shared"
V_SONAME_OPT="-soname "
- V_RPATH_OPT="-rpath "
;;
solaris*)
V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
V_SHLIB_CMD="\$(CC)"
V_SHLIB_OPT="-G"
- V_SONAME_OPT="-h "
- V_RPATH_OPT="-R"
+ #
+ # Sun/Oracle's C compiler, GCC, and GCC-compatible
+ # compilers support -Wl,{comma-separated list of options},
+ # and we use the C compiler, not ld, for all linking,
+ # including linking to produce a shared library.
+ #
+ V_SONAME_OPT="-Wl,-h,"
;;
esac
fi
@@ -4207,6 +5541,125 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5
+$as_echo_n "checking for __atomic_load_n... " >&6; }
+ if ${ac_cv_have___atomic_load_n+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ int i = 17;
+ int j;
+ j = __atomic_load_n(&i, __ATOMIC_RELAXED);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_have___atomic_load_n=yes
+else
+ ac_have___atomic_load_n=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5
+$as_echo "$ac_have___atomic_load_n" >&6; }
+ if test $ac_have___atomic_load_n = yes ; then
+
+$as_echo "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5
+$as_echo_n "checking for __atomic_store_n... " >&6; }
+ if ${ac_cv_have___atomic_store_n+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ int i;
+ __atomic_store_n(&i, 17, __ATOMIC_RELAXED);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_have___atomic_store_n=yes
+else
+ ac_have___atomic_store_n=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5
+$as_echo "$ac_have___atomic_store_n" >&6; }
+ if test $ac_have___atomic_store_n = yes ; then
+
+$as_echo "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h
+
+ fi
+
#
# Try to arrange for large file support.
#
@@ -4235,7 +5688,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -4281,7 +5734,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -4305,7 +5758,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -4350,7 +5803,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -4374,7 +5827,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -4479,404 +5932,7 @@ $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-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 how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-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 grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in sys/ioccom.h sys/sockio.h limits.h
+for ac_header in sys/ioccom.h sys/sockio.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"
@@ -4901,74 +5957,65 @@ 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
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
-if test "$ac_cv_header_net_pfvar_h" = yes; then
+case "$host_os" in
+haiku*)
#
- # Check for various PF actions.
+ # Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
-$as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CFLAGS="$CFLAGS -D_BSD_SOURCE"
+ #
+ # Haiku has getpass in libbsd.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpass in -lbsd" >&5
+$as_echo_n "checking for getpass in -lbsd... " >&6; }
+if ${ac_cv_lib_bsd_getpass+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
- #include <sys/socket.h>
- #include <net/if.h>
- #include <net/pfvar.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 getpass ();
int
main ()
{
-return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
+return getpass ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
-
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_bsd_getpass=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ ac_cv_lib_bsd_getpass=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-
-case "$host_os" in
-linux*|uclinux*)
- for ac_header in linux/sockios.h linux/if_bonding.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-#include <sys/socket.h>
-#include <linux/if.h>
-
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getpass" >&5
+$as_echo "$ac_cv_lib_bsd_getpass" >&6; }
+if test "x$ac_cv_lib_bsd_getpass" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_LIBBSD 1
_ACEOF
-fi
+ LIBS="-lbsd $LIBS"
-done
+fi
;;
esac
@@ -5019,6 +6066,11 @@ $as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
fi
fi
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+
for ac_func in strerror
do :
ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
@@ -5079,14 +6131,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
#
- # We don't have strerror_r; do we have strerror_s?
+ # We don't have strerror_r; do we have _wcserror_s?
#
- for ac_func in strerror_s
+ for ac_func in _wcserror_s
do :
- ac_fn_c_check_func "$LINENO" "strerror_s" "ac_cv_func_strerror_s"
-if test "x$ac_cv_func_strerror_s" = xyes; then :
+ ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s"
+if test "x$ac_cv_func__wcserror_s" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR_S 1
+#define HAVE__WCSERROR_S 1
_ACEOF
fi
@@ -5112,41 +6164,22 @@ done
#
-# Either:
-#
-# we have snprintf() and vsnprintf(), and have asprintf() and
-# vasprintf();
-#
-# we have snprintf() and vsnprintf(), but don't have asprintf()
-# or vasprintf();
-#
-# we have neither snprintf() nor vsnprintf(), and don't have
-# asprintf() or vasprintf(), either.
+# Make sure we have vsnprintf() and snprintf(); we require them.
#
-# We assume that if we have asprintf() we have vasprintf(), as well
-# as snprintf() and vsnprintf(), and that if we have snprintf() we
-# have vsnprintf().
-#
-# For the first case, we don't need any replacement routines.
-# For the second case, we need replacement asprintf()/vasprintf()
-# routines.
-# For the third case, we need replacement snprintf()/vsnprintf() and
-# asprintf()/vasprintf() routines.
-#
-needsnprintf=no
-for ac_func in vsnprintf snprintf
-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"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
+if test "x$ac_cv_func_vsnprintf" = xyes; then :
else
- needsnprintf=yes
+ as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
fi
-done
+
+ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes; then :
+
+else
+ as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
+fi
+
needasprintf=no
for ac_func in vasprintf asprintf
@@ -5163,23 +6196,7 @@ else
fi
done
-if test $needsnprintf = yes; then
- #
- # We assume we have none of them; missing/snprintf.c supplies
- # all of them.
- #
- case " $LIBOBJS " in
- *" snprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
- ;;
-esac
-
-elif test $needasprintf = yes; then
- #
- # We assume we have snprintf()/vsnprintf() but lack
- # asprintf()/vasprintf(); missing/asprintf.c supplies
- # the latter (using vsnprintf()).
- #
+if test $needasprintf = yes; then
case " $LIBOBJS " in
*" asprintf.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
@@ -5356,9 +6373,61 @@ if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
else
#
- # We didn't find it.
+ # Not found in libsocket; test for it in libnetwork, which
+ # is where it is in Haiku.
#
- as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
+$as_echo_n "checking for getaddrinfo in -lnetwork... " >&6; }
+if ${ac_cv_lib_network_getaddrinfo+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnetwork $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 getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_network_getaddrinfo=yes
+else
+ ac_cv_lib_network_getaddrinfo=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_network_getaddrinfo" >&5
+$as_echo "$ac_cv_lib_network_getaddrinfo" >&6; }
+if test "x$ac_cv_lib_network_getaddrinfo" = xyes; then :
+
+ #
+ # OK, we found it in libnetwork.
+ #
+ LIBS="-lnetwork $LIBS"
+
+else
+
+ #
+ # We didn't find it.
+ #
+ as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
+
+fi
+
fi
@@ -5836,7 +6905,7 @@ fi
# This test fails if we don't have <arpa/inet.h>
# (if we have ether_hostton(), we should have
# networking, and if we have networking, we should
- # have <arapa/inet.h>) or if we do but it doesn't
+ # have <arpa/inet.h>) or if we do but it doesn't
# declare ether_hostton().
#
# Unset ac_cv_have_decl_ether_hostton so we don't
@@ -6101,25 +7170,6 @@ $as_echo "${enable_protochain}" >&6; }
#
VALGRINDTEST_SRC=
-#
-# SITA support is mutually exclusive with native capture support;
-# "--with-sita" selects SITA support.
-#
-
-# Check whether --with-sita was given.
-if test "${with_sita+set}" = set; then :
- withval=$with_sita;
- if test ! "x$withval" = "xno" ; then
-
-$as_echo "#define SITA 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling SITA ACN support" >&5
-$as_echo "$as_me: Enabling SITA ACN support" >&6;}
- V_PCAP=sita
- fi
-
-else
-
# Check whether --with-pcap was given.
if test "${with_pcap+set}" = set; then :
@@ -6254,6 +7304,18 @@ fi
done
+ for ac_header in config/HaikuConfig.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
+if test "x$ac_cv_header_config_HaikuConfig_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CONFIG_HAIKUCONFIG_H 1
+_ACEOF
+
+fi
+
+done
+
if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
#
@@ -6279,11 +7341,6 @@ done
# No prizes for guessing this one.
#
V_PCAP=linux
-
- #
- # XXX - this won't work with older kernels that have
- # SOCK_PACKET sockets but not PF_PACKET sockets.
- #
VALGRINDTEST_SRC=valgrindtest.c
elif test "$ac_cv_header_net_pfilt_h" = yes; then
#
@@ -6315,6 +7372,11 @@ done
# DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
#
V_PCAP=dlpi
+ elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
+ #
+ # Haiku.
+ #
+ V_PCAP=haiku
else
#
# Nothing we support.
@@ -6322,8 +7384,8 @@ done
V_PCAP=null
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
$as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
-$as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL.md file for more info)" >&5
+$as_echo "$as_me: WARNING: (see the INSTALL.md file for more info)" >&2;}
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
@@ -6333,16 +7395,236 @@ $as_echo "$V_PCAP" >&6; }
#
-# Do capture-mechanism-dependent tests.
+# Do we have pkg-config?
+#
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; }
+ PKG_CONFIG=""
+ fi
+fi
+
+#
+# Do we have the brew command from Homebrew?
+#
+# Extract the first word of "brew", so it can be a program name with args.
+set dummy brew; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BREW+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $BREW in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_BREW="$BREW" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_BREW="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+BREW=$ac_cv_path_BREW
+if test -n "$BREW"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5
+$as_echo "$BREW" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+#
+# Solaris pkg-config is annoying. For at least one package (D-Bus, I'm
+# looking at *you*!), there are separate include files for 32-bit and
+# 64-bit builds (I guess using "unsigned long long" as a 64-bit integer
+# type on a 64-bit build is like crossing the beams or soething), and
+# there are two separate .pc files, so if we're doing a 32-bit build we
+# should make sure we look in /usr/lib/pkgconfig for .pc files and if
+# we're doing a 64-bit build we should make sure we look in
+# /usr/lib/amd64/pkgconfig for .pc files.
+#
+case "$host_os" in
+
+solaris*)
+ if test "$ac_cv_sizeof_void_p" -eq 8; then
+ #
+ # 64-bit build. If the path is empty, set it to
+ # /usr/lib/amd64/pkgconfig; otherwise, if
+ # /usr/lib/pkgconfig appears in the path, prepend
+ # /usr/lib/amd64/pkgconfig to it; otherwise, put
+ # /usr/lib/amd64/pkgconfig at the end.
+ #
+ if test -z "$PKG_CONFIG_PATH"; then
+ #
+ # Not set, or empty. Set it to
+ # /usr/lib/amd64/pkgconfig.
+ #
+ PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig
+ elif test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/pkgconfig"`; then
+ #
+ # It contains /usr/lib/pkgconfig. Prepend
+ # /usr/lib/amd64/pkgconfig to /usr/lib/pkgconfig.
+ #
+ PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/pkgconfig;/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig;"`
+ else
+ #
+ # Not empty, but doesn't contain /usr/lib/pkgconfig.
+ # Append /usr/lib/amd64/pkgconfig to it.
+ #
+ PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/amd64/pkgconfig"
+ fi
+ export PKG_CONFIG_PATH
+ elif test "$ac_cv_sizeof_void_p" -eq 4; then
+ #
+ # 32-bit build. If /usr/amd64/lib/pkgconfig appears
+ # in the path, prepend /usr/lib/pkgconfig to it.
+ #
+ if test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/amd64/pkgconfig"`; then
+ #
+ # It contains /usr/lib/amd64/pkgconfig. Prepend
+ # /usr/lib/pkgconfig to /usr/lib/amd64/pkgconfig.
+ #
+ PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/amd64/pkgconfig;/usr/lib/pkgconfig:/usr/lib/amd64/pkgconfig;"`
+ export PKG_CONFIG_PATH
+ fi
+ fi
+esac
+
+#
+# Handle each capture type.
#
case "$V_PCAP" in
dlpi)
#
- # Needed for common functions used by pcap-[dlpi,libdlpi].c
- #
- SSRC="dlpisubs.c"
-
- #
# Checks for some header files.
#
for ac_header in sys/bufmod.h sys/dlpi_ext.h
@@ -6370,7 +7652,7 @@ done
# Also, due to the bug above applications that link to libpcap with
# libdlpi will have to add "-L/lib" option to "configure".
#
- saved_ldflags=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LIBS -L/lib"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
@@ -6411,16 +7693,32 @@ $as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
LIBS="-ldlpi $LIBS"
+ LIBS_STATIC="-ldlpi $LIBS_STATIC"
+ LIBS_PRIVATE="-ldlpi $LIBS_PRIVATE"
V_PCAP=libdlpi
+ #
+ # Capture module plus common code needed for
+ # common functions used by pcap-[dlpi,libdlpi].c
+ #
+ PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
+
$as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
else
- V_PCAP=dlpi
+
+ V_PCAP=dlpi
+
+ #
+ # Capture module plus common code needed for
+ # common functions used by pcap-[dlpi,libdlpi].c
+ #
+ PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
+
fi
- LDFLAGS=$saved_ldflags
+ LDFLAGS="$save_LDFLAGS"
#
# Checks whether <sys/dlpi.h> is usable, to catch weird SCO
@@ -6482,8 +7780,44 @@ fi
;;
+enet)
+ #
+ # Capture module
+ #
+ PLATFORM_C_SRC="pcap-enet.c"
+ ;;
+
+haiku)
+ #
+ # Capture module
+ #
+ PLATFORM_CXX_SRC="pcap-haiku.cpp"
+
+ #
+ # Just for the sake of it.
+ #
+ for ac_header in net/if.h net/if_dl.h net/if_types.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"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ ;;
+
linux)
#
+ # Capture module
+ #
+ PLATFORM_C_SRC="pcap-linux.c"
+
+ #
# Do we have the wireless extensions?
#
for ac_header in linux/wireless.h
@@ -6506,6 +7840,12 @@ done
#
# Do we have libnl?
+ # We only want version 3. Version 2 was, apparently,
+ # short-lived, and version 1 is source and binary
+ # incompatible with version 3, and it appears that,
+ # these days, everybody's using version 3. We're
+ # not supporting older versions of the Linux kernel;
+ # let's drop support for older versions of libnl, too.
#
# Check whether --with-libnl was given.
@@ -6517,161 +7857,178 @@ fi
if test x$with_libnl != xno ; then
- have_any_nl="no"
+ #
+ # Check for libnl-genl-3.0 with pkg-config.
+ #
- incdir=-I/usr/include/libnl3
- libnldir=
- case "$with_libnl" in
- yes|if_available)
- ;;
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5
+$as_echo_n "checking for libnl-genl-3.0 with pkg-config... " >&6; }
- *)
- if test -d $withval; then
- libnldir=-L${withval}/lib/.libs
- incdir=-I${withval}/include
- fi
- ;;
- esac
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
- #
- # Try libnl 3.x first.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
-$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
-if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ #
+ # The package was found, so try to get its C flags and
+ # libraries.
+ #
+ if test -n "$LIBNL_CFLAGS"; then
+ pkg_cv_LIBNL_CFLAGS="$LIBNL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
-/* 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 nl_socket_alloc ();
-int
-main ()
-{
-return nl_socket_alloc ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nl_3_nl_socket_alloc=yes
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-genl-3.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- ac_cv_lib_nl_3_nl_socket_alloc=no
+ pkg_failed=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ else
+ pkg_failed=untried
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
-$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
-if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
-
- #
- # Yes, we have libnl 3.x.
- #
- LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
-
-$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
-
+ if test -n "$LIBNL_LIBS"; then
+ pkg_cv_LIBNL_LIBS="$LIBNL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
-$as_echo "#define HAVE_LIBNL_3_x 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
-
- V_INCLS="$V_INCLS ${incdir}"
- have_any_nl="yes"
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-genl-3.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$LIBNL_LIBS_STATIC"; then
+ pkg_cv_LIBNL_LIBS_STATIC="$LIBNL_LIBS_STATIC"
+ elif test -n "$PKG_CONFIG"; then
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBNL_LIBS_STATIC=`$PKG_CONFIG --libs --static "libnl-genl-3.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
fi
- if test x$have_any_nl = xno ; then
- #
- # Try libnl 2.x
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5
-$as_echo_n "checking for nl_socket_alloc in -lnl... " >&6; }
-if ${ac_cv_lib_nl_nl_socket_alloc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnl $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 nl_socket_alloc ();
-int
-main ()
-{
-return nl_socket_alloc ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nl_nl_socket_alloc=yes
+ if test $pkg_failed = yes; then
+ #
+ # That failed - report an error.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+$as_echo "error" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- ac_cv_lib_nl_nl_socket_alloc=no
+ _pkg_short_errors_supported=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_nl_nl_socket_alloc" >&5
-$as_echo "$ac_cv_lib_nl_nl_socket_alloc" >&6; }
-if test "x$ac_cv_lib_nl_nl_socket_alloc" = xyes; then :
+ if test $_pkg_short_errors_supported = yes; then
+ LIBNL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-genl-3.0" 2>&1`
+ else
+ LIBNL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-genl-3.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBNL_PKG_ERRORS" >&5
- #
- # Yes, we have libnl 2.x.
- #
- LIBS="${libnldir} -lnl-genl -lnl $LIBS"
+ as_fn_error $? "Package requirements (libnl-genl-3.0) were not met:
-$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
+$LIBNL_PKG_ERRORS
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
-$as_echo "#define HAVE_LIBNL_2_x 1" >>confdefs.h
+Alternatively, you may set the environment variables LIBNL_CFLAGS
+and LIBNL_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+ elif test $pkg_failed = untried; then
+ #
+ # We don't have pkg-config, so it didn't work.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+$as_echo "not found (pkg-config not found)" >&6; }
+ else
+ #
+ # We found the package.
+ #
+ LIBNL_CFLAGS=$pkg_cv_LIBNL_CFLAGS
+ LIBNL_LIBS=$pkg_cv_LIBNL_LIBS
+ LIBNL_LIBS_STATIC=$pkg_cv_LIBNL_LIBS_STATIC
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+
+ pkg_config_found_libnl=yes
+ V_INCLS="$V_INCLS $LIBNL_CFLAGS"
+ ADDITIONAL_LIBS="$LIBNL_LIBS $ADDITIONAL_LIBS"
+ ADDITIONAL_LIBS_STATIC="$LIBNL_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
+ REQUIRES_PRIVATE="libnl-genl-3.0 $REQUIRES_PRIVATE"
-$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
+$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
-$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
+ fi
+else
- have_any_nl="yes"
+ #
+ # The package isn't present.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
fi
- fi
- if test x$have_any_nl = xno ; then
+ if test x$pkg_config_found_libnl != xyes; then
#
- # No, we don't; do we have libnl 1.x?
+ # OK, either we don't have pkg-config or there
+ # wasn't a .pc file for it; Check for it directly.
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_handle_alloc in -lnl" >&5
-$as_echo_n "checking for nl_handle_alloc in -lnl... " >&6; }
-if ${ac_cv_lib_nl_nl_handle_alloc+:} false; then :
+ case "$with_libnl" in
+
+ yes|if_available)
+ incdir=-I/usr/include/libnl3
+ libnldir=
+ ;;
+
+ *)
+ if test -d $withval; then
+ libnldir=-L${withval}/lib
+ incdir=-I${withval}/include
+ fi
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
+$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
+if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnl $LIBS"
+LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6681,88 +8038,54 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char nl_handle_alloc ();
+char nl_socket_alloc ();
int
main ()
{
-return nl_handle_alloc ();
+return nl_socket_alloc ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nl_nl_handle_alloc=yes
+ ac_cv_lib_nl_3_nl_socket_alloc=yes
else
- ac_cv_lib_nl_nl_handle_alloc=no
+ ac_cv_lib_nl_3_nl_socket_alloc=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_nl_nl_handle_alloc" >&5
-$as_echo "$ac_cv_lib_nl_nl_handle_alloc" >&6; }
-if test "x$ac_cv_lib_nl_nl_handle_alloc" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
+$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
+if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
#
- # Yes.
+ # Yes, we have libnl 3.x.
#
- LIBS="${libnldir} -lnl $LIBS"
+ ADDITIONAL_LIBS="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS"
+ ADDITIONAL_LIBS_STATIC="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS_STATIC"
+ LIBS_PRIVATE="${libnldir} -lnl-genl-3 -lnl-3 $LIBS_PRIVATE"
$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
- have_any_nl="yes"
-
-fi
-
- fi
-
- if test x$have_any_nl = xno ; then
- #
- # No, we don't have libnl at all.
- #
- if test x$with_libnl = xyes ; then
- as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
- fi
- fi
- fi
-
- for ac_header in linux/ethtool.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" "
-$ac_includes_default
-#include <linux/types.h>
-
-"
-if test "x$ac_cv_header_linux_ethtool_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LINUX_ETHTOOL_H 1
-_ACEOF
-
-fi
-
-done
+ V_INCLS="$V_INCLS ${incdir}"
+else
- #
- # Check to see if struct tpacket_stats is defined in
- # <linux/if_packet.h>. If so, then pcap-linux.c can use this
- # to report proper statistics.
- #
- # -Scott Barron
- #
- ac_fn_c_check_type "$LINENO" "struct tpacket_stats" "ac_cv_type_struct_tpacket_stats" "
- #include <linux/if_packet.h>
-
-"
-if test "x$ac_cv_type_struct_tpacket_stats" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_TPACKET_STATS 1
-_ACEOF
-
+ #
+ # No, we don't have libnl at all.
+ # Fail if the user explicitly requested
+ # it.
+ #
+ if test x$with_libnl = xyes ; then
+ as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
+ fi
fi
+ fi
+ fi
#
# Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
@@ -6790,6 +8113,11 @@ fi
bpf)
#
+ # Capture module
+ #
+ PLATFORM_C_SRC="pcap-bpf.c"
+
+ #
# Check whether we have the *BSD-style ioctls.
#
for ac_header in net/if_media.h
@@ -6828,12 +8156,44 @@ fi
;;
+pf)
+ #
+ # Capture module
+ #
+ PLATFORM_C_SRC="pcap-pf.c"
+ ;;
+
+snit)
+ #
+ # Capture module
+ #
+ PLATFORM_C_SRC="pcap-snit.c"
+ ;;
+
+snoop)
+ #
+ # Capture module
+ #
+ PLATFORM_C_SRC="pcap-snoop.c"
+ ;;
+
dag)
#
# --with-pcap=dag is the only way to get here, and it means
# "DAG support but nothing else"
#
V_DEFS="$V_DEFS -DDAG_ONLY"
+ PLATFORM_C_SRC="pcap-dag.c"
+ xxx_only=yes
+ ;;
+
+dpdk)
+ #
+ # --with-pcap=dpdk is the only way to get here, and it means
+ # "DPDK support but nothing else"
+ #
+ V_DEFS="$V_DEFS -DDPDK_ONLY"
+ PLATFORM_C_SRC="pcap-dpdk.c"
xxx_only=yes
;;
@@ -6843,6 +8203,7 @@ septel)
# "Septel support but nothing else"
#
V_DEFS="$V_DEFS -DSEPTEL_ONLY"
+ PLATFORM_C_SRC="pcap-septel.c"
xxx_only=yes
;;
@@ -6852,10 +8213,15 @@ snf)
# "SNF support but nothing else"
#
V_DEFS="$V_DEFS -DSNF_ONLY"
+ PLATFORM_C_SRC="pcap-snf.c"
xxx_only=yes
;;
null)
+ #
+ # Capture module
+ #
+ PLATFORM_C_SRC="pcap-null.c"
;;
*)
@@ -6879,7 +8245,7 @@ if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
# We have the header, so we use "getifaddrs()" to
# get the list of interfaces.
#
- V_FINDALLDEVS=fad-getad.c
+ PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
else
@@ -6948,18 +8314,15 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
$as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
if test $ac_cv_lbl_have_siocglifconf = yes ; then
- V_FINDALLDEVS=fad-glifc.c
+ PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
else
- V_FINDALLDEVS=fad-gifc.c
+ PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
fi
fi
fi
-fi
-
-
case "$host_os" in
linux*)
for ac_header in linux/net_tstamp.h
@@ -6981,21 +8344,6 @@ $as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
;;
esac
-# Check whether --enable-packet-ring was given.
-if test "${enable_packet_ring+set}" = set; then :
- enableval=$enable_packet_ring;
-else
- enable_packet_ring=yes
-fi
-
-
-if test "x$enable_packet_ring" != "xno" ; then
-
-$as_echo "#define PCAP_SUPPORT_PACKET_RING 1" >>confdefs.h
-
-
-fi
-
#
# Check for socklen_t.
#
@@ -7105,10 +8453,21 @@ if test "$want_dag" != no; then
if test -z "$dag_lib_dir"; then
dag_lib_dir="$dag_root/lib"
+ #
+ # Handle multiarch systems.
+ #
+ if test -d "$dag_lib_dir/$host"
+ then
+ dag_lib_dir="$dag_lib_dir/$host"
+ fi
fi
- V_INCLS="$V_INCLS -I$dag_include_dir"
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS -I$dag_include_dir"
for ac_header in dagapi.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
@@ -7122,16 +8481,27 @@ fi
done
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+
if test "$ac_cv_header_dagapi_h" = yes; then
+ V_INCLS="$V_INCLS -I$dag_include_dir"
+
if test $V_PCAP != dag ; then
- SSRC="$SSRC pcap-dag.c"
+ MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
fi
# Check for various DAG API functions.
# Don't need to save and restore LIBS to prevent -ldag being
# included if there's a found-action (arg 3).
- saved_ldflags=$LDFLAGS
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
LDFLAGS="-L$dag_lib_dir"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
$as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
@@ -7170,11 +8540,15 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
$as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDAG 1
-_ACEOF
- LIBS="-ldag $LIBS"
+ #
+ # We assume that if we have libdag we have
+ # libdagconf, as they're installed at the
+ # same time from the same package.
+ #
+ ADDITIONAL_LIBS="-L$dag_lib_dir $ADDITIONAL_LIBS -ldag -ldagconf"
+ ADDITIONAL_LIBS_STATIC="-L$dag_lib_dir $ADDITIONAL_LIBS_STATIC -ldag -ldagconf"
+ LIBS_PRIVATE="-L$dag_lib_dir $LIBS_PRIVATE -ldag -ldagconf"
else
as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
@@ -7309,20 +8683,27 @@ $as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
fi
- LDFLAGS=$saved_ldflags
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
#
# We assume that if we have libdag we have libdagconf,
# as they're installed at the same time from the same
# package.
#
- LIBS="$LIBS -ldag -ldagconf"
- LDFLAGS="$LDFLAGS -L$dag_lib_dir"
-
if test "$dag_large_streams" = 1; then
$as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ LIBS="$LIBS -ldag -ldagconf"
+ LDFLAGS="$LDFLAGS -L$dag_lib_dir"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
$as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
@@ -7365,6 +8746,11 @@ else
ac_dag_have_vdag="0"
fi
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
if test "$ac_dag_have_vdag" = 1; then
$as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
@@ -7372,7 +8758,9 @@ $as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
if test "$ac_lbl_have_pthreads" != "found"; then
as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
fi
- LIBS="$LIBS $PTHREAD_LIBS"
+ ADDITIONAL_LIBS="$ADDITIONAL_LIBS $PTHREAD_LIBS"
+ ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $PTHREAD_LIBS"
+ LIBS_PRIVATE="$LIBS_PRIVATE $PTHREAD_LIBS"
fi
fi
@@ -7380,7 +8768,6 @@ $as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
$as_echo "#define HAVE_DAG_API 1" >>confdefs.h
else
-
if test "$V_PCAP" = dag; then
# User requested "dag" capture type but we couldn't
# find the DAG API support.
@@ -7388,10 +8775,11 @@ $as_echo "#define HAVE_DAG_API 1" >>confdefs.h
fi
if test "$want_dag" = yes; then
- # User wanted DAG support but we couldn't find it.
+ # User wanted DAG support but we couldn't find it.
as_fn_error $? "DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
fi
fi
+ CFLAGS="$save_CFLAGS"
fi
@@ -7457,7 +8845,7 @@ $as_echo "yes ($septel_include_dir)" >&6; }
ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
if test "$V_PCAP" != septel ; then
- SSRC="$SSRC pcap-septel.c"
+ MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
fi
@@ -7474,7 +8862,7 @@ $as_echo "no" >&6; }
fi
if test "$want_septel" = yes; then
- # User wanted Septel support but we couldn't find it.
+ # User wanted Septel support but we couldn't find it.
as_fn_error $? "Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
fi
fi
@@ -7558,11 +8946,22 @@ $as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
if test -z "$snf_lib_dir"; then
snf_lib_dir="$snf_root/lib"
+ #
+ # Handle multiarch systems.
+ #
+ if test -d "$snf_lib_dir/$host"
+ then
+ snf_lib_dir="$snf_lib_dir/$host"
+ fi
fi
if test -f "$snf_include_dir/snf.h"; then
# We found a header; make sure we can link with the library
- saved_ldflags=$LDFLAGS
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
LDFLAGS="$LDFLAGS -L$snf_lib_dir"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
$as_echo_n "checking for snf_init in -lsnf... " >&6; }
@@ -7604,7 +9003,11 @@ if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
ac_cv_lbl_snf_api="yes"
fi
- LDFLAGS="$saved_ldflags"
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
if test "$ac_cv_lbl_snf_api" = no; then
as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
fi
@@ -7615,11 +9018,12 @@ fi
$as_echo "yes ($snf_root)" >&6; }
V_INCLS="$V_INCLS -I$snf_include_dir"
- LIBS="$LIBS -lsnf"
- LDFLAGS="$LDFLAGS -L$snf_lib_dir"
+ ADDITIONAL_LIBS="$ADDITIONAL_LIBS -L$snf_lib_dir -lsnf"
+ ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC -L$snf_lib_dir -lsnf"
+ LIBS_PRIVATE="$LIBS_PRIVATE -L$snf_lib_dir -lsnf"
if test "$V_PCAP" != snf ; then
- SSRC="$SSRC pcap-snf.c"
+ MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
fi
@@ -7682,12 +9086,16 @@ if test "$want_turbocap" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
$as_echo_n "checking whether TurboCap is supported... " >&6; }
+
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
if test ! -z "$turbocap_root"; then
TURBOCAP_CFLAGS="-I$turbocap_root/include"
- TURBOCAP_LIBS="-L$turbocap_root/lib"
+ TURBOCAP_LDFLAGS="-L$turbocap_root/lib"
CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
+ LDFLAGS="$LDFLAGS $TURBOCAP_LDFLAGS"
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7712,14 +9120,20 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
if test $ac_cv_lbl_turbocap_api = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- SSRC="$SSRC pcap-tc.c"
+ MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
- LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
+ ADDITIONAL_LIBS="$ADDITIONAL_LIBS $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
+ ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
+ LIBS_PRIVATE="$LIBS_PRIVATE $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
$as_echo "#define HAVE_TC_API 1" >>confdefs.h
@@ -7729,7 +9143,7 @@ $as_echo "#define HAVE_TC_API 1" >>confdefs.h
$as_echo "no" >&6; }
if test "$want_turbocap" = yes; then
- # User wanted Turbo support but we couldn't find it.
+ # User wanted Turbo support but we couldn't find it.
as_fn_error $? "TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support" "$LINENO" 5
fi
fi
@@ -7869,10 +9283,350 @@ _ACEOF
fi
+ #
+ # Optionally, we may want to support SSL.
+ # Check for OpenSSL/libressl.
+ #
+ # First, try looking for it with pkg-config, if we have it.
+ #
+ # Homebrew's pkg-config does not, by default, look for
+ # pkg-config files for packages it has installed.
+ # Furthermore, at least for OpenSSL, they appear to be
+ # dumped in package-specific directories whose paths are
+ # not only package-specific but package-version-specific.
+ #
+ # So the only way to find openssl is to get the value of
+ # PKG_CONFIG_PATH from "brew --env openssl" and add that
+ # to PKG_CONFIG_PATH. (No, we can't just assume it's under
+ # /usr/local; Homebrew have conveniently chosen to put it
+ # under /opt/homebrew on ARM.)
+ #
+ # That's the nice thing about Homebrew - it makes things easier!
+ # Thanks!
+ #
+ save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+ if test -n "$BREW"; then
+ openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'`
+ PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH"
+ fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl with pkg-config" >&5
+$as_echo_n "checking for openssl with pkg-config... " >&6; }
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+ #
+ # The package was found, so try to get its C flags and
+ # libraries.
+ #
+ if test -n "$OPENSSL_CFLAGS"; then
+ pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$OPENSSL_LIBS"; then
+ pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$OPENSSL_LIBS_STATIC"; then
+ pkg_cv_OPENSSL_LIBS_STATIC="$OPENSSL_LIBS_STATIC"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_OPENSSL_LIBS_STATIC=`$PKG_CONFIG --libs --static "openssl" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+ if test $pkg_failed = yes; then
+ #
+ # That failed - report an error.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+$as_echo "error" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
+ else
+ OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$OPENSSL_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (openssl) were not met:
+
+$OPENSSL_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+
+Alternatively, you may set the environment variables OPENSSL_CFLAGS
+and OPENSSL_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+ elif test $pkg_failed = untried; then
+ #
+ # We don't have pkg-config, so it didn't work.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+$as_echo "not found (pkg-config not found)" >&6; }
+ else
+ #
+ # We found the package.
+ #
+ OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
+ OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
+ OPENSSL_LIBS_STATIC=$pkg_cv_OPENSSL_LIBS_STATIC
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+
+ #
+ # We found OpenSSL/libressl.
+ #
+ HAVE_OPENSSL=yes
+ REQUIRES_PRIVATE="$REQUIRES_PRIVATE openssl"
+
+ fi
+else
+
+ #
+ # The package isn't present.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+fi
+
+ PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
+
+ #
+ # If it wasn't found, and we have Homebrew installed, see
+ # if it's in Homebrew.
+ #
+ if test "x$HAVE_OPENSSL" != "xyes" -a -n "$BREW"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in Homebrew" >&5
+$as_echo_n "checking for openssl in Homebrew... " >&6; }
+ #
+ # The brew man page lies when it speaks of
+ # $BREW --prefix --installed <formula>
+ # outputting nothing. In Homebrew 3.3.16,
+ # it produces output regardless of whether
+ # the formula is installed or not, so we
+ # send the standard output and error to
+ # the bit bucket.
+ #
+ if $BREW --prefix --installed openssl >/dev/null 2>&1; then
+ #
+ # Yes. Get the include directory and library
+ # directory. (No, we can't just assume it's
+ # under /usr/local; Homebrew have conveniently
+ # chosen to put it under /opt/homebrew on ARM.)
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_OPENSSL=yes
+ openssl_path=`$BREW --prefix openssl`
+ OPENSSL_CFLAGS="-I$openssl_path/include"
+ OPENSSL_LIBS="-L$openssl_path/lib -lssl -lcrypto"
+ OPENSSL_LIBS_STATIC="-L$openssl_path/lib -lssl -lcrypto"
+ OPENSSL_LIBS_PRIVATE="-L$openssl_path/lib -lssl -lcrypto"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ fi
+
+ #
+ # If it wasn't found, and /usr/local/include and /usr/local/lib
+ # exist, check if it's in /usr/local. (We check whether they
+ # exist because, if they don't exist, the compiler will warn
+ # about that and then ignore the argument, so they test
+ # using just the system header files and libraries.)
+ #
+ # We include the standard include file to 1) make sure that
+ # it's installed (if it's just a shared library for the
+ # benefit of existing programs, that's not useful) and 2)
+ # because SSL_library_init() is a library routine in some
+ # versions and a #defined wrapper around OPENSSL_init_ssl()
+ # in others.
+ #
+ if test "x$HAVE_OPENSSL" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS -I/usr/local/include"
+ LIBS="$LIBS -L/usr/local/lib -lssl -lcrypto"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local that we can use" >&5
+$as_echo_n "checking whether we have OpenSSL/libressl in /usr/local that we can use... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <openssl/ssl.h>
+
+int
+main ()
+{
+
+SSL_library_init();
+return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_OPENSSL=yes
+ OPENSSL_CFLAGS="-I/usr/local/include"
+ OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto"
+ OPENSSL_LIBS_STATIC="-L/usr/local/lib -lssl -lcrypto"
+ OPENSSL_LIBS_PRIVATE="-L/usr/local/lib -lssl -lcrypto"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+ fi
+
+ #
+ # If it wasn't found, check if it's a system library.
+ #
+ # We include the standard include file to 1) make sure that
+ # it's installed (if it's just a shared library for the
+ # benefit of existing programs, that's not useful) and 2)
+ # because SSL_library_init() is a library routine in some
+ # versions and a #defined wrapper around OPENSSL_init_ssl()
+ # in others.
+ #
+ if test "x$HAVE_OPENSSL" != "xyes"; then
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ LIBS="$LIBS -lssl -lcrypto"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
+$as_echo_n "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <openssl/ssl.h>
+
+int
+main ()
+{
+
+SSL_library_init();
+return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_OPENSSL=yes
+ OPENSSL_LIBS="-lssl -lcrypto"
+ OPENSSL_LIBS_STATIC="-lssl -lcrypto"
+ OPENSSL_LIBS_PRIVATE="-lssl -lcrypto"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+ fi
+
+ #
+ # OK, did we find it?
+ #
+ if test "x$HAVE_OPENSSL" = "xyes"; then
+
+$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
+
+ V_INCLS="$V_INCLS $OPENSSL_CFLAGS"
+ ADDITIONAL_LIBS="$ADDITIONAL_LIBS $OPENSSL_LIBS"
+ ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $OPENSSL_LIBS_STATIC"
+ LIBS_PRIVATE="$LIBS_PRIVATE $OPENSSL_LIBS_PRIVATE"
+ REQUIRES_PRIVATE="$REQUIRES_PRIVATE $OPENSSL_REQUIRES_PRIVATE"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
+$as_echo "$as_me: OpenSSL not found" >&6;}
+ fi
+
$as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
- SSRC="$SSRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c"
+ REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
BUILD_RPCAPD=build-rpcapd
INSTALL_RPCAPD=install-rpcapd
;;
@@ -8096,23 +9850,38 @@ fi
$as_echo "$tcpdump_cv_capable_lex" >&6; }
if test $tcpdump_cv_capable_lex = insufficient ; then
as_fn_error $? "$LEX is insufficient to compile libpcap.
- libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5
+ libpcap requires Flex 2.5.31 or later, or a compatible version of lex.
+ If a suitable version of Lex/Flex is available as a non-standard command
+ and/or not in the PATH, you can specify it using the LEX environment
+ variable. That said, on some systems the error can mean that Flex/Lex is
+ actually acceptable, but m4 is not. Likewise, if a suitable version of
+ m4 (such as GNU M4) is available but has not been detected, you can
+ specify it using the M4 environment variable." "$LINENO" 5
fi
#
# Look for yacc/bison/byacc.
+# If it's Bison, we do not want -y, as 1) we will be using -o to cause
+# the output for XXX.y to be written to XXX.c and 2) we don't want
+# it to issue warnings about stuff not supported by POSIX YACC - we
+# want to use that stuff, and don't care whether plain YACC supports
+# it or not, we require either Bison or Berkeley YACC.
+#
+BISON_BYACC=""
#
-for ac_prog in 'bison -y' byacc
+# Look for Bison.
+#
+for ac_prog in bison
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC+:} false; then :
+if ${ac_cv_prog_BISON_BYACC+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
+ if test -n "$BISON_BYACC"; then
+ ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -8121,7 +9890,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_YACC="$ac_prog"
+ ac_cv_prog_BISON_BYACC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -8131,44 +9900,131 @@ IFS=$as_save_IFS
fi
fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
+BISON_BYACC=$ac_cv_prog_BISON_BYACC
+if test -n "$BISON_BYACC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
+$as_echo "$BISON_BYACC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
- test -n "$YACC" && break
+ test -n "$BISON_BYACC" && break
done
-test -n "$YACC" || YACC="yacc"
+if test x"$BISON_BYACC" != x; then
+ #
+ # We found Bison.
+ #
+ # Bison prior to 2.4(.1) doesn't support "%define api.pure", so use
+ # "%pure-parser".
+ #
+ bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'`
+ bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'`
+ if test "$bison_major_version" -lt 2 -o \
+ \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \)
+ then
+ REENTRANT_PARSER="%pure-parser"
+ else
+ REENTRANT_PARSER="%define api.pure"
+ fi
+else
+ #
+ # We didn't find Bison; check for Berkeley YACC, under the
+ # names byacc and yacc.
+ #
+ for ac_prog in byacc yacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_BISON_BYACC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$BISON_BYACC"; then
+ ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_BISON_BYACC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-#
-# Make sure it supports the -p flag and supports processing our
-# grammar.y.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc/bison" >&5
-$as_echo_n "checking for capable yacc/bison... " >&6; }
+fi
+fi
+BISON_BYACC=$ac_cv_prog_BISON_BYACC
+if test -n "$BISON_BYACC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
+$as_echo "$BISON_BYACC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$BISON_BYACC" && break
+done
+
+ if test x"$BISON_BYACC" != x; then
+ #
+ # Make sure this is Berkeley YACC, not AT&T YACC;
+ # the latter doesn't support reentrant parsers.
+ # Run it with "-V"; that succeeds and reports the
+ # version number with Berkeley YACC, but will
+ # (probably) fail with various vendor flavors
+ # of AT&T YACC.
+ #
+ # Hopefully this also eliminates any versions
+ # of Berkeley YACC that don't support reentrant
+ # parsers, if there are any.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5
+$as_echo_n "checking for capable yacc... " >&6; }
if ${tcpdump_cv_capable_yacc+:} false; then :
$as_echo_n "(cached) " >&6
else
- if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
- tcpdump_cv_capable_yacc=yes
- else
- tcpdump_cv_capable_yacc=insufficient
- fi
+ if $BISON_BYACC -V >/dev/null 2>&1; then
+ tcpdump_cv_capable_yacc=yes
+ else
+ tcpdump_cv_capable_yacc=insufficient
+ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
$as_echo "$tcpdump_cv_capable_yacc" >&6; }
-if test $tcpdump_cv_capable_yacc = insufficient ; then
- as_fn_error $? "$YACC is insufficient to compile libpcap.
+ if test $tcpdump_cv_capable_yacc = insufficient ; then
+ as_fn_error $? "$BISON_BYACC is insufficient to compile libpcap.
+ libpcap requires Bison, a newer version of Berkeley YACC with support
+ for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
+ fi
+ else
+ #
+ # OK, we found neither byacc nor yacc.
+ #
+ as_fn_error $? "Neither bison, byacc, nor yacc was found.
libpcap requires Bison, a newer version of Berkeley YACC with support
for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
+ fi
+
+ #
+ # Berkeley YACC doesn't support "%define api.pure", so use
+ # "%pure-parser".
+ #
+ REENTRANT_PARSER="%pure-parser"
fi
+
+
#
# Do various checks for various OSes and versions of those OSes.
#
@@ -8266,7 +10122,7 @@ fi
V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
;;
- darwin8.[456]|darwin.[456].*)
+ darwin8.[456]|darwin8.[456].*)
#
# Tiger, subsequent to Intel support but prior
# to x86-64 support. Build libraries and
@@ -8331,26 +10187,26 @@ fi
V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
;;
- darwin*)
+ darwin1[1-8]*)
#
- # Post-Snow Leopard. Build libraries for x86-64
- # and 32-bit x86, with x86-64 first, and build
- # executables only for x86-64. (That's what
- # Apple does.) This requires no special flags
- # for programs.
- # XXX - update if and when Apple drops support
- # for 32-bit x86 code and if and when Apple adds
- # ARM-based Macs. (You're on your own for iOS
- # etc.)
- #
- # XXX - check whether we *can* build for
- # i386 and, if not, suggest that the user
- # install the /usr/include headers if they
- # want to build fat.
+ # Post-Snow Leopard, pre-Catalina. Build
+ # libraries for x86-64 and 32-bit x86, with
+ # x86-64 first, and build executables only for
+ # x86-64. (That's what Apple does.) This
+ # requires no special flags for programs.
+ #
+ # We check whether we *can* build for i386 and,
+ # if not, suggest that the user install the
+ # /usr/include headers if they want to build
+ # fat.
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
$as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
- save_CFLAGS="$CFLAGS"
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
CFLAGS="$CFLAGS -arch i386"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8363,12 +10219,24 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- V_LIB_CCOPT_FAT="-arch x86_64 -arch i386"
- V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386"
+ V_LIB_CCOPT_FAT="-arch x86_64"
+ V_LIB_LDFLAGS_FAT="-arch x86_64"
+
+ #
+ # OpenSSL installation on macOS seems
+ # to install only the libs for 64-bit
+ # x86 - at least that's what Brew does:
+ # only configure 32-bit builds if we
+ # don't have OpenSSL.
+ #
+ if test "$HAVE_OPENSSL" != yes; then
+ V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
+ V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
+ fi
else
@@ -8400,8 +10268,97 @@ $as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installi
esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+ ;;
+
+ darwin19*)
+ #
+ # Catalina. Build libraries and executables
+ # only for x86-64. (That's what Apple does;
+ # 32-bit x86 binaries are not supported on
+ # Catalina.)
+ #
+ V_LIB_CCOPT_FAT="-arch x86_64"
+ V_LIB_LDFLAGS_FAT="-arch x86_64"
+ V_PROG_CCOPT_FAT="-arch x86_64"
+ V_PROG_LDFLAGS_FAT="-arch x86_64"
+ ;;
+
+ darwin*)
+ #
+ # Post-Catalina. Build libraries and
+ # executables for x86-64 and ARM64.
+ # (That's what Apple does, except they
+ # build for arm64e, which may include
+ # some of the pointer-checking extensions.)
+ #
+ # If we're building with libssl, make sure
+ # we can build fat with it (i.e., that it
+ # was built fat); if we can't, don't set
+ # the target architectures, and just
+ # build for the host we're on.
+ #
+ # Otherwise, just add both of them.
+ #
+ if test "$HAVE_OPENSSL" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building fat with libssl is supported" >&5
+$as_echo_n "checking whether building fat with libssl is supported... " >&6; }
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS -arch x86_64 -arch arm64"
+ LDFLAGS="$LDFLAGS $OPENSSL_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <openssl/ssl.h>
+
+int
+main ()
+{
+
+ SSL_library_init();
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
+ V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
+ V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
+ V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+ else
+ V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
+ V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
+ V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
+ V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
+ fi
;;
esac
fi
@@ -8473,23 +10430,15 @@ irix*)
MAN_MISC_INFO=5
;;
-linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|midipix*)
+linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
DYEXT="so"
-
- #
- # Compiler assumed to be GCC; run-time linker may require a -R
- # flag.
- #
- if test "$libdir" != "/usr/lib"; then
- V_RFLAGS=-Wl,-R$libdir
- fi
;;
osf*)
DYEXT="so"
#
- # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
+ # DEC OSF/1, a/k/a Digital UNIX, a/k/a Tru64 UNIX.
# Use Tru64 UNIX conventions for man pages; they're the same as
# the System V conventions except that they use section 8 for
# administrative commands and daemons.
@@ -8567,6 +10516,15 @@ $as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
;;
esac
+
+
+
+
+
+
+
+
+
# Check whether --enable-shared was given.
if test "${enable_shared+set}" = set; then :
enableval=$enable_shared;
@@ -8782,67 +10740,130 @@ 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"
+ 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 :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ can_add_to_cflags=yes
#
- # We're assuming this is clang, where
- # -Werror=unknown-warning-option is the appropriate
- # option to force the compiler to fail.
+ # The compile supports this; do we have some C code for
+ # which the warning should *not* appear?
+ # We test the fourth argument because the third argument
+ # could contain quotes, breaking the test.
#
- ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
+ if test "x" != "x"
+ then
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
+$as_echo_n "checking whether -W ... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ #
+ # Not a problem.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ #
+ # A problem.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ can_add_to_cflags=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
+ fi
+ CFLAGS="$save_CFLAGS"
+ if test x"$can_add_to_cflags" = "xyes"
+ then
+ V_CCOPT="$V_CCOPT -W"
+ fi
+else
- { $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}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+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-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 -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 :
@@ -8858,8 +10879,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
-$as_echo_n "checking whether -W ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
+$as_echo_n "checking whether -Wall ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8887,7 +10908,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -W"
+ V_CCOPT="$V_CCOPT -Wall"
fi
else
@@ -8898,33 +10919,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; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
+$as_echo_n "checking whether the compiler supports the -Wcomma 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 -Wcomma"
+ #
+ # 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 :
@@ -8940,8 +10970,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
-$as_echo_n "checking whether -Wall ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
+$as_echo_n "checking whether -Wcomma ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8969,7 +10999,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wall"
+ V_CCOPT="$V_CCOPT -Wcomma"
fi
else
@@ -8980,33 +11010,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 -Wcomma option" >&5
-$as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
+$as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wcomma" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma"
- elif expr "x-Wcomma" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wcomma"
- elif expr "x-Wcomma" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wcomma"
- else
- CFLAGS="$CFLAGS -Wcomma"
- fi
+ CFLAGS="$CFLAGS -Wdocumentation"
+ #
+ # 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 :
@@ -9022,8 +11061,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
-$as_echo_n "checking whether -Wcomma ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
+$as_echo_n "checking whether -Wdocumentation ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9051,7 +11090,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wcomma"
+ V_CCOPT="$V_CCOPT -Wdocumentation"
fi
else
@@ -9062,33 +11101,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 -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 -Wformat-nonliteral option" >&5
+$as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wdeclaration-after-statement" : "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
- then
- CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
- elif expr "x-Wdeclaration-after-statement" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
- else
- CFLAGS="$CFLAGS -Wdeclaration-after-statement"
- fi
+ CFLAGS="$CFLAGS -Wformat-nonliteral"
+ #
+ # 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 :
@@ -9104,8 +11152,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdeclaration-after-statement " >&5
-$as_echo_n "checking whether -Wdeclaration-after-statement ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
+$as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9133,7 +11181,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wdeclaration-after-statement"
+ V_CCOPT="$V_CCOPT -Wformat-nonliteral"
fi
else
@@ -9144,33 +11192,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 -Wdocumentation option" >&5
-$as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
+$as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wdocumentation" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdocumentation"
- elif expr "x-Wdocumentation" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wdocumentation"
- elif expr "x-Wdocumentation" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wdocumentation"
- else
- CFLAGS="$CFLAGS -Wdocumentation"
- fi
+ CFLAGS="$CFLAGS -Wmissing-noreturn"
+ #
+ # 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 :
@@ -9186,8 +11243,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
-$as_echo_n "checking whether -Wdocumentation ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
+$as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9215,7 +11272,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wdocumentation"
+ V_CCOPT="$V_CCOPT -Wmissing-noreturn"
fi
else
@@ -9226,33 +11283,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 -Wformat-nonliteral option" >&5
-$as_echo_n "checking whether the compiler supports the -Wformat-nonliteral 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-Wformat-nonliteral" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wformat-nonliteral"
- elif expr "x-Wformat-nonliteral" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
- elif expr "x-Wformat-nonliteral" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
- else
- CFLAGS="$CFLAGS -Wformat-nonliteral"
- 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 :
@@ -9268,8 +11334,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
-$as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
+$as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9297,7 +11363,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wformat-nonliteral"
+ V_CCOPT="$V_CCOPT -Wmissing-prototypes"
fi
else
@@ -9308,33 +11374,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-noreturn option" >&5
-$as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
+ { $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-noreturn" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-noreturn"
- elif expr "x-Wmissing-noreturn" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
- elif expr "x-Wmissing-noreturn" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
- else
- CFLAGS="$CFLAGS -Wmissing-noreturn"
- 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 :
@@ -9350,8 +11425,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
-$as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
+$as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9379,7 +11454,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wmissing-noreturn"
+ V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
fi
else
@@ -9390,33 +11465,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; }
+ { $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-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 -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 :
@@ -9432,8 +11516,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
-$as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
+$as_echo_n "checking whether -Wpointer-arith ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9461,7 +11545,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wmissing-prototypes"
+ V_CCOPT="$V_CCOPT -Wpointer-arith"
fi
else
@@ -9472,33 +11556,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; }
+ { $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-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 -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 :
@@ -9514,8 +11607,8 @@ $as_echo "yes" >&6; }
if test "x" != "x"
then
CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
-$as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
+$as_echo_n "checking whether -Wpointer-sign ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9543,7 +11636,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
if test x"$can_add_to_cflags" = "xyes"
then
- V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
+ V_CCOPT="$V_CCOPT -Wpointer-sign"
fi
else
@@ -9554,33 +11647,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 :
@@ -9636,33 +11738,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 :
@@ -9718,33 +11829,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 :
@@ -9800,33 +11920,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 -Wunused-parameter option" >&5
$as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wunused-parameter" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunused-parameter"
- elif expr "x-Wunused-parameter" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wunused-parameter"
- elif expr "x-Wunused-parameter" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wunused-parameter"
- else
- CFLAGS="$CFLAGS -Wunused-parameter"
- fi
+ CFLAGS="$CFLAGS -Wunused-parameter"
+ #
+ # 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 :
@@ -9882,33 +12011,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 :
@@ -9964,6 +12102,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"
# Warns about safeguards added in case the enums are
# extended
@@ -9996,28 +12135,36 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
$as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wunreachable-code" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code"
- elif expr "x-Wunreachable-code" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wunreachable-code"
- elif expr "x-Wunreachable-code" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wunreachable-code"
- else
- CFLAGS="$CFLAGS -Wunreachable-code"
- fi
+ CFLAGS="$CFLAGS -Wunreachable-code"
+ #
+ # 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 :
@@ -10080,6 +12227,98 @@ $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 -Wshorten-64-to-32 option" >&5
+$as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wshorten-64-to-32"
+ #
+ # 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(void) { return 0; }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ can_add_to_cflags=yes
+ #
+ # The compile supports this; do we have some C code for
+ # which the warning should *not* appear?
+ # We test the fourth argument because the third argument
+ # could contain quotes, breaking the test.
+ #
+ if test "x" != "x"
+ then
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
+$as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ #
+ # Not a problem.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+
+ #
+ # A problem.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ can_add_to_cflags=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ CFLAGS="$save_CFLAGS"
+ if test x"$can_add_to_cflags" = "xyes"
+ then
+ V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
fi
@@ -10161,7 +12400,7 @@ _ACEOF
{ $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"
- MKDEP='${srcdir}/mkdep'
+ MKDEP='${top_srcdir}/mkdep'
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -10169,7 +12408,7 @@ $as_echo "no" >&6; }
# We can't run mkdep, so have "make depend" do
# nothing.
#
- MKDEP='${srcdir}/nomkdep'
+ MKDEP='${top_srcdir}/nomkdep'
fi
rm -rf conftest*
else
@@ -10179,7 +12418,7 @@ $as_echo "no" >&6; }
# We can't run mkdep, so have "make depend" do
# nothing.
#
- MKDEP='${srcdir}/nomkdep'
+ MKDEP='${top_srcdir}/nomkdep'
fi
@@ -10268,131 +12507,9 @@ _ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned accesses fail" >&5
-$as_echo_n "checking if unaligned accesses fail... " >&6; }
- if ${ac_cv_lbl_unaligned_fail+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case "$host_cpu" in
-
- #
- # These are CPU types where:
- #
- # the CPU faults on an unaligned access, but at least some
- # OSes that support that CPU catch the fault and simulate
- # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
- # the simulation is slow, so we don't want to use it;
- #
- # the CPU, I infer (from the old
- #
- # XXX: should also check that they don't do weird things (like on arm)
- #
- # comment) doesn't fault on unaligned accesses, but doesn't
- # do a normal unaligned fetch, either (e.g., presumably, ARM);
- #
- # for whatever reason, the test program doesn't work
- # (this has been claimed to be the case for several of those
- # CPUs - I don't know what the problem is; the problem
- # was reported as "the test program dumps core" for SuperH,
- # but that's what the test program is *supposed* to do -
- # it dumps core before it writes anything, so the test
- # for an empty output file should find an empty output
- # file and conclude that unaligned accesses don't work).
- #
- # This run-time test won't work if you're cross-compiling, so
- # in order to support cross-compiling for a particular CPU,
- # we have to wire in the list of CPU types anyway, as far as
- # I know, so perhaps we should just have a set of CPUs on
- # which we know it doesn't work, a set of CPUs on which we
- # know it does work, and have the script just fail on other
- # cpu types and update it when such a failure occurs.
- #
- alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1)
- ac_cv_lbl_unaligned_fail=yes
- ;;
-
- *)
- cat >conftest.c <<EOF
-# include <sys/types.h>
-# include <sys/wait.h>
-# include <stdio.h>
- unsigned char a[5] = { 1, 2, 3, 4, 5 };
- main() {
- unsigned int i;
- pid_t pid;
- int status;
- /* avoid "core dumped" message */
- pid = fork();
- if (pid < 0)
- exit(2);
- if (pid > 0) {
- /* parent */
- pid = waitpid(pid, &status, 0);
- if (pid < 0)
- exit(3);
- exit(!WIFEXITED(status));
- }
- /* child */
- i = *(unsigned int *)&a[1];
- printf("%d\n", i);
- exit(0);
- }
-EOF
- ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
- conftest.c $LIBS >/dev/null 2>&1
- if test ! -x conftest ; then
- ac_cv_lbl_unaligned_fail=yes
- else
- ./conftest >conftest.out
- if test ! -s conftest.out ; then
- ac_cv_lbl_unaligned_fail=yes
- else
- ac_cv_lbl_unaligned_fail=no
- fi
- fi
- rm -f -r conftest* core core.conftest
- ;;
- esac
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_unaligned_fail" >&5
-$as_echo "$ac_cv_lbl_unaligned_fail" >&6; }
- if test $ac_cv_lbl_unaligned_fail = yes ; then
-
-$as_echo "#define LBL_ALIGN 1" >>confdefs.h
-
- fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+#
+# Various Linux-specific mechanisms.
+#
# Check whether --enable-usb was given.
if test "${enable_usb+set}" = set; then :
enableval=$enable_usb;
@@ -10401,39 +12518,38 @@ else
fi
-if test "xxx_only" = yes; then
- # User requested something-else-only pcap, so they don't
- # want USB support.
- enable_usb=no
-fi
-
-if test "x$enable_usb" != "xno" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USB sniffing support" >&5
-$as_echo_n "checking for USB sniffing support... " >&6; }
- case "$host_os" in
- linux*)
+#
+# If somebody requested an XXX-only pcap, that doesn't include
+# additional mechanisms.
+#
+if test "xxx_only" != yes; then
+ case "$host_os" in
+ linux*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5
+$as_echo_n "checking for Linux usbmon USB sniffing support... " >&6; }
+ if test "x$enable_usb" != "xno" ; then
-$as_echo "#define PCAP_SUPPORT_USB 1" >>confdefs.h
+$as_echo "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h
- USB_SRC=pcap-usb-linux.c
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
- if test $? -ne 0 ; then
- ac_usb_dev_name="usbmon"
- fi
-
-cat >>confdefs.h <<_ACEOF
-#define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
-_ACEOF
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
-$as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
- #
- # Do we have a version of <linux/compiler.h> available?
- # If so, we might need it for <linux/usbdevice_fs.h>.
- #
- for ac_header in linux/compiler.h
+ #
+ # Note: if the directory for special files is *EVER* somewhere
+ # other than the UN*X standard of /dev (which will break any
+ # software that looks for /dev/null or /dev/tty, for example,
+ # so doing that is *REALLY* not a good idea), please provide
+ # some mechanism to determine that directory at *run time*,
+ # rather than *configure time*, so that it works when doinga
+ # a cross-build, and that works with *multiple* distributions,
+ # with our without udev, and with multiple versions of udev,
+ # with udevinfo or udevadm or any other mechanism to get the
+ # special files directory.
+ #
+ # Do we have a version of <linux/compiler.h> available?
+ # If so, we might need it for <linux/usbdevice_fs.h>.
+ #
+ for ac_header in linux/compiler.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
@@ -10445,11 +12561,11 @@ fi
done
- if test "$ac_cv_header_linux_compiler_h" = yes; then
- #
- # Yes - include it when testing for <linux/usbdevice_fs.h>.
- #
- for ac_header in linux/usbdevice_fs.h
+ if test "$ac_cv_header_linux_compiler_h" = yes; then
+ #
+ # Yes - include it when testing for <linux/usbdevice_fs.h>.
+ #
+ for ac_header in linux/usbdevice_fs.h
do :
ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
"
@@ -10462,8 +12578,8 @@ fi
done
- else
- for ac_header in linux/usbdevice_fs.h
+ else
+ for ac_header in linux/usbdevice_fs.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
@@ -10475,20 +12591,20 @@ fi
done
- fi
- if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
- #
- # OK, does it define bRequestType? Older versions of the kernel
- # define fields with names like "requesttype, "request", and
- # "value", rather than "bRequestType", "bRequest", and
- # "wValue".
- #
- ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
- $ac_includes_default
- #ifdef HAVE_LINUX_COMPILER_H
- #include <linux/compiler.h>
- #endif
- #include <linux/usbdevice_fs.h>
+ fi
+ if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
+ #
+ # OK, does it define bRequestType? Older versions of the kernel
+ # define fields with names like "requesttype, "request", and
+ # "value", rather than "bRequestType", "bRequest", and
+ # "wValue".
+ #
+ ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
+ $ac_includes_default
+ #ifdef HAVE_LINUX_COMPILER_H
+ #include <linux/compiler.h>
+ #endif
+ #include <linux/usbdevice_fs.h>
"
if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
@@ -10500,44 +12616,23 @@ _ACEOF
fi
- fi
- ;;
- freebsd*)
- #
- # This just uses BPF in FreeBSD 8.4 and later; we don't need
- # to check for anything special for capturing.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in FreeBSD 8.4 and later" >&5
-$as_echo "yes, in FreeBSD 8.4 and later" >&6; }
- ;;
-
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- ;;
-esac
-fi
-
-
+ fi
-if test "xxx_only" != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the platform could support netfilter sniffing" >&5
-$as_echo_n "checking whether the platform could support netfilter sniffing... " >&6; }
- case "$host_os" in
- linux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- #
- # Life's too short to deal with trying to get this to compile
- # if you don't get the right types defined with
- # __KERNEL_STRICT_NAMES getting defined by some other include.
- #
- # Check whether the includes Just Work. If not, don't turn on
- # netfilter support.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
+ #
+ # Life's too short to deal with trying to get this to compile
+ # if you don't get the right types defined with
+ # __KERNEL_STRICT_NAMES getting defined by some other include.
+ #
+ # Check whether the includes Just Work. If not, don't turn on
+ # netfilter support.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
$as_echo_n "checking whether we can compile the netfilter support... " >&6; }
- if ${ac_cv_netfilter_can_compile+:} false; then :
+ if ${ac_cv_netfilter_can_compile+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10569,20 +12664,16 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
$as_echo "$ac_cv_netfilter_can_compile" >&6; }
- if test $ac_cv_netfilter_can_compile = yes ; then
+ if test $ac_cv_netfilter_can_compile = yes ; then
$as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
- NETFILTER_SRC=pcap-netfilter-linux.c
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
+ MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
+ fi
+ ;;
+ esac
fi
@@ -10635,12 +12726,381 @@ $as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
$as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
- NETMAP_SRC=pcap-netmap.c
+ MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
+ fi
+
+fi
+
+# Check for DPDK support.
+
+# Check whether --with-dpdk was given.
+if test "${with_dpdk+set}" = set; then :
+ withval=$with_dpdk;
+ if test "$withval" = no
+ then
+ # User doesn't want DPDK support.
+ want_dpdk=no
+ elif test "$withval" = yes
+ then
+ # User wants DPDK support but hasn't specified a directory.
+ want_dpdk=yes
+ else
+ # User wants DPDK support and has specified a directory,
+ # so use the provided value.
+ want_dpdk=yes
+ dpdk_dir=$withval
+ fi
+
+else
+
+ if test "$V_PCAP" = dpdk; then
+ # User requested DPDK-only libpcap, so we'd better have
+ # the DPDK API.
+ want_dpdk=yes
+ elif test "xxx_only" = yes; then
+ # User requested something-else-only pcap, so they don't
+ # want DPDK support.
+ want_dpdk=no
+ else
+ #
+ # Use DPDK API if present, otherwise don't
+ #
+ want_dpdk=ifpresent
+ fi
+
+fi
+
+
+if test "$want_dpdk" != no; then
+ #
+ # The user didn't explicitly say they don't want DPDK,
+ # so see if we have it.
+ #
+ # We only try to find it using pkg-config; DPDK is *SO*
+ # complicated - DPDK 19.02, for example, has about 117(!)
+ # libraries, and the precise set of libraries required has
+ # changed over time - so attempting to guess which libraries
+ # you need, and hardcoding that in an attempt to find the
+ # libraries without DPDK, rather than relying on DPDK to
+ # tell you, with a .pc file, what libraries are needed,
+ # is *EXTREMELY* fragile and has caused some bug reports,
+ # so we're just not going to do it.
+ #
+ # If that causes a problem, the only thing we will do is
+ # accept an alternative way of finding the appropriate
+ # library set for the installed version of DPDK that is
+ # as robust as pkg-config (i.e., it had better work as well
+ # as pkg-config with *ALL* versions of DPDK that provide a
+ # libdpdk.pc file).
+ #
+ # If --with-dpdk={path} was specified, add {path}/pkgconfig
+ # to PKG_CONFIG_PATH, so we look for the .pc file there,
+ # first.
+ #
+ save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+ if test -n "$dpdk_dir"; then
+ PKG_CONFIG_PATH="$dpdk_dir:$PKG_CONFIG_PATH"
+ fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdpdk with pkg-config" >&5
+$as_echo_n "checking for libdpdk with pkg-config... " >&6; }
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+ #
+ # The package was found, so try to get its C flags and
+ # libraries.
+ #
+ if test -n "$DPDK_CFLAGS"; then
+ pkg_cv_DPDK_CFLAGS="$DPDK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DPDK_CFLAGS=`$PKG_CONFIG --cflags "libdpdk" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$DPDK_LIBS"; then
+ pkg_cv_DPDK_LIBS="$DPDK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DPDK_LIBS=`$PKG_CONFIG --libs "libdpdk" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$DPDK_LIBS_STATIC"; then
+ pkg_cv_DPDK_LIBS_STATIC="$DPDK_LIBS_STATIC"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DPDK_LIBS_STATIC=`$PKG_CONFIG --libs --static "libdpdk" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+ if test $pkg_failed = yes; then
+ #
+ # That failed - report an error.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+$as_echo "error" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ DPDK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdpdk" 2>&1`
+ else
+ DPDK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdpdk" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$DPDK_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libdpdk) were not met:
+
+$DPDK_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+
+Alternatively, you may set the environment variables DPDK_CFLAGS
+and DPDK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+ elif test $pkg_failed = untried; then
+ #
+ # We don't have pkg-config, so it didn't work.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+$as_echo "not found (pkg-config not found)" >&6; }
+ else
+ #
+ # We found the package.
+ #
+ DPDK_CFLAGS=$pkg_cv_DPDK_CFLAGS
+ DPDK_LIBS=$pkg_cv_DPDK_LIBS
+ DPDK_LIBS_STATIC=$pkg_cv_DPDK_LIBS_STATIC
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+
+ found_dpdk=yes
+
fi
+else
+ #
+ # The package isn't present.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
fi
+ PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
+
+ #
+ # Did we find DPDK?
+ #
+ if test "$found_dpdk" = yes; then
+ #
+ # Found it.
+ #
+ # We call rte_eth_dev_count_avail(), and older versions
+ # of DPDK didn't have it, so check for it.
+ #
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS $DPDK_CFLAGS"
+ LIBS="$LIBS $DPDK_LIBS"
+ ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail"
+if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes; then :
+
+fi
+
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+ fi
+
+ if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then
+ #
+ # We found a usable DPDK.
+ #
+ # Check whether the rte_ether.h file defines
+ # struct ether_addr or struct rte_ether_addr.
+ #
+ # ("API compatibility? That's for losers!")
+ #
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS $DPDK_CFLAGS"
+ LIBS="$LIBS $DPDK_LIBS"
+ ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" "
+ #include <rte_ether.h>
+
+"
+if test "x$ac_cv_type_struct_rte_ether_addr" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_RTE_ETHER_ADDR 1
+_ACEOF
+
+
+fi
+
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+
+ #
+ # We can build with DPDK.
+ #
+ V_INCLS="$V_INCLS $DPDK_CFLAGS"
+ ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DPDK_LIBS"
+ ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DPDK_LIBS_STATIC"
+ REQUIRES_PRIVATE="$REQUIRES_PRIVATE libdpdk"
+
+$as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
+
+ if test $V_PCAP != dpdk ; then
+ MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
+ fi
+ else
+ #
+ # We didn't find a usable DPDK.
+ # If we required it (with --with-dpdk or --with-pcap=dpdk),
+ # fail with an appropriate message telling the user what
+ # the problem was, otherwise note the problem with a
+ # warning.
+ #
+ if test "$found_dpdk" != yes; then
+ #
+ # Not found with pkg-config. Note that we
+ # require that DPDK must be findable with
+ # pkg-config.
+ #
+ if test "$V_PCAP" = dpdk; then
+ #
+ # User requested DPDK-only capture support.
+ #
+ as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but
+we couldn't find DPDK with pkg-config. Make sure that pkg-config is
+installed, that DPDK 18.02.2 or later is installed, and that DPDK
+provides a .pc file." "$LINENO" 5
+ fi
+
+ if test "$want_dpdk" = yes; then
+ #
+ # User requested that libpcap include
+ # DPDK capture support.
+ #
+ as_fn_error $? "DPDK support requested with --with-dpdk, but we
+couldn't find DPDK with pkg-config. Make sure that pkg-config
+is installed, that DPDK 18.02.2 or later is installed, and that
+DPDK provides .pc file." "$LINENO" 5
+ fi
+
+ #
+ # User didn't indicate whether they wanted DPDK
+ # or not; just warn why we didn't find it.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We couldn't find DPDK with pkg-config. If
+you want DPDK support, make sure that pkg-config is installed,
+that DPDK 18.02.2 or later is installed, and that DPDK provides a
+.pc file." >&5
+$as_echo "$as_me: WARNING: We couldn't find DPDK with pkg-config. If
+you want DPDK support, make sure that pkg-config is installed,
+that DPDK 18.02.2 or later is installed, and that DPDK provides a
+.pc file." >&2;}
+ elif test "$ac_cv_func_rte_eth_dev_count_avail" != yes; then
+ #
+ # Found with pkg-config, but we couldn't compile
+ # a program that calls rte_eth_dev_count(); we
+ # probably have the developer package installed,
+ # but don't have a sufficiently recent version
+ # of DPDK. Note that we need a sufficiently
+ # recent version of DPDK.
+ #
+ if test "$V_PCAP" = dpdk; then
+ #
+ # User requested DPDK-only capture support.
+ #
+ as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we
+can't compile libpcap with DPDK. Make sure that DPDK 18.02.2 or later
+is installed." "$LINENO" 5
+ fi
+
+ if test "$want_dpdk" = yes; then
+ #
+ # User requested that libpcap include
+ # DPDK capture support.
+ #
+ as_fn_error $? "DPDK support requested with --with-dpdk, but
+we can't compile libpcap with DPDK. Make sure that DPDK 18.02.2
+or later is DPDK is installed." "$LINENO" 5
+ fi
+
+ #
+ # User didn't indicate whether they wanted DPDK
+ # or not; just warn why we didn't find it.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DPDK was found, but we can't compile libpcap with it.
+Make sure that DPDK 18.02.2 or later is installed." >&5
+$as_echo "$as_me: WARNING: DPDK was found, but we can't compile libpcap with it.
+Make sure that DPDK 18.02.2 or later is installed." >&2;}
+ fi
+ fi
+fi
+
# Check whether --enable-bluetooth was given.
if test "${enable_bluetooth+set}" = set; then :
@@ -10669,7 +13129,7 @@ if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
$as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
- BT_SRC=pcap-bt-linux.c
+ MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
ac_lbl_bluetooth_available=yes
@@ -10721,7 +13181,7 @@ $as_echo "yes" >&6; }
$as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
- BT_MONITOR_SRC=pcap-bt-monitor-linux.c
+ MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
else
@@ -10763,8 +13223,6 @@ $as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
;;
esac
-
-
fi
# Check whether --enable-dbus was given.
@@ -10814,66 +13272,138 @@ if test "x$enable_dbus" != "xno"; then
fi
if test "x$enable_dbus" != "xno"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PKGCONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 with pkg-config" >&5
+$as_echo_n "checking for dbus-1 with pkg-config... " >&6; }
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+ #
+ # The package was found, so try to get its C flags and
+ # libraries.
+ #
+ if test -n "$DBUS_CFLAGS"; then
+ pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- if test -n "$PKGCONFIG"; then
- ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$DBUS_LIBS"; then
+ pkg_cv_DBUS_LIBS="$DBUS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PKGCONFIG="pkg-config"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$DBUS_LIBS_STATIC"; then
+ pkg_cv_DBUS_LIBS_STATIC="$DBUS_LIBS_STATIC"
+ elif test -n "$PKG_CONFIG"; then
- test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DBUS_LIBS_STATIC=`$PKG_CONFIG --libs --static "dbus-1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
fi
-PKGCONFIG=$ac_cv_prog_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+
+
+
+ if test $pkg_failed = yes; then
+ #
+ # That failed - report an error.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+$as_echo "error" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ _pkg_short_errors_supported=no
fi
+ if test $_pkg_short_errors_supported = yes; then
+ DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-1" 2>&1`
+ else
+ DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-1" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$DBUS_PKG_ERRORS" >&5
- if test "x$PKGCONFIG" != "xno"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
-$as_echo_n "checking for D-Bus... " >&6; }
- if "$PKGCONFIG" dbus-1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
- DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
- save_CFLAGS="$CFLAGS"
- save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $DBUS_CFLAGS"
- LIBS="$LIBS $DBUS_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
+ if test "x$enable_dbus" = "xyes"; then
+ as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
+ fi
+
+ elif test $pkg_failed = untried; then
+ #
+ # We don't have pkg-config, so it didn't work.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+$as_echo "not found (pkg-config not found)" >&6; }
+ else
+ #
+ # We found the package.
+ #
+ DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
+ DBUS_LIBS=$pkg_cv_DBUS_LIBS
+ DBUS_LIBS_STATIC=$pkg_cv_DBUS_LIBS_STATIC
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS $DBUS_CFLAGS"
+ LIBS="$LIBS $DBUS_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
$as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
- #include <time.h>
- #include <sys/time.h>
+ #include <time.h>
+ #include <sys/time.h>
- #include <dbus/dbus.h>
+ #include <dbus/dbus.h>
int
main ()
{
@@ -10884,35 +13414,44 @@ return dbus_connection_read_write(NULL, 0);
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
- DBUS_SRC=pcap-dbus.c
- V_INCLS="$V_INCLS $DBUS_CFLAGS"
+ MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
+ V_INCLS="$V_INCLS $DBUS_CFLAGS"
+ ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DBUS_LIBS"
+ ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DBUS_LIBS_STATIC"
+ REQUIRES_PRIVATE="$REQUIRES_PRIVATE dbus-1"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- if test "x$enable_dbus" = "xyes"; then
- as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
- fi
- LIBS="$save_LIBS"
+ if test "x$enable_dbus" = "xyes"; then
+ as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
+ fi
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- if test "x$enable_dbus" = "xyes"; then
- as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
- fi
- fi
+
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+
fi
+else
+
+ #
+ # The package isn't present.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+fi
fi
@@ -10932,7 +13471,144 @@ if test "xxx_only" = yes; then
fi
if test "x$enable_rdma" != "xno"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libibverbs with pkg-config" >&5
+$as_echo_n "checking for libibverbs with pkg-config... " >&6; }
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+ #
+ # The package was found, so try to get its C flags and
+ # libraries.
+ #
+ if test -n "$LIBIBVERBS_CFLAGS"; then
+ pkg_cv_LIBIBVERBS_CFLAGS="$LIBIBVERBS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBIBVERBS_CFLAGS=`$PKG_CONFIG --cflags "libibverbs" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$LIBIBVERBS_LIBS"; then
+ pkg_cv_LIBIBVERBS_LIBS="$LIBIBVERBS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBIBVERBS_LIBS=`$PKG_CONFIG --libs "libibverbs" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$LIBIBVERBS_LIBS_STATIC"; then
+ pkg_cv_LIBIBVERBS_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC"
+ elif test -n "$PKG_CONFIG"; then
+
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBIBVERBS_LIBS_STATIC=`$PKG_CONFIG --libs --static "libibverbs" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+ if test $pkg_failed = yes; then
+ #
+ # That failed - report an error.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+$as_echo "error" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBIBVERBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libibverbs" 2>&1`
+ else
+ LIBIBVERBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libibverbs" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBIBVERBS_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libibverbs) were not met:
+
+$LIBIBVERBS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+
+Alternatively, you may set the environment variables LIBIBVERBS_CFLAGS
+and LIBIBVERBS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+ elif test $pkg_failed = untried; then
+ #
+ # We don't have pkg-config, so it didn't work.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+$as_echo "not found (pkg-config not found)" >&6; }
+ else
+ #
+ # We found the package.
+ #
+ LIBIBVERBS_CFLAGS=$pkg_cv_LIBIBVERBS_CFLAGS
+ LIBIBVERBS_LIBS=$pkg_cv_LIBIBVERBS_LIBS
+ LIBIBVERBS_LIBS_STATIC=$pkg_cv_LIBIBVERBS_LIBS_STATIC
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+
+ found_libibverbs=yes
+ LIBIBVERBS_REQUIRES_PRIVATE="libibverbs"
+
+ fi
+else
+
+ #
+ # The package isn't present.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+fi
+
+
+ if test "x$found_libibverbs" != "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
$as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
$as_echo_n "(cached) " >&6
@@ -10970,6 +13646,30 @@ fi
$as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
+ found_libibverbs=yes
+ LIBIBVERBS_CFLAGS=""
+ LIBIBVERBS_LIBS="-libverbs"
+ # XXX - at least on Ubuntu 20.04, there are many more
+ # libraries needed; is there any platform where
+ # libibverbs is available but where pkg-config isn't
+ # available or libibverbs doesn't use it? If not,
+ # we should only use pkg-config for it.
+ LIBIBVERBS_LIBS_STATIC="-libverbs"
+ LIBIBVERBS_LIBS_PRIVATE="-libverbs"
+
+
+fi
+
+ fi
+
+ if test "x$found_libibverbs" = "xyes"; then
+
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS $LIBIBVERBS_CFLAGS"
+ LIBS="$LIBS $LIBIBVERBS_LIBS"
ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
@@ -11006,11 +13706,7 @@ if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-
-$as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
-
- RDMA_SRC=pcap-rdmasniff.c
- LIBS="-libverbs $LIBS"
+ found_usable_libibverbs=yes
else
@@ -11026,10 +13722,80 @@ fi
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
+
+ fi
+
+ if test "x$found_usable_libibverbs" = "xyes"
+ then
+
+$as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
+
+ MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
+ CFLAGS="$LIBIBVERBS_CFLAGS $CFLAGS"
+ ADDITIONAL_LIBS="$LIBIBVERBS_LIBS $ADDITIONAL_LIBS"
+ ADDITIONAL_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
+ LIBS_PRIVATE="$LIBIBVERBS_LIBS_PRIVATE $LIBS_PRIVATE"
+ REQUIRES_PRIVATE="$REQUIRES_PRIVATE $LIBIBVERBS_REQUIRES_PRIVATE"
+ fi
+
fi
+#
+# If this is a platform where we need to have the .pc file and
+# pcap-config script supply an rpath option to specify the directory
+# in which the libpcap shared library is installed, and the install
+# prefix /usr (meaning we're not installing a system library), provide
+# the rpath option.
+#
+# (We must check $prefix, as $libdir isn't necessarily /usr/lib in this
+# case - for example, Linux distributions for 64-bit platforms that
+# also provide support for binaries for a 32-bit version of the
+# platform may put the 64-bit libraries, the 32-bit libraries, or both
+# in directories other than /usr/lib.)
+#
+# In AIX, do we have to do this?
+#
+# In Darwin-based OSes, the full paths of the shared libraries with
+# which the program was linked are stored in the executable, so we don't
+# need to provide an rpath option.
+#
+# With the HP-UX linker, directories specified with -L are, by default,
+# added to the run-time search path, so we don't need to supply them.
+#
+# For Tru64 UNIX, "-rpath" works with DEC's^WCompaq's^WHP's C compiler
+# for Alpha, but isn't documented as working with GCC, and no GCC-
+# compatible option is documented as working with the DEC compiler.
+# If anybody needs this on Tru64/Alpha, they're welcome to figure out a
+# way to make it work.
+#
+# This must *not* depend on the compiler, as, on platforms where there's
+# a GCC-compatible compiler and a vendor compiler, we need to work with
+# both.
+#
+if test "$prefix" != "/usr"; then
+ case "$host_os" in
+ freebsd*|netbsd*|openbsd*|dragonfly*|linux*|haiku*|midipix*|gnu*)
+ #
+ # Platforms where the "native" C compiler is GCC or
+ # accepts compatible command-line arguments, and the
+ # "native" linker is the GNU linker or accepts
+ # compatible command-line arguments.
+ #
+ RPATH="-Wl,-rpath,\${libdir}"
+ ;;
+ solaris*)
+ #
+ # Sun/Oracle's linker, the GNU linker, and
+ # GNU-compatible linkers all support -R.
+ #
+ RPATH="-Wl,-R,\${libdir}"
+ ;;
+ esac
fi
# Find a good install program. We prefer a C program (faster),
@@ -11129,9 +13895,32 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
ac_config_headers="$ac_config_headers config.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# We're done with configuration operations; add ADDITIONAL_LIBS and
+# ADDITIONAL_LIBS_STATIC to LIBS and LIBS_STATIC, respectively.
+#
+LIBS="$ADDITIONAL_LIBS $LIBS"
+LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $LIBS_STATIC"
+
ac_config_commands="$ac_config_commands default-1"
-ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_immediate_mode.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin rpcapd/rpcapd-config.manfile testprogs/Makefile"
+ac_config_files="$ac_config_files Makefile grammar.y pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_immediate_mode.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin rpcapd/rpcapd-config.manfile testprogs/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -11639,7 +14428,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 pcap $as_me 1.9.1, which was
+This file was extended by pcap $as_me 1.10.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11705,7 +14494,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="\\
-pcap config.status 1.9.1
+pcap config.status 1.10.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -11835,6 +14624,7 @@ do
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;;
"pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
"pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
"pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
@@ -12413,7 +15203,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