components/bash/patches/solaris-009.configure.patch
changeset 5518 c47fe0edc204
parent 1275 03b86a2f9021
--- a/components/bash/patches/solaris-009.configure.patch	Mon Feb 29 17:20:30 2016 +0000
+++ b/components/bash/patches/solaris-009.configure.patch	Mon Feb 29 10:09:14 2016 -0800
@@ -1,66 +1,114 @@
---- configure	2011-02-07 14:03:22.000000000 -0800
-+++ configure	2011-11-14 10:38:12.200623852 -0800
+# 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.in for Bash 4.2, version 4.037.
++#!/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.63 for bash 4.2-release.
-@@ -13,6 +13,8 @@
- ## M4sh Initialization.  ##
- ## --------------------- ##
+ # 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 -z ignore"
++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
-@@ -592,7 +594,7 @@
- subdirs=
- MFLAGS=
- MAKEFLAGS=
+ 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.  */
  
- # Identity of this package.
- PACKAGE_NAME='bash'
-@@ -3498,7 +3500,7 @@
- sed 's/^/| /' conftest.$ac_ext >&5
+@@ -4046,7 +4048,7 @@
  
- 	ac_c_werror_flag=$ac_save_c_werror_flag
+ else
+   ac_c_werror_flag=$ac_save_c_werror_flag
 -	 CFLAGS="-g"
 +	 CFLAGS=""
- 	 cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
-@@ -3557,7 +3559,7 @@
+ 	 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="-g -O2"
++    CFLAGS=""
    else
 -    CFLAGS="-g"
 +    CFLAGS=""
    fi
  else
    if test "$GCC" = yes; then
-@@ -5019,7 +5021,7 @@
- 
+-    CFLAGS="-O2"
++    CFLAGS=""
+   else
+     CFLAGS=
+   fi
+@@ -4922,8 +4924,8 @@
  
  
--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"
- 
-@@ -5051,7 +5053,7 @@
+ 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
  
--test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g"
-+test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD=""
- 
- 
- 
-@@ -5176,9 +5178,14 @@
+@@ -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 ()
  {
@@ -74,8 +122,8 @@
 +#endif
  }
  _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
-@@ -6083,7 +6090,7 @@
+ if ac_fn_c_try_link "$LINENO"; then :
+@@ -5815,7 +5827,7 @@
    $as_echo_n "(cached) " >&6
  else
    cat >conftest.make <<\_ACEOF
@@ -84,8 +132,8 @@
  all:
  	@echo '@@@%%%=$(MAKE)=@@@%%%'
  _ACEOF
-@@ -6108,8 +6115,8 @@
- 
+@@ -5846,8 +5858,8 @@
+ esac
  
  case "$host_os" in
 -opennt*|interix*)	MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
@@ -95,7 +143,7 @@
  esac
  
  
-@@ -7096,7 +7103,7 @@
+@@ -6509,7 +6521,7 @@
  # Prepare PATH_SEPARATOR.
  # The user is always right.
  if test "${PATH_SEPARATOR+set}" != set; then
@@ -104,7 +152,7 @@
    echo  "exit 0"   >>conf$$.sh
    chmod +x conf$$.sh
    if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-@@ -7110,7 +7117,7 @@
+@@ -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
@@ -113,7 +161,7 @@
  exit 0
  _ASEOF
  chmod +x conf$$.file
-@@ -7207,7 +7214,7 @@
+@@ -6620,7 +6632,7 @@
  # Prepare PATH_SEPARATOR.
  # The user is always right.
  if test "${PATH_SEPARATOR+set}" != set; then
@@ -122,7 +170,7 @@
    echo  "exit 0"   >>conf$$.sh
    chmod +x conf$$.sh
    if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-@@ -7221,7 +7228,7 @@
+@@ -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
@@ -131,7 +179,7 @@
  exit 0
  _ASEOF
  chmod +x conf$$.file
-@@ -7278,7 +7285,7 @@
+@@ -6691,7 +6703,7 @@
  # Prepare PATH_SEPARATOR.
  # The user is always right.
  if test "${PATH_SEPARATOR+set}" != set; then
@@ -140,7 +188,7 @@
    echo  "exit 0"   >>conf$$.sh
    chmod +x conf$$.sh
    if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-@@ -7292,7 +7299,7 @@
+@@ -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
@@ -149,7 +197,7 @@
  exit 0
  _ASEOF
  chmod +x conf$$.file
-@@ -8911,7 +8918,7 @@
+@@ -7538,7 +7550,7 @@
  # Prepare PATH_SEPARATOR.
  # The user is always right.
  if test "${PATH_SEPARATOR+set}" != set; then
@@ -158,7 +206,7 @@
    echo  "exit 0"   >>conf$$.sh
    chmod +x conf$$.sh
    if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-@@ -9021,7 +9028,7 @@
+@@ -7646,7 +7658,7 @@
  else
  
      CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
@@ -167,91 +215,7 @@
      . ./conftest.sh
      rm -f ./conftest.sh
      acl_cv_rpath=done
-@@ -12962,39 +12969,19 @@
- /* 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;
- }
-@@ -13054,39 +13041,25 @@
- /* 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;
- }
-@@ -25754,7 +25727,7 @@
+@@ -12590,7 +12602,7 @@
  exit 69
  ' >conftest
  chmod u+x conftest
@@ -260,37 +224,7 @@
  if test $? -ne 69; then
     ac_cv_sys_interpreter=yes
  else
-@@ -30777,28 +30750,17 @@
- /* end confdefs.h.  */
- /* Define tgetent to an innocuous variant, in case <limits.h> declares tgetent.
-    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define tgetent innocuous_tgetent
- 
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char tgetent (); 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 tgetent
- 
- /* 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 tgetent ();
-+
- /* 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.  */
-@@ -30809,9 +30771,14 @@
+@@ -15728,9 +15740,14 @@
  int
  main ()
  {
@@ -304,102 +238,8 @@
 +#endif
  }
  _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
-@@ -30869,16 +30836,18 @@
- /* 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 tgetent ();
-+
- 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
-@@ -30937,16 +30906,18 @@
- /* 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 tgetent ();
-+
- 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
-@@ -30994,7 +30965,7 @@
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lcurses  $LIBS"
-+LIBS="/usr/lib/64/libcurses.so.1  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
-@@ -31002,13 +30973,12 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- 
-+#include <curses.h>
-+#include <term.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 tgetent ();
- int
- main ()
- {
-@@ -31073,16 +31043,17 @@
- /* 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 tgetent ();
- 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
-@@ -31160,7 +31131,7 @@
+ if ac_fn_c_try_link "$LINENO"; then :
+@@ -15783,7 +15800,7 @@
  TERMCAP_LIB=
  TERMCAP_DEP=
  else
@@ -408,9 +248,20 @@
  TERMCAP_DEP=
  fi
  
-@@ -31368,7 +31339,7 @@
+@@ -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:$LINENO: checking shared object configuration for loadable builtins" >&5
+ 	{ $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}"`