]> The Tcpdump Group git mirrors - tcpdump/commitdiff
If libpcap has pcap_findalldevs, make sure that pcap.h has pcap_if_t.
authorfenner <fenner>
Sun, 28 Mar 2004 21:01:41 +0000 (21:01 +0000)
committerfenner <fenner>
Sun, 28 Mar 2004 21:01:41 +0000 (21:01 +0000)
 Certain paths of upgrades for MacOS X can result in inconsistent library
 and header.
Use correct prerequisites when checking for <netinet/if_ether.h>
Require autoconf 2.50 for AC_CHECK_TYPES.

configure.in

index f3e0b5ef999c1f899a319043b768e6a517b63d60..9fed2c889011f5ab6c8c01b5ef7356450ba1ae97 100644 (file)
@@ -1,4 +1,4 @@
-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.
@@ -6,8 +6,8 @@ dnl
 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
@@ -16,7 +16,9 @@ AC_LBL_C_INIT(V_CCOPT, V_INCLS)
 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
@@ -575,6 +577,12 @@ if test "$ac_cv_sockaddr_has_sa_len" = no; then
 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([],