components/bash/patches/solaris-009.configure.patch
changeset 115 c360825c3a3f
parent 110 77641682ba6f
child 1082 6d49548fa9da
child 3462 3fbdd7a202d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/bash/patches/solaris-009.configure.patch	Tue Mar 01 14:19:15 2011 -0800
@@ -0,0 +1,321 @@
+--- configure	2009-12-29 05:34:51.000000000 -0800
++++ configure	2010-09-01 10:45:06.225859891 -0700
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/bash
+ # From configure.in for Bash 4.1, version 4.019.
+ # Guess values for system-dependent variables and create Makefiles.
+ # Generated by GNU Autoconf 2.63 for bash 4.1-release.
+@@ -13,6 +13,8 @@
+ ## M4sh Initialization.  ##
+ ## --------------------- ##
+ 
++export LD_OPTIONS="-lc -lm -lgen -lsocket -lnsl -lresolv -z ignore"
++
+ # Be more Bourne compatible
+ DUALCASE=1; export DUALCASE # for MKS sh
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+@@ -592,7 +594,7 @@
+ subdirs=
+ MFLAGS=
+ MAKEFLAGS=
+-SHELL=${CONFIG_SHELL-/bin/sh}
++SHELL=${CONFIG_SHELL-/bin/bash}
+ 
+ # Identity of this package.
+ PACKAGE_NAME='bash'
+@@ -3500,7 +3502,7 @@
+   ac_save_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
+    ac_cv_prog_cc_g=no
+-   CFLAGS="-g"
++   CFLAGS=""
+    cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -3579,7 +3581,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ 	ac_c_werror_flag=$ac_save_c_werror_flag
+-	 CFLAGS="-g"
++	 CFLAGS=""
+ 	 cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -3638,7 +3640,7 @@
+   if test "$GCC" = yes; then
+     CFLAGS="-g -O2"
+   else
+-    CFLAGS="-g"
++    CFLAGS=""
+   fi
+ else
+   if test "$GCC" = yes; then
+@@ -5092,7 +5094,7 @@
+ 
+ if test -z "$CC_FOR_BUILD"; then
+     if test "x$cross_compiling" = "xno"; then
+-	CC_FOR_BUILD='$(CC)'
++	CC_FOR_BUILD='$(CC) $(CPPFLAGS) $(CFLAGS)'
+     else
+ 	CC_FOR_BUILD=gcc
+     fi
+@@ -5100,7 +5102,7 @@
+ 
+ 
+ 
+-test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
++test -z "$CFLAGS" && CFLAGS="${CFLAGS}" auto_cflags=1
+ 
+ test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
+ 
+@@ -5132,7 +5134,7 @@
+ 	LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
+ fi
+ 
+-test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g"
++test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD=""
+ 
+ 
+ 
+@@ -5257,9 +5259,14 @@
+ int
+ main ()
+ {
++#if defined(sun) || defined(__sun) || defined(__sun__)
++#error "we want to use libcurses."
++return 255;
++#else
+ return tgetent ();
+   ;
+   return 0;
++#endif
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+@@ -6164,7 +6171,7 @@
+   $as_echo_n "(cached) " >&6
+ else
+   cat >conftest.make <<\_ACEOF
+-SHELL = /bin/sh
++SHELL = /bin/bash
+ all:
+ 	@echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+@@ -6190,7 +6197,7 @@
+ 
+ case "$host_os" in
+ opennt*|interix*)	MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
+-*)			MAKE_SHELL=/bin/sh ;;
++*)			MAKE_SHELL=/bin/bash ;;
+ esac
+ 
+ 
+@@ -7177,7 +7184,7 @@
+ # Prepare PATH_SEPARATOR.
+ # The user is always right.
+ if test "${PATH_SEPARATOR+set}" != set; then
+-  echo "#! /bin/sh" >conf$$.sh
++  echo "#! /bin/bash" >conf$$.sh
+   echo  "exit 0"   >>conf$$.sh
+   chmod +x conf$$.sh
+   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+@@ -7191,7 +7198,7 @@
+ # Find out how to test for executable files. Don't use a zero-byte file,
+ # as systems may use methods other than mode bits to determine executability.
+ cat >conf$$.file <<_ASEOF
+-#! /bin/sh
++#! /bin/bash
+ exit 0
+ _ASEOF
+ chmod +x conf$$.file
+@@ -7288,7 +7295,7 @@
+ # Prepare PATH_SEPARATOR.
+ # The user is always right.
+ if test "${PATH_SEPARATOR+set}" != set; then
+-  echo "#! /bin/sh" >conf$$.sh
++  echo "#! /bin/bash" >conf$$.sh
+   echo  "exit 0"   >>conf$$.sh
+   chmod +x conf$$.sh
+   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+@@ -7302,7 +7309,7 @@
+ # Find out how to test for executable files. Don't use a zero-byte file,
+ # as systems may use methods other than mode bits to determine executability.
+ cat >conf$$.file <<_ASEOF
+-#! /bin/sh
++#! /bin/bash
+ exit 0
+ _ASEOF
+ chmod +x conf$$.file
+@@ -7359,7 +7366,7 @@
+ # Prepare PATH_SEPARATOR.
+ # The user is always right.
+ if test "${PATH_SEPARATOR+set}" != set; then
+-  echo "#! /bin/sh" >conf$$.sh
++  echo "#! /bin/bash" >conf$$.sh
+   echo  "exit 0"   >>conf$$.sh
+   chmod +x conf$$.sh
+   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+@@ -7373,7 +7380,7 @@
+ # Find out how to test for executable files. Don't use a zero-byte file,
+ # as systems may use methods other than mode bits to determine executability.
+ cat >conf$$.file <<_ASEOF
+-#! /bin/sh
++#! /bin/bash
+ exit 0
+ _ASEOF
+ chmod +x conf$$.file
+@@ -8992,7 +8999,7 @@
+ # Prepare PATH_SEPARATOR.
+ # The user is always right.
+ if test "${PATH_SEPARATOR+set}" != set; then
+-  echo "#! /bin/sh" >conf$$.sh
++  echo "#! /bin/bash" >conf$$.sh
+   echo  "exit 0"   >>conf$$.sh
+   chmod +x conf$$.sh
+   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+@@ -9102,7 +9109,7 @@
+ else
+ 
+     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
++    ${CONFIG_SHELL-/bin/bash} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+     . ./conftest.sh
+     rm -f ./conftest.sh
+     acl_cv_rpath=done
+@@ -13042,39 +13049,18 @@
+ /* end confdefs.h.  */
+ /* Define isinf to an innocuous variant, in case <limits.h> declares isinf.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define isinf innocuous_isinf
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char isinf (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef isinf
+-
++#include <math.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 isinf ();
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+-#if defined __stub_isinf || defined __stub___isinf
+-choke me
+-#endif
+ 
+ int
+ main ()
+ {
+-return isinf ();
++return isinf(0.0);
+   ;
+   return 0;
+ }
+@@ -13134,39 +13120,26 @@
+ /* end confdefs.h.  */
+ /* Define isnan to an innocuous variant, in case <limits.h> declares isnan.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define isnan innocuous_isnan
+ 
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char isnan (); below.
+     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+     <limits.h> exists even on freestanding compilers.  */
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef isnan
++#include <math.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 isnan ();
++
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+-#if defined __stub_isnan || defined __stub___isnan
+-choke me
+-#endif
+ 
+ int
+ main ()
+ {
+-return isnan ();
++return isnan(0.0);
+   ;
+   return 0;
+ }
+@@ -25521,7 +25494,7 @@
+ exit 69
+ ' >conftest
+ chmod u+x conftest
+-(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
++(SHELL=/bin/bash; export SHELL; ./conftest >/dev/null 2>&1)
+ if test $? -ne 69; then
+    ac_cv_sys_interpreter=yes
+ else
+@@ -30117,9 +30090,14 @@
+ int
+ main ()
+ {
++#if defined(sun) || defined(__sun) || defined(__sun__)
++#error "we want to use libcurses"
++return 255;
++#else
+ return tgetent ();
+   ;
+   return 0;
++#endif
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+@@ -30302,7 +30280,7 @@
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lcurses  $LIBS"
++LIBS="/usr/lib/libcurses.so.1  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -30468,7 +30446,7 @@
+ TERMCAP_LIB=
+ TERMCAP_DEP=
+ else
+-TERMCAP_LIB=-lcurses
++TERMCAP_LIB=/usr/lib/libcurses.so.1
+ TERMCAP_DEP=
+ fi
+ 
+@@ -30676,7 +30654,7 @@
+ then
+ 	{ $as_echo "$as_me:$LINENO: checking shared object configuration for loadable builtins" >&5
+ $as_echo_n "checking shared object configuration for loadable builtins... " >&6; }
+-	eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
++	eval `${CONFIG_SHELL-/bin/bash} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
+ 
+ 
+