components/nmap/patches/5.configure.patch
changeset 146 8e22ba234817
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/nmap/patches/5.configure.patch	Wed Mar 23 12:42:35 2011 -0700
@@ -0,0 +1,190 @@
+--- nmap-5.21/libdnet-stripped/configure.~1~	Thu Jan 14 08:47:28 2010
++++ nmap-5.21/libdnet-stripped/configure	Mon Mar 21 15:33:21 2011
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/bash
+ # Guess values for system-dependent variables and create Makefiles.
+ # Generated by GNU Autoconf 2.63.
+ #
+@@ -573,7 +573,7 @@
+ 
+ 
+ # Check that we are running under the correct shell.
+-SHELL=${CONFIG_SHELL-/bin/sh}
++SHELL=${CONFIG_SHELL-/bin/bash}
+ 
+ case X$lt_ECHO in
+ X*--fallback-echo)
+@@ -657,7 +657,7 @@
+       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ 	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+         # If we have ksh, try running configure again with it.
+-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/bash}
+         export ORIGINAL_CONFIG_SHELL
+         CONFIG_SHELL=/bin/ksh
+         export CONFIG_SHELL
+@@ -699,7 +699,7 @@
+ 	  if test "$prev" != 'sed 50q "$0"'; then
+ 	    echo_test_string=`eval $prev`
+ 	    export echo_test_string
+-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
++	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/bash}} "$0" ${1+"$@"}
+ 	  else
+ 	    # Oops.  We lost completely, so just stick with echo.
+ 	    ECHO=echo
+@@ -738,7 +738,7 @@
+ subdirs=
+ MFLAGS=
+ MAKEFLAGS=
+-SHELL=${CONFIG_SHELL-/bin/sh}
++SHELL=${CONFIG_SHELL-/bin/bash}
+ 
+ # Identity of this package.
+ PACKAGE_NAME=
+@@ -965,7 +965,7 @@
+ datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+-localstatedir='${prefix}/var'
++localstateir=
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ docdir='${datarootdir}/doc/${PACKAGE}'
+@@ -2318,7 +2318,7 @@
+   $as_echo_n "(cached) " >&6
+ else
+   cat >conftest.make <<\_ACEOF
+-SHELL = /bin/sh
++SHELL = /bin/bash
+ all:
+ 	@echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+@@ -3298,7 +3298,7 @@
+   ac_save_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
+    ac_cv_prog_cc_g=no
+-   CFLAGS="-g"
++   CFLAGS="$CFLAGS"
+    cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -3337,7 +3337,7 @@
+   $as_echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	CFLAGS=""
++	CFLAGS="$CFLAGS"
+       cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -3377,7 +3377,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ 	ac_c_werror_flag=$ac_save_c_werror_flag
+-	 CFLAGS="-g"
++	 CFLAGS="$CFLAGS"
+ 	 cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -3434,15 +3434,15 @@
+   CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+   if test "$GCC" = yes; then
+-    CFLAGS="-g -O2"
++    CFLAGS="$CFLAGS"
+   else
+-    CFLAGS="-g"
++    CFLAGS="$CFLAGS"
+   fi
+ else
+   if test "$GCC" = yes; then
+-    CFLAGS="-O2"
++    CFLAGS="$CFLAGS"
+   else
+-    CFLAGS=
++    CFLAGS="$CFLAGS"
+   fi
+ fi
+ { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+@@ -3671,7 +3671,7 @@
+     for i in 1 2 3 4 5 6; do
+       echo '#include "conftst'$i'.h"' >> sub/conftest.c
+       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+-      # Solaris 8's {/usr,}/bin/sh.
++      # Solaris 8's {/usr,}/bin/bash.
+       touch sub/conftst$i.h
+     done
+     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+@@ -4576,7 +4576,7 @@
+       for i in 1 2 3 4 5 6 7 8 ; do
+         teststring=$teststring$teststring
+       done
+-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
++      SHELL=${SHELL-${CONFIG_SHELL-/bin/bash}}
+       # If test is not a shell built-in, we'll probably end up computing a
+       # maximum length that is only half of the actual maximum length, but
+       # we can't tell.
+@@ -12025,13 +12025,13 @@
+ 
+     # DLPI needs putmsg under HPUX so test for -lstr while we're at it
+ 
+-{ $as_echo "$as_me:$LINENO: checking for putmsg in -lstr" >&5
+-$as_echo_n "checking for putmsg in -lstr... " >&6; }
++{ $as_echo "$as_me:$LINENO: checking for putmsg in -lc" >&5
++$as_echo_n "checking for putmsg in -lc... " >&6; }
+ if test "${ac_cv_lib_str_putmsg+set}" = set; then
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lstr  $LIBS"
++LIBS=" -lc -lsocket -lresolv -lnsl -lgen  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -12039,13 +12039,12 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ 
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char putmsg ();
++#include <stropts.h>
++#include <sys/types.h>
++#include <net/if.h>
++#include <sys/socket.h>
++#include <sys/filio.h>
++
+ int
+ main ()
+ {
+@@ -12095,7 +12094,7 @@
+ #define HAVE_LIBSTR 1
+ _ACEOF
+ 
+-  LIBS="-lstr $LIBS"
++  LIBS=" -lc -lsocket -lresolv -lnsl -lgen $LIBS"
+ 
+ fi
+ 
+@@ -14380,15 +14379,8 @@
+     fi
+ 	{ $as_echo "$as_me:$LINENO: checking for Linux PF_PACKET sockets" >&5
+ $as_echo_n "checking for Linux PF_PACKET sockets... " >&6; }
+-    if test "${ac_cv_dnet_linux_pf_packet+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test -f /usr/include/netpacket/packet.h ; then
+-	    ac_cv_dnet_linux_pf_packet=yes
+-	else
++
+ 	    ac_cv_dnet_linux_pf_packet=no
+-	fi
+-fi
+ 
+     { $as_echo "$as_me:$LINENO: result: $ac_cv_dnet_linux_pf_packet" >&5
+ $as_echo "$ac_cv_dnet_linux_pf_packet" >&6; }