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:
11
nsock/src/configure
vendored
11
nsock/src/configure
vendored
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user