diff options
Diffstat (limited to 'contrib/libpcap/configure')
-rwxr-xr-x | contrib/libpcap/configure | 315 |
1 files changed, 234 insertions, 81 deletions
diff --git a/contrib/libpcap/configure b/contrib/libpcap/configure index ba01786..42b8153 100755 --- a/contrib/libpcap/configure +++ b/contrib/libpcap/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.120 . +# From configure.in Revision: 1.120.2.6 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57. # @@ -855,9 +855,10 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-gcc don't use gcc --with-pcap=TYPE use packet capture TYPE - --with-dag[=DIR] include Endace DAG support ("yes", "no" or DIR; default="yes" on BSD and Linux if present) + --with-dag[=DIR] include Endace DAG support ("yes", "no" or DIR; default="yes" on BSD and Linux if present) --with-dag-includes=DIR Endace DAG include directory --with-dag-libraries=DIR Endace DAG library directory + --with-septel[=DIR] include Septel support (located in directory DIR, if supplied). default=yes, on Linux, if present --without-flex don't use flex --without-bison don't use bison @@ -2633,10 +2634,6 @@ cat >>conftest.$ac_ext <<_ACEOF #include <stdlib.h> -int -main () -{ - static void foo(void) __attribute__ ((noreturn)); static void @@ -2645,9 +2642,12 @@ foo(void) exit(1); } - ; - return 0; +int +main(int argc, char **argv) +{ + foo(); } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4416,6 +4416,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> +#include <arpa/inet.h> struct mbuf; struct rtentry; #include <net/if.h> @@ -4458,26 +4459,14 @@ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ether_hostton" >&5 echo "${ECHO_T}$ac_cv_have_decl_ether_hostton" >&6 if test $ac_cv_have_decl_ether_hostton = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ETHER_HOSTTON 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF #define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON _ACEOF -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ETHER_HOSTTON 0 -_ACEOF - - fi - fi # # Did that succeed? @@ -4688,27 +4677,101 @@ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ether_hostton" >&5 echo "${ECHO_T}$ac_cv_have_decl_ether_hostton" >&6 if test $ac_cv_have_decl_ether_hostton = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ETHER_HOSTTON 1 + +cat >>confdefs.h <<\_ACEOF +#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON _ACEOF +fi -cat >>confdefs.h <<\_ACEOF -#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON + fi + fi + # + # Is ether_hostton() declared? + # + if test "$ac_cv_have_decl_ether_hostton" != yes; then + # + # No, we'll have to declare it ourselves. + # Do we have "struct ether_addr"? + # + echo "$as_me:$LINENO: checking for struct ether_addr" >&5 +echo $ECHO_N "checking for struct ether_addr... $ECHO_C" >&6 +if test "${ac_cv_type_struct_ether_addr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#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> + +int +main () +{ +if ((struct ether_addr *) 0) + return 0; +if (sizeof (struct ether_addr)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_struct_ether_addr=yes else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ETHER_HOSTTON 0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_struct_ether_addr=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_struct_ether_addr" >&5 +echo "${ECHO_T}$ac_cv_type_struct_ether_addr" >&6 +if test $ac_cv_type_struct_ether_addr = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_ETHER_ADDR 1 _ACEOF fi - fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_DECL_ETHER_HOSTTON 0 +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DECL_ETHER_HOSTTON 1 +_ACEOF + fi fi @@ -5433,6 +5496,10 @@ dag) V_DEFS="$V_DEFS -DDAG_ONLY" ;; +septel) + V_DEFS="$V_DEFS -DSEPTEL_ONLY" + ;; + null) { echo "$as_me:$LINENO: WARNING: cannot determine packet capture interface" >&5 echo "$as_me: WARNING: cannot determine packet capture interface" >&2;} @@ -5513,8 +5580,8 @@ fi; case "$V_PCAP" in linux|bpf|dag) # - # We support the DAG API on Linux or BSD, or if we're building a - # DAG-only libpcap. + # We support the DAG API if we're on Linux or BSD, or if we're + # building a DAG-only libpcap. # ;; *) @@ -5540,7 +5607,7 @@ if test "$want_dag" != no; then echo "$as_me:$LINENO: checking whether we have DAG API headers" >&5 echo $ECHO_N "checking whether we have DAG API headers... $ECHO_C" >&6 - # If necessary, set default paths for DAG API headers and libraries. + # If necessary, set default paths for DAG API headers and libraries. if test -z "$dag_root"; then dag_root=/usr/local fi @@ -5560,7 +5627,7 @@ echo $ECHO_N "checking whether we have DAG API headers... $ECHO_C" >&6 if test -r $dag_include_dir/dagapi.h; then ac_cv_lbl_dag_api=yes fi - echo "$as_me:$LINENO: result: $ac_cv_lbl_dag_api ($dag_include_dir)" >&5 + echo "$as_me:$LINENO: result: $ac_cv_lbl_dag_api ($dag_include_dir)" >&5 echo "${ECHO_T}$ac_cv_lbl_dag_api ($dag_include_dir)" >&6 fi @@ -5570,32 +5637,27 @@ if test $ac_cv_lbl_dag_api = yes; then echo $ECHO_N "checking dagapi.o... $ECHO_C" >&6 dagapi_obj=no if test -r $dag_tools_dir/dagapi.o; then - - # 2.4.x. + # 2.4.x. dagapi_obj=$dag_tools_dir/dagapi.o - elif test -r $dag_lib_dir/dagapi.o; then - - # 2.5.x. - dagapi_obj=$dag_lib_dir/dagapi.o - - elif test -r $dag_lib_dir/libdag.a; then - - # 2.5.x. + # 2.5.x. + dagapi_obj=$dag_lib_dir/dagapi.o + elif test -r $dag_lib_dir/libdag.a; then + # 2.5.x. ar x $dag_lib_dir/libdag.a dagapi.o if test -r ./dagapi.o; then dagapi_obj=./dagapi.o fi - fi + fi if test $dagapi_obj = no; then - echo "$as_me:$LINENO: result: no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)" >&5 + echo "$as_me:$LINENO: result: no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)" >&5 echo "${ECHO_T}no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)" >&6 ac_cv_lbl_dag_api=no else echo "$as_me:$LINENO: result: yes ($dagapi_obj)" >&5 echo "${ECHO_T}yes ($dagapi_obj)" >&6 - fi + fi fi if test $ac_cv_lbl_dag_api = yes; then @@ -5604,26 +5666,21 @@ if test $ac_cv_lbl_dag_api = yes; then echo $ECHO_N "checking dagopts.o... $ECHO_C" >&6 dagopts_obj=no if test -r $dag_tools_dir/dagopts.o; then - - # 2.4.x. + # 2.4.x. dagopts_obj=$dag_tools_dir/dagopts.o - elif test -r $dag_lib_dir/dagopts.o; then - - # 2.5.x. - dagopts_obj=$dag_lib_dir/dagopts.o - - elif test -r $dag_lib_dir/libdag.a; then - - # 2.5.x. + # 2.5.x. + dagopts_obj=$dag_lib_dir/dagopts.o + elif test -r $dag_lib_dir/libdag.a; then + # 2.5.x. ar x $dag_lib_dir/libdag.a dagopts.o if test -r ./dagopts.o; then dagopts_obj=./dagopts.o - fi + fi fi if test $dagopts_obj = no; then - echo "$as_me:$LINENO: result: no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)" >&5 + echo "$as_me:$LINENO: result: no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)" >&5 echo "${ECHO_T}no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)" >&6 ac_cv_lbl_dag_api=no else @@ -5633,32 +5690,27 @@ echo "${ECHO_T}yes ($dagopts_obj)" >&6 fi if test $ac_cv_lbl_dag_api = yes; then - # Under 2.5.x only we need to add dagreg.o. if test -r $dag_include_dir/dagreg.h; then - - echo "$as_me:$LINENO: checking dagreg.o" >&5 + echo "$as_me:$LINENO: checking dagreg.o" >&5 echo $ECHO_N "checking dagreg.o... $ECHO_C" >&6 - dagreg_obj=no - if test -r $dag_lib_dir/dagreg.o; then - - # Object file is ready and waiting. - dagreg_obj=$dag_lib_dir/dagreg.o - - elif test -r $dag_lib_dir/libdag.a; then - - # Extract from libdag.a. + dagreg_obj=no + if test -r $dag_lib_dir/dagreg.o; then + # Object file is ready and waiting. + dagreg_obj=$dag_lib_dir/dagreg.o + elif test -r $dag_lib_dir/libdag.a; then + # Extract from libdag.a. ar x $dag_lib_dir/libdag.a dagreg.o if test -r ./dagreg.o; then - dagreg_obj=./dagreg.o - fi + dagreg_obj=./dagreg.o + fi fi if test $dagreg_obj = no; then - echo "$as_me:$LINENO: result: no (checked $dag_lib_dir $dag_lib_dir/libdag.a)" >&5 + echo "$as_me:$LINENO: result: no (checked $dag_lib_dir $dag_lib_dir/libdag.a)" >&5 echo "${ECHO_T}no (checked $dag_lib_dir $dag_lib_dir/libdag.a)" >&6 ac_cv_lbl_dag_api=no - else + else echo "$as_me:$LINENO: result: yes ($dagreg_obj)" >&5 echo "${ECHO_T}yes ($dagreg_obj)" >&6 fi @@ -5666,7 +5718,6 @@ echo "${ECHO_T}yes ($dagreg_obj)" >&6 fi if test $ac_cv_lbl_dag_api = yes; then - V_INCLS="$V_INCLS -I$dag_include_dir" V_LIBS="$V_LIBS $dagapi_obj $dagopts_obj $dagreg_obj" if test $V_PCAP != dag ; then @@ -5674,7 +5725,8 @@ if test $ac_cv_lbl_dag_api = yes; then fi # See if we can find a general version string. - # Don't need to save and restore LIBS to prevent -ldag being included if there's a found-action (arg 3). + # Don't need to save and restore LIBS to prevent -ldag being + # included if there's a found-action (arg 3). saved_ldflags=$LDFLAGS LDFLAGS="-L$dag_lib_dir" echo "$as_me:$LINENO: checking for dag_attach_stream in -ldag" >&5 @@ -5745,7 +5797,7 @@ echo $ECHO_N "checking the DAG API version... $ECHO_C" >&6 if test -r "$dag_root/VERSION"; then dag_version="`cat $dag_root/VERSION`" fi - echo "$as_me:$LINENO: result: $dag_version" >&5 + echo "$as_me:$LINENO: result: $dag_version" >&5 echo "${ECHO_T}$dag_version" >&6 cat >>confdefs.h <<\_ACEOF @@ -5756,18 +5808,119 @@ fi if test $ac_cv_lbl_dag_api = no; then if test "$want_dag" = yes; then - # User wanted DAG support but we couldn't find it. + # User wanted DAG support but we couldn't find it. { { echo "$as_me:$LINENO: error: DAG API requested, but not found at $dag_root: use --without-dag" >&5 echo "$as_me: error: DAG API requested, but not found at $dag_root: use --without-dag" >&2;} { (exit 1); exit 1; }; } fi - if test "$V_PCAP" = dag; then - # User requested "dag" capture type but the DAG API wasn't found. - { { echo "$as_me:$LINENO: error: Specifying the capture type as \"dag\" requires the DAG API to be present; use the --with-dag options to specify the location. (Try \"./configure --help\" for more information.)" >&5 + if test "$V_PCAP" = dag; then + # User requested "dag" capture type but the DAG API wasn't + # found. + { { echo "$as_me:$LINENO: error: Specifying the capture type as \"dag\" requires the DAG API to be present; use the --with-dag options to specify the location. (Try \"./configure --help\" for more information.)" >&5 echo "$as_me: error: Specifying the capture type as \"dag\" requires the DAG API to be present; use the --with-dag options to specify the location. (Try \"./configure --help\" for more information.)" >&2;} { (exit 1); exit 1; }; } - fi + fi +fi + + +# Check whether --with-septel or --without-septel was given. +if test "${with_septel+set}" = set; then + withval="$with_septel" + + if test "$withval" = no + then + want_septel=no + elif test "$withval" = yes + then + want_septel=yes + septel_root= + else + want_septel=yes + septel_root=$withval + fi + +else + + # + # Use Septel API if present, otherwise don't + # + want_septel=ifpresent + septel_root=./../septel + +fi; +ac_cv_lbl_septel_api=no +case "$V_PCAP" in +linux|septel) + # + # We support the Septel API if we're on Linux, or if we're building + # a Septel-only libpcap. + # + ;; +*) + # + # If the user explicitly requested Septel, tell them it's not + # supported. + # + # If they expressed no preference, don't include it. + # + if test $want_septel = yes; then + { { echo "$as_me:$LINENO: error: Septel support only available with 'linux' and 'septel' packet capture types" >&5 +echo "$as_me: error: Septel support only available with 'linux' and 'septel' packet capture types" >&2;} + { (exit 1); exit 1; }; } + elif test $want_septel = yes; then + want_septel=no + fi + ;; +esac + +if test "$with_septel" != no; then + echo "$as_me:$LINENO: checking whether we have Septel API" >&5 +echo $ECHO_N "checking whether we have Septel API... $ECHO_C" >&6 + + if test -z "$septel_root"; then + septel_root=$srcdir/../septel + + fi + + septel_tools_dir="$septel_root" + septel_include_dir="$septel_root/INC" + DEF="-DHAVE_SEPTEL_API" + + ac_cv_lbl_septel_api=no + if test -r "$septel_include_dir/msg.h"; then + V_INCLS="$V_INCLS -I$septel_include_dir" + V_DEFS="$V_DEFS $DEF" + V_LIBS="$V_LIBS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o " + + if test "$V_PCAP" != septel ; then + SSRC="pcap-septel.c" + + fi + ac_cv_lbl_septel_api=yes + fi + + echo "$as_me:$LINENO: result: $ac_cv_lbl_septel_api" >&5 +echo "${ECHO_T}$ac_cv_lbl_septel_api" >&6 + if test $ac_cv_lbl_septel_api = no; then + if test "$want_septel" = yes; then + { { echo "$as_me:$LINENO: error: Septel API not found under directory $septel_root; use --without-septel" >&5 +echo "$as_me: error: Septel API not found under directory $septel_root; use --without-septel" >&2;} + { (exit 1); exit 1; }; } + fi + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SEPTEL_API 1 +_ACEOF + + fi +fi + +if test "$V_PCAP" = septel -a "$ac_cv_lbl_septel_api" = no; then + { { echo "$as_me:$LINENO: error: Specifying the capture type as 'septel' requires the Septel API to be present; use --with-septel=DIR" >&5 +echo "$as_me: error: Specifying the capture type as 'septel' requires the Septel API to be present; use --with-septel=DIR" >&2;} + { (exit 1); exit 1; }; } fi @@ -5966,7 +6119,7 @@ hpux10.1*) hpux*) cat >>confdefs.h <<\_ACEOF -#define HAVE_HPUX10_20 1 +#define HAVE_HPUX10_20_OR_LATER 1 _ACEOF ;; |