diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-10-28 19:06:17 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-10-28 19:06:17 +0000 |
commit | 1e8ad3bd802d66bed71b4c6405ff5d801a913e4a (patch) | |
tree | df5e0d876c3ec2ff0e3d9c6795cb5c1e20b7d5c4 /contrib/tcpdump/configure | |
parent | 7ab661360c2131496bd3c111b5b3b2462fe3d2be (diff) | |
parent | 5f4de8e61a87fc21b6ffecf7ef9444827c09ee69 (diff) | |
download | FreeBSD-src-1e8ad3bd802d66bed71b4c6405ff5d801a913e4a.zip FreeBSD-src-1e8ad3bd802d66bed71b4c6405ff5d801a913e4a.tar.gz |
Merge tcpdump-4.1.1.
Diffstat (limited to 'contrib/tcpdump/configure')
-rwxr-xr-x | contrib/tcpdump/configure | 627 |
1 files changed, 563 insertions, 64 deletions
diff --git a/contrib/tcpdump/configure b/contrib/tcpdump/configure index f4b7754..cb51d19 100755 --- a/contrib/tcpdump/configure +++ b/contrib/tcpdump/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.196.2.6 . +# From configure.in Revision: 1.204 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -671,6 +671,7 @@ CPP GREP EGREP LIBOBJS +PCAP_CONFIG RANLIB V_CCOPT V_DEFS @@ -678,6 +679,8 @@ V_GROUP V_INCLS V_PCAPDEP LOCALSRC +MAN_FILE_FORMATS +MAN_MISC_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA @@ -1273,6 +1276,8 @@ 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-user=USERNAME drop privileges by default to USERNAME --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY --with-crypto[=PATH] use SSLeay libcrypto (located in directory PATH, if @@ -1831,6 +1836,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + # Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then withval=$with_gcc; @@ -1897,7 +1903,8 @@ fi CC=cc export CC fi - ac_ext=c + +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -2816,6 +2823,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + if test "$GCC" = yes ; then if test "$SHLICC2" = yes ; then ac_cv_lbl_gcc_vers=2 @@ -2954,12 +2965,75 @@ echo "$as_me: error: see the INSTALL doc for more info" >&2;} fi CFLAGS="$savedcflags" V_CCOPT="-Aa $V_CCOPT" - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _HPUX_SOURCE 1 _ACEOF ;; + osf*) + { echo "$as_me:$LINENO: checking for ansi mode in DEC compiler ($CC -std1)" >&5 +echo $ECHO_N "checking for ansi mode in DEC compiler ($CC -std1)... $ECHO_C" >&6; } + savedcflags="$CFLAGS" + CFLAGS="-std1" + if test "${ac_cv_lbl_cc_osf1_cc_std1+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +int +main () +{ +int frob(int, char *) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_lbl_cc_osf1_cc_std1=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lbl_cc_osf1_cc_std1=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_osf1_cc_std1" >&5 +echo "${ECHO_T}$ac_cv_lbl_cc_osf1_cc_std1" >&6; } + if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then + { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5 +echo "$as_me: error: see the INSTALL doc for more info" >&2;} + { (exit 1); exit 1; }; } + fi + CFLAGS="$savedcflags" + V_CCOPT="-std1 $V_CCOPT" + ;; + *) { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5 echo "$as_me: error: see the INSTALL doc for more info" >&2;} @@ -2977,7 +3051,11 @@ echo "$as_me: error: see the INSTALL doc for more info" >&2;} ;; osf*) - V_CCOPT="$V_CCOPT -std1 -O" + # + # Presumed to be DEC OSF/1, Digital UNIX, or + # Tru64 UNIX. + # + V_CCOPT="$V_CCOPT -O" ;; ultrix*) @@ -3033,7 +3111,8 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_const_proto" >&5 echo "${ECHO_T}$ac_cv_lbl_cc_const_proto" >&6; } if test $ac_cv_lbl_cc_const_proto = no ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define const _ACEOF @@ -3044,6 +3123,8 @@ _ACEOF { echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6; } + save_CFLAGS="$CFLAGS" + CFLAGS="$V_CCOPT" if test "${ac_cv_lbl_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3115,6 +3196,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi + CFLAGS="$save_CFLAGS" if test ! -z "$ac_cv_lbl_inline" ; then { echo "$as_me:$LINENO: result: $ac_cv_lbl_inline" >&5 echo "${ECHO_T}$ac_cv_lbl_inline" >&6; } @@ -3199,6 +3281,72 @@ fi { echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5 echo "${ECHO_T}$ac_cv___attribute__" >&6; } +if test "$ac_cv___attribute__" = "yes"; then + +{ echo "$as_me:$LINENO: checking whether __attribute__((format)) can be applied to function pointers" >&5 +echo $ECHO_N "checking whether __attribute__((format)) can be applied to function pointers... $ECHO_C" >&6; } +if test "${ac_cv___attribute___format_function_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv___attribute___format_function_pointer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + +cat >>confdefs.h <<\_ACEOF +#define __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS 1 +_ACEOF + +fi +{ echo "$as_me:$LINENO: result: $ac_cv___attribute___format_function_pointer" >&5 +echo "${ECHO_T}$ac_cv___attribute___format_function_pointer" >&6; } + +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3660,7 +3808,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -3681,7 +3829,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -4278,6 +4426,16 @@ esac +# Check whether --with-smi was given. +if test "${with_smi+set}" = set; then + withval=$with_smi; +else + with_smi=yes +fi + + +if test "x$with_smi" != "xno" ; then + for ac_header in smi.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -4575,6 +4733,7 @@ fi fi +fi { echo "$as_me:$LINENO: checking whether to enable the possibly-buggy SMB printer" >&5 echo $ECHO_N "checking whether to enable the possibly-buggy SMB printer... $ECHO_C" >&6; } @@ -4629,7 +4788,7 @@ fi { echo "$as_me:$LINENO: checking whether to chroot" >&5 echo $ECHO_N "checking whether to chroot... $ECHO_C" >&6; } -if test ! -z "$with_chroot" ; then +if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then cat >>confdefs.h <<_ACEOF #define WITH_CHROOT "$withval" _ACEOF @@ -4757,7 +4916,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6type=$i; CFLAGS="-DINET6 $CFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -4780,7 +4939,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6trylibc=yes; CFLAGS="-DINET6 $CFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -4800,7 +4959,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6type=$i; CFLAGS="-DINET6 $CFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; linux-libinet6) @@ -4831,7 +4990,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6libdir=/usr/local/v6/lib; CFLAGS="-DINET6 $CFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -4853,7 +5012,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6libdir=/usr/local/v6/lib; CFLAGS="-I/usr/local/v6/include $CFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -4875,7 +5034,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6libdir=/usr/local/v6/lib; CFLAGS="-DINET6 $CFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -5173,8 +5332,7 @@ echo "${ECHO_T}buggy" >&6; } fi - -for ac_func in getaddrinfo getnameinfo +for ac_func in getnameinfo do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -5297,7 +5455,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no fi -rm -f conftest* +rm -f -r conftest* fi { echo "$as_me:$LINENO: result: $td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&5 @@ -7336,7 +7494,6 @@ _ACEOF - { echo "$as_me:$LINENO: checking for addrinfo" >&5 echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; } if test "${ac_cv_addrinfo+set}" = set; then @@ -7427,7 +7584,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_maxserv=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -7467,7 +7624,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_namereqd=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -8331,12 +8488,14 @@ _ACEOF if test "$ac_cv_type_signal" = void ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define RETSIGVAL _ACEOF else - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define RETSIGVAL (0) _ACEOF @@ -8344,7 +8503,8 @@ _ACEOF case "$host_os" in irix*) - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _BSD_SIGNALS 1 _ACEOF @@ -9285,9 +9445,10 @@ echo $ECHO_N "checking for local pcap library... $ECHO_C" >&6; } libpcap=FAIL lastdir=FAIL places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ - egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'` + egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'` for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do - basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'` + basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \ + sed -e 's/-PRE-GIT$//' ` if test $lastdir = $basedir ; then continue; fi @@ -9300,7 +9461,62 @@ echo $ECHO_N "checking for local pcap library... $ECHO_C" >&6; } if test $libpcap = FAIL ; then { echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6; } - { echo "$as_me:$LINENO: checking for main in -lpcap" >&5 + + # + # Look for pcap-config. + # + # Extract the first word of "pcap-config", so it can be a program name with args. +set dummy pcap-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PCAP_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PCAP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PCAP_CONFIG="$PCAP_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG +if test -n "$PCAP_CONFIG"; then + { echo "$as_me:$LINENO: result: $PCAP_CONFIG" >&5 +echo "${ECHO_T}$PCAP_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test -n "$PCAP_CONFIG" ; then + # + # Found - use it to get the include flags for + # libpcap and the flags to link with libpcap. + # + V_INCLS="`\"$PCAP_CONFIG\" --cflags` $V_INCLS" + libpcap="`\"$PCAP_CONFIG\" --libs`" + else + # + # Not found; look for pcap. + # + { echo "$as_me:$LINENO: checking for main in -lpcap" >&5 echo $ECHO_N "checking for main in -lpcap... $ECHO_C" >&6; } if test "${ac_cv_lib_pcap_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9359,28 +9575,29 @@ if test $ac_cv_lib_pcap_main = yes; then libpcap="-lpcap" fi - if test $libpcap = FAIL ; then + if test $libpcap = FAIL ; then { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5 echo "$as_me: error: see the INSTALL doc for more info" >&2;} { (exit 1); exit 1; }; } - fi - { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 + fi + { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; } - if test \( ! -r /usr/local/include/pcap.h \) -a \ + 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" + 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 - fi - if test -z "$d" ; then - { echo "$as_me:$LINENO: result: not found" >&5 + if test -z "$d" ; then + { echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6; } - else - V_INCLS="-I$d $V_INCLS" - { echo "$as_me:$LINENO: result: found -- -I$d added" >&5 + else + V_INCLS="-I$d $V_INCLS" + { echo "$as_me:$LINENO: result: found -- -I$d added" >&5 echo "${ECHO_T}found -- -I$d added" >&6; } + fi fi else V_PCAPDEP=$libpcap @@ -9397,11 +9614,72 @@ echo "$as_me: error: cannot find pcap.h" >&2;} fi { echo "$as_me:$LINENO: result: $libpcap" >&5 echo "${ECHO_T}$libpcap" >&6; } + # Extract the first word of "pcap-config", so it can be a program name with args. +set dummy pcap-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PCAP_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PCAP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $d +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG +if test -n "$PCAP_CONFIG"; then + { echo "$as_me:$LINENO: result: $PCAP_CONFIG" >&5 +echo "${ECHO_T}$PCAP_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 + # + libpcap="$libpcap `\"$PCAP_CONFIG\" --additional-libs --static`" + fi fi LIBS="$libpcap $LIBS" - case "$host_os" in + 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*) + 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" { echo "$as_me:$LINENO: checking for $pseexe" >&5 echo $ECHO_N "checking for $pseexe... $ECHO_C" >&6; } @@ -9410,15 +9688,17 @@ echo $ECHO_N "checking for $pseexe... $ECHO_C" >&6; } echo "${ECHO_T}yes" >&6; } LIBS="$LIBS -I:$pseexe" fi + # - # We need "-lodm" and "-lcfg", as libpcap requires them on - # AIX, and we just build a static libpcap.a and thus can't - # arrange that when you link with libpcap you automatically - # link with those libraries. + # 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 + esac + fi { echo "$as_me:$LINENO: checking for pcap_list_datalinks" >&5 echo $ECHO_N "checking for pcap_list_datalinks... $ECHO_C" >&6; } @@ -11445,6 +11725,12 @@ V_GROUP=0 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then V_GROUP=wheel fi +# +# Assume V7/BSD convention for man pages (file formats in section 5, +# miscellaneous info in section 7). +# +MAN_FILE_FORMATS=5 +MAN_MISC_INFO=7 case "$host_os" in aix*) @@ -11454,16 +11740,42 @@ _ACEOF ;; +hpux*) + # + # Use System V conventions for man pages. + # + MAN_FILE_FORMATS=4 + MAN_MISC_INFO=5 + ;; + irix*) V_GROUP=sys + + # + # Use System V conventions for man pages. + # + MAN_FILE_FORMATS=4 + MAN_MISC_INFO=5 ;; osf*) V_GROUP=system + + # + # Use System V conventions for man pages. + # + MAN_FILE_FORMATS=4 + MAN_MISC_INFO=5 ;; solaris*) V_GROUP=sys + + # + # Use System V conventions for man pages. + # + MAN_FILE_FORMATS=4 + MAN_MISC_INFO=5 ;; esac @@ -11617,6 +11929,146 @@ fi done + +for ac_header in pcap/usb.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + CPPFLAGS="$savedcppflags" @@ -11772,6 +12224,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +#ifdef HAVE_SYS_BITYPES_H +#include <sys/bitypes.h> +#endif + typedef int8_t ac__type_new_; int main () @@ -11951,6 +12407,10 @@ cat >>confdefs.h <<\_ACEOF #define int16_t short _ACEOF + $ac_includes_default +#ifdef HAVE_SYS_BITYPES_H +#include <sys/bitypes.h> +#endif fi { echo "$as_me:$LINENO: checking for u_int16_t" >&5 @@ -12032,6 +12492,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +#ifdef HAVE_SYS_BITYPES_H +#include <sys/bitypes.h> +#endif + typedef int32_t ac__type_new_; int main () @@ -12162,6 +12626,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +#ifdef HAVE_SYS_BITYPES_H +#include <sys/bitypes.h> +#endif + typedef int64_t ac__type_new_; int main () @@ -13023,7 +13491,8 @@ rm -f os-proto.h name="lbl/os-$os.h" if test -f $name ; then ln -s $name os-proto.h - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_OS_PROTO_H 1 _ACEOF @@ -13033,8 +13502,8 @@ echo "$as_me: WARNING: can't find $name" >&2;} fi fi -{ echo "$as_me:$LINENO: checking if sockaddr struct has sa_len member" >&5 -echo $ECHO_N "checking if sockaddr struct has sa_len member... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking if sockaddr struct has the sa_len member" >&5 +echo $ECHO_N "checking if sockaddr struct has the sa_len member... $ECHO_C" >&6; } if test "${ac_cv_lbl_sockaddr_has_sa_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13086,7 +13555,8 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_lbl_sockaddr_has_sa_len" >&5 echo "${ECHO_T}$ac_cv_lbl_sockaddr_has_sa_len" >&6; } if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 _ACEOF @@ -13174,7 +13644,7 @@ EOF ac_cv_lbl_unaligned_fail=no fi fi - rm -f conftest* core core.conftest + rm -f -r conftest* core core.conftest ;; esac fi @@ -13182,7 +13652,8 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_lbl_unaligned_fail" >&5 echo "${ECHO_T}$ac_cv_lbl_unaligned_fail" >&6; } if test $ac_cv_lbl_unaligned_fail = yes ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define LBL_ALIGN 1 _ACEOF @@ -13302,6 +13773,16 @@ echo $ECHO_N "checking where SSLeay is located... $ECHO_C" >&6; } for dir in $dirs; do # + # Find the last component of $libdir; it's not necessarily + # "lib" - it might be "lib64" on, for example, x86-64 + # Linux systems. + # + # We assume the directory in which we're looking for + # libcrypto has a subdirectory with that as its name. + # + tmplib=`echo "$libdir" | sed 's,.*/,,'` + + # # XXX - is there a better way to check if a given library is # in a given directory than checking each of the possible # shared library suffixes? @@ -13311,10 +13792,10 @@ echo $ECHO_N "checking where SSLeay is located... $ECHO_C" >&6; } # # Or should we just look for "libcrypto.*"? # - if test -d "$dir/lib" -a \( -f "$dir/lib/libcrypto.a" -o \ - -f "$dir/lib/libcrypto.so" -o \ - -f "$dir/lib/libcrypto.sl" -o \ - -f "$dir/lib/libcrypto.dylib" \); then + if test -d "$dir/$tmplib" -a \( -f "$dir/$tmplib/libcrypto.a" -o \ + -f "$dir/$tmplib/libcrypto.so" -o \ + -f "$dir/$tmplib/libcrypto.sl" -o \ + -f "$dir/$tmplib/libcrypto.dylib" \); then ac_cv_ssleay_path="$dir" fi @@ -13342,6 +13823,16 @@ echo "${ECHO_T}$ac_cv_ssleay_path" >&6; } echo $ECHO_N "checking for SSLeay in $crypto_dir... $ECHO_C" >&6; } # + # Find the last component of $libdir; it's not necessarily + # "lib" - it might be "lib64" on, for example, x86-64 + # Linux systems. + # + # We assume the directory in which we're looking for + # libcrypto has a subdirectory with that as its name. + # + tmplib=`echo "$libdir" | sed 's,.*/,,'` + + # # XXX - is there a better way to check if a given library is # in a given directory than checking each of the possible # shared library suffixes? @@ -13351,10 +13842,10 @@ echo $ECHO_N "checking for SSLeay in $crypto_dir... $ECHO_C" >&6; } # # Or should we just look for "libcrypto.*"? # - if test -d "$crypto_dir/lib" -a \( -f "$crypto_dir/lib/libcrypto.a" -o \ - -f "$crypto_dir/lib/libcrypto.so" -o \ - -f "$crypto_dir/lib/libcrypto.sl" -o \ - -f "$crypto_dir/lib/libcrypto.dylib" \); then + if test -d "$crypto_dir/$tmplib" -a \( -f "$crypto_dir/$tmplib/libcrypto.a" -o \ + -f "$crypto_dir/$tmplib/libcrypto.so" -o \ + -f "$crypto_dir/$tmplib/libcrypto.sl" -o \ + -f "$crypto_dir/$tmplib/libcrypto.dylib" \); then ac_cv_ssleay_path="$crypto_dir" fi @@ -13372,7 +13863,9 @@ echo "${ECHO_T}found" >&6; } fi if test "$ac_cv_ssleay_path" != no; then V_INCLS="$V_INCLS $incdir" - LDFLAGS="-L$dir/lib $LDFLAGS" + if test "$dir" != "/usr"; then + LDFLAGS="-L$dir/lib $LDFLAGS" + fi if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then LIBS="$LIBS -lRSAglue" fi @@ -13618,6 +14111,8 @@ fi + + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -13704,7 +14199,7 @@ ac_config_headers="$ac_config_headers config.h" ac_config_commands="$ac_config_commands default-1" -ac_config_files="$ac_config_files Makefile" +ac_config_files="$ac_config_files Makefile tcpdump.1" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -14271,6 +14766,7 @@ do "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tcpdump.1") CONFIG_FILES="$CONFIG_FILES tcpdump.1" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -14390,6 +14886,7 @@ CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LIBOBJS!$LIBOBJS$ac_delim +PCAP_CONFIG!$PCAP_CONFIG$ac_delim RANLIB!$RANLIB$ac_delim V_CCOPT!$V_CCOPT$ac_delim V_DEFS!$V_DEFS$ac_delim @@ -14397,13 +14894,15 @@ V_GROUP!$V_GROUP$ac_delim V_INCLS!$V_INCLS$ac_delim V_PCAPDEP!$V_PCAPDEP$ac_delim LOCALSRC!$LOCALSRC$ac_delim +MAN_FILE_FORMATS!$MAN_FILE_FORMATS$ac_delim +MAN_MISC_INFO!$MAN_MISC_INFO$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 |