diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-01-22 02:04:35 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-01-22 02:04:49 -0800 |
commit | 7094894ebcbf3e7ea78a558c63045445488e346d (patch) | |
tree | 268ec8caa0ab43cc11b8c1c1b80346cd0bb4c204 /configure.ac | |
parent | 6ca296fa71897ef62ab158e3e5c8703e4d0be9f9 (diff) | |
download | tcpdump-7094894ebcbf3e7ea78a558c63045445488e346d.tar.gz |
Don't check for netinet/if_ether.h unless we need it.
We only use it in addrtoname.c to declare ether_ntohost(), so there's no
need to check for it unless we have ether_ntohost() and there's no other
header that declares it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index f33f2da6..d47b2fdc 100644 --- a/configure.ac +++ b/configure.ac @@ -37,25 +37,6 @@ if test "$ac_cv_header_net_pfvar_h" = yes; then LOCALSRC="print-pflog.c $LOCALSRC" fi fi -AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h> -#include <sys/socket.h>]) -if test "$ac_cv_header_netinet_if_ether_h" != yes; then - # - # The simple test didn't work. - # Do we need to include <net/if.h> first? - # Unset ac_cv_header_netinet_if_ether_h so we don't - # treat the previous failure as a cached value and - # suppress the next test. - # - AC_MSG_NOTICE([Rechecking with some additional includes]) - unset ac_cv_header_netinet_if_ether_h - AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -struct mbuf; -struct rtentry; -#include <net/if.h>]) -fi case "$host_os" in @@ -491,6 +472,13 @@ if test "$ac_cv_func_ether_ntohost" = yes -a \ # # OK, we have ether_ntohost(). Do we have <netinet/if_ether.h>? # + AC_CHECK_HEADERS(netinet/if_ether.h, , , [ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +struct mbuf; +struct rtentry; +#include <net/if.h>]) if test "$ac_cv_header_netinet_if_ether_h" = yes; then # # Yes. Does it declare ether_ntohost()? |