1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 16:39:03 +00:00

Really fix nsock's pcap configuration

This wasn't using Nmap's included libpcap if no options were specified,
instead compiling nsock without pcap support if no libpcap could be
found (which breaks Nmap)
This commit is contained in:
dmiller
2014-01-30 03:40:26 +00:00
parent cd7df91ce0
commit 83fd814a2c
2 changed files with 14 additions and 8 deletions

11
nsock/src/configure vendored
View File

@@ -3539,10 +3539,7 @@ fi
;;
included)
LIBPCAP_INC=${top_nmap_srcdir}/libpcap
LIBPCAP_LIB=${top_nmap_srcdir}/libpcap
LIBPCAP_LIBS=${LIBPCAP_LIB}/libpcap.a
have_libpcap=yes
have_libpcap=no
;;
no)
;;
@@ -3611,6 +3608,12 @@ fi
fi
if test "$with_libpcap" != "no" -a "$have_libpcap" = "no"; then
LIBPCAP_INC=${top_nmap_srcdir}/libpcap
LIBPCAP_LIB=${top_nmap_srcdir}/libpcap
LIBPCAP_LIBS=${LIBPCAP_LIB}/libpcap.a
have_libpcap=yes
fi
if test "$have_libpcap" != "no"; then
$as_echo "#define HAVE_PCAP 1" >>confdefs.h

View File

@@ -128,10 +128,7 @@ AC_HELP_STRING([--without-libpcap], [Disable pcap functions.]),
have_libpcap=yes ])
;;
included)
LIBPCAP_INC=${top_nmap_srcdir}/libpcap
LIBPCAP_LIB=${top_nmap_srcdir}/libpcap
LIBPCAP_LIBS=${LIBPCAP_LIB}/libpcap.a
have_libpcap=yes
have_libpcap=no
;;
no)
;;
@@ -155,6 +152,12 @@ AC_HELP_STRING([--without-libpcap], [Disable pcap functions.]),
esac]
)
if test "$with_libpcap" != "no" -a "$have_libpcap" = "no"; then
LIBPCAP_INC=${top_nmap_srcdir}/libpcap
LIBPCAP_LIB=${top_nmap_srcdir}/libpcap
LIBPCAP_LIBS=${LIBPCAP_LIB}/libpcap.a
have_libpcap=yes
fi
if test "$have_libpcap" != "no"; then
AC_DEFINE(HAVE_PCAP)
if test "${LIBPCAP_INC+set}" = "set"; then