1 dnl @(#) $Header: /usr/local/cvs/linux/tools/build/e100boot/libpcap-0.4/configure.in,v 1.1 1999/08/26 10:05:21 johana Exp $ (LBL)
3 dnl Copyright (c) 1994, 1995, 1996, 1997
4 dnl The Regents of the University of California. All rights reserved.
6 dnl Process this file with autoconf to produce a configure script.
15 if test -z "$PWD" ; then
19 AC_LBL_C_INIT(V_CCOPT, V_INCLS)
21 AC_CHECK_HEADERS(malloc.h sys/ioccom.h sys/sockio.h)
25 AC_CHECK_FUNCS(ether_hostton strerror)
28 dnl Not all versions of test support -c (character special) but it's a
29 dnl better way of testing since the device might be protected. So we
30 dnl check in our normal order using -r and then check the for the /dev
31 dnl guys again using -c.
33 AC_ARG_WITH(pcap, [ --with-pcap=TYPE use packet capture TYPE])
34 AC_MSG_CHECKING(packet capture type)
35 if test ! -z "$with_pcap" ; then
37 elif test -r /dev/bpf0 ; then
39 elif test -r /usr/include/net/pfilt.h ; then
41 elif test -r /dev/enet ; then
43 elif test -r /dev/nit ; then
45 elif test -r /usr/include/sys/net/nit.h ; then
47 elif test -r /usr/include/net/raw.h ; then
49 elif test -r /usr/include/sys/dlpi.h ; then
51 elif test -r /usr/include/linux/socket.h ; then
53 elif test -c /dev/bpf0 ; then # check again in case not readable
55 elif test -c /dev/enet ; then # check again in case not readable
57 elif test -c /dev/nit ; then # check again in case not readable
62 AC_MSG_RESULT($V_PCAP)
67 AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
68 AC_MSG_CHECKING(for /dev/dlpi device)
69 if test -c /dev/dlpi ; then
71 AC_DEFINE(HAVE_DEV_DLPI)
75 AC_MSG_CHECKING(for $dir directory)
76 if test -d $dir ; then
78 AC_DEFINE_UNQUOTED(PCAP_DEV_PREFIX, "$dir")
86 AC_CHECK_HEADERS(net/if_arp.h)
87 AC_MSG_CHECKING(Linux kernel version)
88 AC_CACHE_VAL(ac_cv_linux_vers,
89 ac_cv_linux_vers=`uname -r 2>&1 | \
90 sed -n -e '$s/.* //' -e '$s/\..*//p'`)
91 AC_MSG_RESULT($ac_cv_linux_vers)
92 if test $ac_cv_linux_vers -lt 2 ; then
93 AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more info)
98 AC_MSG_WARN(cannot determine packet capture interface)
99 AC_MSG_WARN((see the INSTALL doc for more info))
104 AC_LBL_LEX_AND_YACC(V_LEX, V_YACC, pcap_)
109 dnl Workaround to enable certain features
114 AC_DEFINE(HAVE_HPUX9)
124 dnl HPUX 10.20 and above is similar to HPUX 9...
125 AC_DEFINE(HAVE_HPUX10_20)
129 AC_MSG_CHECKING(if SINIX compiler defines sinix)
130 AC_CACHE_VAL(ac_cv_cc_sinix_defined,
134 ac_cv_cc_sinix_defined=yes,
135 ac_cv_cc_sinix_defined=no))
136 AC_MSG_RESULT($ac_cv_cc_sinix_defined)
137 if test $ac_cv_cc_sinix_defined = no ; then
143 AC_DEFINE(HAVE_SOLARIS)
147 V_INCLS="$V_INCLS -Ilinux-include"
151 AC_CHECK_PROGS(V_RANLIB, ranlib, @true)
153 AC_LBL_DEVEL(V_CCOPT)
155 AC_LBL_SOCKADDR_SA_LEN
157 AC_LBL_UNALIGNED_ACCESS
159 if test "${srcdir}" = "." ; then
165 if test -r ${srcdirprefix}lbl/gnuc.h ; then
167 ln -s ${srcdirprefix}lbl/gnuc.h gnuc.h
171 ln -s ${srcdirprefix}bpf/net/bpf_filter.c bpf_filter.c
173 ln -s ${srcdirprefix}bpf/net net
186 if test -f .devel ; then