summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libpcap/configure.in')
-rwxr-xr-xcontrib/libpcap/configure.in57
1 files changed, 45 insertions, 12 deletions
diff --git a/contrib/libpcap/configure.in b/contrib/libpcap/configure.in
index 618c515..dd9fbb8 100755
--- a/contrib/libpcap/configure.in
+++ b/contrib/libpcap/configure.in
@@ -1,6 +1,6 @@
-dnl @(#) $Header: configure.in,v 1.58 96/11/30 20:05:44 leres Exp $ (LBL)
+dnl @(#) $Header: configure.in,v 1.67 97/07/27 22:16:17 leres Exp $ (LBL)
dnl
-dnl Copyright (c) 1994, 1995, 1996
+dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
dnl
dnl Process this file with autoconf to produce a configure script.
@@ -30,8 +30,11 @@ dnl better way of testing since the device might be protected. So we
dnl check in our normal order using -r and then check the for the /dev
dnl guys again using -c.
dnl
+AC_ARG_WITH(pcap, [ --with-pcap=TYPE use packet capture TYPE])
AC_MSG_CHECKING(packet capture type)
-if test -r /dev/bpf0 ; then
+if test ! -z "$with_pcap" ; then
+ V_PCAP="$withval"
+elif test -r /dev/bpf0 ; then
V_PCAP=bpf
elif test -r /usr/include/net/pfilt.h ; then
V_PCAP=pf
@@ -60,11 +63,6 @@ AC_MSG_RESULT($V_PCAP)
case "$V_PCAP" in
-null)
- AC_MSG_WARN(cannot determine packet capture interface)
- AC_MSG_WARN((see INSTALL for more info))
- ;;
-
dlpi)
AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
AC_MSG_CHECKING(for /dev/dlpi device)
@@ -83,6 +81,24 @@ dlpi)
fi
fi
;;
+
+linux)
+ AC_CHECK_HEADERS(net/if_arp.h)
+ AC_MSG_CHECKING(Linux kernel version)
+ AC_CACHE_VAL(ac_cv_linux_vers,
+ ac_cv_linux_vers=`uname -r 2>&1 | \
+ sed -n -e '$s/.* //' -e '$s/\..*//p'`)
+ AC_MSG_RESULT($ac_cv_linux_vers)
+ if test $ac_cv_linux_vers -lt 2 ; then
+ AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more info)
+ fi
+ ;;
+
+null)
+ AC_MSG_WARN(cannot determine packet capture interface)
+ AC_MSG_WARN((see the INSTALL doc for more info))
+ ;;
+
esac
AC_LBL_LEX_AND_YACC(V_LEX, V_YACC, pcap_)
@@ -98,6 +114,17 @@ hpux9*)
AC_DEFINE(HAVE_HPUX9)
;;
+hpux10.0*)
+ ;;
+
+hpux10.1*)
+ ;;
+
+hpux*)
+ dnl HPUX 10.20 and above is similar to HPUX 9...
+ AC_DEFINE(HAVE_HPUX10_20)
+ ;;
+
sinix*)
AC_MSG_CHECKING(if SINIX compiler defines sinix)
AC_CACHE_VAL(ac_cv_cc_sinix_defined,
@@ -129,15 +156,21 @@ AC_LBL_SOCKADDR_SA_LEN
AC_LBL_UNALIGNED_ACCESS
-if test -r lbl/gnuc.h ; then
+if test "${srcdir}" = "." ; then
+ srcdirprefix=""
+else
+ srcdirprefix="./"
+fi
+
+if test -r ${srcdirprefix}lbl/gnuc.h ; then
rm -f gnuc.h
- ln -s lbl/gnuc.h gnuc.h
+ ln -s ${srcdirprefix}lbl/gnuc.h gnuc.h
fi
rm -f bpf_filter.c
-ln -s bpf/net/bpf_filter.c bpf_filter.c
+ln -s ${srcdirprefix}bpf/net/bpf_filter.c bpf_filter.c
rm -f net
-ln -s bpf/net net
+ln -s ${srcdirprefix}bpf/net net
AC_SUBST(V_CCOPT)
AC_SUBST(V_INCLS)
OpenPOWER on IntegriCloud