various: no need to link against libsocket
[unleashed-userland.git] / components / shell / bash / patches / solaris-009.configure.patch
blob07994265f33a73e8d5b5fbe5af0ff279c366263d
1 # Solaris-specific ./configure stuff.
2 # 1. We need to link bash with -lget.
3 # 2. It's a release build, therefore we really don't want debugging
4 # 3. We really want to use ncurses because bash is very compatible
5 # with it.
6 # 4. Don't try to use -static (OI addition)
7 --- configure.~1~ 2014-02-11 19:38:00.000000000 +0400
8 +++ configure 2016-03-03 17:10:01.047378168 +0300
9 @@ -1,4 +1,4 @@
10 -#! /bin/sh
11 +#!/bin/bash
12 # From configure.ac for Bash 4.3, version 4.063.
13 # Guess values for system-dependent variables and create Makefiles.
14 # Generated by GNU Autoconf 2.69 for bash 4.3-release.
15 @@ -15,6 +15,8 @@
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 +export LD_OPTIONS="-lc -lm -lgen -lnsl -lresolv -lncurses -z ignore"
21 # Be more Bourne compatible
22 DUALCASE=1; export DUALCASE # for MKS sh
23 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24 @@ -277,7 +279,7 @@
28 -SHELL=${CONFIG_SHELL-/bin/sh}
29 +SHELL=${CONFIG_SHELL-/bin/bash}
30 export SHELL
31 # Unset more variables known to interfere with behavior of common tools.
32 CLICOLOR_FORCE= GREP_OPTIONS=
33 @@ -4015,7 +4017,7 @@
34 ac_save_c_werror_flag=$ac_c_werror_flag
35 ac_c_werror_flag=yes
36 ac_cv_prog_cc_g=no
37 - CFLAGS="-g"
38 + CFLAGS=""
39 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40 /* end confdefs.h. */
42 @@ -4046,7 +4048,7 @@
44 else
45 ac_c_werror_flag=$ac_save_c_werror_flag
46 - CFLAGS="-g"
47 + CFLAGS=""
48 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49 /* end confdefs.h. */
51 @@ -4074,13 +4076,13 @@
52 CFLAGS=$ac_save_CFLAGS
53 elif test $ac_cv_prog_cc_g = yes; then
54 if test "$GCC" = yes; then
55 - CFLAGS="-g -O2"
56 + CFLAGS=""
57 else
58 - CFLAGS="-g"
59 + CFLAGS=""
61 else
62 if test "$GCC" = yes; then
63 - CFLAGS="-O2"
64 + CFLAGS=""
65 else
66 CFLAGS=
68 @@ -4922,8 +4924,8 @@
71 if test -z "$CFLAGS"; then
72 - AUTO_CFLAGS="-g ${GCC+-O2}"
73 - AUTO_LDFLAGS="-g ${GCC+-O2}"
74 + AUTO_CFLAGS=""
75 + AUTO_LDFLAGS=""
76 else
77 AUTO_CFLAGS= AUTO_LDFLAGS=
79 @@ -4948,10 +4950,10 @@
80 prefer_shared=no
81 # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
82 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
83 - STATIC_LD="-static"
84 + STATIC_LD=""
85 case "$host_os" in
86 solaris2*) ;;
87 - *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
88 + *) LDFLAGS="$LDFLAGS" ;; # XXX experimental
89 esac
92 @@ -4970,7 +4972,7 @@
93 CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
94 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
95 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
96 - CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
97 + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD=""}
98 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
101 @@ -5148,9 +5150,14 @@
103 main ()
105 + #if defined(sun) || defined(__sun) || defined(__sun__)
106 + #error "we want to use libcurses."
107 + return 255;
108 + #else
109 return tgetent ();
111 return 0;
112 + #endif
114 _ACEOF
115 if ac_fn_c_try_link "$LINENO"; then :
116 @@ -5187,9 +5194,14 @@
118 main ()
120 + #if defined(sun) || defined(__sun) || defined(__sun__)
121 + #error "we want to use libcurses."
122 + return 255;
123 + #else
124 return tgetent ();
126 return 0;
127 +#endif
129 _ACEOF
130 if ac_fn_c_try_link "$LINENO"; then :
131 @@ -5815,7 +5827,7 @@
132 $as_echo_n "(cached) " >&6
133 else
134 cat >conftest.make <<\_ACEOF
135 -SHELL = /bin/sh
136 +SHELL = /bin/bash
137 all:
138 @echo '@@@%%%=$(MAKE)=@@@%%%'
139 _ACEOF
140 @@ -5846,8 +5858,8 @@
141 esac
143 case "$host_os" in
144 -opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
145 -*) MAKE_SHELL=/bin/sh ;;
146 +opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/bash" ;;
147 +*) MAKE_SHELL=/bin/bash ;;
148 esac
151 @@ -6509,7 +6521,7 @@
152 # Prepare PATH_SEPARATOR.
153 # The user is always right.
154 if test "${PATH_SEPARATOR+set}" != set; then
155 - echo "#! /bin/sh" >conf$$.sh
156 + echo "#! /bin/bash" >conf$$.sh
157 echo "exit 0" >>conf$$.sh
158 chmod +x conf$$.sh
159 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
160 @@ -6523,7 +6535,7 @@
161 # Find out how to test for executable files. Don't use a zero-byte file,
162 # as systems may use methods other than mode bits to determine executability.
163 cat >conf$$.file <<_ASEOF
164 -#! /bin/sh
165 +#! /bin/bash
166 exit 0
167 _ASEOF
168 chmod +x conf$$.file
169 @@ -6620,7 +6632,7 @@
170 # Prepare PATH_SEPARATOR.
171 # The user is always right.
172 if test "${PATH_SEPARATOR+set}" != set; then
173 - echo "#! /bin/sh" >conf$$.sh
174 + echo "#! /bin/bash" >conf$$.sh
175 echo "exit 0" >>conf$$.sh
176 chmod +x conf$$.sh
177 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
178 @@ -6634,7 +6646,7 @@
179 # Find out how to test for executable files. Don't use a zero-byte file,
180 # as systems may use methods other than mode bits to determine executability.
181 cat >conf$$.file <<_ASEOF
182 -#! /bin/sh
183 +#! /bin/bash
184 exit 0
185 _ASEOF
186 chmod +x conf$$.file
187 @@ -6691,7 +6703,7 @@
188 # Prepare PATH_SEPARATOR.
189 # The user is always right.
190 if test "${PATH_SEPARATOR+set}" != set; then
191 - echo "#! /bin/sh" >conf$$.sh
192 + echo "#! /bin/bash" >conf$$.sh
193 echo "exit 0" >>conf$$.sh
194 chmod +x conf$$.sh
195 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
196 @@ -6705,7 +6717,7 @@
197 # Find out how to test for executable files. Don't use a zero-byte file,
198 # as systems may use methods other than mode bits to determine executability.
199 cat >conf$$.file <<_ASEOF
200 -#! /bin/sh
201 +#! /bin/bash
202 exit 0
203 _ASEOF
204 chmod +x conf$$.file
205 @@ -7538,7 +7550,7 @@
206 # Prepare PATH_SEPARATOR.
207 # The user is always right.
208 if test "${PATH_SEPARATOR+set}" != set; then
209 - echo "#! /bin/sh" >conf$$.sh
210 + echo "#! /bin/bash" >conf$$.sh
211 echo "exit 0" >>conf$$.sh
212 chmod +x conf$$.sh
213 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
214 @@ -7646,7 +7658,7 @@
215 else
217 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
218 - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
219 + ${CONFIG_SHELL-/bin/bash} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
220 . ./conftest.sh
221 rm -f ./conftest.sh
222 acl_cv_rpath=done
223 @@ -12590,7 +12602,7 @@
224 exit 69
225 ' >conftest
226 chmod u+x conftest
227 -(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
228 +(SHELL=/bin/bash; export SHELL; ./conftest >/dev/null 2>&1)
229 if test $? -ne 69; then
230 ac_cv_sys_interpreter=yes
231 else
232 @@ -15728,9 +15740,14 @@
234 main ()
236 +#if defined(sun) || defined(__sun) || defined(__sun__)
237 +#error "we want to use libcurses."
238 +return 255;
239 +#else
240 return tgetent ();
242 return 0;
243 +#endif
245 _ACEOF
246 if ac_fn_c_try_link "$LINENO"; then :
247 @@ -15783,7 +15800,7 @@
248 TERMCAP_LIB=
249 TERMCAP_DEP=
250 else
251 -TERMCAP_LIB=-lcurses
252 +TERMCAP_LIB=/usr/lib/64/libcurses.so.1
253 TERMCAP_DEP=
256 @@ -15918,7 +15935,9 @@
257 solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
258 solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
259 solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
260 -solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
261 +solaris2.10*) LOCAL_CFLAGS="-DSOLARIS -lnsl -lgen" ;;
262 +solaris2.11*) LOCAL_CFLAGS="-DSOLARIS -lnsl -lgen -lncurses" ;;
263 +solaris2.12*) LOCAL_CFLAGS="-DSOLARIS -lnsl -lgen -lncurses" ;;
264 solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
265 lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
266 linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
267 @@ -15970,7 +15989,7 @@
268 then
269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5
270 $as_echo_n "checking shared object configuration for loadable builtins... " >&6; }
271 - eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
272 + eval `${CONFIG_SHELL-/bin/bash} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`