Nmap Development mailing list archives
Re: Version display: included vs. system libraries
From: David Fifield <david () bamsoftware com>
Date: Fri, 18 Feb 2011 13:12:04 -0800
On Thu, Feb 10, 2011 at 09:58:51AM +0530, ambarisha b wrote:
I like "nmap-" prefix because changing the library name indicates that the library might have been edited for nmap as in libdnet.The other two seem to indicate that we have just included the actual libraries with nmap.
Okay, let's go with this. Option 2, the "nmap-" prefix. Would you like
to implement this, Ambarisha?
What you will need to do is find the places in configure.ac where the
included libraries are used. Then define a macro that we can test within
the program. For example, for libpcap, it will be something like this:
if test $have_libpcap != yes; then
AC_CONFIG_SUBDIRS(libpcap)
if test "${LIBPCAP_INC+set}" = "set"; then
CPPFLAGS="$CPPFLAGS -I$LIBPCAP_INC"
else
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/$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"
# This is the added line.
AC_DEFINE(PCAP_INCLUDED)
else
You will then need to run the "autoconf" program to regenerate configure
from configure.ac. Also you will need to add a line for PCAP_INCLUDED to
nmap_config.h, following the format of the other lines in that file.
Then, in display_nmap_version, output the "nmap-" or not, depending on
whether PCAP_INCLUDED is defined.
The above instructions may not be completely correct but are probably
pretty close.
David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/
Current thread:
- RE: Version display patch, (continued)
- RE: Version display patch Thomas Buchanan (Feb 06)
- Re: Version display patch ambarisha b (Feb 08)
- RE: Version display patch Thomas Buchanan (Feb 08)
- RE: Version display patch Rob Nicholls (Feb 08)
- Re: Version display patch ambarisha b (Feb 08)
- Re: Version display patch David Fifield (Feb 08)
- Version display: included vs. system libraries David Fifield (Feb 09)
- Re: Version display: included vs. system libraries Kris Katterjohn (Feb 09)
- Re: Version display: included vs. system libraries ambarisha b (Feb 09)
- Re: Version display: included vs. system libraries Kris Katterjohn (Feb 09)
- Re: Version display: included vs. system libraries David Fifield (Feb 18)
- Re: Version display: included vs. system libraries ambarisha b (Feb 19)
- Re: Version display: included vs. system libraries ambarisha b (Feb 22)
- Re: Version display: included vs. system libraries David Fifield (Feb 24)
- Re: Version display patch M Z (Feb 09)
- Re: Version display patch Luis MartinGarcia. (Feb 19)
