components/bash/patches/solaris-009.configure.patch
author Stefan Teleman <stefan.teleman@oracle.com>
Mon, 29 Feb 2016 10:09:14 -0800
changeset 5518 c47fe0edc204
parent 1275 03b86a2f9021
permissions -rw-r--r--
20612604 upgrade bash to 4.3

# Solaris-specific ./configure stuff.
# 1. We need to link bash with -lget.
# 2. It's a release build, therefore we really don't want debugging
# 3. We really want to use ncurses because bash is very compatible
# with it.
--- configure	2014-02-11 07:38:00.000000000 -0800
+++ configure	2015-04-02 10:48:06.744812618 -0700
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
 # From configure.ac for Bash 4.3, version 4.063.
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.69 for bash 4.3-release.
@@ -15,6 +15,8 @@
 ## M4sh Initialization. ##
 ## -------------------- ##
 
+export LD_OPTIONS="-lc -lm -lgen -lsocket -lnsl -lresolv -lncurses -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 :
@@ -277,7 +279,7 @@
 fi
 fi
 fi
-SHELL=${CONFIG_SHELL-/bin/sh}
+SHELL=${CONFIG_SHELL-/bin/bash}
 export SHELL
 # Unset more variables known to interfere with behavior of common tools.
 CLICOLOR_FORCE= GREP_OPTIONS=
@@ -4015,7 +4017,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 confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -4046,7 +4048,7 @@
 
 else
   ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
+	 CFLAGS=""
 	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -4074,13 +4076,13 @@
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+    CFLAGS=""
   else
-    CFLAGS="-g"
+    CFLAGS=""
   fi
 else
   if test "$GCC" = yes; then
-    CFLAGS="-O2"
+    CFLAGS=""
   else
     CFLAGS=
   fi
@@ -4922,8 +4924,8 @@
 
 
 if test -z "$CFLAGS"; then
-	AUTO_CFLAGS="-g ${GCC+-O2}"
-	AUTO_LDFLAGS="-g ${GCC+-O2}"
+	AUTO_CFLAGS=""
+	AUTO_LDFLAGS=""
 else
 	AUTO_CFLAGS= AUTO_LDFLAGS=
 fi
@@ -4951,7 +4953,7 @@
 		STATIC_LD="-static"
 		case "$host_os" in
 		solaris2*)	;;
-		*)		LDFLAGS="$LDFLAGS -static" ;;	# XXX experimental
+		*)		LDFLAGS="$LDFLAGS" ;;	# XXX experimental
 		esac
 	fi
 fi
@@ -4970,7 +4972,7 @@
 	CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
 	CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
 	LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
-	CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
+	CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD=""}
 	LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
 fi
 
@@ -5148,9 +5150,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
 if ac_fn_c_try_link "$LINENO"; then :
@@ -5187,9 +5194,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
 if ac_fn_c_try_link "$LINENO"; then :
@@ -5815,7 +5827,7 @@
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
+SHELL = /bin/bash
 all:
 	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
@@ -5846,8 +5858,8 @@
 esac
 
 case "$host_os" in
-opennt*|interix*)	MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
-*)			MAKE_SHELL=/bin/sh ;;
+opennt*|interix*)	MAKE_SHELL="$INTERIX_ROOT/bin/bash" ;;
+*)			MAKE_SHELL=/bin/bash ;;
 esac
 
 
@@ -6509,7 +6521,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
@@ -6523,7 +6535,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
@@ -6620,7 +6632,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
@@ -6634,7 +6646,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
@@ -6691,7 +6703,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
@@ -6705,7 +6717,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
@@ -7538,7 +7550,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
@@ -7646,7 +7658,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
@@ -12590,7 +12602,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
@@ -15728,9 +15740,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
 if ac_fn_c_try_link "$LINENO"; then :
@@ -15783,7 +15800,7 @@
 TERMCAP_LIB=
 TERMCAP_DEP=
 else
-TERMCAP_LIB=-lcurses
+TERMCAP_LIB=/usr/lib/64/libcurses.so.1
 TERMCAP_DEP=
 fi
 
@@ -15918,7 +15935,9 @@
 solaris2.5*)	LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
 solaris2.8*)	LOCAL_CFLAGS=-DSOLARIS  ;;
 solaris2.9*)	LOCAL_CFLAGS=-DSOLARIS  ;;
-solaris2.10*)	LOCAL_CFLAGS=-DSOLARIS  ;;
+solaris2.10*)	LOCAL_CFLAGS="-DSOLARIS -lsocket -lnsl -lgen" ;;
+solaris2.11*)	LOCAL_CFLAGS="-DSOLARIS -lsocket -lnsl -lgen -lncurses" ;;
+solaris2.12*)	LOCAL_CFLAGS="-DSOLARIS -lsocket -lnsl -lgen -lncurses" ;;
 solaris2*)	LOCAL_CFLAGS=-DSOLARIS ;;
 lynxos*)	LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
 linux*)		LOCAL_LDFLAGS=-rdynamic		 # allow dynamic loading
@@ -15970,7 +15989,7 @@
 then
 	{ $as_echo "$as_me:${as_lineno-$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}"`