summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/configure
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libpcap/configure')
-rwxr-xr-xcontrib/libpcap/configure1500
1 files changed, 1408 insertions, 92 deletions
diff --git a/contrib/libpcap/configure b/contrib/libpcap/configure
index a0abec5e..ba01786 100755
--- a/contrib/libpcap/configure
+++ b/contrib/libpcap/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.100.2.4 .
+# From configure.in Revision: 1.120 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os SHLICC2 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LIBOBJS V_LEX V_YACC RANLIB ac_ct_RANLIB V_CCOPT V_DEFS V_INCLS V_LIBS V_PCAP V_FINDALLDEVS V_RANLIB SSRC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os SHLICC2 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LIBOBJS V_LEX V_YACC RANLIB ac_ct_RANLIB V_CCOPT V_DEFS V_INCLS V_LIBS V_PCAP V_FINDALLDEVS V_RANLIB SSRC DYEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -855,7 +855,9 @@ 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 DAG support (located in directory DIR, if supplied). 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
--without-flex don't use flex
--without-bison don't use bison
@@ -2534,6 +2536,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
@@ -2599,6 +2603,7 @@ rm -f 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
@@ -3331,8 +3336,7 @@ done
-
-for ac_header in sys/ioccom.h sys/sockio.h ifaddrs.h limits.h
+for ac_header in sys/ioccom.h sys/sockio.h limits.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -3526,6 +3530,75 @@ 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.
+ #
+ { echo "$as_me:$LINENO: Rechecking with some additional includes" >&5
+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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+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>
+struct mbuf;
+struct rtentry;
+#include <net/if.h>
+
+#include <$ac_header>
+_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
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+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
+
+fi
if test "$GCC" = yes ; then
echo "$as_me:$LINENO: checking for ANSI ioctl definitions" >&5
@@ -3596,8 +3669,7 @@ echo "$as_me: error: see the INSTALL for more info" >&2;}
-
-for ac_func in ether_hostton strerror strlcpy
+for ac_func in strerror strlcpy
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -3773,6 +3845,873 @@ if test $needsnprintf = yes; then
LIBOBJS="$LIBOBJS snprintf.$ac_objext"
fi
+#
+# Do this before checking for ether_hostton(), as it's a
+# "gethostbyname() -ish function".
+#
+
+ # Most operating systems have gethostbyname() in the default searched
+ # libraries (i.e. libc):
+ # Some OSes (eg. Solaris) place it in libnsl
+ # Some strange OSes (SINIX) have it in libsocket:
+ echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
+echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_search_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gethostbyname=no
+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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_search_gethostbyname="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_gethostbyname" = no; then
+ for ac_lib in nsl socket resolv; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ 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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_search_gethostbyname="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
+if test "$ac_cv_search_gethostbyname" != no; then
+ test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
+
+fi
+
+ # Unfortunately libsocket sometimes depends on libnsl and
+ # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
+ if test "$ac_cv_search_gethostbyname" = "no"
+ then
+ echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5
+echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket -lnsl $LIBS"
+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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_lib_socket_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_gethostbyname=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_gethostbyname" >&6
+if test $ac_cv_lib_socket_gethostbyname = yes; then
+ LIBS="-lsocket -lnsl $LIBS"
+fi
+
+ fi
+ echo "$as_me:$LINENO: checking for library containing socket" >&5
+echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
+if test "${ac_cv_search_socket+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_socket=no
+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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socket ();
+int
+main ()
+{
+socket ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_search_socket="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_socket" = no; then
+ for ac_lib in socket; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ 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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socket ();
+int
+main ()
+{
+socket ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_search_socket="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
+echo "${ECHO_T}$ac_cv_search_socket" >&6
+if test "$ac_cv_search_socket" != no; then
+ test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
+
+else
+ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket -lnsl $LIBS"
+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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socket ();
+int
+main ()
+{
+socket ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_lib_socket_socket=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_socket=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
+if test $ac_cv_lib_socket_socket = yes; then
+ LIBS="-lsocket -lnsl $LIBS"
+fi
+
+fi
+
+ # DLPI needs putmsg under HPUX so test for -lstr while we're at it
+ echo "$as_me:$LINENO: checking for library containing putmsg" >&5
+echo $ECHO_N "checking for library containing putmsg... $ECHO_C" >&6
+if test "${ac_cv_search_putmsg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_putmsg=no
+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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char putmsg ();
+int
+main ()
+{
+putmsg ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_search_putmsg="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_putmsg" = no; then
+ for ac_lib in str; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ 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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char putmsg ();
+int
+main ()
+{
+putmsg ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_search_putmsg="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_putmsg" >&5
+echo "${ECHO_T}$ac_cv_search_putmsg" >&6
+if test "$ac_cv_search_putmsg" != no; then
+ test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS"
+
+fi
+
+
+
+#
+# You are in a twisty little maze of UN*Xes, all different.
+# Some might not have ether_hostton().
+# 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.)
+#
+# Before you is a C compiler.
+#
+
+for ac_func in ether_hostton
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+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. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "$ac_cv_func_ether_hostton" = yes; then
+ #
+ # OK, we have ether_hostton(). Do we have <netinet/if_ether.h>?
+ #
+ if test "$ac_cv_header_netinet_if_ether_h" = yes; then
+ #
+ # Yes. Does it declare ether_hostton()?
+ #
+ echo "$as_me:$LINENO: checking whether ether_hostton is declared" >&5
+echo $ECHO_N "checking whether ether_hostton is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ether_hostton+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>
+struct mbuf;
+struct rtentry;
+#include <net/if.h>
+#include <netinet/if_ether.h>
+
+
+int
+main ()
+{
+#ifndef ether_hostton
+ char *p = (char *) ether_hostton;
+#endif
+
+ ;
+ 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_have_decl_ether_hostton=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ether_hostton=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+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?
+ #
+ if test "$ac_cv_have_decl_ether_hostton" != yes; then
+ #
+ # No, how about <netinet/ether.h>, as on Linux?
+ #
+
+for ac_header in netinet/ether.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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
+#line $LINENO "configure"
+/* 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 { (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_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f 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
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_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 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 preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ 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: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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
+
+ if test "$ac_cv_header_netinet_ether_h" = yes; then
+ #
+ # We have it - does it declare ether_hostton()?
+ # Unset ac_cv_have_decl_ether_hostton so we don't
+ # treat the previous failure as a cached value and
+ # suppress the next test.
+ #
+ unset ac_cv_have_decl_ether_hostton
+ echo "$as_me:$LINENO: checking whether ether_hostton is declared" >&5
+echo $ECHO_N "checking whether ether_hostton is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ether_hostton+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 <netinet/ether.h>
+
+
+int
+main ()
+{
+#ifndef ether_hostton
+ char *p = (char *) ether_hostton;
+#endif
+
+ ;
+ 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_have_decl_ether_hostton=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ether_hostton=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+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_ETHER_H_DECLARES_ETHER_HOSTTON
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ETHER_HOSTTON 0
+_ACEOF
+
+
+fi
+
+
+ fi
+ fi
+fi
+
echo "$as_me:$LINENO: checking if --disable-protochain option is specified" >&5
echo $ECHO_N "checking if --disable-protochain option is specified... $ECHO_C" >&6
# Check whether --enable-protochain or --disable-protochain was given.
@@ -3846,7 +4785,15 @@ fi
echo "$as_me:$LINENO: result: $V_PCAP" >&5
echo "${ECHO_T}$V_PCAP" >&6
-echo "$as_me:$LINENO: checking for getifaddrs" >&5
+if test "$V_PCAP" = null
+then
+ #
+ # We can't capture, so we can't open any capture
+ # devices, so we won't return any interfaces.
+ #
+ V_FINDALLDEVS=null
+else
+ echo "$as_me:$LINENO: checking for getifaddrs" >&5
echo $ECHO_N "checking for getifaddrs... $ECHO_C" >&6
if test "${ac_cv_func_getifaddrs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3920,30 +4867,187 @@ echo "$as_me:$LINENO: result: $ac_cv_func_getifaddrs" >&5
echo "${ECHO_T}$ac_cv_func_getifaddrs" >&6
if test $ac_cv_func_getifaddrs = yes; then
- #
- # We have "getifaddrs()", so we use that to get the list
- #
- V_FINDALLDEVS=getad
+ #
+ # We have "getifaddrs()"; make sure we have <ifaddrs.h>
+ # as well, just in case some platform is really weird.
+ #
+ if test "${ac_cv_header_ifaddrs_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for ifaddrs.h" >&5
+echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6
+if test "${ac_cv_header_ifaddrs_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5
+echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking ifaddrs.h usability" >&5
+echo $ECHO_N "checking ifaddrs.h usability... $ECHO_C" >&6
+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. */
+$ac_includes_default
+#include <ifaddrs.h>
+_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_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f 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 ifaddrs.h presence" >&5
+echo $ECHO_N "checking ifaddrs.h presence... $ECHO_C" >&6
+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 <ifaddrs.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_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 in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: ifaddrs.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ifaddrs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: ifaddrs.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ifaddrs.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ifaddrs.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ifaddrs.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for ifaddrs.h" >&5
+echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6
+if test "${ac_cv_header_ifaddrs_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_ifaddrs_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5
+echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6
+
+fi
+if test $ac_cv_header_ifaddrs_h = yes; then
+
+ #
+ # We have the header, so we use "getifaddrs()" to
+ # get the list of interfaces.
+ #
+ V_FINDALLDEVS=getad
else
- #
- # Well, we don't have "getifaddrs()", so we have to use some
- # other mechanism; determine what that mechanism is.
- #
- # The first thing we use is the type of capture mechanism,
- # which is somewhat of a proxy for the OS we're using.
- #
- case "$V_PCAP" in
+ #
+ # We don't have the header - give up.
+ # XXX - we could also fall back on some other
+ # mechanism, but, for now, this'll catch this
+ # problem so that we can at least try to figure
+ # out something to do on systems with "getifaddrs()"
+ # but without "ifaddrs.h", if there is something
+ # we can do on those systems.
+ #
+ { { echo "$as_me:$LINENO: error: Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." >&5
+echo "$as_me: error: Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+
+else
- dlpi)
#
- # This might be Solaris 8 or later, with SIOCGLIFCONF,
- # or it might be some other OS, with just SIOCGIFCONF.
+ # Well, we don't have "getifaddrs()", so we have to use
+ # some other mechanism; determine what that mechanism is.
+ #
+ # The first thing we use is the type of capture mechanism,
+ # which is somewhat of a proxy for the OS we're using.
#
- echo "$as_me:$LINENO: checking whether we have SIOCGLIFCONF" >&5
+ case "$V_PCAP" in
+
+ dlpi)
+ #
+ # This might be Solaris 8 or later, with
+ # SIOCGLIFCONF, or it might be some other OS
+ # or some older version of Solaris, with
+ # just SIOCGIFCONF.
+ #
+ echo "$as_me:$LINENO: checking whether we have SIOCGLIFCONF" >&5
echo $ECHO_N "checking whether we have SIOCGLIFCONF... $ECHO_C" >&6
- if test "${ac_cv_lbl_have_siocglifconf+set}" = set; then
+ if test "${ac_cv_lbl_have_siocglifconf+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -3954,10 +5058,10 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/param.h>
- #include <sys/file.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <sys/sockio.h>
+ #include <sys/file.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+ #include <sys/sockio.h>
int
main ()
{
@@ -3988,35 +5092,28 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:$LINENO: result: $ac_cv_lbl_have_siocglifconf" >&5
+ echo "$as_me:$LINENO: result: $ac_cv_lbl_have_siocglifconf" >&5
echo "${ECHO_T}$ac_cv_lbl_have_siocglifconf" >&6
- if test $ac_cv_lbl_have_siocglifconf = yes ; then
- V_FINDALLDEVS=glifc
- else
+ if test $ac_cv_lbl_have_siocglifconf = yes ; then
+ V_FINDALLDEVS=glifc
+ else
+ V_FINDALLDEVS=gifc
+ fi
+ ;;
+
+ *)
+ #
+ # Assume we just have SIOCGIFCONF.
+ # (XXX - on at least later Linux kernels, there's
+ # another mechanism, and we should be using that
+ # instead.)
+ #
V_FINDALLDEVS=gifc
- fi
- ;;
-
- null)
- #
- # We can't capture, so we can't open any capture
- # devices, so we won't return any interfaces.
- #
- V_FINDALLDEVS=null
- ;;
-
- *)
- #
- # Assume we just have SIOCGIFCONF.
- # (XXX - on at least later Linux kernels, there's
- # another mechanism, and we should be using that
- # instead.)
- #
- V_FINDALLDEVS=gifc
- ;;
- esac
+ ;;
+ esac
fi
+fi
echo "$as_me:$LINENO: checking if --enable-ipv6 option is specified" >&5
echo $ECHO_N "checking if --enable-ipv6 option is specified... $ECHO_C" >&6
@@ -4362,6 +5459,7 @@ fi
echo "$as_me:$LINENO: result: $ac_cv_lbl_proc_net_dev" >&5
echo "${ECHO_T}$ac_cv_lbl_proc_net_dev" >&6
+# Check for Endace DAG card support.
# Check whether --with-dag or --without-dag was given.
if test "${with_dag+set}" = set; then
@@ -4369,12 +5467,14 @@ if test "${with_dag+set}" = set; then
if test "$withval" = no
then
+ # User doesn't want DAG support.
want_dag=no
elif test "$withval" = yes
then
+ # User wants DAG support but hasn't specified a directory.
want_dag=yes
- dag_root=
else
+ # User wants DAG support and has specified a directory, so use the provided value.
want_dag=yes
dag_root=$withval
fi
@@ -4385,10 +5485,31 @@ else
# Use DAG API if present, otherwise don't
#
want_dag=ifpresent
- dag_root=/root/dag
fi;
-ac_cv_lbl_dag_api=no
+
+
+# Check whether --with-dag-includes or --without-dag-includes was given.
+if test "${with_dag_includes+set}" = set; then
+ withval="$with_dag_includes"
+
+ # User wants DAG support and has specified a header directory, so use the provided value.
+ want_dag=yes
+ dag_include_dir=$withval
+
+fi;
+
+
+# Check whether --with-dag-libraries or --without-dag-libraries was given.
+if test "${with_dag_libraries+set}" = set; then
+ withval="$with_dag_libraries"
+
+ # User wants DAG support and has specified a library directory, so use the provided value.
+ want_dag=yes
+ dag_lib_dir=$withval
+
+fi;
+
case "$V_PCAP" in
linux|bpf|dag)
#
@@ -4404,8 +5525,8 @@ linux|bpf|dag)
# If they expressed no preference, don't include it.
#
if test $want_dag = yes; then
- { { echo "$as_me:$LINENO: error: DAG support only available with 'linux' 'bpf' and 'dag' packet capture types" >&5
-echo "$as_me: error: DAG support only available with 'linux' 'bpf' and 'dag' packet capture types" >&2;}
+ { { echo "$as_me:$LINENO: error: DAG support is only available with 'linux' 'bpf' and 'dag' packet capture types" >&5
+echo "$as_me: error: DAG support is only available with 'linux' 'bpf' and 'dag' packet capture types" >&2;}
{ (exit 1); exit 1; }; }
elif test $want_dag = yes; then
want_dag=no
@@ -4413,63 +5534,240 @@ echo "$as_me: error: DAG support only available with 'linux' 'bpf' and 'dag' pac
;;
esac
-if test "$with_dag" != no; then
- echo "$as_me:$LINENO: checking whether we have DAG API" >&5
-echo $ECHO_N "checking whether we have DAG API... $ECHO_C" >&6
+ac_cv_lbl_dag_api=no
+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 test -z "$dag_root"; then
- dag_root=$srcdir/../dag
+ dag_root=/usr/local
fi
- if test -r "$dag_root/tools" -a -r "$dag_root/include"; then
- dag_tools_dir="$dag_root/tools"
+ if test -z "$dag_include_dir"; then
dag_include_dir="$dag_root/include"
- else
- dag_tools_dir="$dag_root"
- dag_include_dir="$dag_root"
fi
- ac_cv_lbl_dag_api=no
- if test -r "$dag_include_dir/dagapi.h" -a -r "$dag_tools_dir/dagapi.o" -a -r "$dag_tools_dir/dagopts.o"; then
- V_INCLS="$V_INCLS -I $dag_include_dir"
- V_LIBS="$V_LIBS $dag_tools_dir/dagapi.o $dag_tools_dir/dagopts.o"
- if test "$V_PCAP" != dag ; then
- SSRC="pcap-dag.c"
+ if test -z "$dag_lib_dir"; then
+ dag_lib_dir="$dag_root/lib"
+ fi
+
+ if test -z "$dag_tools_dir"; then
+ dag_tools_dir="$dag_root/tools"
fi
+
+ if test -r $dag_include_dir/dagapi.h; then
ac_cv_lbl_dag_api=yes
fi
- if test -r "$dag_root/lib/dagreg.c"; then # DAG 2.5.x
- if test -r "$dag_tools_dir/dagreg.o"; then
- V_LIBS="$V_LIBS $dag_tools_dir/dagreg.o"
- else
+ 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
+
+if test $ac_cv_lbl_dag_api = yes; then
+
+ echo "$as_me:$LINENO: checking dagapi.o" >&5
+echo $ECHO_N "checking dagapi.o... $ECHO_C" >&6
+ dagapi_obj=no
+ if test -r $dag_tools_dir/dagapi.o; then
+
+ # 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.
+ ar x $dag_lib_dir/libdag.a dagapi.o
+ if test -r ./dagapi.o; then
+ dagapi_obj=./dagapi.o
+ 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 "${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
+
+if test $ac_cv_lbl_dag_api = yes; then
+
+ echo "$as_me:$LINENO: checking dagopts.o" >&5
+echo $ECHO_N "checking dagopts.o... $ECHO_C" >&6
+ dagopts_obj=no
+ if test -r $dag_tools_dir/dagopts.o; then
+
+ # 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.
+ ar x $dag_lib_dir/libdag.a dagopts.o
+ if test -r ./dagopts.o; then
+ dagopts_obj=./dagopts.o
fi
- dag_version=
- if test $ac_cv_lbl_dag_api = yes -a -r "$dag_root/VERSION"; then
- dag_version=" (`cat $dag_root/VERSION`)"
fi
- echo "$as_me:$LINENO: result: $ac_cv_lbl_dag_api$dag_version" >&5
-echo "${ECHO_T}$ac_cv_lbl_dag_api$dag_version" >&6
- if test $ac_cv_lbl_dag_api = no; then
- if test "$want_dag" = yes; then
- { { echo "$as_me:$LINENO: error: DAG API not found under directory $dag_root; use --without-dag" >&5
-echo "$as_me: error: DAG API not found under directory $dag_root; use --without-dag" >&2;}
- { (exit 1); exit 1; }; }
+
+ 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 "${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 ($dagopts_obj)" >&5
+echo "${ECHO_T}yes ($dagopts_obj)" >&6
+ fi
+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 $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.
+ ar x $dag_lib_dir/libdag.a dagreg.o
+ if test -r ./dagreg.o; then
+ 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 "${ECHO_T}no (checked $dag_lib_dir $dag_lib_dir/libdag.a)" >&6
+ ac_cv_lbl_dag_api=no
else
+ echo "$as_me:$LINENO: result: yes ($dagreg_obj)" >&5
+echo "${ECHO_T}yes ($dagreg_obj)" >&6
+ fi
+ fi
+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
+ SSRC="pcap-dag.c"
+ 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).
+ saved_ldflags=$LDFLAGS
+ LDFLAGS="-L$dag_lib_dir"
+ echo "$as_me:$LINENO: checking for dag_attach_stream in -ldag" >&5
+echo $ECHO_N "checking for dag_attach_stream in -ldag... $ECHO_C" >&6
+if test "${ac_cv_lib_dag_dag_attach_stream+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldag $LIBS"
+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. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dag_attach_stream ();
+int
+main ()
+{
+dag_attach_stream ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (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_lib_dag_dag_attach_stream=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dag_dag_attach_stream=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dag_dag_attach_stream" >&5
+echo "${ECHO_T}$ac_cv_lib_dag_dag_attach_stream" >&6
+if test $ac_cv_lib_dag_dag_attach_stream = yes; then
+ dag_version="2.5.x"
+else
+ dag_version="2.4.x"
+fi
+
+ LDFLAGS=$saved_ldflags
+
+ # See if we can find a specific version string.
+ echo "$as_me:$LINENO: checking the DAG API version" >&5
+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 "${ECHO_T}$dag_version" >&6
cat >>confdefs.h <<\_ACEOF
#define HAVE_DAG_API 1
_ACEOF
- fi
fi
-if test "$V_PCAP" = dag -a "$ac_cv_lbl_dag_api" = no; then
- { { echo "$as_me:$LINENO: error: Specifying the capture type as 'dag' requires the DAG API to be present; use --with-dag=DIR" >&5
-echo "$as_me: error: Specifying the capture type as 'dag' requires the DAG API to be present; use --with-dag=DIR" >&2;}
+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.
+ { { 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
+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
@@ -4640,6 +5938,7 @@ echo "$as_me: error: Your operating system's lex is insufficient to compile
fi
fi
+DYEXT="so"
case "$host_os" in
aix*)
@@ -4734,6 +6033,11 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
;;
+
+darwin*)
+ DYEXT="dylib"
+ V_CCOPT="$V_CCOPT -fno-common"
+ ;;
esac
if test -n "$ac_tool_prefix"; then
@@ -5121,6 +6425,16 @@ _ACEOF
fi
+#
+# Makefile.in includes rules to generate version.h, so we assume
+# that it will be generated if autoconf is used.
+#
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VERSION_H 1
+_ACEOF
+
+
rm -f net
ln -s ${srcdir}/bpf/net net
@@ -5135,6 +6449,7 @@ ln -s ${srcdir}/bpf/net net
+
# 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:
@@ -5862,6 +7177,7 @@ s,@V_PCAP@,$V_PCAP,;t t
s,@V_FINDALLDEVS@,$V_FINDALLDEVS,;t t
s,@V_RANLIB@,$V_RANLIB,;t t
s,@SSRC@,$SSRC,;t t
+s,@DYEXT@,$DYEXT,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
OpenPOWER on IntegriCloud