-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.169.2.1 2003-11-16 08:51:05 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.169.2.2 2004-03-28 21:01:41 fenner 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.169.2.1 $)
-AC_PREREQ(2.13)
+AC_REVISION($Revision: 1.169.2.2 $)
+AC_PREREQ(2.50)
AC_INIT(tcpdump.c)
AC_CANONICAL_HOST
AC_LBL_C_INLINE
AC_C___ATTRIBUTE__
-AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netinet/if_ether.h netdnet/dnetdb.h netinet/ether.h)
+AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h netinet/ether.h)
+AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
+#include <sys/socket.h>])
AC_HEADER_TIME
case "$host_os" in
fi
AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version)
+if test $ac_cv_func_pcap_findalldevs = "yes" ; then
+dnl Check for MacOS X, which may ship pcap.h from 0.6 but libpcap may
+dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't
+dnl have pcap_if_t.
+ AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>])
+fi
if test $ac_cv_func_pcap_lib_version = "no" ; then
AC_MSG_CHECKING(whether pcap_version is defined by libpcap)
AC_TRY_LINK([],