Nmap Announce mailing list archives
Re: Nmap 2.30BETA20 Released
From: nmap-hackers () thewrittenword com
Date: Fri, 14 Apr 2000 02:30:50 -0500
On Mon, Apr 10, 2000 at 04:50:29PM -0700, Fyodor wrote:
I am pleased to announce that Nmap 2.30BETA20 has been released. It contains a few bugfixes and is a stable release candidate. I plan to release the next stable version within a week. It may just be 2.30BETA20 with the version number changed. So try it out and let me know if you find any problems.
Attached is a patch to this version that does the following:
1. Removes the no_libsocket=x no_libnsl=x hack and replaces it with
AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
2. Introduces the '--with-libpcap[=DIR]' option to use the pcap
library in a directory outside of the normal search path.
--
albert chin (china () thewrittenword com)
-- snip snip
--- configure.in.orig Fri Apr 14 01:08:36 2000
+++ configure.in Fri Apr 14 02:06:10 2000
@@ -40,16 +40,12 @@
;;
*-sgi-irix5*)
AC_DEFINE(IRIX)
- no_libsocket=yes
- no_libnsl=yes
if test -z "$GCC"; then
sgi_cc=yes
fi
;;
*-sgi-irix6*)
AC_DEFINE(IRIX)
- no_libsocket=yes
- no_libnsl=yes
if test -z "$GCC"; then
sgi_cc=yes
fi
@@ -84,8 +80,6 @@
*-sunos4*)
AC_DEFINE(SUNOS)
AC_DEFINE(SPRINTF_RETURNS_STRING)
- no_libnsl=yes
- no_libsocket=yes
;;
*-linux*)
linux=yes
@@ -103,23 +97,59 @@
dnl Checks for libraries.
dnl AC_CHECK_LIB(m, pow)
-if test -z "$no_libnsl"; then
-AC_CHECK_LIB(nsl, inet_ntoa)
-fi
-if test -z "$no_libsocket"; then
-AC_CHECK_LIB(socket, socket)
-fi
+
+dnl If any socket libraries needed
+AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
dnl need posix4/nanosleep for solaris 2.4
-AC_CHECK_LIB(posix4, nanosleep)
+AC_CHECK_FUNC(nanosleep, , AC_CHECK_LIB(posix4, nanosleep))
dnl Check whether libpcap is already available
-AC_CHECK_LIB(pcap, pcap_datalink, [ have_libpcap=yes,
- LIBS="-lpcap $LIBS" ], have_libpcap=no)
+have_libpcap=no
+
+# By default, search for pcap library
+test "${with_libpcap+set}" != "set" && with_libpcap=yes
+
+AC_ARG_WITH(libpcap,
+[ --with-libpcap[=DIR] Look for pcap include/libs in DIR],
+[ case "$with_libpcap" in
+ yes)
+ AC_CHECK_HEADER(pcap.h,
+ AC_CHECK_LIB(pcap, pcap_datalink,
+ [have_libpcap=yes LIBS="-lpcap $LIBS"]))
+ ;;
+ *)
+ _cppflags=$CPPFLAGS
+ _ldflags=$LDFLAGS
+
+ CPPFLAGS="-I$with_libpcap/include $CPPFLAGS"
+ LDFLAGS="-L$with_libpcap/lib $LDFLAGS"
+
+ AC_CHECK_HEADER(pcap.h,[
+ AC_CHECK_LIB(pcap, pcap_datalink,
+ [have_libpcap=yes LIBS="-lpcap $LIBS"
+ LIBPCAP_INC=$with_libpcap/include
+ LIBPCAP_LIB=$with_libpcap/lib])])
+
+ LDFLAGS=$_ldflags
+ CPPFLAGS=$_cppflags
+ ;;
+ esac]
+)
if test $linux = yes; then
have_libpcap=no
fi
+
if test $have_libpcap = yes; then
+ if test "${LIBPCAP_INC+set}" = "set"; then
+ _cflags=$CFLAGS
+ _ldflags=$LDFLAGS
+
+ CFLAGS="-I$LIBPCAP_INC $CFLAGS"
+ LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
+ fi
+
AC_MSG_CHECKING(if libpcap version is recent enough)
AC_TRY_RUN([
#include <stdio.h>
@@ -155,8 +185,13 @@
PCAP_DIST_CLEAN=""
AC_DEFINE(HAVE_LIBPCAP)
else
- LDFLAGS="-L$libpcapdir $LDFLAGS"
- CFLAGS="$CFLAGS -I$libpcapdir"
+ if test "${LIBPCAP_INC+set}" = "set"; then
+ LDFLAGS="-L$libpcapdir $_ldflags"
+ CFLAGS="$_cflags -I$libpcapdir"
+ else
+ LDFLAGS="-L$libpcapdir $LDFLAGS"
+ CFLAGS="$CFLAGS -I$libpcapdir"
+ fi
PCAP_DEPENDS='$(LIBPCAPDIR)/libpcap.a'
PCAP_CLEAN="pcap_clean"
PCAP_DIST_CLEAN="pcap_dist_clean"
Current thread:
- Nmap 2.30BETA20 Released Fyodor (Apr 10)
- Re: Nmap 2.30BETA20 Released nmap-hackers (Apr 13)
- Re: Nmap 2.30BETA20 Released Andrew Brown (Apr 20)
- Re: Nmap 2.30BETA20 Released Max Vision (Apr 21)
- Re: Nmap 2.30BETA20 Released Jeffrey Paul (Apr 21)
- Re: Nmap 2.30BETA20 Released Max Vision (Apr 21)
- Re: Nmap 2.30BETA20 Released Andrew Brown (Apr 21)
- Re: Nmap 2.30BETA20 Released Max Vision (Apr 21)
- Re: Nmap 2.30BETA20 Released Justin (Apr 21)
- Re: Nmap 2.30BETA20 Released Andrew Brown (Apr 21)
- Re: Nmap 2.30BETA20 Released Dragos Ruiu (Apr 21)
- Re: Nmap 2.30BETA20 Released Fyodor (Apr 22)
- <Possible follow-ups>
- Re: Nmap 2.30BETA20 Released Alek O. Komarnitsky (N-CSC) (Apr 21)
