X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ecb87d847b2035242c2921a4b88a7c997c565e2a..refs/heads/tcpdump-4.6:/configure?ds=sidebyside diff --git a/configure b/configure index a3870797..1e45e6b8 100755 --- a/configure +++ b/configure @@ -633,6 +633,7 @@ V_DEFS V_CCOPT MKDEP DEPENDENCY_CFLAG +AR RANLIB PCAP_CONFIG LIBOBJS @@ -702,6 +703,7 @@ with_smi enable_smb with_user with_chroot +with_sandbox_capsicum enable_ipv6 with_crypto ' @@ -1339,6 +1341,8 @@ Optional Packages: --without-smi don't link with libsmi --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-crypto use OpenSSL libcrypto [default=yes, if available] Some influential environment variables: @@ -3421,7 +3425,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # 1989 and the early '90's, so maybe we can just # drop support for those compilers.) # - V_CCOPT="$V_CCOPT -xansi -signed" + # -g is equivalent to -g2, which turns off + # optimization; we choose -g3, which generates + # debugging information but doesn't turn off + # optimization (even if the optimization would + # cause inaccuracies in debugging). + # + V_CCOPT="$V_CCOPT -xansi -signed -g3" ;; osf*) @@ -3436,6 +3446,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # don't want to try using GCC-style -W flags. # ac_lbl_cc_dont_try_gcc_dashW=yes + # + # -g is equivalent to -g2, which turns off + # optimization; we choose -g3, which generates + # debugging information but doesn't turn off + # optimization (even if the optimization would + # cause inaccuracies in debugging). + # + V_CCOPT="$V_CCOPT -g3" ;; solaris*) @@ -3764,6 +3782,7 @@ $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' @@ -4304,38 +4323,6 @@ fi esac fi ;; - -linux*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux kernel version" >&5 -$as_echo_n "checking Linux kernel version... " >&6; } - if test "$cross_compiling" = yes; then - if ${ac_cv_linux_vers+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_linux_vers=unknown -fi - - else - if ${ac_cv_linux_vers+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_linux_vers=`uname -r 2>&1 | \ - sed -n -e '$s/.* //' -e '$s/\..*//p'` -fi - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_linux_vers" >&5 -$as_echo "$ac_cv_linux_vers" >&6; } - if test $ac_cv_linux_vers = unknown ; then - as_fn_error $? "cannot determine linux version when cross-compiling" "$LINENO" 5 - fi - if test $ac_cv_linux_vers -lt 2 ; then - as_fn_error $? "version 2 or higher required; see the INSTALL doc for more info" "$LINENO" 5 - fi - ;; - -*) - ;; esac @@ -4349,19 +4336,13 @@ fi if test "x$with_smi" != "xno" ; then -for ac_header in smi.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default" if test "x$ac_cv_header_smi_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SMI_H 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5 + # + # OK, we found smi.h. Do we have libsmi with smiInit? + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5 $as_echo_n "checking for smiInit in -lsmi... " >&6; } if ${ac_cv_lib_smi_smiInit+:} false; then : $as_echo_n "(cached) " >&6 @@ -4398,27 +4379,26 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smi_smiInit" >&5 $as_echo "$ac_cv_lib_smi_smiInit" >&6; } if test "x$ac_cv_lib_smi_smiInit" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSMI 1 -_ACEOF - - LIBS="-lsmi $LIBS" - -fi -if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes -then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5 + # + # OK, we have libsmi with smiInit. Can we use it? + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5 $as_echo_n "checking whether to enable libsmi... " >&6; } - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5 + savedlibs="$LIBS" + LIBS="-lsmi $LIBS" + if test "$cross_compiling" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5 $as_echo "not when cross-compiling" >&6; } - libsmi=no + LIBS="$savedlibs" + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* libsmi available check */ + +/* libsmi available check */ #include main() { @@ -4438,32 +4418,41 @@ main() _ACEOF if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define LIBSMI 1" >>confdefs.h +$as_echo "#define USE_LIBSMI 1" >>confdefs.h + - libsmi=yes else - case $? in - 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5 + + case $? in + 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5 $as_echo "no - smiInit failed" >&6; } ;; - 2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5 + 2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5 $as_echo "no - header/library version mismatch" >&6; } ;; - 3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5 + 3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5 $as_echo "no - can't determine library version" >&6; } ;; - 4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5 + 4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5 $as_echo "no - too old" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; - esac - libsmi=no + esac + LIBS="$savedlibs" + fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + +fi + + fi + + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the possibly-buggy SMB printer" >&5 @@ -4532,6 +4521,48 @@ else $as_echo "no" >&6; } fi + +# Check whether --with-sandbox-capsicum was given. +if test "${with_sandbox_capsicum+set}" = set; then : + withval=$with_sandbox_capsicum; +fi + +# +# Check whether various functions are available. If any are, set +# ac_lbl_capsicum_function_seen to yes; if any are not, set +# ac_lbl_capsicum_function_not_seen to yes. +# +# All of them must be available in order to enable capsicum sandboxing. +# +if test ! -z "$with_sandbox-capsicum" && test "$with_sandbox-capsicum" != "no" ; then + for ac_func in cap_enter cap_rights_init 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" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + ac_lbl_capsicum_function_seen=yes +else + ac_lbl_capsicum_function_not_seen=yes +fi +done + +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; } +if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then + +$as_echo "#define HAVE_CAPSICUM 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 enable IPv6, because, # on some platforms (such as SunOS 5.x), the test program requires @@ -4818,28 +4849,27 @@ $as_echo "no" >&6; } ipv6=no ;; esac -else - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ipv6=no - else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* AF_INET6 available check */ + + /* AF_INET6 available check */ #include #include -main() +#include +#ifdef AF_INET6 +void +foo(struct in6_addr *addr) { - if (socket(AF_INET6, SOCK_STREAM, 0) < 0) - exit(1); - else - exit(0); + memset(addr, 0, sizeof (struct in6_addr)); } +#else +#error "AF_INET6 not defined" +#endif + _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC" @@ -4852,10 +4882,7 @@ else $as_echo "no" >&6; } ipv6=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -5374,45 +5401,6 @@ if test "$ac_cv_namereqd" = no; then missing_includes=yes fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5 -$as_echo_n "checking for sockaddr_storage... " >&6; } - if ${ac_cv_sa_storage+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# include -# include -int -main () -{ -struct sockaddr_storage s - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sa_storage=yes -else - ac_cv_sa_storage=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sa_storage" >&5 -$as_echo "$ac_cv_sa_storage" >&6; } - if test $ac_cv_sa_storage = yes; then - -$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h - - fi - -if test "$ac_cv_sa_storage" = no; then - missing_includes=yes -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 @@ -5491,6 +5479,19 @@ 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 + +else + case " $LIBOBJS " in + *" getopt_long.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" + ;; +esac + +fi + for ac_func in fork vfork strftime do : @@ -5805,7 +5806,9 @@ $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)?$'` - for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do + 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 @@ -6001,13 +6004,23 @@ $as_echo "found -- -I$d added" >&6; } 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 - V_INCLS="-I$d $V_INCLS" - elif test -r $places/pcap.h; then - V_INCLS="-I$places $V_INCLS" + pcapH=$d else - as_fn_error see INSTALL "cannot find pcap.h" "$LINENO" 5 + for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do + if test -r $dir/pcap.h ; then + pcapH=$dir + fi + done + fi + + if test $pcapH = FAIL ; then + as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5 fi + V_INCLS="-I$pcapH $V_INCLS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5 $as_echo "$libpcap" >&6; } # Extract the first word of "pcap-config", so it can be a program name with args. @@ -6125,8 +6138,21 @@ 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 : + $as_echo "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h + for ac_func in pcap_free_datalinks +do : + ac_fn_c_check_func "$LINENO" "pcap_free_datalinks" "ac_cv_func_pcap_free_datalinks" +if test "x$ac_cv_func_pcap_free_datalinks" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PCAP_FREE_DATALINKS 1 +_ACEOF + +fi +done + + else case " $LIBOBJS " in @@ -6138,12 +6164,16 @@ esac fi - ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink" + 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 : - -$as_echo "#define HAVE_PCAP_SET_DATALINK 1" >>confdefs.h + 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 : @@ -6192,7 +6222,7 @@ fi done - ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell" + 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 @@ -6606,6 +6636,21 @@ if test "x$ac_cv_func_pcap_set_tstamp_type" = xyes; then : #define HAVE_PCAP_SET_TSTAMP_TYPE 1 _ACEOF +fi +done + + # + # And do we have pcap_set_tstamp_precision? If so, we assume + # we also have pcap_open_offline_with_tstamp_precision. + # + for ac_func in pcap_set_tstamp_precision +do : + ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_precision" "ac_cv_func_pcap_set_tstamp_precision" +if test "x$ac_cv_func_pcap_set_tstamp_precision" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PCAP_SET_TSTAMP_PRECISION 1 +_ACEOF + fi done @@ -6825,6 +6870,7 @@ 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) ;; #( @@ -6925,73 +6971,96 @@ _ACEOF # -# For now, we're using the old BSD-style u_intXX_t types, so check for -# them. -# -# We should probably migrate to the standard C uintXX_t types. +# Make sure we have a definition for C99's uintptr_t (regardless of +# whether the environment is a C99 environment or not). # -for ac_header in sys/bitypes.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_bitypes_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_BITYPES_H 1 + + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = xyes; then : + +$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h + +else + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done fi -done +# +# Define the old BSD specified-width types in terms of the C99 types; +# we may need them with libpcap include files. +# ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int8_t" = xyes; then : else -$as_echo "#define u_int8_t unsigned char" >>confdefs.h +$as_echo "#define u_int8_t uint8_t" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int16_t" = xyes; then : else -$as_echo "#define u_int16_t unsigned short" >>confdefs.h +$as_echo "#define u_int16_t uint16_t" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int32_t" = xyes; then : else -$as_echo "#define u_int32_t unsigned int" >>confdefs.h +$as_echo "#define u_int32_t uint32_t" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int64_t" = xyes; then : else -$as_echo "#define u_int64_t unsigned long long" >>confdefs.h +$as_echo "#define u_int64_t uint64_t" >>confdefs.h fi @@ -7020,16 +7089,13 @@ $as_echo_n "checking whether inttypes.h defines the PRI[doxu]64 macros... " >&6; #include #include #include - #ifdef HAVE_SYS_BITYPES_H - #include - #endif main() { - printf("%" PRId64 "\n", (u_int64_t)1); - printf("%" PRIo64 "\n", (u_int64_t)1); - printf("%" PRIx64 "\n", (u_int64_t)1); - printf("%" PRIu64 "\n", (u_int64_t)1); + printf("%" PRId64 "\n", (uint64_t)1); + printf("%" PRIo64 "\n", (uint64_t)1); + printf("%" PRIx64 "\n", (uint64_t)1); + printf("%" PRIu64 "\n", (uint64_t)1); } @@ -7077,16 +7143,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016lx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0) @@ -7134,16 +7197,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016llx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0) @@ -7191,16 +7251,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016Lx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0) @@ -7248,16 +7305,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016qx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0) @@ -7336,7 +7390,7 @@ 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 + ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include \"tcpdump-stdinc.h\" " if test "x$ac_cv_header_pcap_bluetooth_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -7347,9 +7401,22 @@ 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 \"tcpdump-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 + ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include \"tcpdump-stdinc.h\" " if test "x$ac_cv_header_pcap_usb_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -7454,6 +7521,98 @@ else RANLIB="$ac_cv_prog_RANLIB" fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + 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 + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + rm -f os-proto.h if test "${LBL_CFLAGS+set}" = set; then @@ -7756,28 +7915,14 @@ $as_echo "no" >&6; } - if test "$GCC" != yes ; then - case "$host_os" in - - irix6*) - # Presumed to be MIPS C. - V_CCOPT="$V_CCOPT -n32 -g3" - ;; - - irix*) - # Presumed to be MIPS C. - V_CCOPT="$V_CCOPT -g3" - ;; - - osf*) - # Presumed to be the DEC C compiler. - V_CCOPT="$V_CCOPT -g3" - ;; - - *) - ;; - esac - fi + # + # We used to set -n32 for IRIX 6 when not using GCC (presumed + # to mean that we're using MIPS C or MIPSpro C); it specified + # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm + # not sure why that would be something to do *only* with a + # .devel file; why should the ABI for which we produce code + # depend on .devel? + # os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'` name="lbl/os-$os.h" if test -f $name ; then