#! /bin/sh
-# From configure.in Revision: 1.108 .
+# From configure.in Revision: 1.109 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
-
-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
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
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
- #
- # 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
+ 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
+## ------------------------------------ ##
+## ------------------------------------ ##
+_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
+## ------------------------------------ ##
+## ------------------------------------ ##
+_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
+
+ #
+ # 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.
#
- echo "$as_me:$LINENO: checking whether we have SIOCGLIFCONF" >&5
+ # 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
+
+ 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
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 ()
{
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
-dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.108 2004-11-09 18:32:22 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.109 2004-12-16 22:22:20 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_REVISION($Revision: 1.108 $)
+AC_REVISION($Revision: 1.109 $)
AC_PREREQ(2.50)
AC_INIT(pcap.c)
dnl test for it and set "HAVE_SYS_IOCCOM_H" if we have it, otherwise
dnl "AC_LBL_FIXINCLUDES" won't work on some platforms such as Solaris.
dnl
-AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h ifaddrs.h limits.h)
+AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h limits.h)
AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
#include <sys/socket.h>])
AC_MSG_RESULT($V_PCAP)
dnl
-dnl Now figure out how we get a list of interfaces and addresses.
+dnl Now figure out how we get a list of interfaces and addresses,
+dnl if we support capturing. Don't bother if we don't support
+dnl capturing.
dnl
-AC_CHECK_FUNC(getifaddrs,[
+if test "$V_PCAP" = null
+then
#
- # We have "getifaddrs()", so we use that to get the list
+ # We can't capture, so we can't open any capture
+ # devices, so we won't return any interfaces.
#
- V_FINDALLDEVS=getad
-],[
- #
- # 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
-
- dlpi)
- #
- # This might be Solaris 8 or later, with SIOCGLIFCONF,
- # or it might be some other OS, with just SIOCGIFCONF.
+ V_FINDALLDEVS=null
+else
+ AC_CHECK_FUNC(getifaddrs,[
#
- AC_MSG_CHECKING(whether we have SIOCGLIFCONF)
- AC_CACHE_VAL(ac_cv_lbl_have_siocglifconf,
- AC_TRY_COMPILE(
- [#include <sys/param.h>
- #include <sys/file.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <sys/sockio.h>],
- [ioctl(0, SIOCGLIFCONF, (char *)0);],
- ac_cv_lbl_have_siocglifconf=yes,
- ac_cv_lbl_have_siocglifconf=no))
- AC_MSG_RESULT($ac_cv_lbl_have_siocglifconf)
- if test $ac_cv_lbl_have_siocglifconf = yes ; then
- V_FINDALLDEVS=glifc
- else
- V_FINDALLDEVS=gifc
- fi
- ;;
-
- null)
+ # We have "getifaddrs()"; make sure we have <ifaddrs.h>
+ # as well, just in case some platform is really weird.
#
- # We can't capture, so we can't open any capture
- # devices, so we won't return any interfaces.
+ AC_CHECK_HEADER(ifaddrs.h,[
+ #
+ # We have the header, so we use "getifaddrs()" to
+ # get the list of interfaces.
+ #
+ V_FINDALLDEVS=getad
+ ],[
+ #
+ # 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.
+ #
+ AC_MSG_ERROR([Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>.])
+ ])
+ ],[
#
- V_FINDALLDEVS=null
- ;;
-
- *)
+ # Well, we don't have "getifaddrs()", so we have to use
+ # some other mechanism; determine what that mechanism is.
#
- # Assume we just have SIOCGIFCONF.
- # (XXX - on at least later Linux kernels, there's
- # another mechanism, and we should be using that
- # instead.)
+ # The first thing we use is the type of capture mechanism,
+ # which is somewhat of a proxy for the OS we're using.
#
- V_FINDALLDEVS=gifc
- ;;
- esac])
+ 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.
+ #
+ AC_MSG_CHECKING(whether we have SIOCGLIFCONF)
+ AC_CACHE_VAL(ac_cv_lbl_have_siocglifconf,
+ AC_TRY_COMPILE(
+ [#include <sys/param.h>
+ #include <sys/file.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+ #include <sys/sockio.h>],
+ [ioctl(0, SIOCGLIFCONF, (char *)0);],
+ ac_cv_lbl_have_siocglifconf=yes,
+ ac_cv_lbl_have_siocglifconf=no))
+ AC_MSG_RESULT($ac_cv_lbl_have_siocglifconf)
+ 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
+ ;;
+ esac])
+fi
AC_MSG_CHECKING(if --enable-ipv6 option is specified)
AC_ARG_ENABLE(ipv6, [ --enable-ipv6 build IPv6-capable version])