diff -upk.orig nmap-4.11.orig/configure.ac nmap-4.11/configure.ac --- nmap-4.11.orig/configure.ac 2006-06-24 02:33:00 +0000 +++ nmap-4.11/configure.ac 2006-06-24 13:22:51 +0000 @@ -4,6 +4,27 @@ AC_PREREQ(2.13) dnl Process this file with autoconf to produce a configure script. AC_INIT(nmap.cc) +AH_TOP([ +#ifndef CONFIG_H +#define CONFIG_H +]) + +AH_BOTTOM([ +#ifdef NEED_USLEEP_PROTO +#ifdef __cplusplus +extern "C" int usleep (unsigned int); +#endif +#endif + +#ifdef NEED_GETHOSTNAME_PROTO +#ifdef __cplusplus +extern "C" int gethostname (char *, unsigned int); +#endif +#endif + +#endif /* CONFIG_H */ +]) + AC_ARG_WITH(localdirs, [ --with-localdirs Explicitly ask compiler to use /usr/local/{include,libs} if they exist ], [ case "$with_localdirs" in @@ -103,7 +124,7 @@ dnl [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ dnl equiv to '#define inline' to 'inline', '__inline__', '__inline' or '' AC_C_INLINE if test -n "$sgi_cc"; then - AC_DEFINE(inline, ) + AC_DEFINE(inline, , [Define inline to appropriate value]) fi AC_SUBST(COMPAT_OBJS) @@ -118,81 +139,81 @@ needs_cpp_precomp=no case "$host" in *alpha-dec-osf*) - AC_DEFINE(DEC) + AC_DEFINE(DEC, 1, [Define to 1 for DEC]) ;; *-netbsd* | *-knetbsd*-gnu) - AC_DEFINE(NETBSD) + AC_DEFINE(NETBSD, 1, [Define to 1 for NetBSD]) ;; *-openbsd*) - AC_DEFINE(OPENBSD) + AC_DEFINE(OPENBSD, 1, [Define to 1 for OpenBSD]) ;; *-sgi-irix5*) - AC_DEFINE(IRIX) + AC_DEFINE(IRIX, 1, [Define to 1 for IRIX]) if test -z "$GCC"; then sgi_cc=yes fi ;; *-sgi-irix6*) - AC_DEFINE(IRIX) + AC_DEFINE(IRIX, 1, [Define to 1 for IRIX]) if test -z "$GCC"; then sgi_cc=yes fi ;; *-hpux*) - AC_DEFINE(HPUX) + AC_DEFINE(HPUX, 1, [Define to 1 for HPUX]) # To link with libnet and NM (/usr/lib/libnm.sl) library # on HP-UX 11.11 (other versions?) Mikhail Zakharov (zmey20000@yahoo.com) AC_CHECK_LIB(nm, open_mib) ;; *-solaris2.0*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) + AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG, 1, [Define to 1 for Solaris checksum bug]) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-solaris2.[[1-9]][[0-9]]*) - AC_DEFINE(SOLARIS) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-solaris2.1*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) + AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG, 1, [Define to 1 for Solaris checksum bug]) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-solaris2.2*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) + AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG, 1, [Define to 1 for Solaris checksum bug]) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-solaris2.3*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) + AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG, 1, [Define to 1 for Solaris checksum bug]) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-solaris2.4*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) + AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG, 1, [Define to 1 for Solaris checksum bug]) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-solaris2.5.1) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) + AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG, 1, [Define to 1 for Solaris checksum bug]) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-solaris*) - AC_DEFINE(SOLARIS) + AC_DEFINE(SOLARIS, 1, [Define to 1 for Solaris]) ;; *-sunos4*) - AC_DEFINE(SUNOS) - AC_DEFINE(SPRINTF_RETURNS_STRING) + AC_DEFINE(SUNOS, 1, [Define to 1 for SunOS]) + AC_DEFINE(SPRINTF_RETURNS_STRING, 1, [Define to 1 if sprintf returns string]) ;; *-linux*) linux=yes - AC_DEFINE(LINUX) - AC_DEFINE(PCAP_TIMEOUT_IGNORED) # libpcap doesn't even LOOK at - # the timeout you give it under Linux + AC_DEFINE(LINUX, 1, [Define to 1 for Linux]) + AC_DEFINE(PCAP_TIMEOUT_IGNORED, 1, [Define to 1 if pcap(3) timeout is ignored]) + # libpcap doesn't even LOOK at the timeout you give it under Linux ;; *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) - AC_DEFINE(FREEBSD) + AC_DEFINE(FREEBSD, 1, [Define to 1 for FreeBSD]) ;; *-bsdi*) - AC_DEFINE(BSDI) + AC_DEFINE(BSDI, 1, [Define to 1 for BSDI]) ;; *-apple-darwin*) macosx=yes - AC_DEFINE(MACOSX) + AC_DEFINE(MACOSX, 1, [Define to 1 for MacOSX]) needs_cpp_precomp=yes ;; esac @@ -314,7 +335,7 @@ fi OPENSSL_LIBS= if test "$use_openssl" = "yes"; then - AC_DEFINE(HAVE_OPENSSL) + AC_DEFINE(HAVE_OPENSSL, 1, [Define to 1 for OpenSSL support]) OPENSSL_LIBS="-lssl -lcrypto" fi @@ -413,7 +434,7 @@ if test $have_libpcap = yes; then PCAP_DEPENDS="" PCAP_CLEAN="" PCAP_DIST_CLEAN="" - AC_DEFINE(HAVE_LIBPCAP) + AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 for libpcap support]) else if test "${LIBPCAP_INC+set}" = "set"; then LDFLAGS="-L$libpcapdir $_ldflags" @@ -537,7 +558,7 @@ AC_TRY_COMPILE([#include [AC_MSG_RESULT(no); bsd_networking=no]); if test $bsd_networking = yes; then - AC_DEFINE(BSD_NETWORKING) + AC_DEFINE(BSD_NETWORKING, 1, [Define to 1 for BSD networking]) AC_MSG_CHECKING([ip_v in struct ip]) AC_TRY_COMPILE([#include #include @@ -585,7 +606,7 @@ AC_CACHE_CHECK(if sockaddr{} has sa_len ac_cv_sockaddr_has_sa_len=yes, ac_cv_sockaddr_has_sa_len=no)) if test $ac_cv_sockaddr_has_sa_len = yes ; then - AC_DEFINE(HAVE_SOCKADDR_SA_LEN) + AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define to 1 for sa_len member in sockaddr]) fi dnl check endedness @@ -594,11 +615,11 @@ AC_C_BIGENDIAN AC_MSG_CHECKING([if struct in_addr is a wacky huge structure (some Sun boxes)]) AC_TRY_COMPILE([#include ], struct in_addr i; i._S_un._S_addr;, \ - AC_DEFINE(IN_ADDR_DEEPSTRUCT) \ + AC_DEFINE(IN_ADDR_DEEPSTRUCT, 1, [Define to 1 for huge struct in_addr]) \ AC_MSG_RESULT(yes) , \ AC_TRY_COMPILE([#include #include ], struct in_addr i; i.S_un.S_addr;, \ - AC_DEFINE(IN_ADDR_DEEPSTRUCT) \ + AC_DEFINE(IN_ADDR_DEEPSTRUCT, 1, [Define to 1 for huge struct in_addr]) \ AC_MSG_RESULT(yes) , \ AC_MSG_RESULT(no);)) @@ -617,7 +638,7 @@ AC_CACHE_CHECK(if struct icmp exists, ac ac_cv_struct_icmp_exists=yes, ac_cv_struct_icmp_exists=no)) if test $ac_cv_struct_icmp_exists = yes ; then - AC_DEFINE(HAVE_STRUCT_ICMP) + AC_DEFINE(HAVE_STRUCT_ICMP, 1, [Define to 1 for struct icmp]) fi AC_CACHE_CHECK(if struct ip exists, ac_cv_struct_ip_exists, @@ -634,7 +655,7 @@ AC_CACHE_CHECK(if struct ip exists, ac_c ac_cv_struct_ip_exists=yes, ac_cv_struct_ip_exists=no)) if test $ac_cv_struct_ip_exists = yes ; then - AC_DEFINE(HAVE_STRUCT_IP) + AC_DEFINE(HAVE_STRUCT_IP, 1, [Define to 1 for struct ip]) fi AC_CACHE_CHECK(if struct ip has ip_sum member, ac_cv_ip_has_ip_sum, @@ -652,7 +673,7 @@ AC_CACHE_CHECK(if struct ip has ip_sum m ac_cv_ip_has_ip_sum=yes, ac_cv_ip_has_ip_sum=no)) if test $ac_cv_ip_has_ip_sum = yes ; then - AC_DEFINE(HAVE_IP_IP_SUM) + AC_DEFINE(HAVE_IP_IP_SUM, 1, [Define to 1 for ip_sum member]) fi @@ -673,7 +694,7 @@ AC_TRY_LINK([#include ],[uslee extern "C" int usleep (unsigned int);],[ usleep (200);],[ AC_MSG_RESULT(yes) - AC_DEFINE(NEED_USLEEP_PROTO)], + AC_DEFINE(NEED_USLEEP_PROTO, 1, [Define to 1 for usleep prototype])], AC_MSG_RESULT(not found))]) AC_LANG_POP(C++) @@ -691,7 +712,7 @@ extern "C" int gethostname (char *, unsi char buffer[200]; gethostname (buffer, 200);],[ AC_MSG_RESULT(yes) - AC_DEFINE(NEED_GETHOSTNAME_PROTO)], + AC_DEFINE(NEED_GETHOSTNAME_PROTO, 1, [Define to 1 for gethostname prototype])], AC_MSG_RESULT(not found))]) AC_LANG_POP(C++)