mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
With --with-libpcap=included, link driectly against libpcap/libpcap.a instead
of adding -Llibpcap/ -lpcap to LDFLAGS. The latter, at least on OS X, still links dynamically against the system installation of libpcap. This is consistent with how --with-libpcre=included works.
This commit is contained in:
parent
89ea71e792
commit
a2b7e309ce
2 changed files with 23 additions and 31 deletions
30
configure
vendored
30
configure
vendored
|
|
@ -7249,28 +7249,29 @@ fi
|
|||
LIBS="$LIBS_OLD"
|
||||
fi
|
||||
|
||||
LIBPCAP_LIBS="-lpcap"
|
||||
if test $have_libpcap = yes; then
|
||||
PCAP_DEPENDS=""
|
||||
PCAP_BUILD=""
|
||||
PCAP_CLEAN=""
|
||||
PCAP_DIST_CLEAN=""
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_LIBPCAP 1
|
||||
_ACEOF
|
||||
if test $have_libpcap != yes; then
|
||||
subdirs="$subdirs libpcap"
|
||||
|
||||
else
|
||||
if test "${LIBPCAP_INC+set}" = "set"; then
|
||||
LDFLAGS="-L$libpcapdir $_ldflags"
|
||||
CPPFLAGS="$CPPFLAGS -I$LIBPCAP_INC"
|
||||
else
|
||||
LDFLAGS="-L$libpcapdir $LDFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -I$libpcapdir"
|
||||
fi
|
||||
LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a'
|
||||
PCAP_DEPENDS='$(LIBPCAPDIR)/libpcap.a'
|
||||
PCAP_BUILD="pcap_build"
|
||||
PCAP_CLEAN="pcap_clean"
|
||||
PCAP_DIST_CLEAN="pcap_dist_clean"
|
||||
else
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_LIBPCAP 1
|
||||
_ACEOF
|
||||
|
||||
LIBPCAP_LIBS="-lpcap"
|
||||
PCAP_DEPENDS=""
|
||||
PCAP_BUILD=""
|
||||
PCAP_CLEAN=""
|
||||
PCAP_DIST_CLEAN=""
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -7279,11 +7280,6 @@ fi
|
|||
|
||||
|
||||
|
||||
if test $have_libpcap != yes ; then
|
||||
subdirs="$subdirs libpcap"
|
||||
|
||||
fi
|
||||
|
||||
have_pcre=no
|
||||
requested_included_pcre=no
|
||||
LIBPCREDIR=libpcre
|
||||
|
|
|
|||
24
configure.ac
24
configure.ac
|
|
@ -390,25 +390,25 @@ int main() {
|
|||
LIBS="$LIBS_OLD"
|
||||
fi
|
||||
|
||||
LIBPCAP_LIBS="-lpcap"
|
||||
if test $have_libpcap = yes; then
|
||||
PCAP_DEPENDS=""
|
||||
PCAP_BUILD=""
|
||||
PCAP_CLEAN=""
|
||||
PCAP_DIST_CLEAN=""
|
||||
AC_DEFINE(HAVE_LIBPCAP)
|
||||
else
|
||||
if test $have_libpcap != yes; then
|
||||
AC_CONFIG_SUBDIRS(libpcap)
|
||||
if test "${LIBPCAP_INC+set}" = "set"; then
|
||||
LDFLAGS="-L$libpcapdir $_ldflags"
|
||||
CPPFLAGS="$CPPFLAGS -I$LIBPCAP_INC"
|
||||
else
|
||||
LDFLAGS="-L$libpcapdir $LDFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -I$libpcapdir"
|
||||
fi
|
||||
LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a'
|
||||
PCAP_DEPENDS='$(LIBPCAPDIR)/libpcap.a'
|
||||
PCAP_BUILD="pcap_build"
|
||||
PCAP_CLEAN="pcap_clean"
|
||||
PCAP_DIST_CLEAN="pcap_dist_clean"
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBPCAP)
|
||||
LIBPCAP_LIBS="-lpcap"
|
||||
PCAP_DEPENDS=""
|
||||
PCAP_BUILD=""
|
||||
PCAP_CLEAN=""
|
||||
PCAP_DIST_CLEAN=""
|
||||
fi
|
||||
|
||||
AC_SUBST(PCAP_DEPENDS)
|
||||
|
|
@ -417,10 +417,6 @@ AC_SUBST(PCAP_CLEAN)
|
|||
AC_SUBST(PCAP_DIST_CLEAN)
|
||||
AC_SUBST(LIBPCAP_LIBS)
|
||||
|
||||
if test $have_libpcap != yes ; then
|
||||
AC_CONFIG_SUBDIRS(libpcap)
|
||||
fi
|
||||
|
||||
have_pcre=no
|
||||
requested_included_pcre=no
|
||||
LIBPCREDIR=libpcre
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue