diff --git a/nsock/src/configure b/nsock/src/configure index 0ca555ef7..a86df8b38 100755 --- a/nsock/src/configure +++ b/nsock/src/configure @@ -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 diff --git a/nsock/src/configure.ac b/nsock/src/configure.ac index f6bf5b696..75f8ee5e3 100644 --- a/nsock/src/configure.ac +++ b/nsock/src/configure.ac @@ -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