aboutsummaryrefslogtreecommitdiff
path: root/contrib/tcpdump/configure
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tcpdump/configure')
-rwxr-xr-xcontrib/tcpdump/configure3690
1 files changed, 1891 insertions, 1799 deletions
diff --git a/contrib/tcpdump/configure b/contrib/tcpdump/configure
index 5f055d2ef8dd..53c62d5e95a4 100755
--- a/contrib/tcpdump/configure
+++ b/contrib/tcpdump/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.
+# Generated by GNU Autoconf 2.69 for tcpdump 4.99.4.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -575,12 +575,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='tcpdump'
+PACKAGE_TARNAME='tcpdump'
+PACKAGE_VERSION='4.99.4'
+PACKAGE_STRING='tcpdump 4.99.4'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
ac_unique_file="tcpdump.c"
# Factoring default headers for most tests.
@@ -636,6 +636,7 @@ DEPENDENCY_CFLAG
AR
RANLIB
PCAP_CONFIG
+PKG_CONFIG
LIBOBJS
EGREP
GREP
@@ -675,7 +676,6 @@ infodir
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -705,7 +705,7 @@ enable_smb
with_user
with_chroot
with_sandbox_capsicum
-with_system_libpcap
+enable_local_libpcap
with_crypto
with_cap_ng
'
@@ -756,10 +756,9 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1009,15 +1008,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1155,7 +1145,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1268,7 +1258,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures tcpdump 4.99.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1308,7 +1298,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1317,7 +1306,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/tcpdump]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1333,28 +1322,30 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of tcpdump 4.99.4:";;
+ esac
cat <<\_ACEOF
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-universal don't build universal on OS X
- --enable-smb enable possibly-buggy SMB printer default=no
- --disable-smb disable possibly-buggy SMB printer
+ --disable-universal don't build universal on macOS
+ --enable-smb enable possibly-buggy SMB printer [default=no]
+ --disable-local-libpcap don't look for a local libpcap [default=check for a
+ local libpcap]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--without-gcc don't use gcc
- --with-smi link with libsmi (allows to load MIBs on the fly to decode SNMP packets. default=yes
- --without-smi don't link with libsmi
+ --with-smi link with libsmi (allows to load MIBs on the fly to
+ decode SNMP packets) [default=yes, if available]
--with-user=USERNAME drop privileges by default to USERNAME
--with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
--with-sandbox-capsicum use Capsicum security functions [default=yes, if
available]
- --with-system-libpcap don't use local pcap library
--with-crypto[=DIR] use OpenSSL/libressl libcrypto (located in directory
DIR, if specified) [default=yes, if available]
--with-cap-ng use libcap-ng [default=yes, if available]
@@ -1435,7 +1426,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
+tcpdump configure 4.99.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1797,131 +1788,119 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_func
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# 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
- as_decl_name=`echo $2|sed 's/ *(.*//'`
- as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ 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 ()
{
-#ifndef $as_decl_name
-#ifdef __cplusplus
- (void) $as_decl_use;
-#else
- (void) $as_decl_name;
-#endif
-#endif
+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 :
- eval "$3=yes"
+ 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
- eval "$3=no"
+ 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
-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_decl
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
- 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
+ done
else
- eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
-if (sizeof ($2))
- return 0;
+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 :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
-if (sizeof (($2)))
- return 0;
+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
- eval "$3=yes"
+ 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
-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_type
-
-# ac_fn_c_find_intX_t LINENO BITS VAR
-# -----------------------------------
-# Finds a signed integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_intX_t ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
-$as_echo_n "checking for int$2_t... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- # Order is important - never check a type that is potentially smaller
- # than half of the expected target width.
- for ac_type in int$2_t 'int' 'long int' \
- 'long long int' 'short int' 'signed char'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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. */
-$ac_includes_default
- enum { N = $2 / 2 - 1 };
+$4
int
main ()
{
-static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];
@@ -1930,107 +1909,172 @@ return test_array [0];
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ 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. */
-$ac_includes_default
- enum { N = $2 / 2 - 1 };
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
int
main ()
{
-static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
- < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
-test_array [0] = 0;
-return test_array [0];
+
+ 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_compile "$LINENO"; then :
-
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else
- case $ac_type in #(
- int$2_t) :
- eval "$3=yes" ;; #(
- *) :
- eval "$3=\$ac_type" ;;
-esac
+ ac_retval=1
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if eval test \"x\$"$3"\" = x"no"; then :
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+ fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- break
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
fi
- done
+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_find_intX_t
+} # ac_fn_c_check_decl
-# ac_fn_c_find_uintX_t LINENO BITS VAR
-# ------------------------------------
-# Finds an unsigned integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_uintX_t ()
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
-$as_echo_n "checking for uint$2_t... " >&6; }
+ { $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
eval "$3=no"
- # Order is important - never check a type that is potentially smaller
- # than half of the expected target width.
- for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
- 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
+$4
int
main ()
{
-static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
-test_array [0] = 0;
-return test_array [0];
-
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- case $ac_type in #(
- uint$2_t) :
- eval "$3=yes" ;; #(
- *) :
- eval "$3=\$ac_type" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if eval test \"x\$"$3"\" = x"no"; then :
else
- break
+ eval "$3=yes"
fi
- done
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+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_find_uintX_t
+} # ac_fn_c_check_type
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 $as_me, which was
+It was created by tcpdump $as_me 4.99.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2379,6 +2423,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
@@ -2552,6 +2597,10 @@ fi
export CC
fi
+#
+# Try to enable as many C99 features as we can.
+# At minimum, we want C++/C99-style // comments.
+#
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3341,66 +3390,196 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+typedef const char *ccp;
- if test "$GCC" = yes ; then
- #
- # -Werror forces warnings to be errors.
- #
- ac_lbl_cc_force_warning_errors=-Werror
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
- #
- # Use -ffloat-store so that, on 32-bit x86, we don't
- # do 80-bit arithmetic with the FPU; that way we should
- # get the same results for floating-point calculations
- # on x86-32 and x86-64.
- #
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -ffloat-store option" >&5
-$as_echo_n "checking whether the compiler supports the -ffloat-store option... " >&6; }
- save_CFLAGS="$CFLAGS"
- if expr "x-ffloat-store" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -ffloat-store"
- elif expr "x-ffloat-store" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -ffloat-store"
- elif expr "x-ffloat-store" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -ffloat-store"
- else
- CFLAGS="$CFLAGS -ffloat-store"
- fi
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
int
main ()
{
-return 0
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -ffloat-store"
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
-else
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$save_CFLAGS"
+if test "$ac_cv_prog_cc_c99" = "no"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5
+$as_echo "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;}
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ if test "$GCC" = yes ; then
+ #
+ # -Werror forces warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
else
V_INCLS="$V_INCLS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
@@ -3460,7 +3639,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
osf*)
- #
+ #
# Presumed to be DEC OSF/1, Digital UNIX, or
# Tru64 UNIX.
#
@@ -3495,7 +3674,8 @@ $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
if ${ac_cv_lbl_cc_const_proto+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
int
@@ -3590,224 +3770,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
-$as_echo_n "checking for __attribute__... " >&6; }
-if ${ac_cv___attribute__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdlib.h>
-
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- foo();
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv___attribute__=yes
-else
- ac_cv___attribute__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
-
-else
- #
- # We can't use __attribute__, so we can't use __attribute__((unused)),
- # so we define _U_ to an empty string.
- #
- V_DEFS="$V_DEFS -D_U_=\"\""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
-$as_echo "$ac_cv___attribute__" >&6; }
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) can be used without warnings" >&5
-$as_echo_n "checking whether __attribute__((unused)) can be used without warnings... " >&6; }
-if ${ac_cv___attribute___unused+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-
-int
-main(int argc __attribute((unused)), char **argv __attribute((unused)))
-{
- printf("Hello, world!\n");
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv___attribute___unused=yes
-else
- ac_cv___attribute___unused=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-CFLAGS="$save_CFLAGS"
-if test "$ac_cv___attribute___unused" = "yes"; then
- V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
-else
- V_DEFS="$V_DEFS -D_U_=\"\""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___unused" >&5
-$as_echo "$ac_cv___attribute___unused" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((noreturn)) can be applied to function pointers without warnings" >&5
-$as_echo_n "checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... " >&6; }
-if ${ac_cv___attribute___noreturn_function_pointer+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdlib.h>
-
-extern int (*foo)(int i)
- __attribute__ ((noreturn));
-
-int
-main(int argc, char **argv)
-{
- (*foo)(1);
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv___attribute___noreturn_function_pointer=yes
-else
- ac_cv___attribute___noreturn_function_pointer=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-CFLAGS="$save_CFLAGS"
-if test "$ac_cv___attribute___noreturn_function_pointer" = "yes"; then
-
-$as_echo "#define __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___noreturn_function_pointer" >&5
-$as_echo "$ac_cv___attribute___noreturn_function_pointer" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be used without warnings" >&5
-$as_echo_n "checking whether __attribute__((format)) can be used without warnings... " >&6; }
-if ${ac_cv___attribute___format+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdlib.h>
-
-extern int foo(const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-
-int
-main(int argc, char **argv)
-{
- foo("%s", "test");
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv___attribute___format=yes
-else
- ac_cv___attribute___format=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-CFLAGS="$save_CFLAGS"
-if test "$ac_cv___attribute___format" = "yes"; then
-
-$as_echo "#define __ATTRIBUTE___FORMAT_OK 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format" >&5
-$as_echo "$ac_cv___attribute___format" >&6; }
-
- if test "$ac_cv___attribute___format" = "yes"; then
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be applied to function pointers" >&5
-$as_echo_n "checking whether __attribute__((format)) can be applied to function pointers... " >&6; }
-if ${ac_cv___attribute___format_function_pointer+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdlib.h>
-
-extern int (*foo)(const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-
-int
-main(int argc, char **argv)
-{
- (*foo)("%s", "test");
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv___attribute___format_function_pointer=yes
-else
- ac_cv___attribute___format_function_pointer=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if test "$ac_cv___attribute___format_function_pointer" = "yes"; then
-
-$as_echo "#define __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format_function_pointer" >&5
-$as_echo "$ac_cv___attribute___format_function_pointer" >&6; }
-
- fi
-fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4205,7 +4167,7 @@ fi
done
-for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h
+for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -4218,122 +4180,6 @@ fi
done
-for ac_header in net/pfvar.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if.h>
-"
-if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_PFVAR_H 1
-_ACEOF
-
-fi
-
-done
-
-if test "$ac_cv_header_net_pfvar_h" = yes; then
- for ac_header in net/if_pflog.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/if_pflog.h" "ac_cv_header_net_if_pflog_h" "#include <sys/types.h>
- #include <sys/socket.h>
- #include <net/if.h>
- #include <net/pfvar.h>
-"
-if test "x$ac_cv_header_net_if_pflog_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_PFLOG_H 1
-_ACEOF
-
-fi
-
-done
-
- if test "$ac_cv_header_net_if_pflog_h" = yes; then
- LOCALSRC="print-pflog.c $LOCALSRC"
- fi
-fi
-for ac_header in netinet/if_ether.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
-#include <sys/socket.h>
-"
-if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINET_IF_ETHER_H 1
-_ACEOF
-
-fi
-
-done
-
-if test "$ac_cv_header_netinet_if_ether_h" != yes; then
- #
- # The simple test didn't work.
- # Do we need to include <net/if.h> first?
- # Unset ac_cv_header_netinet_if_ether_h so we don't
- # treat the previous failure as a cached value and
- # suppress the next test.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rechecking with some additional includes" >&5
-$as_echo "$as_me: Rechecking with some additional includes" >&6;}
- unset ac_cv_header_netinet_if_ether_h
- for ac_header in netinet/if_ether.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-"
-if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINET_IF_ETHER_H 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
case "$host_os" in
@@ -4442,8 +4288,11 @@ else
/* end confdefs.h. */
/* libsmi available check */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <smi.h>
-main()
+int main()
{
int current, revision, age, n;
const int required = 2;
@@ -4583,8 +4432,17 @@ fi
# XXX - do we need to check for all of them, or are there some that, if
# present, imply others are present?
#
-if test ! -z "$with_sandbox-capsicum" && test "$with_sandbox-capsicum" != "no" ; then
- for ac_func in cap_enter cap_rights_limit cap_ioctls_limit openat
+if test -z "$with_sandbox_capsicum" || test "$with_sandbox_capsicum" != "no" ; then
+ #
+ # First, make sure we have the required header.
+ #
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
+
+ #
+ # We do; now make sure we have the required functions.
+ #
+ for ac_func in cap_enter cap_rights_limit cap_ioctls_limit openat
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"
@@ -4598,6 +4456,90 @@ else
fi
done
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcasper" >&5
+$as_echo_n "checking for cap_init in -lcasper... " >&6; }
+if ${ac_cv_lib_casper_cap_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcasper $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 cap_init ();
+int
+main ()
+{
+return cap_init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_casper_cap_init=yes
+else
+ ac_cv_lib_casper_cap_init=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_casper_cap_init" >&5
+$as_echo "$ac_cv_lib_casper_cap_init" >&6; }
+if test "x$ac_cv_lib_casper_cap_init" = xyes; then :
+ LIBS="$LIBS -lcasper"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_gethostbyaddr in -lcap_dns" >&5
+$as_echo_n "checking for cap_gethostbyaddr in -lcap_dns... " >&6; }
+if ${ac_cv_lib_cap_dns_cap_gethostbyaddr+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcap_dns $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 cap_gethostbyaddr ();
+int
+main ()
+{
+return cap_gethostbyaddr ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_cap_dns_cap_gethostbyaddr=yes
+else
+ ac_cv_lib_cap_dns_cap_gethostbyaddr=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_cap_dns_cap_gethostbyaddr" >&5
+$as_echo "$ac_cv_lib_cap_dns_cap_gethostbyaddr" >&6; }
+if test "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = xyes; then :
+ LIBS="$LIBS -lcap_dns"
+fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using capsicum" >&5
$as_echo_n "checking whether to sandbox using capsicum... " >&6; }
@@ -4611,6 +4553,18 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using Casper library" >&5
+$as_echo_n "checking whether to sandbox using Casper library... " >&6; }
+if test "x$ac_cv_lib_casper_cap_init" = "xyes" -a "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = "xyes"; then
+
+$as_echo "#define HAVE_CASPER 1" >>confdefs.h
+
+ { $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; }
+fi
#
# We must check this before checking whether to check the OS's IPv6,
@@ -4891,10 +4845,15 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <string.h>
/* AF_INET6 available check */
#include <sys/types.h>
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
#include <sys/socket.h>
#include <netinet/in.h>
+#endif
#ifdef AF_INET6
void
foo(struct in6_addr *addr)
@@ -5069,19 +5028,6 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
fi
fi
-ac_fn_c_check_func "$LINENO" "vfprintf" "ac_cv_func_vfprintf"
-if test "x$ac_cv_func_vfprintf" = xyes; then :
- $as_echo "#define HAVE_VFPRINTF 1" >>confdefs.h
-
-else
- case " $LIBOBJS " in
- *" vfprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS vfprintf.$ac_objext"
- ;;
-esac
-
-fi
-
ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
if test "x$ac_cv_func_strlcat" = xyes; then :
$as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
@@ -5134,6 +5080,19 @@ esac
fi
+ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent"
+if test "x$ac_cv_func_getservent" = xyes; then :
+ $as_echo "#define HAVE_GETSERVENT 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" getservent.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getservent.$ac_objext"
+ ;;
+esac
+
+fi
+
ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
if test "x$ac_cv_func_getopt_long" = xyes; then :
$as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
@@ -5148,7 +5107,7 @@ esac
fi
-for ac_func in fork vfork strftime
+for ac_func in fork vfork
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -5160,121 +5119,83 @@ _ACEOF
fi
done
-for ac_func in setlinebuf alarm
+for ac_func in setlinebuf
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 :
+ ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
+if test "x$ac_cv_func_setlinebuf" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_SETLINEBUF 1
_ACEOF
fi
done
-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
+#
+# Make sure we have vsnprintf() and snprintf(); we require them.
+#
+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
-if test $needsnprintf = yes; then
- case " $LIBOBJS " in
- *" snprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
- ;;
-esac
+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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
- $as_echo_n "(cached) " >&6
+#
+# Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that
+# depend on %zu.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf(3) supports the z length modifier" >&5
+$as_echo_n "checking whether printf(3) supports the z length modifier... " >&6; }
+if test "$cross_compiling" = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not while cross-compiling" >&5
+$as_echo "not while cross-compiling" >&6; }
+
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_type_signal=int
-else
- ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
- if test "$ac_cv_type_signal" = void ; then
+#include <stdio.h>
+#include <string.h>
-$as_echo "#define RETSIGVAL /**/" >>confdefs.h
+int main()
+{
+ char buf[100];
+ snprintf(buf, sizeof(buf), "%zu", sizeof(buf));
+ return strncmp(buf, "100", sizeof(buf)) ? 1 : 0;
+}
- else
-$as_echo "#define RETSIGVAL (0)" >>confdefs.h
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
- fi
- case "$host_os" in
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
- irix*)
+else
-$as_echo "#define _BSD_SIGNALS 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
- ;;
+$as_echo "#define HAVE_NO_PRINTF_Z 1" >>confdefs.h
- *)
- for ac_func in sigaction
-do :
- ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
-if test "x$ac_cv_func_sigaction" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGACTION 1
-_ACEOF
fi
-done
-
- if test $ac_cv_func_sigaction = no ; then
- for ac_func in sigset
-do :
- ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
-if test "x$ac_cv_func_sigset" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGSET 1
-_ACEOF
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-done
- fi
- ;;
- esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
$as_echo_n "checking for main in -lrpc... " >&6; }
@@ -5378,7 +5299,7 @@ fi
LBL_LIBS="$LIBS"
pfopen=/usr/examples/packetfilter/pfopen.c
if test -f $pfopen ; then
- for ac_func in pfopen
+ for ac_func in pfopen
do :
ac_fn_c_check_func "$LINENO" "pfopen" "ac_cv_func_pfopen"
if test "x$ac_cv_func_pfopen" = xyes; then :
@@ -5389,48 +5310,233 @@ _ACEOF
fi
done
- if test $ac_cv_func_pfopen = "no" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $pfopen" >&5
+ if test $ac_cv_func_pfopen = "no" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $pfopen" >&5
$as_echo "Using $pfopen" >&6; }
- LIBS="$LIBS $pfopen"
- fi
+ LIBS="$LIBS $pfopen"
+ fi
fi
- libpcap=FAIL
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
-$as_echo_n "checking for local pcap library... " >&6; }
+ libpcap=FAIL
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for a local libpcap" >&5
+$as_echo_n "checking whether to look for a local libpcap... " >&6; }
+ # Check whether --enable-local-libpcap was given.
+if test "${enable_local_libpcap+set}" = set; then :
+ enableval=$enable_local_libpcap;
+else
+ enableval=yes
+fi
-# Check whether --with-system-libpcap was given.
-if test "${with_system_libpcap+set}" = set; then :
- withval=$with_system_libpcap;
-fi
-
- if test "x$with_system_libpcap" != xyes ; then
- lastdir=FAIL
- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
- egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
- places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
- egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
- for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
- basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
- sed -e 's/-PRE-GIT$//' `
- if test $lastdir = $basedir ; then
- continue;
- fi
- lastdir=$dir
- if test -r $dir/libpcap.a ; then
- libpcap=$dir/libpcap.a
- d=$dir
- fi
- done
- fi
- if test $libpcap = FAIL ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+ case "$enableval" in
+
+ no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ #
+ # Don't look for a local libpcap.
+ #
+ using_local_libpcap=no
+ ;;
+
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ #
+ # Look for a local pcap library.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
+$as_echo_n "checking for local pcap library... " >&6; }
+ lastdir=FAIL
+ places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
+ egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
+ places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+ egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
+ for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+ basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
+ sed -e 's/-PRE-GIT$//' `
+ if test $lastdir = $basedir ; then
+ continue;
+ fi
+ lastdir=$dir
+ if test -r $dir/libpcap.a ; then
+ libpcap=$dir/libpcap.a
+ local_pcap_dir=$dir
+ fi
+ done
+ if test $libpcap = FAIL ; then
+ #
+ # We didn't find a local libpcap.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
+ using_local_libpcap=no;
+ else
+ #
+ # We found a local libpcap.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
+$as_echo "$libpcap" >&6; }
+ using_local_libpcap=yes
+ fi
+ ;;
+ esac
- #
- # Look for pcap-config.
- #
- if test -n "$ac_tool_prefix"; then
+ if test $using_local_libpcap = no ; then
+ #
+ # We didn't find a local libpcap.
+ # Look for an installed pkg-config.
+ #
+ 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
+
+ if test -n "$PKG_CONFIG" ; then
+ #
+ # We have it. Are there .pc files for libpcap?
+ #
+ # --exists was introduced in pkg-config 0.4.0; that
+ # dates back to late 2000, so we won't worry about
+ # earlier releases that lack it.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there are .pc files for libpcap" >&5
+$as_echo_n "checking whether there are .pc files for libpcap... " >&6; }
+ if "$PKG_CONFIG" libpcap --exists ; then
+ #
+ # Yes, so we can use pkg-config to get configuration
+ # information for libpcap.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pkg_config_usable=yes
+ else
+ #
+ # No, so we can't use pkg-config to get configuration
+ # information for libpcap.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ pkg_config_usable=no
+ fi
+ else
+ #
+ # We don't have it, so we obviously can't use it.
+ #
+ pkg_config_usable=no
+ fi
+ if test "$pkg_config_usable" = "yes" ; then
+ #
+ # Found both - use pkg-config to get the include flags for
+ # libpcap and the flags to link with libpcap.
+ #
+ # Please read section 11.6 "Shell Substitutions"
+ # in the autoconf manual before doing anything
+ # to this that involves quoting. Especially note
+ # the statement "There is just no portable way to use
+ # double-quoted strings inside double-quoted back-quoted
+ # expressions (pfew!)."
+ #
+ cflags=`"$PKG_CONFIG" libpcap --cflags`
+ V_INCLS="$cflags $V_INCLS"
+ libpcap=`"$PKG_CONFIG" libpcap --libs`
+ else
+ #
+ # No pkg-config
+ # Look for an installed pcap-config.
+ #
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pcap-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5528,26 +5634,140 @@ else
PCAP_CONFIG="$ac_cv_path_PCAP_CONFIG"
fi
- if test -n "$PCAP_CONFIG" ; then
- #
- # Found - use it to get the include flags for
- # libpcap and the flags to link with libpcap.
- #
- # Please read section 11.6 "Shell Substitutions"
- # in the autoconf manual before doing anything
- # to this that involves quoting. Especially note
- # the statement "There is just no portable way to use
- # double-quoted strings inside double-quoted back-quoted
- # expressions (pfew!)."
- #
- cflags=`"$PCAP_CONFIG" --cflags`
- V_INCLS="$cflags $V_INCLS"
- libpcap=`"$PCAP_CONFIG" --libs`
- else
- #
- # Not found; look for pcap.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
+ if test -n "$PCAP_CONFIG" ; then
+ #
+ # Found - use it to get the include flags for
+ # libpcap and the flags to link with libpcap.
+ #
+ # If this is a vendor-supplied pcap-config, which
+ # we define as being "a pcap-config in /usr/bin
+ # or /usr/ccs/bin" (the latter is for Solaris and
+ # Sun/Oracle Studio), there are some issues. Work
+ # around them.
+ #
+ if test \( "$PCAP_CONFIG" = "/usr/bin/pcap-config" \) -o \
+ \( "$PCAP_CONFIG" = "/usr/ccs/bin/pcap-config" \) ; then
+ #
+ # It's vendor-supplied.
+ #
+ case "$host_os" in
+
+ darwin*)
+ #
+ # This is macOS or another Darwin-based OS.
+ #
+ # That means that /usr/bin/pcap-config it
+ # may provide -I/usr/local/include with --cflags
+ # and -L/usr/local/lib with --libs, rather than
+ # pointing to the OS-supplied library and
+ # Xcode-supplied headers. Remember that, so we
+ # ignore those values.
+ #
+ _broken_apple_pcap_config=yes
+ ;;
+
+ solaris*)
+ #
+ # This is Solaris 2 or later, i.e. SunOS 5.x.
+ #
+ # At least on Solaris 11; there's /usr/bin/pcap-config,
+ # which reports -L/usr/lib with --libs, causing
+ # the 32-bit libraries to be found, and there's
+ # /usr/bin/{64bitarch}/pcap-config, where {64bitarch}
+ # is a name for the 64-bit version of the instruction
+ # set, which reports -L /usr/lib/{64bitarch}, causing
+ # the 64-bit libraries to be found.
+ #
+ # So if we're building 64-bit targets, we replace
+ # PCAP_CONFIG with /usr/bin/{64bitarch}; we get
+ # {64bitarch} as the output of "isainfo -n".
+ #
+ # Are we building 32-bit or 64-bit? Get the
+ # size of void *, and check that.
+ #
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if ${ac_cv_sizeof_void_p+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_void_p" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_void_p=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+ if test ac_cv_sizeof_void_p -eq 8 ; then
+ isainfo_output=`isainfo -n`
+ if test ! -z "$isainfo_output" ; then
+ #
+ # Success - change PCAP_CONFIG.
+ #
+ PCAP_CONFIG=`echo $PCAP_CONFIG | sed "s;/bin/;/bin/$isainfo_output/;"`
+ fi
+ fi
+ ;;
+ esac
+ fi
+ #
+ # Please read section 11.6 "Shell Substitutions"
+ # in the autoconf manual before doing anything
+ # to this that involves quoting. Especially note
+ # the statement "There is just no portable way to use
+ # double-quoted strings inside double-quoted back-quoted
+ # expressions (pfew!)."
+ #
+ cflags=`"$PCAP_CONFIG" --cflags`
+ #
+ # Work around macOS (and probably other Darwin) brokenness,
+ # by not adding /usr/local/include if it's from the broken
+ # Apple pcap-config.
+ #
+ if test "$_broken_apple_pcap_config" = "yes" ; then
+ #
+ # Strip -I/usr/local/include with sed.
+ #
+ cflags=`echo $cflags | sed 's;-I/usr/local/include;;'`
+ fi
+ V_INCLS="$cflags $V_INCLS"
+ libpcap=`"$PCAP_CONFIG" --libs`
+ #
+ # Work around macOS (and probably other Darwin) brokenness,
+ # by not adding /usr/local/lib if it's from the broken
+ # Apple pcap-config.
+ #
+ if test "$_broken_apple_pcap_config" = "yes" ; then
+ #
+ # Strip -L/usr/local/lib with sed.
+ #
+ libpcap=`echo $libpcap | sed 's;-L/usr/local/lib;;'`
+ fi
+ else
+ #
+ # Not found; look for an installed pcap.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
$as_echo_n "checking for main in -lpcap... " >&6; }
if ${ac_cv_lib_pcap_main+:} false; then :
$as_echo_n "(cached) " >&6
@@ -5581,52 +5801,40 @@ if test "x$ac_cv_lib_pcap_main" = xyes; then :
libpcap="-lpcap"
fi
- if test $libpcap = FAIL ; then
- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
+ if test $libpcap = FAIL ; then
+ as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
$as_echo_n "checking for extraneous pcap header directories... " >&6; }
- if test \( ! -r /usr/local/include/pcap.h \) -a \
- \( ! -r /usr/include/pcap.h \); then
- if test -r /usr/local/include/pcap/pcap.h; then
- d="/usr/local/include/pcap"
- elif test -r /usr/include/pcap/pcap.h; then
- d="/usr/include/pcap"
- fi
- fi
- if test -z "$d" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+ if test \( ! -r /usr/local/include/pcap.h \) -a \
+ \( ! -r /usr/include/pcap.h \); then
+ if test -r /usr/local/include/pcap/pcap.h; then
+ d="/usr/local/include/pcap"
+ elif test -r /usr/include/pcap/pcap.h; then
+ d="/usr/include/pcap"
+ fi
+ fi
+ if test -z "$d" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- else
- V_INCLS="-I$d $V_INCLS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
+ else
+ V_INCLS="-I$d $V_INCLS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
$as_echo "found -- -I$d added" >&6; }
- fi
- fi
- else
- V_PCAPDEP=$libpcap
- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
- egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
- places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
- egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
- pcapH=FAIL
- if test -r $d/pcap.h; then
- pcapH=$d
- else
- for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
- if test -r $dir/pcap.h ; then
- pcapH=$dir
- fi
- done
+ fi
fi
-
- if test $pcapH = FAIL ; then
- as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
- fi
- V_INCLS="-I$pcapH $V_INCLS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
-$as_echo "$libpcap" >&6; }
- # Extract the first word of "pcap-config", so it can be a program name with args.
+ fi
+ else
+ #
+ # We found a local libpcap. Add it to the dependencies for
+ # tcpdump.
+ #
+ V_PCAPDEP=$libpcap
+
+ #
+ # Look for its pcap-config script.
+ #
+ # Extract the first word of "pcap-config", so it can be a program name with args.
set dummy pcap-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -5639,7 +5847,7 @@ else
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $d
+for as_dir in $local_pcap_dir
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
@@ -5666,66 +5874,177 @@ $as_echo "no" >&6; }
fi
- if test -n "$PCAP_CONFIG"; then
- #
- # The libpcap directory has a pcap-config script.
- # Use it to get any additioal libraries needed
- # to link with the libpcap archive library in
- # that directory.
- #
- # Please read section 11.6 "Shell Substitutions"
- # in the autoconf manual before doing anything
- # to this that involves quoting. Especially note
- # the statement "There is just no portable way to use
- # double-quoted strings inside double-quoted back-quoted
- # expressions (pfew!)."
- #
- additional_libs=`"$PCAP_CONFIG" --additional-libs --static`
- libpcap="$libpcap $additional_libs"
- fi
+
+ if test -n "$PCAP_CONFIG"; then
+ #
+ # We don't want its --cflags or --libs output, because
+ # those presume it's installed. For the C compiler flags,
+ # we add the source directory for the local libpcap, so
+ # we pick up its header files.
+ #
+ # We do, however, want its additional libraries, as required
+ # when linking statically, because it makes calls to
+ # routines in those libraries, so we'll need to link with
+ # them, because we'll be linking statically with it.
+ #
+ # If it supports --static-pcap-only. use that, as we will be
+ # linking with a static libpcap but won't be linking
+ # statically with any of the libraries on which it depends;
+ # those libraries might not even have static versions
+ # installed.
+ #
+ # That means we need to find out the libraries on which
+ # libpcap directly depends, so we can link with them, but we
+ # don't need to link with the libraries on which those
+ # libraries depend as, on all UN*Xes with which I'm
+ # familiar, the libraries on which a shared library depends
+ # are stored in the library and are automatically loaded by
+ # the run-time linker, without the executable having to be
+ # linked with those libraries. (This allows a library to be
+ # changed to depend on more libraries without breaking that
+ # library's ABI.)
+ #
+ # The only way to test for that support is to see if the
+ # script contains the string "static-pcap-only"; we can't
+ # try using that flag and checking for errors, as the
+ # versions of the script that didn't have that flag wouldn't
+ # report or return an error for an unsupported command-line
+ # flag. Those older versions provided, with --static, only
+ # the libraries on which libpcap depends, not the
+ # dependencies of those libraries; the versions with
+ # --static-pcap-only provide all the dependencies with
+ # --static, for the benefit of programs that are completely
+ # statically linked, and provide only the direct
+ # dependencies with --static-pcap-only.
+ #
+ if grep -s -q "static-pcap-only" "$PCAP_CONFIG"
+ then
+ static_opt="--static-pcap-only"
+ else
+ static_opt="--static"
+ fi
+ V_INCLS="-I$local_pcap_dir $V_INCLS"
+ additional_libs=`"$PCAP_CONFIG" $static_opt --additional-libs`
+ libpcap="$libpcap $additional_libs"
+ else
+ #
+ # It doesn't have a pcap-config script.
+ # Make sure it has a pcap.h file.
+ #
+ places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
+ egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+ places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+ egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+ pcapH=FAIL
+ if test -r $local_pcap_dir/pcap.h; then
+ pcapH=$local_pcap_dir
+ else
+ for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+ if test -r $dir/pcap.h ; then
+ pcapH=$dir
+ fi
+ done
+ fi
+
+ if test $pcapH = FAIL ; then
+ as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
+ fi
+
+ #
+ # Force the compiler to look for header files in the
+ # directory containing pcap.h.
+ #
+ V_INCLS="-I$pcapH $V_INCLS"
+ fi
fi
- LIBS="$libpcap $LIBS"
- if ! test -n "$PCAP_CONFIG" ; then
- #
- # We don't have pcap-config; find out any additional link flags
- # we need. (If we have pcap-config, we assume it tells us what
- # we need.)
- #
- case "$host_os" in
- aix*)
- #
- # If libpcap is DLPI-based, we have to use /lib/pse.exp if
- # present, as we use the STREAMS routines.
- #
- # (XXX - true only if we're linking with a static libpcap?)
- #
- pseexe="/lib/pse.exp"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
+ if test -z "$PKG_CONFIG" -a -z "$PCAP_CONFIG"; then
+ #
+ # We don't have pkg-config or pcap-config; find out any additional
+ # link flags we need. (If we have pkg-config or pcap-config, we
+ # assume it tells us what we need.)
+ #
+ case "$host_os" in
+
+ aix*)
+ #
+ # If libpcap is DLPI-based, we have to use /lib/pse.exp if
+ # present, as we use the STREAMS routines.
+ #
+ # (XXX - true only if we're linking with a static libpcap?)
+ #
+ pseexe="/lib/pse.exp"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
$as_echo_n "checking for $pseexe... " >&6; }
- if test -f $pseexe ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ if test -f $pseexe ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- LIBS="$LIBS -I:$pseexe"
- fi
+ LIBS="$LIBS -I:$pseexe"
+ fi
- #
- # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as
- # we use them to load the BPF module.
- #
- # (XXX - true only if we're linking with a static libpcap?)
- #
- LIBS="$LIBS -lodm -lcfg"
- ;;
- esac
+ #
+ # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as
+ # we use them to load the BPF module.
+ #
+ # (XXX - true only if we're linking with a static libpcap?)
+ #
+ LIBS="$LIBS -lodm -lcfg"
+ ;;
+
+ solaris*)
+ # libdlpi is needed for Solaris 11 and later.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
+$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
+if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldlpi -L/lib $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlpi_walk ();
+int
+main ()
+{
+return dlpi_walk ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dlpi_dlpi_walk=yes
+else
+ ac_cv_lib_dlpi_dlpi_walk=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
+$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
+if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
+ LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
+fi
+
+ ;;
+ esac
fi
+ LIBS="$libpcap $LIBS"
+
ac_fn_c_check_func "$LINENO" "pcap_loop" "ac_cv_func_pcap_loop"
if test "x$ac_cv_func_pcap_loop" = xyes; then :
else
- as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING and include the
+ as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING.md and include the
config.log file in your report. If you have downloaded libpcap from
tcpdump.org, and built it yourself, please also include the config.log
file from the libpcap source directory, the Makefile from the libpcap
@@ -5745,11 +6064,12 @@ fi
#
# You are in a twisty little maze of UN*Xes, all different.
# Some might not have ether_ntohost().
-# Some might have it, but not declare it in any header file.
-# Some might have it, but declare it in <netinet/if_ether.h>.
-# Some might have it, but declare it in <netinet/ether.h>
-# (And some might have it but document it as something declared in
-# <netinet/ethernet.h>, although <netinet/if_ether.h> appears to work.)
+# Some might have it and declare it in <net/ethernet.h>.
+# Some might have it and declare it in <netinet/ether.h>
+# Some might have it and declare it in <sys/ethernet.h>.
+# Some might have it and declare it in <arpa/inet.h>.
+# Some might have it and declare it in <netinet/if_ether.h>.
+# Some might have it and not declare it in any header file.
#
# Before you is a C compiler.
#
@@ -5774,6 +6094,8 @@ else
/* end confdefs.h. */
#include <netdb.h>
+ #include <netinet/ether.h>
+ #include <stdlib.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -5813,27 +6135,46 @@ done
if test "$ac_cv_func_ether_ntohost" = yes -a \
"$ac_cv_buggy_ether_ntohost" = "no"; then
#
- # OK, we have ether_ntohost(). Do we have <netinet/if_ether.h>?
+ # OK, we have ether_ntohost(). Is it declared in <net/ethernet.h>?
+ #
+ # This test fails if we don't have <net/ethernet.h> or if we do
+ # but it doesn't declare ether_ntohost().
+ #
+ ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
+#include <net/ethernet.h>
+
+"
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
+
+
+$as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+
+
+fi
+
+ #
+ # Did that succeed?
#
- if test "$ac_cv_header_netinet_if_ether_h" = yes; then
+ if test "$ac_cv_have_decl_ether_ntohost" != yes; then
#
- # Yes. Does it declare ether_ntohost()?
+ # No, how about <netinet/ether.h>, as on Linux?
#
+ # This test fails if we don't have <netinet/ether.h>
+ # or if we do but it doesn't declare ether_ntohost().
+ #
+ # Unset ac_cv_have_decl_ether_ntohost so we don't
+ # treat the previous failure as a cached value and
+ # suppress the next test.
+ #
+ unset ac_cv_have_decl_ether_ntohost
ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-#include <netinet/if_ether.h>
+#include <netinet/ether.h>
"
if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
-$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
fi
@@ -5844,121 +6185,132 @@ fi
#
if test "$ac_cv_have_decl_ether_ntohost" != yes; then
#
- # No, how about <netinet/ether.h>, as on Linux?
+ # No, how about <sys/ethernet.h>, as on Solaris 10
+ # and later?
#
- for ac_header in netinet/ether.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "netinet/ether.h" "ac_cv_header_netinet_ether_h" "$ac_includes_default"
-if test "x$ac_cv_header_netinet_ether_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINET_ETHER_H 1
-_ACEOF
+ # This test fails if we don't have <sys/ethernet.h>
+ # or if we do but it doesn't declare ether_ntohost().
+ #
+ # Unset ac_cv_have_decl_ether_ntohost so we don't
+ # treat the previous failure as a cached value and
+ # suppress the next test.
+ #
+ unset ac_cv_have_decl_ether_ntohost
+ ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
+#include <sys/ethernet.h>
-fi
+"
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
-done
- if test "$ac_cv_header_netinet_ether_h" = yes; then
- #
- # We have it - does it declare ether_ntohost()?
- # Unset ac_cv_have_decl_ether_ntohost so we don't
- # treat the previous failure as a cached value and
- # suppress the next test.
- #
- unset ac_cv_have_decl_ether_ntohost
- ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
-#include <netinet/ether.h>
+$as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+
+
+fi
+
+ fi
+ #
+ # Did that succeed?
+ #
+ if test "$ac_cv_have_decl_ether_ntohost" != yes; then
+ #
+ # No, how about <arpa/inet.h>, as in AIX?
+ #
+ # This test fails if we don't have <arpa/inet.h>
+ # (if we have ether_ntohost(), we should have
+ # networking, and if we have networking, we should
+ # have <arpa/inet.h>) or if we do but it doesn't
+ # declare ether_ntohost().
+ #
+ # Unset ac_cv_have_decl_ether_ntohost so we don't
+ # treat the previous failure as a cached value and
+ # suppress the next test.
+ #
+ unset ac_cv_have_decl_ether_ntohost
+ ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
+#include <arpa/inet.h>
"
if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
-$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
+$as_echo "#define ARPA_INET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
fi
- fi
fi
#
- # Is ether_ntohost() declared?
+ # Did that succeed?
#
if test "$ac_cv_have_decl_ether_ntohost" != yes; then
#
- # No, we'll have to declare it ourselves.
- # Do we have "struct ether_addr"?
+ # No, how about <netinet/if_ether.h>?
+ # On some platforms, it requires <net/if.h> and
+ # <netinet/in.h>, and we always include it with
+ # both of them, so test it with both of them.
#
- ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
+ # This test fails if we don't have <netinet/if_ether.h>
+ # and the headers we include before it, or if we do but
+ # <netinet/if_ether.h> doesn't declare ether_hostton().
+ #
+ # Unset ac_cv_have_decl_ether_ntohost so we don't
+ # treat the previous failure as a cached value and
+ # suppress the next test.
+ #
+ unset ac_cv_have_decl_ether_ntohost
+ ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
#include <sys/types.h>
#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-struct mbuf;
-struct rtentry;
#include <net/if.h>
+#include <netinet/in.h>
#include <netinet/if_ether.h>
"
-if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_ETHER_ADDR 1
-_ACEOF
+
+$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
fi
+ fi
+ #
+ # After all that, is ether_ntohost() declared?
+ #
+ if test "$ac_cv_have_decl_ether_ntohost" = yes; then
+ #
+ # Yes.
+ #
-$as_echo "#define HAVE_DECL_ETHER_NTOHOST 0" >>confdefs.h
+$as_echo "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
else
+ #
+ # No, we'll have to declare it ourselves.
+ # Do we have "struct ether_addr" if we include
+ # <netinet/if_ether.h>?
+ #
+ ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <netinet/if_ether.h>
-$as_echo "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
+"
+if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
- fi
-fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ETHER_ADDR 1
+_ACEOF
-# libdlpi is needed for Solaris 11 and later.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
-$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
-if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldlpi -L/lib $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlpi_walk ();
-int
-main ()
-{
-return dlpi_walk ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dlpi_dlpi_walk=yes
-else
- ac_cv_lib_dlpi_dlpi_walk=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
-$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
-if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
- LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
fi
+ fi
+fi
ac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks"
if test "x$ac_cv_func_pcap_list_datalinks" = xyes; then :
@@ -5989,16 +6341,6 @@ esac
fi
-for ac_func in pcap_set_datalink
-do :
- ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
-if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_SET_DATALINK 1
-_ACEOF
-
-fi
-done
ac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val"
if test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes; then :
@@ -6035,33 +6377,28 @@ esac
fi
-for ac_func in pcap_breakloop
+for ac_func in pcap_set_datalink
do :
- ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
-if test "x$ac_cv_func_pcap_breakloop" = xyes; then :
+ ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
+if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_BREAKLOOP 1
+#define HAVE_PCAP_SET_DATALINK 1
_ACEOF
fi
done
-ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
-if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
-
-$as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
-
-else
-
- case " $LIBOBJS " in
- *" pcap_dump_ftell.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext"
- ;;
-esac
-
+for ac_func in pcap_breakloop
+do :
+ ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
+if test "x$ac_cv_func_pcap_breakloop" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_BREAKLOOP 1
+_ACEOF
fi
+done
#
@@ -6117,13 +6454,12 @@ fi
# Check for a miscellaneous collection of functions which we use
# if we have them.
#
-for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version pcap_setdirection pcap_set_immediate_mode
+for ac_func in pcap_findalldevs
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 :
+ ac_fn_c_check_func "$LINENO" "pcap_findalldevs" "ac_cv_func_pcap_findalldevs"
+if test "x$ac_cv_func_pcap_findalldevs" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_PCAP_FINDALLDEVS 1
_ACEOF
fi
@@ -6145,6 +6481,17 @@ fi
CPPFLAGS="$savedcppflags"
fi
+for ac_func in pcap_dump_flush pcap_lib_version
+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
+
+fi
+done
if test $ac_cv_func_pcap_lib_version = "no" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_version is defined by libpcap" >&5
@@ -6182,6 +6529,44 @@ $as_echo "#define HAVE_PCAP_VERSION 1" >>confdefs.h
$as_echo "no" >&6; }
fi
fi
+for ac_func in pcap_setdirection pcap_set_immediate_mode pcap_dump_ftell64
+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
+
+fi
+done
+
+for ac_func in pcap_open pcap_findalldevs_ex
+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
+
+fi
+done
+
+ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
+if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
+ $as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" pcap_dump_ftell.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext"
+ ;;
+esac
+
+fi
+
+
#
# Check for special debugging functions
@@ -6361,109 +6746,6 @@ if test -f /dev/bpf0 ; then
fi
#
-# Make sure we have definitions for all the C99 specified-width types
-# (regardless of whether the environment is a C99 environment or not).
-#
-ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
-case $ac_cv_c_int8_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int8_t $ac_cv_c_int8_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
-case $ac_cv_c_int16_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int16_t $ac_cv_c_int16_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
-case $ac_cv_c_int32_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int32_t $ac_cv_c_int32_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
-case $ac_cv_c_int64_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int64_t $ac_cv_c_int64_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
-case $ac_cv_c_uint8_t in #(
- no|yes) ;; #(
- *)
-
-$as_echo "#define _UINT8_T 1" >>confdefs.h
-
-
-cat >>confdefs.h <<_ACEOF
-#define uint8_t $ac_cv_c_uint8_t
-_ACEOF
-;;
- esac
-
-ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
-case $ac_cv_c_uint16_t in #(
- no|yes) ;; #(
- *)
-
-
-cat >>confdefs.h <<_ACEOF
-#define uint16_t $ac_cv_c_uint16_t
-_ACEOF
-;;
- esac
-
-ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
-case $ac_cv_c_uint32_t in #(
- no|yes) ;; #(
- *)
-
-$as_echo "#define _UINT32_T 1" >>confdefs.h
-
-
-cat >>confdefs.h <<_ACEOF
-#define uint32_t $ac_cv_c_uint32_t
-_ACEOF
-;;
- esac
-
-ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
-case $ac_cv_c_uint64_t in #(
- no|yes) ;; #(
- *)
-
-$as_echo "#define _UINT64_T 1" >>confdefs.h
-
-
-cat >>confdefs.h <<_ACEOF
-#define uint64_t $ac_cv_c_uint64_t
-_ACEOF
-;;
- esac
-
-
-#
# Make sure we have a definition for C99's uintptr_t (regardless of
# whether the environment is a C99 environment or not).
#
@@ -6506,6 +6788,26 @@ fi
#
+# Check whether we have pcap/pcap-inttypes.h.
+# If we do, we use that to get the C99 types defined.
+#
+savedcppflags="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $V_INCLS"
+for ac_header in pcap/pcap-inttypes.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap-inttypes.h" "ac_cv_header_pcap_pcap_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_pcap_pcap_inttypes_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_PCAP_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+CPPFLAGS="$savedcppflags"
+
+#
# Define the old BSD specified-width types in terms of the C99 types;
# we may need them with libpcap include files.
#
@@ -6558,370 +6860,6 @@ $as_echo "#define u_int64_t uint64_t" >>confdefs.h
fi
-#
-# Check for <inttypes.h>
-#
-for ac_header in inttypes.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_inttypes_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_INTTYPES_H 1
-_ACEOF
-
- #
- # OK, we have inttypes.h, but does it define all the PRI[doxu]64 macros?
- # Some systems have an inttypes.h that doesn't define all of them.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h defines the PRI[doxu]64 macros" >&5
-$as_echo_n "checking whether inttypes.h defines the PRI[doxu]64 macros... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- #include <inttypes.h>
- #include <stdio.h>
- #include <sys/types.h>
-
- main()
- {
- printf("%" PRId64 "\n", (uint64_t)1);
- printf("%" PRIo64 "\n", (uint64_t)1);
- printf("%" PRIx64 "\n", (uint64_t)1);
- printf("%" PRIu64 "\n", (uint64_t)1);
- }
-
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ac_lbl_inttypes_h_defines_formats=yes
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_lbl_inttypes_h_defines_formats=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-else
-
- #
- # We don't have inttypes.h, so it obviously can't define those
- # macros.
- #
- ac_lbl_inttypes_h_defines_formats=no
-
-fi
-
-done
-
-if test "$ac_lbl_inttypes_h_defines_formats" = no; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %lx can be used to format 64-bit integers" >&5
-$as_echo_n "checking whether %lx can be used to format 64-bit integers... " >&6; }
- if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
-# endif
- #include <stdio.h>
- #include <sys/types.h>
-
- main()
- {
- uint64_t t = 1;
- char strbuf[16+1];
- sprintf(strbuf, "%016lx", t << 32);
- if (strcmp(strbuf, "0000000100000000") == 0)
- exit(0);
- else
- exit(1);
- }
-
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-
-$as_echo "#define PRId64 \"ld\"" >>confdefs.h
-
-
-$as_echo "#define PRIo64 \"lo\"" >>confdefs.h
-
-
-$as_echo "#define PRIx64 \"lx\"" >>confdefs.h
-
-
-$as_echo "#define PRIu64 \"lu\"" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %llx can be used to format 64-bit integers" >&5
-$as_echo_n "checking whether %llx can be used to format 64-bit integers... " >&6; }
- if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
-# endif
- #include <stdio.h>
- #include <sys/types.h>
-
- main()
- {
- uint64_t t = 1;
- char strbuf[16+1];
- sprintf(strbuf, "%016llx", t << 32);
- if (strcmp(strbuf, "0000000100000000") == 0)
- exit(0);
- else
- exit(1);
- }
-
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-
-$as_echo "#define PRId64 \"lld\"" >>confdefs.h
-
-
-$as_echo "#define PRIo64 \"llo\"" >>confdefs.h
-
-
-$as_echo "#define PRIx64 \"llx\"" >>confdefs.h
-
-
-$as_echo "#define PRIu64 \"llu\"" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %Lx can be used to format 64-bit integers" >&5
-$as_echo_n "checking whether %Lx can be used to format 64-bit integers... " >&6; }
- if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
-# endif
- #include <stdio.h>
- #include <sys/types.h>
-
- main()
- {
- uint64_t t = 1;
- char strbuf[16+1];
- sprintf(strbuf, "%016Lx", t << 32);
- if (strcmp(strbuf, "0000000100000000") == 0)
- exit(0);
- else
- exit(1);
- }
-
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-
-$as_echo "#define PRId64 \"Ld\"" >>confdefs.h
-
-
-$as_echo "#define PRIo64 \"Lo\"" >>confdefs.h
-
-
-$as_echo "#define PRIx64 \"Lx\"" >>confdefs.h
-
-
-$as_echo "#define PRIu64 \"Lu\"" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %qx can be used to format 64-bit integers" >&5
-$as_echo_n "checking whether %qx can be used to format 64-bit integers... " >&6; }
- if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
-# endif
- #include <stdio.h>
- #include <sys/types.h>
-
- main()
- {
- uint64_t t = 1;
- char strbuf[16+1];
- sprintf(strbuf, "%016qx", t << 32);
- if (strcmp(strbuf, "0000000100000000") == 0)
- exit(0);
- else
- exit(1);
- }
-
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-
-$as_echo "#define PRId64 \"qd\"" >>confdefs.h
-
-
-$as_echo "#define PRIo64 \"qo\"" >>confdefs.h
-
-
-$as_echo "#define PRIx64 \"qx\"" >>confdefs.h
-
-
-$as_echo "#define PRIu64 \"qu\"" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
- as_fn_error $? "neither %llx nor %Lx nor %qx worked on a 64-bit integer" "$LINENO" 5
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-
-#
-# Check for some headers introduced in later versions of libpcap
-# and used by some printers.
-#
-# Those headers use the {u_}intN_t types, so we must do this after
-# we check for what's needed to get them defined.
-#
-savedcppflags="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $V_INCLS"
-for ac_header in pcap/bluetooth.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include \"netdissect-stdinc.h\"
-"
-if test "x$ac_cv_header_pcap_bluetooth_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_BLUETOOTH_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in pcap/nflog.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "pcap/nflog.h" "ac_cv_header_pcap_nflog_h" "#include \"netdissect-stdinc.h\"
-"
-if test "x$ac_cv_header_pcap_nflog_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_NFLOG_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in pcap/usb.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include \"netdissect-stdinc.h\"
-"
-if test "x$ac_cv_header_pcap_usb_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_USB_H 1
-_ACEOF
-
-fi
-
-done
-
-CPPFLAGS="$savedcppflags"
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -7117,74 +7055,202 @@ 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: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -W"
+
+else
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- #
- # We're assuming this is clang, where
- # -Werror=unknown-warning-option is the appropriate
- # option to force the compiler to fail.
- #
- ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
+ CFLAGS="$save_CFLAGS"
-else
+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"
+ 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(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; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wall"
+
+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
- CFLAGS="$save_CFLAGS"
+ 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 -Wassign-enum option" >&5
+$as_echo_n "checking whether the compiler supports the -Wassign-enum 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 -Wassign-enum"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+int main(void) { return 0; }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wassign-enum"
+
+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"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5
+$as_echo_n "checking whether the compiler supports the -Wcast-qual option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wcast-qual"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(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; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -Wall"
+ V_CCOPT="$V_CCOPT -Wcast-qual"
else
@@ -7194,33 +7260,42 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
- elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
- elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
- else
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- fi
+ CFLAGS="$CFLAGS -Wmissing-prototypes"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+int main(void) { return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
@@ -7237,40 +7312,49 @@ $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; }
+ { $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-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 -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 :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -Wstrict-prototypes"
+ V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
else
@@ -7280,40 +7364,101 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
-$as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5
+$as_echo_n "checking whether the compiler supports the -Wold-style-definition option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wwrite-strings" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wwrite-strings"
- elif expr "x-Wwrite-strings" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wwrite-strings"
- elif expr "x-Wwrite-strings" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wwrite-strings"
- else
- CFLAGS="$CFLAGS -Wwrite-strings"
- fi
+ CFLAGS="$CFLAGS -Wold-style-definition"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+int main(void) { return 0; }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wold-style-definition"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
+$as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wpedantic"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(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; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -Wwrite-strings"
+ V_CCOPT="$V_CCOPT -Wpedantic"
else
@@ -7323,33 +7468,42 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
- elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wpointer-arith"
- elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wpointer-arith"
- else
- CFLAGS="$CFLAGS -Wpointer-arith"
- fi
+ CFLAGS="$CFLAGS -Wpointer-arith"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+int main(void) { return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
@@ -7366,40 +7520,49 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5
-$as_echo_n "checking whether the compiler supports the -Wcast-qual option... " >&6; }
+ { $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-Wcast-qual" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcast-qual"
- elif expr "x-Wcast-qual" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wcast-qual"
- elif expr "x-Wcast-qual" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wcast-qual"
- else
- CFLAGS="$CFLAGS -Wcast-qual"
- fi
+ CFLAGS="$CFLAGS -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 :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -Wcast-qual"
+ V_CCOPT="$V_CCOPT -Wpointer-sign"
else
@@ -7409,33 +7572,42 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wshadow" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
- elif expr "x-Wshadow" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wshadow"
- elif expr "x-Wshadow" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wshadow"
- else
- CFLAGS="$CFLAGS -Wshadow"
- fi
+ CFLAGS="$CFLAGS -Wshadow"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+int main(void) { return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
@@ -7452,40 +7624,49 @@ $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 -Wsign-compare option" >&5
+$as_echo_n "checking whether the compiler supports the -Wsign-compare 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 -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 :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -Wdeclaration-after-statement"
+ V_CCOPT="$V_CCOPT -Wsign-compare"
else
@@ -7495,40 +7676,49 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
-$as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
+ { $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-Wpedantic" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpedantic"
- elif expr "x-Wpedantic" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wpedantic"
- elif expr "x-Wpedantic" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wpedantic"
- else
- CFLAGS="$CFLAGS -Wpedantic"
- fi
+ CFLAGS="$CFLAGS -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 :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -Wpedantic"
+ V_CCOPT="$V_CCOPT -Wstrict-prototypes"
else
@@ -7538,40 +7728,49 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5
-$as_echo_n "checking whether the compiler supports the -Wold-style-definition option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code-return option" >&5
+$as_echo_n "checking whether the compiler supports the -Wunreachable-code-return option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wold-style-definition" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wold-style-definition"
- elif expr "x-Wold-style-definition" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wold-style-definition"
- elif expr "x-Wold-style-definition" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wold-style-definition"
- else
- CFLAGS="$CFLAGS -Wold-style-definition"
- fi
+ CFLAGS="$CFLAGS -Wunreachable-code-return"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+int main(void) { return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -Wold-style-definition"
+ V_CCOPT="$V_CCOPT -Wunreachable-code-return"
else
@@ -7581,33 +7780,42 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
save_CFLAGS="$CFLAGS"
- if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
- then
- CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
- elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
- elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
- then
- CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
- else
- CFLAGS="$CFLAGS -Wused-but-marked-unused"
- fi
+ CFLAGS="$CFLAGS -Wused-but-marked-unused"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+int main(void) { return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
@@ -7624,40 +7832,49 @@ $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 -W option" >&5
-$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
+$as_echo_n "checking whether the compiler supports the -Wwrite-strings 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 -Wwrite-strings"
+ #
+ # XXX - yes, this depends on the way AC_LANG_WERROR works,
+ # but no mechanism is provided to turn AC_LANG_WERROR on
+ # *and then turn it back off*, so that we *only* do it when
+ # testing compiler options - 15 years after somebody asked
+ # for it:
+ #
+ # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+ #
+ save_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ #
+ # We use AC_LANG_SOURCE() so that we can control the complete
+ # content of the program being compiled. We do not, for example,
+ # want the default "int main()" that AC_LANG_PROGRAM() generates,
+ # as it will generate a warning with -Wold-style-definition, meaning
+ # that we would treat it as not working, as the test will fail if
+ # *any* error output, including a warning due to the flag we're
+ # testing, is generated; see
+ #
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
+ #
+ # This may, as per those two messages, be fixed in autoconf 2.70,
+ # but we only require 2.64 or newer for now.
+ #
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-int
-main ()
-{
-return 0
- ;
- return 0;
-}
+int main(void) { return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$save_CFLAGS"
- V_CCOPT="$V_CCOPT -W"
+ V_CCOPT="$V_CCOPT -Wwrite-strings"
else
@@ -7667,6 +7884,7 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag="$save_ac_c_werror_flag"
fi
@@ -7740,12 +7958,15 @@ $as_echo_n "checking whether the compiler supports generating dependencies... "
/* end confdefs.h. */
int main(void) { return 0; }
_ACEOF
- echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
- if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+ if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
+ (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
- MKDEP='${srcdir}/mkdep'
+ MKDEP='${top_srcdir}/mkdep'
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -7789,135 +8010,6 @@ $as_echo "$as_me: WARNING: can't find $name" >&2;}
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr struct has the sa_len member" >&5
-$as_echo_n "checking if sockaddr struct has the sa_len member... " >&6; }
- if ${ac_cv_lbl_sockaddr_has_sa_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <sys/types.h>
-# include <sys/socket.h>
-int
-main ()
-{
-u_int i = sizeof(((struct sockaddr *)0)->sa_len)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_lbl_sockaddr_has_sa_len=yes
-else
- ac_cv_lbl_sockaddr_has_sa_len=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_sockaddr_has_sa_len" >&5
-$as_echo "$ac_cv_lbl_sockaddr_has_sa_len" >&6; }
- if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
-
-$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
-
- 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
-
# Check for OpenSSL/libressl libcrypto
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL/libressl libcrypto" >&5
$as_echo_n "checking whether to use OpenSSL/libressl libcrypto... " >&6; }
@@ -7976,7 +8068,7 @@ if test "$want_libcrypto" != "no"; then
# El Capitan, probably because they don't want you writing
# nasty portable code that could run on other UN*Xes, they
# want you writing code that uses their Shiny New Crypto
- # Library and that only runs on OS X.
+ # Library and that only runs on macOS.
#
ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
if test "x$ac_cv_header_openssl_crypto_h" = xyes; then :
@@ -8047,19 +8139,19 @@ done
# EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be
# opaque; otherwise, we allocate it ourselves.
#
- # 2) do we have EVP_CipherInit_ex()?
+ # 2) do we have EVP_DecryptInit_ex()?
# If so, we use it, because we need to be
# able to make two "initialize the cipher"
# calls, one with the cipher and key, and
# one with the IV, and, as of OpenSSL 1.1,
- # You Can't Do That with EVP_CipherInit(),
- # because a call to EVP_CipherInit() will
+ # You Can't Do That with EVP_DecryptInit(),
+ # because a call to EVP_DecryptInit() will
# unconditionally clear the context, and
# if you don't supply a cipher, it'll
# clear the cipher, rendering the context
# unusable and causing a crash.
#
- for ac_func in EVP_CIPHER_CTX_new EVP_CipherInit_ex
+ for ac_func in EVP_CIPHER_CTX_new EVP_DecryptInit_ex
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"
@@ -8791,7 +8883,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
+This file was extended by tcpdump $as_me 4.99.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8857,7 +8949,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
+tcpdump config.status 4.99.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -9545,8 +9637,8 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"default-1":C) if test -f .devel; then
echo timestamp > stamp-h
- cat Makefile-devel-adds >> Makefile
- make depend
+ cat $srcdir/Makefile-devel-adds >> Makefile
+ make depend || exit 1
fi ;;
esac