]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
5213506e RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
861bb6c1 JL |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
5213506e RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
ba479fd2 | 14 | |
5213506e RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
ba479fd2 NN |
18 | emulate sh |
19 | NULLCMD=: | |
5213506e | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
ba479fd2 NN |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
5213506e RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
ba479fd2 NN |
31 | fi |
32 | ||
5213506e RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
ba479fd2 NN |
79 | fi |
80 | ||
81 | ||
5213506e RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
ba479fd2 NN |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
5213506e RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
43e02a8a RW |
172 | test \$(( 1 + 1 )) = 2 || exit 1 |
173 | ||
174 | test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( | |
175 | ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
176 | ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO | |
177 | ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO | |
178 | PATH=/empty FPATH=/empty; export PATH FPATH | |
179 | test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ | |
180 | || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" | |
5213506e RW |
181 | if (eval "$as_required") 2>/dev/null; then : |
182 | as_have_required=yes | |
183 | else | |
184 | as_have_required=no | |
185 | fi | |
186 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
187 | ||
188 | else | |
189 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
190 | as_found=false | |
191 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
ba479fd2 | 192 | do |
5213506e RW |
193 | IFS=$as_save_IFS |
194 | test -z "$as_dir" && as_dir=. | |
195 | as_found=: | |
196 | case $as_dir in #( | |
197 | /*) | |
198 | for as_base in sh bash ksh sh5; do | |
199 | # Try only shells that exist, to save several forks. | |
200 | as_shell=$as_dir/$as_base | |
201 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
202 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
203 | CONFIG_SHELL=$as_shell as_have_required=yes | |
204 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
205 | break 2 | |
206 | fi | |
207 | fi | |
208 | done;; | |
209 | esac | |
210 | as_found=false | |
211 | done | |
212 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
213 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
214 | CONFIG_SHELL=$SHELL as_have_required=yes | |
215 | fi; } | |
216 | IFS=$as_save_IFS | |
217 | ||
218 | ||
219 | if test "x$CONFIG_SHELL" != x; then : | |
220 | # We cannot yet assume a decent shell, so we have to provide a | |
221 | # neutralization value for shells without unset; and this also | |
222 | # works around shells that cannot unset nonexistent variables. | |
223 | BASH_ENV=/dev/null | |
224 | ENV=/dev/null | |
225 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
226 | export CONFIG_SHELL | |
227 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
228 | fi | |
229 | ||
230 | if test x$as_have_required = xno; then : | |
231 | $as_echo "$0: This script requires a shell more modern than all" | |
232 | $as_echo "$0: the shells that I found on your system." | |
233 | if test x${ZSH_VERSION+set} = xset ; then | |
234 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
235 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
ba479fd2 | 236 | else |
5213506e RW |
237 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
238 | $0: including any error possibly output before this | |
239 | $0: message. Then install a modern shell, or manually run | |
240 | $0: the script under such a shell if you do have one." | |
ba479fd2 | 241 | fi |
5213506e RW |
242 | exit 1 |
243 | fi | |
244 | fi | |
245 | fi | |
246 | SHELL=${CONFIG_SHELL-/bin/sh} | |
247 | export SHELL | |
248 | # Unset more variables known to interfere with behavior of common tools. | |
249 | CLICOLOR_FORCE= GREP_OPTIONS= | |
250 | unset CLICOLOR_FORCE GREP_OPTIONS | |
251 | ||
252 | ## --------------------- ## | |
253 | ## M4sh Shell Functions. ## | |
254 | ## --------------------- ## | |
255 | # as_fn_unset VAR | |
256 | # --------------- | |
257 | # Portably unset VAR. | |
258 | as_fn_unset () | |
259 | { | |
260 | { eval $1=; unset $1;} | |
261 | } | |
262 | as_unset=as_fn_unset | |
263 | ||
264 | # as_fn_set_status STATUS | |
265 | # ----------------------- | |
266 | # Set $? to STATUS, without forking. | |
267 | as_fn_set_status () | |
268 | { | |
269 | return $1 | |
270 | } # as_fn_set_status | |
271 | ||
272 | # as_fn_exit STATUS | |
273 | # ----------------- | |
274 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
275 | as_fn_exit () | |
276 | { | |
277 | set +e | |
278 | as_fn_set_status $1 | |
279 | exit $1 | |
280 | } # as_fn_exit | |
281 | ||
282 | # as_fn_mkdir_p | |
283 | # ------------- | |
284 | # Create "$as_dir" as a directory, including parents if necessary. | |
285 | as_fn_mkdir_p () | |
286 | { | |
287 | ||
288 | case $as_dir in #( | |
289 | -*) as_dir=./$as_dir;; | |
290 | esac | |
291 | test -d "$as_dir" || eval $as_mkdir_p || { | |
292 | as_dirs= | |
293 | while :; do | |
294 | case $as_dir in #( | |
295 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
296 | *) as_qdir=$as_dir;; | |
297 | esac | |
298 | as_dirs="'$as_qdir' $as_dirs" | |
299 | as_dir=`$as_dirname -- "$as_dir" || | |
300 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
301 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
302 | X"$as_dir" : 'X\(//\)$' \| \ | |
303 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
304 | $as_echo X"$as_dir" | | |
305 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\/\)[^/].*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | /^X\(\/\/\)$/{ | |
314 | s//\1/ | |
315 | q | |
316 | } | |
317 | /^X\(\/\).*/{ | |
318 | s//\1/ | |
319 | q | |
320 | } | |
321 | s/.*/./; q'` | |
322 | test -d "$as_dir" && break | |
323 | done | |
324 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
325 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
326 | ||
327 | ||
328 | } # as_fn_mkdir_p | |
329 | # as_fn_append VAR VALUE | |
330 | # ---------------------- | |
331 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
332 | # advantage of any shell optimizations that allow amortized linear growth over | |
333 | # repeated appends, instead of the typical quadratic growth present in naive | |
334 | # implementations. | |
335 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
336 | eval 'as_fn_append () | |
337 | { | |
338 | eval $1+=\$2 | |
339 | }' | |
340 | else | |
341 | as_fn_append () | |
342 | { | |
343 | eval $1=\$$1\$2 | |
344 | } | |
345 | fi # as_fn_append | |
346 | ||
347 | # as_fn_arith ARG... | |
348 | # ------------------ | |
349 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
350 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
351 | # must be portable across $(()) and expr. | |
352 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
353 | eval 'as_fn_arith () | |
354 | { | |
355 | as_val=$(( $* )) | |
356 | }' | |
357 | else | |
358 | as_fn_arith () | |
359 | { | |
360 | as_val=`expr "$@" || test $? -eq 1` | |
361 | } | |
362 | fi # as_fn_arith | |
363 | ||
ba479fd2 | 364 | |
5213506e RW |
365 | # as_fn_error ERROR [LINENO LOG_FD] |
366 | # --------------------------------- | |
367 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
368 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
369 | # script with status $?, using 1 if that was 0. | |
370 | as_fn_error () | |
371 | { | |
372 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
373 | if test "$3"; then | |
374 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
375 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
376 | fi | |
377 | $as_echo "$as_me: error: $1" >&2 | |
378 | as_fn_exit $as_status | |
379 | } # as_fn_error | |
380 | ||
381 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
382 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
ba479fd2 NN |
383 | as_expr=expr |
384 | else | |
385 | as_expr=false | |
386 | fi | |
387 | ||
5213506e | 388 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
ba479fd2 NN |
389 | as_basename=basename |
390 | else | |
391 | as_basename=false | |
392 | fi | |
393 | ||
5213506e RW |
394 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
395 | as_dirname=dirname | |
396 | else | |
397 | as_dirname=false | |
398 | fi | |
ba479fd2 | 399 | |
5213506e | 400 | as_me=`$as_basename -- "$0" || |
ba479fd2 NN |
401 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
402 | X"$0" : 'X\(//\)$' \| \ | |
5213506e RW |
403 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
404 | $as_echo X/"$0" | | |
405 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | /^X\/\(\/\/\)$/{ | |
410 | s//\1/ | |
411 | q | |
412 | } | |
413 | /^X\/\(\/\).*/{ | |
414 | s//\1/ | |
415 | q | |
416 | } | |
417 | s/.*/./; q'` | |
ab22c1fa | 418 | |
b61ff9c8 BS |
419 | # Avoid depending upon Character Ranges. |
420 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
421 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
422 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
423 | as_cr_digits='0123456789' | |
424 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
1a4b763e | 425 | |
ba479fd2 | 426 | |
5213506e RW |
427 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
428 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
429 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
430 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
431 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
432 | sed -n ' | |
433 | p | |
434 | /[$]LINENO/= | |
435 | ' <$as_myself | | |
ba479fd2 | 436 | sed ' |
5213506e RW |
437 | s/[$]LINENO.*/&-/ |
438 | t lineno | |
439 | b | |
440 | :lineno | |
ba479fd2 | 441 | N |
5213506e RW |
442 | :loop |
443 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
ba479fd2 | 444 | t loop |
5213506e | 445 | s/-\n.*// |
ba479fd2 | 446 | ' >$as_me.lineno && |
5213506e RW |
447 | chmod +x "$as_me.lineno" || |
448 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
ba479fd2 NN |
449 | |
450 | # Don't try to exec as it changes $[0], causing all sort of problems | |
451 | # (the dirname of $[0] is not the place where we might find the | |
5213506e RW |
452 | # original and so on. Autoconf is especially sensitive to this). |
453 | . "./$as_me.lineno" | |
ba479fd2 NN |
454 | # Exit status is that of the last command. |
455 | exit | |
456 | } | |
457 | ||
5213506e RW |
458 | ECHO_C= ECHO_N= ECHO_T= |
459 | case `echo -n x` in #((((( | |
460 | -n*) | |
461 | case `echo 'xy\c'` in | |
462 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
463 | xy) ECHO_C='\c';; | |
464 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
465 | ECHO_T=' ';; | |
466 | esac;; | |
467 | *) | |
468 | ECHO_N='-n';; | |
ba479fd2 NN |
469 | esac |
470 | ||
5213506e RW |
471 | rm -f conf$$ conf$$.exe conf$$.file |
472 | if test -d conf$$.dir; then | |
473 | rm -f conf$$.dir/conf$$.file | |
ba479fd2 | 474 | else |
5213506e RW |
475 | rm -f conf$$.dir |
476 | mkdir conf$$.dir 2>/dev/null | |
ba479fd2 | 477 | fi |
5213506e RW |
478 | if (echo >conf$$.file) 2>/dev/null; then |
479 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b61ff9c8 | 480 | as_ln_s='ln -s' |
5213506e RW |
481 | # ... but there are two gotchas: |
482 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
483 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
484 | # In both cases, we have to default to `cp -p'. | |
485 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
486 | as_ln_s='cp -p' | |
487 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
488 | as_ln_s=ln | |
489 | else | |
490 | as_ln_s='cp -p' | |
b61ff9c8 | 491 | fi |
ba479fd2 NN |
492 | else |
493 | as_ln_s='cp -p' | |
494 | fi | |
5213506e RW |
495 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
496 | rmdir conf$$.dir 2>/dev/null | |
861bb6c1 | 497 | |
ba479fd2 | 498 | if mkdir -p . 2>/dev/null; then |
5213506e | 499 | as_mkdir_p='mkdir -p "$as_dir"' |
ba479fd2 | 500 | else |
86da66b5 | 501 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
502 | as_mkdir_p=false |
503 | fi | |
504 | ||
5213506e RW |
505 | if test -x / >/dev/null 2>&1; then |
506 | as_test_x='test -x' | |
507 | else | |
508 | if ls -dL / >/dev/null 2>&1; then | |
509 | as_ls_L_option=L | |
510 | else | |
511 | as_ls_L_option= | |
512 | fi | |
513 | as_test_x=' | |
514 | eval sh -c '\'' | |
515 | if test -d "$1"; then | |
516 | test -d "$1/."; | |
517 | else | |
518 | case $1 in #( | |
519 | -*)set "./$1";; | |
520 | esac; | |
521 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
522 | ???[sx]*):;;*)false;;esac;fi | |
523 | '\'' sh | |
524 | ' | |
525 | fi | |
526 | as_executable_p=$as_test_x | |
ba479fd2 NN |
527 | |
528 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 529 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
530 | |
531 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 532 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 | 533 | |
da0f6381 PB |
534 | SHELL=${CONFIG_SHELL-/bin/sh} |
535 | ||
da0f6381 | 536 | |
5213506e RW |
537 | exec 7<&0 </dev/null 6>&1 |
538 | ||
ba479fd2 NN |
539 | # Name of the host. |
540 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
541 | # so uname gets run too. | |
542 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
543 | ||
ba479fd2 NN |
544 | # |
545 | # Initializations. | |
546 | # | |
861bb6c1 | 547 | ac_default_prefix=/usr/local |
5213506e | 548 | ac_clean_files= |
ba479fd2 | 549 | ac_config_libobj_dir=. |
5213506e | 550 | LIBOBJS= |
ba479fd2 NN |
551 | cross_compiling=no |
552 | subdirs= | |
553 | MFLAGS= | |
554 | MAKEFLAGS= | |
b61ff9c8 | 555 | |
ba479fd2 NN |
556 | # Identity of this package. |
557 | PACKAGE_NAME= | |
558 | PACKAGE_TARNAME= | |
559 | PACKAGE_VERSION= | |
560 | PACKAGE_STRING= | |
561 | PACKAGE_BUGREPORT= | |
5213506e | 562 | PACKAGE_URL= |
ba479fd2 NN |
563 | |
564 | ac_unique_file="tree.c" | |
565 | # Factoring default headers for most tests. | |
566 | ac_includes_default="\ | |
567 | #include <stdio.h> | |
5213506e | 568 | #ifdef HAVE_SYS_TYPES_H |
ba479fd2 NN |
569 | # include <sys/types.h> |
570 | #endif | |
5213506e | 571 | #ifdef HAVE_SYS_STAT_H |
ba479fd2 NN |
572 | # include <sys/stat.h> |
573 | #endif | |
5213506e | 574 | #ifdef STDC_HEADERS |
ba479fd2 NN |
575 | # include <stdlib.h> |
576 | # include <stddef.h> | |
577 | #else | |
5213506e | 578 | # ifdef HAVE_STDLIB_H |
ba479fd2 NN |
579 | # include <stdlib.h> |
580 | # endif | |
581 | #endif | |
5213506e RW |
582 | #ifdef HAVE_STRING_H |
583 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
ba479fd2 NN |
584 | # include <memory.h> |
585 | # endif | |
586 | # include <string.h> | |
587 | #endif | |
5213506e | 588 | #ifdef HAVE_STRINGS_H |
ba479fd2 NN |
589 | # include <strings.h> |
590 | #endif | |
5213506e | 591 | #ifdef HAVE_INTTYPES_H |
ba479fd2 | 592 | # include <inttypes.h> |
ba479fd2 | 593 | #endif |
5213506e RW |
594 | #ifdef HAVE_STDINT_H |
595 | # include <stdint.h> | |
596 | #endif | |
597 | #ifdef HAVE_UNISTD_H | |
ba479fd2 NN |
598 | # include <unistd.h> |
599 | #endif" | |
600 | ||
5213506e RW |
601 | ac_subst_vars='LTLIBOBJS |
602 | LIBOBJS | |
603 | enable_plugin | |
604 | pluginlibs | |
d7f09764 DN |
605 | LIBELFINC |
606 | LIBELFLIBS | |
5213506e RW |
607 | CLOOGINC |
608 | CLOOGLIBS | |
609 | PPLINC | |
610 | PPLLIBS | |
611 | GMPINC | |
612 | GMPLIBS | |
613 | target_cpu_default | |
614 | fortran_target_objs | |
615 | cxx_target_objs | |
616 | c_target_objs | |
617 | use_gcc_stdint | |
618 | xm_defines | |
619 | xm_include_list | |
620 | xm_file_list | |
621 | tm_p_include_list | |
622 | tm_p_file_list | |
623 | tm_defines | |
624 | tm_include_list | |
625 | tm_file_list | |
626 | thread_file | |
627 | out_object_file | |
628 | out_file | |
629 | objc_boehm_gc | |
630 | md_file | |
631 | local_prefix | |
632 | lang_tree_files | |
633 | lang_specs_files | |
634 | lang_opt_files | |
635 | install | |
636 | out_host_hook_obj | |
637 | host_xm_defines | |
638 | host_xm_include_list | |
639 | host_xm_file_list | |
640 | host_exeext | |
641 | gcc_gxx_include_dir | |
642 | gcc_config_arguments | |
643 | float_h_file | |
644 | extra_programs | |
645 | extra_passes | |
646 | extra_parts | |
647 | extra_objs | |
648 | extra_headers_list | |
9b91e436 KT |
649 | user_headers_inc_next_post |
650 | user_headers_inc_next_pre | |
5213506e RW |
651 | extra_gcc_objs |
652 | TM_MULTILIB_EXCEPTIONS_CONFIG | |
653 | TM_MULTILIB_CONFIG | |
654 | TM_ENDIAN_CONFIG | |
655 | tmake_file | |
656 | xmake_file | |
657 | cpp_install_dir | |
658 | check_languages | |
659 | build_file_translate | |
660 | build_xm_defines | |
661 | build_xm_include_list | |
662 | build_xm_file_list | |
663 | build_install_headers_dir | |
664 | build_exeext | |
665 | all_selected_languages | |
666 | all_languages | |
5213506e RW |
667 | all_lang_makefrags |
668 | all_gtfiles | |
669 | all_compilers | |
670 | srcdir | |
671 | subdirs | |
672 | slibdir | |
673 | dollar | |
674 | gcc_tooldir | |
3bec79c5 DK |
675 | LTO_USE_LIBELF |
676 | LTO_BINARY_READER | |
d7f09764 | 677 | enable_lto |
5213506e RW |
678 | MAINT |
679 | zlibinc | |
680 | zlibdir | |
681 | HOST_LIBS | |
682 | GGC | |
683 | libgcc_visibility | |
684 | gcc_cv_readelf | |
685 | gcc_cv_objdump | |
686 | ORIGINAL_NM_FOR_TARGET | |
687 | gcc_cv_nm | |
688 | ORIGINAL_LD_FOR_TARGET | |
5938f74d | 689 | ORIGINAL_PLUGIN_LD_FOR_TARGET |
5213506e RW |
690 | gcc_cv_ld |
691 | ORIGINAL_AS_FOR_TARGET | |
692 | gcc_cv_as | |
693 | enable_fast_install | |
694 | objdir | |
695 | CXXCPP | |
696 | OTOOL64 | |
697 | OTOOL | |
698 | LIPO | |
699 | NMEDIT | |
700 | DSYMUTIL | |
5213506e RW |
701 | STRIP |
702 | OBJDUMP | |
703 | ac_ct_DUMPBIN | |
704 | DUMPBIN | |
705 | LD | |
706 | FGREP | |
707 | SED | |
708 | LIBTOOL | |
709 | collect2 | |
710 | STMP_FIXINC | |
711 | BUILD_LDFLAGS | |
712 | BUILD_CFLAGS | |
713 | CC_FOR_BUILD | |
714 | inhibit_libc | |
715 | SYSTEM_HEADER_DIR | |
716 | ALL | |
717 | CROSS | |
718 | CATOBJEXT | |
719 | GENCAT | |
720 | INSTOBJEXT | |
721 | DATADIRNAME | |
722 | CATALOGS | |
723 | POSUB | |
724 | GMSGFMT | |
725 | XGETTEXT | |
726 | INCINTL | |
727 | LIBINTL_DEP | |
728 | LIBINTL | |
729 | USE_NLS | |
730 | extra_opt_files | |
731 | extra_modes_file | |
732 | gthread_flags | |
733 | objext | |
734 | manext | |
735 | LIBICONV_DEP | |
736 | LTLIBICONV | |
737 | LIBICONV | |
738 | LDEXP_LIB | |
739 | GNAT_LIBEXC | |
740 | COLLECT2_LIBS | |
741 | AR | |
742 | NM | |
743 | BISON | |
744 | FLEX | |
745 | GENERATED_MANPAGES | |
746 | BUILD_INFO | |
747 | MAKEINFO | |
748 | have_mktemp_command | |
749 | make_compare_target | |
750 | INSTALL_DATA | |
751 | INSTALL_PROGRAM | |
752 | INSTALL | |
753 | ranlib_flags | |
754 | RANLIB | |
755 | LN | |
756 | LN_S | |
757 | AWK | |
758 | SET_MAKE | |
759 | REPORT_BUGS_TEXI | |
760 | REPORT_BUGS_TO | |
761 | PKGVERSION | |
762 | onestep | |
e11ddaf5 | 763 | CONFIGURE_SPECS |
5213506e RW |
764 | CROSS_SYSTEM_HEADER_DIR |
765 | TARGET_SYSTEM_ROOT_DEFINE | |
766 | TARGET_SYSTEM_ROOT | |
767 | enable_shared | |
768 | enable_fixed_point | |
769 | enable_decimal_float | |
770 | enable_multilib | |
771 | ENABLE_BUILD_WITH_CXX | |
772 | coverage_flags | |
773 | valgrind_command | |
774 | valgrind_path_defines | |
775 | valgrind_path | |
776 | TREEBROWSER | |
777 | nocommon_flag | |
778 | warn_cxxflags | |
779 | warn_cflags | |
780 | c_strict_warn | |
781 | strict_warn | |
782 | c_loose_warn | |
783 | loose_warn | |
784 | EGREP | |
785 | GREP | |
786 | CPP | |
787 | OUTPUT_OPTION | |
788 | NO_MINUS_C_MINUS_O | |
789 | GNATMAKE | |
790 | GNATBIND | |
791 | ac_ct_CXX | |
792 | CXXFLAGS | |
793 | CXX | |
794 | OBJEXT | |
795 | EXEEXT | |
796 | ac_ct_CC | |
797 | CPPFLAGS | |
798 | LDFLAGS | |
799 | CFLAGS | |
800 | CC | |
801 | GENINSRC | |
802 | target_subdir | |
803 | host_subdir | |
804 | build_subdir | |
805 | build_libsubdir | |
806 | target_noncanonical | |
807 | target_os | |
808 | target_vendor | |
809 | target_cpu | |
810 | target | |
811 | host_os | |
812 | host_vendor | |
813 | host_cpu | |
814 | host | |
815 | build_os | |
816 | build_vendor | |
817 | build_cpu | |
818 | build | |
819 | target_alias | |
820 | host_alias | |
821 | build_alias | |
822 | LIBS | |
823 | ECHO_T | |
824 | ECHO_N | |
825 | ECHO_C | |
826 | DEFS | |
827 | mandir | |
828 | localedir | |
829 | libdir | |
830 | psdir | |
831 | pdfdir | |
832 | dvidir | |
833 | htmldir | |
834 | infodir | |
835 | docdir | |
836 | oldincludedir | |
837 | includedir | |
838 | localstatedir | |
839 | sharedstatedir | |
840 | sysconfdir | |
841 | datadir | |
842 | datarootdir | |
843 | libexecdir | |
844 | sbindir | |
845 | bindir | |
846 | program_transform_name | |
847 | prefix | |
848 | exec_prefix | |
849 | PACKAGE_URL | |
850 | PACKAGE_BUGREPORT | |
851 | PACKAGE_STRING | |
852 | PACKAGE_VERSION | |
853 | PACKAGE_TARNAME | |
854 | PACKAGE_NAME | |
855 | PATH_SEPARATOR | |
856 | SHELL' | |
ba479fd2 | 857 | ac_subst_files='language_hooks' |
5213506e RW |
858 | ac_user_opts=' |
859 | enable_option_checking | |
860 | with_build_libsubdir | |
861 | with_local_prefix | |
862 | with_gxx_include_dir | |
863 | with_cpp_install_dir | |
864 | enable_generated_files_in_srcdir | |
865 | with_gnu_ld | |
866 | with_ld | |
867 | with_demangler_in_ld | |
868 | with_gnu_as | |
869 | with_as | |
870 | enable_werror_always | |
871 | enable_checking | |
872 | enable_coverage | |
873 | enable_gather_detailed_mem_stats | |
874 | enable_build_with_cxx | |
875 | with_stabs | |
876 | enable_multilib | |
877 | enable___cxa_atexit | |
878 | enable_decimal_float | |
879 | enable_fixed_point | |
880 | enable_threads | |
881 | enable_tls | |
882 | enable_objc_gc | |
883 | with_dwarf2 | |
884 | enable_shared | |
885 | with_build_sysroot | |
886 | with_sysroot | |
e11ddaf5 | 887 | with_specs |
5213506e RW |
888 | enable_intermodule |
889 | with_pkgversion | |
890 | with_bugurl | |
891 | enable_languages | |
892 | with_multilib_list | |
893 | enable_rpath | |
894 | with_libiconv_prefix | |
895 | enable_initfini_array | |
896 | enable_sjlj_exceptions | |
897 | with_system_libunwind | |
898 | enable_secureplt | |
ad211091 | 899 | enable_leading_mingw64_underscores |
5213506e | 900 | enable_cld |
d79389af | 901 | enable_frame_pointer |
5213506e RW |
902 | enable_win32_registry |
903 | enable_static | |
904 | with_pic | |
905 | enable_fast_install | |
906 | enable_libtool_lock | |
5938f74d | 907 | with_plugin_ld |
55c4f715 | 908 | enable_comdat |
5213506e RW |
909 | enable_gnu_unique_object |
910 | enable_linker_build_id | |
911 | with_long_double_128 | |
912 | with_gc | |
913 | with_system_zlib | |
914 | enable_maintainer_mode | |
915 | enable_version_specific_runtime_libs | |
916 | with_slibdir | |
5213506e RW |
917 | enable_plugin |
918 | ' | |
919 | ac_precious_vars='build_alias | |
920 | host_alias | |
921 | target_alias | |
922 | CC | |
923 | CFLAGS | |
924 | LDFLAGS | |
925 | LIBS | |
926 | CPPFLAGS | |
927 | CXX | |
928 | CXXFLAGS | |
929 | CCC | |
930 | CPP | |
931 | CXXCPP | |
932 | GMPLIBS | |
933 | GMPINC | |
934 | PPLLIBS | |
935 | PPLINC | |
936 | CLOOGLIBS | |
d7f09764 DN |
937 | CLOOGINC |
938 | LIBELFLIBS | |
939 | LIBELFINC' | |
5213506e | 940 | |
861bb6c1 JL |
941 | |
942 | # Initialize some variables set by options. | |
ba479fd2 NN |
943 | ac_init_help= |
944 | ac_init_version=false | |
5213506e RW |
945 | ac_unrecognized_opts= |
946 | ac_unrecognized_sep= | |
861bb6c1 JL |
947 | # The variables have the same names as the options, with |
948 | # dashes changed to underlines. | |
ba479fd2 | 949 | cache_file=/dev/null |
861bb6c1 | 950 | exec_prefix=NONE |
861bb6c1 | 951 | no_create= |
861bb6c1 JL |
952 | no_recursion= |
953 | prefix=NONE | |
954 | program_prefix=NONE | |
955 | program_suffix=NONE | |
956 | program_transform_name=s,x,x, | |
957 | silent= | |
958 | site= | |
959 | srcdir= | |
861bb6c1 JL |
960 | verbose= |
961 | x_includes=NONE | |
962 | x_libraries=NONE | |
ba479fd2 NN |
963 | |
964 | # Installation directory options. | |
965 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
966 | # and all the variables that are supposed to be based on exec_prefix | |
967 | # by default will actually change. | |
968 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
5213506e | 969 | # (The list follows the same order as the GNU Coding Standards.) |
861bb6c1 JL |
970 | bindir='${exec_prefix}/bin' |
971 | sbindir='${exec_prefix}/sbin' | |
972 | libexecdir='${exec_prefix}/libexec' | |
5213506e RW |
973 | datarootdir='${prefix}/share' |
974 | datadir='${datarootdir}' | |
861bb6c1 JL |
975 | sysconfdir='${prefix}/etc' |
976 | sharedstatedir='${prefix}/com' | |
977 | localstatedir='${prefix}/var' | |
861bb6c1 JL |
978 | includedir='${prefix}/include' |
979 | oldincludedir='/usr/include' | |
5213506e RW |
980 | docdir='${datarootdir}/doc/${PACKAGE}' |
981 | infodir='${datarootdir}/info' | |
982 | htmldir='${docdir}' | |
983 | dvidir='${docdir}' | |
984 | pdfdir='${docdir}' | |
985 | psdir='${docdir}' | |
986 | libdir='${exec_prefix}/lib' | |
987 | localedir='${datarootdir}/locale' | |
988 | mandir='${datarootdir}/man' | |
861bb6c1 | 989 | |
861bb6c1 | 990 | ac_prev= |
5213506e | 991 | ac_dashdash= |
861bb6c1 JL |
992 | for ac_option |
993 | do | |
861bb6c1 JL |
994 | # If the previous option needs an argument, assign it. |
995 | if test -n "$ac_prev"; then | |
5213506e | 996 | eval $ac_prev=\$ac_option |
861bb6c1 JL |
997 | ac_prev= |
998 | continue | |
999 | fi | |
1000 | ||
5213506e RW |
1001 | case $ac_option in |
1002 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
1003 | *) ac_optarg=yes ;; | |
1004 | esac | |
861bb6c1 JL |
1005 | |
1006 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1007 | ||
5213506e RW |
1008 | case $ac_dashdash$ac_option in |
1009 | --) | |
1010 | ac_dashdash=yes ;; | |
861bb6c1 JL |
1011 | |
1012 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1013 | ac_prev=bindir ;; | |
1014 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 1015 | bindir=$ac_optarg ;; |
861bb6c1 JL |
1016 | |
1017 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 1018 | ac_prev=build_alias ;; |
861bb6c1 | 1019 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 1020 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
1021 | |
1022 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1023 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1024 | ac_prev=cache_file ;; | |
1025 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1026 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
1027 | cache_file=$ac_optarg ;; |
1028 | ||
1029 | --config-cache | -C) | |
1030 | cache_file=config.cache ;; | |
861bb6c1 | 1031 | |
5213506e | 1032 | -datadir | --datadir | --datadi | --datad) |
861bb6c1 | 1033 | ac_prev=datadir ;; |
5213506e | 1034 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
ba479fd2 | 1035 | datadir=$ac_optarg ;; |
861bb6c1 | 1036 | |
5213506e RW |
1037 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1038 | | --dataroo | --dataro | --datar) | |
1039 | ac_prev=datarootdir ;; | |
1040 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1041 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1042 | datarootdir=$ac_optarg ;; | |
1043 | ||
861bb6c1 | 1044 | -disable-* | --disable-*) |
5213506e | 1045 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 1046 | # Reject names that are not valid shell variable names. |
5213506e RW |
1047 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1048 | as_fn_error "invalid feature name: $ac_useropt" | |
1049 | ac_useropt_orig=$ac_useropt | |
1050 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1051 | case $ac_user_opts in | |
1052 | *" | |
1053 | "enable_$ac_useropt" | |
1054 | "*) ;; | |
1055 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1056 | ac_unrecognized_sep=', ';; | |
1057 | esac | |
1058 | eval enable_$ac_useropt=no ;; | |
1059 | ||
1060 | -docdir | --docdir | --docdi | --doc | --do) | |
1061 | ac_prev=docdir ;; | |
1062 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1063 | docdir=$ac_optarg ;; | |
1064 | ||
1065 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1066 | ac_prev=dvidir ;; | |
1067 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1068 | dvidir=$ac_optarg ;; | |
861bb6c1 JL |
1069 | |
1070 | -enable-* | --enable-*) | |
5213506e | 1071 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 1072 | # Reject names that are not valid shell variable names. |
5213506e RW |
1073 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1074 | as_fn_error "invalid feature name: $ac_useropt" | |
1075 | ac_useropt_orig=$ac_useropt | |
1076 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1077 | case $ac_user_opts in | |
1078 | *" | |
1079 | "enable_$ac_useropt" | |
1080 | "*) ;; | |
1081 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1082 | ac_unrecognized_sep=', ';; | |
b61ff9c8 | 1083 | esac |
5213506e | 1084 | eval enable_$ac_useropt=\$ac_optarg ;; |
861bb6c1 JL |
1085 | |
1086 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1087 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1088 | | --exec | --exe | --ex) | |
1089 | ac_prev=exec_prefix ;; | |
1090 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1091 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1092 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 1093 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
1094 | |
1095 | -gas | --gas | --ga | --g) | |
1096 | # Obsolete; use --with-gas. | |
1097 | with_gas=yes ;; | |
1098 | ||
ba479fd2 NN |
1099 | -help | --help | --hel | --he | -h) |
1100 | ac_init_help=long ;; | |
1101 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1102 | ac_init_help=recursive ;; | |
1103 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1104 | ac_init_help=short ;; | |
861bb6c1 JL |
1105 | |
1106 | -host | --host | --hos | --ho) | |
ba479fd2 | 1107 | ac_prev=host_alias ;; |
861bb6c1 | 1108 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 1109 | host_alias=$ac_optarg ;; |
861bb6c1 | 1110 | |
5213506e RW |
1111 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1112 | ac_prev=htmldir ;; | |
1113 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1114 | | --ht=*) | |
1115 | htmldir=$ac_optarg ;; | |
1116 | ||
861bb6c1 JL |
1117 | -includedir | --includedir | --includedi | --included | --include \ |
1118 | | --includ | --inclu | --incl | --inc) | |
1119 | ac_prev=includedir ;; | |
1120 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1121 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 1122 | includedir=$ac_optarg ;; |
861bb6c1 JL |
1123 | |
1124 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1125 | ac_prev=infodir ;; | |
1126 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 1127 | infodir=$ac_optarg ;; |
861bb6c1 JL |
1128 | |
1129 | -libdir | --libdir | --libdi | --libd) | |
1130 | ac_prev=libdir ;; | |
1131 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 1132 | libdir=$ac_optarg ;; |
861bb6c1 JL |
1133 | |
1134 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1135 | | --libexe | --libex | --libe) | |
1136 | ac_prev=libexecdir ;; | |
1137 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1138 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 1139 | libexecdir=$ac_optarg ;; |
861bb6c1 | 1140 | |
5213506e RW |
1141 | -localedir | --localedir | --localedi | --localed | --locale) |
1142 | ac_prev=localedir ;; | |
1143 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1144 | localedir=$ac_optarg ;; | |
1145 | ||
861bb6c1 | 1146 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
5213506e | 1147 | | --localstate | --localstat | --localsta | --localst | --locals) |
861bb6c1 JL |
1148 | ac_prev=localstatedir ;; |
1149 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
5213506e | 1150 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
ba479fd2 | 1151 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
1152 | |
1153 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1154 | ac_prev=mandir ;; | |
1155 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 1156 | mandir=$ac_optarg ;; |
861bb6c1 JL |
1157 | |
1158 | -nfp | --nfp | --nf) | |
1159 | # Obsolete; use --without-fp. | |
1160 | with_fp=no ;; | |
1161 | ||
1162 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 1163 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
1164 | no_create=yes ;; |
1165 | ||
1166 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1167 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1168 | no_recursion=yes ;; | |
1169 | ||
1170 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1171 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1172 | | --oldin | --oldi | --old | --ol | --o) | |
1173 | ac_prev=oldincludedir ;; | |
1174 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1175 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1176 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 1177 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
1178 | |
1179 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1180 | ac_prev=prefix ;; | |
1181 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 1182 | prefix=$ac_optarg ;; |
861bb6c1 JL |
1183 | |
1184 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1185 | | --program-pre | --program-pr | --program-p) | |
1186 | ac_prev=program_prefix ;; | |
1187 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1188 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 1189 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
1190 | |
1191 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1192 | | --program-suf | --program-su | --program-s) | |
1193 | ac_prev=program_suffix ;; | |
1194 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1195 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 1196 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
1197 | |
1198 | -program-transform-name | --program-transform-name \ | |
1199 | | --program-transform-nam | --program-transform-na \ | |
1200 | | --program-transform-n | --program-transform- \ | |
1201 | | --program-transform | --program-transfor \ | |
1202 | | --program-transfo | --program-transf \ | |
1203 | | --program-trans | --program-tran \ | |
1204 | | --progr-tra | --program-tr | --program-t) | |
1205 | ac_prev=program_transform_name ;; | |
1206 | -program-transform-name=* | --program-transform-name=* \ | |
1207 | | --program-transform-nam=* | --program-transform-na=* \ | |
1208 | | --program-transform-n=* | --program-transform-=* \ | |
1209 | | --program-transform=* | --program-transfor=* \ | |
1210 | | --program-transfo=* | --program-transf=* \ | |
1211 | | --program-trans=* | --program-tran=* \ | |
1212 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 1213 | program_transform_name=$ac_optarg ;; |
861bb6c1 | 1214 | |
5213506e RW |
1215 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1216 | ac_prev=pdfdir ;; | |
1217 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1218 | pdfdir=$ac_optarg ;; | |
1219 | ||
1220 | -psdir | --psdir | --psdi | --psd | --ps) | |
1221 | ac_prev=psdir ;; | |
1222 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1223 | psdir=$ac_optarg ;; | |
1224 | ||
861bb6c1 JL |
1225 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1226 | | -silent | --silent | --silen | --sile | --sil) | |
1227 | silent=yes ;; | |
1228 | ||
1229 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1230 | ac_prev=sbindir ;; | |
1231 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1232 | | --sbi=* | --sb=*) | |
ba479fd2 | 1233 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
1234 | |
1235 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1236 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1237 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1238 | | --sha | --sh) | |
1239 | ac_prev=sharedstatedir ;; | |
1240 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1241 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1242 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1243 | | --sha=* | --sh=*) | |
ba479fd2 | 1244 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
1245 | |
1246 | -site | --site | --sit) | |
1247 | ac_prev=site ;; | |
1248 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 1249 | site=$ac_optarg ;; |
861bb6c1 JL |
1250 | |
1251 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1252 | ac_prev=srcdir ;; | |
1253 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 1254 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
1255 | |
1256 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1257 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1258 | ac_prev=sysconfdir ;; | |
1259 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1260 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 1261 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
1262 | |
1263 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 1264 | ac_prev=target_alias ;; |
861bb6c1 | 1265 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 1266 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
1267 | |
1268 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1269 | verbose=yes ;; | |
1270 | ||
ba479fd2 NN |
1271 | -version | --version | --versio | --versi | --vers | -V) |
1272 | ac_init_version=: ;; | |
861bb6c1 JL |
1273 | |
1274 | -with-* | --with-*) | |
5213506e | 1275 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 1276 | # Reject names that are not valid shell variable names. |
5213506e RW |
1277 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1278 | as_fn_error "invalid package name: $ac_useropt" | |
1279 | ac_useropt_orig=$ac_useropt | |
1280 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1281 | case $ac_user_opts in | |
1282 | *" | |
1283 | "with_$ac_useropt" | |
1284 | "*) ;; | |
1285 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1286 | ac_unrecognized_sep=', ';; | |
b61ff9c8 | 1287 | esac |
5213506e | 1288 | eval with_$ac_useropt=\$ac_optarg ;; |
861bb6c1 JL |
1289 | |
1290 | -without-* | --without-*) | |
5213506e | 1291 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 1292 | # Reject names that are not valid shell variable names. |
5213506e RW |
1293 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1294 | as_fn_error "invalid package name: $ac_useropt" | |
1295 | ac_useropt_orig=$ac_useropt | |
1296 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1297 | case $ac_user_opts in | |
1298 | *" | |
1299 | "with_$ac_useropt" | |
1300 | "*) ;; | |
1301 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1302 | ac_unrecognized_sep=', ';; | |
1303 | esac | |
1304 | eval with_$ac_useropt=no ;; | |
861bb6c1 JL |
1305 | |
1306 | --x) | |
1307 | # Obsolete; use --with-x. | |
1308 | with_x=yes ;; | |
1309 | ||
1310 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1311 | | --x-incl | --x-inc | --x-in | --x-i) | |
1312 | ac_prev=x_includes ;; | |
1313 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1314 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 1315 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
1316 | |
1317 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1318 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1319 | ac_prev=x_libraries ;; | |
1320 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1321 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 1322 | x_libraries=$ac_optarg ;; |
861bb6c1 | 1323 | |
5213506e RW |
1324 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1325 | Try \`$0 --help' for more information." | |
861bb6c1 JL |
1326 | ;; |
1327 | ||
ba479fd2 NN |
1328 | *=*) |
1329 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1330 | # Reject names that are not valid shell variable names. | |
5213506e RW |
1331 | case $ac_envvar in #( |
1332 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1333 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1334 | esac | |
1335 | eval $ac_envvar=\$ac_optarg | |
ba479fd2 NN |
1336 | export $ac_envvar ;; |
1337 | ||
861bb6c1 | 1338 | *) |
ba479fd2 | 1339 | # FIXME: should be removed in autoconf 3.0. |
5213506e | 1340 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
ba479fd2 | 1341 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
5213506e | 1342 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
ba479fd2 | 1343 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
861bb6c1 JL |
1344 | ;; |
1345 | ||
1346 | esac | |
1347 | done | |
1348 | ||
1349 | if test -n "$ac_prev"; then | |
ba479fd2 | 1350 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
5213506e | 1351 | as_fn_error "missing argument to $ac_option" |
63cf211a | 1352 | fi |
63cf211a | 1353 | |
5213506e RW |
1354 | if test -n "$ac_unrecognized_opts"; then |
1355 | case $enable_option_checking in | |
1356 | no) ;; | |
1357 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1358 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
2f41c1d6 | 1359 | esac |
5213506e | 1360 | fi |
2f41c1d6 | 1361 | |
5213506e RW |
1362 | # Check all directory arguments for consistency. |
1363 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1364 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1365 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1366 | libdir localedir mandir | |
b61ff9c8 | 1367 | do |
5213506e RW |
1368 | eval ac_val=\$$ac_var |
1369 | # Remove trailing slashes. | |
1370 | case $ac_val in | |
1371 | */ ) | |
1372 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1373 | eval $ac_var=\$ac_val;; | |
1374 | esac | |
1375 | # Be sure to have absolute directory names. | |
b61ff9c8 | 1376 | case $ac_val in |
5213506e RW |
1377 | [\\/$]* | ?:[\\/]* ) continue;; |
1378 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
b61ff9c8 | 1379 | esac |
5213506e | 1380 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
b61ff9c8 BS |
1381 | done |
1382 | ||
1383 | # There might be people who depend on the old broken behavior: `$host' | |
1384 | # used to hold the argument of --host etc. | |
1385 | # FIXME: To remove some day. | |
1386 | build=$build_alias | |
1387 | host=$host_alias | |
ba479fd2 NN |
1388 | target=$target_alias |
1389 | ||
1390 | # FIXME: To remove some day. | |
1391 | if test "x$host_alias" != x; then | |
1392 | if test "x$build_alias" = x; then | |
1393 | cross_compiling=maybe | |
5213506e | 1394 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
ba479fd2 NN |
1395 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1396 | elif test "x$build_alias" != "x$host_alias"; then | |
1397 | cross_compiling=yes | |
1398 | fi | |
1399 | fi | |
6e3f3080 | 1400 | |
ba479fd2 NN |
1401 | ac_tool_prefix= |
1402 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1403 | ||
1404 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 1405 | |
861bb6c1 | 1406 | |
5213506e RW |
1407 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1408 | ac_ls_di=`ls -di .` && | |
1409 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1410 | as_fn_error "working directory cannot be determined" | |
1411 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1412 | as_fn_error "pwd does not report name of working directory" | |
1413 | ||
1414 | ||
861bb6c1 JL |
1415 | # Find the source files, if location was not specified. |
1416 | if test -z "$srcdir"; then | |
1417 | ac_srcdir_defaulted=yes | |
5213506e RW |
1418 | # Try the directory containing this script, then the parent directory. |
1419 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1420 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1421 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1422 | X"$as_myself" : 'X\(//\)$' \| \ | |
1423 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1424 | $as_echo X"$as_myself" | | |
1425 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1426 | s//\1/ | |
1427 | q | |
1428 | } | |
1429 | /^X\(\/\/\)[^/].*/{ | |
1430 | s//\1/ | |
1431 | q | |
1432 | } | |
1433 | /^X\(\/\/\)$/{ | |
1434 | s//\1/ | |
1435 | q | |
1436 | } | |
1437 | /^X\(\/\).*/{ | |
1438 | s//\1/ | |
1439 | q | |
1440 | } | |
1441 | s/.*/./; q'` | |
861bb6c1 | 1442 | srcdir=$ac_confdir |
5213506e | 1443 | if test ! -r "$srcdir/$ac_unique_file"; then |
861bb6c1 JL |
1444 | srcdir=.. |
1445 | fi | |
1446 | else | |
1447 | ac_srcdir_defaulted=no | |
1448 | fi | |
5213506e RW |
1449 | if test ! -r "$srcdir/$ac_unique_file"; then |
1450 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1451 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1452 | fi | |
1453 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1454 | ac_abs_confdir=`( | |
1455 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1456 | pwd)` | |
1457 | # When building in place, set srcdir=. | |
1458 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1459 | srcdir=. | |
1460 | fi | |
1461 | # Remove unnecessary trailing slashes from srcdir. | |
1462 | # Double slashes in file names in object file debugging info | |
1463 | # mess up M-x gdb in Emacs. | |
1464 | case $srcdir in | |
1465 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1466 | esac | |
1467 | for ac_var in $ac_precious_vars; do | |
1468 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1469 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1470 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1471 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1472 | done | |
63cf211a | 1473 | |
ba479fd2 NN |
1474 | # |
1475 | # Report the --help message. | |
1476 | # | |
1477 | if test "$ac_init_help" = "long"; then | |
1478 | # Omit some internal or obsolete options to make the list less imposing. | |
1479 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1480 | cat <<_ACEOF | |
1481 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 1482 | |
ba479fd2 | 1483 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 1484 | |
ba479fd2 NN |
1485 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
1486 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 1487 | |
ba479fd2 | 1488 | Defaults for the options are specified in brackets. |
861bb6c1 | 1489 | |
ba479fd2 NN |
1490 | Configuration: |
1491 | -h, --help display this help and exit | |
1492 | --help=short display options specific to this package | |
1493 | --help=recursive display the short help of all the included packages | |
1494 | -V, --version display version information and exit | |
1495 | -q, --quiet, --silent do not print \`checking...' messages | |
1496 | --cache-file=FILE cache test results in FILE [disabled] | |
1497 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1498 | -n, --no-create do not create output files | |
1499 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1500 | ||
ba479fd2 NN |
1501 | Installation directories: |
1502 | --prefix=PREFIX install architecture-independent files in PREFIX | |
5213506e | 1503 | [$ac_default_prefix] |
ba479fd2 | 1504 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5213506e | 1505 | [PREFIX] |
861bb6c1 | 1506 | |
ba479fd2 NN |
1507 | By default, \`make install' will install all the files in |
1508 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1509 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1510 | for instance \`--prefix=\$HOME'. | |
13c22933 | 1511 | |
ba479fd2 | 1512 | For better control, use the options below. |
13c22933 | 1513 | |
ba479fd2 | 1514 | Fine tuning of the installation directories: |
5213506e RW |
1515 | --bindir=DIR user executables [EPREFIX/bin] |
1516 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1517 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1518 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1519 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1520 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1521 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1522 | --includedir=DIR C header files [PREFIX/include] | |
1523 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1524 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1525 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1526 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1527 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1528 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1529 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1530 | --htmldir=DIR html documentation [DOCDIR] | |
1531 | --dvidir=DIR dvi documentation [DOCDIR] | |
1532 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1533 | --psdir=DIR ps documentation [DOCDIR] | |
ba479fd2 | 1534 | _ACEOF |
13c22933 | 1535 | |
ba479fd2 | 1536 | cat <<\_ACEOF |
13c22933 | 1537 | |
ba479fd2 NN |
1538 | Program names: |
1539 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1540 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1541 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 1542 | |
ba479fd2 NN |
1543 | System types: |
1544 | --build=BUILD configure for building on BUILD [guessed] | |
1545 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1546 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1547 | _ACEOF | |
13c22933 JJ |
1548 | fi |
1549 | ||
ba479fd2 | 1550 | if test -n "$ac_init_help"; then |
13c22933 | 1551 | |
ba479fd2 | 1552 | cat <<\_ACEOF |
13c22933 | 1553 | |
ba479fd2 | 1554 | Optional Features: |
5213506e | 1555 | --disable-option-checking ignore unrecognized --enable/--with options |
ba479fd2 NN |
1556 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1557 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
1558 | --enable-generated-files-in-srcdir |
1559 | put copies of generated files in source dir | |
1560 | intended for creating source tarballs for users | |
1561 | without texinfo bison or flex. | |
3bbd5a19 | 1562 | --enable-werror-always enable -Werror despite compiler version |
ba479fd2 NN |
1563 | --enable-checking=LIST |
1564 | enable expensive run-time checks. With LIST, | |
1565 | enable only specific categories of checks. | |
cdce5c16 | 1566 | Categories are: yes,no,all,none,release. |
726a989a | 1567 | Flags are: assert,df,fold,gc,gcac,gimple,misc, |
7e98624c | 1568 | rtlflag,rtl,runtime,tree,valgrind,types. |
ba479fd2 | 1569 | --enable-coverage=LEVEL |
fb38008e | 1570 | enable compiler's code coverage collection. |
ba479fd2 NN |
1571 | Use to measure compiler performance and locate |
1572 | unused parts of the compiler. With LEVEL, specify | |
1573 | optimization. Values are opt, noopt, | |
1574 | default is noopt | |
1575 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
00020c16 | 1576 | --enable-build-with-cxx build with C++ compiler instead of C compiler |
ba479fd2 NN |
1577 | --enable-multilib enable library support for multiple ABIs |
1578 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
79b87c74 MM |
1579 | --enable-decimal-float={no,yes,bid,dpd} |
1580 | enable decimal float extension to C. Selecting 'bid' | |
1581 | or 'dpd' choses which decimal floating point format | |
1582 | to use | |
ab22c1fa | 1583 | --enable-fixed-point enable fixed-point arithmetic extension to C |
ba479fd2 NN |
1584 | --enable-threads enable thread usage for target GCC |
1585 | --enable-threads=LIB use LIB thread package for target GCC | |
8dea1cca DD |
1586 | --enable-tls enable or disable generation of tls code |
1587 | overriding the assembler check for tls support | |
ba479fd2 NN |
1588 | --enable-objc-gc enable the use of Boehm's garbage collector with |
1589 | the GNU Objective-C runtime | |
1590 | --disable-shared don't provide a shared libgcc | |
1591 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 1592 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 1593 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
1594 | --enable-initfini-array use .init_array/.fini_array sections |
1595 | --enable-sjlj-exceptions | |
1596 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 1597 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ad211091 KT |
1598 | --enable-leading-mingw64-underscores |
1599 | Enable leading underscores on 64 bit mingw targets | |
922e3e33 | 1600 | --enable-cld enable -mcld by default for 32bit x86 |
d79389af | 1601 | --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86 |
ba479fd2 NN |
1602 | --disable-win32-registry |
1603 | disable lookup of installation paths in the | |
1604 | Registry on Windows hosts | |
1605 | --enable-win32-registry enable registry lookup (default) | |
1606 | --enable-win32-registry=KEY | |
1607 | use KEY instead of GCC version as the last portion | |
1608 | of the registry key | |
5213506e RW |
1609 | --enable-shared[=PKGS] build shared libraries [default=yes] |
1610 | --enable-static[=PKGS] build static libraries [default=yes] | |
da0f6381 PB |
1611 | --enable-fast-install[=PKGS] |
1612 | optimize for fast installation [default=yes] | |
1613 | --disable-libtool-lock avoid locking (might break parallel builds) | |
55c4f715 | 1614 | --enable-comdat enable COMDAT group support |
e31bcd1b JM |
1615 | --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on |
1616 | glibc systems | |
cd533689 PP |
1617 | --enable-linker-build-id |
1618 | compiler will always pass --build-id to linker | |
ba479fd2 NN |
1619 | --enable-maintainer-mode |
1620 | enable make rules and dependencies not useful | |
1621 | (and sometimes confusing) to the casual installer | |
1622 | --enable-version-specific-runtime-libs | |
1623 | specify that runtime libraries should be | |
1624 | installed in a compiler-specific directory | |
68a607d8 | 1625 | --enable-plugin enable plugin support |
093e61a6 | 1626 | |
ba479fd2 NN |
1627 | Optional Packages: |
1628 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1629 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1546bb64 | 1630 | --with-build-libsubdir=DIR Directory where to find libraries for build system |
ba479fd2 NN |
1631 | --with-local-prefix=DIR specifies directory to put local include |
1632 | --with-gxx-include-dir=DIR | |
1633 | specifies directory to put g++ header files | |
1634 | --with-cpp-install-dir=DIR | |
1635 | install the user visible C preprocessor in DIR | |
1636 | (relative to PREFIX) as well as PREFIX/bin | |
1637 | --with-gnu-ld arrange to work with GNU ld. | |
1638 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 1639 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
1640 | --with-gnu-as arrange to work with GNU as |
1641 | --with-as arrange to use the specified as (full pathname) | |
1642 | --with-stabs arrange to use stabs instead of host debug format | |
1643 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
1644 | --with-build-sysroot=sysroot |
1645 | use sysroot as the system root during the build | |
ba479fd2 | 1646 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
e11ddaf5 | 1647 | --with-specs=SPECS add SPECS to driver command-line processing |
2f41c1d6 PB |
1648 | --with-pkgversion=PKG Use PKG in the version string in place of "GCC" |
1649 | --with-bugurl=URL Direct users to URL to report a bug | |
aca600aa | 1650 | --with-multilib-list Select multilibs (SH only) |
dfb77e37 KC |
1651 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1652 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1653 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 1654 | --with-system-libunwind use installed libunwind |
da0f6381 PB |
1655 | --with-pic try to use only PIC/non-PIC objects [default=use |
1656 | both] | |
1657 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | |
5938f74d | 1658 | --with-plugin-ld=[ARG] specify the plugin linker |
ed965309 | 1659 | --with-long-double-128 Use 128-bit long double by default. |
59415997 | 1660 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
1661 | with the compiler |
1662 | --with-system-zlib use installed libz | |
22482f74 | 1663 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] |
13c22933 | 1664 | |
ba479fd2 NN |
1665 | Some influential environment variables: |
1666 | CC C compiler command | |
1667 | CFLAGS C compiler flags | |
1668 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1669 | nonstandard directory <lib dir> | |
5213506e RW |
1670 | LIBS libraries to pass to the linker, e.g. -l<library> |
1671 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1672 | you have headers in a nonstandard directory <include dir> | |
00020c16 ILT |
1673 | CXX C++ compiler command |
1674 | CXXFLAGS C++ compiler flags | |
ba479fd2 | 1675 | CPP C preprocessor |
00020c16 | 1676 | CXXCPP C++ preprocessor |
6de9cd9a DN |
1677 | GMPLIBS How to link GMP |
1678 | GMPINC How to find GMP include files | |
f8bf9252 SP |
1679 | PPLLIBS How to link PPL |
1680 | PPLINC How to find PPL include files | |
1681 | CLOOGLIBS How to link CLOOG | |
1682 | CLOOGINC How to find CLOOG include files | |
d7f09764 DN |
1683 | LIBELFLIBS How to link libelf |
1684 | LIBELFINC How to find libelf include files | |
13c22933 | 1685 | |
ba479fd2 NN |
1686 | Use these variables to override the choices made by `configure' or to help |
1687 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 1688 | |
5213506e | 1689 | Report bugs to the package provider. |
ba479fd2 | 1690 | _ACEOF |
5213506e | 1691 | ac_status=$? |
ba479fd2 | 1692 | fi |
6e3f3080 | 1693 | |
ba479fd2 NN |
1694 | if test "$ac_init_help" = "recursive"; then |
1695 | # If there are subdirs, report their specific --help. | |
ba479fd2 | 1696 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
5213506e RW |
1697 | test -d "$ac_dir" || |
1698 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1699 | continue | |
ba479fd2 NN |
1700 | ac_builddir=. |
1701 | ||
5213506e RW |
1702 | case "$ac_dir" in |
1703 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1704 | *) | |
1705 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1706 | # A ".." for each directory in $ac_dir_suffix. | |
1707 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1708 | case $ac_top_builddir_sub in | |
1709 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1710 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1711 | esac ;; | |
1712 | esac | |
1713 | ac_abs_top_builddir=$ac_pwd | |
1714 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1715 | # for backward compatibility: | |
1716 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
1717 | |
1718 | case $srcdir in | |
5213506e | 1719 | .) # We are building in place. |
ba479fd2 | 1720 | ac_srcdir=. |
5213506e RW |
1721 | ac_top_srcdir=$ac_top_builddir_sub |
1722 | ac_abs_top_srcdir=$ac_pwd ;; | |
1723 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 1724 | ac_srcdir=$srcdir$ac_dir_suffix; |
5213506e RW |
1725 | ac_top_srcdir=$srcdir |
1726 | ac_abs_top_srcdir=$srcdir ;; | |
1727 | *) # Relative name. | |
1728 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1729 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1730 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
86da66b5 | 1731 | esac |
5213506e RW |
1732 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1733 | ||
1734 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1735 | # Check for guested configure. | |
1736 | if test -f "$ac_srcdir/configure.gnu"; then | |
1737 | echo && | |
1738 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1739 | elif test -f "$ac_srcdir/configure"; then | |
1740 | echo && | |
1741 | $SHELL "$ac_srcdir/configure" --help=recursive | |
ba479fd2 | 1742 | else |
5213506e RW |
1743 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1744 | fi || ac_status=$? | |
1745 | cd "$ac_pwd" || { ac_status=$?; break; } | |
ba479fd2 NN |
1746 | done |
1747 | fi | |
1748 | ||
5213506e | 1749 | test -n "$ac_init_help" && exit $ac_status |
ba479fd2 NN |
1750 | if $ac_init_version; then |
1751 | cat <<\_ACEOF | |
5213506e RW |
1752 | configure |
1753 | generated by GNU Autoconf 2.64 | |
ba479fd2 | 1754 | |
5213506e | 1755 | Copyright (C) 2009 Free Software Foundation, Inc. |
ba479fd2 NN |
1756 | This configure script is free software; the Free Software Foundation |
1757 | gives unlimited permission to copy, distribute and modify it. | |
1758 | _ACEOF | |
5213506e | 1759 | exit |
ba479fd2 | 1760 | fi |
ba479fd2 | 1761 | |
5213506e RW |
1762 | ## ------------------------ ## |
1763 | ## Autoconf initialization. ## | |
1764 | ## ------------------------ ## | |
ba479fd2 | 1765 | |
5213506e RW |
1766 | # ac_fn_c_try_compile LINENO |
1767 | # -------------------------- | |
1768 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1769 | ac_fn_c_try_compile () | |
ba479fd2 | 1770 | { |
5213506e RW |
1771 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1772 | rm -f conftest.$ac_objext | |
1773 | if { { ac_try="$ac_compile" | |
1774 | case "(($ac_try" in | |
1775 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1776 | *) ac_try_echo=$ac_try;; | |
1777 | esac | |
1778 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1779 | $as_echo "$ac_try_echo"; } >&5 | |
1780 | (eval "$ac_compile") 2>conftest.err | |
1781 | ac_status=$? | |
1782 | if test -s conftest.err; then | |
1783 | grep -v '^ *+' conftest.err >conftest.er1 | |
1784 | cat conftest.er1 >&5 | |
1785 | mv -f conftest.er1 conftest.err | |
1786 | fi | |
1787 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1788 | test $ac_status = 0; } && { | |
1789 | test -z "$ac_c_werror_flag" || | |
1790 | test ! -s conftest.err | |
1791 | } && test -s conftest.$ac_objext; then : | |
1792 | ac_retval=0 | |
1793 | else | |
1794 | $as_echo "$as_me: failed program was:" >&5 | |
1795 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1796 | |
5213506e RW |
1797 | ac_retval=1 |
1798 | fi | |
1799 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1800 | return $ac_retval | |
ba479fd2 | 1801 | |
5213506e | 1802 | } # ac_fn_c_try_compile |
ba479fd2 | 1803 | |
5213506e RW |
1804 | # ac_fn_cxx_try_compile LINENO |
1805 | # ---------------------------- | |
1806 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1807 | ac_fn_cxx_try_compile () | |
1808 | { | |
1809 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1810 | rm -f conftest.$ac_objext | |
1811 | if { { ac_try="$ac_compile" | |
1812 | case "(($ac_try" in | |
1813 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1814 | *) ac_try_echo=$ac_try;; | |
1815 | esac | |
1816 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1817 | $as_echo "$ac_try_echo"; } >&5 | |
1818 | (eval "$ac_compile") 2>conftest.err | |
1819 | ac_status=$? | |
1820 | if test -s conftest.err; then | |
1821 | grep -v '^ *+' conftest.err >conftest.er1 | |
1822 | cat conftest.er1 >&5 | |
1823 | mv -f conftest.er1 conftest.err | |
1824 | fi | |
1825 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1826 | test $ac_status = 0; } && { | |
1827 | test -z "$ac_cxx_werror_flag" || | |
1828 | test ! -s conftest.err | |
1829 | } && test -s conftest.$ac_objext; then : | |
1830 | ac_retval=0 | |
1831 | else | |
1832 | $as_echo "$as_me: failed program was:" >&5 | |
1833 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1834 | |
5213506e RW |
1835 | ac_retval=1 |
1836 | fi | |
1837 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1838 | return $ac_retval | |
ba479fd2 | 1839 | |
5213506e | 1840 | } # ac_fn_cxx_try_compile |
ba479fd2 | 1841 | |
5213506e RW |
1842 | # ac_fn_c_try_cpp LINENO |
1843 | # ---------------------- | |
1844 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1845 | ac_fn_c_try_cpp () | |
1846 | { | |
1847 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1848 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1849 | case "(($ac_try" in | |
1850 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1851 | *) ac_try_echo=$ac_try;; | |
1852 | esac | |
1853 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1854 | $as_echo "$ac_try_echo"; } >&5 | |
1855 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1856 | ac_status=$? | |
1857 | if test -s conftest.err; then | |
1858 | grep -v '^ *+' conftest.err >conftest.er1 | |
1859 | cat conftest.er1 >&5 | |
1860 | mv -f conftest.er1 conftest.err | |
1861 | fi | |
1862 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1863 | test $ac_status = 0; } >/dev/null && { | |
1864 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1865 | test ! -s conftest.err | |
1866 | }; then : | |
1867 | ac_retval=0 | |
1868 | else | |
1869 | $as_echo "$as_me: failed program was:" >&5 | |
1870 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1871 | |
5213506e RW |
1872 | ac_retval=1 |
1873 | fi | |
1874 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1875 | return $ac_retval | |
ba479fd2 | 1876 | |
5213506e | 1877 | } # ac_fn_c_try_cpp |
ba479fd2 | 1878 | |
5213506e RW |
1879 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1880 | # ------------------------------------------------------- | |
1881 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1882 | # the include files in INCLUDES and setting the cache variable VAR | |
1883 | # accordingly. | |
1884 | ac_fn_c_check_header_mongrel () | |
1885 | { | |
1886 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1887 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1889 | $as_echo_n "checking for $2... " >&6; } | |
1890 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1891 | $as_echo_n "(cached) " >&6 | |
1892 | fi | |
1893 | eval ac_res=\$$3 | |
1894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1895 | $as_echo "$ac_res" >&6; } | |
1896 | else | |
1897 | # Is the header compilable? | |
1898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1899 | $as_echo_n "checking $2 usability... " >&6; } | |
1900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1901 | /* end confdefs.h. */ | |
1902 | $4 | |
1903 | #include <$2> | |
ba479fd2 | 1904 | _ACEOF |
5213506e RW |
1905 | if ac_fn_c_try_compile "$LINENO"; then : |
1906 | ac_header_compiler=yes | |
1907 | else | |
1908 | ac_header_compiler=no | |
1909 | fi | |
1910 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1912 | $as_echo "$ac_header_compiler" >&6; } | |
ba479fd2 | 1913 | |
5213506e RW |
1914 | # Is the header present? |
1915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1916 | $as_echo_n "checking $2 presence... " >&6; } | |
1917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1918 | /* end confdefs.h. */ | |
1919 | #include <$2> | |
1920 | _ACEOF | |
1921 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1922 | ac_header_preproc=yes | |
1923 | else | |
1924 | ac_header_preproc=no | |
1925 | fi | |
1926 | rm -f conftest.err conftest.$ac_ext | |
1927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1928 | $as_echo "$ac_header_preproc" >&6; } | |
ba479fd2 | 1929 | |
5213506e RW |
1930 | # So? What about this header? |
1931 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1932 | yes:no: ) | |
1933 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1934 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1935 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1936 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1937 | ;; | |
1938 | no:yes:* ) | |
1939 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1940 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1941 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1942 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1943 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1944 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1945 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1946 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1947 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1948 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1949 | ;; | |
1950 | esac | |
1951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1952 | $as_echo_n "checking for $2... " >&6; } | |
1953 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1954 | $as_echo_n "(cached) " >&6 | |
1955 | else | |
1956 | eval "$3=\$ac_header_compiler" | |
1957 | fi | |
1958 | eval ac_res=\$$3 | |
1959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1960 | $as_echo "$ac_res" >&6; } | |
1961 | fi | |
1962 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 1963 | |
5213506e | 1964 | } # ac_fn_c_check_header_mongrel |
ba479fd2 | 1965 | |
5213506e RW |
1966 | # ac_fn_c_try_run LINENO |
1967 | # ---------------------- | |
1968 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1969 | # that executables *can* be run. | |
1970 | ac_fn_c_try_run () | |
b61ff9c8 | 1971 | { |
5213506e RW |
1972 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1973 | if { { ac_try="$ac_link" | |
1974 | case "(($ac_try" in | |
1975 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1976 | *) ac_try_echo=$ac_try;; | |
1977 | esac | |
1978 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1979 | $as_echo "$ac_try_echo"; } >&5 | |
1980 | (eval "$ac_link") 2>&5 | |
1981 | ac_status=$? | |
1982 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1983 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1984 | { { case "(($ac_try" in | |
1985 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1986 | *) ac_try_echo=$ac_try;; | |
1987 | esac | |
1988 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1989 | $as_echo "$ac_try_echo"; } >&5 | |
1990 | (eval "$ac_try") 2>&5 | |
1991 | ac_status=$? | |
1992 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1993 | test $ac_status = 0; }; }; then : | |
1994 | ac_retval=0 | |
1995 | else | |
1996 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1997 | $as_echo "$as_me: failed program was:" >&5 | |
1998 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 1999 | |
5213506e RW |
2000 | ac_retval=$ac_status |
2001 | fi | |
2002 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2003 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2004 | return $ac_retval | |
ba479fd2 | 2005 | |
5213506e | 2006 | } # ac_fn_c_try_run |
ba479fd2 | 2007 | |
5213506e RW |
2008 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2009 | # ------------------------------------------------------- | |
2010 | # Tests whether HEADER exists and can be compiled using the include files in | |
2011 | # INCLUDES, setting the cache variable VAR accordingly. | |
2012 | ac_fn_c_check_header_compile () | |
2013 | { | |
2014 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2016 | $as_echo_n "checking for $2... " >&6; } | |
2017 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2018 | $as_echo_n "(cached) " >&6 | |
2019 | else | |
2020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2021 | /* end confdefs.h. */ | |
2022 | $4 | |
2023 | #include <$2> | |
ba479fd2 | 2024 | _ACEOF |
5213506e RW |
2025 | if ac_fn_c_try_compile "$LINENO"; then : |
2026 | eval "$3=yes" | |
2027 | else | |
2028 | eval "$3=no" | |
2029 | fi | |
2030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2031 | fi | |
2032 | eval ac_res=\$$3 | |
2033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2034 | $as_echo "$ac_res" >&6; } | |
2035 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 2036 | |
5213506e | 2037 | } # ac_fn_c_check_header_compile |
ba479fd2 | 2038 | |
5213506e RW |
2039 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2040 | # -------------------------------------------- | |
2041 | # Tries to find the compile-time value of EXPR in a program that includes | |
2042 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2043 | # computed | |
2044 | ac_fn_c_compute_int () | |
2045 | { | |
2046 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2047 | if test "$cross_compiling" = yes; then | |
2048 | # Depending upon the size, compute the lo and hi bounds. | |
2049 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2050 | /* end confdefs.h. */ | |
2051 | $4 | |
2052 | int | |
2053 | main () | |
2054 | { | |
2055 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2056 | test_array [0] = 0 | |
ba479fd2 | 2057 | |
5213506e RW |
2058 | ; |
2059 | return 0; | |
2060 | } | |
ba479fd2 | 2061 | _ACEOF |
5213506e RW |
2062 | if ac_fn_c_try_compile "$LINENO"; then : |
2063 | ac_lo=0 ac_mid=0 | |
2064 | while :; do | |
2065 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2066 | /* end confdefs.h. */ | |
2067 | $4 | |
2068 | int | |
2069 | main () | |
2070 | { | |
2071 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2072 | test_array [0] = 0 | |
ba479fd2 | 2073 | |
5213506e RW |
2074 | ; |
2075 | return 0; | |
2076 | } | |
ba479fd2 | 2077 | _ACEOF |
5213506e RW |
2078 | if ac_fn_c_try_compile "$LINENO"; then : |
2079 | ac_hi=$ac_mid; break | |
2080 | else | |
2081 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2082 | if test $ac_lo -le $ac_mid; then | |
2083 | ac_lo= ac_hi= | |
2084 | break | |
2085 | fi | |
2086 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2087 | fi | |
2088 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2089 | done | |
2090 | else | |
2091 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2092 | /* end confdefs.h. */ | |
2093 | $4 | |
2094 | int | |
2095 | main () | |
2096 | { | |
2097 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2098 | test_array [0] = 0 | |
ba479fd2 | 2099 | |
5213506e RW |
2100 | ; |
2101 | return 0; | |
2102 | } | |
ba479fd2 | 2103 | _ACEOF |
5213506e RW |
2104 | if ac_fn_c_try_compile "$LINENO"; then : |
2105 | ac_hi=-1 ac_mid=-1 | |
2106 | while :; do | |
2107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2108 | /* end confdefs.h. */ | |
2109 | $4 | |
2110 | int | |
2111 | main () | |
2112 | { | |
2113 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2114 | test_array [0] = 0 | |
ba479fd2 | 2115 | |
5213506e RW |
2116 | ; |
2117 | return 0; | |
2118 | } | |
2119 | _ACEOF | |
2120 | if ac_fn_c_try_compile "$LINENO"; then : | |
2121 | ac_lo=$ac_mid; break | |
2122 | else | |
2123 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2124 | if test $ac_mid -le $ac_hi; then | |
2125 | ac_lo= ac_hi= | |
2126 | break | |
2127 | fi | |
2128 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
ba479fd2 | 2129 | fi |
5213506e RW |
2130 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2131 | done | |
ba479fd2 | 2132 | else |
5213506e | 2133 | ac_lo= ac_hi= |
ba479fd2 | 2134 | fi |
5213506e RW |
2135 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2136 | fi | |
2137 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2138 | # Binary search between lo and hi bounds. | |
2139 | while test "x$ac_lo" != "x$ac_hi"; do | |
2140 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2142 | /* end confdefs.h. */ | |
2143 | $4 | |
2144 | int | |
2145 | main () | |
2146 | { | |
2147 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2148 | test_array [0] = 0 | |
ba479fd2 | 2149 | |
5213506e RW |
2150 | ; |
2151 | return 0; | |
2152 | } | |
2153 | _ACEOF | |
2154 | if ac_fn_c_try_compile "$LINENO"; then : | |
2155 | ac_hi=$ac_mid | |
2156 | else | |
2157 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
ba479fd2 | 2158 | fi |
5213506e RW |
2159 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2160 | done | |
2161 | case $ac_lo in #(( | |
2162 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2163 | '') ac_retval=1 ;; | |
2164 | esac | |
2165 | else | |
2166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2167 | /* end confdefs.h. */ | |
2168 | $4 | |
2169 | static long int longval () { return $2; } | |
2170 | static unsigned long int ulongval () { return $2; } | |
2171 | #include <stdio.h> | |
2172 | #include <stdlib.h> | |
2173 | int | |
2174 | main () | |
2175 | { | |
ba479fd2 | 2176 | |
5213506e RW |
2177 | FILE *f = fopen ("conftest.val", "w"); |
2178 | if (! f) | |
2179 | return 1; | |
2180 | if (($2) < 0) | |
2181 | { | |
2182 | long int i = longval (); | |
2183 | if (i != ($2)) | |
2184 | return 1; | |
2185 | fprintf (f, "%ld", i); | |
2186 | } | |
2187 | else | |
2188 | { | |
2189 | unsigned long int i = ulongval (); | |
2190 | if (i != ($2)) | |
2191 | return 1; | |
2192 | fprintf (f, "%lu", i); | |
2193 | } | |
2194 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2195 | on some platforms. */ | |
2196 | return ferror (f) || fclose (f) != 0; | |
ba479fd2 | 2197 | |
5213506e RW |
2198 | ; |
2199 | return 0; | |
2200 | } | |
2201 | _ACEOF | |
2202 | if ac_fn_c_try_run "$LINENO"; then : | |
2203 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2204 | else | |
2205 | ac_retval=1 | |
2206 | fi | |
2207 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2208 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2209 | rm -f conftest.val | |
ba479fd2 | 2210 | |
5213506e RW |
2211 | fi |
2212 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2213 | return $ac_retval | |
ba479fd2 | 2214 | |
5213506e | 2215 | } # ac_fn_c_compute_int |
ba479fd2 | 2216 | |
5213506e RW |
2217 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2218 | # ------------------------------------------- | |
2219 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2220 | # variable VAR accordingly. | |
2221 | ac_fn_c_check_type () | |
2222 | { | |
2223 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2225 | $as_echo_n "checking for $2... " >&6; } | |
2226 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2227 | $as_echo_n "(cached) " >&6 | |
2228 | else | |
2229 | eval "$3=no" | |
2230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2231 | /* end confdefs.h. */ | |
2232 | $4 | |
2233 | int | |
2234 | main () | |
2235 | { | |
2236 | if (sizeof ($2)) | |
2237 | return 0; | |
2238 | ; | |
2239 | return 0; | |
2240 | } | |
2241 | _ACEOF | |
2242 | if ac_fn_c_try_compile "$LINENO"; then : | |
2243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2244 | /* end confdefs.h. */ | |
2245 | $4 | |
2246 | int | |
2247 | main () | |
2248 | { | |
2249 | if (sizeof (($2))) | |
2250 | return 0; | |
2251 | ; | |
2252 | return 0; | |
2253 | } | |
2254 | _ACEOF | |
2255 | if ac_fn_c_try_compile "$LINENO"; then : | |
ba479fd2 | 2256 | |
5213506e RW |
2257 | else |
2258 | eval "$3=yes" | |
2259 | fi | |
2260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2261 | fi | |
2262 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2263 | fi | |
2264 | eval ac_res=\$$3 | |
2265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2266 | $as_echo "$ac_res" >&6; } | |
2267 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 2268 | |
5213506e | 2269 | } # ac_fn_c_check_type |
ba479fd2 | 2270 | |
fa802374 KT |
2271 | # ac_fn_c_find_intX_t LINENO BITS VAR |
2272 | # ----------------------------------- | |
2273 | # Finds a signed integer type with width BITS, setting cache variable VAR | |
2274 | # accordingly. | |
2275 | ac_fn_c_find_intX_t () | |
5213506e RW |
2276 | { |
2277 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
fa802374 KT |
2278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 |
2279 | $as_echo_n "checking for int$2_t... " >&6; } | |
5213506e RW |
2280 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
2281 | $as_echo_n "(cached) " >&6 | |
2282 | else | |
fa802374 KT |
2283 | eval "$3=no" |
2284 | for ac_type in int$2_t 'int' 'long int' \ | |
2285 | 'long long int' 'short int' 'signed char'; do | |
2286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2287 | /* end confdefs.h. */ | |
2288 | $ac_includes_default | |
2289 | int | |
2290 | main () | |
2291 | { | |
2292 | static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))]; | |
2293 | test_array [0] = 0 | |
2294 | ||
2295 | ; | |
2296 | return 0; | |
2297 | } | |
2298 | _ACEOF | |
2299 | if ac_fn_c_try_compile "$LINENO"; then : | |
5213506e RW |
2300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2301 | /* end confdefs.h. */ | |
fa802374 KT |
2302 | $ac_includes_default |
2303 | int | |
2304 | main () | |
2305 | { | |
2306 | static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1) | |
2307 | < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))]; | |
2308 | test_array [0] = 0 | |
2309 | ||
2310 | ; | |
2311 | return 0; | |
2312 | } | |
5213506e | 2313 | _ACEOF |
fa802374 KT |
2314 | if ac_fn_c_try_compile "$LINENO"; then : |
2315 | ||
5213506e | 2316 | else |
fa802374 KT |
2317 | case $ac_type in #( |
2318 | int$2_t) : | |
2319 | eval "$3=yes" ;; #( | |
2320 | *) : | |
2321 | eval "$3=\$ac_type" ;; | |
2322 | esac | |
5213506e | 2323 | fi |
fa802374 KT |
2324 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2325 | fi | |
2326 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2327 | eval as_val=\$$3 | |
2328 | if test "x$as_val" = x""no; then : | |
2329 | ||
2330 | else | |
2331 | break | |
2332 | fi | |
2333 | done | |
5213506e RW |
2334 | fi |
2335 | eval ac_res=\$$3 | |
2336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2337 | $as_echo "$ac_res" >&6; } | |
2338 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
ba479fd2 | 2339 | |
fa802374 | 2340 | } # ac_fn_c_find_intX_t |
18c04407 | 2341 | |
5213506e RW |
2342 | # ac_fn_c_try_link LINENO |
2343 | # ----------------------- | |
2344 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2345 | ac_fn_c_try_link () | |
2346 | { | |
2347 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2348 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2349 | if { { ac_try="$ac_link" | |
2350 | case "(($ac_try" in | |
2351 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2352 | *) ac_try_echo=$ac_try;; | |
2353 | esac | |
2354 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2355 | $as_echo "$ac_try_echo"; } >&5 | |
2356 | (eval "$ac_link") 2>conftest.err | |
2357 | ac_status=$? | |
2358 | if test -s conftest.err; then | |
2359 | grep -v '^ *+' conftest.err >conftest.er1 | |
2360 | cat conftest.er1 >&5 | |
2361 | mv -f conftest.er1 conftest.err | |
2362 | fi | |
2363 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2364 | test $ac_status = 0; } && { | |
2365 | test -z "$ac_c_werror_flag" || | |
2366 | test ! -s conftest.err | |
2367 | } && test -s conftest$ac_exeext && { | |
2368 | test "$cross_compiling" = yes || | |
2369 | $as_test_x conftest$ac_exeext | |
2370 | }; then : | |
2371 | ac_retval=0 | |
2372 | else | |
2373 | $as_echo "$as_me: failed program was:" >&5 | |
2374 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18c04407 | 2375 | |
5213506e RW |
2376 | ac_retval=1 |
2377 | fi | |
2378 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2379 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2380 | # interfere with the next link command; also delete a directory that is | |
2381 | # left behind by Apple's compiler. We do this before executing the actions. | |
2382 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2383 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2384 | return $ac_retval | |
18c04407 | 2385 | |
5213506e | 2386 | } # ac_fn_c_try_link |
ba479fd2 | 2387 | |
fa802374 KT |
2388 | # ac_fn_c_find_uintX_t LINENO BITS VAR |
2389 | # ------------------------------------ | |
2390 | # Finds an unsigned integer type with width BITS, setting cache variable VAR | |
2391 | # accordingly. | |
2392 | ac_fn_c_find_uintX_t () | |
2393 | { | |
2394 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 | |
2396 | $as_echo_n "checking for uint$2_t... " >&6; } | |
2397 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2398 | $as_echo_n "(cached) " >&6 | |
2399 | else | |
2400 | eval "$3=no" | |
2401 | for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ | |
2402 | 'unsigned long long int' 'unsigned short int' 'unsigned char'; do | |
2403 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2404 | /* end confdefs.h. */ | |
2405 | $ac_includes_default | |
2406 | int | |
2407 | main () | |
2408 | { | |
2409 | static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)]; | |
2410 | test_array [0] = 0 | |
2411 | ||
2412 | ; | |
2413 | return 0; | |
2414 | } | |
2415 | _ACEOF | |
2416 | if ac_fn_c_try_compile "$LINENO"; then : | |
2417 | case $ac_type in #( | |
2418 | uint$2_t) : | |
2419 | eval "$3=yes" ;; #( | |
2420 | *) : | |
2421 | eval "$3=\$ac_type" ;; | |
2422 | esac | |
2423 | fi | |
2424 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2425 | eval as_val=\$$3 | |
2426 | if test "x$as_val" = x""no; then : | |
2427 | ||
2428 | else | |
2429 | break | |
2430 | fi | |
2431 | done | |
2432 | fi | |
2433 | eval ac_res=\$$3 | |
2434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2435 | $as_echo "$ac_res" >&6; } | |
2436 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2437 | ||
2438 | } # ac_fn_c_find_uintX_t | |
2439 | ||
2440 | # ac_fn_c_check_header_preproc LINENO HEADER VAR | |
2441 | # ---------------------------------------------- | |
2442 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2443 | ac_fn_c_check_header_preproc () | |
2444 | { | |
2445 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2447 | $as_echo_n "checking for $2... " >&6; } | |
2448 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2449 | $as_echo_n "(cached) " >&6 | |
2450 | else | |
2451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2452 | /* end confdefs.h. */ | |
2453 | #include <$2> | |
2454 | _ACEOF | |
2455 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2456 | eval "$3=yes" | |
2457 | else | |
2458 | eval "$3=no" | |
2459 | fi | |
2460 | rm -f conftest.err conftest.$ac_ext | |
2461 | fi | |
2462 | eval ac_res=\$$3 | |
2463 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2464 | $as_echo "$ac_res" >&6; } | |
2465 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2466 | ||
2467 | } # ac_fn_c_check_header_preproc | |
2468 | ||
5213506e RW |
2469 | # ac_fn_c_check_func LINENO FUNC VAR |
2470 | # ---------------------------------- | |
2471 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2472 | ac_fn_c_check_func () | |
2473 | { | |
2474 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2475 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2476 | $as_echo_n "checking for $2... " >&6; } | |
2477 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2478 | $as_echo_n "(cached) " >&6 | |
2479 | else | |
2480 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2481 | /* end confdefs.h. */ | |
2482 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2483 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2484 | #define $2 innocuous_$2 | |
ba479fd2 | 2485 | |
5213506e RW |
2486 | /* System header to define __stub macros and hopefully few prototypes, |
2487 | which can conflict with char $2 (); below. | |
2488 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2489 | <limits.h> exists even on freestanding compilers. */ | |
914c5af7 | 2490 | |
5213506e RW |
2491 | #ifdef __STDC__ |
2492 | # include <limits.h> | |
2493 | #else | |
2494 | # include <assert.h> | |
2495 | #endif | |
ba479fd2 | 2496 | |
5213506e | 2497 | #undef $2 |
ba479fd2 | 2498 | |
5213506e RW |
2499 | /* Override any GCC internal prototype to avoid an error. |
2500 | Use char because int might match the return type of a GCC | |
2501 | builtin and then its argument prototype would still apply. */ | |
2502 | #ifdef __cplusplus | |
2503 | extern "C" | |
2504 | #endif | |
2505 | char $2 (); | |
2506 | /* The GNU C library defines this for functions which it implements | |
2507 | to always fail with ENOSYS. Some functions are actually named | |
2508 | something starting with __ and the normal name is an alias. */ | |
2509 | #if defined __stub_$2 || defined __stub___$2 | |
2510 | choke me | |
2511 | #endif | |
9f18db39 | 2512 | |
5213506e RW |
2513 | int |
2514 | main () | |
2515 | { | |
2516 | return $2 (); | |
2517 | ; | |
2518 | return 0; | |
2519 | } | |
2520 | _ACEOF | |
2521 | if ac_fn_c_try_link "$LINENO"; then : | |
2522 | eval "$3=yes" | |
2523 | else | |
2524 | eval "$3=no" | |
ba479fd2 | 2525 | fi |
5213506e RW |
2526 | rm -f core conftest.err conftest.$ac_objext \ |
2527 | conftest$ac_exeext conftest.$ac_ext | |
2528 | fi | |
2529 | eval ac_res=\$$3 | |
2530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2531 | $as_echo "$ac_res" >&6; } | |
2532 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
b61ff9c8 | 2533 | |
5213506e | 2534 | } # ac_fn_c_check_func |
b61ff9c8 | 2535 | |
5213506e RW |
2536 | # ac_fn_cxx_try_cpp LINENO |
2537 | # ------------------------ | |
2538 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2539 | ac_fn_cxx_try_cpp () | |
2540 | { | |
2541 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2542 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2543 | case "(($ac_try" in | |
2544 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2545 | *) ac_try_echo=$ac_try;; | |
2546 | esac | |
2547 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2548 | $as_echo "$ac_try_echo"; } >&5 | |
2549 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2550 | ac_status=$? | |
2551 | if test -s conftest.err; then | |
2552 | grep -v '^ *+' conftest.err >conftest.er1 | |
2553 | cat conftest.er1 >&5 | |
2554 | mv -f conftest.er1 conftest.err | |
2555 | fi | |
2556 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2557 | test $ac_status = 0; } >/dev/null && { | |
2558 | test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || | |
2559 | test ! -s conftest.err | |
2560 | }; then : | |
2561 | ac_retval=0 | |
2562 | else | |
2563 | $as_echo "$as_me: failed program was:" >&5 | |
2564 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 2565 | |
5213506e | 2566 | ac_retval=1 |
ba479fd2 | 2567 | fi |
5213506e RW |
2568 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
2569 | return $ac_retval | |
b61ff9c8 | 2570 | |
5213506e | 2571 | } # ac_fn_cxx_try_cpp |
b61ff9c8 | 2572 | |
5213506e RW |
2573 | # ac_fn_cxx_try_link LINENO |
2574 | # ------------------------- | |
2575 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2576 | ac_fn_cxx_try_link () | |
2577 | { | |
2578 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2579 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2580 | if { { ac_try="$ac_link" | |
2581 | case "(($ac_try" in | |
2582 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2583 | *) ac_try_echo=$ac_try;; | |
2584 | esac | |
2585 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2586 | $as_echo "$ac_try_echo"; } >&5 | |
2587 | (eval "$ac_link") 2>conftest.err | |
2588 | ac_status=$? | |
2589 | if test -s conftest.err; then | |
2590 | grep -v '^ *+' conftest.err >conftest.er1 | |
2591 | cat conftest.er1 >&5 | |
2592 | mv -f conftest.er1 conftest.err | |
2593 | fi | |
2594 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2595 | test $ac_status = 0; } && { | |
2596 | test -z "$ac_cxx_werror_flag" || | |
2597 | test ! -s conftest.err | |
2598 | } && test -s conftest$ac_exeext && { | |
2599 | test "$cross_compiling" = yes || | |
2600 | $as_test_x conftest$ac_exeext | |
2601 | }; then : | |
2602 | ac_retval=0 | |
2603 | else | |
2604 | $as_echo "$as_me: failed program was:" >&5 | |
2605 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 2606 | |
5213506e | 2607 | ac_retval=1 |
ba479fd2 | 2608 | fi |
5213506e RW |
2609 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
2610 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2611 | # interfere with the next link command; also delete a directory that is | |
2612 | # left behind by Apple's compiler. We do this before executing the actions. | |
2613 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2614 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2615 | return $ac_retval | |
ba479fd2 | 2616 | |
5213506e RW |
2617 | } # ac_fn_cxx_try_link |
2618 | cat >config.log <<_ACEOF | |
2619 | This file contains any messages produced by compilers while | |
2620 | running configure, to aid debugging if configure makes a mistake. | |
ba479fd2 | 2621 | |
5213506e RW |
2622 | It was created by $as_me, which was |
2623 | generated by GNU Autoconf 2.64. Invocation command line was | |
ba479fd2 | 2624 | |
5213506e | 2625 | $ $0 $@ |
18fc9bd4 | 2626 | |
5213506e RW |
2627 | _ACEOF |
2628 | exec 5>>config.log | |
2629 | { | |
2630 | cat <<_ASUNAME | |
2631 | ## --------- ## | |
2632 | ## Platform. ## | |
2633 | ## --------- ## | |
18fc9bd4 | 2634 | |
5213506e RW |
2635 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2636 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2637 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2638 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2639 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
18fc9bd4 | 2640 | |
5213506e RW |
2641 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2642 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
18fc9bd4 | 2643 | |
5213506e RW |
2644 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2645 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2646 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2647 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2648 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2649 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2650 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
18fc9bd4 | 2651 | |
5213506e | 2652 | _ASUNAME |
8f1529e6 | 2653 | |
5213506e RW |
2654 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2655 | for as_dir in $PATH | |
2656 | do | |
2657 | IFS=$as_save_IFS | |
2658 | test -z "$as_dir" && as_dir=. | |
2659 | $as_echo "PATH: $as_dir" | |
2660 | done | |
2661 | IFS=$as_save_IFS | |
57255173 | 2662 | |
5213506e | 2663 | } >&5 |
57255173 | 2664 | |
5213506e | 2665 | cat >&5 <<_ACEOF |
1546bb64 | 2666 | |
18fc9bd4 | 2667 | |
5213506e RW |
2668 | ## ----------- ## |
2669 | ## Core tests. ## | |
2670 | ## ----------- ## | |
73458fb7 | 2671 | |
ba479fd2 | 2672 | _ACEOF |
13c22933 JJ |
2673 | |
2674 | ||
5213506e RW |
2675 | # Keep a trace of the command line. |
2676 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2677 | # Strip out --silent because we don't want to record it for future runs. | |
2678 | # Also quote any args containing shell meta-characters. | |
2679 | # Make two passes to allow for proper duplicate-argument suppression. | |
2680 | ac_configure_args= | |
2681 | ac_configure_args0= | |
2682 | ac_configure_args1= | |
2683 | ac_must_keep_next=false | |
2684 | for ac_pass in 1 2 | |
00020c16 | 2685 | do |
5213506e RW |
2686 | for ac_arg |
2687 | do | |
2688 | case $ac_arg in | |
2689 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2690 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2691 | | -silent | --silent | --silen | --sile | --sil) | |
2692 | continue ;; | |
2693 | *\'*) | |
2694 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2695 | esac | |
2696 | case $ac_pass in | |
2697 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2698 | 2) | |
2699 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2700 | if test $ac_must_keep_next = true; then | |
2701 | ac_must_keep_next=false # Got value, back to normal. | |
2702 | else | |
2703 | case $ac_arg in | |
2704 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2705 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2706 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2707 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2708 | case "$ac_configure_args0 " in | |
2709 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2710 | esac | |
2711 | ;; | |
2712 | -* ) ac_must_keep_next=true ;; | |
2713 | esac | |
2714 | fi | |
2715 | as_fn_append ac_configure_args " '$ac_arg'" | |
2716 | ;; | |
2717 | esac | |
2718 | done | |
00020c16 | 2719 | done |
5213506e RW |
2720 | { ac_configure_args0=; unset ac_configure_args0;} |
2721 | { ac_configure_args1=; unset ac_configure_args1;} | |
60d26958 | 2722 | |
5213506e RW |
2723 | # When interrupted or exit'd, cleanup temporary files, and complete |
2724 | # config.log. We remove comments because anyway the quotes in there | |
2725 | # would cause problems or look ugly. | |
2726 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2727 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2728 | trap 'exit_status=$? | |
2729 | # Save into config.log some information that might help in debugging. | |
2730 | { | |
2731 | echo | |
1a4b763e | 2732 | |
5213506e RW |
2733 | cat <<\_ASBOX |
2734 | ## ---------------- ## | |
2735 | ## Cache variables. ## | |
2736 | ## ---------------- ## | |
2737 | _ASBOX | |
2738 | echo | |
2739 | # The following way of writing the cache mishandles newlines in values, | |
2740 | ( | |
2741 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2742 | eval ac_val=\$$ac_var | |
2743 | case $ac_val in #( | |
2744 | *${as_nl}*) | |
2745 | case $ac_var in #( | |
2746 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2747 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2748 | esac | |
2749 | case $ac_var in #( | |
2750 | _ | IFS | as_nl) ;; #( | |
2751 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2752 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2753 | esac ;; | |
2754 | esac | |
2755 | done | |
2756 | (set) 2>&1 | | |
2757 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2758 | *${as_nl}ac_space=\ *) | |
2759 | sed -n \ | |
2760 | "s/'\''/'\''\\\\'\'''\''/g; | |
2761 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2762 | ;; #( | |
2763 | *) | |
2764 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2765 | ;; | |
2766 | esac | | |
2767 | sort | |
2768 | ) | |
2769 | echo | |
1a4b763e | 2770 | |
5213506e RW |
2771 | cat <<\_ASBOX |
2772 | ## ----------------- ## | |
2773 | ## Output variables. ## | |
2774 | ## ----------------- ## | |
2775 | _ASBOX | |
2776 | echo | |
2777 | for ac_var in $ac_subst_vars | |
2778 | do | |
2779 | eval ac_val=\$$ac_var | |
2780 | case $ac_val in | |
2781 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2782 | esac | |
2783 | $as_echo "$ac_var='\''$ac_val'\''" | |
2784 | done | sort | |
2785 | echo | |
60d26958 | 2786 | |
5213506e RW |
2787 | if test -n "$ac_subst_files"; then |
2788 | cat <<\_ASBOX | |
2789 | ## ------------------- ## | |
2790 | ## File substitutions. ## | |
2791 | ## ------------------- ## | |
2792 | _ASBOX | |
2793 | echo | |
2794 | for ac_var in $ac_subst_files | |
2795 | do | |
2796 | eval ac_val=\$$ac_var | |
2797 | case $ac_val in | |
2798 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2799 | esac | |
2800 | $as_echo "$ac_var='\''$ac_val'\''" | |
2801 | done | sort | |
2802 | echo | |
2803 | fi | |
60d26958 | 2804 | |
5213506e RW |
2805 | if test -s confdefs.h; then |
2806 | cat <<\_ASBOX | |
2807 | ## ----------- ## | |
2808 | ## confdefs.h. ## | |
2809 | ## ----------- ## | |
2810 | _ASBOX | |
2811 | echo | |
2812 | cat confdefs.h | |
2813 | echo | |
2814 | fi | |
2815 | test "$ac_signal" != 0 && | |
2816 | $as_echo "$as_me: caught signal $ac_signal" | |
2817 | $as_echo "$as_me: exit $exit_status" | |
2818 | } >&5 | |
2819 | rm -f core *.core core.conftest.* && | |
2820 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2821 | exit $exit_status | |
2822 | ' 0 | |
2823 | for ac_signal in 1 2 13 15; do | |
2824 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
00020c16 | 2825 | done |
5213506e | 2826 | ac_signal=0 |
00020c16 | 2827 | |
5213506e RW |
2828 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
2829 | rm -f -r conftest* confdefs.h | |
00020c16 | 2830 | |
5213506e RW |
2831 | $as_echo "/* confdefs.h */" > confdefs.h |
2832 | ||
2833 | # Predefined preprocessor variables. | |
2834 | ||
2835 | cat >>confdefs.h <<_ACEOF | |
2836 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
60d26958 | 2837 | _ACEOF |
60d26958 | 2838 | |
5213506e RW |
2839 | cat >>confdefs.h <<_ACEOF |
2840 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2841 | _ACEOF | |
60d26958 | 2842 | |
5213506e RW |
2843 | cat >>confdefs.h <<_ACEOF |
2844 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
60d26958 | 2845 | _ACEOF |
5213506e RW |
2846 | |
2847 | cat >>confdefs.h <<_ACEOF | |
2848 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
60d26958 | 2849 | _ACEOF |
60d26958 | 2850 | |
5213506e RW |
2851 | cat >>confdefs.h <<_ACEOF |
2852 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2853 | _ACEOF | |
60d26958 | 2854 | |
5213506e RW |
2855 | cat >>confdefs.h <<_ACEOF |
2856 | #define PACKAGE_URL "$PACKAGE_URL" | |
2857 | _ACEOF | |
00020c16 | 2858 | |
60d26958 | 2859 | |
5213506e RW |
2860 | # Let the site file select an alternate cache file if it wants to. |
2861 | # Prefer an explicitly selected file to automatically selected ones. | |
2862 | ac_site_file1=NONE | |
2863 | ac_site_file2=NONE | |
2864 | if test -n "$CONFIG_SITE"; then | |
2865 | ac_site_file1=$CONFIG_SITE | |
2866 | elif test "x$prefix" != xNONE; then | |
2867 | ac_site_file1=$prefix/share/config.site | |
2868 | ac_site_file2=$prefix/etc/config.site | |
2869 | else | |
2870 | ac_site_file1=$ac_default_prefix/share/config.site | |
2871 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2872 | fi | |
2873 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
00020c16 | 2874 | do |
5213506e RW |
2875 | test "x$ac_site_file" = xNONE && continue |
2876 | if test -r "$ac_site_file"; then | |
2877 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2878 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2879 | sed 's/^/| /' "$ac_site_file" >&5 | |
2880 | . "$ac_site_file" | |
60d26958 | 2881 | fi |
5213506e | 2882 | done |
60d26958 | 2883 | |
5213506e RW |
2884 | if test -r "$cache_file"; then |
2885 | # Some versions of bash will fail to source /dev/null (special | |
2886 | # files actually), so we avoid doing that. | |
2887 | if test -f "$cache_file"; then | |
2888 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2889 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2890 | case $cache_file in | |
2891 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2892 | *) . "./$cache_file";; | |
2893 | esac | |
60d26958 PB |
2894 | fi |
2895 | else | |
5213506e RW |
2896 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
2897 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2898 | >$cache_file | |
bf3b7cd3 JD |
2899 | fi |
2900 | ||
5213506e RW |
2901 | # Check that the precious variables saved in the cache have kept the same |
2902 | # value. | |
2903 | ac_cache_corrupted=false | |
2904 | for ac_var in $ac_precious_vars; do | |
2905 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2906 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2907 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2908 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2909 | case $ac_old_set,$ac_new_set in | |
2910 | set,) | |
2911 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2912 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2913 | ac_cache_corrupted=: ;; | |
2914 | ,set) | |
2915 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2916 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2917 | ac_cache_corrupted=: ;; | |
2918 | ,);; | |
2919 | *) | |
2920 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2921 | # differences in whitespace do not lead to failure. | |
2922 | ac_old_val_w=`echo x $ac_old_val` | |
2923 | ac_new_val_w=`echo x $ac_new_val` | |
2924 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2925 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2926 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2927 | ac_cache_corrupted=: | |
2928 | else | |
2929 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2930 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2931 | eval $ac_var=\$ac_old_val | |
2932 | fi | |
2933 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2934 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2935 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2936 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2937 | fi;; | |
2938 | esac | |
2939 | # Pass precious variables to config.status. | |
2940 | if test "$ac_new_set" = set; then | |
2941 | case $ac_new_val in | |
2942 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2943 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2944 | esac | |
2945 | case " $ac_configure_args " in | |
2946 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2947 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2948 | esac | |
2949 | fi | |
60d26958 | 2950 | done |
5213506e RW |
2951 | if $ac_cache_corrupted; then |
2952 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2953 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2954 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2955 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2956 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
60d26958 | 2957 | fi |
5213506e RW |
2958 | ## -------------------- ## |
2959 | ## Main body of script. ## | |
2960 | ## -------------------- ## | |
60d26958 | 2961 | |
00020c16 ILT |
2962 | ac_ext=c |
2963 | ac_cpp='$CPP $CPPFLAGS' | |
2964 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2965 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2966 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
60d26958 | 2967 | |
00020c16 | 2968 | |
bf3b7cd3 | 2969 | |
bf3b7cd3 | 2970 | |
00020c16 | 2971 | |
bf3b7cd3 | 2972 | |
5213506e | 2973 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
bf3b7cd3 | 2974 | |
bf3b7cd3 | 2975 | |
5213506e | 2976 | gcc_version=`cat $srcdir/BASE-VER` |
bf3b7cd3 | 2977 | |
5213506e RW |
2978 | # Determine the host, build, and target systems |
2979 | ac_aux_dir= | |
2980 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
2981 | for ac_t in install-sh install.sh shtool; do | |
2982 | if test -f "$ac_dir/$ac_t"; then | |
2983 | ac_aux_dir=$ac_dir | |
2984 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
2985 | break 2 | |
2986 | fi | |
2987 | done | |
2988 | done | |
2989 | if test -z "$ac_aux_dir"; then | |
2990 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
00020c16 | 2991 | fi |
5213506e RW |
2992 | |
2993 | # These three variables are undocumented and unsupported, | |
2994 | # and are intended to be withdrawn in a future Autoconf release. | |
2995 | # They can cause serious problems if a builder's source tree is in a directory | |
2996 | # whose full name contains unusual characters. | |
2997 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2998 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2999 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3000 | ||
3001 | ||
3002 | # Make sure we can run config.sub. | |
3003 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3004 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3005 | ||
3006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3007 | $as_echo_n "checking build system type... " >&6; } | |
3008 | if test "${ac_cv_build+set}" = set; then : | |
3009 | $as_echo_n "(cached) " >&6 | |
3010 | else | |
3011 | ac_build_alias=$build_alias | |
3012 | test "x$ac_build_alias" = x && | |
3013 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3014 | test "x$ac_build_alias" = x && | |
3015 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3016 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3017 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3018 | ||
3019 | fi | |
3020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3021 | $as_echo "$ac_cv_build" >&6; } | |
3022 | case $ac_cv_build in | |
3023 | *-*-*) ;; | |
3024 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
3025 | esac | |
3026 | build=$ac_cv_build | |
3027 | ac_save_IFS=$IFS; IFS='-' | |
3028 | set x $ac_cv_build | |
3029 | shift | |
3030 | build_cpu=$1 | |
3031 | build_vendor=$2 | |
3032 | shift; shift | |
3033 | # Remember, the first character of IFS is used to create $*, | |
3034 | # except with old shells: | |
3035 | build_os=$* | |
3036 | IFS=$ac_save_IFS | |
3037 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3038 | ||
3039 | ||
3040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3041 | $as_echo_n "checking host system type... " >&6; } | |
3042 | if test "${ac_cv_host+set}" = set; then : | |
3043 | $as_echo_n "(cached) " >&6 | |
3044 | else | |
3045 | if test "x$host_alias" = x; then | |
3046 | ac_cv_host=$ac_cv_build | |
3047 | else | |
3048 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3049 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
00020c16 | 3050 | fi |
5213506e | 3051 | |
00020c16 | 3052 | fi |
5213506e RW |
3053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
3054 | $as_echo "$ac_cv_host" >&6; } | |
3055 | case $ac_cv_host in | |
3056 | *-*-*) ;; | |
3057 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
3058 | esac | |
3059 | host=$ac_cv_host | |
3060 | ac_save_IFS=$IFS; IFS='-' | |
3061 | set x $ac_cv_host | |
3062 | shift | |
3063 | host_cpu=$1 | |
3064 | host_vendor=$2 | |
3065 | shift; shift | |
3066 | # Remember, the first character of IFS is used to create $*, | |
3067 | # except with old shells: | |
3068 | host_os=$* | |
3069 | IFS=$ac_save_IFS | |
3070 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
00020c16 | 3071 | |
bf3b7cd3 | 3072 | |
5213506e RW |
3073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
3074 | $as_echo_n "checking target system type... " >&6; } | |
3075 | if test "${ac_cv_target+set}" = set; then : | |
3076 | $as_echo_n "(cached) " >&6 | |
3077 | else | |
3078 | if test "x$target_alias" = x; then | |
3079 | ac_cv_target=$ac_cv_host | |
3080 | else | |
3081 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
3082 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
bf3b7cd3 JD |
3083 | fi |
3084 | ||
5213506e RW |
3085 | fi |
3086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
3087 | $as_echo "$ac_cv_target" >&6; } | |
3088 | case $ac_cv_target in | |
3089 | *-*-*) ;; | |
3090 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
3091 | esac | |
3092 | target=$ac_cv_target | |
3093 | ac_save_IFS=$IFS; IFS='-' | |
3094 | set x $ac_cv_target | |
3095 | shift | |
3096 | target_cpu=$1 | |
3097 | target_vendor=$2 | |
3098 | shift; shift | |
3099 | # Remember, the first character of IFS is used to create $*, | |
3100 | # except with old shells: | |
3101 | target_os=$* | |
3102 | IFS=$ac_save_IFS | |
3103 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
60d26958 | 3104 | |
bf3b7cd3 | 3105 | |
5213506e RW |
3106 | # The aliases save the names the user supplied, while $host etc. |
3107 | # will get canonicalized. | |
3108 | test -n "$target_alias" && | |
3109 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
3110 | NONENONEs,x,x, && | |
3111 | program_prefix=${target_alias}- | |
bf3b7cd3 | 3112 | |
5213506e RW |
3113 | # Determine the noncanonical target name, for directory use. |
3114 | case ${build_alias} in | |
3115 | "") build_noncanonical=${build} ;; | |
3116 | *) build_noncanonical=${build_alias} ;; | |
3117 | esac | |
00020c16 | 3118 | |
5213506e RW |
3119 | case ${host_alias} in |
3120 | "") host_noncanonical=${build_noncanonical} ;; | |
3121 | *) host_noncanonical=${host_alias} ;; | |
3122 | esac | |
00020c16 | 3123 | |
5213506e RW |
3124 | case ${target_alias} in |
3125 | "") target_noncanonical=${host_noncanonical} ;; | |
3126 | *) target_noncanonical=${target_alias} ;; | |
3127 | esac | |
00020c16 ILT |
3128 | |
3129 | ||
3130 | ||
3131 | ||
5213506e | 3132 | # Determine the target- and build-specific subdirectories |
00020c16 | 3133 | |
5213506e RW |
3134 | # post-stage1 host modules use a different CC_FOR_BUILD so, in order to |
3135 | # have matching libraries, they should use host libraries: Makefile.tpl | |
3136 | # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). | |
3137 | # However, they still use the build modules, because the corresponding | |
3138 | # host modules (e.g. bison) are only built for the host when bootstrap | |
3139 | # finishes. So: | |
3140 | # - build_subdir is where we find build modules, and never changes. | |
3141 | # - build_libsubdir is where we find build libraries, and can be overridden. | |
bf3b7cd3 | 3142 | |
5213506e RW |
3143 | # Prefix 'build-' so this never conflicts with target_subdir. |
3144 | build_subdir="build-${build_noncanonical}" | |
3145 | ||
3146 | # Check whether --with-build-libsubdir was given. | |
3147 | if test "${with_build_libsubdir+set}" = set; then : | |
3148 | withval=$with_build_libsubdir; build_libsubdir="$withval" | |
3149 | else | |
3150 | build_libsubdir="$build_subdir" | |
bf3b7cd3 | 3151 | fi |
bf3b7cd3 | 3152 | |
5213506e RW |
3153 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
3154 | if ( test $srcdir = . && test -d gcc ) \ | |
3155 | || test -d $srcdir/../host-${host_noncanonical}; then | |
3156 | host_subdir="host-${host_noncanonical}" | |
3157 | else | |
3158 | host_subdir=. | |
00020c16 | 3159 | fi |
5213506e RW |
3160 | # No prefix. |
3161 | target_subdir=${target_noncanonical} | |
00020c16 | 3162 | |
00020c16 | 3163 | |
5213506e RW |
3164 | # Set program_transform_name |
3165 | test "$program_prefix" != NONE && | |
3166 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3167 | # Use a double $ so make ignores it. | |
3168 | test "$program_suffix" != NONE && | |
3169 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3170 | # Double any \ or $. | |
3171 | # By default was `s,x,x', remove it if useless. | |
3172 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3173 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
00020c16 ILT |
3174 | |
3175 | ||
5213506e RW |
3176 | # Check for bogus environment variables. |
3177 | # Test if LIBRARY_PATH contains the notation for the current directory | |
3178 | # since this would lead to problems installing/building glibc. | |
3179 | # LIBRARY_PATH contains the current directory if one of the following | |
3180 | # is true: | |
3181 | # - one of the terminals (":" and ";") is the first or last sign | |
3182 | # - two terminals occur directly after each other | |
3183 | # - the path contains an element with a dot in it | |
3184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY_PATH variable" >&5 | |
3185 | $as_echo_n "checking LIBRARY_PATH variable... " >&6; } | |
3186 | case ${LIBRARY_PATH} in | |
3187 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
3188 | library_path_setting="contains current directory" | |
3189 | ;; | |
3190 | *) | |
3191 | library_path_setting="ok" | |
3192 | ;; | |
3193 | esac | |
3194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $library_path_setting" >&5 | |
3195 | $as_echo "$library_path_setting" >&6; } | |
3196 | if test "$library_path_setting" != "ok"; then | |
3197 | as_fn_error " | |
3198 | *** LIBRARY_PATH shouldn't contain the current directory when | |
3199 | *** building gcc. Please change the environment variable | |
3200 | *** and run configure again." "$LINENO" 5 | |
00020c16 | 3201 | fi |
00020c16 | 3202 | |
5213506e RW |
3203 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
3204 | # since this would lead to problems installing/building glibc. | |
3205 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
3206 | # is true: | |
3207 | # - one of the terminals (":" and ";") is the first or last sign | |
3208 | # - two terminals occur directly after each other | |
3209 | # - the path contains an element with a dot in it | |
3210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCC_EXEC_PREFIX variable" >&5 | |
3211 | $as_echo_n "checking GCC_EXEC_PREFIX variable... " >&6; } | |
3212 | case ${GCC_EXEC_PREFIX} in | |
3213 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
3214 | gcc_exec_prefix_setting="contains current directory" | |
3215 | ;; | |
3216 | *) | |
3217 | gcc_exec_prefix_setting="ok" | |
3218 | ;; | |
3219 | esac | |
3220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_exec_prefix_setting" >&5 | |
3221 | $as_echo "$gcc_exec_prefix_setting" >&6; } | |
3222 | if test "$gcc_exec_prefix_setting" != "ok"; then | |
3223 | as_fn_error " | |
3224 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
3225 | *** building gcc. Please change the environment variable | |
3226 | *** and run configure again." "$LINENO" 5 | |
00020c16 | 3227 | fi |
00020c16 | 3228 | |
5213506e RW |
3229 | # ----------- |
3230 | # Directories | |
3231 | # ----------- | |
3232 | ||
3233 | # Specify the local prefix | |
3234 | local_prefix= | |
3235 | ||
3236 | # Check whether --with-local-prefix was given. | |
3237 | if test "${with_local_prefix+set}" = set; then : | |
3238 | withval=$with_local_prefix; case "${withval}" in | |
3239 | yes) as_fn_error "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;; | |
3240 | no) ;; | |
3241 | *) local_prefix=$with_local_prefix ;; | |
3242 | esac | |
00020c16 | 3243 | fi |
bf3b7cd3 | 3244 | |
5213506e RW |
3245 | |
3246 | # Default local prefix if it is empty | |
3247 | if test x$local_prefix = x; then | |
3248 | local_prefix=/usr/local | |
bf3b7cd3 | 3249 | fi |
00020c16 | 3250 | |
5213506e RW |
3251 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only |
3252 | # passed in by the toplevel make and thus we'd get different behavior | |
3253 | # depending on where we built the sources. | |
3254 | gcc_gxx_include_dir= | |
3255 | # Specify the g++ header file directory | |
3256 | ||
3257 | # Check whether --with-gxx-include-dir was given. | |
3258 | if test "${with_gxx_include_dir+set}" = set; then : | |
3259 | withval=$with_gxx_include_dir; case "${withval}" in | |
3260 | yes) as_fn_error "bad value ${withval} given for g++ include directory" "$LINENO" 5 ;; | |
3261 | no) ;; | |
3262 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
00020c16 | 3263 | esac |
00020c16 | 3264 | fi |
bf3b7cd3 | 3265 | |
5213506e RW |
3266 | |
3267 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. | |
3268 | if test x${gcc_gxx_include_dir} = x; then | |
3269 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
3270 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
3271 | else | |
3272 | libstdcxx_incdir='include/c++/$(version)' | |
3273 | if test x$host != x$target; then | |
3274 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
3275 | fi | |
3276 | gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" | |
3277 | fi | |
00020c16 ILT |
3278 | fi |
3279 | ||
3280 | ||
5213506e RW |
3281 | # Check whether --with-cpp_install_dir was given. |
3282 | if test "${with_cpp_install_dir+set}" = set; then : | |
3283 | withval=$with_cpp_install_dir; if test x$withval = xyes; then | |
3284 | as_fn_error "option --with-cpp-install-dir requires an argument" "$LINENO" 5 | |
3285 | elif test x$withval != xno; then | |
3286 | cpp_install_dir=$withval | |
3287 | fi | |
3288 | fi | |
00020c16 | 3289 | |
00020c16 | 3290 | |
5213506e RW |
3291 | # We would like to our source tree to be readonly. However when releases or |
3292 | # pre-releases are generated, the flex/bison generated files as well as the | |
3293 | # various formats of manuals need to be included along with the rest of the | |
3294 | # sources. Therefore we have --enable-generated-files-in-srcdir to do | |
3295 | # just that. | |
00020c16 | 3296 | |
5213506e RW |
3297 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to place generated files in the source directory" >&5 |
3298 | $as_echo_n "checking whether to place generated files in the source directory... " >&6; } | |
3299 | # Check whether --enable-generated-files-in-srcdir was given. | |
3300 | if test "${enable_generated_files_in_srcdir+set}" = set; then : | |
3301 | enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval | |
3302 | else | |
3303 | generated_files_in_srcdir=no | |
3304 | fi | |
00020c16 ILT |
3305 | |
3306 | ||
5213506e RW |
3307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $generated_files_in_srcdir" >&5 |
3308 | $as_echo "$generated_files_in_srcdir" >&6; } | |
00020c16 | 3309 | |
5213506e RW |
3310 | if test "$generated_files_in_srcdir" = "yes"; then |
3311 | GENINSRC='' | |
3312 | else | |
3313 | GENINSRC='#' | |
3314 | fi | |
00020c16 ILT |
3315 | |
3316 | ||
5213506e RW |
3317 | # ------------------- |
3318 | # Find default linker | |
3319 | # ------------------- | |
3320 | ||
3321 | # With GNU ld | |
00020c16 | 3322 | |
5213506e RW |
3323 | # Check whether --with-gnu-ld was given. |
3324 | if test "${with_gnu_ld+set}" = set; then : | |
3325 | withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld" | |
00020c16 | 3326 | else |
5213506e RW |
3327 | gnu_ld_flag=no |
3328 | fi | |
00020c16 | 3329 | |
bf3b7cd3 | 3330 | |
5213506e | 3331 | # With pre-defined ld |
00020c16 | 3332 | |
5213506e RW |
3333 | # Check whether --with-ld was given. |
3334 | if test "${with_ld+set}" = set; then : | |
3335 | withval=$with_ld; DEFAULT_LINKER="$with_ld" | |
00020c16 | 3336 | fi |
00020c16 | 3337 | |
5213506e RW |
3338 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
3339 | if test ! -x "$DEFAULT_LINKER"; then | |
3340 | as_fn_error "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5 | |
3341 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
3342 | gnu_ld_flag=yes | |
3343 | fi | |
3344 | ||
3345 | cat >>confdefs.h <<_ACEOF | |
3346 | #define DEFAULT_LINKER "$DEFAULT_LINKER" | |
00020c16 ILT |
3347 | _ACEOF |
3348 | ||
5213506e | 3349 | fi |
00020c16 | 3350 | |
5213506e | 3351 | gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi` |
00020c16 | 3352 | |
5213506e RW |
3353 | cat >>confdefs.h <<_ACEOF |
3354 | #define HAVE_GNU_LD $gnu_ld | |
00020c16 ILT |
3355 | _ACEOF |
3356 | ||
3357 | ||
5213506e RW |
3358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default linker was specified" >&5 |
3359 | $as_echo_n "checking whether a default linker was specified... " >&6; } | |
3360 | if test x"${DEFAULT_LINKER+set}" = x"set"; then | |
3361 | if test x"$gnu_ld_flag" = x"no"; then | |
3362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER)" >&5 | |
3363 | $as_echo "yes ($DEFAULT_LINKER)" >&6; } | |
00020c16 | 3364 | else |
5213506e RW |
3365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
3366 | $as_echo "yes ($DEFAULT_LINKER - GNU ld)" >&6; } | |
00020c16 | 3367 | fi |
bf3b7cd3 | 3368 | else |
5213506e RW |
3369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3370 | $as_echo "no" >&6; } | |
bf3b7cd3 | 3371 | fi |
bf3b7cd3 | 3372 | |
5213506e | 3373 | # With demangler in GNU ld |
00020c16 | 3374 | |
5213506e RW |
3375 | # Check whether --with-demangler-in-ld was given. |
3376 | if test "${with_demangler_in_ld+set}" = set; then : | |
3377 | withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld" | |
00020c16 | 3378 | else |
5213506e | 3379 | demangler_in_ld=no |
00020c16 | 3380 | fi |
bf3b7cd3 | 3381 | |
00020c16 | 3382 | |
5213506e RW |
3383 | # ---------------------- |
3384 | # Find default assembler | |
3385 | # ---------------------- | |
00020c16 | 3386 | |
5213506e | 3387 | # With GNU as |
00020c16 | 3388 | |
5213506e RW |
3389 | # Check whether --with-gnu-as was given. |
3390 | if test "${with_gnu_as+set}" = set; then : | |
3391 | withval=$with_gnu_as; gas_flag="$with_gnu_as" | |
00020c16 | 3392 | else |
5213506e | 3393 | gas_flag=no |
00020c16 | 3394 | fi |
00020c16 | 3395 | |
5213506e RW |
3396 | |
3397 | ||
3398 | # Check whether --with-as was given. | |
3399 | if test "${with_as+set}" = set; then : | |
3400 | withval=$with_as; DEFAULT_ASSEMBLER="$with_as" | |
00020c16 | 3401 | fi |
00020c16 | 3402 | |
5213506e RW |
3403 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
3404 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
3405 | as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5 | |
3406 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
3407 | gas_flag=yes | |
3408 | fi | |
3409 | ||
3410 | cat >>confdefs.h <<_ACEOF | |
3411 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" | |
00020c16 | 3412 | _ACEOF |
5213506e RW |
3413 | |
3414 | fi | |
3415 | ||
3416 | gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi` | |
3417 | ||
3418 | cat >>confdefs.h <<_ACEOF | |
3419 | #define HAVE_GNU_AS $gnu_as | |
00020c16 | 3420 | _ACEOF |
5213506e RW |
3421 | |
3422 | ||
3423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5 | |
3424 | $as_echo_n "checking whether a default assembler was specified... " >&6; } | |
3425 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then | |
3426 | if test x"$gas_flag" = x"no"; then | |
3427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5 | |
3428 | $as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; } | |
00020c16 | 3429 | else |
5213506e RW |
3430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
3431 | $as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; } | |
00020c16 | 3432 | fi |
bf3b7cd3 | 3433 | else |
5213506e RW |
3434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3435 | $as_echo "no" >&6; } | |
00020c16 | 3436 | fi |
bf3b7cd3 | 3437 | |
5213506e RW |
3438 | # --------------- |
3439 | # Find C compiler | |
3440 | # --------------- | |
00020c16 | 3441 | |
5213506e RW |
3442 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
3443 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
3444 | # file, even when creating an executable, so an execution test fails. | |
3445 | # Remove possible default executable files to avoid this. | |
3446 | # | |
3447 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
3448 | # Autoconf includes it. | |
3449 | rm -f a.out a.exe b.out | |
bf3b7cd3 | 3450 | |
5213506e | 3451 | # Find the native compiler |
00020c16 ILT |
3452 | ac_ext=c |
3453 | ac_cpp='$CPP $CPPFLAGS' | |
3454 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3455 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3456 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5213506e RW |
3457 | if test -n "$ac_tool_prefix"; then |
3458 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3459 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3461 | $as_echo_n "checking for $ac_word... " >&6; } | |
3462 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3463 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3464 | else |
5213506e RW |
3465 | if test -n "$CC"; then |
3466 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3467 | else | |
3468 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3469 | for as_dir in $PATH | |
3470 | do | |
3471 | IFS=$as_save_IFS | |
3472 | test -z "$as_dir" && as_dir=. | |
3473 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3474 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3475 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
3476 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3477 | break 2 | |
3478 | fi | |
3479 | done | |
3480 | done | |
3481 | IFS=$as_save_IFS | |
00020c16 | 3482 | |
5213506e RW |
3483 | fi |
3484 | fi | |
3485 | CC=$ac_cv_prog_CC | |
3486 | if test -n "$CC"; then | |
3487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3488 | $as_echo "$CC" >&6; } | |
bf3b7cd3 | 3489 | else |
5213506e RW |
3490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3491 | $as_echo "no" >&6; } | |
3492 | fi | |
3493 | ||
bf3b7cd3 | 3494 | |
bf3b7cd3 | 3495 | fi |
5213506e RW |
3496 | if test -z "$ac_cv_prog_CC"; then |
3497 | ac_ct_CC=$CC | |
3498 | # Extract the first word of "gcc", so it can be a program name with args. | |
3499 | set dummy gcc; ac_word=$2 | |
3500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3501 | $as_echo_n "checking for $ac_word... " >&6; } | |
3502 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3503 | $as_echo_n "(cached) " >&6 | |
3504 | else | |
3505 | if test -n "$ac_ct_CC"; then | |
3506 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3507 | else | |
3508 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3509 | for as_dir in $PATH | |
3510 | do | |
3511 | IFS=$as_save_IFS | |
3512 | test -z "$as_dir" && as_dir=. | |
3513 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3514 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3515 | ac_cv_prog_ac_ct_CC="gcc" | |
3516 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3517 | break 2 | |
3518 | fi | |
00020c16 | 3519 | done |
5213506e RW |
3520 | done |
3521 | IFS=$as_save_IFS | |
00020c16 | 3522 | |
bf3b7cd3 | 3523 | fi |
5213506e RW |
3524 | fi |
3525 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3526 | if test -n "$ac_ct_CC"; then | |
3527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3528 | $as_echo "$ac_ct_CC" >&6; } | |
3529 | else | |
3530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3531 | $as_echo "no" >&6; } | |
3532 | fi | |
00020c16 | 3533 | |
5213506e RW |
3534 | if test "x$ac_ct_CC" = x; then |
3535 | CC="" | |
3536 | else | |
3537 | case $cross_compiling:$ac_tool_warned in | |
3538 | yes:) | |
3539 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3540 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3541 | ac_tool_warned=yes ;; | |
3542 | esac | |
3543 | CC=$ac_ct_CC | |
3544 | fi | |
3545 | else | |
3546 | CC="$ac_cv_prog_CC" | |
3547 | fi | |
00020c16 | 3548 | |
5213506e RW |
3549 | if test -z "$CC"; then |
3550 | if test -n "$ac_tool_prefix"; then | |
3551 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3552 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3554 | $as_echo_n "checking for $ac_word... " >&6; } | |
3555 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3556 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3557 | else |
5213506e RW |
3558 | if test -n "$CC"; then |
3559 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
00020c16 | 3560 | else |
5213506e RW |
3561 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3562 | for as_dir in $PATH | |
3563 | do | |
3564 | IFS=$as_save_IFS | |
3565 | test -z "$as_dir" && as_dir=. | |
3566 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3567 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3568 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
3569 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3570 | break 2 | |
3571 | fi | |
3572 | done | |
3573 | done | |
3574 | IFS=$as_save_IFS | |
00020c16 | 3575 | |
00020c16 | 3576 | fi |
00020c16 | 3577 | fi |
5213506e RW |
3578 | CC=$ac_cv_prog_CC |
3579 | if test -n "$CC"; then | |
3580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3581 | $as_echo "$CC" >&6; } | |
00020c16 | 3582 | else |
5213506e RW |
3583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3584 | $as_echo "no" >&6; } | |
3585 | fi | |
bf3b7cd3 | 3586 | |
bf3b7cd3 | 3587 | |
5213506e RW |
3588 | fi |
3589 | fi | |
3590 | if test -z "$CC"; then | |
3591 | # Extract the first word of "cc", so it can be a program name with args. | |
3592 | set dummy cc; ac_word=$2 | |
3593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3594 | $as_echo_n "checking for $ac_word... " >&6; } | |
3595 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3596 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3597 | else |
5213506e RW |
3598 | if test -n "$CC"; then |
3599 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3600 | else | |
3601 | ac_prog_rejected=no | |
3602 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3603 | for as_dir in $PATH | |
3604 | do | |
3605 | IFS=$as_save_IFS | |
3606 | test -z "$as_dir" && as_dir=. | |
3607 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3608 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3609 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3610 | ac_prog_rejected=yes | |
3611 | continue | |
3612 | fi | |
3613 | ac_cv_prog_CC="cc" | |
3614 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3615 | break 2 | |
3616 | fi | |
3617 | done | |
3618 | done | |
3619 | IFS=$as_save_IFS | |
bf3b7cd3 | 3620 | |
5213506e RW |
3621 | if test $ac_prog_rejected = yes; then |
3622 | # We found a bogon in the path, so make sure we never use it. | |
3623 | set dummy $ac_cv_prog_CC | |
3624 | shift | |
3625 | if test $# != 0; then | |
3626 | # We chose a different compiler from the bogus one. | |
3627 | # However, it has the same basename, so the bogon will be chosen | |
3628 | # first if we set CC to just the basename; use the full file name. | |
3629 | shift | |
3630 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
3631 | fi | |
bf3b7cd3 | 3632 | fi |
5213506e RW |
3633 | fi |
3634 | fi | |
3635 | CC=$ac_cv_prog_CC | |
3636 | if test -n "$CC"; then | |
3637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3638 | $as_echo "$CC" >&6; } | |
bf3b7cd3 | 3639 | else |
5213506e RW |
3640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3641 | $as_echo "no" >&6; } | |
3642 | fi | |
bf3b7cd3 | 3643 | |
bf3b7cd3 | 3644 | |
5213506e RW |
3645 | fi |
3646 | if test -z "$CC"; then | |
3647 | if test -n "$ac_tool_prefix"; then | |
3648 | for ac_prog in cl.exe | |
3649 | do | |
3650 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3651 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3653 | $as_echo_n "checking for $ac_word... " >&6; } | |
3654 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3655 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3656 | else |
5213506e RW |
3657 | if test -n "$CC"; then |
3658 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3659 | else | |
3660 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3661 | for as_dir in $PATH | |
3662 | do | |
3663 | IFS=$as_save_IFS | |
3664 | test -z "$as_dir" && as_dir=. | |
3665 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3666 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3667 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
3668 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3669 | break 2 | |
3670 | fi | |
3671 | done | |
3672 | done | |
3673 | IFS=$as_save_IFS | |
bf3b7cd3 | 3674 | |
bf3b7cd3 | 3675 | fi |
5213506e RW |
3676 | fi |
3677 | CC=$ac_cv_prog_CC | |
3678 | if test -n "$CC"; then | |
3679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3680 | $as_echo "$CC" >&6; } | |
3681 | else | |
3682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3683 | $as_echo "no" >&6; } | |
3684 | fi | |
3685 | ||
3686 | ||
3687 | test -n "$CC" && break | |
bf3b7cd3 | 3688 | done |
5213506e RW |
3689 | fi |
3690 | if test -z "$CC"; then | |
3691 | ac_ct_CC=$CC | |
3692 | for ac_prog in cl.exe | |
3693 | do | |
3694 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3695 | set dummy $ac_prog; ac_word=$2 | |
3696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3697 | $as_echo_n "checking for $ac_word... " >&6; } | |
3698 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3699 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3700 | else |
5213506e RW |
3701 | if test -n "$ac_ct_CC"; then |
3702 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3703 | else | |
3704 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3705 | for as_dir in $PATH | |
3706 | do | |
3707 | IFS=$as_save_IFS | |
3708 | test -z "$as_dir" && as_dir=. | |
3709 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3710 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3711 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
3712 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3713 | break 2 | |
3714 | fi | |
3715 | done | |
3716 | done | |
3717 | IFS=$as_save_IFS | |
bf3b7cd3 | 3718 | |
bf3b7cd3 | 3719 | fi |
bf3b7cd3 | 3720 | fi |
5213506e RW |
3721 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
3722 | if test -n "$ac_ct_CC"; then | |
3723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3724 | $as_echo "$ac_ct_CC" >&6; } | |
bf3b7cd3 | 3725 | else |
5213506e RW |
3726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3727 | $as_echo "no" >&6; } | |
3728 | fi | |
3729 | ||
3730 | ||
3731 | test -n "$ac_ct_CC" && break | |
3732 | done | |
3733 | ||
3734 | if test "x$ac_ct_CC" = x; then | |
3735 | CC="" | |
3736 | else | |
3737 | case $cross_compiling:$ac_tool_warned in | |
3738 | yes:) | |
3739 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3740 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3741 | ac_tool_warned=yes ;; | |
3742 | esac | |
3743 | CC=$ac_ct_CC | |
3744 | fi | |
3745 | fi | |
bf3b7cd3 | 3746 | |
bf3b7cd3 | 3747 | fi |
5213506e RW |
3748 | |
3749 | ||
3750 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3751 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3752 | as_fn_error "no acceptable C compiler found in \$PATH | |
3753 | See \`config.log' for more details." "$LINENO" 5; } | |
3754 | ||
3755 | # Provide some information about the compiler. | |
3756 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
3757 | set X $ac_compile | |
3758 | ac_compiler=$2 | |
3759 | for ac_option in --version -v -V -qversion; do | |
3760 | { { ac_try="$ac_compiler $ac_option >&5" | |
3761 | case "(($ac_try" in | |
3762 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3763 | *) ac_try_echo=$ac_try;; | |
bf3b7cd3 | 3764 | esac |
5213506e RW |
3765 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3766 | $as_echo "$ac_try_echo"; } >&5 | |
3767 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3768 | ac_status=$? | |
3769 | if test -s conftest.err; then | |
3770 | sed '10a\ | |
3771 | ... rest of stderr output deleted ... | |
3772 | 10q' conftest.err >conftest.er1 | |
3773 | cat conftest.er1 >&5 | |
3774 | rm -f conftest.er1 conftest.err | |
3775 | fi | |
3776 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3777 | test $ac_status = 0; } | |
3778 | done | |
3779 | ||
3780 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 3781 | /* end confdefs.h. */ |
5213506e | 3782 | |
bf3b7cd3 JD |
3783 | int |
3784 | main () | |
3785 | { | |
3786 | ||
bf3b7cd3 JD |
3787 | ; |
3788 | return 0; | |
3789 | } | |
3790 | _ACEOF | |
5213506e RW |
3791 | ac_clean_files_save=$ac_clean_files |
3792 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" | |
3793 | # Try to create an executable without -o first, disregard a.out. | |
3794 | # It will help us diagnose broken compilers, and finding out an intuition | |
3795 | # of exeext. | |
3796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
3797 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3798 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3799 | ||
3800 | # The possible output files: | |
3801 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3802 | ||
3803 | ac_rmfiles= | |
3804 | for ac_file in $ac_files | |
3805 | do | |
3806 | case $ac_file in | |
3807 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3808 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3809 | esac | |
3810 | done | |
3811 | rm -f $ac_rmfiles | |
3812 | ||
3813 | if { { ac_try="$ac_link_default" | |
3814 | case "(($ac_try" in | |
3815 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3816 | *) ac_try_echo=$ac_try;; | |
3817 | esac | |
3818 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3819 | $as_echo "$ac_try_echo"; } >&5 | |
3820 | (eval "$ac_link_default") 2>&5 | |
3821 | ac_status=$? | |
3822 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3823 | test $ac_status = 0; }; then : | |
3824 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3825 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3826 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3827 | # so that the user can short-circuit this test for compilers unknown to | |
3828 | # Autoconf. | |
3829 | for ac_file in $ac_files '' | |
3830 | do | |
3831 | test -f "$ac_file" || continue | |
3832 | case $ac_file in | |
3833 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
3834 | ;; | |
3835 | [ab].out ) | |
3836 | # We found the default executable, but exeext='' is most | |
3837 | # certainly right. | |
3838 | break;; | |
3839 | *.* ) | |
3840 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
3841 | then :; else | |
3842 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3843 | fi | |
3844 | # We set ac_cv_exeext here because the later test for it is not | |
3845 | # safe: cross compilers may not add the suffix if given an `-o' | |
3846 | # argument, so we may need to know it at that point already. | |
3847 | # Even if this section looks crufty: it has the advantage of | |
3848 | # actually working. | |
3849 | break;; | |
3850 | * ) | |
3851 | break;; | |
3852 | esac | |
3853 | done | |
3854 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
3855 | ||
bf3b7cd3 | 3856 | else |
5213506e RW |
3857 | ac_file='' |
3858 | fi | |
3859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3860 | $as_echo "$ac_file" >&6; } | |
3861 | if test -z "$ac_file"; then : | |
3862 | $as_echo "$as_me: failed program was:" >&5 | |
bf3b7cd3 JD |
3863 | sed 's/^/| /' conftest.$ac_ext >&5 |
3864 | ||
5213506e RW |
3865 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3866 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3867 | { as_fn_set_status 77 | |
3868 | as_fn_error "C compiler cannot create executables | |
3869 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bf3b7cd3 | 3870 | fi |
5213506e RW |
3871 | ac_exeext=$ac_cv_exeext |
3872 | ||
3873 | # Check that the compiler produces executables we can run. If not, either | |
3874 | # the compiler is broken, or we cross compile. | |
3875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
3876 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
3877 | # If not cross compiling, check that we can run a simple program. | |
3878 | if test "$cross_compiling" != yes; then | |
3879 | if { ac_try='./$ac_file' | |
3880 | { { case "(($ac_try" in | |
3881 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3882 | *) ac_try_echo=$ac_try;; | |
3883 | esac | |
3884 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3885 | $as_echo "$ac_try_echo"; } >&5 | |
3886 | (eval "$ac_try") 2>&5 | |
3887 | ac_status=$? | |
3888 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3889 | test $ac_status = 0; }; }; then | |
3890 | cross_compiling=no | |
3891 | else | |
3892 | if test "$cross_compiling" = maybe; then | |
3893 | cross_compiling=yes | |
3894 | else | |
3895 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3896 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3897 | as_fn_error "cannot run C compiled programs. | |
3898 | If you meant to cross compile, use \`--host'. | |
3899 | See \`config.log' for more details." "$LINENO" 5; } | |
3900 | fi | |
3901 | fi | |
bf3b7cd3 | 3902 | fi |
5213506e RW |
3903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3904 | $as_echo "yes" >&6; } | |
3905 | ||
3906 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out | |
3907 | ac_clean_files=$ac_clean_files_save | |
3908 | # Check that the compiler produces executables we can run. If not, either | |
3909 | # the compiler is broken, or we cross compile. | |
3910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3911 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3913 | $as_echo "$cross_compiling" >&6; } | |
3914 | ||
3915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3916 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3917 | if { { ac_try="$ac_link" | |
3918 | case "(($ac_try" in | |
3919 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3920 | *) ac_try_echo=$ac_try;; | |
3921 | esac | |
3922 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3923 | $as_echo "$ac_try_echo"; } >&5 | |
3924 | (eval "$ac_link") 2>&5 | |
3925 | ac_status=$? | |
3926 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3927 | test $ac_status = 0; }; then : | |
3928 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
3929 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3930 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3931 | # `rm'. | |
3932 | for ac_file in conftest.exe conftest conftest.*; do | |
3933 | test -f "$ac_file" || continue | |
3934 | case $ac_file in | |
3935 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3936 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3937 | break;; | |
3938 | * ) break;; | |
3939 | esac | |
3940 | done | |
b61ff9c8 | 3941 | else |
5213506e RW |
3942 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3943 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3944 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3945 | See \`config.log' for more details." "$LINENO" 5; } | |
b61ff9c8 | 3946 | fi |
5213506e RW |
3947 | rm -f conftest$ac_cv_exeext |
3948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
3949 | $as_echo "$ac_cv_exeext" >&6; } | |
bf3b7cd3 | 3950 | |
5213506e RW |
3951 | rm -f conftest.$ac_ext |
3952 | EXEEXT=$ac_cv_exeext | |
3953 | ac_exeext=$EXEEXT | |
3954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
3955 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3956 | if test "${ac_cv_objext+set}" = set; then : | |
3957 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 3958 | else |
5213506e | 3959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bf3b7cd3 | 3960 | /* end confdefs.h. */ |
5213506e | 3961 | |
bf3b7cd3 JD |
3962 | int |
3963 | main () | |
3964 | { | |
5213506e | 3965 | |
bf3b7cd3 JD |
3966 | ; |
3967 | return 0; | |
3968 | } | |
3969 | _ACEOF | |
5213506e RW |
3970 | rm -f conftest.o conftest.obj |
3971 | if { { ac_try="$ac_compile" | |
3972 | case "(($ac_try" in | |
3973 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3974 | *) ac_try_echo=$ac_try;; | |
3975 | esac | |
3976 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3977 | $as_echo "$ac_try_echo"; } >&5 | |
3978 | (eval "$ac_compile") 2>&5 | |
3979 | ac_status=$? | |
3980 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3981 | test $ac_status = 0; }; then : | |
3982 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3983 | test -f "$ac_file" || continue; | |
3984 | case $ac_file in | |
3985 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
3986 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
3987 | break;; | |
3988 | esac | |
3989 | done | |
bf3b7cd3 | 3990 | else |
5213506e | 3991 | $as_echo "$as_me: failed program was:" >&5 |
bf3b7cd3 JD |
3992 | sed 's/^/| /' conftest.$ac_ext >&5 |
3993 | ||
5213506e RW |
3994 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3995 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3996 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3997 | See \`config.log' for more details." "$LINENO" 5; } | |
bf3b7cd3 | 3998 | fi |
5213506e | 3999 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bf3b7cd3 | 4000 | fi |
5213506e RW |
4001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
4002 | $as_echo "$ac_cv_objext" >&6; } | |
4003 | OBJEXT=$ac_cv_objext | |
4004 | ac_objext=$OBJEXT | |
4005 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4006 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
4007 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
4008 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 4009 | else |
5213506e | 4010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bf3b7cd3 | 4011 | /* end confdefs.h. */ |
5213506e | 4012 | |
bf3b7cd3 JD |
4013 | int |
4014 | main () | |
4015 | { | |
5213506e RW |
4016 | #ifndef __GNUC__ |
4017 | choke me | |
4018 | #endif | |
bf3b7cd3 JD |
4019 | |
4020 | ; | |
4021 | return 0; | |
4022 | } | |
4023 | _ACEOF | |
5213506e RW |
4024 | if ac_fn_c_try_compile "$LINENO"; then : |
4025 | ac_compiler_gnu=yes | |
4026 | else | |
4027 | ac_compiler_gnu=no | |
4028 | fi | |
4029 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4030 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4031 | ||
4032 | fi | |
4033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4034 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4035 | if test $ac_compiler_gnu = yes; then | |
4036 | GCC=yes | |
4037 | else | |
4038 | GCC= | |
4039 | fi | |
4040 | ac_test_CFLAGS=${CFLAGS+set} | |
4041 | ac_save_CFLAGS=$CFLAGS | |
4042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4043 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
4044 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
4045 | $as_echo_n "(cached) " >&6 | |
4046 | else | |
4047 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4048 | ac_c_werror_flag=yes | |
4049 | ac_cv_prog_cc_g=no | |
4050 | CFLAGS="-g" | |
4051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4052 | /* end confdefs.h. */ |
5213506e | 4053 | |
bf3b7cd3 JD |
4054 | int |
4055 | main () | |
4056 | { | |
bf3b7cd3 JD |
4057 | |
4058 | ; | |
4059 | return 0; | |
4060 | } | |
4061 | _ACEOF | |
5213506e RW |
4062 | if ac_fn_c_try_compile "$LINENO"; then : |
4063 | ac_cv_prog_cc_g=yes | |
bf3b7cd3 | 4064 | else |
5213506e RW |
4065 | CFLAGS="" |
4066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4067 | /* end confdefs.h. */ |
5213506e | 4068 | |
bf3b7cd3 JD |
4069 | int |
4070 | main () | |
4071 | { | |
bf3b7cd3 JD |
4072 | |
4073 | ; | |
4074 | return 0; | |
4075 | } | |
4076 | _ACEOF | |
5213506e RW |
4077 | if ac_fn_c_try_compile "$LINENO"; then : |
4078 | ||
4079 | else | |
4080 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4081 | CFLAGS="-g" | |
4082 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4083 | /* end confdefs.h. */ |
5213506e | 4084 | |
bf3b7cd3 JD |
4085 | int |
4086 | main () | |
4087 | { | |
bf3b7cd3 JD |
4088 | |
4089 | ; | |
4090 | return 0; | |
4091 | } | |
4092 | _ACEOF | |
5213506e RW |
4093 | if ac_fn_c_try_compile "$LINENO"; then : |
4094 | ac_cv_prog_cc_g=yes | |
bf3b7cd3 | 4095 | fi |
5213506e | 4096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4097 | fi |
5213506e | 4098 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4099 | fi |
5213506e RW |
4100 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4101 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4102 | fi | |
4103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4104 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4105 | if test "$ac_test_CFLAGS" = set; then | |
4106 | CFLAGS=$ac_save_CFLAGS | |
4107 | elif test $ac_cv_prog_cc_g = yes; then | |
4108 | if test "$GCC" = yes; then | |
4109 | CFLAGS="-g -O2" | |
4110 | else | |
4111 | CFLAGS="-g" | |
4112 | fi | |
4113 | else | |
4114 | if test "$GCC" = yes; then | |
4115 | CFLAGS="-O2" | |
4116 | else | |
4117 | CFLAGS= | |
4118 | fi | |
4119 | fi | |
4120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
4121 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
4122 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
4123 | $as_echo_n "(cached) " >&6 | |
4124 | else | |
4125 | ac_cv_prog_cc_c89=no | |
4126 | ac_save_CC=$CC | |
4127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4128 | /* end confdefs.h. */ |
5213506e RW |
4129 | #include <stdarg.h> |
4130 | #include <stdio.h> | |
4131 | #include <sys/types.h> | |
4132 | #include <sys/stat.h> | |
4133 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4134 | struct buf { int x; }; | |
4135 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4136 | static char *e (p, i) | |
4137 | char **p; | |
4138 | int i; | |
4139 | { | |
4140 | return p[i]; | |
4141 | } | |
4142 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4143 | { | |
4144 | char *s; | |
4145 | va_list v; | |
4146 | va_start (v,p); | |
4147 | s = g (p, va_arg (v,int)); | |
4148 | va_end (v); | |
4149 | return s; | |
4150 | } | |
4151 | ||
4152 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4153 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4154 | These don't provoke an error unfortunately, instead are silently treated | |
4155 | as 'x'. The following induces an error, until -std is added to get | |
4156 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4157 | array size at least. It's necessary to write '\x00'==0 to get something | |
4158 | that's true only with -std. */ | |
4159 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4160 | ||
4161 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4162 | inside strings and character constants. */ | |
4163 | #define FOO(x) 'x' | |
4164 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4165 | ||
4166 | int test (int i, double x); | |
4167 | struct s1 {int (*f) (int a);}; | |
4168 | struct s2 {int (*f) (double a);}; | |
4169 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4170 | int argc; | |
4171 | char **argv; | |
bf3b7cd3 JD |
4172 | int |
4173 | main () | |
4174 | { | |
5213506e | 4175 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bf3b7cd3 JD |
4176 | ; |
4177 | return 0; | |
4178 | } | |
4179 | _ACEOF | |
5213506e RW |
4180 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
4181 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4182 | do | |
4183 | CC="$ac_save_CC $ac_arg" | |
4184 | if ac_fn_c_try_compile "$LINENO"; then : | |
4185 | ac_cv_prog_cc_c89=$ac_arg | |
bf3b7cd3 | 4186 | fi |
5213506e RW |
4187 | rm -f core conftest.err conftest.$ac_objext |
4188 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
bf3b7cd3 | 4189 | done |
5213506e RW |
4190 | rm -f conftest.$ac_ext |
4191 | CC=$ac_save_CC | |
4192 | ||
4193 | fi | |
4194 | # AC_CACHE_VAL | |
4195 | case "x$ac_cv_prog_cc_c89" in | |
4196 | x) | |
4197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4198 | $as_echo "none needed" >&6; } ;; | |
4199 | xno) | |
4200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4201 | $as_echo "unsupported" >&6; } ;; | |
4202 | *) | |
4203 | CC="$CC $ac_cv_prog_cc_c89" | |
4204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4205 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
bf3b7cd3 | 4206 | esac |
5213506e RW |
4207 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
4208 | ||
4209 | fi | |
4210 | ||
4211 | ac_ext=c | |
4212 | ac_cpp='$CPP $CPPFLAGS' | |
4213 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4214 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4215 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4216 | ||
4217 | if test "x$CC" != xcc; then | |
4218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
4219 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
b61ff9c8 | 4220 | else |
5213506e RW |
4221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 |
4222 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
4223 | fi | |
4224 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
4225 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
4226 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4227 | $as_echo_n "(cached) " >&6 | |
4228 | else | |
4229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4230 | /* end confdefs.h. */ |
5213506e | 4231 | |
bf3b7cd3 JD |
4232 | int |
4233 | main () | |
4234 | { | |
4235 | ||
bf3b7cd3 JD |
4236 | ; |
4237 | return 0; | |
4238 | } | |
4239 | _ACEOF | |
5213506e RW |
4240 | # Make sure it works both with $CC and with simple cc. |
4241 | # We do the test twice because some compilers refuse to overwrite an | |
4242 | # existing .o file with -o, though they will create one. | |
4243 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
4244 | rm -f conftest2.* | |
4245 | if { { case "(($ac_try" in | |
4246 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4247 | *) ac_try_echo=$ac_try;; | |
4248 | esac | |
4249 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4250 | $as_echo "$ac_try_echo"; } >&5 | |
4251 | (eval "$ac_try") 2>&5 | |
4252 | ac_status=$? | |
4253 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4254 | test $ac_status = 0; } && | |
4255 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
4256 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4257 | *) ac_try_echo=$ac_try;; | |
4258 | esac | |
4259 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4260 | $as_echo "$ac_try_echo"; } >&5 | |
4261 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 | 4262 | ac_status=$? |
5213506e RW |
4263 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
4264 | test $ac_status = 0; }; | |
4265 | then | |
4266 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
4267 | if test "x$CC" != xcc; then | |
4268 | # Test first that cc exists at all. | |
4269 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
4270 | { { case "(($ac_try" in | |
4271 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4272 | *) ac_try_echo=$ac_try;; | |
4273 | esac | |
4274 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4275 | $as_echo "$ac_try_echo"; } >&5 | |
4276 | (eval "$ac_try") 2>&5 | |
4277 | ac_status=$? | |
4278 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4279 | test $ac_status = 0; }; }; then | |
4280 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
4281 | rm -f conftest2.* | |
4282 | if { { case "(($ac_try" in | |
4283 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4284 | *) ac_try_echo=$ac_try;; | |
4285 | esac | |
4286 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4287 | $as_echo "$ac_try_echo"; } >&5 | |
4288 | (eval "$ac_try") 2>&5 | |
4289 | ac_status=$? | |
4290 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4291 | test $ac_status = 0; } && | |
4292 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
4293 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4294 | *) ac_try_echo=$ac_try;; | |
4295 | esac | |
4296 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4297 | $as_echo "$ac_try_echo"; } >&5 | |
4298 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 | 4299 | ac_status=$? |
5213506e RW |
4300 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
4301 | test $ac_status = 0; }; | |
4302 | then | |
4303 | # cc works too. | |
4304 | : | |
4305 | else | |
4306 | # cc exists but doesn't like -o. | |
4307 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
4308 | fi | |
4309 | fi | |
4310 | fi | |
bf3b7cd3 | 4311 | else |
5213506e RW |
4312 | eval ac_cv_prog_cc_${ac_cc}_c_o=no |
4313 | fi | |
4314 | rm -f core conftest* | |
bf3b7cd3 | 4315 | |
b61ff9c8 | 4316 | fi |
5213506e RW |
4317 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then |
4318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4319 | $as_echo "yes" >&6; } | |
4320 | else | |
4321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4322 | $as_echo "no" >&6; } | |
4323 | ||
4324 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
4325 | ||
bf3b7cd3 | 4326 | fi |
5213506e RW |
4327 | |
4328 | # expand $ac_aux_dir to an absolute path | |
4329 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
4330 | ||
4331 | # FIXME: we rely on the cache variable name because | |
4332 | # there is no other way. | |
4333 | set dummy $CC | |
4334 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
4335 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
4336 | if test "$am_t" != yes; then | |
4337 | # Losing compiler, so override with the script. | |
4338 | # FIXME: It is wrong to rewrite CC. | |
4339 | # But if we don't then we get into trouble of one sort or another. | |
4340 | # A longer-term fix would be to have automake use am__CC in this case, | |
4341 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
4342 | CC="$am_aux_dir/compile $CC" | |
bf3b7cd3 | 4343 | fi |
5213506e RW |
4344 | |
4345 | ||
4346 | ac_ext=cpp | |
4347 | ac_cpp='$CXXCPP $CPPFLAGS' | |
4348 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4349 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4350 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
4351 | if test -z "$CXX"; then | |
4352 | if test -n "$CCC"; then | |
4353 | CXX=$CCC | |
4354 | else | |
4355 | if test -n "$ac_tool_prefix"; then | |
4356 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
4357 | do | |
4358 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4359 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4361 | $as_echo_n "checking for $ac_word... " >&6; } | |
4362 | if test "${ac_cv_prog_CXX+set}" = set; then : | |
4363 | $as_echo_n "(cached) " >&6 | |
b61ff9c8 | 4364 | else |
5213506e RW |
4365 | if test -n "$CXX"; then |
4366 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
4367 | else | |
4368 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4369 | for as_dir in $PATH | |
4370 | do | |
4371 | IFS=$as_save_IFS | |
4372 | test -z "$as_dir" && as_dir=. | |
4373 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4374 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4375 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
4376 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4377 | break 2 | |
4378 | fi | |
4379 | done | |
4380 | done | |
4381 | IFS=$as_save_IFS | |
4382 | ||
bf3b7cd3 | 4383 | fi |
b61ff9c8 | 4384 | fi |
5213506e RW |
4385 | CXX=$ac_cv_prog_CXX |
4386 | if test -n "$CXX"; then | |
4387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
4388 | $as_echo "$CXX" >&6; } | |
4389 | else | |
4390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4391 | $as_echo "no" >&6; } | |
4392 | fi | |
bf3b7cd3 JD |
4393 | |
4394 | ||
5213506e RW |
4395 | test -n "$CXX" && break |
4396 | done | |
4397 | fi | |
4398 | if test -z "$CXX"; then | |
4399 | ac_ct_CXX=$CXX | |
4400 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
4401 | do | |
4402 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4403 | set dummy $ac_prog; ac_word=$2 | |
4404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4405 | $as_echo_n "checking for $ac_word... " >&6; } | |
4406 | if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : | |
4407 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 4408 | else |
5213506e RW |
4409 | if test -n "$ac_ct_CXX"; then |
4410 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
bf3b7cd3 | 4411 | else |
5213506e RW |
4412 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4413 | for as_dir in $PATH | |
4414 | do | |
4415 | IFS=$as_save_IFS | |
4416 | test -z "$as_dir" && as_dir=. | |
4417 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4418 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4419 | ac_cv_prog_ac_ct_CXX="$ac_prog" | |
4420 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4421 | break 2 | |
4422 | fi | |
4423 | done | |
4424 | done | |
4425 | IFS=$as_save_IFS | |
bf3b7cd3 | 4426 | |
bf3b7cd3 | 4427 | fi |
bf3b7cd3 | 4428 | fi |
5213506e RW |
4429 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX |
4430 | if test -n "$ac_ct_CXX"; then | |
4431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
4432 | $as_echo "$ac_ct_CXX" >&6; } | |
bf3b7cd3 | 4433 | else |
5213506e RW |
4434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4435 | $as_echo "no" >&6; } | |
4436 | fi | |
bf3b7cd3 | 4437 | |
5213506e RW |
4438 | |
4439 | test -n "$ac_ct_CXX" && break | |
4440 | done | |
4441 | ||
4442 | if test "x$ac_ct_CXX" = x; then | |
4443 | CXX="g++" | |
4444 | else | |
4445 | case $cross_compiling:$ac_tool_warned in | |
4446 | yes:) | |
4447 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4448 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4449 | ac_tool_warned=yes ;; | |
4450 | esac | |
4451 | CXX=$ac_ct_CXX | |
4452 | fi | |
4453 | fi | |
4454 | ||
4455 | fi | |
4456 | fi | |
4457 | # Provide some information about the compiler. | |
4458 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
4459 | set X $ac_compile | |
4460 | ac_compiler=$2 | |
4461 | for ac_option in --version -v -V -qversion; do | |
4462 | { { ac_try="$ac_compiler $ac_option >&5" | |
4463 | case "(($ac_try" in | |
4464 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4465 | *) ac_try_echo=$ac_try;; | |
4466 | esac | |
4467 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4468 | $as_echo "$ac_try_echo"; } >&5 | |
4469 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
b61ff9c8 | 4470 | ac_status=$? |
5213506e RW |
4471 | if test -s conftest.err; then |
4472 | sed '10a\ | |
4473 | ... rest of stderr output deleted ... | |
4474 | 10q' conftest.err >conftest.er1 | |
4475 | cat conftest.er1 >&5 | |
4476 | rm -f conftest.er1 conftest.err | |
4477 | fi | |
4478 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4479 | test $ac_status = 0; } | |
4480 | done | |
4481 | ||
4482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
4483 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
4484 | if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : | |
4485 | $as_echo_n "(cached) " >&6 | |
4486 | else | |
4487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4488 | /* end confdefs.h. */ |
5213506e | 4489 | |
bf3b7cd3 JD |
4490 | int |
4491 | main () | |
4492 | { | |
5213506e RW |
4493 | #ifndef __GNUC__ |
4494 | choke me | |
4495 | #endif | |
bf3b7cd3 JD |
4496 | |
4497 | ; | |
4498 | return 0; | |
4499 | } | |
4500 | _ACEOF | |
5213506e RW |
4501 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4502 | ac_compiler_gnu=yes | |
bf3b7cd3 | 4503 | else |
5213506e RW |
4504 | ac_compiler_gnu=no |
4505 | fi | |
4506 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4507 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
bf3b7cd3 | 4508 | |
bf3b7cd3 | 4509 | fi |
5213506e RW |
4510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 |
4511 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
4512 | if test $ac_compiler_gnu = yes; then | |
4513 | GXX=yes | |
bf3b7cd3 | 4514 | else |
5213506e RW |
4515 | GXX= |
4516 | fi | |
4517 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
4518 | ac_save_CXXFLAGS=$CXXFLAGS | |
4519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
4520 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
4521 | if test "${ac_cv_prog_cxx_g+set}" = set; then : | |
4522 | $as_echo_n "(cached) " >&6 | |
4523 | else | |
4524 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
4525 | ac_cxx_werror_flag=yes | |
4526 | ac_cv_prog_cxx_g=no | |
4527 | CXXFLAGS="-g" | |
4528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4529 | /* end confdefs.h. */ |
5213506e | 4530 | |
bf3b7cd3 JD |
4531 | int |
4532 | main () | |
4533 | { | |
bf3b7cd3 JD |
4534 | |
4535 | ; | |
4536 | return 0; | |
4537 | } | |
4538 | _ACEOF | |
5213506e RW |
4539 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4540 | ac_cv_prog_cxx_g=yes | |
4541 | else | |
4542 | CXXFLAGS="" | |
4543 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4544 | /* end confdefs.h. */ |
5213506e | 4545 | |
bf3b7cd3 JD |
4546 | int |
4547 | main () | |
4548 | { | |
bf3b7cd3 JD |
4549 | |
4550 | ; | |
4551 | return 0; | |
4552 | } | |
4553 | _ACEOF | |
5213506e | 4554 | if ac_fn_cxx_try_compile "$LINENO"; then : |
bf3b7cd3 | 4555 | |
bf3b7cd3 | 4556 | else |
5213506e RW |
4557 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag |
4558 | CXXFLAGS="-g" | |
4559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4560 | /* end confdefs.h. */ |
5213506e | 4561 | |
bf3b7cd3 JD |
4562 | int |
4563 | main () | |
4564 | { | |
bf3b7cd3 JD |
4565 | |
4566 | ; | |
4567 | return 0; | |
4568 | } | |
4569 | _ACEOF | |
5213506e RW |
4570 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4571 | ac_cv_prog_cxx_g=yes | |
4572 | fi | |
4573 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4574 | fi | |
4575 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4576 | fi | |
4577 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4578 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4579 | fi | |
4580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4581 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4582 | if test "$ac_test_CXXFLAGS" = set; then | |
4583 | CXXFLAGS=$ac_save_CXXFLAGS | |
4584 | elif test $ac_cv_prog_cxx_g = yes; then | |
4585 | if test "$GXX" = yes; then | |
4586 | CXXFLAGS="-g -O2" | |
4587 | else | |
4588 | CXXFLAGS="-g" | |
4589 | fi | |
bf3b7cd3 | 4590 | else |
5213506e RW |
4591 | if test "$GXX" = yes; then |
4592 | CXXFLAGS="-O2" | |
4593 | else | |
4594 | CXXFLAGS= | |
4595 | fi | |
4596 | fi | |
4597 | ac_ext=c | |
4598 | ac_cpp='$CPP $CPPFLAGS' | |
4599 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4600 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4601 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4602 | ||
4603 | ||
4604 | ||
4605 | ||
4606 | if test -n "$ac_tool_prefix"; then | |
4607 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. | |
4608 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 | |
4609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4610 | $as_echo_n "checking for $ac_word... " >&6; } | |
4611 | if test "${ac_cv_prog_GNATBIND+set}" = set; then : | |
4612 | $as_echo_n "(cached) " >&6 | |
4613 | else | |
4614 | if test -n "$GNATBIND"; then | |
4615 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
4616 | else | |
4617 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4618 | for as_dir in $PATH | |
4619 | do | |
4620 | IFS=$as_save_IFS | |
4621 | test -z "$as_dir" && as_dir=. | |
4622 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4623 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4624 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
4625 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4626 | break 2 | |
4627 | fi | |
4628 | done | |
4629 | done | |
4630 | IFS=$as_save_IFS | |
4631 | ||
4632 | fi | |
4633 | fi | |
4634 | GNATBIND=$ac_cv_prog_GNATBIND | |
4635 | if test -n "$GNATBIND"; then | |
4636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATBIND" >&5 | |
4637 | $as_echo "$GNATBIND" >&6; } | |
4638 | else | |
4639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4640 | $as_echo "no" >&6; } | |
4641 | fi | |
4642 | ||
bf3b7cd3 | 4643 | |
bf3b7cd3 | 4644 | fi |
5213506e RW |
4645 | if test -z "$ac_cv_prog_GNATBIND"; then |
4646 | ac_ct_GNATBIND=$GNATBIND | |
4647 | # Extract the first word of "gnatbind", so it can be a program name with args. | |
4648 | set dummy gnatbind; ac_word=$2 | |
4649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4650 | $as_echo_n "checking for $ac_word... " >&6; } | |
4651 | if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then : | |
4652 | $as_echo_n "(cached) " >&6 | |
4653 | else | |
4654 | if test -n "$ac_ct_GNATBIND"; then | |
4655 | ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test. | |
4656 | else | |
4657 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4658 | for as_dir in $PATH | |
4659 | do | |
4660 | IFS=$as_save_IFS | |
4661 | test -z "$as_dir" && as_dir=. | |
4662 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4663 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4664 | ac_cv_prog_ac_ct_GNATBIND="gnatbind" | |
4665 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4666 | break 2 | |
4667 | fi | |
bf3b7cd3 | 4668 | done |
5213506e RW |
4669 | done |
4670 | IFS=$as_save_IFS | |
4671 | ||
4672 | fi | |
4673 | fi | |
4674 | ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND | |
4675 | if test -n "$ac_ct_GNATBIND"; then | |
4676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATBIND" >&5 | |
4677 | $as_echo "$ac_ct_GNATBIND" >&6; } | |
4678 | else | |
4679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4680 | $as_echo "no" >&6; } | |
4681 | fi | |
4682 | ||
4683 | if test "x$ac_ct_GNATBIND" = x; then | |
4684 | GNATBIND="no" | |
4685 | else | |
4686 | case $cross_compiling:$ac_tool_warned in | |
4687 | yes:) | |
4688 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4689 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4690 | ac_tool_warned=yes ;; | |
bf3b7cd3 | 4691 | esac |
5213506e RW |
4692 | GNATBIND=$ac_ct_GNATBIND |
4693 | fi | |
b61ff9c8 | 4694 | else |
5213506e RW |
4695 | GNATBIND="$ac_cv_prog_GNATBIND" |
4696 | fi | |
bf3b7cd3 | 4697 | |
5213506e RW |
4698 | if test -n "$ac_tool_prefix"; then |
4699 | # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args. | |
4700 | set dummy ${ac_tool_prefix}gnatmake; ac_word=$2 | |
4701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4702 | $as_echo_n "checking for $ac_word... " >&6; } | |
4703 | if test "${ac_cv_prog_GNATMAKE+set}" = set; then : | |
4704 | $as_echo_n "(cached) " >&6 | |
4705 | else | |
4706 | if test -n "$GNATMAKE"; then | |
4707 | ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test. | |
4708 | else | |
4709 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4710 | for as_dir in $PATH | |
4711 | do | |
4712 | IFS=$as_save_IFS | |
4713 | test -z "$as_dir" && as_dir=. | |
4714 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4715 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4716 | ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake" | |
4717 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4718 | break 2 | |
4719 | fi | |
4720 | done | |
4721 | done | |
4722 | IFS=$as_save_IFS | |
4723 | ||
4724 | fi | |
4725 | fi | |
4726 | GNATMAKE=$ac_cv_prog_GNATMAKE | |
4727 | if test -n "$GNATMAKE"; then | |
4728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATMAKE" >&5 | |
4729 | $as_echo "$GNATMAKE" >&6; } | |
4730 | else | |
4731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4732 | $as_echo "no" >&6; } | |
4733 | fi | |
4734 | ||
4735 | ||
4736 | fi | |
4737 | if test -z "$ac_cv_prog_GNATMAKE"; then | |
4738 | ac_ct_GNATMAKE=$GNATMAKE | |
4739 | # Extract the first word of "gnatmake", so it can be a program name with args. | |
4740 | set dummy gnatmake; ac_word=$2 | |
4741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4742 | $as_echo_n "checking for $ac_word... " >&6; } | |
4743 | if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then : | |
4744 | $as_echo_n "(cached) " >&6 | |
4745 | else | |
4746 | if test -n "$ac_ct_GNATMAKE"; then | |
4747 | ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test. | |
4748 | else | |
4749 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4750 | for as_dir in $PATH | |
4751 | do | |
4752 | IFS=$as_save_IFS | |
4753 | test -z "$as_dir" && as_dir=. | |
4754 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4755 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4756 | ac_cv_prog_ac_ct_GNATMAKE="gnatmake" | |
4757 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4758 | break 2 | |
4759 | fi | |
4760 | done | |
4761 | done | |
4762 | IFS=$as_save_IFS | |
4763 | ||
4764 | fi | |
4765 | fi | |
4766 | ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE | |
4767 | if test -n "$ac_ct_GNATMAKE"; then | |
4768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATMAKE" >&5 | |
4769 | $as_echo "$ac_ct_GNATMAKE" >&6; } | |
4770 | else | |
4771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4772 | $as_echo "no" >&6; } | |
4773 | fi | |
4774 | ||
4775 | if test "x$ac_ct_GNATMAKE" = x; then | |
4776 | GNATMAKE="no" | |
bf3b7cd3 | 4777 | else |
5213506e RW |
4778 | case $cross_compiling:$ac_tool_warned in |
4779 | yes:) | |
4780 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4781 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4782 | ac_tool_warned=yes ;; | |
4783 | esac | |
4784 | GNATMAKE=$ac_ct_GNATMAKE | |
4785 | fi | |
4786 | else | |
4787 | GNATMAKE="$ac_cv_prog_GNATMAKE" | |
4788 | fi | |
bf3b7cd3 | 4789 | |
5213506e RW |
4790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5 |
4791 | $as_echo_n "checking whether compiler driver understands Ada... " >&6; } | |
4792 | if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then : | |
4793 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 4794 | else |
5213506e RW |
4795 | cat >conftest.adb <<EOF |
4796 | procedure conftest is begin null; end conftest; | |
4797 | EOF | |
4798 | acx_cv_cc_gcc_supports_ada=no | |
4799 | # There is a bug in old released versions of GCC which causes the | |
4800 | # driver to exit successfully when the appropriate language module | |
4801 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
4802 | # Therefore we must check for the error message as well as an | |
4803 | # unsuccessful exit. | |
4804 | # Other compilers, like HP Tru64 UNIX cc, exit successfully when | |
4805 | # given a .adb file, but produce no object file. So we must check | |
4806 | # if an object file was really produced to guard against this. | |
4807 | errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure` | |
4808 | if test x"$errors" = x && test -f conftest.$ac_objext; then | |
4809 | acx_cv_cc_gcc_supports_ada=yes | |
4810 | fi | |
4811 | rm -f conftest.* | |
4812 | fi | |
4813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5 | |
4814 | $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; } | |
bf3b7cd3 | 4815 | |
5213506e RW |
4816 | if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then |
4817 | have_gnat=yes | |
4818 | else | |
4819 | have_gnat=no | |
b61ff9c8 | 4820 | fi |
5213506e RW |
4821 | |
4822 | ||
4823 | # autoconf is lame and doesn't give us any substitution variable for this. | |
4824 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
4825 | NO_MINUS_C_MINUS_O=yes | |
4826 | else | |
4827 | OUTPUT_OPTION='-o $@' | |
bf3b7cd3 | 4828 | fi |
5213506e RW |
4829 | |
4830 | ||
4831 | ||
4832 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer | |
4833 | # optimizations to be activated explicitly by the toplevel. | |
4834 | case "$CC" in | |
4835 | */prev-gcc/xgcc*) ;; | |
4836 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
4837 | esac | |
4838 | ||
4839 | ||
4840 | # ------------------------- | |
4841 | # Check C compiler features | |
4842 | # ------------------------- | |
4843 | ||
4844 | ||
4845 | ac_ext=c | |
4846 | ac_cpp='$CPP $CPPFLAGS' | |
4847 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4848 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4849 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4851 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4852 | # On Suns, sometimes $CPP names a directory. | |
4853 | if test -n "$CPP" && test -d "$CPP"; then | |
4854 | CPP= | |
bf3b7cd3 | 4855 | fi |
5213506e RW |
4856 | if test -z "$CPP"; then |
4857 | if test "${ac_cv_prog_CPP+set}" = set; then : | |
4858 | $as_echo_n "(cached) " >&6 | |
b61ff9c8 | 4859 | else |
5213506e RW |
4860 | # Double quotes because CPP needs to be expanded |
4861 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4862 | do | |
4863 | ac_preproc_ok=false | |
4864 | for ac_c_preproc_warn_flag in '' yes | |
4865 | do | |
4866 | # Use a header file that comes with gcc, so configuring glibc | |
4867 | # with a fresh cross-compiler works. | |
4868 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4869 | # <limits.h> exists even on freestanding compilers. | |
4870 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4871 | # not just through cpp. "Syntax error" is here to catch this case. | |
4872 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4873 | /* end confdefs.h. */ | |
4874 | #ifdef __STDC__ | |
4875 | # include <limits.h> | |
4876 | #else | |
4877 | # include <assert.h> | |
4878 | #endif | |
4879 | Syntax error | |
bf3b7cd3 | 4880 | _ACEOF |
5213506e | 4881 | if ac_fn_c_try_cpp "$LINENO"; then : |
bf3b7cd3 | 4882 | |
bf3b7cd3 | 4883 | else |
5213506e RW |
4884 | # Broken: fails on valid input. |
4885 | continue | |
4886 | fi | |
4887 | rm -f conftest.err conftest.$ac_ext | |
4888 | ||
4889 | # OK, works on sane cases. Now check whether nonexistent headers | |
4890 | # can be detected and how. | |
4891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4892 | /* end confdefs.h. */ |
5213506e | 4893 | #include <ac_nonexistent.h> |
bf3b7cd3 | 4894 | _ACEOF |
5213506e RW |
4895 | if ac_fn_c_try_cpp "$LINENO"; then : |
4896 | # Broken: success on invalid input. | |
4897 | continue | |
b61ff9c8 | 4898 | else |
5213506e RW |
4899 | # Passes both tests. |
4900 | ac_preproc_ok=: | |
4901 | break | |
bf3b7cd3 | 4902 | fi |
5213506e | 4903 | rm -f conftest.err conftest.$ac_ext |
bf3b7cd3 | 4904 | |
5213506e RW |
4905 | done |
4906 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4907 | rm -f conftest.err conftest.$ac_ext | |
4908 | if $ac_preproc_ok; then : | |
4909 | break | |
4910 | fi | |
bf3b7cd3 | 4911 | |
5213506e RW |
4912 | done |
4913 | ac_cv_prog_CPP=$CPP | |
bf3b7cd3 | 4914 | |
8b1f719a | 4915 | fi |
5213506e | 4916 | CPP=$ac_cv_prog_CPP |
8b1f719a | 4917 | else |
5213506e RW |
4918 | ac_cv_prog_CPP=$CPP |
4919 | fi | |
4920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4921 | $as_echo "$CPP" >&6; } | |
4922 | ac_preproc_ok=false | |
4923 | for ac_c_preproc_warn_flag in '' yes | |
4924 | do | |
4925 | # Use a header file that comes with gcc, so configuring glibc | |
4926 | # with a fresh cross-compiler works. | |
4927 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4928 | # <limits.h> exists even on freestanding compilers. | |
4929 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4930 | # not just through cpp. "Syntax error" is here to catch this case. | |
4931 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4932 | /* end confdefs.h. */ |
5213506e RW |
4933 | #ifdef __STDC__ |
4934 | # include <limits.h> | |
4935 | #else | |
4936 | # include <assert.h> | |
4937 | #endif | |
4938 | Syntax error | |
bf3b7cd3 | 4939 | _ACEOF |
5213506e | 4940 | if ac_fn_c_try_cpp "$LINENO"; then : |
bf3b7cd3 | 4941 | |
bf3b7cd3 | 4942 | else |
5213506e RW |
4943 | # Broken: fails on valid input. |
4944 | continue | |
bf3b7cd3 | 4945 | fi |
5213506e | 4946 | rm -f conftest.err conftest.$ac_ext |
bf3b7cd3 | 4947 | |
5213506e RW |
4948 | # OK, works on sane cases. Now check whether nonexistent headers |
4949 | # can be detected and how. | |
4950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf3b7cd3 | 4951 | /* end confdefs.h. */ |
5213506e | 4952 | #include <ac_nonexistent.h> |
bf3b7cd3 | 4953 | _ACEOF |
5213506e RW |
4954 | if ac_fn_c_try_cpp "$LINENO"; then : |
4955 | # Broken: success on invalid input. | |
4956 | continue | |
bf3b7cd3 | 4957 | else |
5213506e RW |
4958 | # Passes both tests. |
4959 | ac_preproc_ok=: | |
4960 | break | |
bf3b7cd3 | 4961 | fi |
5213506e RW |
4962 | rm -f conftest.err conftest.$ac_ext |
4963 | ||
bf3b7cd3 | 4964 | done |
5213506e RW |
4965 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
4966 | rm -f conftest.err conftest.$ac_ext | |
4967 | if $ac_preproc_ok; then : | |
4968 | ||
b61ff9c8 | 4969 | else |
5213506e RW |
4970 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4971 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4972 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
4973 | See \`config.log' for more details." "$LINENO" 5; } | |
4974 | fi | |
bf3b7cd3 | 4975 | |
5213506e RW |
4976 | ac_ext=c |
4977 | ac_cpp='$CPP $CPPFLAGS' | |
4978 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4979 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4980 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
bf3b7cd3 | 4981 | |
bf3b7cd3 | 4982 | |
5213506e RW |
4983 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4984 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
4985 | if test "${ac_cv_path_GREP+set}" = set; then : | |
4986 | $as_echo_n "(cached) " >&6 | |
4987 | else | |
4988 | if test -z "$GREP"; then | |
4989 | ac_path_GREP_found=false | |
4990 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4991 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4992 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4993 | do | |
4994 | IFS=$as_save_IFS | |
4995 | test -z "$as_dir" && as_dir=. | |
4996 | for ac_prog in grep ggrep; do | |
4997 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4998 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4999 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
5000 | # Check for GNU ac_path_GREP and select it if it is found. | |
5001 | # Check for GNU $ac_path_GREP | |
5002 | case `"$ac_path_GREP" --version 2>&1` in | |
5003 | *GNU*) | |
5004 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5005 | *) | |
5006 | ac_count=0 | |
5007 | $as_echo_n 0123456789 >"conftest.in" | |
5008 | while : | |
5009 | do | |
5010 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5011 | mv "conftest.tmp" "conftest.in" | |
5012 | cp "conftest.in" "conftest.nl" | |
5013 | $as_echo 'GREP' >> "conftest.nl" | |
5014 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5015 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5016 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5017 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5018 | # Best one so far, save it but keep looking for a better one | |
5019 | ac_cv_path_GREP="$ac_path_GREP" | |
5020 | ac_path_GREP_max=$ac_count | |
5021 | fi | |
5022 | # 10*(2^10) chars as input seems more than enough | |
5023 | test $ac_count -gt 10 && break | |
5024 | done | |
5025 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5026 | esac | |
5027 | ||
5028 | $ac_path_GREP_found && break 3 | |
5029 | done | |
5030 | done | |
5031 | done | |
5032 | IFS=$as_save_IFS | |
5033 | if test -z "$ac_cv_path_GREP"; then | |
5034 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5035 | fi | |
b61ff9c8 | 5036 | else |
5213506e | 5037 | ac_cv_path_GREP=$GREP |
2f41c1d6 | 5038 | fi |
5213506e | 5039 | |
b61ff9c8 | 5040 | fi |
5213506e RW |
5041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
5042 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5043 | GREP="$ac_cv_path_GREP" | |
bf3b7cd3 JD |
5044 | |
5045 | ||
5213506e RW |
5046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
5047 | $as_echo_n "checking for egrep... " >&6; } | |
5048 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
5049 | $as_echo_n "(cached) " >&6 | |
5ec1c5e6 | 5050 | else |
5213506e RW |
5051 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
5052 | then ac_cv_path_EGREP="$GREP -E" | |
5053 | else | |
5054 | if test -z "$EGREP"; then | |
5055 | ac_path_EGREP_found=false | |
5056 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5057 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5058 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5059 | do | |
5060 | IFS=$as_save_IFS | |
5061 | test -z "$as_dir" && as_dir=. | |
5062 | for ac_prog in egrep; do | |
5063 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5064 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
5065 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
5066 | # Check for GNU ac_path_EGREP and select it if it is found. | |
5067 | # Check for GNU $ac_path_EGREP | |
5068 | case `"$ac_path_EGREP" --version 2>&1` in | |
5069 | *GNU*) | |
5070 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5071 | *) | |
5072 | ac_count=0 | |
5073 | $as_echo_n 0123456789 >"conftest.in" | |
5074 | while : | |
5075 | do | |
5076 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5077 | mv "conftest.tmp" "conftest.in" | |
5078 | cp "conftest.in" "conftest.nl" | |
5079 | $as_echo 'EGREP' >> "conftest.nl" | |
5080 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5081 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5082 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5083 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5084 | # Best one so far, save it but keep looking for a better one | |
5085 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5086 | ac_path_EGREP_max=$ac_count | |
5087 | fi | |
5088 | # 10*(2^10) chars as input seems more than enough | |
5089 | test $ac_count -gt 10 && break | |
5090 | done | |
5091 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5092 | esac | |
5ec1c5e6 | 5093 | |
5213506e RW |
5094 | $ac_path_EGREP_found && break 3 |
5095 | done | |
5096 | done | |
5097 | done | |
5098 | IFS=$as_save_IFS | |
5099 | if test -z "$ac_cv_path_EGREP"; then | |
5100 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5101 | fi | |
5102 | else | |
5103 | ac_cv_path_EGREP=$EGREP | |
5ec1c5e6 | 5104 | fi |
5213506e RW |
5105 | |
5106 | fi | |
5ec1c5e6 | 5107 | fi |
5213506e RW |
5108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
5109 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5110 | EGREP="$ac_cv_path_EGREP" | |
5ec1c5e6 | 5111 | |
5ec1c5e6 | 5112 | |
5213506e RW |
5113 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
5114 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
5115 | if test "${ac_cv_header_stdc+set}" = set; then : | |
5116 | $as_echo_n "(cached) " >&6 | |
bf3b7cd3 | 5117 | else |
5213506e | 5118 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 5119 | /* end confdefs.h. */ |
5213506e RW |
5120 | #include <stdlib.h> |
5121 | #include <stdarg.h> | |
5122 | #include <string.h> | |
5123 | #include <float.h> | |
5124 | ||
ba479fd2 NN |
5125 | int |
5126 | main () | |
5127 | { | |
5213506e | 5128 | |
ba479fd2 NN |
5129 | ; |
5130 | return 0; | |
5131 | } | |
5132 | _ACEOF | |
5213506e RW |
5133 | if ac_fn_c_try_compile "$LINENO"; then : |
5134 | ac_cv_header_stdc=yes | |
75b6f3fd | 5135 | else |
5213506e | 5136 | ac_cv_header_stdc=no |
75b6f3fd | 5137 | fi |
5213506e | 5138 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5139 | |
5213506e RW |
5140 | if test $ac_cv_header_stdc = yes; then |
5141 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 5143 | /* end confdefs.h. */ |
5213506e | 5144 | #include <string.h> |
bf3b7cd3 | 5145 | |
ba479fd2 | 5146 | _ACEOF |
5213506e RW |
5147 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5148 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bf3b7cd3 | 5149 | |
75e93faa | 5150 | else |
5213506e RW |
5151 | ac_cv_header_stdc=no |
5152 | fi | |
5153 | rm -f conftest* | |
ba479fd2 | 5154 | |
75e93faa | 5155 | fi |
bf3b7cd3 | 5156 | |
5213506e RW |
5157 | if test $ac_cv_header_stdc = yes; then |
5158 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 5160 | /* end confdefs.h. */ |
5213506e | 5161 | #include <stdlib.h> |
bf3b7cd3 | 5162 | |
ba479fd2 | 5163 | _ACEOF |
5213506e RW |
5164 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5165 | $EGREP "free" >/dev/null 2>&1; then : | |
bf3b7cd3 | 5166 | |
04cabffc | 5167 | else |
5213506e | 5168 | ac_cv_header_stdc=no |
04cabffc | 5169 | fi |
5213506e | 5170 | rm -f conftest* |
04cabffc | 5171 | |
414d23ae | 5172 | fi |
ba479fd2 | 5173 | |
5213506e RW |
5174 | if test $ac_cv_header_stdc = yes; then |
5175 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5176 | if test "$cross_compiling" = yes; then : | |
5177 | : | |
b61ff9c8 | 5178 | else |
5213506e | 5179 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bf3b7cd3 | 5180 | /* end confdefs.h. */ |
5213506e | 5181 | #include <ctype.h> |
bf3b7cd3 | 5182 | #include <stdlib.h> |
5213506e RW |
5183 | #if ((' ' & 0x0FF) == 0x020) |
5184 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5185 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5186 | #else | |
5187 | # define ISLOWER(c) \ | |
5188 | (('a' <= (c) && (c) <= 'i') \ | |
5189 | || ('j' <= (c) && (c) <= 'r') \ | |
5190 | || ('s' <= (c) && (c) <= 'z')) | |
5191 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5192 | #endif | |
5193 | ||
5194 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
bf3b7cd3 JD |
5195 | int |
5196 | main () | |
5197 | { | |
5213506e RW |
5198 | int i; |
5199 | for (i = 0; i < 256; i++) | |
5200 | if (XOR (islower (i), ISLOWER (i)) | |
5201 | || toupper (i) != TOUPPER (i)) | |
5202 | return 2; | |
bf3b7cd3 JD |
5203 | return 0; |
5204 | } | |
5205 | _ACEOF | |
5213506e | 5206 | if ac_fn_c_try_run "$LINENO"; then : |
75e93faa | 5207 | |
5213506e RW |
5208 | else |
5209 | ac_cv_header_stdc=no | |
b61ff9c8 | 5210 | fi |
5213506e RW |
5211 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5212 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
bf3b7cd3 | 5213 | fi |
5213506e | 5214 | |
bf3b7cd3 | 5215 | fi |
bf3b7cd3 | 5216 | fi |
5213506e RW |
5217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
5218 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5219 | if test $ac_cv_header_stdc = yes; then | |
5220 | ||
5221 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5222 | ||
b61ff9c8 | 5223 | fi |
5213506e RW |
5224 | |
5225 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5226 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5227 | inttypes.h stdint.h unistd.h | |
5228 | do : | |
5229 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5230 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5231 | " | |
5232 | eval as_val=\$$as_ac_Header | |
5233 | if test "x$as_val" = x""yes; then : | |
5234 | cat >>confdefs.h <<_ACEOF | |
5235 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
ba479fd2 | 5236 | _ACEOF |
414d23ae | 5237 | |
5213506e RW |
5238 | fi |
5239 | ||
5240 | done | |
5241 | ||
5242 | ||
cafe096b | 5243 | |
5213506e RW |
5244 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
5245 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
5246 | MINIX=yes | |
5247 | else | |
5248 | MINIX= | |
414d23ae HPN |
5249 | fi |
5250 | ||
5213506e RW |
5251 | |
5252 | if test "$MINIX" = yes; then | |
5253 | ||
5254 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5255 | ||
5256 | ||
5257 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5258 | ||
5259 | ||
5260 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5261 | ||
5262 | fi | |
5263 | ||
5264 | ||
5265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5266 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
5267 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
5268 | $as_echo_n "(cached) " >&6 | |
b5472e1d | 5269 | else |
5213506e | 5270 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b5472e1d | 5271 | /* end confdefs.h. */ |
5213506e RW |
5272 | |
5273 | # define __EXTENSIONS__ 1 | |
5274 | $ac_includes_default | |
3bbd5a19 PB |
5275 | int |
5276 | main () | |
5277 | { | |
5213506e | 5278 | |
3bbd5a19 PB |
5279 | ; |
5280 | return 0; | |
5281 | } | |
b5472e1d | 5282 | _ACEOF |
5213506e RW |
5283 | if ac_fn_c_try_compile "$LINENO"; then : |
5284 | ac_cv_safe_to_define___extensions__=yes | |
b5472e1d | 5285 | else |
5213506e | 5286 | ac_cv_safe_to_define___extensions__=no |
b5472e1d | 5287 | fi |
5213506e | 5288 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3bbd5a19 | 5289 | fi |
5213506e RW |
5290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
5291 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
5292 | test $ac_cv_safe_to_define___extensions__ = yes && | |
5293 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
3bbd5a19 | 5294 | |
5213506e RW |
5295 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
5296 | ||
5297 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
3bbd5a19 | 5298 | |
5213506e RW |
5299 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
5300 | ||
5301 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
5302 | ||
5303 | ||
5304 | ac_ext=c | |
5305 | ac_cpp='$CPP $CPPFLAGS' | |
5306 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5307 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5308 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5310 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5311 | # On Suns, sometimes $CPP names a directory. | |
5312 | if test -n "$CPP" && test -d "$CPP"; then | |
5313 | CPP= | |
5314 | fi | |
5315 | if test -z "$CPP"; then | |
5316 | if test "${ac_cv_prog_CPP+set}" = set; then : | |
5317 | $as_echo_n "(cached) " >&6 | |
89a42ac8 | 5318 | else |
5213506e RW |
5319 | # Double quotes because CPP needs to be expanded |
5320 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5321 | do | |
5322 | ac_preproc_ok=false | |
5323 | for ac_c_preproc_warn_flag in '' yes | |
5324 | do | |
5325 | # Use a header file that comes with gcc, so configuring glibc | |
5326 | # with a fresh cross-compiler works. | |
5327 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5328 | # <limits.h> exists even on freestanding compilers. | |
5329 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5330 | # not just through cpp. "Syntax error" is here to catch this case. | |
5331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
89a42ac8 | 5332 | /* end confdefs.h. */ |
5213506e RW |
5333 | #ifdef __STDC__ |
5334 | # include <limits.h> | |
5335 | #else | |
5336 | # include <assert.h> | |
5337 | #endif | |
5338 | Syntax error | |
89a42ac8 | 5339 | _ACEOF |
5213506e RW |
5340 | if ac_fn_c_try_cpp "$LINENO"; then : |
5341 | ||
89a42ac8 | 5342 | else |
5213506e RW |
5343 | # Broken: fails on valid input. |
5344 | continue | |
5345 | fi | |
5346 | rm -f conftest.err conftest.$ac_ext | |
89a42ac8 | 5347 | |
5213506e RW |
5348 | # OK, works on sane cases. Now check whether nonexistent headers |
5349 | # can be detected and how. | |
5350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5351 | /* end confdefs.h. */ | |
5352 | #include <ac_nonexistent.h> | |
5353 | _ACEOF | |
5354 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5355 | # Broken: success on invalid input. | |
5356 | continue | |
5357 | else | |
5358 | # Passes both tests. | |
5359 | ac_preproc_ok=: | |
5360 | break | |
89a42ac8 | 5361 | fi |
5213506e RW |
5362 | rm -f conftest.err conftest.$ac_ext |
5363 | ||
5364 | done | |
5365 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5366 | rm -f conftest.err conftest.$ac_ext | |
5367 | if $ac_preproc_ok; then : | |
5368 | break | |
34a86c2b NN |
5369 | fi |
5370 | ||
5213506e RW |
5371 | done |
5372 | ac_cv_prog_CPP=$CPP | |
5373 | ||
5374 | fi | |
5375 | CPP=$ac_cv_prog_CPP | |
643d3bd2 | 5376 | else |
5213506e RW |
5377 | ac_cv_prog_CPP=$CPP |
5378 | fi | |
5379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5380 | $as_echo "$CPP" >&6; } | |
5381 | ac_preproc_ok=false | |
5382 | for ac_c_preproc_warn_flag in '' yes | |
5383 | do | |
5384 | # Use a header file that comes with gcc, so configuring glibc | |
5385 | # with a fresh cross-compiler works. | |
5386 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5387 | # <limits.h> exists even on freestanding compilers. | |
5388 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5389 | # not just through cpp. "Syntax error" is here to catch this case. | |
5390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
643d3bd2 | 5391 | /* end confdefs.h. */ |
5213506e RW |
5392 | #ifdef __STDC__ |
5393 | # include <limits.h> | |
5394 | #else | |
5395 | # include <assert.h> | |
5396 | #endif | |
5397 | Syntax error | |
00020c16 | 5398 | _ACEOF |
5213506e | 5399 | if ac_fn_c_try_cpp "$LINENO"; then : |
3bbd5a19 | 5400 | |
643d3bd2 | 5401 | else |
5213506e RW |
5402 | # Broken: fails on valid input. |
5403 | continue | |
5404 | fi | |
5405 | rm -f conftest.err conftest.$ac_ext | |
643d3bd2 | 5406 | |
5213506e RW |
5407 | # OK, works on sane cases. Now check whether nonexistent headers |
5408 | # can be detected and how. | |
5409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5410 | /* end confdefs.h. */ | |
5411 | #include <ac_nonexistent.h> | |
5412 | _ACEOF | |
5413 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5414 | # Broken: success on invalid input. | |
5415 | continue | |
5416 | else | |
5417 | # Passes both tests. | |
5418 | ac_preproc_ok=: | |
5419 | break | |
643d3bd2 | 5420 | fi |
5213506e RW |
5421 | rm -f conftest.err conftest.$ac_ext |
5422 | ||
5423 | done | |
5424 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5425 | rm -f conftest.err conftest.$ac_ext | |
5426 | if $ac_preproc_ok; then : | |
5427 | ||
09a9c095 | 5428 | else |
5213506e RW |
5429 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
5430 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5431 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
5432 | See \`config.log' for more details." "$LINENO" 5; } | |
5433 | fi | |
373477bb | 5434 | |
5213506e RW |
5435 | ac_ext=c |
5436 | ac_cpp='$CPP $CPPFLAGS' | |
5437 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5438 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5439 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5440 | ||
5441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
5442 | $as_echo_n "checking for inline... " >&6; } | |
5443 | if test "${ac_cv_c_inline+set}" = set; then : | |
5444 | $as_echo_n "(cached) " >&6 | |
5445 | else | |
5446 | ac_cv_c_inline=no | |
5447 | for ac_kw in inline __inline__ __inline; do | |
5448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
00020c16 | 5449 | /* end confdefs.h. */ |
5213506e RW |
5450 | #ifndef __cplusplus |
5451 | typedef int foo_t; | |
5452 | static $ac_kw foo_t static_foo () {return 0; } | |
5453 | $ac_kw foo_t foo () {return 0; } | |
5454 | #endif | |
373477bb | 5455 | |
00020c16 | 5456 | _ACEOF |
5213506e RW |
5457 | if ac_fn_c_try_compile "$LINENO"; then : |
5458 | ac_cv_c_inline=$ac_kw | |
5459 | fi | |
5460 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5461 | test "$ac_cv_c_inline" != no && break | |
5462 | done | |
5463 | ||
5464 | fi | |
5465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
5466 | $as_echo "$ac_cv_c_inline" >&6; } | |
5467 | ||
5468 | case $ac_cv_c_inline in | |
5469 | inline | yes) ;; | |
5470 | *) | |
5471 | case $ac_cv_c_inline in | |
5472 | no) ac_val=;; | |
5473 | *) ac_val=$ac_cv_c_inline;; | |
5474 | esac | |
5475 | cat >>confdefs.h <<_ACEOF | |
5476 | #ifndef __cplusplus | |
5477 | #define inline $ac_val | |
5478 | #endif | |
00020c16 | 5479 | _ACEOF |
5213506e RW |
5480 | ;; |
5481 | esac | |
5482 | ||
5483 | ||
5484 | # sizeof(char) is 1 by definition. | |
5485 | # The cast to long int works around a bug in the HP C Compiler | |
5486 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5487 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5488 | # This bug is HP SR number 8606223364. | |
5489 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 | |
5490 | $as_echo_n "checking size of void *... " >&6; } | |
5491 | if test "${ac_cv_sizeof_void_p+set}" = set; then : | |
5492 | $as_echo_n "(cached) " >&6 | |
5493 | else | |
5494 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : | |
5495 | ||
5496 | else | |
5497 | if test "$ac_cv_type_void_p" = yes; then | |
5498 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5499 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5500 | { as_fn_set_status 77 | |
5501 | as_fn_error "cannot compute sizeof (void *) | |
5502 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5503 | else | |
5504 | ac_cv_sizeof_void_p=0 | |
5505 | fi | |
5506 | fi | |
5507 | ||
5508 | fi | |
5509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 | |
5510 | $as_echo "$ac_cv_sizeof_void_p" >&6; } | |
414d23ae | 5511 | |
5213506e RW |
5512 | |
5513 | ||
5514 | cat >>confdefs.h <<_ACEOF | |
5515 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
00020c16 | 5516 | _ACEOF |
5213506e RW |
5517 | |
5518 | ||
5519 | # The cast to long int works around a bug in the HP C Compiler | |
5520 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5521 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5522 | # This bug is HP SR number 8606223364. | |
5523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 | |
5524 | $as_echo_n "checking size of short... " >&6; } | |
5525 | if test "${ac_cv_sizeof_short+set}" = set; then : | |
5526 | $as_echo_n "(cached) " >&6 | |
00020c16 | 5527 | else |
5213506e RW |
5528 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : |
5529 | ||
5530 | else | |
5531 | if test "$ac_cv_type_short" = yes; then | |
5532 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5533 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5534 | { as_fn_set_status 77 | |
5535 | as_fn_error "cannot compute sizeof (short) | |
5536 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5537 | else | |
5538 | ac_cv_sizeof_short=0 | |
5539 | fi | |
5540 | fi | |
414d23ae | 5541 | |
a1286ef5 | 5542 | fi |
5213506e RW |
5543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 |
5544 | $as_echo "$ac_cv_sizeof_short" >&6; } | |
5545 | ||
5546 | ||
5547 | ||
5548 | cat >>confdefs.h <<_ACEOF | |
5549 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
5550 | _ACEOF | |
5551 | ||
5552 | ||
5553 | # The cast to long int works around a bug in the HP C Compiler | |
5554 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5555 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5556 | # This bug is HP SR number 8606223364. | |
5557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 | |
5558 | $as_echo_n "checking size of int... " >&6; } | |
5559 | if test "${ac_cv_sizeof_int+set}" = set; then : | |
5560 | $as_echo_n "(cached) " >&6 | |
e1bbfc5c | 5561 | else |
5213506e | 5562 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : |
e1bbfc5c | 5563 | |
5213506e RW |
5564 | else |
5565 | if test "$ac_cv_type_int" = yes; then | |
5566 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5567 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5568 | { as_fn_set_status 77 | |
5569 | as_fn_error "cannot compute sizeof (int) | |
5570 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5571 | else | |
5572 | ac_cv_sizeof_int=0 | |
5573 | fi | |
e1bbfc5c | 5574 | fi |
5213506e | 5575 | |
ba479fd2 | 5576 | fi |
5213506e RW |
5577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 |
5578 | $as_echo "$ac_cv_sizeof_int" >&6; } | |
00020c16 | 5579 | |
5213506e RW |
5580 | |
5581 | ||
5582 | cat >>confdefs.h <<_ACEOF | |
5583 | #define SIZEOF_INT $ac_cv_sizeof_int | |
ba479fd2 | 5584 | _ACEOF |
5213506e RW |
5585 | |
5586 | ||
5587 | # The cast to long int works around a bug in the HP C Compiler | |
5588 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5589 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5590 | # This bug is HP SR number 8606223364. | |
5591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5592 | $as_echo_n "checking size of long... " >&6; } | |
5593 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5594 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 5595 | else |
5213506e | 5596 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
ba479fd2 | 5597 | |
00020c16 | 5598 | else |
5213506e RW |
5599 | if test "$ac_cv_type_long" = yes; then |
5600 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5601 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5602 | { as_fn_set_status 77 | |
5603 | as_fn_error "cannot compute sizeof (long) | |
5604 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5605 | else | |
5606 | ac_cv_sizeof_long=0 | |
5607 | fi | |
5608 | fi | |
5609 | ||
5610 | fi | |
5611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 | |
5612 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
5613 | ||
5614 | ||
5615 | ||
5616 | cat >>confdefs.h <<_ACEOF | |
5617 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
ba479fd2 | 5618 | _ACEOF |
00020c16 | 5619 | |
00020c16 | 5620 | |
5213506e RW |
5621 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" |
5622 | if test "x$ac_cv_type_long_long" = x""yes; then : | |
5623 | ||
5624 | cat >>confdefs.h <<_ACEOF | |
5625 | #define HAVE_LONG_LONG 1 | |
ba479fd2 | 5626 | _ACEOF |
5213506e RW |
5627 | |
5628 | # The cast to long int works around a bug in the HP C Compiler | |
5629 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5630 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5631 | # This bug is HP SR number 8606223364. | |
5632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
5633 | $as_echo_n "checking size of long long... " >&6; } | |
5634 | if test "${ac_cv_sizeof_long_long+set}" = set; then : | |
5635 | $as_echo_n "(cached) " >&6 | |
b61ff9c8 | 5636 | else |
5213506e | 5637 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
ba479fd2 | 5638 | |
5213506e RW |
5639 | else |
5640 | if test "$ac_cv_type_long_long" = yes; then | |
5641 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5642 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5643 | { as_fn_set_status 77 | |
5644 | as_fn_error "cannot compute sizeof (long long) | |
5645 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5646 | else | |
5647 | ac_cv_sizeof_long_long=0 | |
5648 | fi | |
ba479fd2 | 5649 | fi |
5213506e | 5650 | |
6938ec6c | 5651 | fi |
5213506e RW |
5652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
5653 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
5654 | ||
5655 | ||
5656 | ||
5657 | cat >>confdefs.h <<_ACEOF | |
5658 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5659 | _ACEOF | |
5660 | ||
5661 | ||
6e3f3080 | 5662 | fi |
5213506e RW |
5663 | |
5664 | ac_fn_c_check_type "$LINENO" "__int64" "ac_cv_type___int64" "$ac_includes_default" | |
5665 | if test "x$ac_cv_type___int64" = x""yes; then : | |
5666 | ||
5667 | cat >>confdefs.h <<_ACEOF | |
5668 | #define HAVE___INT64 1 | |
5669 | _ACEOF | |
5670 | ||
5671 | # The cast to long int works around a bug in the HP C Compiler | |
5672 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5673 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5674 | # This bug is HP SR number 8606223364. | |
5675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 | |
5676 | $as_echo_n "checking size of __int64... " >&6; } | |
5677 | if test "${ac_cv_sizeof___int64+set}" = set; then : | |
5678 | $as_echo_n "(cached) " >&6 | |
5679 | else | |
5680 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : | |
5681 | ||
6938ec6c | 5682 | else |
5213506e RW |
5683 | if test "$ac_cv_type___int64" = yes; then |
5684 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5685 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5686 | { as_fn_set_status 77 | |
5687 | as_fn_error "cannot compute sizeof (__int64) | |
5688 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5689 | else | |
5690 | ac_cv_sizeof___int64=0 | |
5691 | fi | |
6938ec6c | 5692 | fi |
5213506e | 5693 | |
00020c16 | 5694 | fi |
5213506e RW |
5695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 |
5696 | $as_echo "$ac_cv_sizeof___int64" >&6; } | |
5697 | ||
5698 | ||
5699 | ||
00020c16 ILT |
5700 | cat >>confdefs.h <<_ACEOF |
5701 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 | |
5702 | _ACEOF | |
6938ec6c NN |
5703 | |
5704 | ||
00020c16 | 5705 | fi |
ba479fd2 | 5706 | |
fa802374 KT |
5707 | ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" |
5708 | case $ac_cv_c_int8_t in #( | |
5709 | no|yes) ;; #( | |
5710 | *) | |
5711 | ||
5712 | cat >>confdefs.h <<_ACEOF | |
5713 | #define int8_t $ac_cv_c_int8_t | |
5714 | _ACEOF | |
5715 | ;; | |
5716 | esac | |
5717 | ||
5718 | ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" | |
5719 | case $ac_cv_c_int16_t in #( | |
5720 | no|yes) ;; #( | |
5721 | *) | |
5722 | ||
5723 | cat >>confdefs.h <<_ACEOF | |
5724 | #define int16_t $ac_cv_c_int16_t | |
5725 | _ACEOF | |
5726 | ;; | |
5727 | esac | |
5728 | ||
5729 | ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" | |
5730 | case $ac_cv_c_int32_t in #( | |
5731 | no|yes) ;; #( | |
5732 | *) | |
5733 | ||
5734 | cat >>confdefs.h <<_ACEOF | |
5735 | #define int32_t $ac_cv_c_int32_t | |
5736 | _ACEOF | |
5737 | ;; | |
5738 | esac | |
5739 | ||
5740 | ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" | |
5741 | case $ac_cv_c_int64_t in #( | |
5742 | no|yes) ;; #( | |
5743 | *) | |
5744 | ||
5745 | cat >>confdefs.h <<_ACEOF | |
5746 | #define int64_t $ac_cv_c_int64_t | |
5747 | _ACEOF | |
5748 | ;; | |
5749 | esac | |
5750 | ||
5751 | ||
5752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 | |
5753 | $as_echo_n "checking for long long int... " >&6; } | |
5754 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
5755 | $as_echo_n "(cached) " >&6 | |
5756 | else | |
5757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5758 | /* end confdefs.h. */ | |
5759 | ||
5760 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
5761 | implementations with broken preprocessors. Perhaps this can | |
5762 | be revisited in 2012. In the meantime, code should not expect | |
5763 | #if to work with literals wider than 32 bits. */ | |
5764 | /* Test literals. */ | |
5765 | long long int ll = 9223372036854775807ll; | |
5766 | long long int nll = -9223372036854775807LL; | |
5767 | unsigned long long int ull = 18446744073709551615ULL; | |
5768 | /* Test constant expressions. */ | |
5769 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
5770 | ? 1 : -1)]; | |
5771 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
5772 | ? 1 : -1)]; | |
5773 | int i = 63; | |
5774 | int | |
5775 | main () | |
5776 | { | |
5777 | /* Test availability of runtime routines for shift and division. */ | |
5778 | long long int llmax = 9223372036854775807ll; | |
5779 | unsigned long long int ullmax = 18446744073709551615ull; | |
5780 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
5781 | | (llmax / ll) | (llmax % ll) | |
5782 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5783 | | (ullmax / ull) | (ullmax % ull)); | |
5784 | ; | |
5785 | return 0; | |
5786 | } | |
5787 | ||
5788 | _ACEOF | |
5789 | if ac_fn_c_try_link "$LINENO"; then : | |
5790 | if test "$cross_compiling" = yes; then : | |
5791 | ac_cv_type_long_long_int=yes | |
5792 | else | |
5793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5794 | /* end confdefs.h. */ | |
5795 | #include <limits.h> | |
5796 | #ifndef LLONG_MAX | |
5797 | # define HALF \ | |
5798 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
5799 | # define LLONG_MAX (HALF - 1 + HALF) | |
5800 | #endif | |
5801 | int | |
5802 | main () | |
5803 | { | |
5804 | long long int n = 1; | |
5805 | int i; | |
5806 | for (i = 0; ; i++) | |
5807 | { | |
5808 | long long int m = n << i; | |
5809 | if (m >> i != n) | |
5810 | return 1; | |
5811 | if (LLONG_MAX / 2 < m) | |
5812 | break; | |
5813 | } | |
5814 | return 0; | |
5815 | ; | |
5816 | return 0; | |
5817 | } | |
5818 | _ACEOF | |
5819 | if ac_fn_c_try_run "$LINENO"; then : | |
5820 | ac_cv_type_long_long_int=yes | |
5821 | else | |
5822 | ac_cv_type_long_long_int=no | |
5823 | fi | |
5824 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5825 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5826 | fi | |
5827 | ||
5828 | else | |
5829 | ac_cv_type_long_long_int=no | |
5830 | fi | |
5831 | rm -f core conftest.err conftest.$ac_objext \ | |
5832 | conftest$ac_exeext conftest.$ac_ext | |
5833 | fi | |
5834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 | |
5835 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
5836 | if test $ac_cv_type_long_long_int = yes; then | |
5837 | ||
5838 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h | |
5839 | ||
5840 | fi | |
5841 | ||
5842 | ||
5843 | ||
5844 | ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" | |
5845 | if test "x$ac_cv_type_intmax_t" = x""yes; then : | |
5846 | ||
5847 | $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h | |
5848 | ||
5849 | else | |
5850 | test $ac_cv_type_long_long_int = yes \ | |
5851 | && ac_type='long long int' \ | |
5852 | || ac_type='long int' | |
5853 | ||
5854 | cat >>confdefs.h <<_ACEOF | |
5855 | #define intmax_t $ac_type | |
5856 | _ACEOF | |
5857 | ||
5858 | fi | |
5859 | ||
5860 | ||
5861 | ||
5862 | ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" | |
5863 | if test "x$ac_cv_type_intptr_t" = x""yes; then : | |
5864 | ||
5865 | $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h | |
5866 | ||
5867 | else | |
5868 | for ac_type in 'int' 'long int' 'long long int'; do | |
5869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5870 | /* end confdefs.h. */ | |
5871 | $ac_includes_default | |
5872 | int | |
5873 | main () | |
5874 | { | |
5875 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
5876 | test_array [0] = 0 | |
5877 | ||
5878 | ; | |
5879 | return 0; | |
5880 | } | |
5881 | _ACEOF | |
5882 | if ac_fn_c_try_compile "$LINENO"; then : | |
5883 | ||
5884 | cat >>confdefs.h <<_ACEOF | |
5885 | #define intptr_t $ac_type | |
5886 | _ACEOF | |
5887 | ||
5888 | ac_type= | |
5889 | fi | |
5890 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5891 | test -z "$ac_type" && break | |
5892 | done | |
5893 | fi | |
5894 | ||
5895 | ||
5896 | ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" | |
5897 | case $ac_cv_c_uint8_t in #( | |
5898 | no|yes) ;; #( | |
5899 | *) | |
5900 | ||
5901 | $as_echo "#define _UINT8_T 1" >>confdefs.h | |
5902 | ||
5903 | ||
5904 | cat >>confdefs.h <<_ACEOF | |
5905 | #define uint8_t $ac_cv_c_uint8_t | |
5906 | _ACEOF | |
5907 | ;; | |
5908 | esac | |
5909 | ||
5910 | ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" | |
5911 | case $ac_cv_c_uint16_t in #( | |
5912 | no|yes) ;; #( | |
5913 | *) | |
5914 | ||
5915 | ||
5916 | cat >>confdefs.h <<_ACEOF | |
5917 | #define uint16_t $ac_cv_c_uint16_t | |
5918 | _ACEOF | |
5919 | ;; | |
5920 | esac | |
5921 | ||
5922 | ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" | |
5923 | case $ac_cv_c_uint32_t in #( | |
5924 | no|yes) ;; #( | |
5925 | *) | |
5926 | ||
5927 | $as_echo "#define _UINT32_T 1" >>confdefs.h | |
5928 | ||
5929 | ||
5930 | cat >>confdefs.h <<_ACEOF | |
5931 | #define uint32_t $ac_cv_c_uint32_t | |
5932 | _ACEOF | |
5933 | ;; | |
5934 | esac | |
5935 | ||
5936 | ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" | |
5937 | case $ac_cv_c_uint64_t in #( | |
5938 | no|yes) ;; #( | |
5939 | *) | |
5940 | ||
5941 | $as_echo "#define _UINT64_T 1" >>confdefs.h | |
5942 | ||
5943 | ||
5944 | cat >>confdefs.h <<_ACEOF | |
5945 | #define uint64_t $ac_cv_c_uint64_t | |
5946 | _ACEOF | |
5947 | ;; | |
5948 | esac | |
5949 | ||
5950 | ||
5951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 | |
5952 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
5953 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
5954 | $as_echo_n "(cached) " >&6 | |
5955 | else | |
5956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5957 | /* end confdefs.h. */ | |
5958 | ||
5959 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
5960 | implementations with broken preprocessors. Perhaps this can | |
5961 | be revisited in 2012. In the meantime, code should not expect | |
5962 | #if to work with literals wider than 32 bits. */ | |
5963 | /* Test literals. */ | |
5964 | long long int ll = 9223372036854775807ll; | |
5965 | long long int nll = -9223372036854775807LL; | |
5966 | unsigned long long int ull = 18446744073709551615ULL; | |
5967 | /* Test constant expressions. */ | |
5968 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
5969 | ? 1 : -1)]; | |
5970 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
5971 | ? 1 : -1)]; | |
5972 | int i = 63; | |
5973 | int | |
5974 | main () | |
5975 | { | |
5976 | /* Test availability of runtime routines for shift and division. */ | |
5977 | long long int llmax = 9223372036854775807ll; | |
5978 | unsigned long long int ullmax = 18446744073709551615ull; | |
5979 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
5980 | | (llmax / ll) | (llmax % ll) | |
5981 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5982 | | (ullmax / ull) | (ullmax % ull)); | |
5983 | ; | |
5984 | return 0; | |
5985 | } | |
5986 | ||
5987 | _ACEOF | |
5988 | if ac_fn_c_try_link "$LINENO"; then : | |
5989 | ac_cv_type_unsigned_long_long_int=yes | |
5990 | else | |
5991 | ac_cv_type_unsigned_long_long_int=no | |
5992 | fi | |
5993 | rm -f core conftest.err conftest.$ac_objext \ | |
5994 | conftest$ac_exeext conftest.$ac_ext | |
5995 | fi | |
5996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
5997 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
5998 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
5999 | ||
6000 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h | |
6001 | ||
6002 | fi | |
6003 | ||
6004 | ||
6005 | ||
6006 | ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default" | |
6007 | if test "x$ac_cv_type_uintmax_t" = x""yes; then : | |
6008 | ||
6009 | $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h | |
6010 | ||
6011 | else | |
6012 | test $ac_cv_type_unsigned_long_long_int = yes \ | |
6013 | && ac_type='unsigned long long int' \ | |
6014 | || ac_type='unsigned long int' | |
6015 | ||
6016 | cat >>confdefs.h <<_ACEOF | |
6017 | #define uintmax_t $ac_type | |
6018 | _ACEOF | |
6019 | ||
6020 | fi | |
6021 | ||
6022 | ||
6023 | ||
6024 | ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" | |
6025 | if test "x$ac_cv_type_uintptr_t" = x""yes; then : | |
6026 | ||
6027 | $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h | |
6028 | ||
6029 | else | |
6030 | for ac_type in 'unsigned int' 'unsigned long int' \ | |
6031 | 'unsigned long long int'; do | |
6032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6033 | /* end confdefs.h. */ | |
6034 | $ac_includes_default | |
6035 | int | |
6036 | main () | |
6037 | { | |
6038 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
6039 | test_array [0] = 0 | |
6040 | ||
6041 | ; | |
6042 | return 0; | |
6043 | } | |
6044 | _ACEOF | |
6045 | if ac_fn_c_try_compile "$LINENO"; then : | |
6046 | ||
6047 | cat >>confdefs.h <<_ACEOF | |
6048 | #define uintptr_t $ac_type | |
6049 | _ACEOF | |
6050 | ||
6051 | ac_type= | |
6052 | fi | |
6053 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6054 | test -z "$ac_type" && break | |
6055 | done | |
6056 | fi | |
6057 | ||
6058 | ||
6059 | ||
6060 | ||
6061 | ||
6062 | ||
6063 | ||
6064 | ||
6065 | ||
6066 | ||
6067 | ||
6068 | ||
6069 | ||
6070 | ||
00020c16 ILT |
6071 | |
6072 | # --------------------- | |
6073 | # Warnings and checking | |
6074 | # --------------------- | |
6075 | ||
6076 | # Check $CC warning features (if it's GCC). | |
6077 | # We want to use -pedantic, but we don't want warnings about | |
6078 | # * 'long long' | |
6079 | # * variadic macros | |
6080 | # * overlong strings | |
6081 | # So, we only use -pedantic if we can disable those warnings. | |
6082 | ||
6083 | loose_warn= | |
6084 | save_CFLAGS="$CFLAGS" | |
6085 | for option in -W -Wall -Wwrite-strings -Wcast-qual; do | |
5213506e | 6086 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
00020c16 | 6087 | |
5213506e RW |
6088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6089 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6090 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6091 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6092 | else |
6093 | CFLAGS="$option" | |
5213506e | 6094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 6095 | /* end confdefs.h. */ |
00020c16 ILT |
6096 | |
6097 | int | |
6098 | main () | |
6099 | { | |
6100 | ||
6101 | ; | |
6102 | return 0; | |
6103 | } | |
ba479fd2 | 6104 | _ACEOF |
5213506e | 6105 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6106 | eval "$as_acx_Woption=yes" |
a207b594 | 6107 | else |
5213506e | 6108 | eval "$as_acx_Woption=no" |
a207b594 | 6109 | fi |
5213506e | 6110 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 ILT |
6111 | |
6112 | fi | |
5213506e RW |
6113 | eval ac_res=\$$as_acx_Woption |
6114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6115 | $as_echo "$ac_res" >&6; } | |
6116 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 ILT |
6117 | loose_warn="$loose_warn${loose_warn:+ }$option" |
6118 | fi | |
00020c16 ILT |
6119 | done |
6120 | CFLAGS="$save_CFLAGS" | |
6121 | ||
6122 | c_loose_warn= | |
6123 | save_CFLAGS="$CFLAGS" | |
6124 | for option in -Wstrict-prototypes -Wmissing-prototypes; do | |
5213506e | 6125 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
00020c16 | 6126 | |
5213506e RW |
6127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6128 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6129 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6130 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6131 | else |
6132 | CFLAGS="$option" | |
5213506e | 6133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 6134 | /* end confdefs.h. */ |
00020c16 ILT |
6135 | |
6136 | int | |
6137 | main () | |
6138 | { | |
6139 | ||
6140 | ; | |
6141 | return 0; | |
6142 | } | |
ba479fd2 | 6143 | _ACEOF |
5213506e | 6144 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6145 | eval "$as_acx_Woption=yes" |
14011ca4 | 6146 | else |
5213506e | 6147 | eval "$as_acx_Woption=no" |
cafe096b | 6148 | fi |
5213506e | 6149 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 6150 | |
56694dd9 | 6151 | fi |
5213506e RW |
6152 | eval ac_res=\$$as_acx_Woption |
6153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6154 | $as_echo "$ac_res" >&6; } | |
6155 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 | 6156 | c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option" |
56694dd9 | 6157 | fi |
00020c16 ILT |
6158 | done |
6159 | CFLAGS="$save_CFLAGS" | |
6160 | ||
6161 | strict_warn= | |
6162 | save_CFLAGS="$CFLAGS" | |
6163 | for option in -Wmissing-format-attribute; do | |
5213506e | 6164 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
00020c16 | 6165 | |
5213506e RW |
6166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6167 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6168 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6169 | $as_echo_n "(cached) " >&6 | |
414d23ae | 6170 | else |
00020c16 | 6171 | CFLAGS="$option" |
5213506e | 6172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
6173 | /* end confdefs.h. */ |
6174 | ||
6175 | int | |
6176 | main () | |
6177 | { | |
6178 | ||
6179 | ; | |
6180 | return 0; | |
6181 | } | |
6182 | _ACEOF | |
5213506e | 6183 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6184 | eval "$as_acx_Woption=yes" |
414d23ae | 6185 | else |
5213506e | 6186 | eval "$as_acx_Woption=no" |
414d23ae | 6187 | fi |
5213506e | 6188 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 6189 | |
00020c16 | 6190 | fi |
5213506e RW |
6191 | eval ac_res=\$$as_acx_Woption |
6192 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6193 | $as_echo "$ac_res" >&6; } | |
6194 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 ILT |
6195 | strict_warn="$strict_warn${strict_warn:+ }$option" |
6196 | fi | |
00020c16 ILT |
6197 | done |
6198 | CFLAGS="$save_CFLAGS" | |
75e93faa | 6199 | |
00020c16 ILT |
6200 | c_strict_warn= |
6201 | save_CFLAGS="$CFLAGS" | |
6202 | for option in -Wold-style-definition -Wc++-compat; do | |
5213506e | 6203 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` |
ba479fd2 | 6204 | |
5213506e RW |
6205 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 |
6206 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
6207 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6208 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6209 | else |
6210 | CFLAGS="$option" | |
5213506e | 6211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 6212 | /* end confdefs.h. */ |
a207b594 | 6213 | |
00020c16 ILT |
6214 | int |
6215 | main () | |
6216 | { | |
ba479fd2 | 6217 | |
00020c16 ILT |
6218 | ; |
6219 | return 0; | |
6220 | } | |
ba479fd2 | 6221 | _ACEOF |
5213506e | 6222 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 ILT |
6223 | eval "$as_acx_Woption=yes" |
6224 | else | |
5213506e | 6225 | eval "$as_acx_Woption=no" |
414d23ae | 6226 | fi |
5213506e | 6227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa | 6228 | |
00020c16 | 6229 | fi |
5213506e RW |
6230 | eval ac_res=\$$as_acx_Woption |
6231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6232 | $as_echo "$ac_res" >&6; } | |
6233 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
00020c16 ILT |
6234 | c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option" |
6235 | fi | |
00020c16 ILT |
6236 | done |
6237 | CFLAGS="$save_CFLAGS" | |
75e93faa | 6238 | |
5213506e RW |
6239 | if test "$GCC" = yes; then : |
6240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5 | |
6241 | $as_echo_n "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... " >&6; } | |
6242 | if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then : | |
6243 | $as_echo_n "(cached) " >&6 | |
75e93faa | 6244 | else |
00020c16 ILT |
6245 | save_CFLAGS="$CFLAGS" |
6246 | CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" | |
5213506e | 6247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 6248 | /* end confdefs.h. */ |
2f41c1d6 | 6249 | |
00020c16 ILT |
6250 | int |
6251 | main () | |
6252 | { | |
b61ff9c8 | 6253 | |
00020c16 ILT |
6254 | ; |
6255 | return 0; | |
6256 | } | |
6257 | _ACEOF | |
5213506e | 6258 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 6259 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes |
439a7e54 | 6260 | else |
5213506e | 6261 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no |
00020c16 | 6262 | fi |
5213506e | 6263 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 ILT |
6264 | CFLAGS="$save_CFLAGS" |
6265 | fi | |
5213506e RW |
6266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5 |
6267 | $as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6; } | |
6268 | if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then : | |
00020c16 ILT |
6269 | strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" |
6270 | fi | |
ba479fd2 | 6271 | |
439a7e54 DN |
6272 | fi |
6273 | ||
5213506e RW |
6274 | # Check whether --enable-werror-always was given. |
6275 | if test "${enable_werror_always+set}" = set; then : | |
6276 | enableval=$enable_werror_always; | |
34a86c2b | 6277 | else |
00020c16 | 6278 | enable_werror_always=no |
00020c16 | 6279 | fi |
cafe096b | 6280 | |
5213506e RW |
6281 | if test $enable_werror_always = yes; then : |
6282 | strict_warn="$strict_warn${strict_warn:+ }-Werror" | |
6283 | fi | |
b61ff9c8 | 6284 | |
75e93faa | 6285 | |
34a86c2b | 6286 | |
00020c16 ILT |
6287 | # The above macros do nothing if the compiler is not GCC. However, the |
6288 | # Makefile has more goo to add other flags, so these variables are used | |
6289 | # to enable warnings only for GCC. | |
6290 | warn_cflags= | |
6291 | warn_cxxflags= | |
6292 | if test "x$GCC" = "xyes"; then | |
6293 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6294 | warn_cxxflags='$(GCC_WARN_CXXFLAGS)' | |
6295 | fi | |
75e93faa ZW |
6296 | |
6297 | ||
b61ff9c8 | 6298 | |
00020c16 ILT |
6299 | # Enable expensive internal checks |
6300 | is_release= | |
6301 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6302 | is_release=yes | |
6303 | fi | |
79b87c74 | 6304 | |
5213506e RW |
6305 | # Check whether --enable-checking was given. |
6306 | if test "${enable_checking+set}" = set; then : | |
6307 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
79b87c74 MM |
6308 | else |
6309 | ||
00020c16 ILT |
6310 | # Determine the default checks. |
6311 | if test x$is_release = x ; then | |
6312 | ac_checking_flags=yes | |
6313 | else | |
6314 | ac_checking_flags=release | |
6315 | fi | |
5213506e RW |
6316 | fi |
6317 | ||
00020c16 ILT |
6318 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6319 | for check in release $ac_checking_flags | |
6320 | do | |
6321 | case $check in | |
6322 | # these set all the flags to specific states | |
6323 | yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ; | |
6324 | ac_fold_checking= ; ac_gc_checking=1 ; | |
6325 | ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ; | |
6326 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6327 | ac_tree_checking=1 ; ac_valgrind_checking= ; | |
6328 | ac_types_checking=1 ;; | |
6329 | no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ; | |
6330 | ac_fold_checking= ; ac_gc_checking= ; | |
6331 | ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ; | |
6332 | ac_rtlflag_checking= ; ac_runtime_checking= ; | |
6333 | ac_tree_checking= ; ac_valgrind_checking= ; | |
6334 | ac_types_checking= ;; | |
6335 | all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ; | |
6336 | ac_fold_checking=1 ; ac_gc_checking=1 ; | |
6337 | ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ; | |
6338 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6339 | ac_tree_checking=1 ; ac_valgrind_checking= ; | |
6340 | ac_types_checking=1 ;; | |
6341 | release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ; | |
6342 | ac_fold_checking= ; ac_gc_checking= ; | |
6343 | ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ; | |
6344 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6345 | ac_tree_checking= ; ac_valgrind_checking= ; | |
6346 | ac_types_checking= ;; | |
6347 | # these enable particular checks | |
6348 | assert) ac_assert_checking=1 ;; | |
6349 | df) ac_df_checking=1 ;; | |
6350 | fold) ac_fold_checking=1 ;; | |
6351 | gc) ac_gc_checking=1 ;; | |
6352 | gcac) ac_gc_always_collect=1 ;; | |
6353 | gimple) ac_gimple_checking=1 ;; | |
6354 | misc) ac_checking=1 ;; | |
6355 | rtl) ac_rtl_checking=1 ;; | |
6356 | rtlflag) ac_rtlflag_checking=1 ;; | |
6357 | runtime) ac_runtime_checking=1 ;; | |
6358 | tree) ac_tree_checking=1 ;; | |
6359 | types) ac_types_checking=1 ;; | |
6360 | valgrind) ac_valgrind_checking=1 ;; | |
5213506e | 6361 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
00020c16 ILT |
6362 | esac |
6363 | done | |
6364 | IFS="$ac_save_IFS" | |
486aa804 | 6365 | |
00020c16 ILT |
6366 | nocommon_flag="" |
6367 | if test x$ac_checking != x ; then | |
79b87c74 | 6368 | |
5213506e | 6369 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h |
79b87c74 | 6370 | |
00020c16 ILT |
6371 | nocommon_flag=-fno-common |
6372 | fi | |
79b87c74 | 6373 | |
00020c16 | 6374 | if test x$ac_df_checking != x ; then |
486aa804 | 6375 | |
5213506e | 6376 | $as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h |
486aa804 | 6377 | |
00020c16 ILT |
6378 | fi |
6379 | if test x$ac_assert_checking != x ; then | |
486aa804 | 6380 | |
5213506e | 6381 | $as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h |
486aa804 | 6382 | |
00020c16 ILT |
6383 | fi |
6384 | if test x$ac_gimple_checking != x ; then | |
486aa804 | 6385 | |
5213506e | 6386 | $as_echo "#define ENABLE_GIMPLE_CHECKING 1" >>confdefs.h |
b61ff9c8 | 6387 | |
00020c16 | 6388 | fi |
ab22c1fa | 6389 | |
00020c16 | 6390 | if test x$ac_runtime_checking != x ; then |
ab22c1fa | 6391 | |
5213506e | 6392 | $as_echo "#define ENABLE_RUNTIME_CHECKING 1" >>confdefs.h |
ab22c1fa | 6393 | |
00020c16 ILT |
6394 | fi |
6395 | if test x$ac_tree_checking != x ; then | |
ab22c1fa | 6396 | |
5213506e | 6397 | $as_echo "#define ENABLE_TREE_CHECKING 1" >>confdefs.h |
ab22c1fa | 6398 | |
00020c16 ILT |
6399 | TREEBROWSER=tree-browser.o |
6400 | fi | |
6401 | if test x$ac_types_checking != x ; then | |
ab22c1fa | 6402 | |
5213506e | 6403 | $as_echo "#define ENABLE_TYPES_CHECKING 1" >>confdefs.h |
ab22c1fa | 6404 | |
00020c16 | 6405 | fi |
ab22c1fa | 6406 | |
00020c16 | 6407 | if test x$ac_rtl_checking != x ; then |
2f41c1d6 | 6408 | |
5213506e RW |
6409 | $as_echo "#define ENABLE_RTL_CHECKING 1" >>confdefs.h |
6410 | ||
00020c16 | 6411 | fi |
5213506e RW |
6412 | if test x$ac_rtlflag_checking != x ; then |
6413 | ||
6414 | $as_echo "#define ENABLE_RTL_FLAG_CHECKING 1" >>confdefs.h | |
4977bab6 | 6415 | |
00020c16 | 6416 | fi |
5213506e RW |
6417 | if test x$ac_gc_checking != x ; then |
6418 | ||
6419 | $as_echo "#define ENABLE_GC_CHECKING 1" >>confdefs.h | |
6420 | ||
6421 | fi | |
6422 | if test x$ac_gc_always_collect != x ; then | |
6423 | ||
6424 | $as_echo "#define ENABLE_GC_ALWAYS_COLLECT 1" >>confdefs.h | |
4977bab6 | 6425 | |
00020c16 | 6426 | fi |
5213506e RW |
6427 | if test x$ac_fold_checking != x ; then |
6428 | ||
6429 | $as_echo "#define ENABLE_FOLD_CHECKING 1" >>confdefs.h | |
2f41c1d6 | 6430 | |
00020c16 | 6431 | fi |
5213506e RW |
6432 | valgrind_path_defines= |
6433 | valgrind_command= | |
6434 | ||
6435 | ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default" | |
6436 | if test "x$ac_cv_header_valgrind_h" = x""yes; then : | |
00020c16 | 6437 | have_valgrind_h=yes |
2f41c1d6 | 6438 | else |
00020c16 ILT |
6439 | have_valgrind_h=no |
6440 | fi | |
2f41c1d6 | 6441 | |
1a4b763e | 6442 | |
2f41c1d6 | 6443 | |
00020c16 ILT |
6444 | if test x$ac_valgrind_checking != x ; then |
6445 | # It is certainly possible that there's valgrind but no valgrind.h. | |
6446 | # GCC relies on making annotations so we must have both. | |
5213506e RW |
6447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6448 | $as_echo_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... " >&6; } | |
6449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
00020c16 ILT |
6450 | /* end confdefs.h. */ |
6451 | #include <valgrind/memcheck.h> | |
6452 | #ifndef VALGRIND_DISCARD | |
6453 | #error VALGRIND_DISCARD not defined | |
6454 | #endif | |
6455 | _ACEOF | |
5213506e | 6456 | if ac_fn_c_try_cpp "$LINENO"; then : |
00020c16 | 6457 | gcc_cv_header_valgrind_memcheck_h=yes |
aca600aa | 6458 | else |
00020c16 ILT |
6459 | gcc_cv_header_valgrind_memcheck_h=no |
6460 | fi | |
6461 | rm -f conftest.err conftest.$ac_ext | |
5213506e RW |
6462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_valgrind_memcheck_h" >&5 |
6463 | $as_echo "$gcc_cv_header_valgrind_memcheck_h" >&6; } | |
6464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6465 | $as_echo_n "checking for VALGRIND_DISCARD in <memcheck.h>... " >&6; } | |
6466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
00020c16 ILT |
6467 | /* end confdefs.h. */ |
6468 | #include <memcheck.h> | |
6469 | #ifndef VALGRIND_DISCARD | |
6470 | #error VALGRIND_DISCARD not defined | |
6471 | #endif | |
6472 | _ACEOF | |
5213506e | 6473 | if ac_fn_c_try_cpp "$LINENO"; then : |
00020c16 | 6474 | gcc_cv_header_memcheck_h=yes |
e9a25f70 | 6475 | else |
00020c16 ILT |
6476 | gcc_cv_header_memcheck_h=no |
6477 | fi | |
6478 | rm -f conftest.err conftest.$ac_ext | |
5213506e RW |
6479 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_memcheck_h" >&5 |
6480 | $as_echo "$gcc_cv_header_memcheck_h" >&6; } | |
00020c16 ILT |
6481 | |
6482 | # Prepare PATH_SEPARATOR. | |
6483 | # The user is always right. | |
6484 | if test "${PATH_SEPARATOR+set}" != set; then | |
6485 | echo "#! /bin/sh" >conf$$.sh | |
6486 | echo "exit 0" >>conf$$.sh | |
6487 | chmod +x conf$$.sh | |
6488 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6489 | PATH_SEPARATOR=';' | |
6490 | else | |
6491 | PATH_SEPARATOR=: | |
6492 | fi | |
6493 | rm -f conf$$.sh | |
e9a25f70 JL |
6494 | fi |
6495 | ||
00020c16 ILT |
6496 | # Find out how to test for executable files. Don't use a zero-byte file, |
6497 | # as systems may use methods other than mode bits to determine executability. | |
6498 | cat >conf$$.file <<_ASEOF | |
6499 | #! /bin/sh | |
6500 | exit 0 | |
6501 | _ASEOF | |
6502 | chmod +x conf$$.file | |
6503 | if test -x conf$$.file >/dev/null 2>&1; then | |
6504 | ac_executable_p="test -x" | |
6505 | else | |
6506 | ac_executable_p="test -f" | |
6507 | fi | |
6508 | rm -f conf$$.file | |
e9a25f70 | 6509 | |
00020c16 ILT |
6510 | # Extract the first word of "valgrind", so it can be a program name with args. |
6511 | set dummy valgrind; ac_word=$2 | |
5213506e RW |
6512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6513 | $as_echo_n "checking for $ac_word... " >&6; } | |
6514 | if test "${ac_cv_path_valgrind_path+set}" = set; then : | |
6515 | $as_echo_n "(cached) " >&6 | |
861bb6c1 | 6516 | else |
00020c16 ILT |
6517 | case "$valgrind_path" in |
6518 | [\\/]* | ?:[\\/]*) | |
6519 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6520 | ;; | |
6521 | *) | |
6522 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
6523 | for ac_dir in $PATH; do | |
6524 | IFS="$ac_save_IFS" | |
6525 | test -z "$ac_dir" && ac_dir=. | |
6526 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6527 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6528 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6529 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6530 | break 2 | |
6531 | fi | |
6532 | fi | |
6533 | done | |
6534 | done | |
6535 | IFS="$ac_save_IFS" | |
6536 | ;; | |
6537 | esac | |
861bb6c1 | 6538 | fi |
00020c16 ILT |
6539 | valgrind_path="$ac_cv_path_valgrind_path" |
6540 | if test -n "$valgrind_path"; then | |
5213506e RW |
6541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $valgrind_path" >&5 |
6542 | $as_echo "$valgrind_path" >&6; } | |
861bb6c1 | 6543 | else |
5213506e RW |
6544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6545 | $as_echo "no" >&6; } | |
861bb6c1 JL |
6546 | fi |
6547 | ||
00020c16 ILT |
6548 | if test "x$valgrind_path" = "x" \ |
6549 | || (test $have_valgrind_h = no \ | |
6550 | && test $gcc_cv_header_memcheck_h = no \ | |
6551 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
5213506e | 6552 | as_fn_error "*** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5 |
00020c16 ILT |
6553 | fi |
6554 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6555 | valgrind_command="$valgrind_path -q" | |
861bb6c1 | 6556 | |
5213506e | 6557 | $as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h |
00020c16 ILT |
6558 | |
6559 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then | |
6560 | ||
5213506e | 6561 | $as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h |
2c4902b9 | 6562 | |
0a4b6309 | 6563 | fi |
00020c16 ILT |
6564 | if test $gcc_cv_header_memcheck_h = yes; then |
6565 | ||
5213506e | 6566 | $as_echo "#define HAVE_MEMCHECK_H 1" >>confdefs.h |
0a4b6309 | 6567 | |
0a4b6309 RL |
6568 | fi |
6569 | fi | |
6570 | ||
18fc9bd4 | 6571 | |
18fc9bd4 | 6572 | |
00020c16 | 6573 | # Enable code coverage collection |
5213506e RW |
6574 | # Check whether --enable-coverage was given. |
6575 | if test "${enable_coverage+set}" = set; then : | |
6576 | enableval=$enable_coverage; case "${enableval}" in | |
00020c16 ILT |
6577 | yes|noopt) |
6578 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6579 | ;; | |
6580 | opt) | |
6581 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6582 | ;; | |
6583 | no) | |
6584 | # a.k.a. --disable-coverage | |
6585 | coverage_flags="" | |
6586 | ;; | |
6587 | *) | |
5213506e | 6588 | as_fn_error "unknown coverage setting $enableval" "$LINENO" 5 |
00020c16 ILT |
6589 | ;; |
6590 | esac | |
861bb6c1 | 6591 | else |
00020c16 | 6592 | coverage_flags="" |
5213506e | 6593 | fi |
00020c16 ILT |
6594 | |
6595 | ||
ba479fd2 | 6596 | |
5213506e RW |
6597 | # Check whether --enable-gather-detailed-mem-stats was given. |
6598 | if test "${enable_gather_detailed_mem_stats+set}" = set; then : | |
6599 | enableval=$enable_gather_detailed_mem_stats; | |
ba479fd2 | 6600 | else |
00020c16 | 6601 | enable_gather_detailed_mem_stats=no |
5213506e RW |
6602 | fi |
6603 | ||
00020c16 ILT |
6604 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
6605 | ||
5213506e | 6606 | $as_echo "#define GATHER_STATISTICS 1" >>confdefs.h |
ba479fd2 NN |
6607 | |
6608 | fi | |
00020c16 ILT |
6609 | |
6610 | # ------------------------------- | |
6611 | # Miscenalleous configure options | |
6612 | # ------------------------------- | |
6613 | ||
6614 | # See if we are building gcc with C++. | |
5213506e RW |
6615 | # Check whether --enable-build-with-cxx was given. |
6616 | if test "${enable_build_with_cxx+set}" = set; then : | |
6617 | enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval | |
ba479fd2 | 6618 | else |
00020c16 | 6619 | ENABLE_BUILD_WITH_CXX=no |
5213506e RW |
6620 | fi |
6621 | ||
ba479fd2 | 6622 | |
00020c16 ILT |
6623 | |
6624 | # With stabs | |
6625 | ||
5213506e RW |
6626 | # Check whether --with-stabs was given. |
6627 | if test "${with_stabs+set}" = set; then : | |
6628 | withval=$with_stabs; stabs="$with_stabs" | |
6e3f3080 | 6629 | else |
00020c16 | 6630 | stabs=no |
5213506e | 6631 | fi |
00020c16 | 6632 | |
ba479fd2 | 6633 | |
5213506e RW |
6634 | # Determine whether or not multilibs are enabled. |
6635 | # Check whether --enable-multilib was given. | |
6636 | if test "${enable_multilib+set}" = set; then : | |
6637 | enableval=$enable_multilib; | |
ba479fd2 | 6638 | else |
00020c16 | 6639 | enable_multilib=yes |
5213506e RW |
6640 | fi |
6641 | ||
861bb6c1 | 6642 | |
343a6100 | 6643 | |
00020c16 | 6644 | # Enable __cxa_atexit for C++. |
5213506e RW |
6645 | # Check whether --enable-__cxa_atexit was given. |
6646 | if test "${enable___cxa_atexit+set}" = set; then : | |
6647 | enableval=$enable___cxa_atexit; | |
6648 | fi | |
00020c16 | 6649 | |
00020c16 ILT |
6650 | |
6651 | # Enable C extension for decimal float if target supports it. | |
5213506e RW |
6652 | # Check whether --enable-decimal-float was given. |
6653 | if test "${enable_decimal_float+set}" = set; then : | |
6654 | enableval=$enable_decimal_float; | |
00020c16 ILT |
6655 | case $enable_decimal_float in |
6656 | yes | no | bid | dpd) ;; | |
5213506e RW |
6657 | *) as_fn_error "'$enable_decimal_float' is an invalid value for --enable-decimal-float. |
6658 | Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;; | |
00020c16 | 6659 | esac |
343a6100 | 6660 | |
0a4b6309 | 6661 | else |
00020c16 ILT |
6662 | |
6663 | case $target in | |
6664 | powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*) | |
6665 | enable_decimal_float=yes | |
0a4b6309 | 6666 | ;; |
00020c16 | 6667 | *) |
5213506e RW |
6668 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5 |
6669 | $as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
00020c16 ILT |
6670 | enable_decimal_float=no |
6671 | ;; | |
6672 | esac | |
6673 | ||
5213506e RW |
6674 | fi |
6675 | ||
00020c16 ILT |
6676 | |
6677 | dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi` | |
6678 | ||
6679 | cat >>confdefs.h <<_ACEOF | |
6680 | #define ENABLE_DECIMAL_FLOAT $dfp | |
6681 | _ACEOF | |
6682 | ||
6683 | ||
6684 | # x86's use BID format instead of DPD | |
6685 | case x$enable_decimal_float in | |
6686 | xyes) | |
6687 | case $target in | |
6688 | i?86*-*-linux* | x86_64*-*-linux*) | |
6689 | enable_decimal_float=bid | |
6690 | ;; | |
6691 | *) | |
6692 | enable_decimal_float=dpd | |
6693 | ;; | |
0a4b6309 | 6694 | esac |
00020c16 ILT |
6695 | ;; |
6696 | xno) | |
6697 | # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper | |
6698 | # dependency on libdecnumber. | |
6699 | enable_decimal_float=dpd | |
6700 | ;; | |
6701 | esac | |
0a4b6309 | 6702 | |
0a4b6309 | 6703 | |
00020c16 | 6704 | bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi` |
0a4b6309 | 6705 | |
00020c16 ILT |
6706 | cat >>confdefs.h <<_ACEOF |
6707 | #define ENABLE_DECIMAL_BID_FORMAT $bid | |
6708 | _ACEOF | |
6709 | ||
6710 | ||
6711 | # Enable C extension for fixed-point arithmetic. | |
5213506e RW |
6712 | # Check whether --enable-fixed-point was given. |
6713 | if test "${enable_fixed_point+set}" = set; then : | |
6714 | enableval=$enable_fixed_point; | |
861bb6c1 | 6715 | |
3a000df0 | 6716 | else |
3a000df0 | 6717 | |
00020c16 ILT |
6718 | case $target in |
6719 | mips*-*-*) | |
6720 | case $host in | |
6721 | mips*-sgi-irix*) | |
5213506e RW |
6722 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported on IRIX" >&5 |
6723 | $as_echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;} | |
00020c16 ILT |
6724 | enable_fixed_point=no |
6725 | ;; | |
6726 | *) | |
6727 | enable_fixed_point=yes | |
6728 | ;; | |
6729 | esac | |
6730 | ;; | |
6731 | *) | |
5213506e RW |
6732 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported for this target" >&5 |
6733 | $as_echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;} | |
00020c16 ILT |
6734 | enable_fixed_point=no |
6735 | ;; | |
6736 | esac | |
3a000df0 | 6737 | |
5213506e RW |
6738 | fi |
6739 | ||
3a000df0 KC |
6740 | |
6741 | ||
00020c16 | 6742 | fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 6743 | |
00020c16 ILT |
6744 | cat >>confdefs.h <<_ACEOF |
6745 | #define ENABLE_FIXED_POINT $fixedpoint | |
6746 | _ACEOF | |
73458fb7 NN |
6747 | |
6748 | ||
00020c16 ILT |
6749 | # Enable threads |
6750 | # Pass with no value to take the default | |
6751 | # Pass with a value to specify a thread package | |
5213506e RW |
6752 | # Check whether --enable-threads was given. |
6753 | if test "${enable_threads+set}" = set; then : | |
6754 | enableval=$enable_threads; | |
73458fb7 | 6755 | else |
00020c16 | 6756 | enable_threads='' |
5213506e | 6757 | fi |
00020c16 | 6758 | |
00020c16 | 6759 | |
5213506e RW |
6760 | # Check whether --enable-tls was given. |
6761 | if test "${enable_tls+set}" = set; then : | |
6762 | enableval=$enable_tls; | |
00020c16 ILT |
6763 | case $enable_tls in |
6764 | yes | no) ;; | |
5213506e RW |
6765 | *) as_fn_error "'$enable_tls' is an invalid value for --enable-tls. |
6766 | Valid choices are 'yes' and 'no'." "$LINENO" 5 ;; | |
00020c16 ILT |
6767 | esac |
6768 | ||
73458fb7 | 6769 | else |
00020c16 | 6770 | enable_tls='' |
5213506e | 6771 | fi |
ba479fd2 | 6772 | |
5213506e RW |
6773 | |
6774 | # Check whether --enable-objc-gc was given. | |
6775 | if test "${enable_objc_gc+set}" = set; then : | |
6776 | enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then | |
00020c16 | 6777 | objc_boehm_gc='' |
73458fb7 | 6778 | else |
00020c16 | 6779 | objc_boehm_gc=1 |
73458fb7 | 6780 | fi |
00020c16 ILT |
6781 | else |
6782 | objc_boehm_gc='' | |
5213506e RW |
6783 | fi |
6784 | ||
73458fb7 | 6785 | |
00020c16 | 6786 | |
5213506e RW |
6787 | # Check whether --with-dwarf2 was given. |
6788 | if test "${with_dwarf2+set}" = set; then : | |
6789 | withval=$with_dwarf2; dwarf2="$with_dwarf2" | |
73458fb7 | 6790 | else |
00020c16 | 6791 | dwarf2=no |
5213506e | 6792 | fi |
3bbd5a19 | 6793 | |
73458fb7 | 6794 | |
5213506e RW |
6795 | # Check whether --enable-shared was given. |
6796 | if test "${enable_shared+set}" = set; then : | |
6797 | enableval=$enable_shared; | |
00020c16 ILT |
6798 | case $enable_shared in |
6799 | yes | no) ;; | |
6800 | *) | |
6801 | enable_shared=no | |
6802 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
6803 | for pkg in $enableval; do | |
6804 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
6805 | enable_shared=yes | |
6806 | fi | |
6807 | done | |
6808 | IFS="$ac_save_ifs" | |
6809 | ;; | |
6810 | esac | |
73458fb7 | 6811 | |
73458fb7 | 6812 | else |
00020c16 | 6813 | enable_shared=yes |
5213506e | 6814 | fi |
73458fb7 | 6815 | |
7c27e184 | 6816 | |
00020c16 | 6817 | |
00020c16 | 6818 | |
5213506e RW |
6819 | # Check whether --with-build-sysroot was given. |
6820 | if test "${with_build_sysroot+set}" = set; then : | |
6821 | withval=$with_build_sysroot; | |
6822 | fi | |
00020c16 ILT |
6823 | |
6824 | ||
00020c16 | 6825 | |
5213506e RW |
6826 | # Check whether --with-sysroot was given. |
6827 | if test "${with_sysroot+set}" = set; then : | |
6828 | withval=$with_sysroot; | |
00020c16 ILT |
6829 | case ${with_sysroot} in |
6830 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; | |
6831 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; | |
6832 | esac | |
6833 | ||
6834 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
6835 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' | |
6836 | ||
6837 | if test "x$prefix" = xNONE; then | |
6838 | test_prefix=/usr/local | |
6839 | else | |
6840 | test_prefix=$prefix | |
6841 | fi | |
6842 | if test "x$exec_prefix" = xNONE; then | |
6843 | test_exec_prefix=$test_prefix | |
6844 | else | |
6845 | test_exec_prefix=$exec_prefix | |
6846 | fi | |
6847 | case ${TARGET_SYSTEM_ROOT} in | |
6848 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6849 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ | |
6850 | '${prefix}'|'${prefix}/'*|\ | |
6851 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6852 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" | |
6853 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
6854 | ;; | |
6855 | esac | |
6856 | ||
6857 | else | |
6858 | ||
6859 | TARGET_SYSTEM_ROOT= | |
6860 | TARGET_SYSTEM_ROOT_DEFINE= | |
6861 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' | |
6862 | ||
5213506e RW |
6863 | fi |
6864 | ||
00020c16 ILT |
6865 | |
6866 | ||
6867 | ||
6868 | ||
e11ddaf5 NS |
6869 | |
6870 | # Check whether --with-specs was given. | |
6871 | if test "${with_specs+set}" = set; then : | |
6872 | withval=$with_specs; CONFIGURE_SPECS=$withval | |
6873 | else | |
6874 | CONFIGURE_SPECS= | |
6875 | ||
6876 | fi | |
6877 | ||
6878 | ||
6879 | ||
00020c16 | 6880 | # Build with intermodule optimisations |
5213506e RW |
6881 | # Check whether --enable-intermodule was given. |
6882 | if test "${enable_intermodule+set}" = set; then : | |
6883 | enableval=$enable_intermodule; case ${enable_intermodule} in | |
00020c16 ILT |
6884 | yes) onestep="-onestep";; |
6885 | *) onestep="";; | |
6886 | esac | |
6887 | else | |
6888 | onestep="" | |
5213506e RW |
6889 | fi |
6890 | ||
00020c16 ILT |
6891 | |
6892 | ||
6893 | ||
6894 | ||
5213506e RW |
6895 | # Check whether --with-pkgversion was given. |
6896 | if test "${with_pkgversion+set}" = set; then : | |
6897 | withval=$with_pkgversion; case "$withval" in | |
6898 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
00020c16 ILT |
6899 | no) PKGVERSION= ;; |
6900 | *) PKGVERSION="($withval) " ;; | |
6901 | esac | |
6902 | else | |
6903 | PKGVERSION="(GCC) " | |
6904 | ||
5213506e | 6905 | fi |
00020c16 ILT |
6906 | |
6907 | ||
6908 | ||
6909 | ||
5213506e RW |
6910 | |
6911 | # Check whether --with-bugurl was given. | |
6912 | if test "${with_bugurl+set}" = set; then : | |
6913 | withval=$with_bugurl; case "$withval" in | |
6914 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
00020c16 ILT |
6915 | no) BUGURL= |
6916 | ;; | |
6917 | *) BUGURL="$withval" | |
6918 | ;; | |
6919 | esac | |
6920 | else | |
6921 | BUGURL="http://gcc.gnu.org/bugs.html" | |
6922 | ||
5213506e RW |
6923 | fi |
6924 | ||
00020c16 ILT |
6925 | case ${BUGURL} in |
6926 | "") | |
6927 | REPORT_BUGS_TO= | |
6928 | REPORT_BUGS_TEXI= | |
6929 | ;; | |
6930 | *) | |
6931 | REPORT_BUGS_TO="<$BUGURL>" | |
6932 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
6933 | ;; | |
6934 | esac; | |
6935 | ||
6936 | ||
6937 | ||
6938 | ||
6939 | # Sanity check enable_languages in case someone does not run the toplevel | |
6940 | # configure # script. | |
5213506e RW |
6941 | # Check whether --enable-languages was given. |
6942 | if test "${enable_languages+set}" = set; then : | |
6943 | enableval=$enable_languages; case ,${enable_languages}, in | |
00020c16 ILT |
6944 | ,,|,yes,) |
6945 | # go safe -- we cannot be much sure without the toplevel | |
6946 | # configure's | |
6947 | # analysis of which target libs are present and usable | |
6948 | enable_languages=c | |
6949 | ;; | |
6950 | *,all,*) | |
5213506e | 6951 | as_fn_error "only the toplevel supports --enable-languages=all" "$LINENO" 5 |
00020c16 ILT |
6952 | ;; |
6953 | *,c,*) | |
6954 | ;; | |
6955 | *) | |
6956 | enable_languages=c,${enable_languages} | |
6957 | ;; | |
6958 | esac | |
6959 | else | |
6960 | enable_languages=c | |
5213506e RW |
6961 | fi |
6962 | ||
00020c16 | 6963 | |
00020c16 | 6964 | |
5213506e RW |
6965 | # Check whether --with-multilib-list was given. |
6966 | if test "${with_multilib_list+set}" = set; then : | |
6967 | withval=$with_multilib_list; : | |
00020c16 ILT |
6968 | else |
6969 | with_multilib_list=default | |
5213506e RW |
6970 | fi |
6971 | ||
00020c16 ILT |
6972 | |
6973 | # ------------------------- | |
6974 | # Checks for other programs | |
6975 | # ------------------------- | |
6976 | ||
5213506e RW |
6977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
6978 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
6979 | set x ${MAKE-make} | |
6980 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
6981 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
6982 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
6983 | else |
6984 | cat >conftest.make <<\_ACEOF | |
5213506e | 6985 | SHELL = /bin/sh |
00020c16 | 6986 | all: |
5213506e | 6987 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
00020c16 ILT |
6988 | _ACEOF |
6989 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
5213506e RW |
6990 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
6991 | *@@@%%%=?*=@@@%%%*) | |
6992 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
6993 | *) | |
6994 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
6995 | esac | |
00020c16 ILT |
6996 | rm -f conftest.make |
6997 | fi | |
5213506e RW |
6998 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
6999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7000 | $as_echo "yes" >&6; } | |
00020c16 | 7001 | SET_MAKE= |
73458fb7 | 7002 | else |
5213506e RW |
7003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7004 | $as_echo "no" >&6; } | |
00020c16 | 7005 | SET_MAKE="MAKE=${MAKE-make}" |
73458fb7 NN |
7006 | fi |
7007 | ||
7c27e184 | 7008 | |
00020c16 ILT |
7009 | # Find some useful tools |
7010 | for ac_prog in gawk mawk nawk awk | |
7c27e184 PB |
7011 | do |
7012 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7013 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
7014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7015 | $as_echo_n "checking for $ac_word... " >&6; } | |
7016 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
7017 | $as_echo_n "(cached) " >&6 | |
73458fb7 | 7018 | else |
00020c16 ILT |
7019 | if test -n "$AWK"; then |
7020 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
73458fb7 | 7021 | else |
ba479fd2 NN |
7022 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7023 | for as_dir in $PATH | |
7024 | do | |
7025 | IFS=$as_save_IFS | |
7026 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7027 | for ac_exec_ext in '' $ac_executable_extensions; do |
7028 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7029 | ac_cv_prog_AWK="$ac_prog" |
5213506e | 7030 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
ba479fd2 NN |
7031 | break 2 |
7032 | fi | |
7033 | done | |
5213506e RW |
7034 | done |
7035 | IFS=$as_save_IFS | |
ba479fd2 | 7036 | |
73458fb7 NN |
7037 | fi |
7038 | fi | |
00020c16 ILT |
7039 | AWK=$ac_cv_prog_AWK |
7040 | if test -n "$AWK"; then | |
5213506e RW |
7041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7042 | $as_echo "$AWK" >&6; } | |
73458fb7 | 7043 | else |
5213506e RW |
7044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7045 | $as_echo "no" >&6; } | |
73458fb7 NN |
7046 | fi |
7047 | ||
5213506e | 7048 | |
00020c16 | 7049 | test -n "$AWK" && break |
7c27e184 | 7050 | done |
7c27e184 | 7051 | |
00020c16 ILT |
7052 | # We need awk to create options.c and options.h. |
7053 | # Bail out if it's missing. | |
7054 | case ${AWK} in | |
5213506e | 7055 | "") as_fn_error "can't build without awk, bailing out" "$LINENO" 5 ;; |
00020c16 | 7056 | esac |
73458fb7 | 7057 | |
5213506e RW |
7058 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7059 | $as_echo_n "checking whether ln -s works... " >&6; } | |
7060 | if test "${gcc_cv_prog_LN_S+set}" = set; then : | |
7061 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7062 | else |
7063 | rm -f conftestdata_t | |
7064 | echo >conftestdata_f | |
7065 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7066 | then | |
7067 | gcc_cv_prog_LN_S="ln -s" | |
7068 | else | |
7069 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7070 | then | |
7071 | gcc_cv_prog_LN_S=ln | |
7072 | else | |
7073 | if cp -p conftestdata_f conftestdata_t 2>/dev/null | |
7074 | then | |
7075 | gcc_cv_prog_LN_S="cp -p" | |
7076 | else | |
7077 | gcc_cv_prog_LN_S=cp | |
7078 | fi | |
7079 | fi | |
7080 | fi | |
7081 | rm -f conftestdata_f conftestdata_t | |
7082 | ||
7083 | fi | |
7084 | LN_S="$gcc_cv_prog_LN_S" | |
7085 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
5213506e RW |
7086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7087 | $as_echo "yes" >&6; } | |
00020c16 ILT |
7088 | else |
7089 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
5213506e RW |
7090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using ln" >&5 |
7091 | $as_echo "no, using ln" >&6; } | |
00020c16 | 7092 | else |
5213506e RW |
7093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7094 | $as_echo "no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; } | |
00020c16 ILT |
7095 | fi |
7096 | fi | |
7097 | ||
5213506e RW |
7098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5 |
7099 | $as_echo_n "checking whether ln works... " >&6; } | |
7100 | if test "${acx_cv_prog_LN+set}" = set; then : | |
7101 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7102 | else |
7103 | rm -f conftestdata_t | |
7104 | echo >conftestdata_f | |
7105 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7106 | then | |
7107 | acx_cv_prog_LN=ln | |
7108 | else | |
7109 | acx_cv_prog_LN=no | |
7110 | fi | |
7111 | rm -f conftestdata_f conftestdata_t | |
7112 | ||
7113 | fi | |
7114 | if test $acx_cv_prog_LN = no; then | |
7115 | LN="$LN_S" | |
5213506e RW |
7116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN" >&5 |
7117 | $as_echo "no, using $LN" >&6; } | |
00020c16 ILT |
7118 | else |
7119 | LN="$acx_cv_prog_LN" | |
5213506e RW |
7120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7121 | $as_echo "yes" >&6; } | |
00020c16 ILT |
7122 | fi |
7123 | ||
7124 | if test -n "$ac_tool_prefix"; then | |
7125 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7126 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5213506e RW |
7127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7128 | $as_echo_n "checking for $ac_word... " >&6; } | |
7129 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
7130 | $as_echo_n "(cached) " >&6 | |
73458fb7 | 7131 | else |
00020c16 ILT |
7132 | if test -n "$RANLIB"; then |
7133 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
73458fb7 | 7134 | else |
ba479fd2 NN |
7135 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7136 | for as_dir in $PATH | |
7137 | do | |
7138 | IFS=$as_save_IFS | |
7139 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7140 | for ac_exec_ext in '' $ac_executable_extensions; do |
7141 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7142 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
5213506e | 7143 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
ba479fd2 NN |
7144 | break 2 |
7145 | fi | |
7146 | done | |
5213506e RW |
7147 | done |
7148 | IFS=$as_save_IFS | |
ba479fd2 | 7149 | |
73458fb7 NN |
7150 | fi |
7151 | fi | |
00020c16 ILT |
7152 | RANLIB=$ac_cv_prog_RANLIB |
7153 | if test -n "$RANLIB"; then | |
5213506e RW |
7154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7155 | $as_echo "$RANLIB" >&6; } | |
73458fb7 | 7156 | else |
5213506e RW |
7157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7158 | $as_echo "no" >&6; } | |
73458fb7 NN |
7159 | fi |
7160 | ||
5213506e | 7161 | |
00020c16 ILT |
7162 | fi |
7163 | if test -z "$ac_cv_prog_RANLIB"; then | |
7164 | ac_ct_RANLIB=$RANLIB | |
7165 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7166 | set dummy ranlib; ac_word=$2 | |
5213506e RW |
7167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7168 | $as_echo_n "checking for $ac_word... " >&6; } | |
7169 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
7170 | $as_echo_n "(cached) " >&6 | |
f6a874ac | 7171 | else |
00020c16 ILT |
7172 | if test -n "$ac_ct_RANLIB"; then |
7173 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
f6a874ac JW |
7174 | else |
7175 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7176 | for as_dir in $PATH | |
7177 | do | |
7178 | IFS=$as_save_IFS | |
7179 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7180 | for ac_exec_ext in '' $ac_executable_extensions; do |
7181 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7182 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
5213506e | 7183 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
f6a874ac JW |
7184 | break 2 |
7185 | fi | |
7186 | done | |
5213506e RW |
7187 | done |
7188 | IFS=$as_save_IFS | |
f6a874ac | 7189 | |
f6a874ac JW |
7190 | fi |
7191 | fi | |
00020c16 ILT |
7192 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
7193 | if test -n "$ac_ct_RANLIB"; then | |
5213506e RW |
7194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7195 | $as_echo "$ac_ct_RANLIB" >&6; } | |
f6a874ac | 7196 | else |
5213506e RW |
7197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7198 | $as_echo "no" >&6; } | |
f6a874ac JW |
7199 | fi |
7200 | ||
5213506e RW |
7201 | if test "x$ac_ct_RANLIB" = x; then |
7202 | RANLIB=":" | |
7203 | else | |
7204 | case $cross_compiling:$ac_tool_warned in | |
7205 | yes:) | |
7206 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7207 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7208 | ac_tool_warned=yes ;; | |
7209 | esac | |
7210 | RANLIB=$ac_ct_RANLIB | |
7211 | fi | |
00020c16 ILT |
7212 | else |
7213 | RANLIB="$ac_cv_prog_RANLIB" | |
f6a874ac JW |
7214 | fi |
7215 | ||
00020c16 ILT |
7216 | case "${host}" in |
7217 | *-*-darwin*) | |
7218 | # By default, the Darwin ranlib will not treat common symbols as | |
7219 | # definitions when building the archive table of contents. Other | |
7220 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7221 | # it behave similarly. | |
7222 | ranlib_flags="-c" | |
7223 | ;; | |
7224 | *) | |
7225 | ranlib_flags="" | |
7226 | esac | |
7227 | ||
7228 | ||
7229 | # Find a good install program. We prefer a C program (faster), | |
7230 | # so one script is as good as another. But avoid the broken or | |
7231 | # incompatible versions: | |
7232 | # SysV /etc/install, /usr/sbin/install | |
7233 | # SunOS /usr/etc/install | |
7234 | # IRIX /sbin/install | |
7235 | # AIX /bin/install | |
7236 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7237 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7238 | # ./install, which can be erroneously created by make from ./install.sh. | |
5213506e RW |
7239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD compatible install" >&5 |
7240 | $as_echo_n "checking for a BSD compatible install... " >&6; } | |
00020c16 | 7241 | if test -z "$INSTALL"; then |
5213506e RW |
7242 | if test "${ac_cv_path_install+set}" = set; then : |
7243 | $as_echo_n "(cached) " >&6 | |
f6a874ac | 7244 | else |
00020c16 ILT |
7245 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
7246 | for ac_dir in $PATH; do | |
7247 | # Account for people who put trailing slashes in PATH elements. | |
7248 | case "$ac_dir/" in | |
7249 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7250 | *) | |
7251 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7252 | for ac_prog in ginstall scoinst install; do | |
7253 | if test -f $ac_dir/$ac_prog; then | |
7254 | if test $ac_prog = install && | |
7255 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7256 | # AIX install. It has an incompatible calling convention. | |
7257 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7258 | : | |
7259 | else | |
7260 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7261 | break 2 | |
7262 | fi | |
7263 | fi | |
7264 | done | |
7265 | ;; | |
7266 | esac | |
7267 | done | |
7268 | IFS="$ac_save_IFS" | |
7269 | ||
7270 | fi | |
7271 | if test "${ac_cv_path_install+set}" = set; then | |
7272 | INSTALL="$ac_cv_path_install" | |
7273 | else | |
7274 | # As a last resort, use the slow shell script. We don't cache a | |
7275 | # path for INSTALL within a source directory, because that will | |
7276 | # break other packages using the cache if that directory is | |
7277 | # removed, or if the path is relative. | |
7278 | INSTALL="$ac_install_sh" | |
7279 | fi | |
7280 | fi | |
5213506e RW |
7281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
7282 | $as_echo "$INSTALL" >&6; } | |
00020c16 ILT |
7283 | |
7284 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7285 | # It thinks the first close brace ends the variable substitution. | |
7286 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7287 | ||
7288 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7289 | ||
7290 | ||
7291 | # See if cmp has --ignore-initial. | |
5213506e RW |
7292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmp's capabilities" >&5 |
7293 | $as_echo_n "checking for cmp's capabilities... " >&6; } | |
7294 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then : | |
7295 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7296 | else |
7297 | echo abfoo >t1 | |
7298 | echo cdfoo >t2 | |
7299 | gcc_cv_prog_cmp_skip=slowcompare | |
7300 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then | |
7301 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
7302 | : | |
7303 | else | |
7304 | gcc_cv_prog_cmp_skip=gnucompare | |
7305 | fi | |
7306 | fi | |
7307 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7308 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7309 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7310 | : | |
7311 | else | |
7312 | gcc_cv_prog_cmp_skip=fastcompare | |
7313 | fi | |
7314 | fi | |
7315 | fi | |
7316 | rm t1 t2 | |
7317 | ||
7318 | fi | |
5213506e RW |
7319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5 |
7320 | $as_echo "$gcc_cv_prog_cmp_skip" >&6; } | |
00020c16 ILT |
7321 | make_compare_target=$gcc_cv_prog_cmp_skip |
7322 | ||
7323 | ||
7324 | ||
7325 | # See if we have the mktemp command. | |
7326 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7327 | set dummy mktemp; ac_word=$2 | |
5213506e RW |
7328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7329 | $as_echo_n "checking for $ac_word... " >&6; } | |
7330 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then : | |
7331 | $as_echo_n "(cached) " >&6 | |
f6a874ac | 7332 | else |
00020c16 ILT |
7333 | if test -n "$have_mktemp_command"; then |
7334 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
f6a874ac JW |
7335 | else |
7336 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7337 | for as_dir in $PATH | |
7338 | do | |
7339 | IFS=$as_save_IFS | |
7340 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7341 | for ac_exec_ext in '' $ac_executable_extensions; do |
7342 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7343 | ac_cv_prog_have_mktemp_command="yes" |
5213506e | 7344 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
f6a874ac JW |
7345 | break 2 |
7346 | fi | |
7347 | done | |
5213506e RW |
7348 | done |
7349 | IFS=$as_save_IFS | |
f6a874ac | 7350 | |
00020c16 | 7351 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
f6a874ac JW |
7352 | fi |
7353 | fi | |
00020c16 ILT |
7354 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
7355 | if test -n "$have_mktemp_command"; then | |
5213506e RW |
7356 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mktemp_command" >&5 |
7357 | $as_echo "$have_mktemp_command" >&6; } | |
f6a874ac | 7358 | else |
5213506e RW |
7359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7360 | $as_echo "no" >&6; } | |
f6a874ac JW |
7361 | fi |
7362 | ||
f6a874ac | 7363 | |
5213506e | 7364 | |
00020c16 ILT |
7365 | # See if makeinfo has been installed and is modern enough |
7366 | # that we can use it. | |
ca9bc441 | 7367 | |
00020c16 ILT |
7368 | # Extract the first word of "makeinfo", so it can be a program name with args. |
7369 | set dummy makeinfo; ac_word=$2 | |
5213506e RW |
7370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7371 | $as_echo_n "checking for $ac_word... " >&6; } | |
7372 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then : | |
7373 | $as_echo_n "(cached) " >&6 | |
956d6950 | 7374 | else |
00020c16 ILT |
7375 | if test -n "$MAKEINFO"; then |
7376 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
956d6950 | 7377 | else |
00020c16 ILT |
7378 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7379 | for as_dir in $PATH | |
7380 | do | |
7381 | IFS=$as_save_IFS | |
7382 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7383 | for ac_exec_ext in '' $ac_executable_extensions; do |
7384 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7385 | ac_cv_prog_MAKEINFO="makeinfo" |
5213506e | 7386 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7387 | break 2 |
7388 | fi | |
7389 | done | |
5213506e RW |
7390 | done |
7391 | IFS=$as_save_IFS | |
ba479fd2 | 7392 | |
956d6950 | 7393 | fi |
00020c16 ILT |
7394 | fi |
7395 | MAKEINFO=$ac_cv_prog_MAKEINFO | |
7396 | if test -n "$MAKEINFO"; then | |
5213506e RW |
7397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 |
7398 | $as_echo "$MAKEINFO" >&6; } | |
956d6950 | 7399 | else |
5213506e RW |
7400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7401 | $as_echo "no" >&6; } | |
956d6950 | 7402 | fi |
956d6950 | 7403 | |
5213506e | 7404 | |
00020c16 ILT |
7405 | if test -n "$MAKEINFO"; then |
7406 | # Found it, now check the version. | |
5213506e RW |
7407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern makeinfo" >&5 |
7408 | $as_echo_n "checking for modern makeinfo... " >&6; } | |
7409 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then : | |
7410 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7411 | else |
7412 | ac_prog_version=`eval $MAKEINFO --version 2>&1 | | |
7413 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
956d6950 | 7414 | |
00020c16 ILT |
7415 | case $ac_prog_version in |
7416 | '') gcc_cv_prog_makeinfo_modern=no;; | |
7417 | 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;; | |
7418 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7419 | esac | |
ba479fd2 | 7420 | |
956d6950 | 7421 | fi |
5213506e RW |
7422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7423 | $as_echo "$gcc_cv_prog_makeinfo_modern" >&6; } | |
00020c16 ILT |
7424 | else |
7425 | gcc_cv_prog_makeinfo_modern=no | |
7426 | fi | |
7427 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
7428 | MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo" | |
7429 | fi | |
956d6950 | 7430 | |
00020c16 | 7431 | if test $gcc_cv_prog_makeinfo_modern = no; then |
5213506e | 7432 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: |
00020c16 ILT |
7433 | *** Makeinfo is missing or too old. |
7434 | *** Info documentation will not be built." >&5 | |
5213506e | 7435 | $as_echo "$as_me: WARNING: |
00020c16 ILT |
7436 | *** Makeinfo is missing or too old. |
7437 | *** Info documentation will not be built." >&2;} | |
7438 | BUILD_INFO= | |
7439 | else | |
7440 | BUILD_INFO=info | |
956d6950 JL |
7441 | fi |
7442 | ||
63cf211a | 7443 | |
00020c16 | 7444 | # Is pod2man recent enough to regenerate manpages? |
5213506e RW |
7445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent Pod::Man" >&5 |
7446 | $as_echo_n "checking for recent Pod::Man... " >&6; } | |
00020c16 | 7447 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
5213506e RW |
7448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7449 | $as_echo "yes" >&6; } | |
00020c16 | 7450 | GENERATED_MANPAGES=generated-manpages |
956d6950 | 7451 | else |
5213506e RW |
7452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7453 | $as_echo "no" >&6; } | |
00020c16 | 7454 | GENERATED_MANPAGES= |
956d6950 | 7455 | fi |
ba479fd2 | 7456 | |
956d6950 | 7457 | |
00020c16 | 7458 | MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing" |
956d6950 | 7459 | |
00020c16 ILT |
7460 | # How about lex? |
7461 | for ac_prog in flex | |
7462 | do | |
7463 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7464 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
7465 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7466 | $as_echo_n "checking for $ac_word... " >&6; } | |
7467 | if test "${ac_cv_prog_FLEX+set}" = set; then : | |
7468 | $as_echo_n "(cached) " >&6 | |
956d6950 | 7469 | else |
00020c16 ILT |
7470 | if test -n "$FLEX"; then |
7471 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
956d6950 | 7472 | else |
00020c16 ILT |
7473 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7474 | for as_dir in $PATH | |
7475 | do | |
7476 | IFS=$as_save_IFS | |
7477 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7478 | for ac_exec_ext in '' $ac_executable_extensions; do |
7479 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7480 | ac_cv_prog_FLEX="$ac_prog" |
5213506e | 7481 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7482 | break 2 |
7483 | fi | |
7484 | done | |
5213506e RW |
7485 | done |
7486 | IFS=$as_save_IFS | |
ba479fd2 | 7487 | |
956d6950 | 7488 | fi |
956d6950 | 7489 | fi |
00020c16 ILT |
7490 | FLEX=$ac_cv_prog_FLEX |
7491 | if test -n "$FLEX"; then | |
5213506e RW |
7492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 |
7493 | $as_echo "$FLEX" >&6; } | |
00020c16 | 7494 | else |
5213506e RW |
7495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7496 | $as_echo "no" >&6; } | |
00020c16 | 7497 | fi |
ba479fd2 | 7498 | |
5213506e | 7499 | |
00020c16 ILT |
7500 | test -n "$FLEX" && break |
7501 | done | |
7502 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7503 | ||
7504 | ||
7505 | # Bison? | |
7506 | for ac_prog in bison | |
7507 | do | |
7508 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7509 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
7510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7511 | $as_echo_n "checking for $ac_word... " >&6; } | |
7512 | if test "${ac_cv_prog_BISON+set}" = set; then : | |
7513 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7514 | else |
7515 | if test -n "$BISON"; then | |
7516 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7517 | else | |
7518 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7519 | for as_dir in $PATH | |
7520 | do | |
7521 | IFS=$as_save_IFS | |
7522 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7523 | for ac_exec_ext in '' $ac_executable_extensions; do |
7524 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7525 | ac_cv_prog_BISON="$ac_prog" |
5213506e | 7526 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7527 | break 2 |
7528 | fi | |
7529 | done | |
5213506e RW |
7530 | done |
7531 | IFS=$as_save_IFS | |
956d6950 | 7532 | |
00020c16 ILT |
7533 | fi |
7534 | fi | |
7535 | BISON=$ac_cv_prog_BISON | |
7536 | if test -n "$BISON"; then | |
5213506e RW |
7537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 |
7538 | $as_echo "$BISON" >&6; } | |
00020c16 | 7539 | else |
5213506e RW |
7540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7541 | $as_echo "no" >&6; } | |
956d6950 JL |
7542 | fi |
7543 | ||
5213506e | 7544 | |
00020c16 ILT |
7545 | test -n "$BISON" && break |
7546 | done | |
7547 | test -n "$BISON" || BISON="$MISSING bison" | |
7548 | ||
7549 | ||
7550 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7551 | # check for build == host before using them. | |
7552 | ||
7553 | # NM | |
7554 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ | |
7555 | && test -d ../binutils ; then | |
bfa912a8 | 7556 | NM='${objdir}/../binutils/nm-new' |
00020c16 ILT |
7557 | else |
7558 | # Extract the first word of "nm", so it can be a program name with args. | |
7559 | set dummy nm; ac_word=$2 | |
5213506e RW |
7560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7561 | $as_echo_n "checking for $ac_word... " >&6; } | |
7562 | if test "${ac_cv_prog_NM+set}" = set; then : | |
7563 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7564 | else |
7565 | if test -n "$NM"; then | |
7566 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7567 | else | |
7568 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7569 | for as_dir in $PATH | |
7570 | do | |
7571 | IFS=$as_save_IFS | |
7572 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7573 | for ac_exec_ext in '' $ac_executable_extensions; do |
7574 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7575 | ac_cv_prog_NM="nm" |
5213506e | 7576 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7577 | break 2 |
7578 | fi | |
7579 | done | |
5213506e RW |
7580 | done |
7581 | IFS=$as_save_IFS | |
00020c16 ILT |
7582 | |
7583 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7584 | fi | |
7585 | fi | |
7586 | NM=$ac_cv_prog_NM | |
7587 | if test -n "$NM"; then | |
5213506e RW |
7588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 |
7589 | $as_echo "$NM" >&6; } | |
00020c16 | 7590 | else |
5213506e RW |
7591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7592 | $as_echo "no" >&6; } | |
00020c16 ILT |
7593 | fi |
7594 | ||
5213506e | 7595 | |
00020c16 ILT |
7596 | fi |
7597 | ||
7598 | # AR | |
7599 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ | |
7600 | && test -d ../binutils ; then | |
bfa912a8 | 7601 | AR='${objdir}/../binutils/ar' |
00020c16 ILT |
7602 | else |
7603 | # Extract the first word of "ar", so it can be a program name with args. | |
7604 | set dummy ar; ac_word=$2 | |
5213506e RW |
7605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7606 | $as_echo_n "checking for $ac_word... " >&6; } | |
7607 | if test "${ac_cv_prog_AR+set}" = set; then : | |
7608 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
7609 | else |
7610 | if test -n "$AR"; then | |
7611 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7612 | else | |
7613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7614 | for as_dir in $PATH | |
7615 | do | |
7616 | IFS=$as_save_IFS | |
7617 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
7618 | for ac_exec_ext in '' $ac_executable_extensions; do |
7619 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
00020c16 | 7620 | ac_cv_prog_AR="ar" |
5213506e | 7621 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
00020c16 ILT |
7622 | break 2 |
7623 | fi | |
7624 | done | |
5213506e RW |
7625 | done |
7626 | IFS=$as_save_IFS | |
00020c16 ILT |
7627 | |
7628 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7629 | fi | |
7630 | fi | |
7631 | AR=$ac_cv_prog_AR | |
7632 | if test -n "$AR"; then | |
5213506e RW |
7633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7634 | $as_echo "$AR" >&6; } | |
00020c16 | 7635 | else |
5213506e RW |
7636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7637 | $as_echo "no" >&6; } | |
00020c16 ILT |
7638 | fi |
7639 | ||
5213506e | 7640 | |
00020c16 ILT |
7641 | fi |
7642 | ||
7643 | ||
7644 | # -------------------- | |
7645 | # Checks for C headers | |
7646 | # -------------------- | |
7647 | ||
7648 | # Need to reject headers which give warnings, so that the -Werror bootstrap | |
7649 | # works later. *sigh* This needs to come before all header checks. | |
7650 | ||
7651 | ac_c_preproc_warn_flag=yes | |
7652 | ||
5213506e RW |
7653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
7654 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
7655 | if test "${ac_cv_header_stdc+set}" = set; then : | |
7656 | $as_echo_n "(cached) " >&6 | |
18fc9bd4 | 7657 | else |
5213506e | 7658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18fc9bd4 | 7659 | /* end confdefs.h. */ |
00020c16 ILT |
7660 | #include <stdlib.h> |
7661 | #include <stdarg.h> | |
18fc9bd4 | 7662 | #include <string.h> |
00020c16 ILT |
7663 | #include <float.h> |
7664 | ||
18fc9bd4 RG |
7665 | int |
7666 | main () | |
7667 | { | |
7668 | ||
7669 | ; | |
7670 | return 0; | |
7671 | } | |
7672 | _ACEOF | |
5213506e | 7673 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 | 7674 | ac_cv_header_stdc=yes |
18fc9bd4 | 7675 | else |
5213506e | 7676 | ac_cv_header_stdc=no |
18fc9bd4 | 7677 | fi |
5213506e | 7678 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18fc9bd4 | 7679 | |
00020c16 ILT |
7680 | if test $ac_cv_header_stdc = yes; then |
7681 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5213506e | 7682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7683 | /* end confdefs.h. */ |
7684 | #include <string.h> | |
7685 | ||
18fc9bd4 | 7686 | _ACEOF |
00020c16 | 7687 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5213506e RW |
7688 | $EGREP "memchr" >/dev/null 2>&1; then : |
7689 | ||
00020c16 ILT |
7690 | else |
7691 | ac_cv_header_stdc=no | |
7692 | fi | |
7693 | rm -f conftest* | |
18fc9bd4 RG |
7694 | |
7695 | fi | |
7696 | ||
00020c16 ILT |
7697 | if test $ac_cv_header_stdc = yes; then |
7698 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5213506e | 7699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 7700 | /* end confdefs.h. */ |
00020c16 ILT |
7701 | #include <stdlib.h> |
7702 | ||
7703 | _ACEOF | |
7704 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5213506e RW |
7705 | $EGREP "free" >/dev/null 2>&1; then : |
7706 | ||
00020c16 ILT |
7707 | else |
7708 | ac_cv_header_stdc=no | |
7709 | fi | |
7710 | rm -f conftest* | |
7711 | ||
7712 | fi | |
7713 | ||
7714 | if test $ac_cv_header_stdc = yes; then | |
7715 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5213506e | 7716 | if test "$cross_compiling" = yes; then : |
00020c16 ILT |
7717 | : |
7718 | else | |
5213506e | 7719 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7720 | /* end confdefs.h. */ |
7721 | #include <ctype.h> | |
5213506e | 7722 | #include <stdlib.h> |
00020c16 ILT |
7723 | #if ((' ' & 0x0FF) == 0x020) |
7724 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7725 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7726 | #else | |
7727 | # define ISLOWER(c) \ | |
7728 | (('a' <= (c) && (c) <= 'i') \ | |
7729 | || ('j' <= (c) && (c) <= 'r') \ | |
7730 | || ('s' <= (c) && (c) <= 'z')) | |
7731 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
7732 | #endif | |
7733 | ||
7734 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
7735 | int | |
7736 | main () | |
7737 | { | |
7738 | int i; | |
7739 | for (i = 0; i < 256; i++) | |
7740 | if (XOR (islower (i), ISLOWER (i)) | |
7741 | || toupper (i) != TOUPPER (i)) | |
5213506e RW |
7742 | return 2; |
7743 | return 0; | |
00020c16 ILT |
7744 | } |
7745 | _ACEOF | |
5213506e | 7746 | if ac_fn_c_try_run "$LINENO"; then : |
00020c16 | 7747 | |
5213506e RW |
7748 | else |
7749 | ac_cv_header_stdc=no | |
00020c16 | 7750 | fi |
5213506e RW |
7751 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
7752 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
00020c16 | 7753 | fi |
5213506e | 7754 | |
00020c16 ILT |
7755 | fi |
7756 | fi | |
5213506e RW |
7757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
7758 | $as_echo "$ac_cv_header_stdc" >&6; } | |
00020c16 ILT |
7759 | if test $ac_cv_header_stdc = yes; then |
7760 | ||
5213506e | 7761 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
00020c16 ILT |
7762 | |
7763 | fi | |
7764 | ||
5213506e RW |
7765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 |
7766 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
7767 | if test "${ac_cv_header_time+set}" = set; then : | |
7768 | $as_echo_n "(cached) " >&6 | |
00020c16 | 7769 | else |
5213506e | 7770 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7771 | /* end confdefs.h. */ |
7772 | #include <sys/types.h> | |
7773 | #include <sys/time.h> | |
7774 | #include <time.h> | |
7775 | ||
7776 | int | |
7777 | main () | |
7778 | { | |
7779 | if ((struct tm *) 0) | |
7780 | return 0; | |
7781 | ; | |
7782 | return 0; | |
7783 | } | |
7784 | _ACEOF | |
5213506e | 7785 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 ILT |
7786 | ac_cv_header_time=yes |
7787 | else | |
5213506e | 7788 | ac_cv_header_time=no |
00020c16 | 7789 | fi |
5213506e | 7790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 | 7791 | fi |
5213506e RW |
7792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
7793 | $as_echo "$ac_cv_header_time" >&6; } | |
00020c16 ILT |
7794 | if test $ac_cv_header_time = yes; then |
7795 | ||
5213506e | 7796 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
00020c16 ILT |
7797 | |
7798 | fi | |
7799 | ||
5213506e RW |
7800 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5 |
7801 | $as_echo_n "checking whether string.h and strings.h may both be included... " >&6; } | |
7802 | if test "${gcc_cv_header_string+set}" = set; then : | |
7803 | $as_echo_n "(cached) " >&6 | |
00020c16 | 7804 | else |
5213506e | 7805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7806 | /* end confdefs.h. */ |
7807 | #include <string.h> | |
7808 | #include <strings.h> | |
7809 | int | |
7810 | main () | |
7811 | { | |
7812 | ||
7813 | ; | |
7814 | return 0; | |
7815 | } | |
7816 | _ACEOF | |
5213506e | 7817 | if ac_fn_c_try_compile "$LINENO"; then : |
00020c16 ILT |
7818 | gcc_cv_header_string=yes |
7819 | else | |
5213506e | 7820 | gcc_cv_header_string=no |
00020c16 | 7821 | fi |
5213506e | 7822 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
00020c16 | 7823 | fi |
5213506e RW |
7824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5 |
7825 | $as_echo "$gcc_cv_header_string" >&6; } | |
00020c16 ILT |
7826 | if test $gcc_cv_header_string = yes; then |
7827 | ||
5213506e | 7828 | $as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h |
00020c16 ILT |
7829 | |
7830 | fi | |
7831 | ||
5213506e RW |
7832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
7833 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
7834 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : | |
7835 | $as_echo_n "(cached) " >&6 | |
00020c16 | 7836 | else |
5213506e | 7837 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
7838 | /* end confdefs.h. */ |
7839 | #include <sys/types.h> | |
7840 | #include <sys/wait.h> | |
7841 | #ifndef WEXITSTATUS | |
5213506e | 7842 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) |
e9831ca0 KG |
7843 | #endif |
7844 | #ifndef WIFEXITED | |
ba479fd2 | 7845 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 7846 | #endif |
ba479fd2 NN |
7847 | |
7848 | int | |
7849 | main () | |
7850 | { | |
7851 | int s; | |
7852 | wait (&s); | |
5213506e RW |
7853 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; |
7854 | ; | |
7855 | return 0; | |
7856 | } | |
7857 | _ACEOF | |
7858 | if ac_fn_c_try_compile "$LINENO"; then : | |
7859 | ac_cv_header_sys_wait_h=yes | |
7860 | else | |
7861 | ac_cv_header_sys_wait_h=no | |
7862 | fi | |
7863 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7864 | fi | |
7865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
7866 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
7867 | if test $ac_cv_header_sys_wait_h = yes; then | |
ba479fd2 | 7868 | |
5213506e | 7869 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h |
ba479fd2 | 7870 | |
5213506e | 7871 | fi |
dfb77e37 KC |
7872 | |
7873 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 7874 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 7875 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 7876 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
5213506e RW |
7877 | do : |
7878 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7879 | ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" | |
7880 | eval as_val=\$$as_ac_Header | |
7881 | if test "x$as_val" = x""yes; then : | |
ba479fd2 | 7882 | cat >>confdefs.h <<_ACEOF |
5213506e | 7883 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
ba479fd2 NN |
7884 | _ACEOF |
7885 | ||
956d6950 JL |
7886 | fi |
7887 | done | |
7888 | ||
7889 | ||
f24af81b | 7890 | # Check for thread headers. |
5213506e RW |
7891 | ac_fn_c_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h" |
7892 | if test "x$ac_cv_header_thread_h" = x""yes; then : | |
f24af81b TT |
7893 | have_thread_h=yes |
7894 | else | |
ba479fd2 | 7895 | have_thread_h= |
f24af81b TT |
7896 | fi |
7897 | ||
5213506e RW |
7898 | ac_fn_c_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h" |
7899 | if test "x$ac_cv_header_pthread_h" = x""yes; then : | |
f24af81b TT |
7900 | have_pthread_h=yes |
7901 | else | |
ba479fd2 | 7902 | have_pthread_h= |
f24af81b TT |
7903 | fi |
7904 | ||
7905 | ||
84c041a1 | 7906 | # These tests can't be done till we know if we have limits.h. |
5213506e RW |
7907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHAR_BIT" >&5 |
7908 | $as_echo_n "checking for CHAR_BIT... " >&6; } | |
7909 | if test "${gcc_cv_decl_char_bit+set}" = set; then : | |
7910 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 7911 | else |
5213506e | 7912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 7913 | /* end confdefs.h. */ |
75e93faa ZW |
7914 | #ifdef HAVE_LIMITS_H |
7915 | #include <limits.h> | |
7916 | #endif | |
7917 | #ifdef CHAR_BIT | |
7918 | found | |
7919 | #endif | |
ba479fd2 | 7920 | _ACEOF |
75e93faa | 7921 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5213506e | 7922 | $EGREP "found" >/dev/null 2>&1; then : |
75e93faa ZW |
7923 | gcc_cv_decl_char_bit=yes |
7924 | else | |
75e93faa ZW |
7925 | gcc_cv_decl_char_bit=no |
7926 | fi | |
7927 | rm -f conftest* | |
7928 | ||
7929 | ||
7930 | fi | |
5213506e RW |
7931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_char_bit" >&5 |
7932 | $as_echo "$gcc_cv_decl_char_bit" >&6; } | |
75e93faa | 7933 | if test $gcc_cv_decl_char_bit = no; then |
5213506e RW |
7934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of bits in a byte" >&5 |
7935 | $as_echo_n "checking number of bits in a byte... " >&6; } | |
7936 | if test "${gcc_cv_c_nbby+set}" = set; then : | |
7937 | $as_echo_n "(cached) " >&6 | |
75e93faa ZW |
7938 | else |
7939 | i=8 | |
7940 | gcc_cv_c_nbby= | |
7941 | while test $i -lt 65; do | |
5213506e | 7942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 NN |
7943 | /* end confdefs.h. */ |
7944 | ||
7945 | int | |
7946 | main () | |
7947 | { | |
4e70264f ZW |
7948 | switch(0) { |
7949 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
7950 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
7951 | ; } | |
ba479fd2 NN |
7952 | ; |
7953 | return 0; | |
7954 | } | |
7955 | _ACEOF | |
5213506e | 7956 | if ac_fn_c_try_compile "$LINENO"; then : |
4e70264f | 7957 | gcc_cv_c_nbby=$i; break |
75e93faa | 7958 | fi |
5213506e | 7959 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
7960 | i=`expr $i + 1` |
7961 | done | |
7962 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
7963 | ||
7964 | fi | |
5213506e RW |
7965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_nbby" >&5 |
7966 | $as_echo "$gcc_cv_c_nbby" >&6; } | |
75e93faa | 7967 | if test $gcc_cv_c_nbby = failed; then |
5213506e | 7968 | as_fn_error "cannot determine number of bits in a byte" "$LINENO" 5 |
75e93faa | 7969 | else |
ba479fd2 NN |
7970 | |
7971 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 7972 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 7973 | _ACEOF |
75e93faa ZW |
7974 | |
7975 | fi | |
7976 | fi | |
5213506e RW |
7977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
7978 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
7979 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
7980 | $as_echo_n "(cached) " >&6 | |
84c041a1 | 7981 | else |
5213506e RW |
7982 | ac_cv_c_bigendian=unknown |
7983 | # See if we're dealing with a universal compiler. | |
7984 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7985 | /* end confdefs.h. */ | |
7986 | #ifndef __APPLE_CC__ | |
7987 | not a universal capable compiler | |
7988 | #endif | |
7989 | typedef int dummy; | |
7990 | ||
7991 | _ACEOF | |
7992 | if ac_fn_c_try_compile "$LINENO"; then : | |
7993 | ||
7994 | # Check for potential -arch flags. It is not universal unless | |
7995 | # there are at least two -arch flags with different values. | |
7996 | ac_arch= | |
7997 | ac_prev= | |
7998 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
7999 | if test -n "$ac_prev"; then | |
8000 | case $ac_word in | |
8001 | i?86 | x86_64 | ppc | ppc64) | |
8002 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
8003 | ac_arch=$ac_word | |
8004 | else | |
8005 | ac_cv_c_bigendian=universal | |
8006 | break | |
8007 | fi | |
8008 | ;; | |
8009 | esac | |
8010 | ac_prev= | |
8011 | elif test "x$ac_word" = "x-arch"; then | |
8012 | ac_prev=arch | |
8013 | fi | |
8014 | done | |
8015 | fi | |
8016 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8017 | if test $ac_cv_c_bigendian = unknown; then | |
8018 | # See if sys/param.h defines the BYTE_ORDER macro. | |
8019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 8020 | /* end confdefs.h. */ |
4977bab6 | 8021 | #include <sys/types.h> |
5213506e | 8022 | #include <sys/param.h> |
9791c75c | 8023 | |
ba479fd2 NN |
8024 | int |
8025 | main () | |
8026 | { | |
5213506e RW |
8027 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
8028 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
8029 | && LITTLE_ENDIAN) | |
8030 | bogus endian macros | |
8031 | #endif | |
9791c75c | 8032 | |
ba479fd2 NN |
8033 | ; |
8034 | return 0; | |
8035 | } | |
8036 | _ACEOF | |
5213506e | 8037 | if ac_fn_c_try_compile "$LINENO"; then : |
2f41c1d6 | 8038 | # It does; now see whether it defined to BIG_ENDIAN or not. |
5213506e | 8039 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8040 | /* end confdefs.h. */ |
4977bab6 | 8041 | #include <sys/types.h> |
5213506e | 8042 | #include <sys/param.h> |
9791c75c | 8043 | |
ba479fd2 NN |
8044 | int |
8045 | main () | |
8046 | { | |
4977bab6 | 8047 | #if BYTE_ORDER != BIG_ENDIAN |
5213506e RW |
8048 | not big endian |
8049 | #endif | |
9791c75c | 8050 | |
ba479fd2 NN |
8051 | ; |
8052 | return 0; | |
8053 | } | |
8054 | _ACEOF | |
5213506e | 8055 | if ac_fn_c_try_compile "$LINENO"; then : |
b61ff9c8 BS |
8056 | ac_cv_c_bigendian=yes |
8057 | else | |
5213506e | 8058 | ac_cv_c_bigendian=no |
4977bab6 | 8059 | fi |
5213506e RW |
8060 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8061 | fi | |
8062 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8063 | fi | |
8064 | if test $ac_cv_c_bigendian = unknown; then | |
8065 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
8066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8067 | /* end confdefs.h. */ | |
8068 | #include <limits.h> | |
ba479fd2 | 8069 | |
5213506e RW |
8070 | int |
8071 | main () | |
8072 | { | |
8073 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
8074 | bogus endian macros | |
8075 | #endif | |
8076 | ||
8077 | ; | |
8078 | return 0; | |
8079 | } | |
9791c75c | 8080 | _ACEOF |
5213506e RW |
8081 | if ac_fn_c_try_compile "$LINENO"; then : |
8082 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
8083 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9791c75c | 8084 | /* end confdefs.h. */ |
5213506e RW |
8085 | #include <limits.h> |
8086 | ||
9791c75c KC |
8087 | int |
8088 | main () | |
8089 | { | |
5213506e RW |
8090 | #ifndef _BIG_ENDIAN |
8091 | not big endian | |
8092 | #endif | |
8093 | ||
9791c75c KC |
8094 | ; |
8095 | return 0; | |
8096 | } | |
8097 | _ACEOF | |
5213506e | 8098 | if ac_fn_c_try_compile "$LINENO"; then : |
8b1f719a | 8099 | ac_cv_c_bigendian=yes |
5213506e RW |
8100 | else |
8101 | ac_cv_c_bigendian=no | |
8b1f719a | 8102 | fi |
5213506e | 8103 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9791c75c | 8104 | fi |
5213506e RW |
8105 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8106 | fi | |
8107 | if test $ac_cv_c_bigendian = unknown; then | |
8108 | # Compile a test program. | |
8109 | if test "$cross_compiling" = yes; then : | |
8110 | # Try to guess by grepping values from an object file. | |
8111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8112 | /* end confdefs.h. */ | |
8113 | short int ascii_mm[] = | |
8114 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8115 | short int ascii_ii[] = | |
8116 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8117 | int use_ascii (int i) { | |
8118 | return ascii_mm[i] + ascii_ii[i]; | |
8119 | } | |
8120 | short int ebcdic_ii[] = | |
8121 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8122 | short int ebcdic_mm[] = | |
8123 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8124 | int use_ebcdic (int i) { | |
8125 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
8126 | } | |
8127 | extern int foo; | |
9791c75c | 8128 | |
5213506e RW |
8129 | int |
8130 | main () | |
8131 | { | |
8132 | return use_ascii (foo) == use_ebcdic (foo); | |
8133 | ; | |
8134 | return 0; | |
8135 | } | |
8136 | _ACEOF | |
8137 | if ac_fn_c_try_compile "$LINENO"; then : | |
8138 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
8139 | ac_cv_c_bigendian=yes | |
8140 | fi | |
8141 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8142 | if test "$ac_cv_c_bigendian" = unknown; then | |
8143 | ac_cv_c_bigendian=no | |
8144 | else | |
8145 | # finding both strings is unlikely to happen, but who knows? | |
8146 | ac_cv_c_bigendian=unknown | |
8147 | fi | |
8148 | fi | |
4977bab6 | 8149 | fi |
5213506e | 8150 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 8151 | else |
5213506e | 8152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8153 | /* end confdefs.h. */ |
5213506e | 8154 | $ac_includes_default |
9791c75c KC |
8155 | int |
8156 | main () | |
8157 | { | |
5213506e RW |
8158 | |
8159 | /* Are we little or big endian? From Harbison&Steele. */ | |
8160 | union | |
8161 | { | |
8162 | long int l; | |
8163 | char c[sizeof (long int)]; | |
8164 | } u; | |
8165 | u.l = 1; | |
8166 | return u.c[sizeof (long int) - 1] == 1; | |
8167 | ||
8168 | ; | |
8169 | return 0; | |
4977bab6 | 8170 | } |
ba479fd2 | 8171 | _ACEOF |
5213506e | 8172 | if ac_fn_c_try_run "$LINENO"; then : |
4977bab6 ZW |
8173 | ac_cv_c_bigendian=no |
8174 | else | |
5213506e | 8175 | ac_cv_c_bigendian=yes |
4977bab6 | 8176 | fi |
5213506e RW |
8177 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8178 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4977bab6 | 8179 | fi |
ba479fd2 | 8180 | |
5213506e RW |
8181 | fi |
8182 | fi | |
8183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
8184 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
8185 | case $ac_cv_c_bigendian in #( | |
8186 | yes) | |
8187 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
8188 | ;; #( | |
8189 | no) | |
8190 | ;; #( | |
8191 | universal) | |
8192 | ||
8193 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
8194 | ||
8195 | ;; #( | |
8196 | *) | |
8197 | as_fn_error "unknown endianness | |
8198 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
8199 | esac | |
84c041a1 | 8200 | |
75e93faa | 8201 | |
73458fb7 NN |
8202 | # -------- |
8203 | # UNSORTED | |
8204 | # -------- | |
1e608388 | 8205 | |
1e608388 | 8206 | |
4e70264f ZW |
8207 | # These libraries may be used by collect2. |
8208 | # We may need a special search path to get them linked. | |
5213506e RW |
8209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5 |
8210 | $as_echo_n "checking for collect2 libraries... " >&6; } | |
8211 | if test "${gcc_cv_collect2_libs+set}" = set; then : | |
8212 | $as_echo_n "(cached) " >&6 | |
4e70264f ZW |
8213 | else |
8214 | save_LIBS="$LIBS" | |
7f2749d4 | 8215 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8216 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8217 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8218 | do | |
8219 | LIBS="$libs" | |
5213506e | 8220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 NN |
8221 | /* end confdefs.h. */ |
8222 | ||
5213506e RW |
8223 | /* Override any GCC internal prototype to avoid an error. |
8224 | Use char because int might match the return type of a GCC | |
8225 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
8226 | #ifdef __cplusplus |
8227 | extern "C" | |
8228 | #endif | |
ba479fd2 NN |
8229 | char ldopen (); |
8230 | int | |
8231 | main () | |
8232 | { | |
5213506e | 8233 | return ldopen (); |
ba479fd2 NN |
8234 | ; |
8235 | return 0; | |
8236 | } | |
8237 | _ACEOF | |
5213506e | 8238 | if ac_fn_c_try_link "$LINENO"; then : |
4e70264f | 8239 | gcc_cv_collect2_libs="$libs"; break |
4e70264f | 8240 | fi |
5213506e RW |
8241 | rm -f core conftest.err conftest.$ac_objext \ |
8242 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8243 | done |
8244 | LIBS="$save_LIBS" | |
8245 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8246 | fi | |
5213506e RW |
8247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_collect2_libs" >&5 |
8248 | $as_echo "$gcc_cv_collect2_libs" >&6; } | |
4e70264f ZW |
8249 | case $gcc_cv_collect2_libs in |
8250 | "none required") ;; | |
8251 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8252 | esac | |
8253 | ||
8254 | ||
7f2749d4 RK |
8255 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8256 | # -lexc. So test for it. | |
8257 | save_LIBS="$LIBS" | |
8258 | LIBS= | |
5213506e RW |
8259 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing exc_resume" >&5 |
8260 | $as_echo_n "checking for library containing exc_resume... " >&6; } | |
8261 | if test "${ac_cv_search_exc_resume+set}" = set; then : | |
8262 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
8263 | else |
8264 | ac_func_search_save_LIBS=$LIBS | |
5213506e | 8265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8266 | /* end confdefs.h. */ |
7f2749d4 | 8267 | |
5213506e RW |
8268 | /* Override any GCC internal prototype to avoid an error. |
8269 | Use char because int might match the return type of a GCC | |
b61ff9c8 | 8270 | builtin and then its argument prototype would still apply. */ |
b61ff9c8 BS |
8271 | #ifdef __cplusplus |
8272 | extern "C" | |
8273 | #endif | |
b61ff9c8 BS |
8274 | char exc_resume (); |
8275 | int | |
8276 | main () | |
8277 | { | |
5213506e | 8278 | return exc_resume (); |
b61ff9c8 BS |
8279 | ; |
8280 | return 0; | |
8281 | } | |
8282 | _ACEOF | |
5213506e RW |
8283 | for ac_lib in '' exc; do |
8284 | if test -z "$ac_lib"; then | |
8285 | ac_res="none required" | |
8286 | else | |
8287 | ac_res=-l$ac_lib | |
8288 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8289 | fi | |
8290 | if ac_fn_c_try_link "$LINENO"; then : | |
8291 | ac_cv_search_exc_resume=$ac_res | |
b8ec3cc8 | 8292 | fi |
5213506e RW |
8293 | rm -f core conftest.err conftest.$ac_objext \ |
8294 | conftest$ac_exeext | |
8295 | if test "${ac_cv_search_exc_resume+set}" = set; then : | |
8296 | break | |
b8ec3cc8 | 8297 | fi |
5213506e RW |
8298 | done |
8299 | if test "${ac_cv_search_exc_resume+set}" = set; then : | |
8300 | ||
dd7f7a6e | 8301 | else |
5213506e RW |
8302 | ac_cv_search_exc_resume=no |
8303 | fi | |
8304 | rm conftest.$ac_ext | |
8305 | LIBS=$ac_func_search_save_LIBS | |
8306 | fi | |
8307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_exc_resume" >&5 | |
8308 | $as_echo "$ac_cv_search_exc_resume" >&6; } | |
8309 | ac_res=$ac_cv_search_exc_resume | |
8310 | if test "$ac_res" != no; then : | |
8311 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e | 8312 | |
1a4b763e | 8313 | fi |
5213506e RW |
8314 | |
8315 | GNAT_LIBEXC="$LIBS" | |
8316 | LIBS="$save_LIBS" | |
8317 | ||
8318 | ||
8319 | # Some systems put ldexp and frexp in libm instead of libc; assume | |
8320 | # they're both in the same place. jcf-dump needs them. | |
8321 | save_LIBS="$LIBS" | |
8322 | LIBS= | |
8323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5 | |
8324 | $as_echo_n "checking for library containing ldexp... " >&6; } | |
8325 | if test "${ac_cv_search_ldexp+set}" = set; then : | |
8326 | $as_echo_n "(cached) " >&6 | |
8327 | else | |
8328 | ac_func_search_save_LIBS=$LIBS | |
8329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
b61ff9c8 | 8330 | /* end confdefs.h. */ |
2f41c1d6 | 8331 | |
5213506e RW |
8332 | /* Override any GCC internal prototype to avoid an error. |
8333 | Use char because int might match the return type of a GCC | |
8334 | builtin and then its argument prototype would still apply. */ | |
b61ff9c8 BS |
8335 | #ifdef __cplusplus |
8336 | extern "C" | |
8337 | #endif | |
b61ff9c8 BS |
8338 | char ldexp (); |
8339 | int | |
8340 | main () | |
8341 | { | |
5213506e | 8342 | return ldexp (); |
b61ff9c8 BS |
8343 | ; |
8344 | return 0; | |
8345 | } | |
8346 | _ACEOF | |
5213506e RW |
8347 | for ac_lib in '' m; do |
8348 | if test -z "$ac_lib"; then | |
8349 | ac_res="none required" | |
8350 | else | |
8351 | ac_res=-l$ac_lib | |
8352 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8353 | fi | |
8354 | if ac_fn_c_try_link "$LINENO"; then : | |
8355 | ac_cv_search_ldexp=$ac_res | |
b61ff9c8 | 8356 | fi |
5213506e RW |
8357 | rm -f core conftest.err conftest.$ac_objext \ |
8358 | conftest$ac_exeext | |
8359 | if test "${ac_cv_search_ldexp+set}" = set; then : | |
8360 | break | |
8361 | fi | |
8362 | done | |
8363 | if test "${ac_cv_search_ldexp+set}" = set; then : | |
8364 | ||
8365 | else | |
8366 | ac_cv_search_ldexp=no | |
dd7f7a6e | 8367 | fi |
5213506e | 8368 | rm conftest.$ac_ext |
dd7f7a6e EC |
8369 | LIBS=$ac_func_search_save_LIBS |
8370 | fi | |
5213506e RW |
8371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5 |
8372 | $as_echo "$ac_cv_search_ldexp" >&6; } | |
8373 | ac_res=$ac_cv_search_ldexp | |
8374 | if test "$ac_res" != no; then : | |
8375 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
8376 | |
8377 | fi | |
8378 | ||
8379 | LDEXP_LIB="$LIBS" | |
8380 | LIBS="$save_LIBS" | |
8381 | ||
8382 | ||
8383 | # Use <inttypes.h> only if it exists, | |
8384 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
5213506e RW |
8385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 |
8386 | $as_echo_n "checking for inttypes.h... " >&6; } | |
8387 | if test "${gcc_cv_header_inttypes_h+set}" = set; then : | |
8388 | $as_echo_n "(cached) " >&6 | |
dd7f7a6e | 8389 | else |
5213506e | 8390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
dd7f7a6e EC |
8391 | /* end confdefs.h. */ |
8392 | #include <sys/types.h> | |
8393 | #include <inttypes.h> | |
8394 | int | |
8395 | main () | |
8396 | { | |
8397 | intmax_t i = -1; | |
8398 | ; | |
8399 | return 0; | |
8400 | } | |
8401 | _ACEOF | |
5213506e | 8402 | if ac_fn_c_try_compile "$LINENO"; then : |
dd7f7a6e EC |
8403 | gcc_cv_header_inttypes_h=yes |
8404 | else | |
5213506e | 8405 | gcc_cv_header_inttypes_h=no |
dd7f7a6e | 8406 | fi |
5213506e | 8407 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dd7f7a6e EC |
8408 | fi |
8409 | ||
5213506e RW |
8410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_inttypes_h" >&5 |
8411 | $as_echo "$gcc_cv_header_inttypes_h" >&6; } | |
dd7f7a6e EC |
8412 | if test $gcc_cv_header_inttypes_h = yes; then |
8413 | ||
5213506e | 8414 | $as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h |
dd7f7a6e | 8415 | |
0056a9b5 | 8416 | fi |
956d6950 | 8417 | |
c149cc37 | 8418 | |
ba479fd2 | 8419 | |
52a6edcc | 8420 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
d2e506f2 | 8421 | sysconf strsignal getrusage nl_langinfo \ |
0d667716 KG |
8422 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ |
8423 | clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked | |
5213506e RW |
8424 | do : |
8425 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8426 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8427 | eval as_val=\$$as_ac_var | |
8428 | if test "x$as_val" = x""yes; then : | |
ba479fd2 | 8429 | cat >>confdefs.h <<_ACEOF |
5213506e | 8430 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
ba479fd2 | 8431 | _ACEOF |
956d6950 | 8432 | |
956d6950 JL |
8433 | fi |
8434 | done | |
8435 | ||
6885fc87 | 8436 | |
8ccb78f2 RO |
8437 | save_CPPFLAGS="$CPPFLAGS" |
8438 | save_LIBS="$LIBS" | |
8439 | LIBS="$LIBS $LIBELFLIBS" | |
8440 | for ac_func in elf_getshdrstrndx | |
8441 | do : | |
8442 | ac_fn_c_check_func "$LINENO" "elf_getshdrstrndx" "ac_cv_func_elf_getshdrstrndx" | |
8443 | if test "x$ac_cv_func_elf_getshdrstrndx" = x""yes; then : | |
8444 | cat >>confdefs.h <<_ACEOF | |
8445 | #define HAVE_ELF_GETSHDRSTRNDX 1 | |
8446 | _ACEOF | |
8447 | ||
8448 | else | |
8449 | for ac_func in elf_getshstrndx | |
8450 | do : | |
8451 | ac_fn_c_check_func "$LINENO" "elf_getshstrndx" "ac_cv_func_elf_getshstrndx" | |
8452 | if test "x$ac_cv_func_elf_getshstrndx" = x""yes; then : | |
8453 | cat >>confdefs.h <<_ACEOF | |
8454 | #define HAVE_ELF_GETSHSTRNDX 1 | |
8455 | _ACEOF | |
8456 | if test "$cross_compiling" = yes; then : | |
8457 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
8458 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
8459 | as_fn_error "cannot run test program while cross compiling | |
8460 | See \`config.log' for more details." "$LINENO" 5; } | |
8461 | else | |
8462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8463 | /* end confdefs.h. */ | |
8464 | #include <stdlib.h> | |
8465 | #include <libelf.h> | |
8466 | int main() | |
8467 | { | |
8468 | return elf_getshstrndx (NULL, 0) == 0; | |
479881c3 | 8469 | } |
8ccb78f2 RO |
8470 | _ACEOF |
8471 | if ac_fn_c_try_run "$LINENO"; then : | |
8472 | ||
479881c3 RG |
8473 | $as_echo "#define HAVE_ELF_GETSHSTRNDX_GABI 1" >>confdefs.h |
8474 | ||
8ccb78f2 RO |
8475 | fi |
8476 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8477 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8478 | fi | |
8479 | ||
8480 | fi | |
8481 | done | |
8482 | ||
8483 | ||
8484 | fi | |
8485 | done | |
8486 | ||
8487 | LIBS="$save_LIBS" | |
8488 | CPPFLAGS="$save_CPPFLAGS" | |
8489 | ||
39f6c4c8 | 8490 | if test x$ac_cv_func_mbstowcs = xyes; then |
5213506e RW |
8491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbstowcs works" >&5 |
8492 | $as_echo_n "checking whether mbstowcs works... " >&6; } | |
8493 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then : | |
8494 | $as_echo_n "(cached) " >&6 | |
39f6c4c8 | 8495 | else |
5213506e | 8496 | if test "$cross_compiling" = yes; then : |
39f6c4c8 KW |
8497 | gcc_cv_func_mbstowcs_works=yes |
8498 | else | |
5213506e | 8499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8500 | /* end confdefs.h. */ |
39f6c4c8 KW |
8501 | #include <stdlib.h> |
8502 | int main() | |
8503 | { | |
8504 | mbstowcs(0, "", 0); | |
8505 | return 0; | |
8506 | } | |
ba479fd2 | 8507 | _ACEOF |
5213506e | 8508 | if ac_fn_c_try_run "$LINENO"; then : |
39f6c4c8 KW |
8509 | gcc_cv_func_mbstowcs_works=yes |
8510 | else | |
5213506e | 8511 | gcc_cv_func_mbstowcs_works=no |
39f6c4c8 | 8512 | fi |
5213506e RW |
8513 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8514 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
39f6c4c8 | 8515 | fi |
5213506e | 8516 | |
39f6c4c8 | 8517 | fi |
5213506e RW |
8518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mbstowcs_works" >&5 |
8519 | $as_echo "$gcc_cv_func_mbstowcs_works" >&6; } | |
63cf211a | 8520 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 | 8521 | |
5213506e | 8522 | $as_echo "#define HAVE_WORKING_MBSTOWCS 1" >>confdefs.h |
39f6c4c8 KW |
8523 | |
8524 | fi | |
8525 | fi | |
8526 | ||
5213506e RW |
8527 | ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" |
8528 | if test "x$ac_cv_type_ssize_t" = x""yes; then : | |
6e3f3080 | 8529 | |
8b4fc07a | 8530 | else |
ba479fd2 | 8531 | |
8b4fc07a | 8532 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 8533 | #define ssize_t int |
ba479fd2 | 8534 | _ACEOF |
f12bc141 ZW |
8535 | |
8536 | fi | |
8537 | ||
5213506e RW |
8538 | ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default" |
8539 | if test "x$ac_cv_type_caddr_t" = x""yes; then : | |
bba09b5a | 8540 | |
bba09b5a AT |
8541 | else |
8542 | ||
8543 | cat >>confdefs.h <<_ACEOF | |
8544 | #define caddr_t char * | |
8545 | _ACEOF | |
8546 | ||
8547 | fi | |
8548 | ||
0b9d02c6 | 8549 | |
3b0727a0 | 8550 | |
5213506e RW |
8551 | ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" |
8552 | if test "x$ac_cv_header_sys_mman_h" = x""yes; then : | |
3b0727a0 MR |
8553 | gcc_header_sys_mman_h=yes |
8554 | else | |
8555 | gcc_header_sys_mman_h=no | |
8556 | fi | |
5213506e RW |
8557 | |
8558 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
8559 | if test "x$ac_cv_func_mmap" = x""yes; then : | |
3b0727a0 MR |
8560 | gcc_func_mmap=yes |
8561 | else | |
8562 | gcc_func_mmap=no | |
8563 | fi | |
8564 | ||
8565 | if test "$gcc_header_sys_mman_h" != yes \ | |
8566 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
8567 | gcc_cv_func_mmap_file=no |
8568 | gcc_cv_func_mmap_dev_zero=no | |
8569 | gcc_cv_func_mmap_anon=no | |
8570 | else | |
5213506e RW |
8571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read-only mmap of a plain file works" >&5 |
8572 | $as_echo_n "checking whether read-only mmap of a plain file works... " >&6; } | |
8573 | if test "${gcc_cv_func_mmap_file+set}" = set; then : | |
8574 | $as_echo_n "(cached) " >&6 | |
1072ec3f | 8575 | else |
ba479fd2 | 8576 | # Add a system to this blacklist if |
1072ec3f ZW |
8577 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
8578 | # memory area containing the same data that you'd get if you applied | |
8579 | # read() to the same fd. The only system known to have a problem here | |
8580 | # is VMS, where text files have record structure. | |
8581 | case "$host_os" in | |
ba479fd2 | 8582 | vms* | ultrix*) |
1072ec3f ZW |
8583 | gcc_cv_func_mmap_file=no ;; |
8584 | *) | |
8585 | gcc_cv_func_mmap_file=yes;; | |
8586 | esac | |
8587 | fi | |
5213506e RW |
8588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_file" >&5 |
8589 | $as_echo "$gcc_cv_func_mmap_file" >&6; } | |
8590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap from /dev/zero works" >&5 | |
8591 | $as_echo_n "checking whether mmap from /dev/zero works... " >&6; } | |
8592 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then : | |
8593 | $as_echo_n "(cached) " >&6 | |
1072ec3f ZW |
8594 | else |
8595 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
8596 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
8597 | # zeroed pages with both the following properties: | |
8598 | # 1. If you map N consecutive pages in with one call, and then | |
8599 | # unmap any subset of those pages, the pages that were not | |
8600 | # explicitly unmapped remain accessible. | |
8601 | # 2. If you map two adjacent blocks of memory and then unmap them | |
8602 | # both at once, they must both go away. | |
8603 | # Systems known to be in this category are Windows (all variants), | |
8604 | # VMS, and Darwin. | |
8605 | case "$host_os" in | |
2ce240d3 | 8606 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
8607 | gcc_cv_func_mmap_dev_zero=no ;; |
8608 | *) | |
8609 | gcc_cv_func_mmap_dev_zero=yes;; | |
8610 | esac | |
8611 | fi | |
5213506e RW |
8612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_dev_zero" >&5 |
8613 | $as_echo "$gcc_cv_func_mmap_dev_zero" >&6; } | |
1072ec3f ZW |
8614 | |
8615 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
5213506e RW |
8616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5 |
8617 | $as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; } | |
8618 | if test "${gcc_cv_decl_map_anon+set}" = set; then : | |
8619 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 8620 | else |
5213506e | 8621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8622 | /* end confdefs.h. */ |
1072ec3f ZW |
8623 | #include <sys/types.h> |
8624 | #include <sys/mman.h> | |
8625 | #include <unistd.h> | |
8626 | ||
8627 | #ifndef MAP_ANONYMOUS | |
8628 | #define MAP_ANONYMOUS MAP_ANON | |
8629 | #endif | |
8630 | ||
ba479fd2 NN |
8631 | int |
8632 | main () | |
8633 | { | |
1072ec3f | 8634 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
8635 | ; |
8636 | return 0; | |
8637 | } | |
8638 | _ACEOF | |
5213506e | 8639 | if ac_fn_c_try_compile "$LINENO"; then : |
1072ec3f ZW |
8640 | gcc_cv_decl_map_anon=yes |
8641 | else | |
5213506e | 8642 | gcc_cv_decl_map_anon=no |
1072ec3f | 8643 | fi |
5213506e | 8644 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 8645 | fi |
5213506e RW |
8646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_map_anon" >&5 |
8647 | $as_echo "$gcc_cv_decl_map_anon" >&6; } | |
1072ec3f ZW |
8648 | |
8649 | if test $gcc_cv_decl_map_anon = no; then | |
8650 | gcc_cv_func_mmap_anon=no | |
8651 | else | |
5213506e RW |
8652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
8653 | $as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; } | |
8654 | if test "${gcc_cv_func_mmap_anon+set}" = set; then : | |
8655 | $as_echo_n "(cached) " >&6 | |
1072ec3f ZW |
8656 | else |
8657 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
8658 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
8659 | # doesn't give anonymous zeroed pages with the same properties listed | |
8660 | # above for use of /dev/zero. | |
8661 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
8662 | case "$host_os" in | |
8663 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
8664 | gcc_cv_func_mmap_anon=no ;; | |
8665 | *) | |
8666 | gcc_cv_func_mmap_anon=yes;; | |
8667 | esac | |
8668 | fi | |
5213506e RW |
8669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_anon" >&5 |
8670 | $as_echo "$gcc_cv_func_mmap_anon" >&6; } | |
1072ec3f ZW |
8671 | fi |
8672 | fi | |
8673 | ||
8674 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 | 8675 | |
5213506e | 8676 | $as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h |
1072ec3f ZW |
8677 | |
8678 | fi | |
8679 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 | 8680 | |
5213506e | 8681 | $as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h |
1072ec3f ZW |
8682 | |
8683 | fi | |
8684 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 | 8685 | |
5213506e | 8686 | $as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h |
1072ec3f ZW |
8687 | |
8688 | fi | |
8689 | ||
b27d2bd5 MK |
8690 | |
8691 | case "${host}" in | |
ee262b6f | 8692 | *-*-*vms*) |
ba479fd2 | 8693 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
8694 | # won't work, and it isn't easily adaptable. It makes more sense to |
8695 | # just force it. | |
8696 | ac_cv_func_vfork_works=yes | |
8697 | ;; | |
b27d2bd5 | 8698 | esac |
5213506e RW |
8699 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
8700 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
6e3f3080 | 8701 | |
ba479fd2 NN |
8702 | else |
8703 | ||
8704 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 8705 | #define pid_t int |
ba479fd2 | 8706 | _ACEOF |
c375c43b KG |
8707 | |
8708 | fi | |
8709 | ||
5213506e RW |
8710 | for ac_header in vfork.h |
8711 | do : | |
8712 | ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h" | |
8713 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
ba479fd2 | 8714 | cat >>confdefs.h <<_ACEOF |
5213506e | 8715 | #define HAVE_VFORK_H 1 |
ba479fd2 | 8716 | _ACEOF |
6e3f3080 NN |
8717 | |
8718 | fi | |
ba479fd2 NN |
8719 | done |
8720 | ||
ba479fd2 | 8721 | for ac_func in fork vfork |
5213506e RW |
8722 | do : |
8723 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8724 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8725 | eval as_val=\$$as_ac_var | |
8726 | if test "x$as_val" = x""yes; then : | |
ba479fd2 | 8727 | cat >>confdefs.h <<_ACEOF |
5213506e | 8728 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
ba479fd2 NN |
8729 | _ACEOF |
8730 | ||
c375c43b | 8731 | fi |
ba479fd2 | 8732 | done |
c375c43b | 8733 | |
ba479fd2 | 8734 | if test "x$ac_cv_func_fork" = xyes; then |
5213506e RW |
8735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
8736 | $as_echo_n "checking for working fork... " >&6; } | |
8737 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
8738 | $as_echo_n "(cached) " >&6 | |
c375c43b | 8739 | else |
5213506e | 8740 | if test "$cross_compiling" = yes; then : |
ba479fd2 NN |
8741 | ac_cv_func_fork_works=cross |
8742 | else | |
5213506e RW |
8743 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8744 | /* end confdefs.h. */ | |
8745 | $ac_includes_default | |
8746 | int | |
8747 | main () | |
8748 | { | |
8749 | ||
8750 | /* By Ruediger Kuhlmann. */ | |
8751 | return fork () < 0; | |
8752 | ||
8753 | ; | |
8754 | return 0; | |
8755 | } | |
1a4b763e | 8756 | _ACEOF |
5213506e | 8757 | if ac_fn_c_try_run "$LINENO"; then : |
ba479fd2 NN |
8758 | ac_cv_func_fork_works=yes |
8759 | else | |
5213506e | 8760 | ac_cv_func_fork_works=no |
ba479fd2 | 8761 | fi |
5213506e RW |
8762 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8763 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ba479fd2 | 8764 | fi |
5213506e | 8765 | |
ba479fd2 | 8766 | fi |
5213506e RW |
8767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
8768 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
ba479fd2 NN |
8769 | |
8770 | else | |
8771 | ac_cv_func_fork_works=$ac_cv_func_fork | |
8772 | fi | |
8773 | if test "x$ac_cv_func_fork_works" = xcross; then | |
8774 | case $host in | |
8775 | *-*-amigaos* | *-*-msdosdjgpp*) | |
8776 | # Override, as these systems have only a dummy fork() stub | |
8777 | ac_cv_func_fork_works=no | |
8778 | ;; | |
8779 | *) | |
8780 | ac_cv_func_fork_works=yes | |
8781 | ;; | |
8782 | esac | |
5213506e RW |
8783 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
8784 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 8785 | fi |
c375c43b | 8786 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 | 8787 | if test "x$ac_cv_func_vfork" = xyes; then |
5213506e RW |
8788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
8789 | $as_echo_n "checking for working vfork... " >&6; } | |
8790 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
8791 | $as_echo_n "(cached) " >&6 | |
c375c43b | 8792 | else |
5213506e | 8793 | if test "$cross_compiling" = yes; then : |
ba479fd2 NN |
8794 | ac_cv_func_vfork_works=cross |
8795 | else | |
5213506e | 8796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 8797 | /* end confdefs.h. */ |
c375c43b | 8798 | /* Thanks to Paul Eggert for this test. */ |
5213506e | 8799 | $ac_includes_default |
ba479fd2 | 8800 | #include <sys/wait.h> |
5213506e | 8801 | #ifdef HAVE_VFORK_H |
ba479fd2 | 8802 | # include <vfork.h> |
c375c43b KG |
8803 | #endif |
8804 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
8805 | argument registers are propagated back to the parent. The compiler |
8806 | is told about this with #include <vfork.h>, but some compilers | |
8807 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
8808 | static variable whose address is put into a register that is | |
8809 | clobbered by the vfork. */ | |
8810 | static void | |
c375c43b KG |
8811 | #ifdef __cplusplus |
8812 | sparc_address_test (int arg) | |
ba479fd2 | 8813 | # else |
c375c43b KG |
8814 | sparc_address_test (arg) int arg; |
8815 | #endif | |
8816 | { | |
8817 | static pid_t child; | |
8818 | if (!child) { | |
8819 | child = vfork (); | |
8820 | if (child < 0) { | |
8821 | perror ("vfork"); | |
8822 | _exit(2); | |
8823 | } | |
8824 | if (!child) { | |
8825 | arg = getpid(); | |
8826 | write(-1, "", 0); | |
8827 | _exit (arg); | |
8828 | } | |
8829 | } | |
8830 | } | |
ba479fd2 NN |
8831 | |
8832 | int | |
8833 | main () | |
8834 | { | |
c375c43b KG |
8835 | pid_t parent = getpid (); |
8836 | pid_t child; | |
8837 | ||
ba479fd2 | 8838 | sparc_address_test (0); |
c375c43b KG |
8839 | |
8840 | child = vfork (); | |
8841 | ||
8842 | if (child == 0) { | |
ba479fd2 NN |
8843 | /* Here is another test for sparc vfork register problems. This |
8844 | test uses lots of local variables, at least as many local | |
8845 | variables as main has allocated so far including compiler | |
8846 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
8847 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
8848 | reuse the register of parent for one of the local variables, | |
8849 | since it will think that parent can't possibly be used any more | |
8850 | in this routine. Assigning to the local variable will thus | |
8851 | munge parent in the parent process. */ | |
c375c43b KG |
8852 | pid_t |
8853 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
8854 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
8855 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
8856 | use the same hardware register for all 8 local variables. */ | |
8857 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
8858 | || p != p5 || p != p6 || p != p7) | |
8859 | _exit(1); | |
8860 | ||
ba479fd2 NN |
8861 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
8862 | from child file descriptors. If the child closes a descriptor | |
8863 | before it execs or exits, this munges the parent's descriptor | |
8864 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
8865 | _exit(close(fileno(stdout)) != 0); |
8866 | } else { | |
8867 | int status; | |
8868 | struct stat st; | |
8869 | ||
8870 | while (wait(&status) != child) | |
8871 | ; | |
5213506e | 8872 | return ( |
c375c43b KG |
8873 | /* Was there some problem with vforking? */ |
8874 | child < 0 | |
8875 | ||
8876 | /* Did the child fail? (This shouldn't happen.) */ | |
8877 | || status | |
8878 | ||
8879 | /* Did the vfork/compiler bug occur? */ | |
8880 | || parent != getpid() | |
8881 | ||
8882 | /* Did the file descriptor bug occur? */ | |
8883 | || fstat(fileno(stdout), &st) != 0 | |
8884 | ); | |
8885 | } | |
8886 | } | |
ba479fd2 | 8887 | _ACEOF |
5213506e | 8888 | if ac_fn_c_try_run "$LINENO"; then : |
c375c43b KG |
8889 | ac_cv_func_vfork_works=yes |
8890 | else | |
5213506e | 8891 | ac_cv_func_vfork_works=no |
cafe096b | 8892 | fi |
5213506e RW |
8893 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
8894 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6e3f3080 | 8895 | fi |
5213506e | 8896 | |
ba479fd2 | 8897 | fi |
5213506e RW |
8898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
8899 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
c375c43b | 8900 | |
ba479fd2 NN |
8901 | fi; |
8902 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 8903 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
5213506e RW |
8904 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
8905 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
8906 | fi |
8907 | ||
ba479fd2 NN |
8908 | if test "x$ac_cv_func_vfork_works" = xyes; then |
8909 | ||
5213506e | 8910 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
ba479fd2 NN |
8911 | |
8912 | else | |
8913 | ||
5213506e | 8914 | $as_echo "#define vfork fork" >>confdefs.h |
c375c43b KG |
8915 | |
8916 | fi | |
ba479fd2 NN |
8917 | if test "x$ac_cv_func_fork_works" = xyes; then |
8918 | ||
5213506e | 8919 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
ba479fd2 NN |
8920 | |
8921 | fi | |
8922 | ||
c375c43b | 8923 | |
81bf3d9e | 8924 | |
dfb77e37 KC |
8925 | if test "X$prefix" = "XNONE"; then |
8926 | acl_final_prefix="$ac_default_prefix" | |
8927 | else | |
8928 | acl_final_prefix="$prefix" | |
8929 | fi | |
8930 | if test "X$exec_prefix" = "XNONE"; then | |
8931 | acl_final_exec_prefix='${prefix}' | |
8932 | else | |
8933 | acl_final_exec_prefix="$exec_prefix" | |
8934 | fi | |
8935 | acl_save_prefix="$prefix" | |
8936 | prefix="$acl_final_prefix" | |
8937 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8938 | prefix="$acl_save_prefix" | |
f91abfce TT |
8939 | |
8940 | ||
5213506e RW |
8941 | # Check whether --with-gnu-ld was given. |
8942 | if test "${with_gnu_ld+set}" = set; then : | |
8943 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 8944 | else |
dfb77e37 | 8945 | with_gnu_ld=no |
5213506e RW |
8946 | fi |
8947 | ||
dfb77e37 KC |
8948 | # Prepare PATH_SEPARATOR. |
8949 | # The user is always right. | |
8950 | if test "${PATH_SEPARATOR+set}" != set; then | |
8951 | echo "#! /bin/sh" >conf$$.sh | |
8952 | echo "exit 0" >>conf$$.sh | |
8953 | chmod +x conf$$.sh | |
8954 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8955 | PATH_SEPARATOR=';' | |
ba479fd2 | 8956 | else |
dfb77e37 | 8957 | PATH_SEPARATOR=: |
ba479fd2 | 8958 | fi |
dfb77e37 KC |
8959 | rm -f conf$$.sh |
8960 | fi | |
8961 | ac_prog=ld | |
8962 | if test "$GCC" = yes; then | |
8963 | # Check if gcc -print-prog-name=ld gives a path. | |
5213506e RW |
8964 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
8965 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
dfb77e37 KC |
8966 | case $host in |
8967 | *-*-mingw*) | |
8968 | # gcc leaves a trailing carriage return which upsets mingw | |
8969 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8970 | *) | |
8971 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8972 | esac | |
8973 | case $ac_prog in | |
8974 | # Accept absolute paths. | |
8975 | [\\/]* | [A-Za-z]:[\\/]*) | |
8976 | re_direlt='/[^/][^/]*/\.\./' | |
8977 | # Canonicalize the path of ld | |
8978 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8979 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8980 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8981 | done | |
8982 | test -z "$LD" && LD="$ac_prog" | |
8983 | ;; | |
8984 | "") | |
8985 | # If it fails, then pretend we aren't using GCC. | |
8986 | ac_prog=ld | |
8987 | ;; | |
8988 | *) | |
8989 | # If it is relative, then search for the first ld in PATH. | |
8990 | with_gnu_ld=unknown | |
8991 | ;; | |
8992 | esac | |
8993 | elif test "$with_gnu_ld" = yes; then | |
5213506e RW |
8994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
8995 | $as_echo_n "checking for GNU ld... " >&6; } | |
ba479fd2 | 8996 | else |
5213506e RW |
8997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
8998 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
ba479fd2 | 8999 | fi |
5213506e RW |
9000 | if test "${acl_cv_path_LD+set}" = set; then : |
9001 | $as_echo_n "(cached) " >&6 | |
ba479fd2 | 9002 | else |
dfb77e37 KC |
9003 | if test -z "$LD"; then |
9004 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
9005 | for ac_dir in $PATH; do | |
9006 | test -z "$ac_dir" && ac_dir=. | |
9007 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
9008 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
9009 | # Check to see if the program is GNU ld. I'd rather use --version, | |
9010 | # but apparently some GNU ld's only accept -v. | |
9011 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
9012 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
9013 | test "$with_gnu_ld" != no && break | |
9014 | else | |
9015 | test "$with_gnu_ld" != yes && break | |
9016 | fi | |
dfb77e37 KC |
9017 | fi |
9018 | done | |
9019 | IFS="$ac_save_ifs" | |
9020 | else | |
9021 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
9022 | fi | |
9023 | fi | |
ba479fd2 | 9024 | |
dfb77e37 KC |
9025 | LD="$acl_cv_path_LD" |
9026 | if test -n "$LD"; then | |
5213506e RW |
9027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
9028 | $as_echo "$LD" >&6; } | |
dfb77e37 | 9029 | else |
5213506e RW |
9030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9031 | $as_echo "no" >&6; } | |
ba479fd2 | 9032 | fi |
5213506e RW |
9033 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
9034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
9035 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
9036 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
9037 | $as_echo_n "(cached) " >&6 | |
dfb77e37 KC |
9038 | else |
9039 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
9040 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
9041 | acl_cv_prog_gnu_ld=yes | |
9042 | else | |
9043 | acl_cv_prog_gnu_ld=no | |
9044 | fi | |
dfb77e37 | 9045 | fi |
5213506e RW |
9046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
9047 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
dfb77e37 KC |
9048 | with_gnu_ld=$acl_cv_prog_gnu_ld |
9049 | ||
9050 | ||
9051 | ||
5213506e RW |
9052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
9053 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
9054 | if test "${acl_cv_rpath+set}" = set; then : | |
9055 | $as_echo_n "(cached) " >&6 | |
dfb77e37 KC |
9056 | else |
9057 | ||
9058 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
9059 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
9060 | . ./conftest.sh | |
9061 | rm -f ./conftest.sh | |
9062 | acl_cv_rpath=done | |
ba479fd2 | 9063 | |
eb158727 | 9064 | fi |
5213506e RW |
9065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
9066 | $as_echo "$acl_cv_rpath" >&6; } | |
dfb77e37 KC |
9067 | wl="$acl_cv_wl" |
9068 | libext="$acl_cv_libext" | |
9069 | shlibext="$acl_cv_shlibext" | |
9070 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
9071 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
9072 | hardcode_direct="$acl_cv_hardcode_direct" | |
9073 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
5213506e RW |
9074 | # Check whether --enable-rpath was given. |
9075 | if test "${enable_rpath+set}" = set; then : | |
9076 | enableval=$enable_rpath; : | |
dfb77e37 KC |
9077 | else |
9078 | enable_rpath=yes | |
5213506e RW |
9079 | fi |
9080 | ||
8b1f719a | 9081 | |
a6ccdbab | 9082 | |
dfb77e37 KC |
9083 | |
9084 | ||
9085 | ||
9086 | ||
9087 | ||
b639c3c2 JJ |
9088 | use_additional=yes |
9089 | ||
9090 | acl_save_prefix="$prefix" | |
9091 | prefix="$acl_final_prefix" | |
9092 | acl_save_exec_prefix="$exec_prefix" | |
9093 | exec_prefix="$acl_final_exec_prefix" | |
9094 | ||
9095 | eval additional_includedir=\"$includedir\" | |
9096 | eval additional_libdir=\"$libdir\" | |
9097 | ||
9098 | exec_prefix="$acl_save_exec_prefix" | |
9099 | prefix="$acl_save_prefix" | |
dfb77e37 KC |
9100 | |
9101 | ||
5213506e RW |
9102 | # Check whether --with-libiconv-prefix was given. |
9103 | if test "${with_libiconv_prefix+set}" = set; then : | |
9104 | withval=$with_libiconv_prefix; | |
8b1f719a | 9105 | if test "X$withval" = "Xno"; then |
b639c3c2 | 9106 | use_additional=no |
8b1f719a PB |
9107 | else |
9108 | if test "X$withval" = "X"; then | |
dfb77e37 KC |
9109 | |
9110 | acl_save_prefix="$prefix" | |
9111 | prefix="$acl_final_prefix" | |
9112 | acl_save_exec_prefix="$exec_prefix" | |
9113 | exec_prefix="$acl_final_exec_prefix" | |
9114 | ||
b639c3c2 JJ |
9115 | eval additional_includedir=\"$includedir\" |
9116 | eval additional_libdir=\"$libdir\" | |
dfb77e37 KC |
9117 | |
9118 | exec_prefix="$acl_save_exec_prefix" | |
9119 | prefix="$acl_save_prefix" | |
9120 | ||
8b1f719a | 9121 | else |
b639c3c2 JJ |
9122 | additional_includedir="$withval/include" |
9123 | additional_libdir="$withval/lib" | |
8b1f719a PB |
9124 | fi |
9125 | fi | |
9126 | ||
5213506e RW |
9127 | fi |
9128 | ||
dfb77e37 KC |
9129 | LIBICONV= |
9130 | LTLIBICONV= | |
9131 | INCICONV= | |
9132 | rpathdirs= | |
9133 | ltrpathdirs= | |
9134 | names_already_handled= | |
9135 | names_next_round='iconv ' | |
9136 | while test -n "$names_next_round"; do | |
9137 | names_this_round="$names_next_round" | |
9138 | names_next_round= | |
9139 | for name in $names_this_round; do | |
9140 | already_handled= | |
9141 | for n in $names_already_handled; do | |
9142 | if test "$n" = "$name"; then | |
9143 | already_handled=yes | |
9144 | break | |
9145 | fi | |
9146 | done | |
9147 | if test -z "$already_handled"; then | |
9148 | names_already_handled="$names_already_handled $name" | |
9149 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9150 | eval value=\"\$HAVE_LIB$uppername\" | |
9151 | if test -n "$value"; then | |
9152 | if test "$value" = yes; then | |
9153 | eval value=\"\$LIB$uppername\" | |
9154 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
9155 | eval value=\"\$LTLIB$uppername\" | |
9156 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
9157 | else | |
9158 | : | |
9159 | fi | |
9160 | else | |
9161 | found_dir= | |
9162 | found_la= | |
9163 | found_so= | |
9164 | found_a= | |
b639c3c2 JJ |
9165 | if test $use_additional = yes; then |
9166 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9167 | found_dir="$additional_libdir" | |
9168 | found_so="$additional_libdir/lib$name.$shlibext" | |
9169 | if test -f "$additional_libdir/lib$name.la"; then | |
9170 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
9171 | fi |
9172 | else | |
b639c3c2 JJ |
9173 | if test -f "$additional_libdir/lib$name.$libext"; then |
9174 | found_dir="$additional_libdir" | |
9175 | found_a="$additional_libdir/lib$name.$libext" | |
9176 | if test -f "$additional_libdir/lib$name.la"; then | |
9177 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
9178 | fi |
9179 | fi | |
9180 | fi | |
9181 | fi | |
9182 | if test "X$found_dir" = "X"; then | |
9183 | for x in $LDFLAGS $LTLIBICONV; do | |
9184 | ||
9185 | acl_save_prefix="$prefix" | |
9186 | prefix="$acl_final_prefix" | |
9187 | acl_save_exec_prefix="$exec_prefix" | |
9188 | exec_prefix="$acl_final_exec_prefix" | |
9189 | eval x=\"$x\" | |
9190 | exec_prefix="$acl_save_exec_prefix" | |
9191 | prefix="$acl_save_prefix" | |
9192 | ||
9193 | case "$x" in | |
9194 | -L*) | |
9195 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9196 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9197 | found_dir="$dir" | |
9198 | found_so="$dir/lib$name.$shlibext" | |
9199 | if test -f "$dir/lib$name.la"; then | |
9200 | found_la="$dir/lib$name.la" | |
9201 | fi | |
9202 | else | |
9203 | if test -f "$dir/lib$name.$libext"; then | |
9204 | found_dir="$dir" | |
9205 | found_a="$dir/lib$name.$libext" | |
9206 | if test -f "$dir/lib$name.la"; then | |
9207 | found_la="$dir/lib$name.la" | |
9208 | fi | |
9209 | fi | |
9210 | fi | |
9211 | ;; | |
9212 | esac | |
9213 | if test "X$found_dir" != "X"; then | |
9214 | break | |
9215 | fi | |
9216 | done | |
9217 | fi | |
9218 | if test "X$found_dir" != "X"; then | |
9219 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
9220 | if test "X$found_so" != "X"; then | |
9221 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9222 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9223 | else | |
9224 | haveit= | |
9225 | for x in $ltrpathdirs; do | |
9226 | if test "X$x" = "X$found_dir"; then | |
9227 | haveit=yes | |
9228 | break | |
9229 | fi | |
9230 | done | |
9231 | if test -z "$haveit"; then | |
9232 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9233 | fi | |
9234 | if test "$hardcode_direct" = yes; then | |
9235 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9236 | else | |
9237 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9238 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9239 | haveit= | |
9240 | for x in $rpathdirs; do | |
9241 | if test "X$x" = "X$found_dir"; then | |
9242 | haveit=yes | |
9243 | break | |
9244 | fi | |
9245 | done | |
9246 | if test -z "$haveit"; then | |
9247 | rpathdirs="$rpathdirs $found_dir" | |
9248 | fi | |
9249 | else | |
9250 | haveit= | |
9251 | for x in $LDFLAGS $LIBICONV; do | |
9252 | ||
9253 | acl_save_prefix="$prefix" | |
9254 | prefix="$acl_final_prefix" | |
9255 | acl_save_exec_prefix="$exec_prefix" | |
9256 | exec_prefix="$acl_final_exec_prefix" | |
9257 | eval x=\"$x\" | |
9258 | exec_prefix="$acl_save_exec_prefix" | |
9259 | prefix="$acl_save_prefix" | |
9260 | ||
9261 | if test "X$x" = "X-L$found_dir"; then | |
9262 | haveit=yes | |
9263 | break | |
9264 | fi | |
9265 | done | |
9266 | if test -z "$haveit"; then | |
9267 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
9268 | fi | |
9269 | if test "$hardcode_minus_L" != no; then | |
9270 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
9271 | else | |
9272 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
9273 | fi | |
9274 | fi | |
9275 | fi | |
9276 | fi | |
9277 | else | |
9278 | if test "X$found_a" != "X"; then | |
9279 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
9280 | else | |
9281 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
9282 | fi | |
9283 | fi | |
9284 | additional_includedir= | |
9285 | case "$found_dir" in | |
9286 | */lib | */lib/) | |
9287 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9288 | additional_includedir="$basedir/include" | |
9289 | ;; | |
9290 | esac | |
9291 | if test "X$additional_includedir" != "X"; then | |
9292 | if test "X$additional_includedir" != "X/usr/include"; then | |
9293 | haveit= | |
9294 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9295 | if test -n "$GCC"; then | |
9296 | case $host_os in | |
18fc9bd4 | 9297 | linux*) haveit=yes;; |
dfb77e37 KC |
9298 | esac |
9299 | fi | |
9300 | fi | |
9301 | if test -z "$haveit"; then | |
9302 | for x in $CPPFLAGS $INCICONV; do | |
9303 | ||
9304 | acl_save_prefix="$prefix" | |
9305 | prefix="$acl_final_prefix" | |
9306 | acl_save_exec_prefix="$exec_prefix" | |
9307 | exec_prefix="$acl_final_exec_prefix" | |
9308 | eval x=\"$x\" | |
9309 | exec_prefix="$acl_save_exec_prefix" | |
9310 | prefix="$acl_save_prefix" | |
9311 | ||
9312 | if test "X$x" = "X-I$additional_includedir"; then | |
9313 | haveit=yes | |
9314 | break | |
9315 | fi | |
9316 | done | |
9317 | if test -z "$haveit"; then | |
9318 | if test -d "$additional_includedir"; then | |
9319 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
9320 | fi | |
9321 | fi | |
9322 | fi | |
9323 | fi | |
9324 | fi | |
9325 | if test -n "$found_la"; then | |
9326 | save_libdir="$libdir" | |
9327 | case "$found_la" in | |
9328 | */* | *\\*) . "$found_la" ;; | |
9329 | *) . "./$found_la" ;; | |
9330 | esac | |
9331 | libdir="$save_libdir" | |
9332 | for dep in $dependency_libs; do | |
9333 | case "$dep" in | |
9334 | -L*) | |
9335 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9336 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9337 | haveit= | |
9338 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9339 | if test -n "$GCC"; then | |
9340 | case $host_os in | |
18fc9bd4 | 9341 | linux*) haveit=yes;; |
dfb77e37 KC |
9342 | esac |
9343 | fi | |
9344 | fi | |
9345 | if test -z "$haveit"; then | |
9346 | haveit= | |
9347 | for x in $LDFLAGS $LIBICONV; do | |
9348 | ||
9349 | acl_save_prefix="$prefix" | |
9350 | prefix="$acl_final_prefix" | |
9351 | acl_save_exec_prefix="$exec_prefix" | |
9352 | exec_prefix="$acl_final_exec_prefix" | |
9353 | eval x=\"$x\" | |
9354 | exec_prefix="$acl_save_exec_prefix" | |
9355 | prefix="$acl_save_prefix" | |
9356 | ||
9357 | if test "X$x" = "X-L$additional_libdir"; then | |
9358 | haveit=yes | |
9359 | break | |
9360 | fi | |
9361 | done | |
9362 | if test -z "$haveit"; then | |
9363 | if test -d "$additional_libdir"; then | |
9364 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
9365 | fi | |
9366 | fi | |
9367 | haveit= | |
9368 | for x in $LDFLAGS $LTLIBICONV; do | |
9369 | ||
9370 | acl_save_prefix="$prefix" | |
9371 | prefix="$acl_final_prefix" | |
9372 | acl_save_exec_prefix="$exec_prefix" | |
9373 | exec_prefix="$acl_final_exec_prefix" | |
9374 | eval x=\"$x\" | |
9375 | exec_prefix="$acl_save_exec_prefix" | |
9376 | prefix="$acl_save_prefix" | |
9377 | ||
9378 | if test "X$x" = "X-L$additional_libdir"; then | |
9379 | haveit=yes | |
9380 | break | |
9381 | fi | |
9382 | done | |
9383 | if test -z "$haveit"; then | |
9384 | if test -d "$additional_libdir"; then | |
9385 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
9386 | fi | |
9387 | fi | |
9388 | fi | |
9389 | fi | |
9390 | ;; | |
9391 | -R*) | |
9392 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9393 | if test "$enable_rpath" != no; then | |
9394 | haveit= | |
9395 | for x in $rpathdirs; do | |
9396 | if test "X$x" = "X$dir"; then | |
9397 | haveit=yes | |
9398 | break | |
9399 | fi | |
9400 | done | |
9401 | if test -z "$haveit"; then | |
9402 | rpathdirs="$rpathdirs $dir" | |
9403 | fi | |
9404 | haveit= | |
9405 | for x in $ltrpathdirs; do | |
9406 | if test "X$x" = "X$dir"; then | |
9407 | haveit=yes | |
9408 | break | |
9409 | fi | |
9410 | done | |
9411 | if test -z "$haveit"; then | |
9412 | ltrpathdirs="$ltrpathdirs $dir" | |
9413 | fi | |
9414 | fi | |
9415 | ;; | |
9416 | -l*) | |
9417 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9418 | ;; | |
9419 | *.la) | |
9420 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9421 | ;; | |
9422 | *) | |
9423 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
9424 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
9425 | ;; | |
9426 | esac | |
9427 | done | |
9428 | fi | |
9429 | else | |
9430 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
9431 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
9432 | fi | |
9433 | fi | |
9434 | fi | |
9435 | done | |
9436 | done | |
9437 | if test "X$rpathdirs" != "X"; then | |
9438 | if test -n "$hardcode_libdir_separator"; then | |
9439 | alldirs= | |
9440 | for found_dir in $rpathdirs; do | |
9441 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9442 | done | |
9443 | acl_save_libdir="$libdir" | |
9444 | libdir="$alldirs" | |
9445 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9446 | libdir="$acl_save_libdir" | |
9447 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
9448 | else | |
9449 | for found_dir in $rpathdirs; do | |
9450 | acl_save_libdir="$libdir" | |
9451 | libdir="$found_dir" | |
9452 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9453 | libdir="$acl_save_libdir" | |
9454 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
9455 | done | |
9456 | fi | |
9457 | fi | |
9458 | if test "X$ltrpathdirs" != "X"; then | |
9459 | for found_dir in $ltrpathdirs; do | |
9460 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
9461 | done | |
9462 | fi | |
9463 | ||
9464 | ||
9465 | ||
9466 | ||
9467 | ||
9468 | ||
9469 | ||
9470 | am_save_CPPFLAGS="$CPPFLAGS" | |
9471 | ||
9472 | for element in $INCICONV; do | |
9473 | haveit= | |
9474 | for x in $CPPFLAGS; do | |
9475 | ||
9476 | acl_save_prefix="$prefix" | |
9477 | prefix="$acl_final_prefix" | |
9478 | acl_save_exec_prefix="$exec_prefix" | |
9479 | exec_prefix="$acl_final_exec_prefix" | |
9480 | eval x=\"$x\" | |
9481 | exec_prefix="$acl_save_exec_prefix" | |
9482 | prefix="$acl_save_prefix" | |
9483 | ||
9484 | if test "X$x" = "X$element"; then | |
9485 | haveit=yes | |
9486 | break | |
9487 | fi | |
9488 | done | |
9489 | if test -z "$haveit"; then | |
9490 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9491 | fi | |
9492 | done | |
eb158727 ZW |
9493 | |
9494 | ||
5213506e RW |
9495 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
9496 | $as_echo_n "checking for iconv... " >&6; } | |
9497 | if test "${am_cv_func_iconv+set}" = set; then : | |
9498 | $as_echo_n "(cached) " >&6 | |
f91abfce | 9499 | else |
ba479fd2 | 9500 | |
f91abfce TT |
9501 | am_cv_func_iconv="no, consider installing GNU libiconv" |
9502 | am_cv_lib_iconv=no | |
5213506e | 9503 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9504 | /* end confdefs.h. */ |
f91abfce TT |
9505 | #include <stdlib.h> |
9506 | #include <iconv.h> | |
ba479fd2 NN |
9507 | int |
9508 | main () | |
9509 | { | |
f91abfce TT |
9510 | iconv_t cd = iconv_open("",""); |
9511 | iconv(cd,NULL,NULL,NULL,NULL); | |
9512 | iconv_close(cd); | |
ba479fd2 NN |
9513 | ; |
9514 | return 0; | |
9515 | } | |
9516 | _ACEOF | |
5213506e | 9517 | if ac_fn_c_try_link "$LINENO"; then : |
f91abfce | 9518 | am_cv_func_iconv=yes |
f91abfce | 9519 | fi |
5213506e RW |
9520 | rm -f core conftest.err conftest.$ac_objext \ |
9521 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
9522 | if test "$am_cv_func_iconv" != yes; then |
9523 | am_save_LIBS="$LIBS" | |
dfb77e37 | 9524 | LIBS="$LIBS $LIBICONV" |
5213506e | 9525 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9526 | /* end confdefs.h. */ |
f91abfce TT |
9527 | #include <stdlib.h> |
9528 | #include <iconv.h> | |
ba479fd2 NN |
9529 | int |
9530 | main () | |
9531 | { | |
f91abfce TT |
9532 | iconv_t cd = iconv_open("",""); |
9533 | iconv(cd,NULL,NULL,NULL,NULL); | |
9534 | iconv_close(cd); | |
ba479fd2 NN |
9535 | ; |
9536 | return 0; | |
9537 | } | |
9538 | _ACEOF | |
5213506e | 9539 | if ac_fn_c_try_link "$LINENO"; then : |
f91abfce TT |
9540 | am_cv_lib_iconv=yes |
9541 | am_cv_func_iconv=yes | |
f91abfce | 9542 | fi |
5213506e RW |
9543 | rm -f core conftest.err conftest.$ac_objext \ |
9544 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
9545 | LIBS="$am_save_LIBS" |
9546 | fi | |
6e3f3080 | 9547 | |
ba479fd2 | 9548 | fi |
5213506e RW |
9549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
9550 | $as_echo "$am_cv_func_iconv" >&6; } | |
63cf211a | 9551 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 | 9552 | |
5213506e | 9553 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
f91abfce | 9554 | |
dfb77e37 KC |
9555 | fi |
9556 | if test "$am_cv_lib_iconv" = yes; then | |
5213506e RW |
9557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 |
9558 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
9559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
9560 | $as_echo "$LIBICONV" >&6; } | |
dfb77e37 KC |
9561 | else |
9562 | CPPFLAGS="$am_save_CPPFLAGS" | |
9563 | LIBICONV= | |
9564 | LTLIBICONV= | |
9565 | fi | |
9566 | ||
9567 | ||
9568 | ||
9569 | if test "$am_cv_func_iconv" = yes; then | |
5213506e RW |
9570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
9571 | $as_echo_n "checking for iconv declaration... " >&6; } | |
9572 | if test "${am_cv_proto_iconv+set}" = set; then : | |
9573 | $as_echo_n "(cached) " >&6 | |
f91abfce | 9574 | else |
ba479fd2 | 9575 | |
5213506e | 9576 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9577 | /* end confdefs.h. */ |
f91abfce TT |
9578 | |
9579 | #include <stdlib.h> | |
9580 | #include <iconv.h> | |
9581 | extern | |
9582 | #ifdef __cplusplus | |
9583 | "C" | |
9584 | #endif | |
9585 | #if defined(__STDC__) || defined(__cplusplus) | |
9586 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
9587 | #else | |
9588 | size_t iconv(); | |
9589 | #endif | |
9590 | ||
ba479fd2 NN |
9591 | int |
9592 | main () | |
9593 | { | |
f91abfce | 9594 | |
ba479fd2 NN |
9595 | ; |
9596 | return 0; | |
9597 | } | |
9598 | _ACEOF | |
5213506e | 9599 | if ac_fn_c_try_compile "$LINENO"; then : |
f91abfce TT |
9600 | am_cv_proto_iconv_arg1="" |
9601 | else | |
5213506e | 9602 | am_cv_proto_iconv_arg1="const" |
f91abfce | 9603 | fi |
5213506e | 9604 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
9605 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" |
9606 | fi | |
9607 | ||
9608 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
5213506e | 9609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
ba479fd2 | 9610 | }$am_cv_proto_iconv" >&5 |
5213506e RW |
9611 | $as_echo "${ac_t:- |
9612 | }$am_cv_proto_iconv" >&6; } | |
ba479fd2 NN |
9613 | |
9614 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 9615 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 9616 | _ACEOF |
f91abfce TT |
9617 | |
9618 | fi | |
f91abfce | 9619 | |
56694dd9 ZW |
9620 | # Until we have in-tree GNU iconv: |
9621 | LIBICONV_DEP= | |
9622 | ||
9623 | ||
18fc9bd4 | 9624 | |
5213506e RW |
9625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9626 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9627 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9628 | $as_echo_n "(cached) " >&6 | |
18fc9bd4 | 9629 | else |
5213506e | 9630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18fc9bd4 RG |
9631 | /* end confdefs.h. */ |
9632 | #include <locale.h> | |
9633 | int | |
9634 | main () | |
9635 | { | |
9636 | return LC_MESSAGES | |
9637 | ; | |
9638 | return 0; | |
9639 | } | |
9640 | _ACEOF | |
5213506e | 9641 | if ac_fn_c_try_link "$LINENO"; then : |
18fc9bd4 RG |
9642 | am_cv_val_LC_MESSAGES=yes |
9643 | else | |
5213506e | 9644 | am_cv_val_LC_MESSAGES=no |
18fc9bd4 | 9645 | fi |
5213506e RW |
9646 | rm -f core conftest.err conftest.$ac_objext \ |
9647 | conftest$ac_exeext conftest.$ac_ext | |
18fc9bd4 | 9648 | fi |
5213506e RW |
9649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
9650 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
18fc9bd4 RG |
9651 | if test $am_cv_val_LC_MESSAGES = yes; then |
9652 | ||
5213506e | 9653 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
18fc9bd4 RG |
9654 | |
9655 | fi | |
9656 | ||
f91abfce | 9657 | |
a03ea89b | 9658 | |
5213506e RW |
9659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
9660 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
9661 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
9662 | $as_echo_n "(cached) " >&6 | |
a03ea89b | 9663 | else |
5213506e | 9664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a03ea89b BM |
9665 | /* end confdefs.h. */ |
9666 | #include <langinfo.h> | |
9667 | int | |
9668 | main () | |
9669 | { | |
9670 | char* cs = nl_langinfo(CODESET); | |
9671 | ; | |
9672 | return 0; | |
9673 | } | |
9674 | _ACEOF | |
5213506e | 9675 | if ac_fn_c_try_link "$LINENO"; then : |
a03ea89b BM |
9676 | am_cv_langinfo_codeset=yes |
9677 | else | |
5213506e | 9678 | am_cv_langinfo_codeset=no |
a03ea89b | 9679 | fi |
5213506e RW |
9680 | rm -f core conftest.err conftest.$ac_objext \ |
9681 | conftest$ac_exeext conftest.$ac_ext | |
a03ea89b BM |
9682 | |
9683 | fi | |
5213506e RW |
9684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
9685 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
a03ea89b BM |
9686 | if test $am_cv_langinfo_codeset = yes; then |
9687 | ||
5213506e | 9688 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a03ea89b BM |
9689 | |
9690 | fi | |
9691 | ||
9692 | ||
86cf1cbd KG |
9693 | # We will need to find libiberty.h and ansidecl.h |
9694 | saved_CFLAGS="$CFLAGS" | |
9695 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ed5b9f96 GK |
9696 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ |
9697 | strsignal strstr strverscmp \ | |
9698 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 9699 | free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked |
81bf3d9e | 9700 | do |
5213506e RW |
9701 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9703 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9704 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9705 | $as_echo_n "(cached) " >&6 | |
9706 | else | |
9707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9708 | /* end confdefs.h. */ |
7afe8c41 KG |
9709 | #undef $ac_tr_decl |
9710 | #define $ac_tr_decl 1 | |
ba479fd2 | 9711 | |
d02af173 | 9712 | #include "ansidecl.h" |
86cf1cbd | 9713 | #include "system.h" |
f31e826b | 9714 | |
ba479fd2 NN |
9715 | int |
9716 | main () | |
9717 | { | |
86cf1cbd KG |
9718 | #ifndef $ac_func |
9719 | char *(*pfn) = (char *(*)) $ac_func ; | |
9720 | #endif | |
ba479fd2 | 9721 | ; |
5213506e RW |
9722 | return 0; |
9723 | } | |
9724 | _ACEOF | |
9725 | if ac_fn_c_try_compile "$LINENO"; then : | |
f31e826b | 9726 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 9727 | else |
5213506e | 9728 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 9729 | fi |
5213506e | 9730 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
9731 | fi |
9732 | ||
f31e826b | 9733 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
5213506e RW |
9734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9735 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 9736 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9737 | _ACEOF |
9738 | ||
81bf3d9e | 9739 | else |
5213506e RW |
9740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9741 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 9742 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9743 | _ACEOF |
9744 | ||
81bf3d9e RH |
9745 | fi |
9746 | ||
9747 | done | |
ba479fd2 | 9748 | |
ba479fd2 | 9749 | |
81bf3d9e RH |
9750 | for ac_func in getrlimit setrlimit getrusage |
9751 | do | |
5213506e RW |
9752 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9754 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9755 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9756 | $as_echo_n "(cached) " >&6 | |
9757 | else | |
9758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9759 | /* end confdefs.h. */ |
7afe8c41 KG |
9760 | #undef $ac_tr_decl |
9761 | #define $ac_tr_decl 1 | |
ba479fd2 | 9762 | |
d02af173 | 9763 | #include "ansidecl.h" |
86cf1cbd | 9764 | #include "system.h" |
81bf3d9e RH |
9765 | #ifdef HAVE_SYS_RESOURCE_H |
9766 | #include <sys/resource.h> | |
9767 | #endif | |
9768 | ||
f31e826b | 9769 | |
ba479fd2 NN |
9770 | int |
9771 | main () | |
9772 | { | |
86cf1cbd KG |
9773 | #ifndef $ac_func |
9774 | char *(*pfn) = (char *(*)) $ac_func ; | |
9775 | #endif | |
ba479fd2 NN |
9776 | ; |
9777 | return 0; | |
9778 | } | |
9779 | _ACEOF | |
5213506e | 9780 | if ac_fn_c_try_compile "$LINENO"; then : |
f31e826b | 9781 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 9782 | else |
5213506e | 9783 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 9784 | fi |
5213506e | 9785 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
9786 | fi |
9787 | ||
f31e826b | 9788 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
5213506e RW |
9789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9790 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 9791 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9792 | _ACEOF |
9793 | ||
81bf3d9e | 9794 | else |
5213506e RW |
9795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9796 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 9797 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9798 | _ACEOF |
9799 | ||
81bf3d9e RH |
9800 | fi |
9801 | ||
9802 | done | |
86cf1cbd | 9803 | |
81bf3d9e | 9804 | |
5213506e | 9805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 9806 | /* end confdefs.h. */ |
b2522d2b HPN |
9807 | |
9808 | #include "ansidecl.h" | |
9809 | #include "system.h" | |
9810 | #ifdef HAVE_SYS_RESOURCE_H | |
9811 | #include <sys/resource.h> | |
9812 | #endif | |
9813 | ||
ba479fd2 NN |
9814 | int |
9815 | main () | |
9816 | { | |
b2522d2b | 9817 | rlim_t l = 0; |
ba479fd2 NN |
9818 | ; |
9819 | return 0; | |
9820 | } | |
9821 | _ACEOF | |
5213506e | 9822 | if ac_fn_c_try_compile "$LINENO"; then : |
ba479fd2 | 9823 | |
5213506e | 9824 | else |
ba479fd2 | 9825 | |
5213506e | 9826 | $as_echo "#define rlim_t long" >>confdefs.h |
b2522d2b HPN |
9827 | |
9828 | fi | |
5213506e | 9829 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 9830 | |
2102b2fe RS |
9831 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
9832 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
9833 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
9834 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
351df804 | 9835 | for ac_func in ldgetname |
c1800ec8 | 9836 | do |
5213506e RW |
9837 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9839 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9840 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9841 | $as_echo_n "(cached) " >&6 | |
9842 | else | |
9843 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9844 | /* end confdefs.h. */ |
c1800ec8 ZW |
9845 | #undef $ac_tr_decl |
9846 | #define $ac_tr_decl 1 | |
ba479fd2 | 9847 | |
351df804 KG |
9848 | #include "ansidecl.h" |
9849 | #include "system.h" | |
9850 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
9851 | #undef FREAD |
9852 | #undef FWRITE | |
351df804 KG |
9853 | #include <ldfcn.h> |
9854 | #endif | |
9855 | ||
9856 | ||
ba479fd2 NN |
9857 | int |
9858 | main () | |
9859 | { | |
351df804 KG |
9860 | #ifndef $ac_func |
9861 | char *(*pfn) = (char *(*)) $ac_func ; | |
9862 | #endif | |
ba479fd2 NN |
9863 | ; |
9864 | return 0; | |
9865 | } | |
9866 | _ACEOF | |
5213506e | 9867 | if ac_fn_c_try_compile "$LINENO"; then : |
351df804 KG |
9868 | eval "gcc_cv_have_decl_$ac_func=yes" |
9869 | else | |
5213506e | 9870 | eval "gcc_cv_have_decl_$ac_func=no" |
351df804 | 9871 | fi |
5213506e | 9872 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
9873 | fi |
9874 | ||
9875 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5213506e RW |
9876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9877 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 9878 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9879 | _ACEOF |
9880 | ||
351df804 | 9881 | else |
5213506e RW |
9882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9883 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 9884 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9885 | _ACEOF |
9886 | ||
351df804 KG |
9887 | fi |
9888 | ||
9889 | done | |
ba479fd2 | 9890 | |
351df804 | 9891 | |
351df804 KG |
9892 | for ac_func in times |
9893 | do | |
5213506e RW |
9894 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9896 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9897 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9898 | $as_echo_n "(cached) " >&6 | |
9899 | else | |
9900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ba479fd2 | 9901 | /* end confdefs.h. */ |
351df804 KG |
9902 | #undef $ac_tr_decl |
9903 | #define $ac_tr_decl 1 | |
ba479fd2 | 9904 | |
c1800ec8 ZW |
9905 | #include "ansidecl.h" |
9906 | #include "system.h" | |
9907 | #ifdef HAVE_SYS_TIMES_H | |
9908 | #include <sys/times.h> | |
9909 | #endif | |
9910 | ||
9911 | ||
ba479fd2 NN |
9912 | int |
9913 | main () | |
9914 | { | |
c1800ec8 ZW |
9915 | #ifndef $ac_func |
9916 | char *(*pfn) = (char *(*)) $ac_func ; | |
9917 | #endif | |
ba479fd2 NN |
9918 | ; |
9919 | return 0; | |
9920 | } | |
9921 | _ACEOF | |
5213506e | 9922 | if ac_fn_c_try_compile "$LINENO"; then : |
2f41c1d6 PB |
9923 | eval "gcc_cv_have_decl_$ac_func=yes" |
9924 | else | |
5213506e | 9925 | eval "gcc_cv_have_decl_$ac_func=no" |
2f41c1d6 | 9926 | fi |
5213506e | 9927 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
9928 | fi |
9929 | ||
9930 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5213506e RW |
9931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9932 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 9933 | #define $ac_tr_decl 1 |
ba479fd2 NN |
9934 | _ACEOF |
9935 | ||
c1800ec8 | 9936 | else |
5213506e RW |
9937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9938 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 9939 | #define $ac_tr_decl 0 |
ba479fd2 NN |
9940 | _ACEOF |
9941 | ||
c1800ec8 ZW |
9942 | fi |
9943 | ||
9944 | done | |
c1800ec8 ZW |
9945 | |
9946 | ||
4f6d8cc8 GK |
9947 | for ac_func in sigaltstack |
9948 | do | |
5213506e RW |
9949 | ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
9950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 | |
9951 | $as_echo_n "checking whether $ac_func is declared... " >&6; } | |
9952 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : | |
9953 | $as_echo_n "(cached) " >&6 | |
9954 | else | |
9955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4f6d8cc8 GK |
9956 | /* end confdefs.h. */ |
9957 | #undef $ac_tr_decl | |
9958 | #define $ac_tr_decl 1 | |
9959 | ||
9960 | #include "ansidecl.h" | |
9961 | #include "system.h" | |
9962 | #include <signal.h> | |
9963 | ||
9964 | ||
9965 | int | |
9966 | main () | |
9967 | { | |
9968 | #ifndef $ac_func | |
9969 | char *(*pfn) = (char *(*)) $ac_func ; | |
9970 | #endif | |
9971 | ; | |
9972 | return 0; | |
9973 | } | |
9974 | _ACEOF | |
5213506e | 9975 | if ac_fn_c_try_compile "$LINENO"; then : |
8b1f719a PB |
9976 | eval "gcc_cv_have_decl_$ac_func=yes" |
9977 | else | |
5213506e | 9978 | eval "gcc_cv_have_decl_$ac_func=no" |
4f6d8cc8 | 9979 | fi |
5213506e | 9980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4f6d8cc8 GK |
9981 | fi |
9982 | ||
9983 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5213506e RW |
9984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9985 | $as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
9986 | #define $ac_tr_decl 1 |
9987 | _ACEOF | |
9988 | ||
9989 | else | |
5213506e RW |
9990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9991 | $as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
9992 | #define $ac_tr_decl 0 |
9993 | _ACEOF | |
9994 | ||
9995 | fi | |
9996 | ||
9997 | done | |
9998 | ||
9999 | ||
c1800ec8 | 10000 | # More time-related stuff. |
5213506e RW |
10001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5 |
10002 | $as_echo_n "checking for struct tms... " >&6; } | |
10003 | if test "${ac_cv_struct_tms+set}" = set; then : | |
10004 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
10005 | else |
10006 | ||
5213506e | 10007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10008 | /* end confdefs.h. */ |
c1800ec8 ZW |
10009 | |
10010 | #include "ansidecl.h" | |
10011 | #include "system.h" | |
10012 | #ifdef HAVE_SYS_TIMES_H | |
10013 | #include <sys/times.h> | |
10014 | #endif | |
10015 | ||
ba479fd2 NN |
10016 | int |
10017 | main () | |
10018 | { | |
c1800ec8 | 10019 | struct tms tms; |
ba479fd2 NN |
10020 | ; |
10021 | return 0; | |
10022 | } | |
10023 | _ACEOF | |
5213506e | 10024 | if ac_fn_c_try_compile "$LINENO"; then : |
c1800ec8 ZW |
10025 | ac_cv_struct_tms=yes |
10026 | else | |
5213506e | 10027 | ac_cv_struct_tms=no |
c1800ec8 | 10028 | fi |
5213506e | 10029 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 10030 | fi |
5213506e RW |
10031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tms" >&5 |
10032 | $as_echo "$ac_cv_struct_tms" >&6; } | |
63cf211a | 10033 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 | 10034 | |
5213506e | 10035 | $as_echo "#define HAVE_STRUCT_TMS 1" >>confdefs.h |
c1800ec8 ZW |
10036 | |
10037 | fi | |
10038 | ||
10039 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
10040 | # revisit after autoconf 2.50. | |
5213506e RW |
10041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 |
10042 | $as_echo_n "checking for clock_t... " >&6; } | |
10043 | if test "${gcc_cv_type_clock_t+set}" = set; then : | |
10044 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
10045 | else |
10046 | ||
5213506e | 10047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10048 | /* end confdefs.h. */ |
c1800ec8 ZW |
10049 | |
10050 | #include "ansidecl.h" | |
10051 | #include "system.h" | |
10052 | ||
ba479fd2 NN |
10053 | int |
10054 | main () | |
10055 | { | |
c1800ec8 | 10056 | clock_t x; |
ba479fd2 NN |
10057 | ; |
10058 | return 0; | |
10059 | } | |
10060 | _ACEOF | |
5213506e | 10061 | if ac_fn_c_try_compile "$LINENO"; then : |
c1800ec8 ZW |
10062 | gcc_cv_type_clock_t=yes |
10063 | else | |
5213506e | 10064 | gcc_cv_type_clock_t=no |
c1800ec8 | 10065 | fi |
5213506e | 10066 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 10067 | fi |
5213506e RW |
10068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_type_clock_t" >&5 |
10069 | $as_echo "$gcc_cv_type_clock_t" >&6; } | |
63cf211a | 10070 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 | 10071 | |
5213506e | 10072 | $as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h |
c1800ec8 ZW |
10073 | |
10074 | fi | |
10075 | ||
eb70d86d AS |
10076 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
10077 | CFLAGS="$saved_CFLAGS" | |
10078 | ||
5213506e RW |
10079 | # Check whether --enable-initfini-array was given. |
10080 | if test "${enable_initfini_array+set}" = set; then : | |
10081 | enableval=$enable_initfini_array; | |
07cf4226 | 10082 | else |
ba479fd2 | 10083 | |
5213506e RW |
10084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5 |
10085 | $as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; } | |
10086 | if test "${gcc_cv_initfini_array+set}" = set; then : | |
10087 | $as_echo_n "(cached) " >&6 | |
07cf4226 | 10088 | else |
5213506e | 10089 | if test "$cross_compiling" = yes; then : |
918c4fe4 | 10090 | gcc_cv_initfini_array=no |
eb70d86d | 10091 | else |
5213506e | 10092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10093 | /* end confdefs.h. */ |
eb70d86d | 10094 | |
07cf4226 DM |
10095 | static int x = -1; |
10096 | int main (void) { return x; } | |
10097 | int foo (void) { x = 0; } | |
10098 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 | 10099 | _ACEOF |
5213506e | 10100 | if ac_fn_c_try_run "$LINENO"; then : |
918c4fe4 | 10101 | gcc_cv_initfini_array=yes |
eb70d86d | 10102 | else |
5213506e | 10103 | gcc_cv_initfini_array=no |
eb70d86d | 10104 | fi |
5213506e RW |
10105 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10106 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
eb70d86d | 10107 | fi |
5213506e | 10108 | |
07cf4226 | 10109 | fi |
5213506e RW |
10110 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5 |
10111 | $as_echo "$gcc_cv_initfini_array" >&6; } | |
eb70d86d | 10112 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 10113 | |
5213506e RW |
10114 | fi |
10115 | ||
63cf211a | 10116 | if test $enable_initfini_array = yes; then |
ba479fd2 | 10117 | |
5213506e | 10118 | $as_echo "#define HAVE_INITFINI_ARRAY 1" >>confdefs.h |
07cf4226 | 10119 | |
eb70d86d | 10120 | fi |
81bf3d9e | 10121 | |
ba479fd2 | 10122 | # mkdir takes a single argument on some systems. |
5213506e RW |
10123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if mkdir takes one argument" >&5 |
10124 | $as_echo_n "checking if mkdir takes one argument... " >&6; } | |
10125 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then : | |
10126 | $as_echo_n "(cached) " >&6 | |
75923b2f | 10127 | else |
5213506e | 10128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10129 | /* end confdefs.h. */ |
75923b2f MK |
10130 | |
10131 | #include <sys/types.h> | |
10132 | #ifdef HAVE_SYS_STAT_H | |
10133 | # include <sys/stat.h> | |
10134 | #endif | |
10135 | #ifdef HAVE_UNISTD_H | |
10136 | # include <unistd.h> | |
10137 | #endif | |
10138 | #ifdef HAVE_DIRECT_H | |
10139 | # include <direct.h> | |
10140 | #endif | |
ba479fd2 NN |
10141 | int |
10142 | main () | |
10143 | { | |
75923b2f | 10144 | mkdir ("foo", 0); |
ba479fd2 NN |
10145 | ; |
10146 | return 0; | |
10147 | } | |
10148 | _ACEOF | |
5213506e | 10149 | if ac_fn_c_try_compile "$LINENO"; then : |
75923b2f MK |
10150 | gcc_cv_mkdir_takes_one_arg=no |
10151 | else | |
5213506e | 10152 | gcc_cv_mkdir_takes_one_arg=yes |
75923b2f | 10153 | fi |
5213506e | 10154 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 10155 | fi |
5213506e RW |
10156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
10157 | $as_echo "$gcc_cv_mkdir_takes_one_arg" >&6; } | |
63cf211a | 10158 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 | 10159 | |
5213506e | 10160 | $as_echo "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h |
75923b2f MK |
10161 | |
10162 | fi | |
10163 | ||
10164 | ||
861bb6c1 JL |
10165 | # File extensions |
10166 | manext='.1' | |
10167 | objext='.o' | |
10168 | ||
10169 | ||
10170 | ||
4977bab6 | 10171 | # With Setjmp/Longjmp based exception handling. |
5213506e RW |
10172 | # Check whether --enable-sjlj-exceptions was given. |
10173 | if test "${enable_sjlj_exceptions+set}" = set; then : | |
10174 | enableval=$enable_sjlj_exceptions; case $target in | |
399fe3e1 JDA |
10175 | *-*-hpux10*) |
10176 | if test $enableval != yes; then | |
5213506e RW |
10177 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5 |
10178 | $as_echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;} | |
399fe3e1 JDA |
10179 | enableval=yes |
10180 | fi | |
10181 | ;; | |
10182 | esac | |
10183 | force_sjlj_exceptions=yes | |
10184 | else | |
10185 | case $target in | |
10186 | *-*-hpux10*) | |
10187 | force_sjlj_exceptions=yes | |
10188 | enableval=yes | |
10189 | ;; | |
10190 | *) | |
10191 | force_sjlj_exceptions=no | |
10192 | ;; | |
10193 | esac | |
5213506e RW |
10194 | fi |
10195 | ||
399fe3e1 | 10196 | if test $force_sjlj_exceptions = yes; then |
b61ff9c8 | 10197 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` |
63cf211a | 10198 | |
ba479fd2 NN |
10199 | cat >>confdefs.h <<_ACEOF |
10200 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
10201 | _ACEOF | |
4977bab6 | 10202 | |
399fe3e1 | 10203 | fi |
4977bab6 | 10204 | |
443728bb L |
10205 | # For platforms with the unwind ABI which includes an unwind library, |
10206 | # libunwind, we can choose to use the system libunwind. | |
e61c76c9 SE |
10207 | # config.gcc also contains tests of with_system_libunwind. |
10208 | ||
4977bab6 | 10209 | |
5213506e RW |
10210 | # Check whether --with-system-libunwind was given. |
10211 | if test "${with_system_libunwind+set}" = set; then : | |
10212 | withval=$with_system_libunwind; | |
10213 | fi | |
4977bab6 | 10214 | |
e61c76c9 SE |
10215 | # If system-libunwind was not specifically set, pick a default setting. |
10216 | if test x$with_system_libunwind = x; then | |
10217 | case ${target} in | |
10218 | ia64-*-hpux*) with_system_libunwind=yes ;; | |
10219 | *) with_system_libunwind=no ;; | |
10220 | esac | |
10221 | fi | |
10222 | # Based on system-libunwind and target, do we have ipinfo? | |
10223 | if test x$with_system_libunwind = xyes; then | |
10224 | case ${target} in | |
10225 | ia64-*-*) have_unwind_getipinfo=no ;; | |
10226 | *) have_unwind_getipinfo=yes ;; | |
10227 | esac | |
10228 | else | |
a0e02041 AP |
10229 | # Darwin before version 9 does not have _Unwind_GetIPInfo. |
10230 | ||
10231 | case ${target} in | |
10232 | *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;; | |
10233 | *) have_unwind_getipinfo=yes ;; | |
10234 | esac | |
10235 | ||
e61c76c9 | 10236 | fi |
4977bab6 | 10237 | |
e61c76c9 | 10238 | if test x$have_unwind_getipinfo = xyes; then |
e64f5acf | 10239 | |
5213506e | 10240 | $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h |
e64f5acf | 10241 | |
e61c76c9 SE |
10242 | fi |
10243 | ||
e64f5acf | 10244 | |
34a86c2b NN |
10245 | # -------------------------------------------------------- |
10246 | # Build, host, and target specific configuration fragments | |
10247 | # -------------------------------------------------------- | |
10248 | ||
5b28c537 NN |
10249 | # Collect build-machine-specific information. |
10250 | . ${srcdir}/config.build | |
10251 | ||
a89ea0df NN |
10252 | # Collect host-machine-specific information. |
10253 | . ${srcdir}/config.host | |
10254 | ||
ef69da62 | 10255 | target_gtfiles= |
a89ea0df NN |
10256 | |
10257 | # Collect target-machine-specific information. | |
8ad9fb33 | 10258 | . ${srcdir}/config.gcc |
861bb6c1 JL |
10259 | |
10260 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 10261 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
10262 | |
10263 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 10264 | if test x"$tm_file" = x |
861bb6c1 JL |
10265 | then tm_file=$cpu_type/$cpu_type.h; fi |
10266 | ||
6b2adea9 | 10267 | if test x"$extra_headers" = x |
861bb6c1 JL |
10268 | then extra_headers=; fi |
10269 | ||
75bffa71 | 10270 | if test x$md_file = x |
e98e406f | 10271 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 10272 | |
75bffa71 | 10273 | if test x$out_file = x |
861bb6c1 JL |
10274 | then out_file=$cpu_type/$cpu_type.c; fi |
10275 | ||
75bffa71 | 10276 | if test x"$tmake_file" = x |
861bb6c1 JL |
10277 | then tmake_file=$cpu_type/t-$cpu_type |
10278 | fi | |
10279 | ||
90e6a802 | 10280 | if test x"$dwarf2" = xyes |
756ee602 | 10281 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
10282 | fi |
10283 | ||
861bb6c1 | 10284 | # Say what files are being used for the output code and MD file. |
11642c3a | 10285 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
10286 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
10287 | ||
11642c3a | 10288 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
10289 | # about them and drop them. |
10290 | ||
11642c3a ZW |
10291 | bx= |
10292 | for x in $build_xm_file; do | |
10293 | if test -f $srcdir/config/$x | |
10294 | then bx="$bx $x" | |
5213506e RW |
10295 | else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5 |
10296 | $as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
10297 | fi |
10298 | done | |
10299 | build_xm_file="$bx" | |
10300 | ||
10301 | hx= | |
10302 | for x in $host_xm_file; do | |
10303 | if test -f $srcdir/config/$x | |
10304 | then hx="$hx $x" | |
5213506e RW |
10305 | else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5 |
10306 | $as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
10307 | fi |
10308 | done | |
10309 | host_xm_file="$hx" | |
10310 | ||
10311 | tx= | |
10312 | for x in $xm_file; do | |
10313 | if test -f $srcdir/config/$x | |
10314 | then tx="$tx $x" | |
5213506e RW |
10315 | else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5 |
10316 | $as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
10317 | fi |
10318 | done | |
10319 | xm_file="$tx" | |
10320 | ||
861bb6c1 JL |
10321 | count=a |
10322 | for f in $tm_file; do | |
10323 | count=${count}x | |
10324 | done | |
75bffa71 | 10325 | if test $count = ax; then |
861bb6c1 JL |
10326 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
10327 | else | |
10328 | echo "Using the following target machine macro files:" | |
10329 | for f in $tm_file; do | |
10330 | echo " $srcdir/config/$f" | |
10331 | done | |
10332 | fi | |
10333 | ||
4977bab6 | 10334 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 | 10335 | |
5213506e | 10336 | $as_echo "#define NEED_64BIT_HOST_WIDE_INT 1" >>confdefs.h |
4977bab6 ZW |
10337 | |
10338 | fi | |
10339 | ||
99fa8911 AP |
10340 | if test x$use_long_long_for_widest_fast_int = xyes; then |
10341 | ||
5213506e | 10342 | $as_echo "#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1" >>confdefs.h |
99fa8911 AP |
10343 | |
10344 | fi | |
10345 | ||
861bb6c1 JL |
10346 | count=a |
10347 | for f in $host_xm_file; do | |
10348 | count=${count}x | |
10349 | done | |
11642c3a ZW |
10350 | if test $count = a; then |
10351 | : | |
10352 | elif test $count = ax; then | |
861bb6c1 JL |
10353 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
10354 | else | |
10355 | echo "Using the following host machine macro files:" | |
10356 | for f in $host_xm_file; do | |
10357 | echo " $srcdir/config/$f" | |
10358 | done | |
10359 | fi | |
476d9098 | 10360 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 10361 | |
75bffa71 | 10362 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
10363 | count=a |
10364 | for f in $build_xm_file; do | |
10365 | count=${count}x | |
10366 | done | |
11642c3a ZW |
10367 | if test $count = a; then |
10368 | : | |
10369 | elif test $count = ax; then | |
861bb6c1 JL |
10370 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
10371 | else | |
10372 | echo "Using the following build machine macro files:" | |
10373 | for f in $build_xm_file; do | |
10374 | echo " $srcdir/config/$f" | |
10375 | done | |
10376 | fi | |
10377 | fi | |
10378 | ||
4f6d8cc8 | 10379 | case ${host} in |
b8ec3cc8 | 10380 | powerpc*-*-darwin*) |
5213506e RW |
10381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5 |
10382 | $as_echo_n "checking whether mcontext_t fields have underscores... " >&6; } | |
10383 | if test "${gcc_cv_mcontext_underscores+set}" = set; then : | |
10384 | $as_echo_n "(cached) " >&6 | |
4f6d8cc8 | 10385 | else |
5213506e RW |
10386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10387 | /* end confdefs.h. */ | |
4f6d8cc8 | 10388 | |
ba7da42a | 10389 | #include <sys/cdefs.h> |
de4fb767 | 10390 | #include <sys/signal.h> |
4f6d8cc8 GK |
10391 | #include <ucontext.h> |
10392 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
10393 | ||
10394 | _ACEOF | |
5213506e | 10395 | if ac_fn_c_try_compile "$LINENO"; then : |
4f6d8cc8 GK |
10396 | gcc_cv_mcontext_underscores=no |
10397 | else | |
5213506e | 10398 | gcc_cv_mcontext_underscores=yes |
4f6d8cc8 | 10399 | fi |
5213506e | 10400 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4f6d8cc8 | 10401 | fi |
5213506e RW |
10402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mcontext_underscores" >&5 |
10403 | $as_echo "$gcc_cv_mcontext_underscores" >&6; } | |
4f6d8cc8 GK |
10404 | if test $gcc_cv_mcontext_underscores = yes; then |
10405 | ||
5213506e | 10406 | $as_echo "#define HAS_MCONTEXT_T_UNDERSCORES /**/" >>confdefs.h |
4f6d8cc8 GK |
10407 | |
10408 | fi | |
10409 | ;; | |
10410 | esac | |
10411 | ||
8bb915b6 NN |
10412 | # --------- |
10413 | # Threading | |
10414 | # --------- | |
10415 | ||
c2e494a8 | 10416 | # Check if a valid thread package |
615be2cf | 10417 | case ${enable_threads} in |
c2e494a8 NN |
10418 | "" | no) |
10419 | # No threads | |
10420 | target_thread_file='single' | |
10421 | ;; | |
10422 | yes) | |
10423 | # default | |
10424 | target_thread_file='single' | |
10425 | ;; | |
18167442 | 10426 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
d9dced13 | 10427 | single | solaris | vxworks | win32 | mipssde) |
615be2cf | 10428 | target_thread_file=${enable_threads} |
c2e494a8 NN |
10429 | ;; |
10430 | *) | |
615be2cf | 10431 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
10432 | exit 1 |
10433 | ;; | |
10434 | esac | |
10435 | ||
10436 | if test x${thread_file} = x; then | |
10437 | # No thread file set by target-specific clauses in config.gcc, | |
10438 | # so use file chosen by default logic above | |
10439 | thread_file=${target_thread_file} | |
861bb6c1 JL |
10440 | fi |
10441 | ||
8bb915b6 NN |
10442 | # Make gthr-default.h if we have a thread file. |
10443 | gthread_flags= | |
10444 | if test $thread_file != single; then | |
b15a9f63 RW |
10445 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t |
10446 | if diff gthr-default.h-t gthr-default.h 2>/dev/null; then | |
10447 | rm -f gthr-default.h-t | |
10448 | else | |
10449 | mv -f gthr-default.h-t gthr-default.h | |
10450 | fi | |
8bb915b6 NN |
10451 | gthread_flags=-DHAVE_GTHR_DEFAULT |
10452 | fi | |
10453 | ||
10454 | ||
10455 | # -------- | |
10456 | # UNSORTED | |
10457 | # -------- | |
10458 | ||
18fbf599 | 10459 | use_cxa_atexit=no |
2121a768 JT |
10460 | if test x$enable___cxa_atexit = xyes || \ |
10461 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 | 10462 | if test x$host = x$target; then |
97388150 DS |
10463 | case $host in |
10464 | # mingw32 doesn't have __cxa_atexit but uses atexit registration | |
10465 | # keyed to flag_use_cxa_atexit | |
10466 | *-*-mingw32*) | |
10467 | use_cxa_atexit=yes | |
10468 | ;; | |
10469 | *) | |
5213506e RW |
10470 | ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit" |
10471 | if test "x$ac_cv_func___cxa_atexit" = x""yes; then : | |
18fbf599 PB |
10472 | use_cxa_atexit=yes |
10473 | else | |
10474 | echo "__cxa_atexit can't be enabled on this target" | |
10475 | fi | |
10476 | ||
5f60e48f | 10477 | ;; |
97388150 | 10478 | esac |
18fbf599 PB |
10479 | else |
10480 | # We can't check for __cxa_atexit when building a cross, so assume | |
10481 | # it is available | |
10482 | use_cxa_atexit=yes | |
10483 | fi | |
10484 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 | 10485 | |
5213506e | 10486 | $as_echo "#define DEFAULT_USE_CXA_ATEXIT 2" >>confdefs.h |
2121a768 | 10487 | |
18fbf599 | 10488 | fi |
2121a768 JT |
10489 | fi |
10490 | ||
a5381466 | 10491 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
10492 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
10493 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
10494 | |
10495 | ||
10496 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 10497 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 10498 | _ACEOF |
a5381466 ZW |
10499 | |
10500 | fi | |
10501 | ||
75685792 RS |
10502 | # Convert extra_options into a form suitable for Makefile use. |
10503 | extra_opt_files= | |
10504 | for f in $extra_options; do | |
10505 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
10506 | done | |
10507 | ||
10508 | ||
b7cb92ad | 10509 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 10510 | # the first file included by config.h. |
4977bab6 | 10511 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 10512 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 10513 | # work to find out the build config parameters. |
75bffa71 | 10514 | if test x$host = x$build |
db81d74a | 10515 | then |
eaf4e618 | 10516 | build_auto=auto-host.h |
b7cb92ad JL |
10517 | else |
10518 | # We create a subdir, then run autoconf in the subdir. | |
10519 | # To prevent recursion we set host and build for the new | |
10520 | # invocation of configure to the build for this invocation | |
ba479fd2 | 10521 | # of configure. |
b7cb92ad JL |
10522 | tempdir=build.$$ |
10523 | rm -rf $tempdir | |
10524 | mkdir $tempdir | |
10525 | cd $tempdir | |
10526 | case ${srcdir} in | |
255b8a49 | 10527 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
10528 | *) realsrcdir=../${srcdir};; |
10529 | esac | |
d920e825 L |
10530 | saved_CFLAGS="${CFLAGS}" |
10531 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
f8c33439 | 10532 | LDFLAGS="${LDFLAGS_FOR_BUILD}" \ |
d920e825 | 10533 | ${realsrcdir}/configure \ |
33e70558 | 10534 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 10535 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 10536 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
10537 | |
10538 | # We just finished tests for the build machine, so rename | |
10539 | # the file auto-build.h in the gcc directory. | |
10540 | mv auto-host.h ../auto-build.h | |
10541 | cd .. | |
10542 | rm -rf $tempdir | |
eaf4e618 | 10543 | build_auto=auto-build.h |
db81d74a RH |
10544 | fi |
10545 | ||
06f0b04c | 10546 | |
eaf4e618 | 10547 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
10548 | tm_p_file="${tm_p_file} tm-preds.h" |
10549 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
10550 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 10551 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 10552 | # put this back in temporarily. |
232b67d9 | 10553 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 10554 | |
34a86c2b NN |
10555 | # -------- |
10556 | # UNSORTED | |
10557 | # -------- | |
10558 | ||
cc1e60ea | 10559 | # Compile in configure arguments. |
8105825d | 10560 | if test -f configargs.h ; then |
cc1e60ea | 10561 | # Being re-configured. |
022dae81 | 10562 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
10563 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
10564 | else | |
10565 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
10566 | fi | |
eeae7b41 DJ |
10567 | |
10568 | # Double all backslashes and backslash all quotes to turn | |
10569 | # gcc_config_arguments into a C string. | |
10570 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
10571 | $gcc_config_arguments | |
10572 | EOF | |
10573 | gcc_config_arguments_str=`cat conftest.out` | |
10574 | rm -f conftest.out | |
10575 | ||
cc1e60ea JM |
10576 | cat > configargs.h <<EOF |
10577 | /* Generated automatically. */ | |
eeae7b41 | 10578 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 10579 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
10580 | |
10581 | static const struct { | |
10582 | const char *name, *value; | |
10583 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
10584 | EOF |
10585 | ||
40540e68 RAE |
10586 | gcc_BASEVER=`cat $srcdir/BASE-VER` |
10587 | gcc_DEVPHASE=`cat $srcdir/DEV-PHASE` | |
10588 | gcc_DATESTAMP=`cat $srcdir/DATESTAMP` | |
0c463e16 | 10589 | if test -f $srcdir/REVISION ; then |
40540e68 | 10590 | gcc_REVISION=`cat $srcdir/REVISION` |
0c463e16 RAE |
10591 | else |
10592 | gcc_REVISION="" | |
10593 | fi | |
10594 | cat > plugin-version.h <<EOF | |
10595 | #include "configargs.h" | |
10596 | ||
10597 | static char basever[] = "$gcc_BASEVER"; | |
10598 | static char datestamp[] = "$gcc_DATESTAMP"; | |
10599 | static char devphase[] = "$gcc_DEVPHASE"; | |
10600 | static char revision[] = "$gcc_REVISION"; | |
10601 | ||
10602 | /* FIXME plugins: We should make the version information more precise. | |
10603 | One way to do is to add a checksum. */ | |
10604 | ||
10605 | static struct plugin_gcc_version gcc_version = {basever, datestamp, | |
10606 | devphase, revision, | |
10607 | configuration_arguments}; | |
10608 | EOF | |
10609 | ||
ab87f8c8 | 10610 | # Internationalization |
18fc9bd4 RG |
10611 | # If we haven't got the data from the intl directory, |
10612 | # assume NLS is disabled. | |
10613 | USE_NLS=no | |
10614 | LIBINTL= | |
10615 | LIBINTL_DEP= | |
10616 | INCINTL= | |
10617 | XGETTEXT= | |
10618 | GMSGFMT= | |
10619 | POSUB= | |
10620 | ||
10621 | if test -f ../intl/config.intl; then | |
10622 | . ../intl/config.intl | |
10623 | fi | |
5213506e RW |
10624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
10625 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
18fc9bd4 | 10626 | if test x"$USE_NLS" != xyes; then |
5213506e RW |
10627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10628 | $as_echo "no" >&6; } | |
18fc9bd4 | 10629 | else |
5213506e RW |
10630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
10631 | $as_echo "yes" >&6; } | |
18fc9bd4 | 10632 | |
5213506e | 10633 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
18fc9bd4 RG |
10634 | |
10635 | ||
5213506e RW |
10636 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
10637 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
18fc9bd4 RG |
10638 | # Look for .po and .gmo files in the source directory. |
10639 | CATALOGS= | |
10640 | XLINGUAS= | |
10641 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
10642 | # If there aren't any .gmo files the shell will give us the | |
10643 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
10644 | # weeded out. | |
10645 | case "$cat" in *\**) | |
10646 | continue;; | |
10647 | esac | |
10648 | # The quadruple backslash is collapsed to a double backslash | |
10649 | # by the backticks, then collapsed again by the double quotes, | |
10650 | # leaving us with one backslash in the sed expression (right | |
10651 | # before the dot that mustn't act as a wildcard). | |
10652 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
10653 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
10654 | # The user is allowed to set LINGUAS to a list of languages to | |
10655 | # install catalogs for. If it's empty that means "all of them." | |
10656 | if test "x$LINGUAS" = x; then | |
10657 | CATALOGS="$CATALOGS $cat" | |
10658 | XLINGUAS="$XLINGUAS $lang" | |
10659 | else | |
10660 | case "$LINGUAS" in *$lang*) | |
10661 | CATALOGS="$CATALOGS $cat" | |
10662 | XLINGUAS="$XLINGUAS $lang" | |
10663 | ;; | |
10664 | esac | |
10665 | fi | |
10666 | done | |
10667 | LINGUAS="$XLINGUAS" | |
5213506e RW |
10668 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
10669 | $as_echo "$LINGUAS" >&6; } | |
18fc9bd4 RG |
10670 | |
10671 | ||
10672 | DATADIRNAME=share | |
10673 | ||
10674 | INSTOBJEXT=.mo | |
10675 | ||
10676 | GENCAT=gencat | |
10677 | ||
10678 | CATOBJEXT=.gmo | |
10679 | ||
10680 | fi | |
861bb6c1 | 10681 | |
56694dd9 ZW |
10682 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
10683 | # -liconv on the link line twice. | |
10684 | case "$LIBINTL" in *$LIBICONV*) | |
10685 | LIBICONV= ;; | |
10686 | esac | |
dc6746e7 | 10687 | |
5213506e RW |
10688 | # Check whether --enable-secureplt was given. |
10689 | if test "${enable_secureplt+set}" = set; then : | |
10690 | enableval=$enable_secureplt; | |
10691 | fi | |
7f970b70 | 10692 | |
922e3e33 | 10693 | |
ad211091 KT |
10694 | # Check whether --enable-leading-mingw64-underscores was given. |
10695 | if test "${enable_leading_mingw64_underscores+set}" = set; then : | |
10696 | enableval=$enable_leading_mingw64_underscores; | |
10697 | fi | |
10698 | ||
10699 | if test x"$enable_leading_mingw64_underscores" = xyes ; then : | |
10700 | ||
10701 | $as_echo "#define USE_MINGW64_LEADING_UNDERSCORES 1" >>confdefs.h | |
10702 | ||
10703 | fi | |
10704 | ||
5213506e RW |
10705 | # Check whether --enable-cld was given. |
10706 | if test "${enable_cld+set}" = set; then : | |
10707 | enableval=$enable_cld; | |
922e3e33 UB |
10708 | else |
10709 | enable_cld=no | |
5213506e RW |
10710 | fi |
10711 | ||
922e3e33 | 10712 | |
d79389af L |
10713 | # Check whether --enable-frame-pointer was given. |
10714 | if test "${enable_frame_pointer+set}" = set; then : | |
10715 | enableval=$enable_frame_pointer; | |
10716 | else | |
10717 | ||
10718 | case $target_os in | |
10719 | linux*) | |
10720 | # Enable -fomit-frame-pointer by default for Linux. | |
10721 | enable_frame_pointer=no | |
10722 | ;; | |
10723 | *) | |
10724 | enable_frame_pointer=yes | |
10725 | ;; | |
10726 | esac | |
10727 | ||
10728 | fi | |
10729 | ||
10730 | ||
56694dd9 | 10731 | # Windows32 Registry support for specifying GCC installation paths. |
5213506e RW |
10732 | # Check whether --enable-win32-registry was given. |
10733 | if test "${enable_win32_registry+set}" = set; then : | |
10734 | enableval=$enable_win32_registry; | |
10735 | fi | |
dc6746e7 | 10736 | |
ba479fd2 | 10737 | |
a1286ef5 ZW |
10738 | case $host_os in |
10739 | win32 | pe | cygwin* | mingw32* | uwin*) | |
10740 | if test "x$enable_win32_registry" != xno; then | |
5213506e RW |
10741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RegOpenKeyExA" >&5 |
10742 | $as_echo_n "checking for library containing RegOpenKeyExA... " >&6; } | |
10743 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then : | |
10744 | $as_echo_n "(cached) " >&6 | |
ba479fd2 NN |
10745 | else |
10746 | ac_func_search_save_LIBS=$LIBS | |
5213506e | 10747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ba479fd2 | 10748 | /* end confdefs.h. */ |
861bb6c1 | 10749 | |
5213506e RW |
10750 | /* Override any GCC internal prototype to avoid an error. |
10751 | Use char because int might match the return type of a GCC | |
10752 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
10753 | #ifdef __cplusplus |
10754 | extern "C" | |
10755 | #endif | |
ba479fd2 NN |
10756 | char RegOpenKeyExA (); |
10757 | int | |
10758 | main () | |
10759 | { | |
5213506e | 10760 | return RegOpenKeyExA (); |
ba479fd2 NN |
10761 | ; |
10762 | return 0; | |
10763 | } | |
10764 | _ACEOF | |
5213506e RW |
10765 | for ac_lib in '' advapi32; do |
10766 | if test -z "$ac_lib"; then | |
10767 | ac_res="none required" | |
10768 | else | |
10769 | ac_res=-l$ac_lib | |
b61ff9c8 | 10770 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
5213506e RW |
10771 | fi |
10772 | if ac_fn_c_try_link "$LINENO"; then : | |
10773 | ac_cv_search_RegOpenKeyExA=$ac_res | |
10774 | fi | |
10775 | rm -f core conftest.err conftest.$ac_objext \ | |
10776 | conftest$ac_exeext | |
10777 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then : | |
10778 | break | |
10779 | fi | |
10780 | done | |
10781 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then : | |
2f41c1d6 | 10782 | |
1a4b763e | 10783 | else |
5213506e | 10784 | ac_cv_search_RegOpenKeyExA=no |
dd7f7a6e | 10785 | fi |
5213506e | 10786 | rm conftest.$ac_ext |
dd7f7a6e EC |
10787 | LIBS=$ac_func_search_save_LIBS |
10788 | fi | |
5213506e RW |
10789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RegOpenKeyExA" >&5 |
10790 | $as_echo "$ac_cv_search_RegOpenKeyExA" >&6; } | |
10791 | ac_res=$ac_cv_search_RegOpenKeyExA | |
10792 | if test "$ac_res" != no; then : | |
10793 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
10794 | |
10795 | else | |
10796 | enable_win32_registry=no | |
10797 | fi | |
10798 | ||
10799 | fi | |
10800 | ||
10801 | if test "x$enable_win32_registry" != xno; then | |
10802 | ||
5213506e | 10803 | $as_echo "#define ENABLE_WIN32_REGISTRY 1" >>confdefs.h |
dd7f7a6e EC |
10804 | |
10805 | ||
10806 | if test "x$enable_win32_registry" != xyes \ | |
10807 | && test "x$enable_win32_registry" != x; then | |
10808 | ||
10809 | cat >>confdefs.h <<_ACEOF | |
10810 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" | |
10811 | _ACEOF | |
10812 | ||
10813 | fi | |
10814 | fi | |
10815 | ;; | |
10816 | esac | |
ab87f8c8 | 10817 | |
56694dd9 ZW |
10818 | # Get an absolute path to the GCC top-level source directory |
10819 | holddir=`${PWDCMD-pwd}` | |
10820 | cd $srcdir | |
10821 | topdir=`${PWDCMD-pwd}` | |
10822 | cd $holddir | |
ab87f8c8 | 10823 | |
56694dd9 | 10824 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 10825 | xmake_file= |
c406e779 | 10826 | for f in ${host_xmake_file} |
56694dd9 ZW |
10827 | do |
10828 | if test -f ${srcdir}/config/$f | |
10829 | then | |
2ed26f6b | 10830 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
10831 | fi |
10832 | done | |
093e61a6 | 10833 | |
56694dd9 | 10834 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 10835 | tmake_file_= |
c406e779 | 10836 | for f in ${tmake_file} |
56694dd9 ZW |
10837 | do |
10838 | if test -f ${srcdir}/config/$f | |
10839 | then | |
2ed26f6b | 10840 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
10841 | fi |
10842 | done | |
2ed26f6b | 10843 | tmake_file="${tmake_file_}" |
71a94577 | 10844 | |
ab87f8c8 JL |
10845 | out_object_file=`basename $out_file .c`.o |
10846 | ||
75685792 | 10847 | tm_file_list="options.h" |
c513ce77 | 10848 | tm_include_list="options.h insn-constants.h" |
ab87f8c8 | 10849 | for f in $tm_file; do |
64ccbc99 | 10850 | case $f in |
3ca43df7 RS |
10851 | ./* ) |
10852 | f=`echo $f | sed 's/^..//'` | |
10853 | tm_file_list="${tm_file_list} $f" | |
10854 | tm_include_list="${tm_include_list} $f" | |
10855 | ;; | |
d02af173 | 10856 | defaults.h ) |
e22340b0 ZW |
10857 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
10858 | tm_include_list="${tm_include_list} $f" | |
10859 | ;; | |
10860 | * ) | |
10861 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
10862 | tm_include_list="${tm_include_list} config/$f" | |
10863 | ;; | |
64ccbc99 | 10864 | esac |
ab87f8c8 JL |
10865 | done |
10866 | ||
11642c3a | 10867 | tm_p_file_list= |
e22340b0 | 10868 | tm_p_include_list= |
11642c3a | 10869 | for f in $tm_p_file; do |
4977bab6 ZW |
10870 | case $f in |
10871 | tm-preds.h ) | |
e22340b0 ZW |
10872 | tm_p_file_list="${tm_p_file_list} $f" |
10873 | tm_p_include_list="${tm_p_include_list} $f" | |
10874 | ;; | |
10875 | * ) | |
10876 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
10877 | tm_p_include_list="${tm_p_include_list} config/$f" | |
10878 | esac | |
10879 | done | |
10880 | ||
10881 | xm_file_list= | |
10882 | xm_include_list= | |
10883 | for f in $xm_file; do | |
10884 | case $f in | |
10885 | ansidecl.h ) | |
10886 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
10887 | xm_include_list="${xm_include_list} $f" | |
10888 | ;; | |
10889 | auto-host.h ) | |
10890 | xm_file_list="${xm_file_list} $f" | |
10891 | xm_include_list="${xm_include_list} $f" | |
10892 | ;; | |
10893 | * ) | |
10894 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
10895 | xm_include_list="${xm_include_list} config/$f" | |
10896 | ;; | |
4977bab6 | 10897 | esac |
11642c3a ZW |
10898 | done |
10899 | ||
ab87f8c8 | 10900 | host_xm_file_list= |
e22340b0 | 10901 | host_xm_include_list= |
ab87f8c8 | 10902 | for f in $host_xm_file; do |
64ccbc99 | 10903 | case $f in |
d02af173 | 10904 | ansidecl.h ) |
e22340b0 ZW |
10905 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
10906 | host_xm_include_list="${host_xm_include_list} $f" | |
10907 | ;; | |
e2500fed | 10908 | auto-host.h ) |
e22340b0 ZW |
10909 | host_xm_file_list="${host_xm_file_list} $f" |
10910 | host_xm_include_list="${host_xm_include_list} $f" | |
10911 | ;; | |
10912 | * ) | |
10913 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
10914 | host_xm_include_list="${host_xm_include_list} config/$f" | |
10915 | ;; | |
64ccbc99 | 10916 | esac |
ab87f8c8 JL |
10917 | done |
10918 | ||
10919 | build_xm_file_list= | |
10920 | for f in $build_xm_file; do | |
64ccbc99 | 10921 | case $f in |
d02af173 | 10922 | ansidecl.h ) |
e22340b0 ZW |
10923 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
10924 | build_xm_include_list="${build_xm_include_list} $f" | |
10925 | ;; | |
e2500fed | 10926 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
10927 | build_xm_file_list="${build_xm_file_list} $f" |
10928 | build_xm_include_list="${build_xm_include_list} $f" | |
10929 | ;; | |
10930 | * ) | |
10931 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
10932 | build_xm_include_list="${build_xm_include_list} config/$f" | |
10933 | ;; | |
64ccbc99 | 10934 | esac |
ab87f8c8 JL |
10935 | done |
10936 | ||
2989d30c GK |
10937 | # Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a |
10938 | # cross-compiler which does not use the native headers and libraries. | |
a078a589 | 10939 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. |
ba479fd2 NN |
10940 | CROSS= |
10941 | ALL=all.internal | |
10942 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
10943 | |
10944 | if test "x$with_build_sysroot" != x; then | |
14da6073 | 10945 | build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' |
b28250ab MM |
10946 | else |
10947 | # This value is used, even on a native system, because | |
10948 | # CROSS_SYSTEM_HEADER_DIR is just | |
10949 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
10950 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
10951 | fi | |
10952 | ||
ab87f8c8 JL |
10953 | if test x$host != x$target |
10954 | then | |
2989d30c | 10955 | CROSS="-DCROSS_DIRECTORY_STRUCTURE" |
a078a589 | 10956 | ALL=all.cross |
160633c6 | 10957 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 10958 | case "$host","$target" in |
3a7e8b87 GK |
10959 | # Darwin crosses can use the host system's libraries and headers, |
10960 | # because of the fat library support. Of course, it must be the | |
10961 | # same version of Darwin on both sides. Allow the user to | |
10962 | # just say --target=foo-darwin without a version number to mean | |
10963 | # "the version on this system". | |
10964 | *-*-darwin*,*-*-darwin*) | |
10965 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
10966 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
10967 | if test $hostos = $targetos -o $targetos = darwin ; then | |
10968 | CROSS= | |
10969 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
10970 | with_headers=yes | |
10971 | fi | |
10972 | ;; | |
10973 | ||
343f59d9 AM |
10974 | i?86-*-*,x86_64-*-* \ |
10975 | | powerpc*-*-*,powerpc64*-*-*) | |
10976 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
10977 | esac | |
7a615b25 | 10978 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 10979 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
10980 | fi |
10981 | ||
b39d221a EC |
10982 | # If this is a cross-compiler that does not |
10983 | # have its own set of headers then define | |
10984 | # inhibit_libc | |
10985 | ||
dc06db20 R |
10986 | # If this is using newlib, without having the headers available now, |
10987 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
10988 | # This prevents libgcc2 from containing any code which requires libc |
10989 | # support. | |
a929bc28 | 10990 | : ${inhibit_libc=false} |
dc06db20 R |
10991 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
10992 | test x$with_newlib = xyes ; } && | |
e50084fa | 10993 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 10994 | inhibit_libc=true |
b39d221a EC |
10995 | fi |
10996 | ||
10997 | ||
a078a589 ZW |
10998 | # When building gcc with a cross-compiler, we need to adjust things so |
10999 | # that the generator programs are still built with the native compiler. | |
52c0e446 | 11000 | # Also, we cannot run fixincludes. |
a078a589 ZW |
11001 | |
11002 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
11003 | CC_FOR_BUILD='$(CC)' |
11004 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
f8c33439 | 11005 | BUILD_LDFLAGS='$(LDFLAGS)' |
ba479fd2 | 11006 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 | 11007 | |
83599948 NS |
11008 | # And these apply if build != host, or we are generating coverage data |
11009 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 11010 | then |
b11e4747 | 11011 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
f8c33439 | 11012 | BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' |
ab87f8c8 JL |
11013 | fi |
11014 | ||
11015 | # Expand extra_headers to include complete path. | |
11016 | # This substitutes for lots of t-* files. | |
11017 | extra_headers_list= | |
b1ef58c8 NN |
11018 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
11019 | for file in ${extra_headers} ; do | |
11020 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
11021 | done | |
ab87f8c8 | 11022 | |
1617e5ee GK |
11023 | # If use_gcc_tgmath is set, append ginclude/tgmath.h. |
11024 | if test x"$use_gcc_tgmath" = xyes | |
11025 | then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h" | |
11026 | fi | |
11027 | ||
c38f02df ILT |
11028 | # Define collect2 in Makefile. |
11029 | case $host_can_use_collect2 in | |
11030 | no) collect2= ;; | |
11031 | *) collect2='collect2$(exeext)' ;; | |
11032 | esac | |
11033 | ||
11034 | ||
ab87f8c8 | 11035 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
11036 | case $use_collect2 in |
11037 | no) use_collect2= ;; | |
11038 | "") ;; | |
ba479fd2 | 11039 | *) |
34a86c2b NN |
11040 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
11041 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
11042 | case $host_can_use_collect2 in |
11043 | no) | |
5213506e | 11044 | as_fn_error "collect2 is required but cannot be built on this system" "$LINENO" 5 |
c38f02df ILT |
11045 | ;; |
11046 | esac | |
34a86c2b NN |
11047 | ;; |
11048 | esac | |
ab87f8c8 | 11049 | |
8bb915b6 NN |
11050 | # --------------------------- |
11051 | # Assembler & linker features | |
11052 | # --------------------------- | |
11053 | ||
da0f6381 PB |
11054 | # During stage 2, ld is actually gcc/collect-ld, which is a small script to |
11055 | # discern between when to use prev-ld/ld-new and when to use ld/ld-new. | |
11056 | # However when ld-new is first executed from the build tree, libtool will | |
11057 | # relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers | |
11058 | # to the build tree. While doing this we need to use the previous-stage | |
11059 | # linker, or we have an infinite loop. The presence of a shell script as | |
11060 | # ld/ld-new, and the fact that the script *uses ld itself*, is what confuses | |
11061 | # the gcc/collect-ld script. So we need to know how libtool works, or | |
11062 | # exec-tool will fail. | |
e8b05380 | 11063 | |
da0f6381 | 11064 | |
5d47bb02 PG |
11065 | case `pwd` in |
11066 | *\ * | *\ *) | |
5213506e RW |
11067 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 |
11068 | $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; | |
5d47bb02 | 11069 | esac |
da0f6381 PB |
11070 | |
11071 | ||
da0f6381 | 11072 | |
43e02a8a RW |
11073 | macro_version='2.2.7a' |
11074 | macro_revision='1.3134' | |
da0f6381 PB |
11075 | |
11076 | ||
11077 | ||
11078 | ||
11079 | ||
11080 | ||
da0f6381 PB |
11081 | |
11082 | ||
11083 | ||
11084 | ||
11085 | ||
11086 | ||
11087 | ||
5d47bb02 | 11088 | ltmain="$ac_aux_dir/ltmain.sh" |
da0f6381 | 11089 | |
43e02a8a RW |
11090 | # Backslashify metacharacters that are still active within |
11091 | # double-quoted strings. | |
11092 | sed_quote_subst='s/\(["`$\\]\)/\\\1/g' | |
11093 | ||
11094 | # Same as above, but do not quote variable references. | |
11095 | double_quote_subst='s/\(["`\\]\)/\\\1/g' | |
11096 | ||
11097 | # Sed substitution to delay expansion of an escaped shell variable in a | |
11098 | # double_quote_subst'ed string. | |
11099 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
11100 | ||
11101 | # Sed substitution to delay expansion of an escaped single quote. | |
11102 | delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' | |
11103 | ||
11104 | # Sed substitution to avoid accidental globbing in evaled expressions | |
11105 | no_glob_subst='s/\*/\\\*/g' | |
11106 | ||
11107 | ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
11108 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | |
11109 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | |
11110 | ||
11111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | |
11112 | $as_echo_n "checking how to print strings... " >&6; } | |
11113 | # Test print first, because it will be a builtin if present. | |
11114 | if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | |
11115 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | |
11116 | ECHO='print -r --' | |
11117 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | |
11118 | ECHO='printf %s\n' | |
11119 | else | |
11120 | # Use this function as a fallback that always works. | |
11121 | func_fallback_echo () | |
11122 | { | |
11123 | eval 'cat <<_LTECHO_EOF | |
11124 | $1 | |
11125 | _LTECHO_EOF' | |
11126 | } | |
11127 | ECHO='func_fallback_echo' | |
11128 | fi | |
11129 | ||
11130 | # func_echo_all arg... | |
11131 | # Invoke $ECHO with all args, space-separated. | |
11132 | func_echo_all () | |
11133 | { | |
11134 | $ECHO "" | |
11135 | } | |
11136 | ||
11137 | case "$ECHO" in | |
11138 | printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 | |
11139 | $as_echo "printf" >&6; } ;; | |
11140 | print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 | |
11141 | $as_echo "print -r" >&6; } ;; | |
11142 | *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 | |
11143 | $as_echo "cat" >&6; } ;; | |
11144 | esac | |
11145 | ||
11146 | ||
11147 | ||
11148 | ||
11149 | ||
11150 | ||
11151 | ||
11152 | ||
11153 | ||
11154 | ||
11155 | ||
11156 | ||
11157 | ||
11158 | ||
5213506e RW |
11159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
11160 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
11161 | if test "${ac_cv_path_SED+set}" = set; then : | |
11162 | $as_echo_n "(cached) " >&6 | |
11163 | else | |
11164 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
11165 | for ac_i in 1 2 3 4 5 6 7; do | |
11166 | ac_script="$ac_script$as_nl$ac_script" | |
11167 | done | |
11168 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
11169 | { ac_script=; unset ac_script;} | |
11170 | if test -z "$SED"; then | |
11171 | ac_path_SED_found=false | |
11172 | # Loop through the user's path and test for each of PROGNAME-LIST | |
11173 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 PB |
11174 | for as_dir in $PATH |
11175 | do | |
11176 | IFS=$as_save_IFS | |
11177 | test -z "$as_dir" && as_dir=. | |
5213506e | 11178 | for ac_prog in sed gsed; do |
da0f6381 | 11179 | for ac_exec_ext in '' $ac_executable_extensions; do |
5213506e RW |
11180 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" |
11181 | { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue | |
11182 | # Check for GNU ac_path_SED and select it if it is found. | |
11183 | # Check for GNU $ac_path_SED | |
11184 | case `"$ac_path_SED" --version 2>&1` in | |
11185 | *GNU*) | |
11186 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
11187 | *) | |
11188 | ac_count=0 | |
11189 | $as_echo_n 0123456789 >"conftest.in" | |
11190 | while : | |
11191 | do | |
11192 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
11193 | mv "conftest.tmp" "conftest.in" | |
11194 | cp "conftest.in" "conftest.nl" | |
11195 | $as_echo '' >> "conftest.nl" | |
11196 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
11197 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
11198 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
11199 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
11200 | # Best one so far, save it but keep looking for a better one | |
11201 | ac_cv_path_SED="$ac_path_SED" | |
11202 | ac_path_SED_max=$ac_count | |
11203 | fi | |
11204 | # 10*(2^10) chars as input seems more than enough | |
11205 | test $ac_count -gt 10 && break | |
11206 | done | |
11207 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
11208 | esac | |
11209 | ||
11210 | $ac_path_SED_found && break 3 | |
da0f6381 PB |
11211 | done |
11212 | done | |
5213506e | 11213 | done |
da0f6381 | 11214 | IFS=$as_save_IFS |
5213506e RW |
11215 | if test -z "$ac_cv_path_SED"; then |
11216 | as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
da0f6381 | 11217 | fi |
5213506e RW |
11218 | else |
11219 | ac_cv_path_SED=$SED | |
e8b05380 | 11220 | fi |
b61ff9c8 | 11221 | |
5213506e RW |
11222 | fi |
11223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
11224 | $as_echo "$ac_cv_path_SED" >&6; } | |
11225 | SED="$ac_cv_path_SED" | |
11226 | rm -f conftest.sed | |
e8b05380 | 11227 | |
da0f6381 PB |
11228 | test -z "$SED" && SED=sed |
11229 | Xsed="$SED -e 1s/^X//" | |
e8b05380 | 11230 | |
e8b05380 PB |
11231 | |
11232 | ||
ad9c4d9f | 11233 | |
da0f6381 PB |
11234 | |
11235 | ||
11236 | ||
11237 | ||
11238 | ||
11239 | ||
11240 | ||
5213506e RW |
11241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 |
11242 | $as_echo_n "checking for fgrep... " >&6; } | |
11243 | if test "${ac_cv_path_FGREP+set}" = set; then : | |
11244 | $as_echo_n "(cached) " >&6 | |
11245 | else | |
11246 | if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 | |
11247 | then ac_cv_path_FGREP="$GREP -F" | |
11248 | else | |
11249 | if test -z "$FGREP"; then | |
11250 | ac_path_FGREP_found=false | |
11251 | # Loop through the user's path and test for each of PROGNAME-LIST | |
11252 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11253 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
11254 | do | |
11255 | IFS=$as_save_IFS | |
11256 | test -z "$as_dir" && as_dir=. | |
11257 | for ac_prog in fgrep; do | |
11258 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11259 | ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" | |
11260 | { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue | |
11261 | # Check for GNU ac_path_FGREP and select it if it is found. | |
11262 | # Check for GNU $ac_path_FGREP | |
11263 | case `"$ac_path_FGREP" --version 2>&1` in | |
11264 | *GNU*) | |
11265 | ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; | |
11266 | *) | |
11267 | ac_count=0 | |
11268 | $as_echo_n 0123456789 >"conftest.in" | |
11269 | while : | |
11270 | do | |
11271 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
11272 | mv "conftest.tmp" "conftest.in" | |
11273 | cp "conftest.in" "conftest.nl" | |
11274 | $as_echo 'FGREP' >> "conftest.nl" | |
11275 | "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
11276 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
11277 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
11278 | if test $ac_count -gt ${ac_path_FGREP_max-0}; then | |
11279 | # Best one so far, save it but keep looking for a better one | |
11280 | ac_cv_path_FGREP="$ac_path_FGREP" | |
11281 | ac_path_FGREP_max=$ac_count | |
11282 | fi | |
11283 | # 10*(2^10) chars as input seems more than enough | |
11284 | test $ac_count -gt 10 && break | |
11285 | done | |
11286 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
11287 | esac | |
11288 | ||
11289 | $ac_path_FGREP_found && break 3 | |
11290 | done | |
11291 | done | |
11292 | done | |
11293 | IFS=$as_save_IFS | |
11294 | if test -z "$ac_cv_path_FGREP"; then | |
11295 | as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
11296 | fi | |
e8b05380 | 11297 | else |
5213506e RW |
11298 | ac_cv_path_FGREP=$FGREP |
11299 | fi | |
11300 | ||
11301 | fi | |
981d4858 | 11302 | fi |
5213506e RW |
11303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 |
11304 | $as_echo "$ac_cv_path_FGREP" >&6; } | |
11305 | FGREP="$ac_cv_path_FGREP" | |
9e423e6d | 11306 | |
9f18db39 | 11307 | |
da0f6381 | 11308 | test -z "$GREP" && GREP=grep |
9f18db39 | 11309 | |
da0f6381 PB |
11310 | |
11311 | ||
11312 | ||
11313 | ||
11314 | ||
11315 | ||
11316 | ||
11317 | ||
11318 | ||
11319 | ||
11320 | ||
11321 | ||
11322 | ||
11323 | ||
11324 | ||
11325 | ||
11326 | ||
11327 | ||
5213506e RW |
11328 | # Check whether --with-gnu-ld was given. |
11329 | if test "${with_gnu_ld+set}" = set; then : | |
11330 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
da0f6381 PB |
11331 | else |
11332 | with_gnu_ld=no | |
5213506e RW |
11333 | fi |
11334 | ||
da0f6381 PB |
11335 | ac_prog=ld |
11336 | if test "$GCC" = yes; then | |
11337 | # Check if gcc -print-prog-name=ld gives a path. | |
5213506e RW |
11338 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 |
11339 | $as_echo_n "checking for ld used by $CC... " >&6; } | |
da0f6381 PB |
11340 | case $host in |
11341 | *-*-mingw*) | |
11342 | # gcc leaves a trailing carriage return which upsets mingw | |
11343 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
11344 | *) | |
11345 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
11346 | esac | |
11347 | case $ac_prog in | |
11348 | # Accept absolute paths. | |
11349 | [\\/]* | ?:[\\/]*) | |
11350 | re_direlt='/[^/][^/]*/\.\./' | |
11351 | # Canonicalize the pathname of ld | |
11352 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | |
11353 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | |
11354 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | |
11355 | done | |
11356 | test -z "$LD" && LD="$ac_prog" | |
11357 | ;; | |
11358 | "") | |
11359 | # If it fails, then pretend we aren't using GCC. | |
11360 | ac_prog=ld | |
11361 | ;; | |
11362 | *) | |
11363 | # If it is relative, then search for the first ld in PATH. | |
11364 | with_gnu_ld=unknown | |
11365 | ;; | |
11366 | esac | |
11367 | elif test "$with_gnu_ld" = yes; then | |
5213506e RW |
11368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
11369 | $as_echo_n "checking for GNU ld... " >&6; } | |
da0f6381 | 11370 | else |
5213506e RW |
11371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
11372 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
da0f6381 | 11373 | fi |
5213506e RW |
11374 | if test "${lt_cv_path_LD+set}" = set; then : |
11375 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11376 | else |
11377 | if test -z "$LD"; then | |
11378 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
11379 | for ac_dir in $PATH; do | |
11380 | IFS="$lt_save_ifs" | |
11381 | test -z "$ac_dir" && ac_dir=. | |
11382 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
11383 | lt_cv_path_LD="$ac_dir/$ac_prog" | |
11384 | # Check to see if the program is GNU ld. I'd rather use --version, | |
11385 | # but apparently some variants of GNU ld only accept -v. | |
11386 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
11387 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | |
11388 | *GNU* | *'with BFD'*) | |
11389 | test "$with_gnu_ld" != no && break | |
11390 | ;; | |
11391 | *) | |
11392 | test "$with_gnu_ld" != yes && break | |
11393 | ;; | |
11394 | esac | |
11395 | fi | |
11396 | done | |
11397 | IFS="$lt_save_ifs" | |
11398 | else | |
11399 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
11400 | fi | |
11401 | fi | |
11402 | ||
11403 | LD="$lt_cv_path_LD" | |
11404 | if test -n "$LD"; then | |
5213506e RW |
11405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
11406 | $as_echo "$LD" >&6; } | |
da0f6381 | 11407 | else |
5213506e RW |
11408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11409 | $as_echo "no" >&6; } | |
da0f6381 | 11410 | fi |
5213506e RW |
11411 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
11412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
11413 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
11414 | if test "${lt_cv_prog_gnu_ld+set}" = set; then : | |
11415 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11416 | else |
11417 | # I'd rather use --version here, but apparently some GNU lds only accept -v. | |
11418 | case `$LD -v 2>&1 </dev/null` in | |
11419 | *GNU* | *'with BFD'*) | |
11420 | lt_cv_prog_gnu_ld=yes | |
11421 | ;; | |
11422 | *) | |
11423 | lt_cv_prog_gnu_ld=no | |
11424 | ;; | |
11425 | esac | |
11426 | fi | |
5213506e RW |
11427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 |
11428 | $as_echo "$lt_cv_prog_gnu_ld" >&6; } | |
da0f6381 PB |
11429 | with_gnu_ld=$lt_cv_prog_gnu_ld |
11430 | ||
11431 | ||
11432 | ||
11433 | ||
11434 | ||
11435 | ||
11436 | ||
11437 | ||
11438 | ||
5213506e RW |
11439 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 |
11440 | $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } | |
11441 | if test "${lt_cv_path_NM+set}" = set; then : | |
11442 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11443 | else |
11444 | if test -n "$NM"; then | |
11445 | # Let the user override the test. | |
11446 | lt_cv_path_NM="$NM" | |
11447 | else | |
11448 | lt_nm_to_check="${ac_tool_prefix}nm" | |
11449 | if test -n "$ac_tool_prefix" && test "$build" = "$host"; then | |
11450 | lt_nm_to_check="$lt_nm_to_check nm" | |
11451 | fi | |
11452 | for lt_tmp_nm in $lt_nm_to_check; do | |
11453 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
11454 | for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do | |
11455 | IFS="$lt_save_ifs" | |
11456 | test -z "$ac_dir" && ac_dir=. | |
11457 | tmp_nm="$ac_dir/$lt_tmp_nm" | |
11458 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | |
11459 | # Check to see if the nm accepts a BSD-compat flag. | |
11460 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
11461 | # nm: unknown option "B" ignored | |
11462 | # Tru64's nm complains that /dev/null is an invalid object file | |
11463 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | |
11464 | */dev/null* | *'Invalid file or object type'*) | |
11465 | lt_cv_path_NM="$tmp_nm -B" | |
11466 | break | |
11467 | ;; | |
11468 | *) | |
11469 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
11470 | */dev/null*) | |
11471 | lt_cv_path_NM="$tmp_nm -p" | |
11472 | break | |
11473 | ;; | |
11474 | *) | |
11475 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | |
11476 | continue # so that we can try to find one that supports BSD flags | |
11477 | ;; | |
11478 | esac | |
11479 | ;; | |
11480 | esac | |
11481 | fi | |
11482 | done | |
11483 | IFS="$lt_save_ifs" | |
11484 | done | |
11485 | : ${lt_cv_path_NM=no} | |
11486 | fi | |
11487 | fi | |
5213506e RW |
11488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 |
11489 | $as_echo "$lt_cv_path_NM" >&6; } | |
da0f6381 PB |
11490 | if test "$lt_cv_path_NM" != "no"; then |
11491 | NM="$lt_cv_path_NM" | |
11492 | else | |
11493 | # Didn't find any BSD compatible name lister, look for dumpbin. | |
43e02a8a RW |
11494 | if test -n "$DUMPBIN"; then : |
11495 | # Let the user override the test. | |
11496 | else | |
11497 | if test -n "$ac_tool_prefix"; then | |
11498 | for ac_prog in dumpbin "link -dump" | |
da0f6381 PB |
11499 | do |
11500 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
11501 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
5213506e RW |
11502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11503 | $as_echo_n "checking for $ac_word... " >&6; } | |
11504 | if test "${ac_cv_prog_DUMPBIN+set}" = set; then : | |
11505 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11506 | else |
11507 | if test -n "$DUMPBIN"; then | |
11508 | ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. | |
11509 | else | |
11510 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11511 | for as_dir in $PATH | |
11512 | do | |
11513 | IFS=$as_save_IFS | |
11514 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11515 | for ac_exec_ext in '' $ac_executable_extensions; do |
11516 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 11517 | ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" |
5213506e | 11518 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
11519 | break 2 |
11520 | fi | |
11521 | done | |
5213506e RW |
11522 | done |
11523 | IFS=$as_save_IFS | |
da0f6381 PB |
11524 | |
11525 | fi | |
11526 | fi | |
11527 | DUMPBIN=$ac_cv_prog_DUMPBIN | |
11528 | if test -n "$DUMPBIN"; then | |
5213506e RW |
11529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 |
11530 | $as_echo "$DUMPBIN" >&6; } | |
da0f6381 | 11531 | else |
5213506e RW |
11532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11533 | $as_echo "no" >&6; } | |
da0f6381 PB |
11534 | fi |
11535 | ||
5213506e | 11536 | |
da0f6381 PB |
11537 | test -n "$DUMPBIN" && break |
11538 | done | |
11539 | fi | |
11540 | if test -z "$DUMPBIN"; then | |
11541 | ac_ct_DUMPBIN=$DUMPBIN | |
43e02a8a | 11542 | for ac_prog in dumpbin "link -dump" |
da0f6381 PB |
11543 | do |
11544 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
11545 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
11546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11547 | $as_echo_n "checking for $ac_word... " >&6; } | |
11548 | if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : | |
11549 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11550 | else |
11551 | if test -n "$ac_ct_DUMPBIN"; then | |
11552 | ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. | |
11553 | else | |
11554 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11555 | for as_dir in $PATH | |
11556 | do | |
11557 | IFS=$as_save_IFS | |
11558 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11559 | for ac_exec_ext in '' $ac_executable_extensions; do |
11560 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 11561 | ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" |
5213506e | 11562 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
11563 | break 2 |
11564 | fi | |
11565 | done | |
5213506e RW |
11566 | done |
11567 | IFS=$as_save_IFS | |
da0f6381 PB |
11568 | |
11569 | fi | |
11570 | fi | |
11571 | ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN | |
11572 | if test -n "$ac_ct_DUMPBIN"; then | |
5213506e RW |
11573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 |
11574 | $as_echo "$ac_ct_DUMPBIN" >&6; } | |
da0f6381 | 11575 | else |
5213506e RW |
11576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11577 | $as_echo "no" >&6; } | |
da0f6381 PB |
11578 | fi |
11579 | ||
5213506e | 11580 | |
da0f6381 PB |
11581 | test -n "$ac_ct_DUMPBIN" && break |
11582 | done | |
da0f6381 | 11583 | |
5213506e RW |
11584 | if test "x$ac_ct_DUMPBIN" = x; then |
11585 | DUMPBIN=":" | |
11586 | else | |
11587 | case $cross_compiling:$ac_tool_warned in | |
11588 | yes:) | |
11589 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
11590 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
11591 | ac_tool_warned=yes ;; | |
11592 | esac | |
11593 | DUMPBIN=$ac_ct_DUMPBIN | |
11594 | fi | |
da0f6381 PB |
11595 | fi |
11596 | ||
43e02a8a RW |
11597 | case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in |
11598 | *COFF*) | |
11599 | DUMPBIN="$DUMPBIN -symbols" | |
11600 | ;; | |
11601 | *) | |
11602 | DUMPBIN=: | |
11603 | ;; | |
11604 | esac | |
11605 | fi | |
da0f6381 PB |
11606 | |
11607 | if test "$DUMPBIN" != ":"; then | |
11608 | NM="$DUMPBIN" | |
11609 | fi | |
11610 | fi | |
11611 | test -z "$NM" && NM=nm | |
11612 | ||
11613 | ||
11614 | ||
11615 | ||
11616 | ||
11617 | ||
5213506e RW |
11618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 |
11619 | $as_echo_n "checking the name lister ($NM) interface... " >&6; } | |
11620 | if test "${lt_cv_nm_interface+set}" = set; then : | |
11621 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11622 | else |
11623 | lt_cv_nm_interface="BSD nm" | |
11624 | echo "int some_variable = 0;" > conftest.$ac_ext | |
43e02a8a | 11625 | (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) |
da0f6381 PB |
11626 | (eval "$ac_compile" 2>conftest.err) |
11627 | cat conftest.err >&5 | |
43e02a8a | 11628 | (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) |
da0f6381 PB |
11629 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
11630 | cat conftest.err >&5 | |
43e02a8a | 11631 | (eval echo "\"\$as_me:$LINENO: output\"" >&5) |
da0f6381 PB |
11632 | cat conftest.out >&5 |
11633 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then | |
11634 | lt_cv_nm_interface="MS dumpbin" | |
11635 | fi | |
11636 | rm -f conftest* | |
11637 | fi | |
5213506e RW |
11638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 |
11639 | $as_echo "$lt_cv_nm_interface" >&6; } | |
da0f6381 | 11640 | |
5213506e RW |
11641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
11642 | $as_echo_n "checking whether ln -s works... " >&6; } | |
da0f6381 PB |
11643 | LN_S=$as_ln_s |
11644 | if test "$LN_S" = "ln -s"; then | |
5213506e RW |
11645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11646 | $as_echo "yes" >&6; } | |
da0f6381 | 11647 | else |
5213506e RW |
11648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
11649 | $as_echo "no, using $LN_S" >&6; } | |
da0f6381 PB |
11650 | fi |
11651 | ||
11652 | # find the maximum length of command line arguments | |
5213506e RW |
11653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 |
11654 | $as_echo_n "checking the maximum length of command line arguments... " >&6; } | |
11655 | if test "${lt_cv_sys_max_cmd_len+set}" = set; then : | |
11656 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11657 | else |
11658 | i=0 | |
11659 | teststring="ABCD" | |
11660 | ||
11661 | case $build_os in | |
11662 | msdosdjgpp*) | |
11663 | # On DJGPP, this test can blow up pretty badly due to problems in libc | |
11664 | # (any single argument exceeding 2000 bytes causes a buffer overrun | |
11665 | # during glob expansion). Even if it were fixed, the result of this | |
11666 | # check would be larger than it should be. | |
11667 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | |
11668 | ;; | |
11669 | ||
11670 | gnu*) | |
11671 | # Under GNU Hurd, this test is not required because there is | |
11672 | # no limit to the length of command line arguments. | |
11673 | # Libtool will interpret -1 as no limit whatsoever | |
11674 | lt_cv_sys_max_cmd_len=-1; | |
11675 | ;; | |
11676 | ||
5d47bb02 | 11677 | cygwin* | mingw* | cegcc*) |
da0f6381 PB |
11678 | # On Win9x/ME, this test blows up -- it succeeds, but takes |
11679 | # about 5 minutes as the teststring grows exponentially. | |
11680 | # Worse, since 9x/ME are not pre-emptively multitasking, | |
11681 | # you end up with a "frozen" computer, even though with patience | |
11682 | # the test eventually succeeds (with a max line length of 256k). | |
11683 | # Instead, let's just punt: use the minimum linelength reported by | |
11684 | # all of the supported platforms: 8192 (on NT/2K/XP). | |
11685 | lt_cv_sys_max_cmd_len=8192; | |
11686 | ;; | |
11687 | ||
43e02a8a RW |
11688 | mint*) |
11689 | # On MiNT this can take a long time and run out of memory. | |
11690 | lt_cv_sys_max_cmd_len=8192; | |
11691 | ;; | |
11692 | ||
da0f6381 PB |
11693 | amigaos*) |
11694 | # On AmigaOS with pdksh, this test takes hours, literally. | |
11695 | # So we just punt and use a minimum line length of 8192. | |
11696 | lt_cv_sys_max_cmd_len=8192; | |
11697 | ;; | |
11698 | ||
11699 | netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) | |
11700 | # This has been around since 386BSD, at least. Likely further. | |
11701 | if test -x /sbin/sysctl; then | |
11702 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` | |
11703 | elif test -x /usr/sbin/sysctl; then | |
11704 | lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` | |
11705 | else | |
11706 | lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs | |
11707 | fi | |
11708 | # And add a safety zone | |
11709 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
11710 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
11711 | ;; | |
11712 | ||
11713 | interix*) | |
11714 | # We know the value 262144 and hardcode it with a safety zone (like BSD) | |
11715 | lt_cv_sys_max_cmd_len=196608 | |
11716 | ;; | |
11717 | ||
11718 | osf*) | |
11719 | # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure | |
11720 | # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not | |
11721 | # nice to cause kernel panics so lets avoid the loop below. | |
11722 | # First set a reasonable default. | |
11723 | lt_cv_sys_max_cmd_len=16384 | |
11724 | # | |
11725 | if test -x /sbin/sysconfig; then | |
11726 | case `/sbin/sysconfig -q proc exec_disable_arg_limit` in | |
11727 | *1*) lt_cv_sys_max_cmd_len=-1 ;; | |
11728 | esac | |
11729 | fi | |
11730 | ;; | |
11731 | sco3.2v5*) | |
11732 | lt_cv_sys_max_cmd_len=102400 | |
11733 | ;; | |
11734 | sysv5* | sco5v6* | sysv4.2uw2*) | |
11735 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` | |
11736 | if test -n "$kargmax"; then | |
11737 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` | |
11738 | else | |
11739 | lt_cv_sys_max_cmd_len=32768 | |
11740 | fi | |
11741 | ;; | |
11742 | *) | |
5d47bb02 PG |
11743 | lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` |
11744 | if test -n "$lt_cv_sys_max_cmd_len"; then | |
da0f6381 PB |
11745 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
11746 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
11747 | else | |
11748 | # Make teststring a little bigger before we do anything with it. | |
11749 | # a 1K string should be a reasonable start. | |
11750 | for i in 1 2 3 4 5 6 7 8 ; do | |
11751 | teststring=$teststring$teststring | |
11752 | done | |
11753 | SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} | |
11754 | # If test is not a shell built-in, we'll probably end up computing a | |
11755 | # maximum length that is only half of the actual maximum length, but | |
11756 | # we can't tell. | |
43e02a8a RW |
11757 | while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ |
11758 | = "X$teststring$teststring"; } >/dev/null 2>&1 && | |
da0f6381 PB |
11759 | test $i != 17 # 1/2 MB should be enough |
11760 | do | |
11761 | i=`expr $i + 1` | |
11762 | teststring=$teststring$teststring | |
11763 | done | |
11764 | # Only check the string length outside the loop. | |
11765 | lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` | |
11766 | teststring= | |
11767 | # Add a significant safety factor because C++ compilers can tack on | |
11768 | # massive amounts of additional arguments before passing them to the | |
11769 | # linker. It appears as though 1/2 is a usable value. | |
11770 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | |
11771 | fi | |
11772 | ;; | |
11773 | esac | |
11774 | ||
11775 | fi | |
11776 | ||
11777 | if test -n $lt_cv_sys_max_cmd_len ; then | |
5213506e RW |
11778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 |
11779 | $as_echo "$lt_cv_sys_max_cmd_len" >&6; } | |
da0f6381 | 11780 | else |
5213506e RW |
11781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
11782 | $as_echo "none" >&6; } | |
da0f6381 PB |
11783 | fi |
11784 | max_cmd_len=$lt_cv_sys_max_cmd_len | |
11785 | ||
11786 | ||
11787 | ||
11788 | ||
11789 | ||
11790 | ||
da0f6381 PB |
11791 | : ${CP="cp -f"} |
11792 | : ${MV="mv -f"} | |
11793 | : ${RM="rm -f"} | |
11794 | ||
5213506e RW |
11795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 |
11796 | $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } | |
da0f6381 PB |
11797 | # Try some XSI features |
11798 | xsi_shell=no | |
11799 | ( _lt_dummy="a/b/c" | |
11800 | test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | |
5d47bb02 PG |
11801 | = c,a/b,, \ |
11802 | && eval 'test $(( 1 + 1 )) -eq 2 \ | |
11803 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | |
da0f6381 | 11804 | && xsi_shell=yes |
5213506e RW |
11805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 |
11806 | $as_echo "$xsi_shell" >&6; } | |
da0f6381 PB |
11807 | |
11808 | ||
5213506e RW |
11809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 |
11810 | $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } | |
da0f6381 PB |
11811 | lt_shell_append=no |
11812 | ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ | |
11813 | >/dev/null 2>&1 \ | |
11814 | && lt_shell_append=yes | |
5213506e RW |
11815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 |
11816 | $as_echo "$lt_shell_append" >&6; } | |
da0f6381 PB |
11817 | |
11818 | ||
11819 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
11820 | lt_unset=unset | |
11821 | else | |
11822 | lt_unset=false | |
11823 | fi | |
11824 | ||
11825 | ||
11826 | ||
11827 | ||
11828 | ||
11829 | # test EBCDIC or ASCII | |
11830 | case `echo X|tr X '\101'` in | |
11831 | A) # ASCII based system | |
11832 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr | |
11833 | lt_SP2NL='tr \040 \012' | |
11834 | lt_NL2SP='tr \015\012 \040\040' | |
11835 | ;; | |
11836 | *) # EBCDIC based system | |
11837 | lt_SP2NL='tr \100 \n' | |
11838 | lt_NL2SP='tr \r\n \100\100' | |
11839 | ;; | |
11840 | esac | |
11841 | ||
11842 | ||
11843 | ||
11844 | ||
11845 | ||
11846 | ||
11847 | ||
11848 | ||
11849 | ||
5213506e RW |
11850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 |
11851 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | |
11852 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | |
11853 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11854 | else |
11855 | lt_cv_ld_reload_flag='-r' | |
11856 | fi | |
5213506e RW |
11857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 |
11858 | $as_echo "$lt_cv_ld_reload_flag" >&6; } | |
da0f6381 PB |
11859 | reload_flag=$lt_cv_ld_reload_flag |
11860 | case $reload_flag in | |
11861 | "" | " "*) ;; | |
11862 | *) reload_flag=" $reload_flag" ;; | |
11863 | esac | |
11864 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
11865 | case $host_os in | |
11866 | darwin*) | |
11867 | if test "$GCC" = yes; then | |
11868 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | |
11869 | else | |
11870 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
11871 | fi | |
11872 | ;; | |
11873 | esac | |
11874 | ||
11875 | ||
11876 | ||
11877 | ||
11878 | ||
11879 | ||
11880 | ||
11881 | ||
11882 | ||
5d47bb02 PG |
11883 | if test -n "$ac_tool_prefix"; then |
11884 | # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. | |
11885 | set dummy ${ac_tool_prefix}objdump; ac_word=$2 | |
5213506e RW |
11886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11887 | $as_echo_n "checking for $ac_word... " >&6; } | |
11888 | if test "${ac_cv_prog_OBJDUMP+set}" = set; then : | |
11889 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
11890 | else |
11891 | if test -n "$OBJDUMP"; then | |
11892 | ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. | |
11893 | else | |
11894 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11895 | for as_dir in $PATH | |
11896 | do | |
11897 | IFS=$as_save_IFS | |
11898 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11899 | for ac_exec_ext in '' $ac_executable_extensions; do |
11900 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 11901 | ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" |
5213506e | 11902 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
11903 | break 2 |
11904 | fi | |
11905 | done | |
5213506e RW |
11906 | done |
11907 | IFS=$as_save_IFS | |
5d47bb02 PG |
11908 | |
11909 | fi | |
11910 | fi | |
11911 | OBJDUMP=$ac_cv_prog_OBJDUMP | |
11912 | if test -n "$OBJDUMP"; then | |
5213506e RW |
11913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 |
11914 | $as_echo "$OBJDUMP" >&6; } | |
5d47bb02 | 11915 | else |
5213506e RW |
11916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11917 | $as_echo "no" >&6; } | |
5d47bb02 PG |
11918 | fi |
11919 | ||
5213506e | 11920 | |
5d47bb02 PG |
11921 | fi |
11922 | if test -z "$ac_cv_prog_OBJDUMP"; then | |
11923 | ac_ct_OBJDUMP=$OBJDUMP | |
11924 | # Extract the first word of "objdump", so it can be a program name with args. | |
11925 | set dummy objdump; ac_word=$2 | |
5213506e RW |
11926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
11927 | $as_echo_n "checking for $ac_word... " >&6; } | |
11928 | if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : | |
11929 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
11930 | else |
11931 | if test -n "$ac_ct_OBJDUMP"; then | |
11932 | ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. | |
11933 | else | |
11934 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11935 | for as_dir in $PATH | |
11936 | do | |
11937 | IFS=$as_save_IFS | |
11938 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
11939 | for ac_exec_ext in '' $ac_executable_extensions; do |
11940 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 11941 | ac_cv_prog_ac_ct_OBJDUMP="objdump" |
5213506e | 11942 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
11943 | break 2 |
11944 | fi | |
11945 | done | |
5213506e RW |
11946 | done |
11947 | IFS=$as_save_IFS | |
5d47bb02 | 11948 | |
5d47bb02 PG |
11949 | fi |
11950 | fi | |
11951 | ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP | |
11952 | if test -n "$ac_ct_OBJDUMP"; then | |
5213506e RW |
11953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 |
11954 | $as_echo "$ac_ct_OBJDUMP" >&6; } | |
5d47bb02 | 11955 | else |
5213506e RW |
11956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11957 | $as_echo "no" >&6; } | |
5d47bb02 PG |
11958 | fi |
11959 | ||
5213506e RW |
11960 | if test "x$ac_ct_OBJDUMP" = x; then |
11961 | OBJDUMP="false" | |
11962 | else | |
11963 | case $cross_compiling:$ac_tool_warned in | |
11964 | yes:) | |
11965 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
11966 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
11967 | ac_tool_warned=yes ;; | |
11968 | esac | |
11969 | OBJDUMP=$ac_ct_OBJDUMP | |
11970 | fi | |
5d47bb02 PG |
11971 | else |
11972 | OBJDUMP="$ac_cv_prog_OBJDUMP" | |
11973 | fi | |
11974 | ||
11975 | test -z "$OBJDUMP" && OBJDUMP=objdump | |
11976 | ||
11977 | ||
11978 | ||
11979 | ||
11980 | ||
11981 | ||
11982 | ||
11983 | ||
da0f6381 | 11984 | |
5213506e RW |
11985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 |
11986 | $as_echo_n "checking how to recognize dependent libraries... " >&6; } | |
11987 | if test "${lt_cv_deplibs_check_method+set}" = set; then : | |
11988 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
11989 | else |
11990 | lt_cv_file_magic_cmd='$MAGIC_CMD' | |
11991 | lt_cv_file_magic_test_file= | |
11992 | lt_cv_deplibs_check_method='unknown' | |
11993 | # Need to set the preceding variable on all platforms that support | |
11994 | # interlibrary dependencies. | |
11995 | # 'none' -- dependencies not supported. | |
11996 | # `unknown' -- same as none, but documents that we really don't know. | |
11997 | # 'pass_all' -- all dependencies passed with no checks. | |
11998 | # 'test_compile' -- check by making test program. | |
11999 | # 'file_magic [[regex]]' -- check by looking for files in library path | |
12000 | # which responds to the $file_magic_cmd with a given extended regex. | |
12001 | # If you have `file' or equivalent on your system and you're not sure | |
12002 | # whether `pass_all' will *always* work, you probably want this one. | |
12003 | ||
12004 | case $host_os in | |
12005 | aix[4-9]*) | |
12006 | lt_cv_deplibs_check_method=pass_all | |
12007 | ;; | |
12008 | ||
12009 | beos*) | |
12010 | lt_cv_deplibs_check_method=pass_all | |
12011 | ;; | |
12012 | ||
12013 | bsdi[45]*) | |
12014 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' | |
12015 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
12016 | lt_cv_file_magic_test_file=/shlib/libc.so | |
12017 | ;; | |
12018 | ||
12019 | cygwin*) | |
12020 | # func_win32_libid is a shell function defined in ltmain.sh | |
12021 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
12022 | lt_cv_file_magic_cmd='func_win32_libid' | |
12023 | ;; | |
12024 | ||
12025 | mingw* | pw32*) | |
12026 | # Base MSYS/MinGW do not provide the 'file' command needed by | |
12027 | # func_win32_libid shell function, so use a weaker test based on 'objdump', | |
12028 | # unless we find 'file', for example because we are cross-compiling. | |
43e02a8a RW |
12029 | # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. |
12030 | if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then | |
da0f6381 PB |
12031 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
12032 | lt_cv_file_magic_cmd='func_win32_libid' | |
12033 | else | |
12034 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
12035 | lt_cv_file_magic_cmd='$OBJDUMP -f' | |
12036 | fi | |
12037 | ;; | |
12038 | ||
43e02a8a | 12039 | cegcc*) |
5d47bb02 PG |
12040 | # use the weaker test based on 'objdump'. See mingw*. |
12041 | lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' | |
12042 | lt_cv_file_magic_cmd='$OBJDUMP -f' | |
12043 | ;; | |
12044 | ||
da0f6381 PB |
12045 | darwin* | rhapsody*) |
12046 | lt_cv_deplibs_check_method=pass_all | |
12047 | ;; | |
12048 | ||
12049 | freebsd* | dragonfly*) | |
12050 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
12051 | case $host_cpu in | |
12052 | i*86 ) | |
12053 | # Not sure whether the presence of OpenBSD here was a mistake. | |
12054 | # Let's accept both of them until this is cleared up. | |
12055 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' | |
12056 | lt_cv_file_magic_cmd=/usr/bin/file | |
12057 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
12058 | ;; | |
12059 | esac | |
12060 | else | |
12061 | lt_cv_deplibs_check_method=pass_all | |
12062 | fi | |
12063 | ;; | |
12064 | ||
12065 | gnu*) | |
12066 | lt_cv_deplibs_check_method=pass_all | |
12067 | ;; | |
12068 | ||
43e02a8a RW |
12069 | haiku*) |
12070 | lt_cv_deplibs_check_method=pass_all | |
12071 | ;; | |
12072 | ||
da0f6381 PB |
12073 | hpux10.20* | hpux11*) |
12074 | lt_cv_file_magic_cmd=/usr/bin/file | |
12075 | case $host_cpu in | |
12076 | ia64*) | |
12077 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' | |
12078 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
12079 | ;; | |
12080 | hppa*64*) | |
43e02a8a | 12081 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' |
da0f6381 PB |
12082 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
12083 | ;; | |
12084 | *) | |
43e02a8a | 12085 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' |
da0f6381 PB |
12086 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
12087 | ;; | |
12088 | esac | |
12089 | ;; | |
12090 | ||
12091 | interix[3-9]*) | |
12092 | # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here | |
12093 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' | |
12094 | ;; | |
12095 | ||
12096 | irix5* | irix6* | nonstopux*) | |
12097 | case $LD in | |
12098 | *-32|*"-32 ") libmagic=32-bit;; | |
12099 | *-n32|*"-n32 ") libmagic=N32;; | |
12100 | *-64|*"-64 ") libmagic=64-bit;; | |
12101 | *) libmagic=never-match;; | |
12102 | esac | |
12103 | lt_cv_deplibs_check_method=pass_all | |
12104 | ;; | |
12105 | ||
12106 | # This must be Linux ELF. | |
7a9d3fe8 | 12107 | linux* | k*bsd*-gnu | kopensolaris*-gnu) |
da0f6381 PB |
12108 | lt_cv_deplibs_check_method=pass_all |
12109 | ;; | |
12110 | ||
12111 | netbsd*) | |
12112 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
12113 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' | |
12114 | else | |
12115 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' | |
12116 | fi | |
12117 | ;; | |
12118 | ||
12119 | newos6*) | |
12120 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' | |
12121 | lt_cv_file_magic_cmd=/usr/bin/file | |
12122 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
12123 | ;; | |
12124 | ||
12125 | *nto* | *qnx*) | |
12126 | lt_cv_deplibs_check_method=pass_all | |
12127 | ;; | |
12128 | ||
12129 | openbsd*) | |
12130 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
12131 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' | |
12132 | else | |
12133 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' | |
12134 | fi | |
12135 | ;; | |
12136 | ||
12137 | osf3* | osf4* | osf5*) | |
12138 | lt_cv_deplibs_check_method=pass_all | |
12139 | ;; | |
12140 | ||
12141 | rdos*) | |
12142 | lt_cv_deplibs_check_method=pass_all | |
12143 | ;; | |
12144 | ||
12145 | solaris*) | |
12146 | lt_cv_deplibs_check_method=pass_all | |
12147 | ;; | |
12148 | ||
12149 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
12150 | lt_cv_deplibs_check_method=pass_all | |
12151 | ;; | |
12152 | ||
12153 | sysv4 | sysv4.3*) | |
12154 | case $host_vendor in | |
12155 | motorola) | |
12156 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' | |
12157 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
12158 | ;; | |
12159 | ncr) | |
12160 | lt_cv_deplibs_check_method=pass_all | |
12161 | ;; | |
12162 | sequent) | |
12163 | lt_cv_file_magic_cmd='/bin/file' | |
12164 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' | |
12165 | ;; | |
12166 | sni) | |
12167 | lt_cv_file_magic_cmd='/bin/file' | |
12168 | lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" | |
12169 | lt_cv_file_magic_test_file=/lib/libc.so | |
12170 | ;; | |
12171 | siemens) | |
12172 | lt_cv_deplibs_check_method=pass_all | |
12173 | ;; | |
12174 | pc) | |
12175 | lt_cv_deplibs_check_method=pass_all | |
12176 | ;; | |
12177 | esac | |
12178 | ;; | |
12179 | ||
12180 | tpf*) | |
12181 | lt_cv_deplibs_check_method=pass_all | |
12182 | ;; | |
12183 | esac | |
12184 | ||
12185 | fi | |
5213506e RW |
12186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 |
12187 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | |
da0f6381 PB |
12188 | file_magic_cmd=$lt_cv_file_magic_cmd |
12189 | deplibs_check_method=$lt_cv_deplibs_check_method | |
12190 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
12191 | ||
12192 | ||
12193 | ||
12194 | ||
12195 | ||
12196 | ||
12197 | ||
12198 | ||
12199 | ||
12200 | ||
12201 | ||
12202 | ||
12203 | if test -n "$ac_tool_prefix"; then | |
12204 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
12205 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
5213506e RW |
12206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12207 | $as_echo_n "checking for $ac_word... " >&6; } | |
12208 | if test "${ac_cv_prog_AR+set}" = set; then : | |
12209 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12210 | else |
12211 | if test -n "$AR"; then | |
12212 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
12213 | else | |
12214 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12215 | for as_dir in $PATH | |
12216 | do | |
12217 | IFS=$as_save_IFS | |
12218 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12219 | for ac_exec_ext in '' $ac_executable_extensions; do |
12220 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12221 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
5213506e | 12222 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12223 | break 2 |
12224 | fi | |
12225 | done | |
5213506e RW |
12226 | done |
12227 | IFS=$as_save_IFS | |
da0f6381 PB |
12228 | |
12229 | fi | |
12230 | fi | |
12231 | AR=$ac_cv_prog_AR | |
12232 | if test -n "$AR"; then | |
5213506e RW |
12233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
12234 | $as_echo "$AR" >&6; } | |
da0f6381 | 12235 | else |
5213506e RW |
12236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12237 | $as_echo "no" >&6; } | |
da0f6381 PB |
12238 | fi |
12239 | ||
5213506e | 12240 | |
da0f6381 PB |
12241 | fi |
12242 | if test -z "$ac_cv_prog_AR"; then | |
12243 | ac_ct_AR=$AR | |
12244 | # Extract the first word of "ar", so it can be a program name with args. | |
12245 | set dummy ar; ac_word=$2 | |
5213506e RW |
12246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12247 | $as_echo_n "checking for $ac_word... " >&6; } | |
12248 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
12249 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12250 | else |
12251 | if test -n "$ac_ct_AR"; then | |
12252 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
12253 | else | |
12254 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12255 | for as_dir in $PATH | |
12256 | do | |
12257 | IFS=$as_save_IFS | |
12258 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12259 | for ac_exec_ext in '' $ac_executable_extensions; do |
12260 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12261 | ac_cv_prog_ac_ct_AR="ar" |
5213506e | 12262 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12263 | break 2 |
12264 | fi | |
12265 | done | |
5213506e RW |
12266 | done |
12267 | IFS=$as_save_IFS | |
da0f6381 | 12268 | |
da0f6381 PB |
12269 | fi |
12270 | fi | |
12271 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
12272 | if test -n "$ac_ct_AR"; then | |
5213506e RW |
12273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
12274 | $as_echo "$ac_ct_AR" >&6; } | |
da0f6381 | 12275 | else |
5213506e RW |
12276 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12277 | $as_echo "no" >&6; } | |
da0f6381 PB |
12278 | fi |
12279 | ||
5213506e RW |
12280 | if test "x$ac_ct_AR" = x; then |
12281 | AR="false" | |
12282 | else | |
12283 | case $cross_compiling:$ac_tool_warned in | |
12284 | yes:) | |
12285 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
12286 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
12287 | ac_tool_warned=yes ;; | |
12288 | esac | |
12289 | AR=$ac_ct_AR | |
12290 | fi | |
da0f6381 PB |
12291 | else |
12292 | AR="$ac_cv_prog_AR" | |
12293 | fi | |
12294 | ||
12295 | test -z "$AR" && AR=ar | |
12296 | test -z "$AR_FLAGS" && AR_FLAGS=cru | |
12297 | ||
12298 | ||
12299 | ||
12300 | ||
12301 | ||
12302 | ||
12303 | ||
12304 | ||
12305 | ||
12306 | ||
12307 | ||
12308 | if test -n "$ac_tool_prefix"; then | |
12309 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
12310 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5213506e RW |
12311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12312 | $as_echo_n "checking for $ac_word... " >&6; } | |
12313 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
12314 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12315 | else |
12316 | if test -n "$STRIP"; then | |
12317 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
12318 | else | |
12319 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12320 | for as_dir in $PATH | |
12321 | do | |
12322 | IFS=$as_save_IFS | |
12323 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12324 | for ac_exec_ext in '' $ac_executable_extensions; do |
12325 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12326 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5213506e | 12327 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12328 | break 2 |
12329 | fi | |
12330 | done | |
5213506e RW |
12331 | done |
12332 | IFS=$as_save_IFS | |
da0f6381 PB |
12333 | |
12334 | fi | |
12335 | fi | |
12336 | STRIP=$ac_cv_prog_STRIP | |
12337 | if test -n "$STRIP"; then | |
5213506e RW |
12338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 |
12339 | $as_echo "$STRIP" >&6; } | |
da0f6381 | 12340 | else |
5213506e RW |
12341 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12342 | $as_echo "no" >&6; } | |
da0f6381 PB |
12343 | fi |
12344 | ||
5213506e | 12345 | |
da0f6381 PB |
12346 | fi |
12347 | if test -z "$ac_cv_prog_STRIP"; then | |
12348 | ac_ct_STRIP=$STRIP | |
12349 | # Extract the first word of "strip", so it can be a program name with args. | |
12350 | set dummy strip; ac_word=$2 | |
5213506e RW |
12351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12352 | $as_echo_n "checking for $ac_word... " >&6; } | |
12353 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
12354 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12355 | else |
12356 | if test -n "$ac_ct_STRIP"; then | |
12357 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
12358 | else | |
12359 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12360 | for as_dir in $PATH | |
12361 | do | |
12362 | IFS=$as_save_IFS | |
12363 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12364 | for ac_exec_ext in '' $ac_executable_extensions; do |
12365 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12366 | ac_cv_prog_ac_ct_STRIP="strip" |
5213506e | 12367 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12368 | break 2 |
12369 | fi | |
12370 | done | |
5213506e RW |
12371 | done |
12372 | IFS=$as_save_IFS | |
da0f6381 | 12373 | |
da0f6381 PB |
12374 | fi |
12375 | fi | |
12376 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
12377 | if test -n "$ac_ct_STRIP"; then | |
5213506e RW |
12378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 |
12379 | $as_echo "$ac_ct_STRIP" >&6; } | |
da0f6381 | 12380 | else |
5213506e RW |
12381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12382 | $as_echo "no" >&6; } | |
da0f6381 PB |
12383 | fi |
12384 | ||
5213506e RW |
12385 | if test "x$ac_ct_STRIP" = x; then |
12386 | STRIP=":" | |
12387 | else | |
12388 | case $cross_compiling:$ac_tool_warned in | |
12389 | yes:) | |
12390 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
12391 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
12392 | ac_tool_warned=yes ;; | |
12393 | esac | |
12394 | STRIP=$ac_ct_STRIP | |
12395 | fi | |
da0f6381 PB |
12396 | else |
12397 | STRIP="$ac_cv_prog_STRIP" | |
12398 | fi | |
12399 | ||
12400 | test -z "$STRIP" && STRIP=: | |
12401 | ||
12402 | ||
12403 | ||
12404 | ||
12405 | ||
12406 | ||
12407 | if test -n "$ac_tool_prefix"; then | |
12408 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
12409 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5213506e RW |
12410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12411 | $as_echo_n "checking for $ac_word... " >&6; } | |
12412 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
12413 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12414 | else |
12415 | if test -n "$RANLIB"; then | |
12416 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
12417 | else | |
12418 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12419 | for as_dir in $PATH | |
12420 | do | |
12421 | IFS=$as_save_IFS | |
12422 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12423 | for ac_exec_ext in '' $ac_executable_extensions; do |
12424 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12425 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
5213506e | 12426 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12427 | break 2 |
12428 | fi | |
12429 | done | |
5213506e RW |
12430 | done |
12431 | IFS=$as_save_IFS | |
da0f6381 PB |
12432 | |
12433 | fi | |
12434 | fi | |
12435 | RANLIB=$ac_cv_prog_RANLIB | |
12436 | if test -n "$RANLIB"; then | |
5213506e RW |
12437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
12438 | $as_echo "$RANLIB" >&6; } | |
da0f6381 | 12439 | else |
5213506e RW |
12440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12441 | $as_echo "no" >&6; } | |
da0f6381 PB |
12442 | fi |
12443 | ||
5213506e | 12444 | |
da0f6381 PB |
12445 | fi |
12446 | if test -z "$ac_cv_prog_RANLIB"; then | |
12447 | ac_ct_RANLIB=$RANLIB | |
12448 | # Extract the first word of "ranlib", so it can be a program name with args. | |
12449 | set dummy ranlib; ac_word=$2 | |
5213506e RW |
12450 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
12451 | $as_echo_n "checking for $ac_word... " >&6; } | |
12452 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
12453 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12454 | else |
12455 | if test -n "$ac_ct_RANLIB"; then | |
12456 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
12457 | else | |
12458 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12459 | for as_dir in $PATH | |
12460 | do | |
12461 | IFS=$as_save_IFS | |
12462 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
12463 | for ac_exec_ext in '' $ac_executable_extensions; do |
12464 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 12465 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
5213506e | 12466 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
12467 | break 2 |
12468 | fi | |
12469 | done | |
5213506e RW |
12470 | done |
12471 | IFS=$as_save_IFS | |
da0f6381 | 12472 | |
da0f6381 PB |
12473 | fi |
12474 | fi | |
12475 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
12476 | if test -n "$ac_ct_RANLIB"; then | |
5213506e RW |
12477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
12478 | $as_echo "$ac_ct_RANLIB" >&6; } | |
da0f6381 | 12479 | else |
5213506e RW |
12480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12481 | $as_echo "no" >&6; } | |
da0f6381 PB |
12482 | fi |
12483 | ||
5213506e RW |
12484 | if test "x$ac_ct_RANLIB" = x; then |
12485 | RANLIB=":" | |
12486 | else | |
12487 | case $cross_compiling:$ac_tool_warned in | |
12488 | yes:) | |
12489 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
12490 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
12491 | ac_tool_warned=yes ;; | |
12492 | esac | |
12493 | RANLIB=$ac_ct_RANLIB | |
12494 | fi | |
da0f6381 PB |
12495 | else |
12496 | RANLIB="$ac_cv_prog_RANLIB" | |
12497 | fi | |
12498 | ||
12499 | test -z "$RANLIB" && RANLIB=: | |
12500 | ||
12501 | ||
12502 | ||
12503 | ||
12504 | ||
12505 | ||
12506 | # Determine commands to create old-style static archives. | |
5d47bb02 | 12507 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' |
da0f6381 PB |
12508 | old_postinstall_cmds='chmod 644 $oldlib' |
12509 | old_postuninstall_cmds= | |
12510 | ||
12511 | if test -n "$RANLIB"; then | |
12512 | case $host_os in | |
12513 | openbsd*) | |
12514 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" | |
12515 | ;; | |
12516 | *) | |
12517 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" | |
12518 | ;; | |
12519 | esac | |
12520 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | |
12521 | fi | |
12522 | ||
43e02a8a RW |
12523 | case $host_os in |
12524 | darwin*) | |
12525 | lock_old_archive_extraction=yes ;; | |
12526 | *) | |
12527 | lock_old_archive_extraction=no ;; | |
12528 | esac | |
12529 | ||
12530 | ||
12531 | ||
12532 | ||
12533 | ||
12534 | ||
da0f6381 PB |
12535 | |
12536 | ||
12537 | ||
12538 | ||
12539 | ||
12540 | ||
12541 | ||
12542 | ||
12543 | ||
12544 | ||
12545 | ||
12546 | ||
12547 | ||
12548 | ||
12549 | ||
12550 | ||
12551 | ||
12552 | ||
12553 | ||
12554 | ||
12555 | ||
12556 | ||
12557 | ||
12558 | ||
12559 | ||
12560 | ||
12561 | ||
12562 | ||
12563 | ||
12564 | ||
12565 | ||
12566 | ||
12567 | ||
12568 | # If no C compiler was specified, use CC. | |
12569 | LTCC=${LTCC-"$CC"} | |
12570 | ||
12571 | # If no C compiler flags were specified, use CFLAGS. | |
12572 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
12573 | ||
12574 | # Allow CC to be a program name with arguments. | |
12575 | compiler=$CC | |
12576 | ||
12577 | ||
12578 | # Check for command to grab the raw symbol name followed by C symbol from nm. | |
5213506e RW |
12579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 |
12580 | $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } | |
12581 | if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : | |
12582 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12583 | else |
12584 | ||
12585 | # These are sane defaults that work on at least a few old systems. | |
12586 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
12587 | ||
12588 | # Character class describing NM global symbol codes. | |
12589 | symcode='[BCDEGRST]' | |
12590 | ||
12591 | # Regexp to match symbols that can be accessed directly from C. | |
12592 | sympat='\([_A-Za-z][_A-Za-z0-9]*\)' | |
12593 | ||
12594 | # Define system-specific variables. | |
12595 | case $host_os in | |
12596 | aix*) | |
12597 | symcode='[BCDT]' | |
12598 | ;; | |
5d47bb02 | 12599 | cygwin* | mingw* | pw32* | cegcc*) |
da0f6381 PB |
12600 | symcode='[ABCDGISTW]' |
12601 | ;; | |
12602 | hpux*) | |
12603 | if test "$host_cpu" = ia64; then | |
12604 | symcode='[ABCDEGRST]' | |
12605 | fi | |
12606 | ;; | |
12607 | irix* | nonstopux*) | |
12608 | symcode='[BCDEGRST]' | |
12609 | ;; | |
12610 | osf*) | |
12611 | symcode='[BCDEGQRST]' | |
12612 | ;; | |
12613 | solaris*) | |
12614 | symcode='[BDRT]' | |
12615 | ;; | |
12616 | sco3.2v5*) | |
12617 | symcode='[DT]' | |
12618 | ;; | |
12619 | sysv4.2uw2*) | |
12620 | symcode='[DT]' | |
12621 | ;; | |
12622 | sysv5* | sco5v6* | unixware* | OpenUNIX*) | |
12623 | symcode='[ABDT]' | |
12624 | ;; | |
12625 | sysv4) | |
12626 | symcode='[DFNSTU]' | |
12627 | ;; | |
12628 | esac | |
12629 | ||
12630 | # If we're using GNU nm, then use its standard symbol codes. | |
12631 | case `$NM -V 2>&1` in | |
12632 | *GNU* | *'with BFD'*) | |
12633 | symcode='[ABCDGIRSTW]' ;; | |
12634 | esac | |
12635 | ||
12636 | # Transform an extracted symbol line into a proper C declaration. | |
12637 | # Some systems (esp. on ia64) link data and code symbols differently, | |
12638 | # so use this general approach. | |
12639 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
12640 | ||
12641 | # Transform an extracted symbol line into symbol name and symbol address | |
12642 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | |
5d47bb02 | 12643 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" |
da0f6381 PB |
12644 | |
12645 | # Handle CRLF in mingw tool chain | |
12646 | opt_cr= | |
12647 | case $build_os in | |
12648 | mingw*) | |
12649 | opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
12650 | ;; | |
12651 | esac | |
12652 | ||
12653 | # Try without a prefix underscore, then with it. | |
12654 | for ac_symprfx in "" "_"; do | |
12655 | ||
12656 | # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. | |
12657 | symxfrm="\\1 $ac_symprfx\\2 \\2" | |
12658 | ||
12659 | # Write the raw and C identifiers. | |
12660 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | |
12661 | # Fake it for dumpbin and say T for any non-static function | |
12662 | # and D for any global variable. | |
12663 | # Also find C++ and __fastcall symbols from MSVC++, | |
12664 | # which start with @ or ?. | |
12665 | lt_cv_sys_global_symbol_pipe="$AWK '"\ | |
12666 | " {last_section=section; section=\$ 3};"\ | |
12667 | " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ | |
12668 | " \$ 0!~/External *\|/{next};"\ | |
12669 | " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ | |
12670 | " {if(hide[section]) next};"\ | |
12671 | " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ | |
12672 | " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ | |
12673 | " s[1]~/^[@?]/{print s[1], s[1]; next};"\ | |
12674 | " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ | |
12675 | " ' prfx=^$ac_symprfx" | |
12676 | else | |
12677 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
12678 | fi | |
12679 | ||
12680 | # Check to see that the pipe works correctly. | |
12681 | pipe_works=no | |
12682 | ||
12683 | rm -f conftest* | |
12684 | cat > conftest.$ac_ext <<_LT_EOF | |
12685 | #ifdef __cplusplus | |
12686 | extern "C" { | |
12687 | #endif | |
12688 | char nm_test_var; | |
12689 | void nm_test_func(void); | |
12690 | void nm_test_func(void){} | |
12691 | #ifdef __cplusplus | |
12692 | } | |
12693 | #endif | |
12694 | int main(){nm_test_var='a';nm_test_func();return(0);} | |
12695 | _LT_EOF | |
12696 | ||
5213506e | 12697 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12698 | (eval $ac_compile) 2>&5 |
12699 | ac_status=$? | |
5213506e RW |
12700 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12701 | test $ac_status = 0; }; then | |
da0f6381 PB |
12702 | # Now try to grab the symbols. |
12703 | nlist=conftest.nm | |
43e02a8a RW |
12704 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 |
12705 | (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 | |
da0f6381 | 12706 | ac_status=$? |
5213506e RW |
12707 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12708 | test $ac_status = 0; } && test -s "$nlist"; then | |
da0f6381 PB |
12709 | # Try sorting and uniquifying the output. |
12710 | if sort "$nlist" | uniq > "$nlist"T; then | |
12711 | mv -f "$nlist"T "$nlist" | |
12712 | else | |
12713 | rm -f "$nlist"T | |
12714 | fi | |
12715 | ||
12716 | # Make sure that we snagged all the symbols we need. | |
12717 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | |
12718 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | |
12719 | cat <<_LT_EOF > conftest.$ac_ext | |
12720 | #ifdef __cplusplus | |
12721 | extern "C" { | |
12722 | #endif | |
12723 | ||
12724 | _LT_EOF | |
12725 | # Now generate the symbol file. | |
12726 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' | |
12727 | ||
12728 | cat <<_LT_EOF >> conftest.$ac_ext | |
12729 | ||
12730 | /* The mapping between symbol names and symbols. */ | |
12731 | const struct { | |
12732 | const char *name; | |
12733 | void *address; | |
12734 | } | |
12735 | lt__PROGRAM__LTX_preloaded_symbols[] = | |
12736 | { | |
12737 | { "@PROGRAM@", (void *) 0 }, | |
12738 | _LT_EOF | |
12739 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext | |
12740 | cat <<\_LT_EOF >> conftest.$ac_ext | |
12741 | {0, (void *) 0} | |
12742 | }; | |
12743 | ||
12744 | /* This works around a problem in FreeBSD linker */ | |
12745 | #ifdef FREEBSD_WORKAROUND | |
12746 | static const void *lt_preloaded_setup() { | |
12747 | return lt__PROGRAM__LTX_preloaded_symbols; | |
12748 | } | |
12749 | #endif | |
12750 | ||
12751 | #ifdef __cplusplus | |
12752 | } | |
12753 | #endif | |
12754 | _LT_EOF | |
12755 | # Now try linking the two files. | |
12756 | mv conftest.$ac_objext conftstm.$ac_objext | |
12757 | lt_save_LIBS="$LIBS" | |
12758 | lt_save_CFLAGS="$CFLAGS" | |
12759 | LIBS="conftstm.$ac_objext" | |
12760 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | |
5213506e | 12761 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
da0f6381 PB |
12762 | (eval $ac_link) 2>&5 |
12763 | ac_status=$? | |
5213506e RW |
12764 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12765 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | |
da0f6381 PB |
12766 | pipe_works=yes |
12767 | fi | |
12768 | LIBS="$lt_save_LIBS" | |
12769 | CFLAGS="$lt_save_CFLAGS" | |
12770 | else | |
12771 | echo "cannot find nm_test_func in $nlist" >&5 | |
12772 | fi | |
12773 | else | |
12774 | echo "cannot find nm_test_var in $nlist" >&5 | |
12775 | fi | |
12776 | else | |
12777 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 | |
12778 | fi | |
12779 | else | |
12780 | echo "$progname: failed program was:" >&5 | |
12781 | cat conftest.$ac_ext >&5 | |
12782 | fi | |
5d47bb02 | 12783 | rm -rf conftest* conftst* |
da0f6381 PB |
12784 | |
12785 | # Do not use the global_symbol_pipe unless it works. | |
12786 | if test "$pipe_works" = yes; then | |
12787 | break | |
12788 | else | |
12789 | lt_cv_sys_global_symbol_pipe= | |
12790 | fi | |
12791 | done | |
12792 | ||
12793 | fi | |
12794 | ||
12795 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
12796 | lt_cv_sys_global_symbol_to_cdecl= | |
12797 | fi | |
12798 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | |
5213506e RW |
12799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 |
12800 | $as_echo "failed" >&6; } | |
da0f6381 | 12801 | else |
5213506e RW |
12802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 |
12803 | $as_echo "ok" >&6; } | |
da0f6381 PB |
12804 | fi |
12805 | ||
12806 | ||
12807 | ||
12808 | ||
12809 | ||
12810 | ||
12811 | ||
12812 | ||
12813 | ||
12814 | ||
12815 | ||
12816 | ||
12817 | ||
12818 | ||
12819 | ||
5d47bb02 PG |
12820 | |
12821 | ||
12822 | ||
12823 | ||
12824 | ||
da0f6381 PB |
12825 | |
12826 | ||
5213506e RW |
12827 | # Check whether --enable-libtool-lock was given. |
12828 | if test "${enable_libtool_lock+set}" = set; then : | |
12829 | enableval=$enable_libtool_lock; | |
12830 | fi | |
da0f6381 | 12831 | |
da0f6381 PB |
12832 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
12833 | ||
12834 | # Some flags need to be propagated to the compiler or linker for good | |
12835 | # libtool support. | |
12836 | case $host in | |
12837 | ia64-*-hpux*) | |
12838 | # Find out which ABI we are using. | |
12839 | echo 'int i;' > conftest.$ac_ext | |
5213506e | 12840 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12841 | (eval $ac_compile) 2>&5 |
12842 | ac_status=$? | |
5213506e RW |
12843 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12844 | test $ac_status = 0; }; then | |
da0f6381 PB |
12845 | case `/usr/bin/file conftest.$ac_objext` in |
12846 | *ELF-32*) | |
12847 | HPUX_IA64_MODE="32" | |
12848 | ;; | |
12849 | *ELF-64*) | |
12850 | HPUX_IA64_MODE="64" | |
12851 | ;; | |
12852 | esac | |
12853 | fi | |
12854 | rm -rf conftest* | |
12855 | ;; | |
12856 | *-*-irix6*) | |
12857 | # Find out which ABI we are using. | |
43e02a8a | 12858 | echo '#line '$LINENO' "configure"' > conftest.$ac_ext |
5213506e | 12859 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12860 | (eval $ac_compile) 2>&5 |
12861 | ac_status=$? | |
5213506e RW |
12862 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12863 | test $ac_status = 0; }; then | |
da0f6381 PB |
12864 | if test "$lt_cv_prog_gnu_ld" = yes; then |
12865 | case `/usr/bin/file conftest.$ac_objext` in | |
12866 | *32-bit*) | |
12867 | LD="${LD-ld} -melf32bsmip" | |
12868 | ;; | |
12869 | *N32*) | |
12870 | LD="${LD-ld} -melf32bmipn32" | |
12871 | ;; | |
12872 | *64-bit*) | |
12873 | LD="${LD-ld} -melf64bmip" | |
12874 | ;; | |
12875 | esac | |
12876 | else | |
12877 | case `/usr/bin/file conftest.$ac_objext` in | |
12878 | *32-bit*) | |
12879 | LD="${LD-ld} -32" | |
12880 | ;; | |
12881 | *N32*) | |
12882 | LD="${LD-ld} -n32" | |
12883 | ;; | |
12884 | *64-bit*) | |
12885 | LD="${LD-ld} -64" | |
12886 | ;; | |
12887 | esac | |
12888 | fi | |
12889 | fi | |
12890 | rm -rf conftest* | |
12891 | ;; | |
12892 | ||
12893 | x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ | |
12894 | s390*-*linux*|s390*-*tpf*|sparc*-*linux*) | |
12895 | # Find out which ABI we are using. | |
12896 | echo 'int i;' > conftest.$ac_ext | |
5213506e | 12897 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12898 | (eval $ac_compile) 2>&5 |
12899 | ac_status=$? | |
5213506e RW |
12900 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
12901 | test $ac_status = 0; }; then | |
da0f6381 PB |
12902 | case `/usr/bin/file conftest.o` in |
12903 | *32-bit*) | |
12904 | case $host in | |
12905 | x86_64-*kfreebsd*-gnu) | |
12906 | LD="${LD-ld} -m elf_i386_fbsd" | |
12907 | ;; | |
12908 | x86_64-*linux*) | |
12909 | LD="${LD-ld} -m elf_i386" | |
12910 | ;; | |
12911 | ppc64-*linux*|powerpc64-*linux*) | |
12912 | LD="${LD-ld} -m elf32ppclinux" | |
12913 | ;; | |
12914 | s390x-*linux*) | |
12915 | LD="${LD-ld} -m elf_s390" | |
12916 | ;; | |
12917 | sparc64-*linux*) | |
12918 | LD="${LD-ld} -m elf32_sparc" | |
12919 | ;; | |
12920 | esac | |
12921 | ;; | |
12922 | *64-bit*) | |
12923 | case $host in | |
12924 | x86_64-*kfreebsd*-gnu) | |
12925 | LD="${LD-ld} -m elf_x86_64_fbsd" | |
12926 | ;; | |
12927 | x86_64-*linux*) | |
12928 | LD="${LD-ld} -m elf_x86_64" | |
12929 | ;; | |
12930 | ppc*-*linux*|powerpc*-*linux*) | |
12931 | LD="${LD-ld} -m elf64ppc" | |
12932 | ;; | |
12933 | s390*-*linux*|s390*-*tpf*) | |
12934 | LD="${LD-ld} -m elf64_s390" | |
12935 | ;; | |
12936 | sparc*-*linux*) | |
12937 | LD="${LD-ld} -m elf64_sparc" | |
12938 | ;; | |
12939 | esac | |
12940 | ;; | |
12941 | esac | |
12942 | fi | |
12943 | rm -rf conftest* | |
12944 | ;; | |
12945 | ||
12946 | *-*-sco3.2v5*) | |
12947 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
12948 | SAVE_CFLAGS="$CFLAGS" | |
12949 | CFLAGS="$CFLAGS -belf" | |
5213506e RW |
12950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 |
12951 | $as_echo_n "checking whether the C compiler needs -belf... " >&6; } | |
12952 | if test "${lt_cv_cc_needs_belf+set}" = set; then : | |
12953 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
12954 | else |
12955 | ac_ext=c | |
12956 | ac_cpp='$CPP $CPPFLAGS' | |
12957 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
12958 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12959 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
12960 | ||
5213506e | 12961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
12962 | /* end confdefs.h. */ |
12963 | ||
12964 | int | |
12965 | main () | |
12966 | { | |
12967 | ||
12968 | ; | |
12969 | return 0; | |
12970 | } | |
12971 | _ACEOF | |
5213506e | 12972 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 PB |
12973 | lt_cv_cc_needs_belf=yes |
12974 | else | |
5213506e | 12975 | lt_cv_cc_needs_belf=no |
da0f6381 | 12976 | fi |
5213506e RW |
12977 | rm -f core conftest.err conftest.$ac_objext \ |
12978 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
12979 | ac_ext=c |
12980 | ac_cpp='$CPP $CPPFLAGS' | |
12981 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
12982 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12983 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
12984 | ||
12985 | fi | |
5213506e RW |
12986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 |
12987 | $as_echo "$lt_cv_cc_needs_belf" >&6; } | |
da0f6381 PB |
12988 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
12989 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
12990 | CFLAGS="$SAVE_CFLAGS" | |
12991 | fi | |
12992 | ;; | |
12993 | sparc*-*solaris*) | |
12994 | # Find out which ABI we are using. | |
12995 | echo 'int i;' > conftest.$ac_ext | |
5213506e | 12996 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
da0f6381 PB |
12997 | (eval $ac_compile) 2>&5 |
12998 | ac_status=$? | |
5213506e RW |
12999 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
13000 | test $ac_status = 0; }; then | |
da0f6381 PB |
13001 | case `/usr/bin/file conftest.o` in |
13002 | *64-bit*) | |
13003 | case $lt_cv_prog_gnu_ld in | |
13004 | yes*) LD="${LD-ld} -m elf64_sparc" ;; | |
5d47bb02 PG |
13005 | *) |
13006 | if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then | |
13007 | LD="${LD-ld} -64" | |
13008 | fi | |
13009 | ;; | |
da0f6381 PB |
13010 | esac |
13011 | ;; | |
13012 | esac | |
13013 | fi | |
13014 | rm -rf conftest* | |
13015 | ;; | |
13016 | esac | |
13017 | ||
5d47bb02 PG |
13018 | need_locks="$enable_libtool_lock" |
13019 | ||
13020 | ||
13021 | case $host_os in | |
13022 | rhapsody* | darwin*) | |
13023 | if test -n "$ac_tool_prefix"; then | |
13024 | # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. | |
13025 | set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 | |
5213506e RW |
13026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13027 | $as_echo_n "checking for $ac_word... " >&6; } | |
13028 | if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : | |
13029 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13030 | else |
13031 | if test -n "$DSYMUTIL"; then | |
13032 | ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. | |
13033 | else | |
13034 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13035 | for as_dir in $PATH | |
13036 | do | |
13037 | IFS=$as_save_IFS | |
13038 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13039 | for ac_exec_ext in '' $ac_executable_extensions; do |
13040 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13041 | ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" |
5213506e | 13042 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13043 | break 2 |
13044 | fi | |
13045 | done | |
5213506e RW |
13046 | done |
13047 | IFS=$as_save_IFS | |
5d47bb02 PG |
13048 | |
13049 | fi | |
13050 | fi | |
13051 | DSYMUTIL=$ac_cv_prog_DSYMUTIL | |
13052 | if test -n "$DSYMUTIL"; then | |
5213506e RW |
13053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 |
13054 | $as_echo "$DSYMUTIL" >&6; } | |
5d47bb02 | 13055 | else |
5213506e RW |
13056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13057 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13058 | fi |
13059 | ||
5213506e | 13060 | |
5d47bb02 PG |
13061 | fi |
13062 | if test -z "$ac_cv_prog_DSYMUTIL"; then | |
13063 | ac_ct_DSYMUTIL=$DSYMUTIL | |
13064 | # Extract the first word of "dsymutil", so it can be a program name with args. | |
13065 | set dummy dsymutil; ac_word=$2 | |
5213506e RW |
13066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13067 | $as_echo_n "checking for $ac_word... " >&6; } | |
13068 | if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : | |
13069 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13070 | else |
13071 | if test -n "$ac_ct_DSYMUTIL"; then | |
13072 | ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. | |
13073 | else | |
13074 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13075 | for as_dir in $PATH | |
13076 | do | |
13077 | IFS=$as_save_IFS | |
13078 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13079 | for ac_exec_ext in '' $ac_executable_extensions; do |
13080 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13081 | ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" |
5213506e | 13082 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13083 | break 2 |
13084 | fi | |
13085 | done | |
5213506e RW |
13086 | done |
13087 | IFS=$as_save_IFS | |
5d47bb02 | 13088 | |
5d47bb02 PG |
13089 | fi |
13090 | fi | |
13091 | ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL | |
13092 | if test -n "$ac_ct_DSYMUTIL"; then | |
5213506e RW |
13093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 |
13094 | $as_echo "$ac_ct_DSYMUTIL" >&6; } | |
5d47bb02 | 13095 | else |
5213506e RW |
13096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13097 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13098 | fi |
13099 | ||
5213506e RW |
13100 | if test "x$ac_ct_DSYMUTIL" = x; then |
13101 | DSYMUTIL=":" | |
13102 | else | |
13103 | case $cross_compiling:$ac_tool_warned in | |
13104 | yes:) | |
13105 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13106 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13107 | ac_tool_warned=yes ;; | |
13108 | esac | |
13109 | DSYMUTIL=$ac_ct_DSYMUTIL | |
13110 | fi | |
5d47bb02 PG |
13111 | else |
13112 | DSYMUTIL="$ac_cv_prog_DSYMUTIL" | |
13113 | fi | |
13114 | ||
13115 | if test -n "$ac_tool_prefix"; then | |
13116 | # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. | |
13117 | set dummy ${ac_tool_prefix}nmedit; ac_word=$2 | |
5213506e RW |
13118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13119 | $as_echo_n "checking for $ac_word... " >&6; } | |
13120 | if test "${ac_cv_prog_NMEDIT+set}" = set; then : | |
13121 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13122 | else |
13123 | if test -n "$NMEDIT"; then | |
13124 | ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. | |
13125 | else | |
13126 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13127 | for as_dir in $PATH | |
13128 | do | |
13129 | IFS=$as_save_IFS | |
13130 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13131 | for ac_exec_ext in '' $ac_executable_extensions; do |
13132 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13133 | ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" |
5213506e | 13134 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13135 | break 2 |
13136 | fi | |
13137 | done | |
5213506e RW |
13138 | done |
13139 | IFS=$as_save_IFS | |
5d47bb02 PG |
13140 | |
13141 | fi | |
13142 | fi | |
13143 | NMEDIT=$ac_cv_prog_NMEDIT | |
13144 | if test -n "$NMEDIT"; then | |
5213506e RW |
13145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 |
13146 | $as_echo "$NMEDIT" >&6; } | |
5d47bb02 | 13147 | else |
5213506e RW |
13148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13149 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13150 | fi |
13151 | ||
5213506e | 13152 | |
5d47bb02 PG |
13153 | fi |
13154 | if test -z "$ac_cv_prog_NMEDIT"; then | |
13155 | ac_ct_NMEDIT=$NMEDIT | |
13156 | # Extract the first word of "nmedit", so it can be a program name with args. | |
13157 | set dummy nmedit; ac_word=$2 | |
5213506e RW |
13158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13159 | $as_echo_n "checking for $ac_word... " >&6; } | |
13160 | if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : | |
13161 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13162 | else |
13163 | if test -n "$ac_ct_NMEDIT"; then | |
13164 | ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. | |
13165 | else | |
13166 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13167 | for as_dir in $PATH | |
13168 | do | |
13169 | IFS=$as_save_IFS | |
13170 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13171 | for ac_exec_ext in '' $ac_executable_extensions; do |
13172 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13173 | ac_cv_prog_ac_ct_NMEDIT="nmedit" |
5213506e | 13174 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13175 | break 2 |
13176 | fi | |
13177 | done | |
5213506e RW |
13178 | done |
13179 | IFS=$as_save_IFS | |
5d47bb02 | 13180 | |
5d47bb02 PG |
13181 | fi |
13182 | fi | |
13183 | ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT | |
13184 | if test -n "$ac_ct_NMEDIT"; then | |
5213506e RW |
13185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 |
13186 | $as_echo "$ac_ct_NMEDIT" >&6; } | |
5d47bb02 | 13187 | else |
5213506e RW |
13188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13189 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13190 | fi |
13191 | ||
5213506e RW |
13192 | if test "x$ac_ct_NMEDIT" = x; then |
13193 | NMEDIT=":" | |
13194 | else | |
13195 | case $cross_compiling:$ac_tool_warned in | |
13196 | yes:) | |
13197 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13198 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13199 | ac_tool_warned=yes ;; | |
13200 | esac | |
13201 | NMEDIT=$ac_ct_NMEDIT | |
13202 | fi | |
5d47bb02 PG |
13203 | else |
13204 | NMEDIT="$ac_cv_prog_NMEDIT" | |
13205 | fi | |
13206 | ||
13207 | if test -n "$ac_tool_prefix"; then | |
13208 | # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. | |
13209 | set dummy ${ac_tool_prefix}lipo; ac_word=$2 | |
5213506e RW |
13210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13211 | $as_echo_n "checking for $ac_word... " >&6; } | |
13212 | if test "${ac_cv_prog_LIPO+set}" = set; then : | |
13213 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13214 | else |
13215 | if test -n "$LIPO"; then | |
13216 | ac_cv_prog_LIPO="$LIPO" # Let the user override the test. | |
13217 | else | |
13218 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13219 | for as_dir in $PATH | |
13220 | do | |
13221 | IFS=$as_save_IFS | |
13222 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13223 | for ac_exec_ext in '' $ac_executable_extensions; do |
13224 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13225 | ac_cv_prog_LIPO="${ac_tool_prefix}lipo" |
5213506e | 13226 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13227 | break 2 |
13228 | fi | |
13229 | done | |
5213506e RW |
13230 | done |
13231 | IFS=$as_save_IFS | |
5d47bb02 PG |
13232 | |
13233 | fi | |
13234 | fi | |
13235 | LIPO=$ac_cv_prog_LIPO | |
13236 | if test -n "$LIPO"; then | |
5213506e RW |
13237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 |
13238 | $as_echo "$LIPO" >&6; } | |
5d47bb02 | 13239 | else |
5213506e RW |
13240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13241 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13242 | fi |
13243 | ||
5213506e | 13244 | |
5d47bb02 PG |
13245 | fi |
13246 | if test -z "$ac_cv_prog_LIPO"; then | |
13247 | ac_ct_LIPO=$LIPO | |
13248 | # Extract the first word of "lipo", so it can be a program name with args. | |
13249 | set dummy lipo; ac_word=$2 | |
5213506e RW |
13250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13251 | $as_echo_n "checking for $ac_word... " >&6; } | |
13252 | if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : | |
13253 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13254 | else |
13255 | if test -n "$ac_ct_LIPO"; then | |
13256 | ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. | |
13257 | else | |
13258 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13259 | for as_dir in $PATH | |
13260 | do | |
13261 | IFS=$as_save_IFS | |
13262 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13263 | for ac_exec_ext in '' $ac_executable_extensions; do |
13264 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13265 | ac_cv_prog_ac_ct_LIPO="lipo" |
5213506e | 13266 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13267 | break 2 |
13268 | fi | |
13269 | done | |
5213506e RW |
13270 | done |
13271 | IFS=$as_save_IFS | |
5d47bb02 | 13272 | |
5d47bb02 PG |
13273 | fi |
13274 | fi | |
13275 | ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO | |
13276 | if test -n "$ac_ct_LIPO"; then | |
5213506e RW |
13277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 |
13278 | $as_echo "$ac_ct_LIPO" >&6; } | |
5d47bb02 | 13279 | else |
5213506e RW |
13280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13281 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13282 | fi |
13283 | ||
5213506e RW |
13284 | if test "x$ac_ct_LIPO" = x; then |
13285 | LIPO=":" | |
13286 | else | |
13287 | case $cross_compiling:$ac_tool_warned in | |
13288 | yes:) | |
13289 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13290 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13291 | ac_tool_warned=yes ;; | |
13292 | esac | |
13293 | LIPO=$ac_ct_LIPO | |
13294 | fi | |
5d47bb02 PG |
13295 | else |
13296 | LIPO="$ac_cv_prog_LIPO" | |
13297 | fi | |
13298 | ||
13299 | if test -n "$ac_tool_prefix"; then | |
13300 | # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. | |
13301 | set dummy ${ac_tool_prefix}otool; ac_word=$2 | |
5213506e RW |
13302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13303 | $as_echo_n "checking for $ac_word... " >&6; } | |
13304 | if test "${ac_cv_prog_OTOOL+set}" = set; then : | |
13305 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13306 | else |
13307 | if test -n "$OTOOL"; then | |
13308 | ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. | |
13309 | else | |
13310 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13311 | for as_dir in $PATH | |
13312 | do | |
13313 | IFS=$as_save_IFS | |
13314 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13315 | for ac_exec_ext in '' $ac_executable_extensions; do |
13316 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13317 | ac_cv_prog_OTOOL="${ac_tool_prefix}otool" |
5213506e | 13318 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13319 | break 2 |
13320 | fi | |
13321 | done | |
5213506e RW |
13322 | done |
13323 | IFS=$as_save_IFS | |
5d47bb02 PG |
13324 | |
13325 | fi | |
13326 | fi | |
13327 | OTOOL=$ac_cv_prog_OTOOL | |
13328 | if test -n "$OTOOL"; then | |
5213506e RW |
13329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 |
13330 | $as_echo "$OTOOL" >&6; } | |
5d47bb02 | 13331 | else |
5213506e RW |
13332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13333 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13334 | fi |
13335 | ||
5213506e | 13336 | |
5d47bb02 PG |
13337 | fi |
13338 | if test -z "$ac_cv_prog_OTOOL"; then | |
13339 | ac_ct_OTOOL=$OTOOL | |
13340 | # Extract the first word of "otool", so it can be a program name with args. | |
13341 | set dummy otool; ac_word=$2 | |
5213506e RW |
13342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13343 | $as_echo_n "checking for $ac_word... " >&6; } | |
13344 | if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : | |
13345 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13346 | else |
13347 | if test -n "$ac_ct_OTOOL"; then | |
13348 | ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. | |
13349 | else | |
13350 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13351 | for as_dir in $PATH | |
13352 | do | |
13353 | IFS=$as_save_IFS | |
13354 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13355 | for ac_exec_ext in '' $ac_executable_extensions; do |
13356 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13357 | ac_cv_prog_ac_ct_OTOOL="otool" |
5213506e | 13358 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13359 | break 2 |
13360 | fi | |
13361 | done | |
5213506e RW |
13362 | done |
13363 | IFS=$as_save_IFS | |
5d47bb02 | 13364 | |
5d47bb02 PG |
13365 | fi |
13366 | fi | |
13367 | ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL | |
13368 | if test -n "$ac_ct_OTOOL"; then | |
5213506e RW |
13369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 |
13370 | $as_echo "$ac_ct_OTOOL" >&6; } | |
5d47bb02 | 13371 | else |
5213506e RW |
13372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13373 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13374 | fi |
13375 | ||
5213506e RW |
13376 | if test "x$ac_ct_OTOOL" = x; then |
13377 | OTOOL=":" | |
13378 | else | |
13379 | case $cross_compiling:$ac_tool_warned in | |
13380 | yes:) | |
13381 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13382 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13383 | ac_tool_warned=yes ;; | |
13384 | esac | |
13385 | OTOOL=$ac_ct_OTOOL | |
13386 | fi | |
5d47bb02 PG |
13387 | else |
13388 | OTOOL="$ac_cv_prog_OTOOL" | |
13389 | fi | |
13390 | ||
13391 | if test -n "$ac_tool_prefix"; then | |
13392 | # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. | |
13393 | set dummy ${ac_tool_prefix}otool64; ac_word=$2 | |
5213506e RW |
13394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13395 | $as_echo_n "checking for $ac_word... " >&6; } | |
13396 | if test "${ac_cv_prog_OTOOL64+set}" = set; then : | |
13397 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13398 | else |
13399 | if test -n "$OTOOL64"; then | |
13400 | ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. | |
13401 | else | |
13402 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13403 | for as_dir in $PATH | |
13404 | do | |
13405 | IFS=$as_save_IFS | |
13406 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13407 | for ac_exec_ext in '' $ac_executable_extensions; do |
13408 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13409 | ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" |
5213506e | 13410 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13411 | break 2 |
13412 | fi | |
13413 | done | |
5213506e RW |
13414 | done |
13415 | IFS=$as_save_IFS | |
5d47bb02 PG |
13416 | |
13417 | fi | |
13418 | fi | |
13419 | OTOOL64=$ac_cv_prog_OTOOL64 | |
13420 | if test -n "$OTOOL64"; then | |
5213506e RW |
13421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 |
13422 | $as_echo "$OTOOL64" >&6; } | |
5d47bb02 | 13423 | else |
5213506e RW |
13424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13425 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13426 | fi |
13427 | ||
5213506e | 13428 | |
5d47bb02 PG |
13429 | fi |
13430 | if test -z "$ac_cv_prog_OTOOL64"; then | |
13431 | ac_ct_OTOOL64=$OTOOL64 | |
13432 | # Extract the first word of "otool64", so it can be a program name with args. | |
13433 | set dummy otool64; ac_word=$2 | |
5213506e RW |
13434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
13435 | $as_echo_n "checking for $ac_word... " >&6; } | |
13436 | if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : | |
13437 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13438 | else |
13439 | if test -n "$ac_ct_OTOOL64"; then | |
13440 | ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. | |
13441 | else | |
13442 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13443 | for as_dir in $PATH | |
13444 | do | |
13445 | IFS=$as_save_IFS | |
13446 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
13447 | for ac_exec_ext in '' $ac_executable_extensions; do |
13448 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5d47bb02 | 13449 | ac_cv_prog_ac_ct_OTOOL64="otool64" |
5213506e | 13450 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5d47bb02 PG |
13451 | break 2 |
13452 | fi | |
13453 | done | |
5213506e RW |
13454 | done |
13455 | IFS=$as_save_IFS | |
5d47bb02 | 13456 | |
5d47bb02 PG |
13457 | fi |
13458 | fi | |
13459 | ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 | |
13460 | if test -n "$ac_ct_OTOOL64"; then | |
5213506e RW |
13461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 |
13462 | $as_echo "$ac_ct_OTOOL64" >&6; } | |
5d47bb02 | 13463 | else |
5213506e RW |
13464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13465 | $as_echo "no" >&6; } | |
5d47bb02 PG |
13466 | fi |
13467 | ||
5213506e RW |
13468 | if test "x$ac_ct_OTOOL64" = x; then |
13469 | OTOOL64=":" | |
13470 | else | |
13471 | case $cross_compiling:$ac_tool_warned in | |
13472 | yes:) | |
13473 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
13474 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
13475 | ac_tool_warned=yes ;; | |
13476 | esac | |
13477 | OTOOL64=$ac_ct_OTOOL64 | |
13478 | fi | |
5d47bb02 PG |
13479 | else |
13480 | OTOOL64="$ac_cv_prog_OTOOL64" | |
13481 | fi | |
13482 | ||
13483 | ||
13484 | ||
13485 | ||
13486 | ||
13487 | ||
13488 | ||
13489 | ||
13490 | ||
13491 | ||
13492 | ||
13493 | ||
13494 | ||
13495 | ||
13496 | ||
13497 | ||
13498 | ||
13499 | ||
13500 | ||
13501 | ||
13502 | ||
13503 | ||
13504 | ||
13505 | ||
13506 | ||
13507 | ||
13508 | ||
5213506e RW |
13509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 |
13510 | $as_echo_n "checking for -single_module linker flag... " >&6; } | |
13511 | if test "${lt_cv_apple_cc_single_mod+set}" = set; then : | |
13512 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13513 | else |
13514 | lt_cv_apple_cc_single_mod=no | |
13515 | if test -z "${LT_MULTI_MODULE}"; then | |
13516 | # By default we will add the -single_module flag. You can override | |
13517 | # by either setting the environment variable LT_MULTI_MODULE | |
13518 | # non-empty at configure time, or by adding -multi_module to the | |
13519 | # link flags. | |
13520 | rm -rf libconftest.dylib* | |
13521 | echo "int foo(void){return 1;}" > conftest.c | |
13522 | echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
13523 | -dynamiclib -Wl,-single_module conftest.c" >&5 | |
13524 | $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
13525 | -dynamiclib -Wl,-single_module conftest.c 2>conftest.err | |
13526 | _lt_result=$? | |
13527 | if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then | |
13528 | lt_cv_apple_cc_single_mod=yes | |
13529 | else | |
13530 | cat conftest.err >&5 | |
13531 | fi | |
13532 | rm -rf libconftest.dylib* | |
13533 | rm -f conftest.* | |
13534 | fi | |
13535 | fi | |
5213506e RW |
13536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 |
13537 | $as_echo "$lt_cv_apple_cc_single_mod" >&6; } | |
13538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 | |
13539 | $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } | |
13540 | if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : | |
13541 | $as_echo_n "(cached) " >&6 | |
5d47bb02 PG |
13542 | else |
13543 | lt_cv_ld_exported_symbols_list=no | |
13544 | save_LDFLAGS=$LDFLAGS | |
13545 | echo "_main" > conftest.sym | |
13546 | LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" | |
5213506e | 13547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5d47bb02 PG |
13548 | /* end confdefs.h. */ |
13549 | ||
13550 | int | |
13551 | main () | |
13552 | { | |
13553 | ||
13554 | ; | |
13555 | return 0; | |
13556 | } | |
13557 | _ACEOF | |
5213506e | 13558 | if ac_fn_c_try_link "$LINENO"; then : |
5d47bb02 PG |
13559 | lt_cv_ld_exported_symbols_list=yes |
13560 | else | |
5213506e | 13561 | lt_cv_ld_exported_symbols_list=no |
5d47bb02 | 13562 | fi |
5213506e RW |
13563 | rm -f core conftest.err conftest.$ac_objext \ |
13564 | conftest$ac_exeext conftest.$ac_ext | |
5d47bb02 PG |
13565 | LDFLAGS="$save_LDFLAGS" |
13566 | ||
13567 | fi | |
5213506e RW |
13568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 |
13569 | $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } | |
43e02a8a RW |
13570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 |
13571 | $as_echo_n "checking for -force_load linker flag... " >&6; } | |
13572 | if test "${lt_cv_ld_force_load+set}" = set; then : | |
13573 | $as_echo_n "(cached) " >&6 | |
13574 | else | |
13575 | lt_cv_ld_force_load=no | |
13576 | cat > conftest.c << _LT_EOF | |
13577 | int forced_loaded() { return 2;} | |
13578 | _LT_EOF | |
13579 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 | |
13580 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | |
13581 | echo "$AR cru libconftest.a conftest.o" >&5 | |
13582 | $AR cru libconftest.a conftest.o 2>&5 | |
13583 | cat > conftest.c << _LT_EOF | |
13584 | int main() { return 0;} | |
13585 | _LT_EOF | |
13586 | echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 | |
13587 | $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err | |
13588 | _lt_result=$? | |
13589 | if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then | |
13590 | lt_cv_ld_force_load=yes | |
13591 | else | |
13592 | cat conftest.err >&5 | |
13593 | fi | |
13594 | rm -f conftest.err libconftest.a conftest conftest.c | |
13595 | rm -rf conftest.dSYM | |
13596 | ||
13597 | fi | |
13598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 | |
13599 | $as_echo "$lt_cv_ld_force_load" >&6; } | |
5d47bb02 PG |
13600 | case $host_os in |
13601 | rhapsody* | darwin1.[012]) | |
13602 | _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; | |
13603 | darwin1.*) | |
13604 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
13605 | darwin*) # darwin 5.x on | |
13606 | # if running on 10.5 or later, the deployment target defaults | |
13607 | # to the OS version, if on x86, and 10.4, the deployment | |
13608 | # target defaults to 10.4. Don't you love it? | |
13609 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
13610 | 10.0,*86*-darwin8*|10.0,*-darwin[91]*) | |
13611 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
13612 | 10.[012]*) | |
13613 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
13614 | 10.*) | |
13615 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
13616 | esac | |
13617 | ;; | |
13618 | esac | |
13619 | if test "$lt_cv_apple_cc_single_mod" = "yes"; then | |
13620 | _lt_dar_single_mod='$single_module' | |
13621 | fi | |
13622 | if test "$lt_cv_ld_exported_symbols_list" = "yes"; then | |
13623 | _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' | |
13624 | else | |
13625 | _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' | |
13626 | fi | |
43e02a8a | 13627 | if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then |
5d47bb02 PG |
13628 | _lt_dsymutil='~$DSYMUTIL $lib || :' |
13629 | else | |
13630 | _lt_dsymutil= | |
13631 | fi | |
13632 | ;; | |
13633 | esac | |
da0f6381 | 13634 | |
da0f6381 | 13635 | for ac_header in dlfcn.h |
5213506e RW |
13636 | do : |
13637 | ac_fn_c_check_header_preproc "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" | |
13638 | if test "x$ac_cv_header_dlfcn_h" = x""yes; then : | |
da0f6381 | 13639 | cat >>confdefs.h <<_ACEOF |
5213506e | 13640 | #define HAVE_DLFCN_H 1 |
da0f6381 PB |
13641 | _ACEOF |
13642 | ||
13643 | fi | |
13644 | done | |
13645 | ||
13646 | ||
13647 | ||
5d47bb02 PG |
13648 | |
13649 | ||
5213506e | 13650 | |
43e02a8a | 13651 | # Set options |
5d47bb02 | 13652 | |
43e02a8a RW |
13653 | |
13654 | ||
13655 | enable_dlopen=no | |
13656 | ||
13657 | ||
13658 | enable_win32_dll=no | |
13659 | ||
13660 | ||
13661 | # Check whether --enable-shared was given. | |
13662 | if test "${enable_shared+set}" = set; then : | |
13663 | enableval=$enable_shared; p=${PACKAGE-default} | |
13664 | case $enableval in | |
13665 | yes) enable_shared=yes ;; | |
13666 | no) enable_shared=no ;; | |
13667 | *) | |
13668 | enable_shared=no | |
13669 | # Look at the argument we got. We use all the common list separators. | |
13670 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
13671 | for pkg in $enableval; do | |
13672 | IFS="$lt_save_ifs" | |
13673 | if test "X$pkg" = "X$p"; then | |
13674 | enable_shared=yes | |
13675 | fi | |
13676 | done | |
13677 | IFS="$lt_save_ifs" | |
13678 | ;; | |
13679 | esac | |
5d47bb02 | 13680 | else |
43e02a8a | 13681 | enable_shared=yes |
5213506e RW |
13682 | fi |
13683 | ||
da0f6381 PB |
13684 | |
13685 | ||
13686 | ||
13687 | ||
13688 | ||
da0f6381 | 13689 | |
da0f6381 | 13690 | |
da0f6381 | 13691 | |
5213506e RW |
13692 | # Check whether --enable-static was given. |
13693 | if test "${enable_static+set}" = set; then : | |
13694 | enableval=$enable_static; p=${PACKAGE-default} | |
00020c16 ILT |
13695 | case $enableval in |
13696 | yes) enable_static=yes ;; | |
13697 | no) enable_static=no ;; | |
13698 | *) | |
13699 | enable_static=no | |
13700 | # Look at the argument we got. We use all the common list separators. | |
13701 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
13702 | for pkg in $enableval; do | |
13703 | IFS="$lt_save_ifs" | |
13704 | if test "X$pkg" = "X$p"; then | |
13705 | enable_static=yes | |
13706 | fi | |
13707 | done | |
13708 | IFS="$lt_save_ifs" | |
13709 | ;; | |
13710 | esac | |
da0f6381 | 13711 | else |
00020c16 | 13712 | enable_static=yes |
5213506e | 13713 | fi |
da0f6381 PB |
13714 | |
13715 | ||
da0f6381 | 13716 | |
da0f6381 | 13717 | |
da0f6381 | 13718 | |
da0f6381 PB |
13719 | |
13720 | ||
da0f6381 | 13721 | |
da0f6381 | 13722 | |
5213506e RW |
13723 | |
13724 | # Check whether --with-pic was given. | |
13725 | if test "${with_pic+set}" = set; then : | |
13726 | withval=$with_pic; pic_mode="$withval" | |
00020c16 ILT |
13727 | else |
13728 | pic_mode=default | |
5213506e RW |
13729 | fi |
13730 | ||
da0f6381 | 13731 | |
00020c16 | 13732 | test -z "$pic_mode" && pic_mode=default |
da0f6381 PB |
13733 | |
13734 | ||
13735 | ||
13736 | ||
13737 | ||
13738 | ||
13739 | ||
5213506e RW |
13740 | # Check whether --enable-fast-install was given. |
13741 | if test "${enable_fast_install+set}" = set; then : | |
13742 | enableval=$enable_fast_install; p=${PACKAGE-default} | |
00020c16 ILT |
13743 | case $enableval in |
13744 | yes) enable_fast_install=yes ;; | |
13745 | no) enable_fast_install=no ;; | |
13746 | *) | |
13747 | enable_fast_install=no | |
13748 | # Look at the argument we got. We use all the common list separators. | |
13749 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
13750 | for pkg in $enableval; do | |
13751 | IFS="$lt_save_ifs" | |
13752 | if test "X$pkg" = "X$p"; then | |
13753 | enable_fast_install=yes | |
13754 | fi | |
13755 | done | |
13756 | IFS="$lt_save_ifs" | |
13757 | ;; | |
13758 | esac | |
13759 | else | |
13760 | enable_fast_install=yes | |
5213506e RW |
13761 | fi |
13762 | ||
da0f6381 | 13763 | |
da0f6381 | 13764 | |
da0f6381 | 13765 | |
da0f6381 | 13766 | |
da0f6381 | 13767 | |
da0f6381 PB |
13768 | |
13769 | ||
da0f6381 | 13770 | |
da0f6381 | 13771 | |
da0f6381 | 13772 | |
00020c16 ILT |
13773 | # This can be used to rebuild libtool when needed |
13774 | LIBTOOL_DEPS="$ltmain" | |
da0f6381 | 13775 | |
00020c16 ILT |
13776 | # Always use our own libtool. |
13777 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
da0f6381 | 13778 | |
da0f6381 | 13779 | |
da0f6381 PB |
13780 | |
13781 | ||
13782 | ||
13783 | ||
13784 | ||
13785 | ||
da0f6381 | 13786 | |
da0f6381 | 13787 | |
da0f6381 | 13788 | |
da0f6381 | 13789 | |
da0f6381 | 13790 | |
da0f6381 | 13791 | |
da0f6381 | 13792 | |
da0f6381 | 13793 | |
da0f6381 | 13794 | |
da0f6381 | 13795 | |
da0f6381 | 13796 | |
da0f6381 | 13797 | |
da0f6381 | 13798 | |
da0f6381 | 13799 | |
da0f6381 | 13800 | |
43e02a8a | 13801 | |
da0f6381 | 13802 | |
da0f6381 | 13803 | |
00020c16 | 13804 | test -z "$LN_S" && LN_S="ln -s" |
da0f6381 | 13805 | |
da0f6381 | 13806 | |
da0f6381 | 13807 | |
da0f6381 | 13808 | |
da0f6381 | 13809 | |
da0f6381 | 13810 | |
da0f6381 | 13811 | |
da0f6381 | 13812 | |
da0f6381 | 13813 | |
da0f6381 | 13814 | |
da0f6381 | 13815 | |
da0f6381 | 13816 | |
da0f6381 | 13817 | |
da0f6381 | 13818 | |
00020c16 ILT |
13819 | if test -n "${ZSH_VERSION+set}" ; then |
13820 | setopt NO_GLOB_SUBST | |
13821 | fi | |
da0f6381 | 13822 | |
5213506e RW |
13823 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 |
13824 | $as_echo_n "checking for objdir... " >&6; } | |
13825 | if test "${lt_cv_objdir+set}" = set; then : | |
13826 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
13827 | else |
13828 | rm -f .libs 2>/dev/null | |
13829 | mkdir .libs 2>/dev/null | |
13830 | if test -d .libs; then | |
13831 | lt_cv_objdir=.libs | |
13832 | else | |
13833 | # MS-DOS does not allow filenames that begin with a dot. | |
13834 | lt_cv_objdir=_libs | |
13835 | fi | |
13836 | rmdir .libs 2>/dev/null | |
13837 | fi | |
5213506e RW |
13838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 |
13839 | $as_echo "$lt_cv_objdir" >&6; } | |
00020c16 | 13840 | objdir=$lt_cv_objdir |
da0f6381 PB |
13841 | |
13842 | ||
13843 | ||
13844 | ||
da0f6381 | 13845 | |
00020c16 ILT |
13846 | cat >>confdefs.h <<_ACEOF |
13847 | #define LT_OBJDIR "$lt_cv_objdir/" | |
13848 | _ACEOF | |
da0f6381 | 13849 | |
da0f6381 | 13850 | |
da0f6381 PB |
13851 | |
13852 | ||
00020c16 ILT |
13853 | case $host_os in |
13854 | aix3*) | |
13855 | # AIX sometimes has problems with the GCC collect2 program. For some | |
13856 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
13857 | # vanish in a puff of smoke. | |
13858 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
13859 | COLLECT_NAMES= | |
13860 | export COLLECT_NAMES | |
13861 | fi | |
13862 | ;; | |
13863 | esac | |
da0f6381 | 13864 | |
00020c16 ILT |
13865 | # Global variables: |
13866 | ofile=libtool | |
13867 | can_build_shared=yes | |
da0f6381 | 13868 | |
00020c16 ILT |
13869 | # All known linkers require a `.a' archive for static linking (except MSVC, |
13870 | # which needs '.lib'). | |
13871 | libext=a | |
da0f6381 | 13872 | |
00020c16 | 13873 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
da0f6381 | 13874 | |
00020c16 ILT |
13875 | old_CC="$CC" |
13876 | old_CFLAGS="$CFLAGS" | |
da0f6381 | 13877 | |
00020c16 ILT |
13878 | # Set sane defaults for various variables |
13879 | test -z "$CC" && CC=cc | |
13880 | test -z "$LTCC" && LTCC=$CC | |
13881 | test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS | |
13882 | test -z "$LD" && LD=ld | |
13883 | test -z "$ac_objext" && ac_objext=o | |
da0f6381 | 13884 | |
00020c16 ILT |
13885 | for cc_temp in $compiler""; do |
13886 | case $cc_temp in | |
13887 | compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; | |
13888 | distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; | |
13889 | \-*) ;; | |
13890 | *) break;; | |
13891 | esac | |
13892 | done | |
43e02a8a | 13893 | cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` |
da0f6381 PB |
13894 | |
13895 | ||
00020c16 ILT |
13896 | # Only perform the check for file, if the check method requires it |
13897 | test -z "$MAGIC_CMD" && MAGIC_CMD=file | |
13898 | case $deplibs_check_method in | |
13899 | file_magic*) | |
13900 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
5213506e RW |
13901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 |
13902 | $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } | |
13903 | if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : | |
13904 | $as_echo_n "(cached) " >&6 | |
da0f6381 | 13905 | else |
00020c16 ILT |
13906 | case $MAGIC_CMD in |
13907 | [\\/*] | ?:[\\/]*) | |
13908 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
13909 | ;; | |
13910 | *) | |
13911 | lt_save_MAGIC_CMD="$MAGIC_CMD" | |
13912 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
13913 | ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" | |
13914 | for ac_dir in $ac_dummy; do | |
13915 | IFS="$lt_save_ifs" | |
13916 | test -z "$ac_dir" && ac_dir=. | |
13917 | if test -f $ac_dir/${ac_tool_prefix}file; then | |
13918 | lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" | |
13919 | if test -n "$file_magic_test_file"; then | |
13920 | case $deplibs_check_method in | |
13921 | "file_magic "*) | |
13922 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | |
13923 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
13924 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
13925 | $EGREP "$file_magic_regex" > /dev/null; then | |
13926 | : | |
13927 | else | |
13928 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 13929 | |
00020c16 ILT |
13930 | *** Warning: the command libtool uses to detect shared libraries, |
13931 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
13932 | *** The result is that libtool may fail to recognize shared libraries | |
13933 | *** as such. This will affect the creation of libtool libraries that | |
13934 | *** depend on shared libraries, but programs linked with such libtool | |
13935 | *** libraries will work regardless of this problem. Nevertheless, you | |
13936 | *** may want to report the problem to your system manager and/or to | |
13937 | *** bug-libtool@gnu.org | |
da0f6381 | 13938 | |
00020c16 ILT |
13939 | _LT_EOF |
13940 | fi ;; | |
13941 | esac | |
13942 | fi | |
13943 | break | |
13944 | fi | |
13945 | done | |
13946 | IFS="$lt_save_ifs" | |
13947 | MAGIC_CMD="$lt_save_MAGIC_CMD" | |
13948 | ;; | |
13949 | esac | |
13950 | fi | |
da0f6381 | 13951 | |
00020c16 ILT |
13952 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
13953 | if test -n "$MAGIC_CMD"; then | |
5213506e RW |
13954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 |
13955 | $as_echo "$MAGIC_CMD" >&6; } | |
00020c16 | 13956 | else |
5213506e RW |
13957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13958 | $as_echo "no" >&6; } | |
00020c16 | 13959 | fi |
da0f6381 PB |
13960 | |
13961 | ||
13962 | ||
da0f6381 | 13963 | |
da0f6381 | 13964 | |
00020c16 ILT |
13965 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
13966 | if test -n "$ac_tool_prefix"; then | |
5213506e RW |
13967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 |
13968 | $as_echo_n "checking for file... " >&6; } | |
13969 | if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : | |
13970 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
13971 | else |
13972 | case $MAGIC_CMD in | |
13973 | [\\/*] | ?:[\\/]*) | |
13974 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
13975 | ;; | |
13976 | *) | |
13977 | lt_save_MAGIC_CMD="$MAGIC_CMD" | |
13978 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
13979 | ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" | |
13980 | for ac_dir in $ac_dummy; do | |
13981 | IFS="$lt_save_ifs" | |
13982 | test -z "$ac_dir" && ac_dir=. | |
13983 | if test -f $ac_dir/file; then | |
13984 | lt_cv_path_MAGIC_CMD="$ac_dir/file" | |
13985 | if test -n "$file_magic_test_file"; then | |
13986 | case $deplibs_check_method in | |
13987 | "file_magic "*) | |
13988 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | |
13989 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
13990 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
13991 | $EGREP "$file_magic_regex" > /dev/null; then | |
13992 | : | |
13993 | else | |
13994 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 13995 | |
00020c16 ILT |
13996 | *** Warning: the command libtool uses to detect shared libraries, |
13997 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
13998 | *** The result is that libtool may fail to recognize shared libraries | |
13999 | *** as such. This will affect the creation of libtool libraries that | |
14000 | *** depend on shared libraries, but programs linked with such libtool | |
14001 | *** libraries will work regardless of this problem. Nevertheless, you | |
14002 | *** may want to report the problem to your system manager and/or to | |
14003 | *** bug-libtool@gnu.org | |
da0f6381 | 14004 | |
00020c16 ILT |
14005 | _LT_EOF |
14006 | fi ;; | |
14007 | esac | |
14008 | fi | |
14009 | break | |
da0f6381 | 14010 | fi |
00020c16 ILT |
14011 | done |
14012 | IFS="$lt_save_ifs" | |
14013 | MAGIC_CMD="$lt_save_MAGIC_CMD" | |
14014 | ;; | |
14015 | esac | |
14016 | fi | |
da0f6381 | 14017 | |
00020c16 ILT |
14018 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
14019 | if test -n "$MAGIC_CMD"; then | |
5213506e RW |
14020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 |
14021 | $as_echo "$MAGIC_CMD" >&6; } | |
00020c16 | 14022 | else |
5213506e RW |
14023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14024 | $as_echo "no" >&6; } | |
00020c16 | 14025 | fi |
da0f6381 | 14026 | |
da0f6381 | 14027 | |
00020c16 ILT |
14028 | else |
14029 | MAGIC_CMD=: | |
14030 | fi | |
14031 | fi | |
da0f6381 | 14032 | |
00020c16 ILT |
14033 | fi |
14034 | ;; | |
14035 | esac | |
da0f6381 | 14036 | |
00020c16 | 14037 | # Use C for the default configuration in the libtool script |
da0f6381 | 14038 | |
00020c16 ILT |
14039 | lt_save_CC="$CC" |
14040 | ac_ext=c | |
14041 | ac_cpp='$CPP $CPPFLAGS' | |
14042 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14043 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14044 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
da0f6381 | 14045 | |
da0f6381 | 14046 | |
00020c16 ILT |
14047 | # Source file extension for C test sources. |
14048 | ac_ext=c | |
da0f6381 | 14049 | |
00020c16 ILT |
14050 | # Object file extension for compiled C test sources. |
14051 | objext=o | |
14052 | objext=$objext | |
da0f6381 | 14053 | |
00020c16 ILT |
14054 | # Code to be used in simple compile tests |
14055 | lt_simple_compile_test_code="int some_variable = 0;" | |
5d47bb02 | 14056 | |
00020c16 ILT |
14057 | # Code to be used in simple link tests |
14058 | lt_simple_link_test_code='int main(){return(0);}' | |
da0f6381 | 14059 | |
da0f6381 | 14060 | |
da0f6381 | 14061 | |
da0f6381 | 14062 | |
00020c16 ILT |
14063 | |
14064 | ||
14065 | ||
14066 | # If no C compiler was specified, use CC. | |
14067 | LTCC=${LTCC-"$CC"} | |
14068 | ||
14069 | # If no C compiler flags were specified, use CFLAGS. | |
14070 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
14071 | ||
14072 | # Allow CC to be a program name with arguments. | |
14073 | compiler=$CC | |
14074 | ||
14075 | # Save the default compiler, since it gets overwritten when the other | |
14076 | # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. | |
14077 | compiler_DEFAULT=$CC | |
14078 | ||
14079 | # save warnings/boilerplate of simple test code | |
14080 | ac_outfile=conftest.$ac_objext | |
14081 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext | |
14082 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
14083 | _lt_compiler_boilerplate=`cat conftest.err` | |
14084 | $RM conftest* | |
14085 | ||
14086 | ac_outfile=conftest.$ac_objext | |
14087 | echo "$lt_simple_link_test_code" >conftest.$ac_ext | |
14088 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
14089 | _lt_linker_boilerplate=`cat conftest.err` | |
14090 | $RM -r conftest* | |
14091 | ||
14092 | ||
14093 | ## CAVEAT EMPTOR: | |
14094 | ## There is no encapsulation within the following macros, do not change | |
14095 | ## the running order or otherwise move them around unless you know exactly | |
14096 | ## what you are doing... | |
14097 | if test -n "$compiler"; then | |
14098 | ||
14099 | lt_prog_compiler_no_builtin_flag= | |
14100 | ||
14101 | if test "$GCC" = yes; then | |
43e02a8a RW |
14102 | case $cc_basename in |
14103 | nvcc*) | |
14104 | lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; | |
14105 | *) | |
14106 | lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; | |
14107 | esac | |
00020c16 | 14108 | |
5213506e RW |
14109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 |
14110 | $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } | |
14111 | if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : | |
14112 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14113 | else |
14114 | lt_cv_prog_compiler_rtti_exceptions=no | |
14115 | ac_outfile=conftest.$ac_objext | |
14116 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
14117 | lt_compiler_flag="-fno-rtti -fno-exceptions" | |
14118 | # Insert the option either (1) after the last *FLAGS variable, or | |
14119 | # (2) before a word containing "conftest.", or (3) at the end. | |
14120 | # Note that $ac_compile itself does not contain backslashes and begins | |
14121 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14122 | # The option is referenced via a variable to avoid confusing sed. | |
14123 | lt_compile=`echo "$ac_compile" | $SED \ | |
14124 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14125 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14126 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14127 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14128 | (eval "$lt_compile" 2>conftest.err) |
14129 | ac_status=$? | |
14130 | cat conftest.err >&5 | |
43e02a8a | 14131 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14132 | if (exit $ac_status) && test -s "$ac_outfile"; then |
14133 | # The compiler can only warn and ignore the option if not recognized | |
14134 | # So say no if there are warnings other than the usual output. | |
43e02a8a | 14135 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp |
00020c16 ILT |
14136 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
14137 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
14138 | lt_cv_prog_compiler_rtti_exceptions=yes | |
14139 | fi | |
14140 | fi | |
14141 | $RM conftest* | |
14142 | ||
14143 | fi | |
5213506e RW |
14144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 |
14145 | $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } | |
00020c16 ILT |
14146 | |
14147 | if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then | |
14148 | lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" | |
14149 | else | |
14150 | : | |
14151 | fi | |
14152 | ||
14153 | fi | |
14154 | ||
14155 | ||
14156 | ||
14157 | ||
14158 | ||
14159 | ||
14160 | lt_prog_compiler_wl= | |
14161 | lt_prog_compiler_pic= | |
14162 | lt_prog_compiler_static= | |
14163 | ||
5213506e RW |
14164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 |
14165 | $as_echo_n "checking for $compiler option to produce PIC... " >&6; } | |
00020c16 ILT |
14166 | |
14167 | if test "$GCC" = yes; then | |
14168 | lt_prog_compiler_wl='-Wl,' | |
14169 | lt_prog_compiler_static='-static' | |
14170 | ||
14171 | case $host_os in | |
14172 | aix*) | |
14173 | # All AIX code is PIC. | |
14174 | if test "$host_cpu" = ia64; then | |
14175 | # AIX 5 now supports IA64 processor | |
14176 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14177 | fi |
14178 | ;; | |
14179 | ||
00020c16 ILT |
14180 | amigaos*) |
14181 | case $host_cpu in | |
14182 | powerpc) | |
14183 | # see comment about AmigaOS4 .so support | |
14184 | lt_prog_compiler_pic='-fPIC' | |
14185 | ;; | |
14186 | m68k) | |
14187 | # FIXME: we need at least 68020 code to build shared libraries, but | |
14188 | # adding the `-m68020' flag to GCC prevents building anything better, | |
14189 | # like `-m68040'. | |
14190 | lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' | |
14191 | ;; | |
14192 | esac | |
14193 | ;; | |
da0f6381 | 14194 | |
00020c16 ILT |
14195 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
14196 | # PIC is the default for these OSes. | |
14197 | ;; | |
da0f6381 | 14198 | |
00020c16 ILT |
14199 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
14200 | # This hack is so that the source file can tell whether it is being | |
14201 | # built for inclusion in a dll (and should export symbols for example). | |
14202 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
14203 | # (--disable-auto-import) libraries | |
14204 | lt_prog_compiler_pic='-DDLL_EXPORT' | |
14205 | ;; | |
14206 | ||
14207 | darwin* | rhapsody*) | |
14208 | # PIC is the default on this platform | |
14209 | # Common symbols not allowed in MH_DYLIB files | |
14210 | lt_prog_compiler_pic='-fno-common' | |
14211 | ;; | |
14212 | ||
43e02a8a RW |
14213 | haiku*) |
14214 | # PIC is the default for Haiku. | |
14215 | # The "-static" flag exists, but is broken. | |
14216 | lt_prog_compiler_static= | |
14217 | ;; | |
14218 | ||
00020c16 ILT |
14219 | hpux*) |
14220 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
14221 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
14222 | # sets the default TLS model and affects inlining. | |
14223 | case $host_cpu in | |
14224 | hppa*64*) | |
14225 | # +Z the default | |
da0f6381 | 14226 | ;; |
00020c16 ILT |
14227 | *) |
14228 | lt_prog_compiler_pic='-fPIC' | |
da0f6381 PB |
14229 | ;; |
14230 | esac | |
14231 | ;; | |
14232 | ||
00020c16 ILT |
14233 | interix[3-9]*) |
14234 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
14235 | # Instead, we relocate shared libraries at runtime. | |
da0f6381 PB |
14236 | ;; |
14237 | ||
00020c16 ILT |
14238 | msdosdjgpp*) |
14239 | # Just because we use GCC doesn't mean we suddenly get shared libraries | |
14240 | # on systems that don't support them. | |
14241 | lt_prog_compiler_can_build_shared=no | |
14242 | enable_shared=no | |
da0f6381 | 14243 | ;; |
da0f6381 | 14244 | |
00020c16 ILT |
14245 | *nto* | *qnx*) |
14246 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
14247 | # it will coredump. | |
14248 | lt_prog_compiler_pic='-fPIC -shared' | |
14249 | ;; | |
14250 | ||
14251 | sysv4*MP*) | |
14252 | if test -d /usr/nec; then | |
14253 | lt_prog_compiler_pic=-Kconform_pic | |
da0f6381 PB |
14254 | fi |
14255 | ;; | |
14256 | ||
43e02a8a RW |
14257 | *) |
14258 | lt_prog_compiler_pic='-fPIC' | |
14259 | ;; | |
14260 | esac | |
14261 | ||
14262 | case $cc_basename in | |
14263 | nvcc*) # Cuda Compiler Driver 2.2 | |
14264 | lt_prog_compiler_wl='-Xlinker ' | |
14265 | lt_prog_compiler_pic='-Xcompiler -fPIC' | |
00020c16 ILT |
14266 | ;; |
14267 | esac | |
14268 | else | |
14269 | # PORTME Check for flag to pass linker flags through the system compiler. | |
14270 | case $host_os in | |
14271 | aix*) | |
14272 | lt_prog_compiler_wl='-Wl,' | |
da0f6381 | 14273 | if test "$host_cpu" = ia64; then |
00020c16 ILT |
14274 | # AIX 5 now supports IA64 processor |
14275 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 | 14276 | else |
00020c16 | 14277 | lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' |
da0f6381 | 14278 | fi |
00020c16 | 14279 | ;; |
da0f6381 | 14280 | |
00020c16 ILT |
14281 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
14282 | # This hack is so that the source file can tell whether it is being | |
14283 | # built for inclusion in a dll (and should export symbols for example). | |
14284 | lt_prog_compiler_pic='-DDLL_EXPORT' | |
14285 | ;; | |
da0f6381 | 14286 | |
00020c16 ILT |
14287 | hpux9* | hpux10* | hpux11*) |
14288 | lt_prog_compiler_wl='-Wl,' | |
14289 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | |
14290 | # not for PA HP-UX. | |
14291 | case $host_cpu in | |
14292 | hppa*64*|ia64*) | |
14293 | # +Z the default | |
14294 | ;; | |
14295 | *) | |
14296 | lt_prog_compiler_pic='+Z' | |
14297 | ;; | |
14298 | esac | |
14299 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | |
14300 | lt_prog_compiler_static='${wl}-a ${wl}archive' | |
14301 | ;; | |
da0f6381 | 14302 | |
00020c16 ILT |
14303 | irix5* | irix6* | nonstopux*) |
14304 | lt_prog_compiler_wl='-Wl,' | |
14305 | # PIC (with -KPIC) is the default. | |
14306 | lt_prog_compiler_static='-non_shared' | |
14307 | ;; | |
14308 | ||
14309 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
14310 | case $cc_basename in | |
14311 | # old Intel for x86_64 which still supported -KPIC. | |
14312 | ecc*) | |
14313 | lt_prog_compiler_wl='-Wl,' | |
14314 | lt_prog_compiler_pic='-KPIC' | |
14315 | lt_prog_compiler_static='-static' | |
14316 | ;; | |
14317 | # icc used to be incompatible with GCC. | |
14318 | # ICC 10 doesn't accept -KPIC any more. | |
14319 | icc* | ifort*) | |
14320 | lt_prog_compiler_wl='-Wl,' | |
14321 | lt_prog_compiler_pic='-fPIC' | |
14322 | lt_prog_compiler_static='-static' | |
14323 | ;; | |
14324 | # Lahey Fortran 8.1. | |
14325 | lf95*) | |
14326 | lt_prog_compiler_wl='-Wl,' | |
14327 | lt_prog_compiler_pic='--shared' | |
14328 | lt_prog_compiler_static='--static' | |
14329 | ;; | |
43e02a8a | 14330 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) |
00020c16 ILT |
14331 | # Portland Group compilers (*not* the Pentium gcc compiler, |
14332 | # which looks to be a dead project) | |
14333 | lt_prog_compiler_wl='-Wl,' | |
14334 | lt_prog_compiler_pic='-fpic' | |
14335 | lt_prog_compiler_static='-Bstatic' | |
14336 | ;; | |
14337 | ccc*) | |
14338 | lt_prog_compiler_wl='-Wl,' | |
14339 | # All Alpha code is PIC. | |
14340 | lt_prog_compiler_static='-non_shared' | |
14341 | ;; | |
43e02a8a RW |
14342 | xl* | bgxl* | bgf* | mpixl*) |
14343 | # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene | |
00020c16 ILT |
14344 | lt_prog_compiler_wl='-Wl,' |
14345 | lt_prog_compiler_pic='-qpic' | |
14346 | lt_prog_compiler_static='-qstaticlink' | |
14347 | ;; | |
14348 | *) | |
14349 | case `$CC -V 2>&1 | sed 5q` in | |
43e02a8a RW |
14350 | *Sun\ F* | *Sun*Fortran*) |
14351 | # Sun Fortran 8.3 passes all unrecognized flags to the linker | |
00020c16 ILT |
14352 | lt_prog_compiler_pic='-KPIC' |
14353 | lt_prog_compiler_static='-Bstatic' | |
43e02a8a | 14354 | lt_prog_compiler_wl='' |
00020c16 | 14355 | ;; |
43e02a8a RW |
14356 | *Sun\ C*) |
14357 | # Sun C 5.9 | |
00020c16 ILT |
14358 | lt_prog_compiler_pic='-KPIC' |
14359 | lt_prog_compiler_static='-Bstatic' | |
43e02a8a | 14360 | lt_prog_compiler_wl='-Wl,' |
da0f6381 PB |
14361 | ;; |
14362 | esac | |
00020c16 ILT |
14363 | ;; |
14364 | esac | |
14365 | ;; | |
da0f6381 | 14366 | |
00020c16 ILT |
14367 | newsos6) |
14368 | lt_prog_compiler_pic='-KPIC' | |
14369 | lt_prog_compiler_static='-Bstatic' | |
14370 | ;; | |
da0f6381 | 14371 | |
00020c16 ILT |
14372 | *nto* | *qnx*) |
14373 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
14374 | # it will coredump. | |
14375 | lt_prog_compiler_pic='-fPIC -shared' | |
14376 | ;; | |
da0f6381 | 14377 | |
00020c16 ILT |
14378 | osf3* | osf4* | osf5*) |
14379 | lt_prog_compiler_wl='-Wl,' | |
14380 | # All OSF/1 code is PIC. | |
14381 | lt_prog_compiler_static='-non_shared' | |
14382 | ;; | |
da0f6381 | 14383 | |
00020c16 ILT |
14384 | rdos*) |
14385 | lt_prog_compiler_static='-non_shared' | |
da0f6381 PB |
14386 | ;; |
14387 | ||
00020c16 ILT |
14388 | solaris*) |
14389 | lt_prog_compiler_pic='-KPIC' | |
14390 | lt_prog_compiler_static='-Bstatic' | |
14391 | case $cc_basename in | |
14392 | f77* | f90* | f95*) | |
14393 | lt_prog_compiler_wl='-Qoption ld ';; | |
14394 | *) | |
14395 | lt_prog_compiler_wl='-Wl,';; | |
5d47bb02 | 14396 | esac |
da0f6381 PB |
14397 | ;; |
14398 | ||
00020c16 ILT |
14399 | sunos4*) |
14400 | lt_prog_compiler_wl='-Qoption ld ' | |
14401 | lt_prog_compiler_pic='-PIC' | |
14402 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14403 | ;; |
14404 | ||
00020c16 ILT |
14405 | sysv4 | sysv4.2uw2* | sysv4.3*) |
14406 | lt_prog_compiler_wl='-Wl,' | |
14407 | lt_prog_compiler_pic='-KPIC' | |
14408 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14409 | ;; |
14410 | ||
00020c16 ILT |
14411 | sysv4*MP*) |
14412 | if test -d /usr/nec ;then | |
14413 | lt_prog_compiler_pic='-Kconform_pic' | |
14414 | lt_prog_compiler_static='-Bstatic' | |
14415 | fi | |
da0f6381 PB |
14416 | ;; |
14417 | ||
00020c16 ILT |
14418 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
14419 | lt_prog_compiler_wl='-Wl,' | |
14420 | lt_prog_compiler_pic='-KPIC' | |
14421 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14422 | ;; |
14423 | ||
00020c16 ILT |
14424 | unicos*) |
14425 | lt_prog_compiler_wl='-Wl,' | |
14426 | lt_prog_compiler_can_build_shared=no | |
da0f6381 PB |
14427 | ;; |
14428 | ||
00020c16 ILT |
14429 | uts4*) |
14430 | lt_prog_compiler_pic='-pic' | |
14431 | lt_prog_compiler_static='-Bstatic' | |
da0f6381 PB |
14432 | ;; |
14433 | ||
00020c16 ILT |
14434 | *) |
14435 | lt_prog_compiler_can_build_shared=no | |
da0f6381 | 14436 | ;; |
00020c16 ILT |
14437 | esac |
14438 | fi | |
da0f6381 | 14439 | |
00020c16 ILT |
14440 | case $host_os in |
14441 | # For platforms which do not support PIC, -DPIC is meaningless: | |
14442 | *djgpp*) | |
14443 | lt_prog_compiler_pic= | |
14444 | ;; | |
14445 | *) | |
14446 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | |
14447 | ;; | |
14448 | esac | |
5213506e RW |
14449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 |
14450 | $as_echo "$lt_prog_compiler_pic" >&6; } | |
da0f6381 | 14451 | |
da0f6381 | 14452 | |
da0f6381 | 14453 | |
da0f6381 | 14454 | |
da0f6381 | 14455 | |
da0f6381 | 14456 | |
00020c16 ILT |
14457 | # |
14458 | # Check to make sure the PIC flag actually works. | |
14459 | # | |
14460 | if test -n "$lt_prog_compiler_pic"; then | |
5213506e RW |
14461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 |
14462 | $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } | |
14463 | if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : | |
14464 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14465 | else |
14466 | lt_cv_prog_compiler_pic_works=no | |
14467 | ac_outfile=conftest.$ac_objext | |
14468 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
14469 | lt_compiler_flag="$lt_prog_compiler_pic -DPIC" | |
14470 | # Insert the option either (1) after the last *FLAGS variable, or | |
14471 | # (2) before a word containing "conftest.", or (3) at the end. | |
14472 | # Note that $ac_compile itself does not contain backslashes and begins | |
14473 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14474 | # The option is referenced via a variable to avoid confusing sed. | |
14475 | lt_compile=`echo "$ac_compile" | $SED \ | |
14476 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14477 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14478 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14479 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14480 | (eval "$lt_compile" 2>conftest.err) |
14481 | ac_status=$? | |
14482 | cat conftest.err >&5 | |
43e02a8a | 14483 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14484 | if (exit $ac_status) && test -s "$ac_outfile"; then |
14485 | # The compiler can only warn and ignore the option if not recognized | |
14486 | # So say no if there are warnings other than the usual output. | |
43e02a8a | 14487 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp |
00020c16 ILT |
14488 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
14489 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
14490 | lt_cv_prog_compiler_pic_works=yes | |
14491 | fi | |
14492 | fi | |
14493 | $RM conftest* | |
da0f6381 | 14494 | |
00020c16 | 14495 | fi |
5213506e RW |
14496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 |
14497 | $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } | |
da0f6381 | 14498 | |
00020c16 ILT |
14499 | if test x"$lt_cv_prog_compiler_pic_works" = xyes; then |
14500 | case $lt_prog_compiler_pic in | |
14501 | "" | " "*) ;; | |
14502 | *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; | |
14503 | esac | |
da0f6381 | 14504 | else |
00020c16 ILT |
14505 | lt_prog_compiler_pic= |
14506 | lt_prog_compiler_can_build_shared=no | |
da0f6381 | 14507 | fi |
da0f6381 | 14508 | |
00020c16 | 14509 | fi |
da0f6381 | 14510 | |
da0f6381 | 14511 | |
da0f6381 | 14512 | |
da0f6381 | 14513 | |
da0f6381 | 14514 | |
da0f6381 | 14515 | |
00020c16 ILT |
14516 | # |
14517 | # Check to make sure the static flag actually works. | |
14518 | # | |
14519 | wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" | |
5213506e RW |
14520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 |
14521 | $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } | |
14522 | if test "${lt_cv_prog_compiler_static_works+set}" = set; then : | |
14523 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14524 | else |
14525 | lt_cv_prog_compiler_static_works=no | |
14526 | save_LDFLAGS="$LDFLAGS" | |
14527 | LDFLAGS="$LDFLAGS $lt_tmp_static_flag" | |
14528 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
14529 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
14530 | # The linker can only warn and ignore the option if not recognized | |
14531 | # So say no if there are warnings | |
14532 | if test -s conftest.err; then | |
14533 | # Append any errors to the config.log. | |
14534 | cat conftest.err 1>&5 | |
43e02a8a | 14535 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp |
00020c16 ILT |
14536 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
14537 | if diff conftest.exp conftest.er2 >/dev/null; then | |
14538 | lt_cv_prog_compiler_static_works=yes | |
14539 | fi | |
14540 | else | |
14541 | lt_cv_prog_compiler_static_works=yes | |
14542 | fi | |
14543 | fi | |
14544 | $RM -r conftest* | |
14545 | LDFLAGS="$save_LDFLAGS" | |
da0f6381 | 14546 | |
00020c16 | 14547 | fi |
5213506e RW |
14548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 |
14549 | $as_echo "$lt_cv_prog_compiler_static_works" >&6; } | |
da0f6381 | 14550 | |
00020c16 ILT |
14551 | if test x"$lt_cv_prog_compiler_static_works" = xyes; then |
14552 | : | |
14553 | else | |
14554 | lt_prog_compiler_static= | |
14555 | fi | |
da0f6381 | 14556 | |
da0f6381 | 14557 | |
da0f6381 | 14558 | |
da0f6381 | 14559 | |
da0f6381 | 14560 | |
da0f6381 | 14561 | |
da0f6381 | 14562 | |
5213506e RW |
14563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
14564 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
14565 | if test "${lt_cv_prog_compiler_c_o+set}" = set; then : | |
14566 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14567 | else |
14568 | lt_cv_prog_compiler_c_o=no | |
14569 | $RM -r conftest 2>/dev/null | |
14570 | mkdir conftest | |
14571 | cd conftest | |
14572 | mkdir out | |
14573 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
da0f6381 | 14574 | |
00020c16 ILT |
14575 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
14576 | # Insert the option either (1) after the last *FLAGS variable, or | |
14577 | # (2) before a word containing "conftest.", or (3) at the end. | |
14578 | # Note that $ac_compile itself does not contain backslashes and begins | |
14579 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14580 | lt_compile=`echo "$ac_compile" | $SED \ | |
14581 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14582 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14583 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14584 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14585 | (eval "$lt_compile" 2>out/conftest.err) |
14586 | ac_status=$? | |
14587 | cat out/conftest.err >&5 | |
43e02a8a | 14588 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14589 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
14590 | then | |
14591 | # The compiler can only warn and ignore the option if not recognized | |
14592 | # So say no if there are warnings | |
43e02a8a | 14593 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
14594 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
14595 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
14596 | lt_cv_prog_compiler_c_o=yes | |
14597 | fi | |
14598 | fi | |
14599 | chmod u+w . 2>&5 | |
14600 | $RM conftest* | |
14601 | # SGI C++ compiler will create directory out/ii_files/ for | |
14602 | # template instantiation | |
14603 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
14604 | $RM out/* && rmdir out | |
14605 | cd .. | |
14606 | $RM -r conftest | |
14607 | $RM conftest* | |
da0f6381 | 14608 | |
00020c16 | 14609 | fi |
5213506e RW |
14610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 |
14611 | $as_echo "$lt_cv_prog_compiler_c_o" >&6; } | |
da0f6381 PB |
14612 | |
14613 | ||
14614 | ||
14615 | ||
14616 | ||
14617 | ||
5213506e RW |
14618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
14619 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
14620 | if test "${lt_cv_prog_compiler_c_o+set}" = set; then : | |
14621 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
14622 | else |
14623 | lt_cv_prog_compiler_c_o=no | |
14624 | $RM -r conftest 2>/dev/null | |
14625 | mkdir conftest | |
14626 | cd conftest | |
14627 | mkdir out | |
14628 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
da0f6381 | 14629 | |
00020c16 ILT |
14630 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
14631 | # Insert the option either (1) after the last *FLAGS variable, or | |
14632 | # (2) before a word containing "conftest.", or (3) at the end. | |
14633 | # Note that $ac_compile itself does not contain backslashes and begins | |
14634 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
14635 | lt_compile=`echo "$ac_compile" | $SED \ | |
14636 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
14637 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
14638 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 14639 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
14640 | (eval "$lt_compile" 2>out/conftest.err) |
14641 | ac_status=$? | |
14642 | cat out/conftest.err >&5 | |
43e02a8a | 14643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
14644 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
14645 | then | |
14646 | # The compiler can only warn and ignore the option if not recognized | |
14647 | # So say no if there are warnings | |
43e02a8a | 14648 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
14649 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
14650 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
14651 | lt_cv_prog_compiler_c_o=yes | |
14652 | fi | |
14653 | fi | |
14654 | chmod u+w . 2>&5 | |
14655 | $RM conftest* | |
14656 | # SGI C++ compiler will create directory out/ii_files/ for | |
14657 | # template instantiation | |
14658 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
14659 | $RM out/* && rmdir out | |
14660 | cd .. | |
14661 | $RM -r conftest | |
14662 | $RM conftest* | |
da0f6381 | 14663 | |
00020c16 | 14664 | fi |
5213506e RW |
14665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 |
14666 | $as_echo "$lt_cv_prog_compiler_c_o" >&6; } | |
da0f6381 PB |
14667 | |
14668 | ||
14669 | ||
14670 | ||
00020c16 ILT |
14671 | hard_links="nottested" |
14672 | if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then | |
14673 | # do not overwrite the value of need_locks provided by the user | |
5213506e RW |
14674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 |
14675 | $as_echo_n "checking if we can lock with hard links... " >&6; } | |
00020c16 | 14676 | hard_links=yes |
baafc534 | 14677 | $RM conftest* |
00020c16 ILT |
14678 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
14679 | touch conftest.a | |
14680 | ln conftest.a conftest.b 2>&5 || hard_links=no | |
14681 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
5213506e RW |
14682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 |
14683 | $as_echo "$hard_links" >&6; } | |
00020c16 | 14684 | if test "$hard_links" = no; then |
5213506e RW |
14685 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 |
14686 | $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | |
00020c16 | 14687 | need_locks=warn |
da0f6381 | 14688 | fi |
00020c16 ILT |
14689 | else |
14690 | need_locks=no | |
14691 | fi | |
da0f6381 PB |
14692 | |
14693 | ||
14694 | ||
14695 | ||
14696 | ||
14697 | ||
5213506e RW |
14698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 |
14699 | $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } | |
da0f6381 | 14700 | |
00020c16 ILT |
14701 | runpath_var= |
14702 | allow_undefined_flag= | |
14703 | always_export_symbols=no | |
14704 | archive_cmds= | |
14705 | archive_expsym_cmds= | |
14706 | compiler_needs_object=no | |
14707 | enable_shared_with_static_runtimes=no | |
14708 | export_dynamic_flag_spec= | |
14709 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
14710 | hardcode_automatic=no | |
14711 | hardcode_direct=no | |
14712 | hardcode_direct_absolute=no | |
14713 | hardcode_libdir_flag_spec= | |
14714 | hardcode_libdir_flag_spec_ld= | |
14715 | hardcode_libdir_separator= | |
14716 | hardcode_minus_L=no | |
14717 | hardcode_shlibpath_var=unsupported | |
14718 | inherit_rpath=no | |
14719 | link_all_deplibs=unknown | |
14720 | module_cmds= | |
14721 | module_expsym_cmds= | |
14722 | old_archive_from_new_cmds= | |
14723 | old_archive_from_expsyms_cmds= | |
14724 | thread_safe_flag_spec= | |
14725 | whole_archive_flag_spec= | |
14726 | # include_expsyms should be a list of space-separated symbols to be *always* | |
14727 | # included in the symbol list | |
14728 | include_expsyms= | |
14729 | # exclude_expsyms can be an extended regexp of symbols to exclude | |
14730 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
14731 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
14732 | # as well as any symbol that contains `d'. | |
14733 | exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' | |
14734 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
14735 | # platforms (ab)use it in PIC code, but their linkers get confused if | |
14736 | # the symbol is explicitly referenced. Since portable code cannot | |
14737 | # rely on this symbol name, it's probably fine to never include it in | |
14738 | # preloaded symbol tables. | |
14739 | # Exclude shared library initialization/finalization symbols. | |
14740 | extract_expsyms_cmds= | |
da0f6381 | 14741 | |
00020c16 ILT |
14742 | case $host_os in |
14743 | cygwin* | mingw* | pw32* | cegcc*) | |
14744 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
14745 | # When not using gcc, we currently assume that we are using | |
14746 | # Microsoft Visual C++. | |
14747 | if test "$GCC" != yes; then | |
14748 | with_gnu_ld=no | |
14749 | fi | |
14750 | ;; | |
14751 | interix*) | |
14752 | # we just hope/assume this is gcc and not c89 (= MSVC++) | |
14753 | with_gnu_ld=yes | |
14754 | ;; | |
14755 | openbsd*) | |
14756 | with_gnu_ld=no | |
14757 | ;; | |
14758 | esac | |
da0f6381 | 14759 | |
00020c16 | 14760 | ld_shlibs=yes |
43e02a8a RW |
14761 | |
14762 | # On some targets, GNU ld is compatible enough with the native linker | |
14763 | # that we're better off using the native interface for both. | |
14764 | lt_use_gnu_ld_interface=no | |
00020c16 | 14765 | if test "$with_gnu_ld" = yes; then |
43e02a8a RW |
14766 | case $host_os in |
14767 | aix*) | |
14768 | # The AIX port of GNU ld has always aspired to compatibility | |
14769 | # with the native linker. However, as the warning in the GNU ld | |
14770 | # block says, versions before 2.19.5* couldn't really create working | |
14771 | # shared libraries, regardless of the interface used. | |
14772 | case `$LD -v 2>&1` in | |
14773 | *\ \(GNU\ Binutils\)\ 2.19.5*) ;; | |
14774 | *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; | |
14775 | *\ \(GNU\ Binutils\)\ [3-9]*) ;; | |
14776 | *) | |
14777 | lt_use_gnu_ld_interface=yes | |
14778 | ;; | |
14779 | esac | |
14780 | ;; | |
14781 | *) | |
14782 | lt_use_gnu_ld_interface=yes | |
14783 | ;; | |
14784 | esac | |
14785 | fi | |
14786 | ||
14787 | if test "$lt_use_gnu_ld_interface" = yes; then | |
00020c16 ILT |
14788 | # If archive_cmds runs LD, not CC, wlarc should be empty |
14789 | wlarc='${wl}' | |
da0f6381 | 14790 | |
00020c16 ILT |
14791 | # Set some defaults for GNU ld with shared library support. These |
14792 | # are reset later if shared libraries are not supported. Putting them | |
14793 | # here allows them to be overridden if necessary. | |
14794 | runpath_var=LD_RUN_PATH | |
14795 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
14796 | export_dynamic_flag_spec='${wl}--export-dynamic' | |
14797 | # ancient GNU ld didn't support --whole-archive et. al. | |
14798 | if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then | |
14799 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
14800 | else | |
14801 | whole_archive_flag_spec= | |
14802 | fi | |
14803 | supports_anon_versioning=no | |
14804 | case `$LD -v 2>&1` in | |
43e02a8a | 14805 | *GNU\ gold*) supports_anon_versioning=yes ;; |
00020c16 ILT |
14806 | *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 |
14807 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | |
14808 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | |
14809 | *\ 2.11.*) ;; # other 2.11 versions | |
14810 | *) supports_anon_versioning=yes ;; | |
14811 | esac | |
da0f6381 | 14812 | |
00020c16 ILT |
14813 | # See if GNU ld supports shared libraries. |
14814 | case $host_os in | |
14815 | aix[3-9]*) | |
14816 | # On AIX/PPC, the GNU linker is very broken | |
14817 | if test "$host_cpu" != ia64; then | |
14818 | ld_shlibs=no | |
14819 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 14820 | |
43e02a8a | 14821 | *** Warning: the GNU linker, at least up to release 2.19, is reported |
00020c16 ILT |
14822 | *** to be unable to reliably create shared libraries on AIX. |
14823 | *** Therefore, libtool is disabling shared libraries support. If you | |
43e02a8a RW |
14824 | *** really care for shared libraries, you may want to install binutils |
14825 | *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. | |
14826 | *** You will then need to restart the configuration process. | |
da0f6381 | 14827 | |
00020c16 ILT |
14828 | _LT_EOF |
14829 | fi | |
14830 | ;; | |
da0f6381 | 14831 | |
00020c16 ILT |
14832 | amigaos*) |
14833 | case $host_cpu in | |
14834 | powerpc) | |
14835 | # see comment about AmigaOS4 .so support | |
14836 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14837 | archive_expsym_cmds='' | |
14838 | ;; | |
14839 | m68k) | |
14840 | archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
14841 | hardcode_libdir_flag_spec='-L$libdir' | |
14842 | hardcode_minus_L=yes | |
14843 | ;; | |
14844 | esac | |
14845 | ;; | |
da0f6381 | 14846 | |
00020c16 ILT |
14847 | beos*) |
14848 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
14849 | allow_undefined_flag=unsupported | |
14850 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
14851 | # support --undefined. This deserves some investigation. FIXME | |
14852 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14853 | else | |
14854 | ld_shlibs=no | |
14855 | fi | |
14856 | ;; | |
da0f6381 | 14857 | |
00020c16 ILT |
14858 | cygwin* | mingw* | pw32* | cegcc*) |
14859 | # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, | |
14860 | # as there is no search path for DLLs. | |
14861 | hardcode_libdir_flag_spec='-L$libdir' | |
43e02a8a | 14862 | export_dynamic_flag_spec='${wl}--export-all-symbols' |
00020c16 ILT |
14863 | allow_undefined_flag=unsupported |
14864 | always_export_symbols=no | |
14865 | enable_shared_with_static_runtimes=yes | |
14866 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | |
da0f6381 | 14867 | |
00020c16 ILT |
14868 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then |
14869 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
14870 | # If the export-symbols file already is a .def file (1st line | |
14871 | # is EXPORTS), use it as is; otherwise, prepend... | |
14872 | archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
14873 | cp $export_symbols $output_objdir/$soname.def; | |
14874 | else | |
14875 | echo EXPORTS > $output_objdir/$soname.def; | |
14876 | cat $export_symbols >> $output_objdir/$soname.def; | |
14877 | fi~ | |
14878 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
14879 | else | |
14880 | ld_shlibs=no | |
14881 | fi | |
14882 | ;; | |
da0f6381 | 14883 | |
43e02a8a RW |
14884 | haiku*) |
14885 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14886 | link_all_deplibs=yes | |
14887 | ;; | |
14888 | ||
00020c16 ILT |
14889 | interix[3-9]*) |
14890 | hardcode_direct=no | |
14891 | hardcode_shlibpath_var=no | |
14892 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
14893 | export_dynamic_flag_spec='${wl}-E' | |
14894 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
14895 | # Instead, shared libraries are loaded at an image base (0x10000000 by | |
14896 | # default) and relocated if they conflict, which is a slow very memory | |
14897 | # consuming and fragmenting process. To avoid this, we pick a random, | |
14898 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
14899 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
14900 | archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
14901 | archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
14902 | ;; | |
da0f6381 | 14903 | |
00020c16 ILT |
14904 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
14905 | tmp_diet=no | |
14906 | if test "$host_os" = linux-dietlibc; then | |
14907 | case $cc_basename in | |
14908 | diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) | |
14909 | esac | |
14910 | fi | |
14911 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | |
14912 | && test "$tmp_diet" = no | |
14913 | then | |
14914 | tmp_addflag= | |
14915 | tmp_sharedflag='-shared' | |
14916 | case $cc_basename,$host_cpu in | |
14917 | pgcc*) # Portland Group C compiler | |
43e02a8a | 14918 | whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
14919 | tmp_addflag=' $pic_flag' |
14920 | ;; | |
43e02a8a RW |
14921 | pgf77* | pgf90* | pgf95* | pgfortran*) |
14922 | # Portland Group f77 and f90 compilers | |
14923 | whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | |
00020c16 ILT |
14924 | tmp_addflag=' $pic_flag -Mnomain' ;; |
14925 | ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 | |
14926 | tmp_addflag=' -i_dynamic' ;; | |
14927 | efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 | |
14928 | tmp_addflag=' -i_dynamic -nofor_main' ;; | |
14929 | ifc* | ifort*) # Intel Fortran compiler | |
14930 | tmp_addflag=' -nofor_main' ;; | |
14931 | lf95*) # Lahey Fortran 8.1 | |
14932 | whole_archive_flag_spec= | |
14933 | tmp_sharedflag='--shared' ;; | |
43e02a8a | 14934 | xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) |
00020c16 ILT |
14935 | tmp_sharedflag='-qmkshrobj' |
14936 | tmp_addflag= ;; | |
43e02a8a RW |
14937 | nvcc*) # Cuda Compiler Driver 2.2 |
14938 | whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | |
14939 | compiler_needs_object=yes | |
14940 | ;; | |
00020c16 ILT |
14941 | esac |
14942 | case `$CC -V 2>&1 | sed 5q` in | |
14943 | *Sun\ C*) # Sun C 5.9 | |
43e02a8a | 14944 | whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
14945 | compiler_needs_object=yes |
14946 | tmp_sharedflag='-G' ;; | |
14947 | *Sun\ F*) # Sun Fortran 8.3 | |
14948 | tmp_sharedflag='-G' ;; | |
14949 | esac | |
14950 | archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
da0f6381 | 14951 | |
00020c16 ILT |
14952 | if test "x$supports_anon_versioning" = xyes; then |
14953 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | |
14954 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
14955 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
14956 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
14957 | fi | |
da0f6381 | 14958 | |
00020c16 | 14959 | case $cc_basename in |
43e02a8a | 14960 | xlf* | bgf* | bgxlf* | mpixlf*) |
00020c16 ILT |
14961 | # IBM XL Fortran 10.1 on PPC cannot create shared libs itself |
14962 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | |
14963 | hardcode_libdir_flag_spec= | |
14964 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | |
14965 | archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | |
14966 | if test "x$supports_anon_versioning" = xyes; then | |
14967 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | |
14968 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
14969 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
14970 | $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | |
14971 | fi | |
14972 | ;; | |
14973 | esac | |
14974 | else | |
14975 | ld_shlibs=no | |
14976 | fi | |
14977 | ;; | |
da0f6381 | 14978 | |
00020c16 ILT |
14979 | netbsd*) |
14980 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
14981 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
14982 | wlarc= | |
14983 | else | |
14984 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
14985 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
14986 | fi | |
14987 | ;; | |
da0f6381 | 14988 | |
00020c16 ILT |
14989 | solaris*) |
14990 | if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then | |
14991 | ld_shlibs=no | |
14992 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 14993 | |
00020c16 ILT |
14994 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
14995 | *** create shared libraries on Solaris systems. Therefore, libtool | |
14996 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
14997 | *** binutils to release 2.9.1 or newer. Another option is to modify | |
14998 | *** your PATH or compiler configuration so that the native linker is | |
14999 | *** used, and then restart. | |
da0f6381 | 15000 | |
00020c16 ILT |
15001 | _LT_EOF |
15002 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
15003 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
15004 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
15005 | else | |
15006 | ld_shlibs=no | |
15007 | fi | |
15008 | ;; | |
da0f6381 | 15009 | |
00020c16 ILT |
15010 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) |
15011 | case `$LD -v 2>&1` in | |
15012 | *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) | |
15013 | ld_shlibs=no | |
15014 | cat <<_LT_EOF 1>&2 | |
da0f6381 | 15015 | |
00020c16 ILT |
15016 | *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not |
15017 | *** reliably create shared libraries on SCO systems. Therefore, libtool | |
15018 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
15019 | *** binutils to release 2.16.91.0.3 or newer. Another option is to modify | |
15020 | *** your PATH or compiler configuration so that the native linker is | |
15021 | *** used, and then restart. | |
da0f6381 | 15022 | |
00020c16 ILT |
15023 | _LT_EOF |
15024 | ;; | |
15025 | *) | |
15026 | # For security reasons, it is highly recommended that you always | |
15027 | # use absolute paths for naming shared libraries, and exclude the | |
15028 | # DT_RUNPATH tag from executables and libraries. But doing so | |
15029 | # requires that you compile everything twice, which is a pain. | |
15030 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
15031 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15032 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
15033 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
15034 | else | |
15035 | ld_shlibs=no | |
15036 | fi | |
15037 | ;; | |
15038 | esac | |
15039 | ;; | |
da0f6381 | 15040 | |
00020c16 ILT |
15041 | sunos4*) |
15042 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
15043 | wlarc= | |
15044 | hardcode_direct=yes | |
15045 | hardcode_shlibpath_var=no | |
15046 | ;; | |
da0f6381 | 15047 | |
00020c16 ILT |
15048 | *) |
15049 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
15050 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
15051 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
15052 | else | |
15053 | ld_shlibs=no | |
15054 | fi | |
15055 | ;; | |
15056 | esac | |
da0f6381 | 15057 | |
00020c16 ILT |
15058 | if test "$ld_shlibs" = no; then |
15059 | runpath_var= | |
15060 | hardcode_libdir_flag_spec= | |
15061 | export_dynamic_flag_spec= | |
15062 | whole_archive_flag_spec= | |
15063 | fi | |
15064 | else | |
15065 | # PORTME fill in a description of your system's linker (not GNU ld) | |
15066 | case $host_os in | |
15067 | aix3*) | |
15068 | allow_undefined_flag=unsupported | |
15069 | always_export_symbols=yes | |
15070 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | |
15071 | # Note: this linker hardcodes the directories in LIBPATH if there | |
15072 | # are no directories specified by -L. | |
15073 | hardcode_minus_L=yes | |
15074 | if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then | |
15075 | # Neither direct hardcoding nor static linking is supported with a | |
15076 | # broken collect2. | |
15077 | hardcode_direct=unsupported | |
15078 | fi | |
15079 | ;; | |
da0f6381 | 15080 | |
00020c16 ILT |
15081 | aix[4-9]*) |
15082 | if test "$host_cpu" = ia64; then | |
15083 | # On IA64, the linker does run time linking by default, so we don't | |
15084 | # have to do anything special. | |
15085 | aix_use_runtimelinking=no | |
15086 | exp_sym_flag='-Bexport' | |
15087 | no_entry_flag="" | |
15088 | else | |
15089 | # If we're using GNU nm, then we don't want the "-C" option. | |
15090 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
43e02a8a RW |
15091 | # Also, AIX nm treats weak defined symbols like other global |
15092 | # defined symbols, whereas GNU nm marks them as "W". | |
00020c16 | 15093 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
43e02a8a | 15094 | export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
00020c16 ILT |
15095 | else |
15096 | export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
15097 | fi | |
15098 | aix_use_runtimelinking=no | |
da0f6381 | 15099 | |
00020c16 ILT |
15100 | # Test if we are trying to use run time linking or normal |
15101 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
15102 | # need to do runtime linking. | |
15103 | case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) | |
15104 | for ld_flag in $LDFLAGS; do | |
15105 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
15106 | aix_use_runtimelinking=yes | |
15107 | break | |
15108 | fi | |
15109 | done | |
15110 | ;; | |
15111 | esac | |
da0f6381 | 15112 | |
00020c16 ILT |
15113 | exp_sym_flag='-bexport' |
15114 | no_entry_flag='-bnoentry' | |
15115 | fi | |
da0f6381 | 15116 | |
00020c16 ILT |
15117 | # When large executables or shared objects are built, AIX ld can |
15118 | # have problems creating the table of contents. If linking a library | |
15119 | # or program results in "error TOC overflow" add -mminimal-toc to | |
15120 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
15121 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
da0f6381 | 15122 | |
00020c16 ILT |
15123 | archive_cmds='' |
15124 | hardcode_direct=yes | |
15125 | hardcode_direct_absolute=yes | |
15126 | hardcode_libdir_separator=':' | |
15127 | link_all_deplibs=yes | |
15128 | file_list_spec='${wl}-f,' | |
da0f6381 | 15129 | |
00020c16 ILT |
15130 | if test "$GCC" = yes; then |
15131 | case $host_os in aix4.[012]|aix4.[012].*) | |
15132 | # We only want to do this on AIX 4.2 and lower, the check | |
15133 | # below for broken collect2 doesn't work under 4.3+ | |
15134 | collect2name=`${CC} -print-prog-name=collect2` | |
15135 | if test -f "$collect2name" && | |
15136 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
15137 | then | |
15138 | # We have reworked collect2 | |
15139 | : | |
15140 | else | |
15141 | # We have old collect2 | |
15142 | hardcode_direct=unsupported | |
15143 | # It fails to find uninstalled libraries when the uninstalled | |
15144 | # path is not listed in the libpath. Setting hardcode_minus_L | |
15145 | # to unsupported forces relinking | |
15146 | hardcode_minus_L=yes | |
15147 | hardcode_libdir_flag_spec='-L$libdir' | |
15148 | hardcode_libdir_separator= | |
15149 | fi | |
15150 | ;; | |
15151 | esac | |
15152 | shared_flag='-shared' | |
15153 | if test "$aix_use_runtimelinking" = yes; then | |
15154 | shared_flag="$shared_flag "'${wl}-G' | |
15155 | fi | |
15156 | else | |
15157 | # not using gcc | |
15158 | if test "$host_cpu" = ia64; then | |
15159 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
15160 | # chokes on -Wl,-G. The following line is correct: | |
15161 | shared_flag='-G' | |
15162 | else | |
15163 | if test "$aix_use_runtimelinking" = yes; then | |
15164 | shared_flag='${wl}-G' | |
15165 | else | |
15166 | shared_flag='${wl}-bM:SRE' | |
15167 | fi | |
15168 | fi | |
15169 | fi | |
da0f6381 | 15170 | |
00020c16 ILT |
15171 | export_dynamic_flag_spec='${wl}-bexpall' |
15172 | # It seems that -bexpall does not export symbols beginning with | |
15173 | # underscore (_), so it is better to generate a list of symbols to export. | |
15174 | always_export_symbols=yes | |
15175 | if test "$aix_use_runtimelinking" = yes; then | |
15176 | # Warning - without using the other runtime loading flags (-brtl), | |
15177 | # -berok will link without error, but may produce a broken library. | |
15178 | allow_undefined_flag='-berok' | |
15179 | # Determine the default libpath from the value encoded in an | |
15180 | # empty executable. | |
5213506e | 15181 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 15182 | /* end confdefs.h. */ |
da0f6381 | 15183 | |
00020c16 ILT |
15184 | int |
15185 | main () | |
15186 | { | |
da0f6381 | 15187 | |
00020c16 ILT |
15188 | ; |
15189 | return 0; | |
15190 | } | |
15191 | _ACEOF | |
5213506e | 15192 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 | 15193 | |
00020c16 ILT |
15194 | lt_aix_libpath_sed=' |
15195 | /Import File Strings/,/^$/ { | |
15196 | /^0/ { | |
15197 | s/^0 *\(.*\)$/\1/ | |
15198 | p | |
15199 | } | |
15200 | }' | |
15201 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15202 | # Check for a 64-bit object if we didn't find anything. | |
15203 | if test -z "$aix_libpath"; then | |
15204 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15205 | fi | |
00020c16 | 15206 | fi |
5213506e RW |
15207 | rm -f core conftest.err conftest.$ac_objext \ |
15208 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 | 15209 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
da0f6381 | 15210 | |
00020c16 | 15211 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
43e02a8a | 15212 | archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
00020c16 ILT |
15213 | else |
15214 | if test "$host_cpu" = ia64; then | |
15215 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' | |
15216 | allow_undefined_flag="-z nodefs" | |
15217 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
15218 | else | |
15219 | # Determine the default libpath from the value encoded in an | |
15220 | # empty executable. | |
5213506e | 15221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 | 15222 | /* end confdefs.h. */ |
da0f6381 | 15223 | |
00020c16 ILT |
15224 | int |
15225 | main () | |
15226 | { | |
da0f6381 | 15227 | |
00020c16 ILT |
15228 | ; |
15229 | return 0; | |
15230 | } | |
15231 | _ACEOF | |
5213506e | 15232 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 | 15233 | |
00020c16 ILT |
15234 | lt_aix_libpath_sed=' |
15235 | /Import File Strings/,/^$/ { | |
15236 | /^0/ { | |
15237 | s/^0 *\(.*\)$/\1/ | |
15238 | p | |
15239 | } | |
15240 | }' | |
15241 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15242 | # Check for a 64-bit object if we didn't find anything. | |
15243 | if test -z "$aix_libpath"; then | |
15244 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
15245 | fi | |
00020c16 | 15246 | fi |
5213506e RW |
15247 | rm -f core conftest.err conftest.$ac_objext \ |
15248 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 | 15249 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
da0f6381 | 15250 | |
00020c16 ILT |
15251 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
15252 | # Warning - without using the other run time loading flags, | |
15253 | # -berok will link without error, but may produce a broken library. | |
15254 | no_undefined_flag=' ${wl}-bernotok' | |
15255 | allow_undefined_flag=' ${wl}-berok' | |
43e02a8a RW |
15256 | if test "$with_gnu_ld" = yes; then |
15257 | # We only use this code for GNU lds that support --whole-archive. | |
15258 | whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
15259 | else | |
15260 | # Exported symbols can be pulled into shared objects from archives | |
15261 | whole_archive_flag_spec='$convenience' | |
15262 | fi | |
00020c16 ILT |
15263 | archive_cmds_need_lc=yes |
15264 | # This is similar to how AIX traditionally builds its shared libraries. | |
15265 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
15266 | fi | |
15267 | fi | |
15268 | ;; | |
da0f6381 | 15269 | |
00020c16 ILT |
15270 | amigaos*) |
15271 | case $host_cpu in | |
15272 | powerpc) | |
15273 | # see comment about AmigaOS4 .so support | |
15274 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
15275 | archive_expsym_cmds='' | |
15276 | ;; | |
15277 | m68k) | |
15278 | archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
15279 | hardcode_libdir_flag_spec='-L$libdir' | |
15280 | hardcode_minus_L=yes | |
15281 | ;; | |
15282 | esac | |
15283 | ;; | |
da0f6381 | 15284 | |
00020c16 ILT |
15285 | bsdi[45]*) |
15286 | export_dynamic_flag_spec=-rdynamic | |
15287 | ;; | |
da0f6381 | 15288 | |
00020c16 ILT |
15289 | cygwin* | mingw* | pw32* | cegcc*) |
15290 | # When not using gcc, we currently assume that we are using | |
15291 | # Microsoft Visual C++. | |
15292 | # hardcode_libdir_flag_spec is actually meaningless, as there is | |
15293 | # no search path for DLLs. | |
15294 | hardcode_libdir_flag_spec=' ' | |
15295 | allow_undefined_flag=unsupported | |
15296 | # Tell ltmain to make .lib files, not .a files. | |
15297 | libext=lib | |
15298 | # Tell ltmain to make .dll files, not .so files. | |
15299 | shrext_cmds=".dll" | |
15300 | # FIXME: Setting linknames here is a bad hack. | |
43e02a8a | 15301 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' |
00020c16 ILT |
15302 | # The linker will automatically build a .lib file if we build a DLL. |
15303 | old_archive_from_new_cmds='true' | |
15304 | # FIXME: Should let the user specify the lib program. | |
15305 | old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | |
15306 | fix_srcfile_path='`cygpath -w "$srcfile"`' | |
15307 | enable_shared_with_static_runtimes=yes | |
15308 | ;; | |
da0f6381 | 15309 | |
00020c16 | 15310 | darwin* | rhapsody*) |
da0f6381 PB |
15311 | |
15312 | ||
00020c16 ILT |
15313 | archive_cmds_need_lc=no |
15314 | hardcode_direct=no | |
15315 | hardcode_automatic=yes | |
15316 | hardcode_shlibpath_var=unsupported | |
43e02a8a RW |
15317 | if test "$lt_cv_ld_force_load" = "yes"; then |
15318 | whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' | |
15319 | else | |
15320 | whole_archive_flag_spec='' | |
15321 | fi | |
00020c16 ILT |
15322 | link_all_deplibs=yes |
15323 | allow_undefined_flag="$_lt_dar_allow_undefined" | |
15324 | case $cc_basename in | |
15325 | ifort*) _lt_dar_can_shared=yes ;; | |
15326 | *) _lt_dar_can_shared=$GCC ;; | |
15327 | esac | |
15328 | if test "$_lt_dar_can_shared" = "yes"; then | |
43e02a8a | 15329 | output_verbose_link_cmd=func_echo_all |
00020c16 ILT |
15330 | archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" |
15331 | module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
15332 | archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" | |
15333 | module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" | |
da0f6381 | 15334 | |
00020c16 ILT |
15335 | else |
15336 | ld_shlibs=no | |
15337 | fi | |
da0f6381 | 15338 | |
00020c16 | 15339 | ;; |
da0f6381 | 15340 | |
00020c16 ILT |
15341 | dgux*) |
15342 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15343 | hardcode_libdir_flag_spec='-L$libdir' | |
15344 | hardcode_shlibpath_var=no | |
15345 | ;; | |
da0f6381 | 15346 | |
00020c16 ILT |
15347 | freebsd1*) |
15348 | ld_shlibs=no | |
15349 | ;; | |
da0f6381 | 15350 | |
00020c16 ILT |
15351 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
15352 | # support. Future versions do this automatically, but an explicit c++rt0.o | |
15353 | # does not break anything, and helps significantly (at the cost of a little | |
15354 | # extra space). | |
15355 | freebsd2.2*) | |
15356 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
15357 | hardcode_libdir_flag_spec='-R$libdir' | |
15358 | hardcode_direct=yes | |
15359 | hardcode_shlibpath_var=no | |
15360 | ;; | |
da0f6381 | 15361 | |
00020c16 ILT |
15362 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
15363 | freebsd2*) | |
15364 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
15365 | hardcode_direct=yes | |
15366 | hardcode_minus_L=yes | |
15367 | hardcode_shlibpath_var=no | |
15368 | ;; | |
da0f6381 | 15369 | |
00020c16 ILT |
15370 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
15371 | freebsd* | dragonfly*) | |
15372 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
15373 | hardcode_libdir_flag_spec='-R$libdir' | |
15374 | hardcode_direct=yes | |
15375 | hardcode_shlibpath_var=no | |
15376 | ;; | |
da0f6381 | 15377 | |
00020c16 ILT |
15378 | hpux9*) |
15379 | if test "$GCC" = yes; then | |
15380 | archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
15381 | else | |
15382 | archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
15383 | fi | |
15384 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
15385 | hardcode_libdir_separator=: | |
15386 | hardcode_direct=yes | |
da0f6381 | 15387 | |
00020c16 ILT |
15388 | # hardcode_minus_L: Not really in the search PATH, |
15389 | # but as the default location of the library. | |
15390 | hardcode_minus_L=yes | |
15391 | export_dynamic_flag_spec='${wl}-E' | |
15392 | ;; | |
da0f6381 | 15393 | |
00020c16 | 15394 | hpux10*) |
43e02a8a | 15395 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then |
00020c16 ILT |
15396 | archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
15397 | else | |
15398 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | |
15399 | fi | |
15400 | if test "$with_gnu_ld" = no; then | |
15401 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
15402 | hardcode_libdir_flag_spec_ld='+b $libdir' | |
15403 | hardcode_libdir_separator=: | |
15404 | hardcode_direct=yes | |
15405 | hardcode_direct_absolute=yes | |
15406 | export_dynamic_flag_spec='${wl}-E' | |
15407 | # hardcode_minus_L: Not really in the search PATH, | |
15408 | # but as the default location of the library. | |
15409 | hardcode_minus_L=yes | |
15410 | fi | |
15411 | ;; | |
da0f6381 | 15412 | |
00020c16 | 15413 | hpux11*) |
43e02a8a | 15414 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then |
00020c16 ILT |
15415 | case $host_cpu in |
15416 | hppa*64*) | |
15417 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15418 | ;; | |
15419 | ia64*) | |
15420 | archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
15421 | ;; | |
15422 | *) | |
15423 | archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
15424 | ;; | |
15425 | esac | |
15426 | else | |
15427 | case $host_cpu in | |
15428 | hppa*64*) | |
15429 | archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15430 | ;; | |
15431 | ia64*) | |
15432 | archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
15433 | ;; | |
15434 | *) | |
43e02a8a RW |
15435 | |
15436 | # Older versions of the 11.00 compiler do not understand -b yet | |
15437 | # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) | |
15438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 | |
15439 | $as_echo_n "checking if $CC understands -b... " >&6; } | |
15440 | if test "${lt_cv_prog_compiler__b+set}" = set; then : | |
15441 | $as_echo_n "(cached) " >&6 | |
15442 | else | |
15443 | lt_cv_prog_compiler__b=no | |
15444 | save_LDFLAGS="$LDFLAGS" | |
15445 | LDFLAGS="$LDFLAGS -b" | |
15446 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
15447 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
15448 | # The linker can only warn and ignore the option if not recognized | |
15449 | # So say no if there are warnings | |
15450 | if test -s conftest.err; then | |
15451 | # Append any errors to the config.log. | |
15452 | cat conftest.err 1>&5 | |
15453 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp | |
15454 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
15455 | if diff conftest.exp conftest.er2 >/dev/null; then | |
15456 | lt_cv_prog_compiler__b=yes | |
15457 | fi | |
15458 | else | |
15459 | lt_cv_prog_compiler__b=yes | |
15460 | fi | |
15461 | fi | |
15462 | $RM -r conftest* | |
15463 | LDFLAGS="$save_LDFLAGS" | |
15464 | ||
15465 | fi | |
15466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 | |
15467 | $as_echo "$lt_cv_prog_compiler__b" >&6; } | |
15468 | ||
15469 | if test x"$lt_cv_prog_compiler__b" = xyes; then | |
15470 | archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
15471 | else | |
15472 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | |
15473 | fi | |
15474 | ||
00020c16 ILT |
15475 | ;; |
15476 | esac | |
15477 | fi | |
15478 | if test "$with_gnu_ld" = no; then | |
15479 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
15480 | hardcode_libdir_separator=: | |
da0f6381 | 15481 | |
00020c16 ILT |
15482 | case $host_cpu in |
15483 | hppa*64*|ia64*) | |
15484 | hardcode_direct=no | |
15485 | hardcode_shlibpath_var=no | |
15486 | ;; | |
15487 | *) | |
15488 | hardcode_direct=yes | |
15489 | hardcode_direct_absolute=yes | |
15490 | export_dynamic_flag_spec='${wl}-E' | |
da0f6381 | 15491 | |
00020c16 ILT |
15492 | # hardcode_minus_L: Not really in the search PATH, |
15493 | # but as the default location of the library. | |
15494 | hardcode_minus_L=yes | |
15495 | ;; | |
15496 | esac | |
15497 | fi | |
15498 | ;; | |
da0f6381 | 15499 | |
00020c16 ILT |
15500 | irix5* | irix6* | nonstopux*) |
15501 | if test "$GCC" = yes; then | |
43e02a8a | 15502 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15503 | # Try to use the -exported_symbol ld option, if it does not |
15504 | # work, assume that -exports_file does not work either and | |
15505 | # implicitly export all symbols. | |
15506 | save_LDFLAGS="$LDFLAGS" | |
15507 | LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | |
5213506e RW |
15508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15509 | /* end confdefs.h. */ | |
00020c16 ILT |
15510 | int foo(void) {} |
15511 | _ACEOF | |
5213506e | 15512 | if ac_fn_c_try_link "$LINENO"; then : |
43e02a8a | 15513 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' |
da0f6381 | 15514 | |
00020c16 | 15515 | fi |
5213506e RW |
15516 | rm -f core conftest.err conftest.$ac_objext \ |
15517 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
15518 | LDFLAGS="$save_LDFLAGS" |
15519 | else | |
43e02a8a RW |
15520 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
15521 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' | |
00020c16 ILT |
15522 | fi |
15523 | archive_cmds_need_lc='no' | |
15524 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15525 | hardcode_libdir_separator=: | |
15526 | inherit_rpath=yes | |
15527 | link_all_deplibs=yes | |
15528 | ;; | |
da0f6381 | 15529 | |
00020c16 ILT |
15530 | netbsd*) |
15531 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
15532 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
15533 | else | |
15534 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
15535 | fi | |
15536 | hardcode_libdir_flag_spec='-R$libdir' | |
15537 | hardcode_direct=yes | |
15538 | hardcode_shlibpath_var=no | |
15539 | ;; | |
da0f6381 | 15540 | |
00020c16 ILT |
15541 | newsos6) |
15542 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15543 | hardcode_direct=yes | |
15544 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15545 | hardcode_libdir_separator=: | |
15546 | hardcode_shlibpath_var=no | |
15547 | ;; | |
da0f6381 | 15548 | |
00020c16 ILT |
15549 | *nto* | *qnx*) |
15550 | ;; | |
da0f6381 | 15551 | |
00020c16 ILT |
15552 | openbsd*) |
15553 | if test -f /usr/libexec/ld.so; then | |
15554 | hardcode_direct=yes | |
15555 | hardcode_shlibpath_var=no | |
15556 | hardcode_direct_absolute=yes | |
15557 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
15558 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
15559 | archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' | |
15560 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
15561 | export_dynamic_flag_spec='${wl}-E' | |
15562 | else | |
15563 | case $host_os in | |
15564 | openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) | |
15565 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
15566 | hardcode_libdir_flag_spec='-R$libdir' | |
15567 | ;; | |
15568 | *) | |
15569 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
15570 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
15571 | ;; | |
15572 | esac | |
15573 | fi | |
15574 | else | |
15575 | ld_shlibs=no | |
15576 | fi | |
15577 | ;; | |
da0f6381 | 15578 | |
00020c16 ILT |
15579 | os2*) |
15580 | hardcode_libdir_flag_spec='-L$libdir' | |
15581 | hardcode_minus_L=yes | |
15582 | allow_undefined_flag=unsupported | |
43e02a8a | 15583 | archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
00020c16 ILT |
15584 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
15585 | ;; | |
da0f6381 | 15586 | |
00020c16 ILT |
15587 | osf3*) |
15588 | if test "$GCC" = yes; then | |
15589 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
43e02a8a | 15590 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15591 | else |
15592 | allow_undefined_flag=' -expect_unresolved \*' | |
43e02a8a | 15593 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15594 | fi |
15595 | archive_cmds_need_lc='no' | |
15596 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
15597 | hardcode_libdir_separator=: | |
15598 | ;; | |
da0f6381 | 15599 | |
00020c16 ILT |
15600 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
15601 | if test "$GCC" = yes; then | |
15602 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
43e02a8a | 15603 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
15604 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
15605 | else | |
15606 | allow_undefined_flag=' -expect_unresolved \*' | |
43e02a8a | 15607 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 | 15608 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ |
43e02a8a | 15609 | $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' |
da0f6381 | 15610 | |
00020c16 ILT |
15611 | # Both c and cxx compiler support -rpath directly |
15612 | hardcode_libdir_flag_spec='-rpath $libdir' | |
15613 | fi | |
15614 | archive_cmds_need_lc='no' | |
15615 | hardcode_libdir_separator=: | |
15616 | ;; | |
da0f6381 | 15617 | |
00020c16 ILT |
15618 | solaris*) |
15619 | no_undefined_flag=' -z defs' | |
15620 | if test "$GCC" = yes; then | |
15621 | wlarc='${wl}' | |
15622 | archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15623 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
15624 | $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | |
15625 | else | |
15626 | case `$CC -V 2>&1` in | |
15627 | *"Compilers 5.0"*) | |
15628 | wlarc='' | |
15629 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15630 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
15631 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' | |
15632 | ;; | |
15633 | *) | |
15634 | wlarc='${wl}' | |
15635 | archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
15636 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
15637 | $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | |
15638 | ;; | |
15639 | esac | |
15640 | fi | |
15641 | hardcode_libdir_flag_spec='-R$libdir' | |
15642 | hardcode_shlibpath_var=no | |
15643 | case $host_os in | |
15644 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
15645 | *) | |
15646 | # The compiler driver will combine and reorder linker options, | |
15647 | # but understands `-z linker_flag'. GCC discards it without `$wl', | |
15648 | # but is careful enough not to reorder. | |
15649 | # Supported since Solaris 2.6 (maybe 2.5.1?) | |
15650 | if test "$GCC" = yes; then | |
15651 | whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
15652 | else | |
15653 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' | |
15654 | fi | |
15655 | ;; | |
15656 | esac | |
15657 | link_all_deplibs=yes | |
15658 | ;; | |
da0f6381 | 15659 | |
00020c16 ILT |
15660 | sunos4*) |
15661 | if test "x$host_vendor" = xsequent; then | |
15662 | # Use $CC to link under sequent, because it throws in some extra .o | |
15663 | # files that make .init and .fini sections work. | |
15664 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
15665 | else | |
15666 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
15667 | fi | |
15668 | hardcode_libdir_flag_spec='-L$libdir' | |
15669 | hardcode_direct=yes | |
15670 | hardcode_minus_L=yes | |
15671 | hardcode_shlibpath_var=no | |
15672 | ;; | |
da0f6381 | 15673 | |
00020c16 ILT |
15674 | sysv4) |
15675 | case $host_vendor in | |
15676 | sni) | |
15677 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15678 | hardcode_direct=yes # is this really true??? | |
15679 | ;; | |
15680 | siemens) | |
15681 | ## LD is ld it makes a PLAMLIB | |
15682 | ## CC just makes a GrossModule. | |
15683 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
15684 | reload_cmds='$CC -r -o $output$reload_objs' | |
15685 | hardcode_direct=no | |
15686 | ;; | |
15687 | motorola) | |
15688 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15689 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie | |
15690 | ;; | |
15691 | esac | |
15692 | runpath_var='LD_RUN_PATH' | |
15693 | hardcode_shlibpath_var=no | |
15694 | ;; | |
da0f6381 | 15695 | |
00020c16 ILT |
15696 | sysv4.3*) |
15697 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15698 | hardcode_shlibpath_var=no | |
15699 | export_dynamic_flag_spec='-Bexport' | |
15700 | ;; | |
da0f6381 | 15701 | |
00020c16 ILT |
15702 | sysv4*MP*) |
15703 | if test -d /usr/nec; then | |
15704 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15705 | hardcode_shlibpath_var=no | |
15706 | runpath_var=LD_RUN_PATH | |
15707 | hardcode_runpath_var=yes | |
15708 | ld_shlibs=yes | |
15709 | fi | |
15710 | ;; | |
da0f6381 | 15711 | |
00020c16 ILT |
15712 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) |
15713 | no_undefined_flag='${wl}-z,text' | |
15714 | archive_cmds_need_lc=no | |
15715 | hardcode_shlibpath_var=no | |
15716 | runpath_var='LD_RUN_PATH' | |
da0f6381 | 15717 | |
00020c16 ILT |
15718 | if test "$GCC" = yes; then |
15719 | archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15720 | archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15721 | else | |
15722 | archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15723 | archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15724 | fi | |
15725 | ;; | |
da0f6381 | 15726 | |
00020c16 ILT |
15727 | sysv5* | sco3.2v5* | sco5v6*) |
15728 | # Note: We can NOT use -z defs as we might desire, because we do not | |
15729 | # link with -lc, and that would cause any symbols used from libc to | |
15730 | # always be unresolved, which means just about no library would | |
15731 | # ever link correctly. If we're not using GNU ld we use -z text | |
15732 | # though, which does catch some bad symbols but isn't as heavy-handed | |
15733 | # as -z defs. | |
15734 | no_undefined_flag='${wl}-z,text' | |
15735 | allow_undefined_flag='${wl}-z,nodefs' | |
15736 | archive_cmds_need_lc=no | |
15737 | hardcode_shlibpath_var=no | |
15738 | hardcode_libdir_flag_spec='${wl}-R,$libdir' | |
15739 | hardcode_libdir_separator=':' | |
15740 | link_all_deplibs=yes | |
15741 | export_dynamic_flag_spec='${wl}-Bexport' | |
15742 | runpath_var='LD_RUN_PATH' | |
da0f6381 | 15743 | |
00020c16 ILT |
15744 | if test "$GCC" = yes; then |
15745 | archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15746 | archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15747 | else | |
15748 | archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15749 | archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
15750 | fi | |
15751 | ;; | |
da0f6381 | 15752 | |
00020c16 ILT |
15753 | uts4*) |
15754 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
15755 | hardcode_libdir_flag_spec='-L$libdir' | |
15756 | hardcode_shlibpath_var=no | |
15757 | ;; | |
da0f6381 | 15758 | |
00020c16 ILT |
15759 | *) |
15760 | ld_shlibs=no | |
15761 | ;; | |
15762 | esac | |
da0f6381 | 15763 | |
00020c16 ILT |
15764 | if test x$host_vendor = xsni; then |
15765 | case $host in | |
15766 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
15767 | export_dynamic_flag_spec='${wl}-Blargedynsym' | |
15768 | ;; | |
15769 | esac | |
15770 | fi | |
15771 | fi | |
da0f6381 | 15772 | |
5213506e RW |
15773 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 |
15774 | $as_echo "$ld_shlibs" >&6; } | |
00020c16 | 15775 | test "$ld_shlibs" = no && can_build_shared=no |
da0f6381 | 15776 | |
00020c16 | 15777 | with_gnu_ld=$with_gnu_ld |
da0f6381 PB |
15778 | |
15779 | ||
15780 | ||
15781 | ||
15782 | ||
15783 | ||
15784 | ||
15785 | ||
15786 | ||
15787 | ||
15788 | ||
15789 | ||
15790 | ||
15791 | ||
15792 | ||
00020c16 ILT |
15793 | # |
15794 | # Do we need to explicitly link libc? | |
15795 | # | |
15796 | case "x$archive_cmds_need_lc" in | |
15797 | x|xyes) | |
15798 | # Assume -lc should be added | |
15799 | archive_cmds_need_lc=yes | |
da0f6381 | 15800 | |
00020c16 ILT |
15801 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
15802 | case $archive_cmds in | |
15803 | *'~'*) | |
15804 | # FIXME: we may have to deal with multi-command sequences. | |
15805 | ;; | |
15806 | '$CC '*) | |
15807 | # Test whether the compiler implicitly links with -lc since on some | |
15808 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
15809 | # to ld, don't add -lc before -lgcc. | |
5213506e RW |
15810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 |
15811 | $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } | |
15812 | if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : | |
15813 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
15814 | else |
15815 | $RM conftest* | |
15816 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
da0f6381 | 15817 | |
5213506e | 15818 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
00020c16 ILT |
15819 | (eval $ac_compile) 2>&5 |
15820 | ac_status=$? | |
5213506e RW |
15821 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
15822 | test $ac_status = 0; } 2>conftest.err; then | |
00020c16 ILT |
15823 | soname=conftest |
15824 | lib=conftest | |
15825 | libobjs=conftest.$ac_objext | |
15826 | deplibs= | |
15827 | wl=$lt_prog_compiler_wl | |
15828 | pic_flag=$lt_prog_compiler_pic | |
15829 | compiler_flags=-v | |
15830 | linker_flags=-v | |
15831 | verstring= | |
15832 | output_objdir=. | |
15833 | libname=conftest | |
15834 | lt_save_allow_undefined_flag=$allow_undefined_flag | |
15835 | allow_undefined_flag= | |
5213506e | 15836 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 |
00020c16 ILT |
15837 | (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 |
15838 | ac_status=$? | |
5213506e RW |
15839 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
15840 | test $ac_status = 0; } | |
00020c16 ILT |
15841 | then |
15842 | lt_cv_archive_cmds_need_lc=no | |
15843 | else | |
15844 | lt_cv_archive_cmds_need_lc=yes | |
15845 | fi | |
15846 | allow_undefined_flag=$lt_save_allow_undefined_flag | |
15847 | else | |
15848 | cat conftest.err 1>&5 | |
15849 | fi | |
15850 | $RM conftest* | |
da0f6381 | 15851 | |
00020c16 | 15852 | fi |
5213506e RW |
15853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 |
15854 | $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } | |
00020c16 ILT |
15855 | archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc |
15856 | ;; | |
15857 | esac | |
15858 | fi | |
15859 | ;; | |
15860 | esac | |
da0f6381 PB |
15861 | |
15862 | ||
15863 | ||
15864 | ||
5d47bb02 | 15865 | |
da0f6381 | 15866 | |
da0f6381 | 15867 | |
da0f6381 | 15868 | |
da0f6381 | 15869 | |
00020c16 ILT |
15870 | |
15871 | ||
15872 | ||
15873 | ||
15874 | ||
15875 | ||
15876 | ||
15877 | ||
15878 | ||
15879 | ||
15880 | ||
15881 | ||
15882 | ||
15883 | ||
15884 | ||
15885 | ||
15886 | ||
15887 | ||
15888 | ||
15889 | ||
15890 | ||
15891 | ||
15892 | ||
15893 | ||
15894 | ||
15895 | ||
15896 | ||
15897 | ||
15898 | ||
15899 | ||
15900 | ||
15901 | ||
15902 | ||
15903 | ||
15904 | ||
15905 | ||
15906 | ||
15907 | ||
15908 | ||
15909 | ||
15910 | ||
15911 | ||
15912 | ||
15913 | ||
15914 | ||
15915 | ||
15916 | ||
15917 | ||
15918 | ||
15919 | ||
15920 | ||
15921 | ||
15922 | ||
15923 | ||
15924 | ||
15925 | ||
15926 | ||
15927 | ||
15928 | ||
15929 | ||
15930 | ||
15931 | ||
15932 | ||
15933 | ||
15934 | ||
15935 | ||
15936 | ||
15937 | ||
15938 | ||
15939 | ||
15940 | ||
15941 | ||
15942 | ||
15943 | ||
15944 | ||
15945 | ||
15946 | ||
15947 | ||
15948 | ||
15949 | ||
15950 | ||
15951 | ||
15952 | ||
15953 | ||
15954 | ||
15955 | ||
15956 | ||
15957 | ||
15958 | ||
15959 | ||
15960 | ||
15961 | ||
15962 | ||
15963 | ||
15964 | ||
15965 | ||
15966 | ||
15967 | ||
15968 | ||
15969 | ||
15970 | ||
15971 | ||
15972 | ||
15973 | ||
15974 | ||
15975 | ||
15976 | ||
15977 | ||
15978 | ||
15979 | ||
15980 | ||
15981 | ||
15982 | ||
15983 | ||
15984 | ||
15985 | ||
15986 | ||
15987 | ||
15988 | ||
15989 | ||
15990 | ||
15991 | ||
15992 | ||
15993 | ||
15994 | ||
15995 | ||
15996 | ||
15997 | ||
15998 | ||
15999 | ||
16000 | ||
16001 | ||
16002 | ||
16003 | ||
16004 | ||
16005 | ||
16006 | ||
16007 | ||
16008 | ||
16009 | ||
16010 | ||
16011 | ||
16012 | ||
16013 | ||
16014 | ||
16015 | ||
16016 | ||
16017 | ||
5213506e RW |
16018 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 |
16019 | $as_echo_n "checking dynamic linker characteristics... " >&6; } | |
00020c16 ILT |
16020 | |
16021 | if test "$GCC" = yes; then | |
16022 | case $host_os in | |
16023 | darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; | |
16024 | *) lt_awk_arg="/^libraries:/" ;; | |
16025 | esac | |
43e02a8a RW |
16026 | case $host_os in |
16027 | mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; | |
16028 | *) lt_sed_strip_eq="s,=/,/,g" ;; | |
16029 | esac | |
16030 | lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` | |
16031 | case $lt_search_path_spec in | |
16032 | *\;*) | |
00020c16 ILT |
16033 | # if the path contains ";" then we assume it to be the separator |
16034 | # otherwise default to the standard path separator (i.e. ":") - it is | |
16035 | # assumed that no part of a normal pathname contains ";" but that should | |
16036 | # okay in the real world where ";" in dirpaths is itself problematic. | |
43e02a8a RW |
16037 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` |
16038 | ;; | |
16039 | *) | |
16040 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` | |
16041 | ;; | |
16042 | esac | |
00020c16 ILT |
16043 | # Ok, now we have the path, separated by spaces, we can step through it |
16044 | # and add multilib dir if necessary. | |
16045 | lt_tmp_lt_search_path_spec= | |
16046 | lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` | |
16047 | for lt_sys_path in $lt_search_path_spec; do | |
16048 | if test -d "$lt_sys_path/$lt_multi_os_dir"; then | |
16049 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" | |
16050 | else | |
16051 | test -d "$lt_sys_path" && \ | |
16052 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" | |
16053 | fi | |
16054 | done | |
43e02a8a | 16055 | lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' |
00020c16 ILT |
16056 | BEGIN {RS=" "; FS="/|\n";} { |
16057 | lt_foo=""; | |
16058 | lt_count=0; | |
16059 | for (lt_i = NF; lt_i > 0; lt_i--) { | |
16060 | if ($lt_i != "" && $lt_i != ".") { | |
16061 | if ($lt_i == "..") { | |
16062 | lt_count++; | |
16063 | } else { | |
16064 | if (lt_count == 0) { | |
16065 | lt_foo="/" $lt_i lt_foo; | |
16066 | } else { | |
16067 | lt_count--; | |
16068 | } | |
16069 | } | |
16070 | } | |
16071 | } | |
16072 | if (lt_foo != "") { lt_freq[lt_foo]++; } | |
16073 | if (lt_freq[lt_foo] == 1) { print lt_foo; } | |
16074 | }'` | |
43e02a8a RW |
16075 | # AWK program above erroneously prepends '/' to C:/dos/paths |
16076 | # for these hosts. | |
16077 | case $host_os in | |
16078 | mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ | |
16079 | $SED 's,/\([A-Za-z]:\),\1,g'` ;; | |
16080 | esac | |
16081 | sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` | |
00020c16 ILT |
16082 | else |
16083 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
16084 | fi | |
16085 | library_names_spec= | |
16086 | libname_spec='lib$name' | |
16087 | soname_spec= | |
16088 | shrext_cmds=".so" | |
16089 | postinstall_cmds= | |
16090 | postuninstall_cmds= | |
16091 | finish_cmds= | |
16092 | finish_eval= | |
16093 | shlibpath_var= | |
16094 | shlibpath_overrides_runpath=unknown | |
16095 | version_type=none | |
16096 | dynamic_linker="$host_os ld.so" | |
16097 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
16098 | need_lib_prefix=unknown | |
16099 | hardcode_into_libs=no | |
16100 | ||
16101 | # when you set need_version to no, make sure it does not cause -set_version | |
16102 | # flags to be left without arguments | |
16103 | need_version=unknown | |
16104 | ||
16105 | case $host_os in | |
16106 | aix3*) | |
16107 | version_type=linux | |
16108 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | |
16109 | shlibpath_var=LIBPATH | |
16110 | ||
16111 | # AIX 3 has no versioning support, so we append a major version to the name. | |
16112 | soname_spec='${libname}${release}${shared_ext}$major' | |
16113 | ;; | |
16114 | ||
16115 | aix[4-9]*) | |
16116 | version_type=linux | |
16117 | need_lib_prefix=no | |
16118 | need_version=no | |
16119 | hardcode_into_libs=yes | |
16120 | if test "$host_cpu" = ia64; then | |
16121 | # AIX 5 supports IA64 | |
16122 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | |
16123 | shlibpath_var=LD_LIBRARY_PATH | |
16124 | else | |
16125 | # With GCC up to 2.95.x, collect2 would create an import file | |
16126 | # for dependence libraries. The import file would start with | |
16127 | # the line `#! .'. This would cause the generated library to | |
16128 | # depend on `.', always an invalid library. This was fixed in | |
16129 | # development snapshots of GCC prior to 3.0. | |
16130 | case $host_os in | |
16131 | aix4 | aix4.[01] | aix4.[01].*) | |
16132 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
16133 | echo ' yes ' | |
da0f6381 PB |
16134 | echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then |
16135 | : | |
16136 | else | |
16137 | can_build_shared=no | |
16138 | fi | |
16139 | ;; | |
16140 | esac | |
16141 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | |
16142 | # soname into executable. Probably we can add versioning support to | |
16143 | # collect2, so additional links can be useful in future. | |
16144 | if test "$aix_use_runtimelinking" = yes; then | |
16145 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
16146 | # instead of lib<name>.a to let people know that these are not | |
16147 | # typical AIX shared libraries. | |
16148 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16149 | else | |
16150 | # We preserve .a as extension for shared libraries through AIX4.2 | |
16151 | # and later when we are not doing run time linking. | |
16152 | library_names_spec='${libname}${release}.a $libname.a' | |
16153 | soname_spec='${libname}${release}${shared_ext}$major' | |
16154 | fi | |
16155 | shlibpath_var=LIBPATH | |
16156 | fi | |
16157 | ;; | |
16158 | ||
16159 | amigaos*) | |
5d47bb02 PG |
16160 | case $host_cpu in |
16161 | powerpc) | |
16162 | # Since July 2007 AmigaOS4 officially supports .so libraries. | |
16163 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | |
16164 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16165 | ;; | |
16166 | m68k) | |
da0f6381 PB |
16167 | library_names_spec='$libname.ixlibrary $libname.a' |
16168 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
43e02a8a | 16169 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' |
5d47bb02 PG |
16170 | ;; |
16171 | esac | |
da0f6381 PB |
16172 | ;; |
16173 | ||
16174 | beos*) | |
16175 | library_names_spec='${libname}${shared_ext}' | |
16176 | dynamic_linker="$host_os ld.so" | |
16177 | shlibpath_var=LIBRARY_PATH | |
16178 | ;; | |
16179 | ||
16180 | bsdi[45]*) | |
16181 | version_type=linux | |
16182 | need_version=no | |
16183 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16184 | soname_spec='${libname}${release}${shared_ext}$major' | |
16185 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
16186 | shlibpath_var=LD_LIBRARY_PATH | |
16187 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
16188 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
16189 | # the default ld.so.conf also contains /usr/contrib/lib and | |
16190 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
16191 | # libtool to hard-code these into programs | |
16192 | ;; | |
16193 | ||
5d47bb02 | 16194 | cygwin* | mingw* | pw32* | cegcc*) |
da0f6381 PB |
16195 | version_type=windows |
16196 | shrext_cmds=".dll" | |
16197 | need_version=no | |
16198 | need_lib_prefix=no | |
16199 | ||
5d47bb02 PG |
16200 | case $GCC,$host_os in |
16201 | yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | |
da0f6381 PB |
16202 | library_names_spec='$libname.dll.a' |
16203 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
16204 | postinstall_cmds='base_file=`basename \${file}`~ | |
16205 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | |
16206 | dldir=$destdir/`dirname \$dlpath`~ | |
16207 | test -d \$dldir || mkdir -p \$dldir~ | |
16208 | $install_prog $dir/$dlname \$dldir/$dlname~ | |
16209 | chmod a+x \$dldir/$dlname~ | |
16210 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | |
16211 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | |
16212 | fi' | |
16213 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
16214 | dlpath=$dir/\$dldll~ | |
16215 | $RM \$dlpath' | |
16216 | shlibpath_overrides_runpath=yes | |
16217 | ||
16218 | case $host_os in | |
16219 | cygwin*) | |
16220 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | |
16221 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
43e02a8a RW |
16222 | |
16223 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" | |
da0f6381 | 16224 | ;; |
5d47bb02 | 16225 | mingw* | cegcc*) |
da0f6381 PB |
16226 | # MinGW DLLs use traditional 'lib' prefix |
16227 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
da0f6381 PB |
16228 | ;; |
16229 | pw32*) | |
16230 | # pw32 DLLs use 'pw' prefix rather than 'lib' | |
16231 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
16232 | ;; | |
16233 | esac | |
16234 | ;; | |
16235 | ||
16236 | *) | |
16237 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | |
16238 | ;; | |
16239 | esac | |
16240 | dynamic_linker='Win32 ld.exe' | |
16241 | # FIXME: first we should search . and the directory the executable is in | |
16242 | shlibpath_var=PATH | |
16243 | ;; | |
16244 | ||
16245 | darwin* | rhapsody*) | |
16246 | dynamic_linker="$host_os dyld" | |
16247 | version_type=darwin | |
16248 | need_lib_prefix=no | |
16249 | need_version=no | |
16250 | library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' | |
16251 | soname_spec='${libname}${release}${major}$shared_ext' | |
16252 | shlibpath_overrides_runpath=yes | |
16253 | shlibpath_var=DYLD_LIBRARY_PATH | |
16254 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | |
16255 | ||
16256 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" | |
16257 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | |
16258 | ;; | |
16259 | ||
16260 | dgux*) | |
16261 | version_type=linux | |
16262 | need_lib_prefix=no | |
16263 | need_version=no | |
16264 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | |
16265 | soname_spec='${libname}${release}${shared_ext}$major' | |
16266 | shlibpath_var=LD_LIBRARY_PATH | |
16267 | ;; | |
16268 | ||
16269 | freebsd1*) | |
16270 | dynamic_linker=no | |
16271 | ;; | |
16272 | ||
16273 | freebsd* | dragonfly*) | |
16274 | # DragonFly does not have aout. When/if they implement a new | |
16275 | # versioning mechanism, adjust this. | |
16276 | if test -x /usr/bin/objformat; then | |
16277 | objformat=`/usr/bin/objformat` | |
16278 | else | |
16279 | case $host_os in | |
16280 | freebsd[123]*) objformat=aout ;; | |
16281 | *) objformat=elf ;; | |
16282 | esac | |
16283 | fi | |
16284 | version_type=freebsd-$objformat | |
16285 | case $version_type in | |
16286 | freebsd-elf*) | |
16287 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
16288 | need_version=no | |
16289 | need_lib_prefix=no | |
16290 | ;; | |
16291 | freebsd-*) | |
16292 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | |
16293 | need_version=yes | |
16294 | ;; | |
16295 | esac | |
16296 | shlibpath_var=LD_LIBRARY_PATH | |
16297 | case $host_os in | |
16298 | freebsd2*) | |
16299 | shlibpath_overrides_runpath=yes | |
16300 | ;; | |
16301 | freebsd3.[01]* | freebsdelf3.[01]*) | |
16302 | shlibpath_overrides_runpath=yes | |
16303 | hardcode_into_libs=yes | |
16304 | ;; | |
16305 | freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ | |
16306 | freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) | |
16307 | shlibpath_overrides_runpath=no | |
16308 | hardcode_into_libs=yes | |
16309 | ;; | |
16310 | *) # from 4.6 on, and DragonFly | |
16311 | shlibpath_overrides_runpath=yes | |
16312 | hardcode_into_libs=yes | |
16313 | ;; | |
16314 | esac | |
16315 | ;; | |
16316 | ||
16317 | gnu*) | |
16318 | version_type=linux | |
16319 | need_lib_prefix=no | |
16320 | need_version=no | |
16321 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
16322 | soname_spec='${libname}${release}${shared_ext}$major' | |
16323 | shlibpath_var=LD_LIBRARY_PATH | |
16324 | hardcode_into_libs=yes | |
16325 | ;; | |
16326 | ||
43e02a8a RW |
16327 | haiku*) |
16328 | version_type=linux | |
16329 | need_lib_prefix=no | |
16330 | need_version=no | |
16331 | dynamic_linker="$host_os runtime_loader" | |
16332 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
16333 | soname_spec='${libname}${release}${shared_ext}$major' | |
16334 | shlibpath_var=LIBRARY_PATH | |
16335 | shlibpath_overrides_runpath=yes | |
16336 | sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | |
16337 | hardcode_into_libs=yes | |
16338 | ;; | |
16339 | ||
da0f6381 PB |
16340 | hpux9* | hpux10* | hpux11*) |
16341 | # Give a soname corresponding to the major version so that dld.sl refuses to | |
16342 | # link against other versions. | |
16343 | version_type=sunos | |
16344 | need_lib_prefix=no | |
16345 | need_version=no | |
16346 | case $host_cpu in | |
16347 | ia64*) | |
16348 | shrext_cmds='.so' | |
16349 | hardcode_into_libs=yes | |
16350 | dynamic_linker="$host_os dld.so" | |
16351 | shlibpath_var=LD_LIBRARY_PATH | |
16352 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
16353 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16354 | soname_spec='${libname}${release}${shared_ext}$major' | |
16355 | if test "X$HPUX_IA64_MODE" = X32; then | |
16356 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
16357 | else | |
16358 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
16359 | fi | |
16360 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
16361 | ;; | |
16362 | hppa*64*) | |
16363 | shrext_cmds='.sl' | |
16364 | hardcode_into_libs=yes | |
16365 | dynamic_linker="$host_os dld.sl" | |
16366 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | |
16367 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
16368 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16369 | soname_spec='${libname}${release}${shared_ext}$major' | |
16370 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | |
16371 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
16372 | ;; | |
16373 | *) | |
16374 | shrext_cmds='.sl' | |
16375 | dynamic_linker="$host_os dld.sl" | |
16376 | shlibpath_var=SHLIB_PATH | |
16377 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
16378 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16379 | soname_spec='${libname}${release}${shared_ext}$major' | |
16380 | ;; | |
16381 | esac | |
43e02a8a | 16382 | # HP-UX runs *really* slowly unless shared libraries are mode 555, ... |
da0f6381 | 16383 | postinstall_cmds='chmod 555 $lib' |
43e02a8a RW |
16384 | # or fails outright, so override atomically: |
16385 | install_override_mode=555 | |
da0f6381 PB |
16386 | ;; |
16387 | ||
16388 | interix[3-9]*) | |
16389 | version_type=linux | |
16390 | need_lib_prefix=no | |
16391 | need_version=no | |
16392 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
16393 | soname_spec='${libname}${release}${shared_ext}$major' | |
16394 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | |
16395 | shlibpath_var=LD_LIBRARY_PATH | |
16396 | shlibpath_overrides_runpath=no | |
16397 | hardcode_into_libs=yes | |
16398 | ;; | |
16399 | ||
16400 | irix5* | irix6* | nonstopux*) | |
16401 | case $host_os in | |
16402 | nonstopux*) version_type=nonstopux ;; | |
16403 | *) | |
16404 | if test "$lt_cv_prog_gnu_ld" = yes; then | |
16405 | version_type=linux | |
16406 | else | |
16407 | version_type=irix | |
16408 | fi ;; | |
16409 | esac | |
16410 | need_lib_prefix=no | |
16411 | need_version=no | |
16412 | soname_spec='${libname}${release}${shared_ext}$major' | |
16413 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | |
16414 | case $host_os in | |
16415 | irix5* | nonstopux*) | |
16416 | libsuff= shlibsuff= | |
16417 | ;; | |
16418 | *) | |
16419 | case $LD in # libtool.m4 will add one of these switches to LD | |
16420 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | |
16421 | libsuff= shlibsuff= libmagic=32-bit;; | |
16422 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | |
16423 | libsuff=32 shlibsuff=N32 libmagic=N32;; | |
16424 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | |
16425 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
16426 | *) libsuff= shlibsuff= libmagic=never-match;; | |
16427 | esac | |
16428 | ;; | |
16429 | esac | |
16430 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
16431 | shlibpath_overrides_runpath=no | |
16432 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
16433 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
16434 | hardcode_into_libs=yes | |
16435 | ;; | |
16436 | ||
16437 | # No shared lib support for Linux oldld, aout, or coff. | |
16438 | linux*oldld* | linux*aout* | linux*coff*) | |
16439 | dynamic_linker=no | |
16440 | ;; | |
16441 | ||
16442 | # This must be Linux ELF. | |
7a9d3fe8 | 16443 | linux* | k*bsd*-gnu | kopensolaris*-gnu) |
da0f6381 PB |
16444 | version_type=linux |
16445 | need_lib_prefix=no | |
16446 | need_version=no | |
16447 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16448 | soname_spec='${libname}${release}${shared_ext}$major' | |
16449 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
16450 | shlibpath_var=LD_LIBRARY_PATH | |
16451 | shlibpath_overrides_runpath=no | |
baafc534 | 16452 | |
da0f6381 | 16453 | # Some binutils ld are patched to set DT_RUNPATH |
5213506e RW |
16454 | if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : |
16455 | $as_echo_n "(cached) " >&6 | |
baafc534 RW |
16456 | else |
16457 | lt_cv_shlibpath_overrides_runpath=no | |
16458 | save_LDFLAGS=$LDFLAGS | |
16459 | save_libdir=$libdir | |
16460 | eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ | |
16461 | LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" | |
5213506e | 16462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
16463 | /* end confdefs.h. */ |
16464 | ||
16465 | int | |
16466 | main () | |
16467 | { | |
16468 | ||
16469 | ; | |
16470 | return 0; | |
16471 | } | |
16472 | _ACEOF | |
5213506e RW |
16473 | if ac_fn_c_try_link "$LINENO"; then : |
16474 | if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : | |
baafc534 | 16475 | lt_cv_shlibpath_overrides_runpath=yes |
da0f6381 | 16476 | fi |
da0f6381 | 16477 | fi |
5213506e RW |
16478 | rm -f core conftest.err conftest.$ac_objext \ |
16479 | conftest$ac_exeext conftest.$ac_ext | |
baafc534 RW |
16480 | LDFLAGS=$save_LDFLAGS |
16481 | libdir=$save_libdir | |
16482 | ||
16483 | fi | |
16484 | ||
16485 | shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath | |
da0f6381 PB |
16486 | |
16487 | # This implies no fast_install, which is unacceptable. | |
16488 | # Some rework will be needed to allow for fast_install | |
16489 | # before this can be enabled. | |
16490 | hardcode_into_libs=yes | |
16491 | ||
16492 | # Append ld.so.conf contents to the search path | |
16493 | if test -f /etc/ld.so.conf; then | |
43e02a8a | 16494 | lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` |
da0f6381 PB |
16495 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" |
16496 | fi | |
16497 | ||
16498 | # We used to test for /lib/ld.so.1 and disable shared libraries on | |
16499 | # powerpc, because MkLinux only supported shared libraries with the | |
16500 | # GNU dynamic linker. Since this was broken with cross compilers, | |
16501 | # most powerpc-linux boxes support dynamic linking these days and | |
16502 | # people can always --disable-shared, the test was removed, and we | |
16503 | # assume the GNU/Linux dynamic linker is in use. | |
16504 | dynamic_linker='GNU/Linux ld.so' | |
16505 | ;; | |
16506 | ||
16507 | netbsd*) | |
16508 | version_type=sunos | |
16509 | need_lib_prefix=no | |
16510 | need_version=no | |
16511 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
16512 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
16513 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
16514 | dynamic_linker='NetBSD (a.out) ld.so' | |
16515 | else | |
16516 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
16517 | soname_spec='${libname}${release}${shared_ext}$major' | |
16518 | dynamic_linker='NetBSD ld.elf_so' | |
16519 | fi | |
16520 | shlibpath_var=LD_LIBRARY_PATH | |
16521 | shlibpath_overrides_runpath=yes | |
16522 | hardcode_into_libs=yes | |
16523 | ;; | |
16524 | ||
16525 | newsos6) | |
16526 | version_type=linux | |
16527 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16528 | shlibpath_var=LD_LIBRARY_PATH | |
16529 | shlibpath_overrides_runpath=yes | |
16530 | ;; | |
16531 | ||
16532 | *nto* | *qnx*) | |
16533 | version_type=qnx | |
16534 | need_lib_prefix=no | |
16535 | need_version=no | |
16536 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16537 | soname_spec='${libname}${release}${shared_ext}$major' | |
16538 | shlibpath_var=LD_LIBRARY_PATH | |
16539 | shlibpath_overrides_runpath=no | |
16540 | hardcode_into_libs=yes | |
16541 | dynamic_linker='ldqnx.so' | |
16542 | ;; | |
16543 | ||
16544 | openbsd*) | |
16545 | version_type=sunos | |
16546 | sys_lib_dlsearch_path_spec="/usr/lib" | |
16547 | need_lib_prefix=no | |
16548 | # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | |
16549 | case $host_os in | |
16550 | openbsd3.3 | openbsd3.3.*) need_version=yes ;; | |
16551 | *) need_version=no ;; | |
16552 | esac | |
16553 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
16554 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
16555 | shlibpath_var=LD_LIBRARY_PATH | |
16556 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
16557 | case $host_os in | |
16558 | openbsd2.[89] | openbsd2.[89].*) | |
16559 | shlibpath_overrides_runpath=no | |
16560 | ;; | |
16561 | *) | |
16562 | shlibpath_overrides_runpath=yes | |
16563 | ;; | |
16564 | esac | |
16565 | else | |
16566 | shlibpath_overrides_runpath=yes | |
16567 | fi | |
16568 | ;; | |
16569 | ||
16570 | os2*) | |
16571 | libname_spec='$name' | |
16572 | shrext_cmds=".dll" | |
16573 | need_lib_prefix=no | |
16574 | library_names_spec='$libname${shared_ext} $libname.a' | |
16575 | dynamic_linker='OS/2 ld.exe' | |
16576 | shlibpath_var=LIBPATH | |
16577 | ;; | |
16578 | ||
16579 | osf3* | osf4* | osf5*) | |
16580 | version_type=osf | |
16581 | need_lib_prefix=no | |
16582 | need_version=no | |
16583 | soname_spec='${libname}${release}${shared_ext}$major' | |
16584 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16585 | shlibpath_var=LD_LIBRARY_PATH | |
16586 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
16587 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
16588 | ;; | |
16589 | ||
16590 | rdos*) | |
16591 | dynamic_linker=no | |
16592 | ;; | |
16593 | ||
16594 | solaris*) | |
16595 | version_type=linux | |
16596 | need_lib_prefix=no | |
16597 | need_version=no | |
16598 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16599 | soname_spec='${libname}${release}${shared_ext}$major' | |
16600 | shlibpath_var=LD_LIBRARY_PATH | |
16601 | shlibpath_overrides_runpath=yes | |
16602 | hardcode_into_libs=yes | |
16603 | # ldd complains unless libraries are executable | |
16604 | postinstall_cmds='chmod +x $lib' | |
16605 | ;; | |
16606 | ||
16607 | sunos4*) | |
16608 | version_type=sunos | |
16609 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
16610 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
16611 | shlibpath_var=LD_LIBRARY_PATH | |
16612 | shlibpath_overrides_runpath=yes | |
16613 | if test "$with_gnu_ld" = yes; then | |
16614 | need_lib_prefix=no | |
16615 | fi | |
16616 | need_version=yes | |
16617 | ;; | |
16618 | ||
16619 | sysv4 | sysv4.3*) | |
16620 | version_type=linux | |
16621 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16622 | soname_spec='${libname}${release}${shared_ext}$major' | |
16623 | shlibpath_var=LD_LIBRARY_PATH | |
16624 | case $host_vendor in | |
16625 | sni) | |
16626 | shlibpath_overrides_runpath=no | |
16627 | need_lib_prefix=no | |
16628 | runpath_var=LD_RUN_PATH | |
16629 | ;; | |
16630 | siemens) | |
16631 | need_lib_prefix=no | |
16632 | ;; | |
16633 | motorola) | |
16634 | need_lib_prefix=no | |
16635 | need_version=no | |
16636 | shlibpath_overrides_runpath=no | |
16637 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
16638 | ;; | |
16639 | esac | |
16640 | ;; | |
16641 | ||
16642 | sysv4*MP*) | |
16643 | if test -d /usr/nec ;then | |
16644 | version_type=linux | |
16645 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | |
16646 | soname_spec='$libname${shared_ext}.$major' | |
16647 | shlibpath_var=LD_LIBRARY_PATH | |
16648 | fi | |
16649 | ;; | |
16650 | ||
16651 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
16652 | version_type=freebsd-elf | |
16653 | need_lib_prefix=no | |
16654 | need_version=no | |
16655 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
16656 | soname_spec='${libname}${release}${shared_ext}$major' | |
16657 | shlibpath_var=LD_LIBRARY_PATH | |
16658 | shlibpath_overrides_runpath=yes | |
16659 | hardcode_into_libs=yes | |
16660 | if test "$with_gnu_ld" = yes; then | |
16661 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | |
16662 | else | |
16663 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' | |
16664 | case $host_os in | |
16665 | sco3.2v5*) | |
16666 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | |
16667 | ;; | |
16668 | esac | |
16669 | fi | |
16670 | sys_lib_dlsearch_path_spec='/usr/lib' | |
16671 | ;; | |
16672 | ||
16673 | tpf*) | |
16674 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | |
16675 | version_type=linux | |
16676 | need_lib_prefix=no | |
16677 | need_version=no | |
5d47bb02 | 16678 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
da0f6381 PB |
16679 | shlibpath_var=LD_LIBRARY_PATH |
16680 | shlibpath_overrides_runpath=no | |
16681 | hardcode_into_libs=yes | |
16682 | ;; | |
16683 | ||
16684 | uts4*) | |
16685 | version_type=linux | |
16686 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
16687 | soname_spec='${libname}${release}${shared_ext}$major' | |
16688 | shlibpath_var=LD_LIBRARY_PATH | |
16689 | ;; | |
16690 | ||
16691 | *) | |
16692 | dynamic_linker=no | |
16693 | ;; | |
16694 | esac | |
5213506e RW |
16695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 |
16696 | $as_echo "$dynamic_linker" >&6; } | |
da0f6381 PB |
16697 | test "$dynamic_linker" = no && can_build_shared=no |
16698 | ||
16699 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |
16700 | if test "$GCC" = yes; then | |
16701 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
16702 | fi | |
16703 | ||
5d47bb02 PG |
16704 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then |
16705 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | |
16706 | fi | |
16707 | if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then | |
16708 | sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | |
16709 | fi | |
16710 | ||
da0f6381 PB |
16711 | |
16712 | ||
16713 | ||
16714 | ||
16715 | ||
16716 | ||
16717 | ||
16718 | ||
16719 | ||
16720 | ||
16721 | ||
16722 | ||
16723 | ||
16724 | ||
16725 | ||
16726 | ||
16727 | ||
16728 | ||
16729 | ||
16730 | ||
16731 | ||
16732 | ||
16733 | ||
16734 | ||
16735 | ||
16736 | ||
16737 | ||
16738 | ||
16739 | ||
16740 | ||
16741 | ||
16742 | ||
16743 | ||
16744 | ||
16745 | ||
16746 | ||
16747 | ||
16748 | ||
16749 | ||
16750 | ||
16751 | ||
16752 | ||
16753 | ||
16754 | ||
16755 | ||
16756 | ||
16757 | ||
16758 | ||
16759 | ||
16760 | ||
16761 | ||
16762 | ||
16763 | ||
16764 | ||
16765 | ||
16766 | ||
16767 | ||
16768 | ||
16769 | ||
16770 | ||
16771 | ||
16772 | ||
16773 | ||
16774 | ||
16775 | ||
16776 | ||
16777 | ||
16778 | ||
16779 | ||
16780 | ||
16781 | ||
16782 | ||
16783 | ||
16784 | ||
16785 | ||
16786 | ||
16787 | ||
16788 | ||
16789 | ||
16790 | ||
43e02a8a RW |
16791 | |
16792 | ||
16793 | ||
16794 | ||
16795 | ||
da0f6381 PB |
16796 | |
16797 | ||
16798 | ||
16799 | ||
16800 | ||
16801 | ||
5213506e RW |
16802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 |
16803 | $as_echo_n "checking how to hardcode library paths into programs... " >&6; } | |
da0f6381 PB |
16804 | hardcode_action= |
16805 | if test -n "$hardcode_libdir_flag_spec" || | |
16806 | test -n "$runpath_var" || | |
16807 | test "X$hardcode_automatic" = "Xyes" ; then | |
16808 | ||
16809 | # We can hardcode non-existent directories. | |
16810 | if test "$hardcode_direct" != no && | |
16811 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
16812 | # have to relink, otherwise we might link with an installed library | |
16813 | # when we should be linking with a yet-to-be-installed one | |
16814 | ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && | |
16815 | test "$hardcode_minus_L" != no; then | |
16816 | # Linking always hardcodes the temporary library directory. | |
16817 | hardcode_action=relink | |
16818 | else | |
16819 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
16820 | hardcode_action=immediate | |
16821 | fi | |
16822 | else | |
16823 | # We cannot hardcode anything, or else we can only hardcode existing | |
16824 | # directories. | |
16825 | hardcode_action=unsupported | |
16826 | fi | |
5213506e RW |
16827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 |
16828 | $as_echo "$hardcode_action" >&6; } | |
da0f6381 PB |
16829 | |
16830 | if test "$hardcode_action" = relink || | |
16831 | test "$inherit_rpath" = yes; then | |
16832 | # Fast installation is not supported | |
16833 | enable_fast_install=no | |
16834 | elif test "$shlibpath_overrides_runpath" = yes || | |
16835 | test "$enable_shared" = no; then | |
16836 | # Fast installation is not necessary | |
16837 | enable_fast_install=needless | |
16838 | fi | |
16839 | ||
16840 | ||
16841 | ||
16842 | ||
16843 | ||
16844 | ||
16845 | if test "x$enable_dlopen" != xyes; then | |
16846 | enable_dlopen=unknown | |
16847 | enable_dlopen_self=unknown | |
16848 | enable_dlopen_self_static=unknown | |
16849 | else | |
16850 | lt_cv_dlopen=no | |
16851 | lt_cv_dlopen_libs= | |
16852 | ||
16853 | case $host_os in | |
16854 | beos*) | |
16855 | lt_cv_dlopen="load_add_on" | |
16856 | lt_cv_dlopen_libs= | |
16857 | lt_cv_dlopen_self=yes | |
16858 | ;; | |
16859 | ||
5d47bb02 | 16860 | mingw* | pw32* | cegcc*) |
da0f6381 | 16861 | lt_cv_dlopen="LoadLibrary" |
5213506e RW |
16862 | lt_cv_dlopen_libs= |
16863 | ;; | |
da0f6381 | 16864 | |
5213506e RW |
16865 | cygwin*) |
16866 | lt_cv_dlopen="dlopen" | |
16867 | lt_cv_dlopen_libs= | |
16868 | ;; | |
16869 | ||
16870 | darwin*) | |
16871 | # if libdl is installed we need to link against it | |
16872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
16873 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
16874 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
16875 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
16876 | else |
16877 | ac_check_lib_save_LIBS=$LIBS | |
5213506e RW |
16878 | LIBS="-ldl $LIBS" |
16879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
da0f6381 PB |
16880 | /* end confdefs.h. */ |
16881 | ||
5213506e RW |
16882 | /* Override any GCC internal prototype to avoid an error. |
16883 | Use char because int might match the return type of a GCC | |
16884 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
16885 | #ifdef __cplusplus |
16886 | extern "C" | |
16887 | #endif | |
5213506e | 16888 | char dlopen (); |
da0f6381 PB |
16889 | int |
16890 | main () | |
16891 | { | |
5213506e | 16892 | return dlopen (); |
da0f6381 PB |
16893 | ; |
16894 | return 0; | |
16895 | } | |
16896 | _ACEOF | |
5213506e RW |
16897 | if ac_fn_c_try_link "$LINENO"; then : |
16898 | ac_cv_lib_dl_dlopen=yes | |
da0f6381 | 16899 | else |
5213506e | 16900 | ac_cv_lib_dl_dlopen=no |
da0f6381 | 16901 | fi |
5213506e RW |
16902 | rm -f core conftest.err conftest.$ac_objext \ |
16903 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
16904 | LIBS=$ac_check_lib_save_LIBS |
16905 | fi | |
5213506e RW |
16906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
16907 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
16908 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
16909 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | |
da0f6381 | 16910 | else |
da0f6381 | 16911 | |
5213506e RW |
16912 | lt_cv_dlopen="dyld" |
16913 | lt_cv_dlopen_libs= | |
16914 | lt_cv_dlopen_self=yes | |
da0f6381 | 16915 | |
5213506e | 16916 | fi |
da0f6381 | 16917 | |
5213506e | 16918 | ;; |
da0f6381 | 16919 | |
5213506e RW |
16920 | *) |
16921 | ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" | |
16922 | if test "x$ac_cv_func_shl_load" = x""yes; then : | |
16923 | lt_cv_dlopen="shl_load" | |
16924 | else | |
16925 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 | |
16926 | $as_echo_n "checking for shl_load in -ldld... " >&6; } | |
16927 | if test "${ac_cv_lib_dld_shl_load+set}" = set; then : | |
16928 | $as_echo_n "(cached) " >&6 | |
16929 | else | |
16930 | ac_check_lib_save_LIBS=$LIBS | |
16931 | LIBS="-ldld $LIBS" | |
16932 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16933 | /* end confdefs.h. */ | |
16934 | ||
16935 | /* Override any GCC internal prototype to avoid an error. | |
16936 | Use char because int might match the return type of a GCC | |
da0f6381 | 16937 | builtin and then its argument prototype would still apply. */ |
da0f6381 | 16938 | #ifdef __cplusplus |
5213506e | 16939 | extern "C" |
da0f6381 | 16940 | #endif |
5213506e | 16941 | char shl_load (); |
da0f6381 PB |
16942 | int |
16943 | main () | |
16944 | { | |
5213506e | 16945 | return shl_load (); |
da0f6381 PB |
16946 | ; |
16947 | return 0; | |
16948 | } | |
16949 | _ACEOF | |
5213506e RW |
16950 | if ac_fn_c_try_link "$LINENO"; then : |
16951 | ac_cv_lib_dld_shl_load=yes | |
da0f6381 | 16952 | else |
5213506e | 16953 | ac_cv_lib_dld_shl_load=no |
da0f6381 | 16954 | fi |
5213506e RW |
16955 | rm -f core conftest.err conftest.$ac_objext \ |
16956 | conftest$ac_exeext conftest.$ac_ext | |
16957 | LIBS=$ac_check_lib_save_LIBS | |
da0f6381 | 16958 | fi |
5213506e RW |
16959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 |
16960 | $as_echo "$ac_cv_lib_dld_shl_load" >&6; } | |
16961 | if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : | |
16962 | lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" | |
16963 | else | |
16964 | ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" | |
16965 | if test "x$ac_cv_func_dlopen" = x""yes; then : | |
da0f6381 PB |
16966 | lt_cv_dlopen="dlopen" |
16967 | else | |
5213506e RW |
16968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
16969 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
16970 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
16971 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
16972 | else |
16973 | ac_check_lib_save_LIBS=$LIBS | |
16974 | LIBS="-ldl $LIBS" | |
5213506e | 16975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
16976 | /* end confdefs.h. */ |
16977 | ||
5213506e RW |
16978 | /* Override any GCC internal prototype to avoid an error. |
16979 | Use char because int might match the return type of a GCC | |
16980 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
16981 | #ifdef __cplusplus |
16982 | extern "C" | |
16983 | #endif | |
da0f6381 PB |
16984 | char dlopen (); |
16985 | int | |
16986 | main () | |
16987 | { | |
5213506e | 16988 | return dlopen (); |
da0f6381 PB |
16989 | ; |
16990 | return 0; | |
16991 | } | |
16992 | _ACEOF | |
5213506e | 16993 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 PB |
16994 | ac_cv_lib_dl_dlopen=yes |
16995 | else | |
5213506e | 16996 | ac_cv_lib_dl_dlopen=no |
da0f6381 | 16997 | fi |
5213506e RW |
16998 | rm -f core conftest.err conftest.$ac_objext \ |
16999 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
17000 | LIBS=$ac_check_lib_save_LIBS |
17001 | fi | |
5213506e RW |
17002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
17003 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
17004 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
da0f6381 PB |
17005 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" |
17006 | else | |
5213506e RW |
17007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 |
17008 | $as_echo_n "checking for dlopen in -lsvld... " >&6; } | |
17009 | if test "${ac_cv_lib_svld_dlopen+set}" = set; then : | |
17010 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
17011 | else |
17012 | ac_check_lib_save_LIBS=$LIBS | |
17013 | LIBS="-lsvld $LIBS" | |
5213506e | 17014 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
17015 | /* end confdefs.h. */ |
17016 | ||
5213506e RW |
17017 | /* Override any GCC internal prototype to avoid an error. |
17018 | Use char because int might match the return type of a GCC | |
17019 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
17020 | #ifdef __cplusplus |
17021 | extern "C" | |
17022 | #endif | |
da0f6381 PB |
17023 | char dlopen (); |
17024 | int | |
17025 | main () | |
17026 | { | |
5213506e | 17027 | return dlopen (); |
da0f6381 PB |
17028 | ; |
17029 | return 0; | |
17030 | } | |
17031 | _ACEOF | |
5213506e | 17032 | if ac_fn_c_try_link "$LINENO"; then : |
da0f6381 PB |
17033 | ac_cv_lib_svld_dlopen=yes |
17034 | else | |
5213506e | 17035 | ac_cv_lib_svld_dlopen=no |
da0f6381 | 17036 | fi |
5213506e RW |
17037 | rm -f core conftest.err conftest.$ac_objext \ |
17038 | conftest$ac_exeext conftest.$ac_ext | |
da0f6381 PB |
17039 | LIBS=$ac_check_lib_save_LIBS |
17040 | fi | |
5213506e RW |
17041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 |
17042 | $as_echo "$ac_cv_lib_svld_dlopen" >&6; } | |
17043 | if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : | |
da0f6381 PB |
17044 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" |
17045 | else | |
5213506e RW |
17046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 |
17047 | $as_echo_n "checking for dld_link in -ldld... " >&6; } | |
17048 | if test "${ac_cv_lib_dld_dld_link+set}" = set; then : | |
17049 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
17050 | else |
17051 | ac_check_lib_save_LIBS=$LIBS | |
17052 | LIBS="-ldld $LIBS" | |
5213506e | 17053 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
da0f6381 PB |
17054 | /* end confdefs.h. */ |
17055 | ||
5213506e RW |
17056 | /* Override any GCC internal prototype to avoid an error. |
17057 | Use char because int might match the return type of a GCC | |
17058 | builtin and then its argument prototype would still apply. */ | |
da0f6381 PB |
17059 | #ifdef __cplusplus |
17060 | extern "C" | |
17061 | #endif | |
da0f6381 PB |
17062 | char dld_link (); |
17063 | int | |
17064 | main () | |
17065 | { | |
5213506e | 17066 | return dld_link (); |
00020c16 ILT |
17067 | ; |
17068 | return 0; | |
17069 | } | |
17070 | _ACEOF | |
5213506e | 17071 | if ac_fn_c_try_link "$LINENO"; then : |
00020c16 ILT |
17072 | ac_cv_lib_dld_dld_link=yes |
17073 | else | |
5213506e | 17074 | ac_cv_lib_dld_dld_link=no |
00020c16 | 17075 | fi |
5213506e RW |
17076 | rm -f core conftest.err conftest.$ac_objext \ |
17077 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
17078 | LIBS=$ac_check_lib_save_LIBS |
17079 | fi | |
5213506e RW |
17080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 |
17081 | $as_echo "$ac_cv_lib_dld_dld_link" >&6; } | |
17082 | if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : | |
00020c16 ILT |
17083 | lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" |
17084 | fi | |
17085 | ||
17086 | ||
17087 | fi | |
17088 | ||
17089 | ||
17090 | fi | |
17091 | ||
17092 | ||
17093 | fi | |
17094 | ||
17095 | ||
17096 | fi | |
17097 | ||
17098 | ||
17099 | fi | |
17100 | ||
17101 | ;; | |
17102 | esac | |
17103 | ||
17104 | if test "x$lt_cv_dlopen" != xno; then | |
17105 | enable_dlopen=yes | |
17106 | else | |
17107 | enable_dlopen=no | |
17108 | fi | |
17109 | ||
17110 | case $lt_cv_dlopen in | |
17111 | dlopen) | |
17112 | save_CPPFLAGS="$CPPFLAGS" | |
17113 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
17114 | ||
17115 | save_LDFLAGS="$LDFLAGS" | |
17116 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
17117 | ||
17118 | save_LIBS="$LIBS" | |
17119 | LIBS="$lt_cv_dlopen_libs $LIBS" | |
17120 | ||
5213506e RW |
17121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 |
17122 | $as_echo_n "checking whether a program can dlopen itself... " >&6; } | |
17123 | if test "${lt_cv_dlopen_self+set}" = set; then : | |
17124 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17125 | else |
17126 | if test "$cross_compiling" = yes; then : | |
17127 | lt_cv_dlopen_self=cross | |
17128 | else | |
17129 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
17130 | lt_status=$lt_dlunknown | |
17131 | cat > conftest.$ac_ext <<_LT_EOF | |
d79389af | 17132 | #line 17132 "configure" |
00020c16 ILT |
17133 | #include "confdefs.h" |
17134 | ||
17135 | #if HAVE_DLFCN_H | |
17136 | #include <dlfcn.h> | |
17137 | #endif | |
17138 | ||
17139 | #include <stdio.h> | |
17140 | ||
17141 | #ifdef RTLD_GLOBAL | |
17142 | # define LT_DLGLOBAL RTLD_GLOBAL | |
17143 | #else | |
17144 | # ifdef DL_GLOBAL | |
17145 | # define LT_DLGLOBAL DL_GLOBAL | |
17146 | # else | |
17147 | # define LT_DLGLOBAL 0 | |
17148 | # endif | |
17149 | #endif | |
17150 | ||
17151 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
17152 | find out it does not work in some platform. */ | |
17153 | #ifndef LT_DLLAZY_OR_NOW | |
17154 | # ifdef RTLD_LAZY | |
17155 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
17156 | # else | |
17157 | # ifdef DL_LAZY | |
17158 | # define LT_DLLAZY_OR_NOW DL_LAZY | |
17159 | # else | |
17160 | # ifdef RTLD_NOW | |
17161 | # define LT_DLLAZY_OR_NOW RTLD_NOW | |
17162 | # else | |
17163 | # ifdef DL_NOW | |
17164 | # define LT_DLLAZY_OR_NOW DL_NOW | |
17165 | # else | |
17166 | # define LT_DLLAZY_OR_NOW 0 | |
17167 | # endif | |
17168 | # endif | |
17169 | # endif | |
17170 | # endif | |
17171 | #endif | |
17172 | ||
43e02a8a RW |
17173 | /* When -fvisbility=hidden is used, assume the code has been annotated |
17174 | correspondingly for the symbols needed. */ | |
17175 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | |
17176 | void fnord () __attribute__((visibility("default"))); | |
17177 | #endif | |
17178 | ||
17179 | void fnord () { int i=42; } | |
00020c16 ILT |
17180 | int main () |
17181 | { | |
17182 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
17183 | int status = $lt_dlunknown; | |
17184 | ||
17185 | if (self) | |
17186 | { | |
17187 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
43e02a8a RW |
17188 | else |
17189 | { | |
17190 | if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
17191 | else puts (dlerror ()); | |
17192 | } | |
00020c16 ILT |
17193 | /* dlclose (self); */ |
17194 | } | |
17195 | else | |
17196 | puts (dlerror ()); | |
17197 | ||
17198 | return status; | |
17199 | } | |
17200 | _LT_EOF | |
5213506e | 17201 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
00020c16 ILT |
17202 | (eval $ac_link) 2>&5 |
17203 | ac_status=$? | |
5213506e RW |
17204 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
17205 | test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then | |
00020c16 ILT |
17206 | (./conftest; exit; ) >&5 2>/dev/null |
17207 | lt_status=$? | |
17208 | case x$lt_status in | |
17209 | x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; | |
17210 | x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; | |
17211 | x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; | |
17212 | esac | |
17213 | else : | |
17214 | # compilation failed | |
17215 | lt_cv_dlopen_self=no | |
17216 | fi | |
17217 | fi | |
17218 | rm -fr conftest* | |
17219 | ||
17220 | ||
17221 | fi | |
5213506e RW |
17222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 |
17223 | $as_echo "$lt_cv_dlopen_self" >&6; } | |
00020c16 ILT |
17224 | |
17225 | if test "x$lt_cv_dlopen_self" = xyes; then | |
17226 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" | |
5213506e RW |
17227 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 |
17228 | $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } | |
17229 | if test "${lt_cv_dlopen_self_static+set}" = set; then : | |
17230 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17231 | else |
17232 | if test "$cross_compiling" = yes; then : | |
17233 | lt_cv_dlopen_self_static=cross | |
17234 | else | |
17235 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
17236 | lt_status=$lt_dlunknown | |
17237 | cat > conftest.$ac_ext <<_LT_EOF | |
d79389af | 17238 | #line 17238 "configure" |
00020c16 ILT |
17239 | #include "confdefs.h" |
17240 | ||
17241 | #if HAVE_DLFCN_H | |
17242 | #include <dlfcn.h> | |
17243 | #endif | |
17244 | ||
17245 | #include <stdio.h> | |
17246 | ||
17247 | #ifdef RTLD_GLOBAL | |
17248 | # define LT_DLGLOBAL RTLD_GLOBAL | |
17249 | #else | |
17250 | # ifdef DL_GLOBAL | |
17251 | # define LT_DLGLOBAL DL_GLOBAL | |
17252 | # else | |
17253 | # define LT_DLGLOBAL 0 | |
17254 | # endif | |
17255 | #endif | |
17256 | ||
17257 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
17258 | find out it does not work in some platform. */ | |
17259 | #ifndef LT_DLLAZY_OR_NOW | |
17260 | # ifdef RTLD_LAZY | |
17261 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
17262 | # else | |
17263 | # ifdef DL_LAZY | |
17264 | # define LT_DLLAZY_OR_NOW DL_LAZY | |
17265 | # else | |
17266 | # ifdef RTLD_NOW | |
17267 | # define LT_DLLAZY_OR_NOW RTLD_NOW | |
17268 | # else | |
17269 | # ifdef DL_NOW | |
17270 | # define LT_DLLAZY_OR_NOW DL_NOW | |
17271 | # else | |
17272 | # define LT_DLLAZY_OR_NOW 0 | |
17273 | # endif | |
17274 | # endif | |
17275 | # endif | |
17276 | # endif | |
17277 | #endif | |
17278 | ||
43e02a8a RW |
17279 | /* When -fvisbility=hidden is used, assume the code has been annotated |
17280 | correspondingly for the symbols needed. */ | |
17281 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | |
17282 | void fnord () __attribute__((visibility("default"))); | |
17283 | #endif | |
17284 | ||
17285 | void fnord () { int i=42; } | |
00020c16 ILT |
17286 | int main () |
17287 | { | |
17288 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
17289 | int status = $lt_dlunknown; | |
17290 | ||
17291 | if (self) | |
17292 | { | |
17293 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
43e02a8a RW |
17294 | else |
17295 | { | |
17296 | if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
17297 | else puts (dlerror ()); | |
17298 | } | |
00020c16 ILT |
17299 | /* dlclose (self); */ |
17300 | } | |
17301 | else | |
17302 | puts (dlerror ()); | |
17303 | ||
17304 | return status; | |
17305 | } | |
17306 | _LT_EOF | |
5213506e | 17307 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
00020c16 ILT |
17308 | (eval $ac_link) 2>&5 |
17309 | ac_status=$? | |
5213506e RW |
17310 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
17311 | test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then | |
00020c16 ILT |
17312 | (./conftest; exit; ) >&5 2>/dev/null |
17313 | lt_status=$? | |
17314 | case x$lt_status in | |
17315 | x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; | |
17316 | x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; | |
17317 | x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; | |
17318 | esac | |
17319 | else : | |
17320 | # compilation failed | |
17321 | lt_cv_dlopen_self_static=no | |
17322 | fi | |
17323 | fi | |
17324 | rm -fr conftest* | |
17325 | ||
17326 | ||
17327 | fi | |
5213506e RW |
17328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 |
17329 | $as_echo "$lt_cv_dlopen_self_static" >&6; } | |
00020c16 ILT |
17330 | fi |
17331 | ||
17332 | CPPFLAGS="$save_CPPFLAGS" | |
17333 | LDFLAGS="$save_LDFLAGS" | |
17334 | LIBS="$save_LIBS" | |
17335 | ;; | |
17336 | esac | |
17337 | ||
17338 | case $lt_cv_dlopen_self in | |
17339 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
17340 | *) enable_dlopen_self=unknown ;; | |
17341 | esac | |
17342 | ||
17343 | case $lt_cv_dlopen_self_static in | |
17344 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
17345 | *) enable_dlopen_self_static=unknown ;; | |
17346 | esac | |
17347 | fi | |
17348 | ||
17349 | ||
17350 | ||
17351 | ||
17352 | ||
17353 | ||
17354 | ||
17355 | ||
17356 | ||
17357 | ||
17358 | ||
17359 | ||
17360 | ||
17361 | ||
17362 | ||
17363 | ||
17364 | ||
17365 | striplib= | |
17366 | old_striplib= | |
5213506e RW |
17367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 |
17368 | $as_echo_n "checking whether stripping libraries is possible... " >&6; } | |
00020c16 ILT |
17369 | if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then |
17370 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
17371 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
5213506e RW |
17372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17373 | $as_echo "yes" >&6; } | |
00020c16 ILT |
17374 | else |
17375 | # FIXME - insert some real tests, host_os isn't really good enough | |
17376 | case $host_os in | |
17377 | darwin*) | |
17378 | if test -n "$STRIP" ; then | |
17379 | striplib="$STRIP -x" | |
17380 | old_striplib="$STRIP -S" | |
5213506e RW |
17381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17382 | $as_echo "yes" >&6; } | |
00020c16 | 17383 | else |
5213506e RW |
17384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17385 | $as_echo "no" >&6; } | |
00020c16 ILT |
17386 | fi |
17387 | ;; | |
17388 | *) | |
5213506e RW |
17389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17390 | $as_echo "no" >&6; } | |
00020c16 ILT |
17391 | ;; |
17392 | esac | |
17393 | fi | |
17394 | ||
17395 | ||
17396 | ||
17397 | ||
17398 | ||
17399 | ||
17400 | ||
17401 | ||
17402 | ||
17403 | ||
17404 | ||
17405 | ||
17406 | # Report which library types will actually be built | |
5213506e RW |
17407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 |
17408 | $as_echo_n "checking if libtool supports shared libraries... " >&6; } | |
17409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 | |
17410 | $as_echo "$can_build_shared" >&6; } | |
00020c16 | 17411 | |
5213506e RW |
17412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 |
17413 | $as_echo_n "checking whether to build shared libraries... " >&6; } | |
00020c16 ILT |
17414 | test "$can_build_shared" = "no" && enable_shared=no |
17415 | ||
17416 | # On AIX, shared libraries and static libraries use the same namespace, and | |
17417 | # are all built from PIC. | |
17418 | case $host_os in | |
17419 | aix3*) | |
17420 | test "$enable_shared" = yes && enable_static=no | |
17421 | if test -n "$RANLIB"; then | |
17422 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
17423 | postinstall_cmds='$RANLIB $lib' | |
17424 | fi | |
17425 | ;; | |
17426 | ||
17427 | aix[4-9]*) | |
17428 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
17429 | test "$enable_shared" = yes && enable_static=no | |
17430 | fi | |
17431 | ;; | |
17432 | esac | |
5213506e RW |
17433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 |
17434 | $as_echo "$enable_shared" >&6; } | |
00020c16 | 17435 | |
5213506e RW |
17436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 |
17437 | $as_echo_n "checking whether to build static libraries... " >&6; } | |
00020c16 ILT |
17438 | # Make sure either enable_shared or enable_static is yes. |
17439 | test "$enable_shared" = yes || enable_static=yes | |
5213506e RW |
17440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 |
17441 | $as_echo "$enable_static" >&6; } | |
00020c16 ILT |
17442 | |
17443 | ||
17444 | ||
17445 | ||
17446 | fi | |
17447 | ac_ext=c | |
17448 | ac_cpp='$CPP $CPPFLAGS' | |
17449 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17450 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17451 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17452 | ||
17453 | CC="$lt_save_CC" | |
17454 | ||
43e02a8a RW |
17455 | if test -n "$CXX" && ( test "X$CXX" != "Xno" && |
17456 | ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || | |
17457 | (test "X$CXX" != "Xg++"))) ; then | |
17458 | ac_ext=cpp | |
17459 | ac_cpp='$CXXCPP $CPPFLAGS' | |
17460 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17461 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17462 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17463 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 | |
17464 | $as_echo_n "checking how to run the C++ preprocessor... " >&6; } | |
17465 | if test -z "$CXXCPP"; then | |
17466 | if test "${ac_cv_prog_CXXCPP+set}" = set; then : | |
17467 | $as_echo_n "(cached) " >&6 | |
17468 | else | |
17469 | # Double quotes because CXXCPP needs to be expanded | |
17470 | for CXXCPP in "$CXX -E" "/lib/cpp" | |
17471 | do | |
17472 | ac_preproc_ok=false | |
17473 | for ac_cxx_preproc_warn_flag in '' yes | |
17474 | do | |
17475 | # Use a header file that comes with gcc, so configuring glibc | |
17476 | # with a fresh cross-compiler works. | |
17477 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
17478 | # <limits.h> exists even on freestanding compilers. | |
17479 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
17480 | # not just through cpp. "Syntax error" is here to catch this case. | |
17481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17482 | /* end confdefs.h. */ | |
17483 | #ifdef __STDC__ | |
17484 | # include <limits.h> | |
17485 | #else | |
17486 | # include <assert.h> | |
17487 | #endif | |
17488 | Syntax error | |
17489 | _ACEOF | |
17490 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17491 | ||
17492 | else | |
17493 | # Broken: fails on valid input. | |
17494 | continue | |
17495 | fi | |
17496 | rm -f conftest.err conftest.$ac_ext | |
17497 | ||
17498 | # OK, works on sane cases. Now check whether nonexistent headers | |
17499 | # can be detected and how. | |
17500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17501 | /* end confdefs.h. */ | |
17502 | #include <ac_nonexistent.h> | |
17503 | _ACEOF | |
17504 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17505 | # Broken: success on invalid input. | |
17506 | continue | |
17507 | else | |
17508 | # Passes both tests. | |
17509 | ac_preproc_ok=: | |
17510 | break | |
17511 | fi | |
17512 | rm -f conftest.err conftest.$ac_ext | |
17513 | ||
17514 | done | |
17515 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
17516 | rm -f conftest.err conftest.$ac_ext | |
17517 | if $ac_preproc_ok; then : | |
17518 | break | |
17519 | fi | |
17520 | ||
17521 | done | |
17522 | ac_cv_prog_CXXCPP=$CXXCPP | |
17523 | ||
17524 | fi | |
17525 | CXXCPP=$ac_cv_prog_CXXCPP | |
17526 | else | |
17527 | ac_cv_prog_CXXCPP=$CXXCPP | |
17528 | fi | |
17529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 | |
17530 | $as_echo "$CXXCPP" >&6; } | |
17531 | ac_preproc_ok=false | |
17532 | for ac_cxx_preproc_warn_flag in '' yes | |
17533 | do | |
17534 | # Use a header file that comes with gcc, so configuring glibc | |
17535 | # with a fresh cross-compiler works. | |
17536 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
17537 | # <limits.h> exists even on freestanding compilers. | |
17538 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
17539 | # not just through cpp. "Syntax error" is here to catch this case. | |
17540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17541 | /* end confdefs.h. */ | |
17542 | #ifdef __STDC__ | |
17543 | # include <limits.h> | |
17544 | #else | |
17545 | # include <assert.h> | |
17546 | #endif | |
17547 | Syntax error | |
17548 | _ACEOF | |
17549 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17550 | ||
17551 | else | |
17552 | # Broken: fails on valid input. | |
17553 | continue | |
17554 | fi | |
17555 | rm -f conftest.err conftest.$ac_ext | |
17556 | ||
17557 | # OK, works on sane cases. Now check whether nonexistent headers | |
17558 | # can be detected and how. | |
17559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17560 | /* end confdefs.h. */ | |
17561 | #include <ac_nonexistent.h> | |
17562 | _ACEOF | |
17563 | if ac_fn_cxx_try_cpp "$LINENO"; then : | |
17564 | # Broken: success on invalid input. | |
17565 | continue | |
17566 | else | |
17567 | # Passes both tests. | |
17568 | ac_preproc_ok=: | |
17569 | break | |
17570 | fi | |
17571 | rm -f conftest.err conftest.$ac_ext | |
17572 | ||
17573 | done | |
17574 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
17575 | rm -f conftest.err conftest.$ac_ext | |
17576 | if $ac_preproc_ok; then : | |
17577 | ||
17578 | else | |
17579 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
17580 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
17581 | as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check | |
17582 | See \`config.log' for more details." "$LINENO" 5; } | |
17583 | fi | |
17584 | ||
17585 | ac_ext=c | |
17586 | ac_cpp='$CPP $CPPFLAGS' | |
17587 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17588 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17589 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17590 | ||
17591 | else | |
17592 | _lt_caught_CXX_error=yes | |
17593 | fi | |
00020c16 | 17594 | |
5213506e | 17595 | ac_ext=cpp |
00020c16 ILT |
17596 | ac_cpp='$CXXCPP $CPPFLAGS' |
17597 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17598 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17599 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17600 | ||
17601 | archive_cmds_need_lc_CXX=no | |
17602 | allow_undefined_flag_CXX= | |
17603 | always_export_symbols_CXX=no | |
17604 | archive_expsym_cmds_CXX= | |
17605 | compiler_needs_object_CXX=no | |
17606 | export_dynamic_flag_spec_CXX= | |
17607 | hardcode_direct_CXX=no | |
17608 | hardcode_direct_absolute_CXX=no | |
17609 | hardcode_libdir_flag_spec_CXX= | |
17610 | hardcode_libdir_flag_spec_ld_CXX= | |
17611 | hardcode_libdir_separator_CXX= | |
17612 | hardcode_minus_L_CXX=no | |
17613 | hardcode_shlibpath_var_CXX=unsupported | |
17614 | hardcode_automatic_CXX=no | |
17615 | inherit_rpath_CXX=no | |
17616 | module_cmds_CXX= | |
17617 | module_expsym_cmds_CXX= | |
17618 | link_all_deplibs_CXX=unknown | |
17619 | old_archive_cmds_CXX=$old_archive_cmds | |
43e02a8a RW |
17620 | reload_flag_CXX=$reload_flag |
17621 | reload_cmds_CXX=$reload_cmds | |
00020c16 ILT |
17622 | no_undefined_flag_CXX= |
17623 | whole_archive_flag_spec_CXX= | |
17624 | enable_shared_with_static_runtimes_CXX=no | |
17625 | ||
17626 | # Source file extension for C++ test sources. | |
17627 | ac_ext=cpp | |
17628 | ||
17629 | # Object file extension for compiled C++ test sources. | |
17630 | objext=o | |
17631 | objext_CXX=$objext | |
17632 | ||
17633 | # No sense in running all these tests if we already determined that | |
17634 | # the CXX compiler isn't working. Some variables (like enable_shared) | |
17635 | # are currently assumed to apply to all compilers on this platform, | |
17636 | # and will be corrupted by setting them based on a non-working compiler. | |
17637 | if test "$_lt_caught_CXX_error" != yes; then | |
17638 | # Code to be used in simple compile tests | |
17639 | lt_simple_compile_test_code="int some_variable = 0;" | |
17640 | ||
17641 | # Code to be used in simple link tests | |
17642 | lt_simple_link_test_code='int main(int, char *[]) { return(0); }' | |
17643 | ||
17644 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
17645 | ||
17646 | ||
17647 | ||
17648 | ||
17649 | ||
17650 | ||
17651 | # If no C compiler was specified, use CC. | |
17652 | LTCC=${LTCC-"$CC"} | |
17653 | ||
17654 | # If no C compiler flags were specified, use CFLAGS. | |
17655 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
17656 | ||
17657 | # Allow CC to be a program name with arguments. | |
17658 | compiler=$CC | |
17659 | ||
17660 | ||
17661 | # save warnings/boilerplate of simple test code | |
17662 | ac_outfile=conftest.$ac_objext | |
17663 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext | |
17664 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
17665 | _lt_compiler_boilerplate=`cat conftest.err` | |
17666 | $RM conftest* | |
17667 | ||
17668 | ac_outfile=conftest.$ac_objext | |
17669 | echo "$lt_simple_link_test_code" >conftest.$ac_ext | |
17670 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
17671 | _lt_linker_boilerplate=`cat conftest.err` | |
17672 | $RM -r conftest* | |
17673 | ||
17674 | ||
17675 | # Allow CC to be a program name with arguments. | |
17676 | lt_save_CC=$CC | |
17677 | lt_save_LD=$LD | |
17678 | lt_save_GCC=$GCC | |
17679 | GCC=$GXX | |
17680 | lt_save_with_gnu_ld=$with_gnu_ld | |
17681 | lt_save_path_LD=$lt_cv_path_LD | |
17682 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | |
17683 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | |
17684 | else | |
17685 | $as_unset lt_cv_prog_gnu_ld | |
17686 | fi | |
17687 | if test -n "${lt_cv_path_LDCXX+set}"; then | |
17688 | lt_cv_path_LD=$lt_cv_path_LDCXX | |
17689 | else | |
17690 | $as_unset lt_cv_path_LD | |
17691 | fi | |
17692 | test -z "${LDCXX+set}" || LD=$LDCXX | |
17693 | CC=${CXX-"c++"} | |
17694 | compiler=$CC | |
17695 | compiler_CXX=$CC | |
17696 | for cc_temp in $compiler""; do | |
17697 | case $cc_temp in | |
17698 | compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; | |
17699 | distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; | |
17700 | \-*) ;; | |
17701 | *) break;; | |
17702 | esac | |
17703 | done | |
43e02a8a | 17704 | cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` |
00020c16 ILT |
17705 | |
17706 | ||
17707 | if test -n "$compiler"; then | |
17708 | # We don't want -fno-exception when compiling C++ code, so set the | |
17709 | # no_builtin_flag separately | |
17710 | if test "$GXX" = yes; then | |
17711 | lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' | |
17712 | else | |
17713 | lt_prog_compiler_no_builtin_flag_CXX= | |
17714 | fi | |
17715 | ||
17716 | if test "$GXX" = yes; then | |
17717 | # Set up default GNU C++ configuration | |
17718 | ||
17719 | ||
17720 | ||
5213506e RW |
17721 | # Check whether --with-gnu-ld was given. |
17722 | if test "${with_gnu_ld+set}" = set; then : | |
17723 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
00020c16 ILT |
17724 | else |
17725 | with_gnu_ld=no | |
5213506e RW |
17726 | fi |
17727 | ||
00020c16 ILT |
17728 | ac_prog=ld |
17729 | if test "$GCC" = yes; then | |
17730 | # Check if gcc -print-prog-name=ld gives a path. | |
5213506e RW |
17731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 |
17732 | $as_echo_n "checking for ld used by $CC... " >&6; } | |
00020c16 ILT |
17733 | case $host in |
17734 | *-*-mingw*) | |
17735 | # gcc leaves a trailing carriage return which upsets mingw | |
17736 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
17737 | *) | |
17738 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
17739 | esac | |
17740 | case $ac_prog in | |
17741 | # Accept absolute paths. | |
17742 | [\\/]* | ?:[\\/]*) | |
17743 | re_direlt='/[^/][^/]*/\.\./' | |
17744 | # Canonicalize the pathname of ld | |
17745 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | |
17746 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | |
17747 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | |
17748 | done | |
17749 | test -z "$LD" && LD="$ac_prog" | |
17750 | ;; | |
17751 | "") | |
17752 | # If it fails, then pretend we aren't using GCC. | |
17753 | ac_prog=ld | |
17754 | ;; | |
17755 | *) | |
17756 | # If it is relative, then search for the first ld in PATH. | |
17757 | with_gnu_ld=unknown | |
17758 | ;; | |
17759 | esac | |
17760 | elif test "$with_gnu_ld" = yes; then | |
5213506e RW |
17761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
17762 | $as_echo_n "checking for GNU ld... " >&6; } | |
00020c16 | 17763 | else |
5213506e RW |
17764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
17765 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
00020c16 | 17766 | fi |
5213506e RW |
17767 | if test "${lt_cv_path_LD+set}" = set; then : |
17768 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17769 | else |
17770 | if test -z "$LD"; then | |
17771 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
17772 | for ac_dir in $PATH; do | |
17773 | IFS="$lt_save_ifs" | |
17774 | test -z "$ac_dir" && ac_dir=. | |
17775 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
17776 | lt_cv_path_LD="$ac_dir/$ac_prog" | |
17777 | # Check to see if the program is GNU ld. I'd rather use --version, | |
17778 | # but apparently some variants of GNU ld only accept -v. | |
17779 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
17780 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | |
17781 | *GNU* | *'with BFD'*) | |
17782 | test "$with_gnu_ld" != no && break | |
17783 | ;; | |
17784 | *) | |
17785 | test "$with_gnu_ld" != yes && break | |
17786 | ;; | |
17787 | esac | |
17788 | fi | |
17789 | done | |
17790 | IFS="$lt_save_ifs" | |
17791 | else | |
17792 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
17793 | fi | |
17794 | fi | |
17795 | ||
17796 | LD="$lt_cv_path_LD" | |
17797 | if test -n "$LD"; then | |
5213506e RW |
17798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
17799 | $as_echo "$LD" >&6; } | |
00020c16 | 17800 | else |
5213506e RW |
17801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17802 | $as_echo "no" >&6; } | |
00020c16 | 17803 | fi |
5213506e RW |
17804 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
17805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
17806 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
17807 | if test "${lt_cv_prog_gnu_ld+set}" = set; then : | |
17808 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
17809 | else |
17810 | # I'd rather use --version here, but apparently some GNU lds only accept -v. | |
17811 | case `$LD -v 2>&1 </dev/null` in | |
17812 | *GNU* | *'with BFD'*) | |
17813 | lt_cv_prog_gnu_ld=yes | |
17814 | ;; | |
17815 | *) | |
17816 | lt_cv_prog_gnu_ld=no | |
17817 | ;; | |
17818 | esac | |
17819 | fi | |
5213506e RW |
17820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 |
17821 | $as_echo "$lt_cv_prog_gnu_ld" >&6; } | |
00020c16 ILT |
17822 | with_gnu_ld=$lt_cv_prog_gnu_ld |
17823 | ||
17824 | ||
17825 | ||
17826 | ||
17827 | ||
17828 | ||
17829 | ||
17830 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | |
17831 | # archiving commands below assume that GNU ld is being used. | |
17832 | if test "$with_gnu_ld" = yes; then | |
17833 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
17834 | archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
17835 | ||
17836 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
17837 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
17838 | ||
17839 | # If archive_cmds runs LD, not CC, wlarc should be empty | |
17840 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | |
17841 | # investigate it a little bit more. (MM) | |
17842 | wlarc='${wl}' | |
17843 | ||
17844 | # ancient GNU ld didn't support --whole-archive et. al. | |
17845 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | | |
17846 | $GREP 'no-whole-archive' > /dev/null; then | |
17847 | whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
17848 | else | |
17849 | whole_archive_flag_spec_CXX= | |
17850 | fi | |
17851 | else | |
17852 | with_gnu_ld=no | |
17853 | wlarc= | |
17854 | ||
17855 | # A generic and very simple default shared library creation | |
17856 | # command for GNU C++ for the case where it uses the native | |
17857 | # linker, instead of GNU ld. If possible, this setting should | |
17858 | # overridden to take advantage of the native linker features on | |
17859 | # the platform it is being used on. | |
17860 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
17861 | fi | |
17862 | ||
17863 | # Commands to make compiler produce verbose output that lists | |
17864 | # what "hidden" libraries, object files and flags are used when | |
17865 | # linking a shared library. | |
43e02a8a | 17866 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
17867 | |
17868 | else | |
17869 | GXX=no | |
17870 | with_gnu_ld=no | |
17871 | wlarc= | |
17872 | fi | |
17873 | ||
17874 | # PORTME: fill in a description of your system's C++ link characteristics | |
5213506e RW |
17875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 |
17876 | $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } | |
00020c16 ILT |
17877 | ld_shlibs_CXX=yes |
17878 | case $host_os in | |
17879 | aix3*) | |
17880 | # FIXME: insert proper C++ library support | |
17881 | ld_shlibs_CXX=no | |
17882 | ;; | |
17883 | aix[4-9]*) | |
17884 | if test "$host_cpu" = ia64; then | |
17885 | # On IA64, the linker does run time linking by default, so we don't | |
17886 | # have to do anything special. | |
17887 | aix_use_runtimelinking=no | |
17888 | exp_sym_flag='-Bexport' | |
17889 | no_entry_flag="" | |
17890 | else | |
17891 | aix_use_runtimelinking=no | |
17892 | ||
17893 | # Test if we are trying to use run time linking or normal | |
17894 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
17895 | # need to do runtime linking. | |
17896 | case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) | |
17897 | for ld_flag in $LDFLAGS; do | |
17898 | case $ld_flag in | |
17899 | *-brtl*) | |
17900 | aix_use_runtimelinking=yes | |
17901 | break | |
17902 | ;; | |
17903 | esac | |
17904 | done | |
17905 | ;; | |
17906 | esac | |
17907 | ||
17908 | exp_sym_flag='-bexport' | |
17909 | no_entry_flag='-bnoentry' | |
17910 | fi | |
17911 | ||
17912 | # When large executables or shared objects are built, AIX ld can | |
17913 | # have problems creating the table of contents. If linking a library | |
17914 | # or program results in "error TOC overflow" add -mminimal-toc to | |
17915 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
17916 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
17917 | ||
17918 | archive_cmds_CXX='' | |
17919 | hardcode_direct_CXX=yes | |
17920 | hardcode_direct_absolute_CXX=yes | |
17921 | hardcode_libdir_separator_CXX=':' | |
17922 | link_all_deplibs_CXX=yes | |
17923 | file_list_spec_CXX='${wl}-f,' | |
17924 | ||
17925 | if test "$GXX" = yes; then | |
17926 | case $host_os in aix4.[012]|aix4.[012].*) | |
17927 | # We only want to do this on AIX 4.2 and lower, the check | |
17928 | # below for broken collect2 doesn't work under 4.3+ | |
17929 | collect2name=`${CC} -print-prog-name=collect2` | |
17930 | if test -f "$collect2name" && | |
17931 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
17932 | then | |
17933 | # We have reworked collect2 | |
17934 | : | |
17935 | else | |
17936 | # We have old collect2 | |
17937 | hardcode_direct_CXX=unsupported | |
17938 | # It fails to find uninstalled libraries when the uninstalled | |
17939 | # path is not listed in the libpath. Setting hardcode_minus_L | |
17940 | # to unsupported forces relinking | |
17941 | hardcode_minus_L_CXX=yes | |
17942 | hardcode_libdir_flag_spec_CXX='-L$libdir' | |
17943 | hardcode_libdir_separator_CXX= | |
17944 | fi | |
17945 | esac | |
17946 | shared_flag='-shared' | |
17947 | if test "$aix_use_runtimelinking" = yes; then | |
17948 | shared_flag="$shared_flag "'${wl}-G' | |
17949 | fi | |
17950 | else | |
17951 | # not using gcc | |
17952 | if test "$host_cpu" = ia64; then | |
17953 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
17954 | # chokes on -Wl,-G. The following line is correct: | |
17955 | shared_flag='-G' | |
17956 | else | |
17957 | if test "$aix_use_runtimelinking" = yes; then | |
17958 | shared_flag='${wl}-G' | |
17959 | else | |
17960 | shared_flag='${wl}-bM:SRE' | |
17961 | fi | |
17962 | fi | |
17963 | fi | |
17964 | ||
17965 | export_dynamic_flag_spec_CXX='${wl}-bexpall' | |
17966 | # It seems that -bexpall does not export symbols beginning with | |
17967 | # underscore (_), so it is better to generate a list of symbols to | |
17968 | # export. | |
17969 | always_export_symbols_CXX=yes | |
17970 | if test "$aix_use_runtimelinking" = yes; then | |
17971 | # Warning - without using the other runtime loading flags (-brtl), | |
17972 | # -berok will link without error, but may produce a broken library. | |
17973 | allow_undefined_flag_CXX='-berok' | |
17974 | # Determine the default libpath from the value encoded in an empty | |
17975 | # executable. | |
5213506e | 17976 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
17977 | /* end confdefs.h. */ |
17978 | ||
17979 | int | |
17980 | main () | |
17981 | { | |
17982 | ||
17983 | ; | |
17984 | return 0; | |
17985 | } | |
17986 | _ACEOF | |
5213506e | 17987 | if ac_fn_cxx_try_link "$LINENO"; then : |
00020c16 ILT |
17988 | |
17989 | lt_aix_libpath_sed=' | |
17990 | /Import File Strings/,/^$/ { | |
17991 | /^0/ { | |
17992 | s/^0 *\(.*\)$/\1/ | |
17993 | p | |
17994 | } | |
17995 | }' | |
17996 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
17997 | # Check for a 64-bit object if we didn't find anything. | |
17998 | if test -z "$aix_libpath"; then | |
17999 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
18000 | fi | |
00020c16 | 18001 | fi |
5213506e RW |
18002 | rm -f core conftest.err conftest.$ac_objext \ |
18003 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
18004 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
18005 | ||
18006 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | |
18007 | ||
43e02a8a | 18008 | archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
00020c16 ILT |
18009 | else |
18010 | if test "$host_cpu" = ia64; then | |
18011 | hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' | |
18012 | allow_undefined_flag_CXX="-z nodefs" | |
18013 | archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
18014 | else | |
18015 | # Determine the default libpath from the value encoded in an | |
18016 | # empty executable. | |
5213506e | 18017 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
18018 | /* end confdefs.h. */ |
18019 | ||
18020 | int | |
18021 | main () | |
18022 | { | |
18023 | ||
18024 | ; | |
18025 | return 0; | |
18026 | } | |
18027 | _ACEOF | |
5213506e | 18028 | if ac_fn_cxx_try_link "$LINENO"; then : |
00020c16 ILT |
18029 | |
18030 | lt_aix_libpath_sed=' | |
18031 | /Import File Strings/,/^$/ { | |
18032 | /^0/ { | |
18033 | s/^0 *\(.*\)$/\1/ | |
18034 | p | |
18035 | } | |
18036 | }' | |
18037 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
18038 | # Check for a 64-bit object if we didn't find anything. | |
18039 | if test -z "$aix_libpath"; then | |
18040 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
18041 | fi | |
00020c16 | 18042 | fi |
5213506e RW |
18043 | rm -f core conftest.err conftest.$ac_objext \ |
18044 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
18045 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
18046 | ||
18047 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | |
18048 | # Warning - without using the other run time loading flags, | |
18049 | # -berok will link without error, but may produce a broken library. | |
18050 | no_undefined_flag_CXX=' ${wl}-bernotok' | |
18051 | allow_undefined_flag_CXX=' ${wl}-berok' | |
43e02a8a RW |
18052 | if test "$with_gnu_ld" = yes; then |
18053 | # We only use this code for GNU lds that support --whole-archive. | |
18054 | whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
18055 | else | |
18056 | # Exported symbols can be pulled into shared objects from archives | |
18057 | whole_archive_flag_spec_CXX='$convenience' | |
18058 | fi | |
00020c16 ILT |
18059 | archive_cmds_need_lc_CXX=yes |
18060 | # This is similar to how AIX traditionally builds its shared | |
18061 | # libraries. | |
18062 | archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
18063 | fi | |
18064 | fi | |
18065 | ;; | |
18066 | ||
18067 | beos*) | |
18068 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
18069 | allow_undefined_flag_CXX=unsupported | |
18070 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
18071 | # support --undefined. This deserves some investigation. FIXME | |
18072 | archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18073 | else | |
18074 | ld_shlibs_CXX=no | |
18075 | fi | |
18076 | ;; | |
18077 | ||
18078 | chorus*) | |
18079 | case $cc_basename in | |
18080 | *) | |
18081 | # FIXME: insert proper C++ library support | |
18082 | ld_shlibs_CXX=no | |
18083 | ;; | |
18084 | esac | |
18085 | ;; | |
18086 | ||
18087 | cygwin* | mingw* | pw32* | cegcc*) | |
18088 | # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, | |
18089 | # as there is no search path for DLLs. | |
18090 | hardcode_libdir_flag_spec_CXX='-L$libdir' | |
43e02a8a | 18091 | export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' |
00020c16 ILT |
18092 | allow_undefined_flag_CXX=unsupported |
18093 | always_export_symbols_CXX=no | |
18094 | enable_shared_with_static_runtimes_CXX=yes | |
18095 | ||
18096 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | |
18097 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
18098 | # If the export-symbols file already is a .def file (1st line | |
18099 | # is EXPORTS), use it as is; otherwise, prepend... | |
18100 | archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
18101 | cp $export_symbols $output_objdir/$soname.def; | |
18102 | else | |
18103 | echo EXPORTS > $output_objdir/$soname.def; | |
18104 | cat $export_symbols >> $output_objdir/$soname.def; | |
18105 | fi~ | |
18106 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
18107 | else | |
18108 | ld_shlibs_CXX=no | |
18109 | fi | |
18110 | ;; | |
18111 | darwin* | rhapsody*) | |
18112 | ||
18113 | ||
18114 | archive_cmds_need_lc_CXX=no | |
18115 | hardcode_direct_CXX=no | |
18116 | hardcode_automatic_CXX=yes | |
18117 | hardcode_shlibpath_var_CXX=unsupported | |
43e02a8a RW |
18118 | if test "$lt_cv_ld_force_load" = "yes"; then |
18119 | whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' | |
18120 | else | |
18121 | whole_archive_flag_spec_CXX='' | |
18122 | fi | |
00020c16 ILT |
18123 | link_all_deplibs_CXX=yes |
18124 | allow_undefined_flag_CXX="$_lt_dar_allow_undefined" | |
18125 | case $cc_basename in | |
18126 | ifort*) _lt_dar_can_shared=yes ;; | |
18127 | *) _lt_dar_can_shared=$GCC ;; | |
18128 | esac | |
18129 | if test "$_lt_dar_can_shared" = "yes"; then | |
43e02a8a | 18130 | output_verbose_link_cmd=func_echo_all |
00020c16 ILT |
18131 | archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" |
18132 | module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
18133 | archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" | |
18134 | module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" | |
18135 | if test "$lt_cv_apple_cc_single_mod" != "yes"; then | |
18136 | archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" | |
18137 | archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" | |
18138 | fi | |
18139 | ||
18140 | else | |
18141 | ld_shlibs_CXX=no | |
18142 | fi | |
18143 | ||
18144 | ;; | |
18145 | ||
18146 | dgux*) | |
18147 | case $cc_basename in | |
18148 | ec++*) | |
18149 | # FIXME: insert proper C++ library support | |
18150 | ld_shlibs_CXX=no | |
18151 | ;; | |
18152 | ghcx*) | |
18153 | # Green Hills C++ Compiler | |
18154 | # FIXME: insert proper C++ library support | |
18155 | ld_shlibs_CXX=no | |
18156 | ;; | |
18157 | *) | |
18158 | # FIXME: insert proper C++ library support | |
18159 | ld_shlibs_CXX=no | |
18160 | ;; | |
18161 | esac | |
18162 | ;; | |
18163 | ||
18164 | freebsd[12]*) | |
18165 | # C++ shared libraries reported to be fairly broken before | |
18166 | # switch to ELF | |
18167 | ld_shlibs_CXX=no | |
18168 | ;; | |
18169 | ||
18170 | freebsd-elf*) | |
18171 | archive_cmds_need_lc_CXX=no | |
18172 | ;; | |
18173 | ||
18174 | freebsd* | dragonfly*) | |
18175 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | |
18176 | # conventions | |
18177 | ld_shlibs_CXX=yes | |
18178 | ;; | |
18179 | ||
18180 | gnu*) | |
18181 | ;; | |
18182 | ||
43e02a8a RW |
18183 | haiku*) |
18184 | archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18185 | link_all_deplibs_CXX=yes | |
18186 | ;; | |
18187 | ||
00020c16 ILT |
18188 | hpux9*) |
18189 | hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' | |
18190 | hardcode_libdir_separator_CXX=: | |
18191 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18192 | hardcode_direct_CXX=yes | |
18193 | hardcode_minus_L_CXX=yes # Not in the search PATH, | |
18194 | # but as the default | |
18195 | # location of the library. | |
18196 | ||
18197 | case $cc_basename in | |
18198 | CC*) | |
18199 | # FIXME: insert proper C++ library support | |
18200 | ld_shlibs_CXX=no | |
18201 | ;; | |
18202 | aCC*) | |
18203 | archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
18204 | # Commands to make compiler produce verbose output that lists | |
18205 | # what "hidden" libraries, object files and flags are used when | |
18206 | # linking a shared library. | |
18207 | # | |
18208 | # There doesn't appear to be a way to prevent this compiler from | |
18209 | # explicitly linking system object files so we need to strip them | |
18210 | # from the output so that they don't get included in the library | |
18211 | # dependencies. | |
43e02a8a | 18212 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18213 | ;; |
18214 | *) | |
18215 | if test "$GXX" = yes; then | |
18216 | archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
18217 | else | |
18218 | # FIXME: insert proper C++ library support | |
18219 | ld_shlibs_CXX=no | |
18220 | fi | |
18221 | ;; | |
18222 | esac | |
18223 | ;; | |
18224 | ||
18225 | hpux10*|hpux11*) | |
18226 | if test $with_gnu_ld = no; then | |
18227 | hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' | |
18228 | hardcode_libdir_separator_CXX=: | |
18229 | ||
18230 | case $host_cpu in | |
18231 | hppa*64*|ia64*) | |
18232 | ;; | |
18233 | *) | |
18234 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18235 | ;; | |
18236 | esac | |
18237 | fi | |
18238 | case $host_cpu in | |
18239 | hppa*64*|ia64*) | |
18240 | hardcode_direct_CXX=no | |
18241 | hardcode_shlibpath_var_CXX=no | |
18242 | ;; | |
18243 | *) | |
18244 | hardcode_direct_CXX=yes | |
18245 | hardcode_direct_absolute_CXX=yes | |
18246 | hardcode_minus_L_CXX=yes # Not in the search PATH, | |
18247 | # but as the default | |
18248 | # location of the library. | |
18249 | ;; | |
18250 | esac | |
18251 | ||
18252 | case $cc_basename in | |
18253 | CC*) | |
18254 | # FIXME: insert proper C++ library support | |
18255 | ld_shlibs_CXX=no | |
18256 | ;; | |
18257 | aCC*) | |
18258 | case $host_cpu in | |
18259 | hppa*64*) | |
18260 | archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18261 | ;; | |
18262 | ia64*) | |
18263 | archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18264 | ;; | |
18265 | *) | |
18266 | archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18267 | ;; | |
18268 | esac | |
18269 | # Commands to make compiler produce verbose output that lists | |
18270 | # what "hidden" libraries, object files and flags are used when | |
18271 | # linking a shared library. | |
18272 | # | |
18273 | # There doesn't appear to be a way to prevent this compiler from | |
18274 | # explicitly linking system object files so we need to strip them | |
18275 | # from the output so that they don't get included in the library | |
18276 | # dependencies. | |
43e02a8a | 18277 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18278 | ;; |
18279 | *) | |
18280 | if test "$GXX" = yes; then | |
18281 | if test $with_gnu_ld = no; then | |
18282 | case $host_cpu in | |
18283 | hppa*64*) | |
18284 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18285 | ;; | |
18286 | ia64*) | |
18287 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18288 | ;; | |
18289 | *) | |
18290 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18291 | ;; | |
18292 | esac | |
18293 | fi | |
18294 | else | |
18295 | # FIXME: insert proper C++ library support | |
18296 | ld_shlibs_CXX=no | |
18297 | fi | |
18298 | ;; | |
18299 | esac | |
18300 | ;; | |
18301 | ||
18302 | interix[3-9]*) | |
18303 | hardcode_direct_CXX=no | |
18304 | hardcode_shlibpath_var_CXX=no | |
18305 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18306 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18307 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
18308 | # Instead, shared libraries are loaded at an image base (0x10000000 by | |
18309 | # default) and relocated if they conflict, which is a slow very memory | |
18310 | # consuming and fragmenting process. To avoid this, we pick a random, | |
18311 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
18312 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
18313 | archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
18314 | archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
18315 | ;; | |
18316 | irix5* | irix6*) | |
18317 | case $cc_basename in | |
18318 | CC*) | |
18319 | # SGI C++ | |
43e02a8a | 18320 | archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18321 | |
18322 | # Archives containing C++ object files must be created using | |
18323 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | |
18324 | # necessary to make sure instantiated templates are included | |
18325 | # in the archive. | |
18326 | old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' | |
18327 | ;; | |
18328 | *) | |
18329 | if test "$GXX" = yes; then | |
18330 | if test "$with_gnu_ld" = no; then | |
43e02a8a | 18331 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 | 18332 | else |
43e02a8a | 18333 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' |
00020c16 ILT |
18334 | fi |
18335 | fi | |
18336 | link_all_deplibs_CXX=yes | |
18337 | ;; | |
18338 | esac | |
18339 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
18340 | hardcode_libdir_separator_CXX=: | |
18341 | inherit_rpath_CXX=yes | |
18342 | ;; | |
18343 | ||
18344 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
18345 | case $cc_basename in | |
18346 | KCC*) | |
18347 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
18348 | ||
18349 | # KCC will only create a shared library if the output file | |
18350 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
18351 | # to its proper name (with version) after linking. | |
18352 | archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
18353 | archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' | |
18354 | # Commands to make compiler produce verbose output that lists | |
18355 | # what "hidden" libraries, object files and flags are used when | |
18356 | # linking a shared library. | |
18357 | # | |
18358 | # There doesn't appear to be a way to prevent this compiler from | |
18359 | # explicitly linking system object files so we need to strip them | |
18360 | # from the output so that they don't get included in the library | |
18361 | # dependencies. | |
43e02a8a | 18362 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18363 | |
18364 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18365 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
18366 | ||
18367 | # Archives containing C++ object files must be created using | |
18368 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
18369 | old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' | |
18370 | ;; | |
18371 | icpc* | ecpc* ) | |
18372 | # Intel C++ | |
18373 | with_gnu_ld=yes | |
18374 | # version 8.0 and above of icpc choke on multiply defined symbols | |
18375 | # if we add $predep_objects and $postdep_objects, however 7.1 and | |
18376 | # earlier do not add the objects themselves. | |
18377 | case `$CC -V 2>&1` in | |
18378 | *"Version 7."*) | |
18379 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18380 | archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
18381 | ;; | |
18382 | *) # Version 8.0 or newer | |
18383 | tmp_idyn= | |
18384 | case $host_cpu in | |
18385 | ia64*) tmp_idyn=' -i_dynamic';; | |
18386 | esac | |
18387 | archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18388 | archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
18389 | ;; | |
18390 | esac | |
18391 | archive_cmds_need_lc_CXX=no | |
18392 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18393 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
18394 | whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
18395 | ;; | |
18396 | pgCC* | pgcpp*) | |
18397 | # Portland Group C++ compiler | |
18398 | case `$CC -V` in | |
43e02a8a | 18399 | *pgCC\ [1-5].* | *pgcpp\ [1-5].*) |
00020c16 ILT |
18400 | prelink_cmds_CXX='tpldir=Template.dir~ |
18401 | rm -rf $tpldir~ | |
18402 | $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ | |
18403 | compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' | |
18404 | old_archive_cmds_CXX='tpldir=Template.dir~ | |
18405 | rm -rf $tpldir~ | |
18406 | $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ | |
18407 | $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ | |
18408 | $RANLIB $oldlib' | |
18409 | archive_cmds_CXX='tpldir=Template.dir~ | |
18410 | rm -rf $tpldir~ | |
18411 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
18412 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | |
18413 | archive_expsym_cmds_CXX='tpldir=Template.dir~ | |
18414 | rm -rf $tpldir~ | |
18415 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
18416 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | |
18417 | ;; | |
43e02a8a | 18418 | *) # Version 6 and above use weak symbols |
00020c16 ILT |
18419 | archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' |
18420 | archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | |
18421 | ;; | |
18422 | esac | |
18423 | ||
18424 | hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' | |
18425 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
43e02a8a | 18426 | whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
18427 | ;; |
18428 | cxx*) | |
18429 | # Compaq C++ | |
18430 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18431 | archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' | |
18432 | ||
18433 | runpath_var=LD_RUN_PATH | |
18434 | hardcode_libdir_flag_spec_CXX='-rpath $libdir' | |
18435 | hardcode_libdir_separator_CXX=: | |
18436 | ||
18437 | # Commands to make compiler produce verbose output that lists | |
18438 | # what "hidden" libraries, object files and flags are used when | |
18439 | # linking a shared library. | |
18440 | # | |
18441 | # There doesn't appear to be a way to prevent this compiler from | |
18442 | # explicitly linking system object files so we need to strip them | |
18443 | # from the output so that they don't get included in the library | |
18444 | # dependencies. | |
43e02a8a | 18445 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' |
00020c16 | 18446 | ;; |
43e02a8a | 18447 | xl* | mpixl* | bgxl*) |
00020c16 ILT |
18448 | # IBM XL 8.0 on PPC, with GNU ld |
18449 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
18450 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | |
18451 | archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
18452 | if test "x$supports_anon_versioning" = xyes; then | |
18453 | archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ | |
18454 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
18455 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
18456 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
18457 | fi | |
18458 | ;; | |
18459 | *) | |
18460 | case `$CC -V 2>&1 | sed 5q` in | |
18461 | *Sun\ C*) | |
18462 | # Sun C++ 5.9 | |
18463 | no_undefined_flag_CXX=' -zdefs' | |
18464 | archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18465 | archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' | |
18466 | hardcode_libdir_flag_spec_CXX='-R$libdir' | |
43e02a8a | 18467 | whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' |
00020c16 ILT |
18468 | compiler_needs_object_CXX=yes |
18469 | ||
18470 | # Not sure whether something based on | |
18471 | # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | |
18472 | # would be better. | |
43e02a8a | 18473 | output_verbose_link_cmd='func_echo_all' |
00020c16 ILT |
18474 | |
18475 | # Archives containing C++ object files must be created using | |
18476 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
18477 | # necessary to make sure instantiated templates are included | |
18478 | # in the archive. | |
18479 | old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' | |
18480 | ;; | |
18481 | esac | |
18482 | ;; | |
18483 | esac | |
18484 | ;; | |
18485 | ||
18486 | lynxos*) | |
18487 | # FIXME: insert proper C++ library support | |
18488 | ld_shlibs_CXX=no | |
18489 | ;; | |
18490 | ||
18491 | m88k*) | |
18492 | # FIXME: insert proper C++ library support | |
18493 | ld_shlibs_CXX=no | |
18494 | ;; | |
18495 | ||
18496 | mvs*) | |
18497 | case $cc_basename in | |
18498 | cxx*) | |
18499 | # FIXME: insert proper C++ library support | |
18500 | ld_shlibs_CXX=no | |
18501 | ;; | |
18502 | *) | |
18503 | # FIXME: insert proper C++ library support | |
18504 | ld_shlibs_CXX=no | |
18505 | ;; | |
18506 | esac | |
18507 | ;; | |
18508 | ||
18509 | netbsd*) | |
18510 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
18511 | archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | |
18512 | wlarc= | |
18513 | hardcode_libdir_flag_spec_CXX='-R$libdir' | |
18514 | hardcode_direct_CXX=yes | |
18515 | hardcode_shlibpath_var_CXX=no | |
18516 | fi | |
18517 | # Workaround some broken pre-1.5 toolchains | |
18518 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | |
18519 | ;; | |
18520 | ||
18521 | *nto* | *qnx*) | |
18522 | ld_shlibs_CXX=yes | |
18523 | ;; | |
18524 | ||
18525 | openbsd2*) | |
18526 | # C++ shared libraries are fairly broken | |
18527 | ld_shlibs_CXX=no | |
18528 | ;; | |
18529 | ||
18530 | openbsd*) | |
18531 | if test -f /usr/libexec/ld.so; then | |
18532 | hardcode_direct_CXX=yes | |
18533 | hardcode_shlibpath_var_CXX=no | |
18534 | hardcode_direct_absolute_CXX=yes | |
18535 | archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
18536 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18537 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
18538 | archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' | |
18539 | export_dynamic_flag_spec_CXX='${wl}-E' | |
18540 | whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
18541 | fi | |
43e02a8a | 18542 | output_verbose_link_cmd=func_echo_all |
00020c16 ILT |
18543 | else |
18544 | ld_shlibs_CXX=no | |
18545 | fi | |
18546 | ;; | |
18547 | ||
18548 | osf3* | osf4* | osf5*) | |
18549 | case $cc_basename in | |
18550 | KCC*) | |
18551 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
18552 | ||
18553 | # KCC will only create a shared library if the output file | |
18554 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
18555 | # to its proper name (with version) after linking. | |
18556 | archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
18557 | ||
18558 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | |
18559 | hardcode_libdir_separator_CXX=: | |
18560 | ||
18561 | # Archives containing C++ object files must be created using | |
18562 | # the KAI C++ compiler. | |
18563 | case $host in | |
18564 | osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; | |
18565 | *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; | |
18566 | esac | |
18567 | ;; | |
18568 | RCC*) | |
18569 | # Rational C++ 2.4.1 | |
18570 | # FIXME: insert proper C++ library support | |
18571 | ld_shlibs_CXX=no | |
18572 | ;; | |
18573 | cxx*) | |
18574 | case $host in | |
18575 | osf3*) | |
18576 | allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' | |
43e02a8a | 18577 | archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18578 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' |
18579 | ;; | |
18580 | *) | |
18581 | allow_undefined_flag_CXX=' -expect_unresolved \*' | |
43e02a8a | 18582 | archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18583 | archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ |
18584 | echo "-hidden">> $lib.exp~ | |
43e02a8a | 18585 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ |
00020c16 ILT |
18586 | $RM $lib.exp' |
18587 | hardcode_libdir_flag_spec_CXX='-rpath $libdir' | |
18588 | ;; | |
18589 | esac | |
18590 | ||
18591 | hardcode_libdir_separator_CXX=: | |
18592 | ||
18593 | # Commands to make compiler produce verbose output that lists | |
18594 | # what "hidden" libraries, object files and flags are used when | |
18595 | # linking a shared library. | |
18596 | # | |
18597 | # There doesn't appear to be a way to prevent this compiler from | |
18598 | # explicitly linking system object files so we need to strip them | |
18599 | # from the output so that they don't get included in the library | |
18600 | # dependencies. | |
43e02a8a | 18601 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
00020c16 ILT |
18602 | ;; |
18603 | *) | |
18604 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
18605 | allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' | |
18606 | case $host in | |
18607 | osf3*) | |
43e02a8a | 18608 | archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18609 | ;; |
18610 | *) | |
43e02a8a | 18611 | archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
00020c16 ILT |
18612 | ;; |
18613 | esac | |
18614 | ||
18615 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | |
18616 | hardcode_libdir_separator_CXX=: | |
18617 | ||
18618 | # Commands to make compiler produce verbose output that lists | |
18619 | # what "hidden" libraries, object files and flags are used when | |
18620 | # linking a shared library. | |
43e02a8a | 18621 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
18622 | |
18623 | else | |
18624 | # FIXME: insert proper C++ library support | |
18625 | ld_shlibs_CXX=no | |
18626 | fi | |
18627 | ;; | |
18628 | esac | |
18629 | ;; | |
18630 | ||
18631 | psos*) | |
18632 | # FIXME: insert proper C++ library support | |
18633 | ld_shlibs_CXX=no | |
18634 | ;; | |
18635 | ||
18636 | sunos4*) | |
18637 | case $cc_basename in | |
18638 | CC*) | |
18639 | # Sun C++ 4.x | |
18640 | # FIXME: insert proper C++ library support | |
18641 | ld_shlibs_CXX=no | |
18642 | ;; | |
18643 | lcc*) | |
18644 | # Lucid | |
18645 | # FIXME: insert proper C++ library support | |
18646 | ld_shlibs_CXX=no | |
18647 | ;; | |
18648 | *) | |
18649 | # FIXME: insert proper C++ library support | |
18650 | ld_shlibs_CXX=no | |
18651 | ;; | |
18652 | esac | |
18653 | ;; | |
18654 | ||
18655 | solaris*) | |
18656 | case $cc_basename in | |
18657 | CC*) | |
18658 | # Sun C++ 4.2, 5.x and Centerline C++ | |
18659 | archive_cmds_need_lc_CXX=yes | |
18660 | no_undefined_flag_CXX=' -zdefs' | |
18661 | archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
18662 | archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
18663 | $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
18664 | ||
18665 | hardcode_libdir_flag_spec_CXX='-R$libdir' | |
18666 | hardcode_shlibpath_var_CXX=no | |
18667 | case $host_os in | |
18668 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
18669 | *) | |
18670 | # The compiler driver will combine and reorder linker options, | |
18671 | # but understands `-z linker_flag'. | |
18672 | # Supported since Solaris 2.6 (maybe 2.5.1?) | |
18673 | whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' | |
18674 | ;; | |
18675 | esac | |
18676 | link_all_deplibs_CXX=yes | |
18677 | ||
43e02a8a | 18678 | output_verbose_link_cmd='func_echo_all' |
00020c16 ILT |
18679 | |
18680 | # Archives containing C++ object files must be created using | |
18681 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
18682 | # necessary to make sure instantiated templates are included | |
18683 | # in the archive. | |
18684 | old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' | |
18685 | ;; | |
18686 | gcx*) | |
18687 | # Green Hills C++ Compiler | |
18688 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
18689 | ||
18690 | # The C++ compiler must be used to create the archive. | |
18691 | old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | |
18692 | ;; | |
18693 | *) | |
18694 | # GNU C++ compiler with Solaris linker | |
18695 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
18696 | no_undefined_flag_CXX=' ${wl}-z ${wl}defs' | |
18697 | if $CC --version | $GREP -v '^2\.7' > /dev/null; then | |
18698 | archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
18699 | archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
18700 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
18701 | ||
18702 | # Commands to make compiler produce verbose output that lists | |
18703 | # what "hidden" libraries, object files and flags are used when | |
18704 | # linking a shared library. | |
43e02a8a | 18705 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
18706 | else |
18707 | # g++ 2.7 appears to require `-G' NOT `-shared' on this | |
18708 | # platform. | |
18709 | archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
18710 | archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
18711 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
18712 | ||
18713 | # Commands to make compiler produce verbose output that lists | |
18714 | # what "hidden" libraries, object files and flags are used when | |
18715 | # linking a shared library. | |
43e02a8a | 18716 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
00020c16 ILT |
18717 | fi |
18718 | ||
18719 | hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' | |
18720 | case $host_os in | |
18721 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
18722 | *) | |
18723 | whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
18724 | ;; | |
18725 | esac | |
18726 | fi | |
18727 | ;; | |
18728 | esac | |
18729 | ;; | |
18730 | ||
18731 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) | |
18732 | no_undefined_flag_CXX='${wl}-z,text' | |
18733 | archive_cmds_need_lc_CXX=no | |
18734 | hardcode_shlibpath_var_CXX=no | |
18735 | runpath_var='LD_RUN_PATH' | |
18736 | ||
18737 | case $cc_basename in | |
18738 | CC*) | |
18739 | archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18740 | archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18741 | ;; | |
18742 | *) | |
18743 | archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18744 | archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18745 | ;; | |
18746 | esac | |
18747 | ;; | |
18748 | ||
18749 | sysv5* | sco3.2v5* | sco5v6*) | |
18750 | # Note: We can NOT use -z defs as we might desire, because we do not | |
18751 | # link with -lc, and that would cause any symbols used from libc to | |
18752 | # always be unresolved, which means just about no library would | |
18753 | # ever link correctly. If we're not using GNU ld we use -z text | |
18754 | # though, which does catch some bad symbols but isn't as heavy-handed | |
18755 | # as -z defs. | |
18756 | no_undefined_flag_CXX='${wl}-z,text' | |
18757 | allow_undefined_flag_CXX='${wl}-z,nodefs' | |
18758 | archive_cmds_need_lc_CXX=no | |
18759 | hardcode_shlibpath_var_CXX=no | |
18760 | hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' | |
18761 | hardcode_libdir_separator_CXX=':' | |
18762 | link_all_deplibs_CXX=yes | |
18763 | export_dynamic_flag_spec_CXX='${wl}-Bexport' | |
18764 | runpath_var='LD_RUN_PATH' | |
18765 | ||
18766 | case $cc_basename in | |
18767 | CC*) | |
18768 | archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18769 | archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
43e02a8a RW |
18770 | old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ |
18771 | '"$old_archive_cmds_CXX" | |
18772 | reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ | |
18773 | '"$reload_cmds_CXX" | |
00020c16 ILT |
18774 | ;; |
18775 | *) | |
18776 | archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18777 | archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
18778 | ;; | |
18779 | esac | |
18780 | ;; | |
18781 | ||
18782 | tandem*) | |
18783 | case $cc_basename in | |
18784 | NCC*) | |
18785 | # NonStop-UX NCC 3.20 | |
18786 | # FIXME: insert proper C++ library support | |
18787 | ld_shlibs_CXX=no | |
18788 | ;; | |
18789 | *) | |
18790 | # FIXME: insert proper C++ library support | |
18791 | ld_shlibs_CXX=no | |
18792 | ;; | |
18793 | esac | |
18794 | ;; | |
18795 | ||
18796 | vxworks*) | |
18797 | # FIXME: insert proper C++ library support | |
18798 | ld_shlibs_CXX=no | |
18799 | ;; | |
18800 | ||
18801 | *) | |
18802 | # FIXME: insert proper C++ library support | |
18803 | ld_shlibs_CXX=no | |
18804 | ;; | |
18805 | esac | |
18806 | ||
5213506e RW |
18807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 |
18808 | $as_echo "$ld_shlibs_CXX" >&6; } | |
00020c16 ILT |
18809 | test "$ld_shlibs_CXX" = no && can_build_shared=no |
18810 | ||
18811 | GCC_CXX="$GXX" | |
18812 | LD_CXX="$LD" | |
18813 | ||
18814 | ## CAVEAT EMPTOR: | |
18815 | ## There is no encapsulation within the following macros, do not change | |
18816 | ## the running order or otherwise move them around unless you know exactly | |
18817 | ## what you are doing... | |
18818 | # Dependencies to place before and after the object being linked: | |
18819 | predep_objects_CXX= | |
18820 | postdep_objects_CXX= | |
18821 | predeps_CXX= | |
18822 | postdeps_CXX= | |
18823 | compiler_lib_search_path_CXX= | |
18824 | ||
18825 | cat > conftest.$ac_ext <<_LT_EOF | |
18826 | class Foo | |
18827 | { | |
18828 | public: | |
18829 | Foo (void) { a = 0; } | |
18830 | private: | |
18831 | int a; | |
18832 | }; | |
18833 | _LT_EOF | |
18834 | ||
5213506e | 18835 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
00020c16 ILT |
18836 | (eval $ac_compile) 2>&5 |
18837 | ac_status=$? | |
5213506e RW |
18838 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
18839 | test $ac_status = 0; }; then | |
00020c16 ILT |
18840 | # Parse the compiler output and extract the necessary |
18841 | # objects, libraries and library flags. | |
18842 | ||
18843 | # Sentinel used to keep track of whether or not we are before | |
18844 | # the conftest object file. | |
18845 | pre_test_object_deps_done=no | |
18846 | ||
18847 | for p in `eval "$output_verbose_link_cmd"`; do | |
18848 | case $p in | |
18849 | ||
18850 | -L* | -R* | -l*) | |
18851 | # Some compilers place space between "-{L,R}" and the path. | |
18852 | # Remove the space. | |
18853 | if test $p = "-L" || | |
18854 | test $p = "-R"; then | |
18855 | prev=$p | |
18856 | continue | |
18857 | else | |
18858 | prev= | |
18859 | fi | |
18860 | ||
18861 | if test "$pre_test_object_deps_done" = no; then | |
18862 | case $p in | |
18863 | -L* | -R*) | |
18864 | # Internal compiler library paths should come after those | |
18865 | # provided the user. The postdeps already come after the | |
18866 | # user supplied libs so there is no need to process them. | |
18867 | if test -z "$compiler_lib_search_path_CXX"; then | |
18868 | compiler_lib_search_path_CXX="${prev}${p}" | |
18869 | else | |
18870 | compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" | |
18871 | fi | |
18872 | ;; | |
18873 | # The "-l" case would never come before the object being | |
18874 | # linked, so don't bother handling this case. | |
18875 | esac | |
18876 | else | |
18877 | if test -z "$postdeps_CXX"; then | |
18878 | postdeps_CXX="${prev}${p}" | |
18879 | else | |
18880 | postdeps_CXX="${postdeps_CXX} ${prev}${p}" | |
18881 | fi | |
18882 | fi | |
18883 | ;; | |
18884 | ||
18885 | *.$objext) | |
18886 | # This assumes that the test object file only shows up | |
18887 | # once in the compiler output. | |
18888 | if test "$p" = "conftest.$objext"; then | |
18889 | pre_test_object_deps_done=yes | |
18890 | continue | |
18891 | fi | |
18892 | ||
18893 | if test "$pre_test_object_deps_done" = no; then | |
18894 | if test -z "$predep_objects_CXX"; then | |
18895 | predep_objects_CXX="$p" | |
18896 | else | |
18897 | predep_objects_CXX="$predep_objects_CXX $p" | |
18898 | fi | |
18899 | else | |
18900 | if test -z "$postdep_objects_CXX"; then | |
18901 | postdep_objects_CXX="$p" | |
18902 | else | |
18903 | postdep_objects_CXX="$postdep_objects_CXX $p" | |
18904 | fi | |
18905 | fi | |
18906 | ;; | |
18907 | ||
18908 | *) ;; # Ignore the rest. | |
18909 | ||
18910 | esac | |
18911 | done | |
18912 | ||
18913 | # Clean up. | |
18914 | rm -f a.out a.exe | |
18915 | else | |
18916 | echo "libtool.m4: error: problem compiling CXX test program" | |
18917 | fi | |
18918 | ||
18919 | $RM -f confest.$objext | |
18920 | ||
18921 | # PORTME: override above test on systems where it is broken | |
18922 | case $host_os in | |
18923 | interix[3-9]*) | |
18924 | # Interix 3.5 installs completely hosed .la files for C++, so rather than | |
18925 | # hack all around it, let's just trust "g++" to DTRT. | |
18926 | predep_objects_CXX= | |
18927 | postdep_objects_CXX= | |
18928 | postdeps_CXX= | |
18929 | ;; | |
18930 | ||
18931 | linux*) | |
18932 | case `$CC -V 2>&1 | sed 5q` in | |
18933 | *Sun\ C*) | |
18934 | # Sun C++ 5.9 | |
18935 | ||
18936 | # The more standards-conforming stlport4 library is | |
18937 | # incompatible with the Cstd library. Avoid specifying | |
18938 | # it if it's in CXXFLAGS. Ignore libCrun as | |
18939 | # -library=stlport4 depends on it. | |
18940 | case " $CXX $CXXFLAGS " in | |
18941 | *" -library=stlport4 "*) | |
18942 | solaris_use_stlport4=yes | |
18943 | ;; | |
18944 | esac | |
18945 | ||
18946 | if test "$solaris_use_stlport4" != yes; then | |
18947 | postdeps_CXX='-library=Cstd -library=Crun' | |
18948 | fi | |
18949 | ;; | |
18950 | esac | |
18951 | ;; | |
18952 | ||
18953 | solaris*) | |
18954 | case $cc_basename in | |
18955 | CC*) | |
18956 | # The more standards-conforming stlport4 library is | |
18957 | # incompatible with the Cstd library. Avoid specifying | |
18958 | # it if it's in CXXFLAGS. Ignore libCrun as | |
18959 | # -library=stlport4 depends on it. | |
18960 | case " $CXX $CXXFLAGS " in | |
18961 | *" -library=stlport4 "*) | |
18962 | solaris_use_stlport4=yes | |
18963 | ;; | |
18964 | esac | |
18965 | ||
18966 | # Adding this requires a known-good setup of shared libraries for | |
18967 | # Sun compiler versions before 5.6, else PIC objects from an old | |
18968 | # archive will be linked into the output, leading to subtle bugs. | |
18969 | if test "$solaris_use_stlport4" != yes; then | |
18970 | postdeps_CXX='-library=Cstd -library=Crun' | |
18971 | fi | |
18972 | ;; | |
18973 | esac | |
18974 | ;; | |
18975 | esac | |
18976 | ||
18977 | ||
18978 | case " $postdeps_CXX " in | |
18979 | *" -lc "*) archive_cmds_need_lc_CXX=no ;; | |
18980 | esac | |
18981 | compiler_lib_search_dirs_CXX= | |
18982 | if test -n "${compiler_lib_search_path_CXX}"; then | |
18983 | compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` | |
18984 | fi | |
18985 | ||
18986 | ||
18987 | ||
18988 | ||
18989 | ||
18990 | ||
18991 | ||
18992 | ||
18993 | ||
18994 | ||
18995 | ||
18996 | ||
18997 | ||
18998 | ||
18999 | ||
19000 | ||
19001 | ||
19002 | ||
19003 | ||
19004 | ||
19005 | ||
19006 | ||
19007 | ||
19008 | ||
19009 | ||
19010 | ||
19011 | ||
19012 | ||
19013 | ||
19014 | ||
19015 | ||
19016 | lt_prog_compiler_wl_CXX= | |
19017 | lt_prog_compiler_pic_CXX= | |
19018 | lt_prog_compiler_static_CXX= | |
19019 | ||
5213506e RW |
19020 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 |
19021 | $as_echo_n "checking for $compiler option to produce PIC... " >&6; } | |
00020c16 ILT |
19022 | |
19023 | # C++ specific cases for pic, static, wl, etc. | |
19024 | if test "$GXX" = yes; then | |
19025 | lt_prog_compiler_wl_CXX='-Wl,' | |
19026 | lt_prog_compiler_static_CXX='-static' | |
19027 | ||
19028 | case $host_os in | |
19029 | aix*) | |
19030 | # All AIX code is PIC. | |
19031 | if test "$host_cpu" = ia64; then | |
19032 | # AIX 5 now supports IA64 processor | |
19033 | lt_prog_compiler_static_CXX='-Bstatic' | |
19034 | fi | |
19035 | ;; | |
19036 | ||
19037 | amigaos*) | |
19038 | case $host_cpu in | |
19039 | powerpc) | |
19040 | # see comment about AmigaOS4 .so support | |
19041 | lt_prog_compiler_pic_CXX='-fPIC' | |
19042 | ;; | |
19043 | m68k) | |
19044 | # FIXME: we need at least 68020 code to build shared libraries, but | |
19045 | # adding the `-m68020' flag to GCC prevents building anything better, | |
19046 | # like `-m68040'. | |
19047 | lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' | |
19048 | ;; | |
19049 | esac | |
19050 | ;; | |
19051 | ||
19052 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
19053 | # PIC is the default for these OSes. | |
19054 | ;; | |
19055 | mingw* | cygwin* | os2* | pw32* | cegcc*) | |
19056 | # This hack is so that the source file can tell whether it is being | |
19057 | # built for inclusion in a dll (and should export symbols for example). | |
19058 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
19059 | # (--disable-auto-import) libraries | |
19060 | lt_prog_compiler_pic_CXX='-DDLL_EXPORT' | |
19061 | ;; | |
19062 | darwin* | rhapsody*) | |
19063 | # PIC is the default on this platform | |
19064 | # Common symbols not allowed in MH_DYLIB files | |
19065 | lt_prog_compiler_pic_CXX='-fno-common' | |
19066 | ;; | |
19067 | *djgpp*) | |
19068 | # DJGPP does not support shared libraries at all | |
19069 | lt_prog_compiler_pic_CXX= | |
19070 | ;; | |
43e02a8a RW |
19071 | haiku*) |
19072 | # PIC is the default for Haiku. | |
19073 | # The "-static" flag exists, but is broken. | |
19074 | lt_prog_compiler_static_CXX= | |
19075 | ;; | |
00020c16 ILT |
19076 | interix[3-9]*) |
19077 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
19078 | # Instead, we relocate shared libraries at runtime. | |
19079 | ;; | |
19080 | sysv4*MP*) | |
19081 | if test -d /usr/nec; then | |
19082 | lt_prog_compiler_pic_CXX=-Kconform_pic | |
19083 | fi | |
19084 | ;; | |
19085 | hpux*) | |
19086 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
19087 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
19088 | # sets the default TLS model and affects inlining. | |
19089 | case $host_cpu in | |
19090 | hppa*64*) | |
19091 | ;; | |
19092 | *) | |
19093 | lt_prog_compiler_pic_CXX='-fPIC' | |
19094 | ;; | |
19095 | esac | |
19096 | ;; | |
19097 | *qnx* | *nto*) | |
19098 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
19099 | # it will coredump. | |
19100 | lt_prog_compiler_pic_CXX='-fPIC -shared' | |
19101 | ;; | |
19102 | *) | |
19103 | lt_prog_compiler_pic_CXX='-fPIC' | |
19104 | ;; | |
19105 | esac | |
19106 | else | |
19107 | case $host_os in | |
19108 | aix[4-9]*) | |
19109 | # All AIX code is PIC. | |
19110 | if test "$host_cpu" = ia64; then | |
19111 | # AIX 5 now supports IA64 processor | |
19112 | lt_prog_compiler_static_CXX='-Bstatic' | |
19113 | else | |
19114 | lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' | |
19115 | fi | |
19116 | ;; | |
19117 | chorus*) | |
19118 | case $cc_basename in | |
19119 | cxch68*) | |
19120 | # Green Hills C++ Compiler | |
19121 | # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | |
19122 | ;; | |
19123 | esac | |
19124 | ;; | |
19125 | dgux*) | |
19126 | case $cc_basename in | |
19127 | ec++*) | |
19128 | lt_prog_compiler_pic_CXX='-KPIC' | |
19129 | ;; | |
19130 | ghcx*) | |
19131 | # Green Hills C++ Compiler | |
19132 | lt_prog_compiler_pic_CXX='-pic' | |
19133 | ;; | |
19134 | *) | |
19135 | ;; | |
19136 | esac | |
19137 | ;; | |
19138 | freebsd* | dragonfly*) | |
19139 | # FreeBSD uses GNU C++ | |
19140 | ;; | |
19141 | hpux9* | hpux10* | hpux11*) | |
19142 | case $cc_basename in | |
19143 | CC*) | |
19144 | lt_prog_compiler_wl_CXX='-Wl,' | |
19145 | lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' | |
19146 | if test "$host_cpu" != ia64; then | |
19147 | lt_prog_compiler_pic_CXX='+Z' | |
19148 | fi | |
19149 | ;; | |
19150 | aCC*) | |
19151 | lt_prog_compiler_wl_CXX='-Wl,' | |
19152 | lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' | |
19153 | case $host_cpu in | |
19154 | hppa*64*|ia64*) | |
19155 | # +Z the default | |
19156 | ;; | |
19157 | *) | |
19158 | lt_prog_compiler_pic_CXX='+Z' | |
19159 | ;; | |
19160 | esac | |
19161 | ;; | |
19162 | *) | |
19163 | ;; | |
19164 | esac | |
19165 | ;; | |
19166 | interix*) | |
19167 | # This is c89, which is MS Visual C++ (no shared libs) | |
19168 | # Anyone wants to do a port? | |
19169 | ;; | |
19170 | irix5* | irix6* | nonstopux*) | |
19171 | case $cc_basename in | |
19172 | CC*) | |
19173 | lt_prog_compiler_wl_CXX='-Wl,' | |
19174 | lt_prog_compiler_static_CXX='-non_shared' | |
19175 | # CC pic flag -KPIC is the default. | |
19176 | ;; | |
19177 | *) | |
19178 | ;; | |
19179 | esac | |
19180 | ;; | |
19181 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
19182 | case $cc_basename in | |
19183 | KCC*) | |
19184 | # KAI C++ Compiler | |
19185 | lt_prog_compiler_wl_CXX='--backend -Wl,' | |
19186 | lt_prog_compiler_pic_CXX='-fPIC' | |
19187 | ;; | |
19188 | ecpc* ) | |
19189 | # old Intel C++ for x86_64 which still supported -KPIC. | |
19190 | lt_prog_compiler_wl_CXX='-Wl,' | |
19191 | lt_prog_compiler_pic_CXX='-KPIC' | |
19192 | lt_prog_compiler_static_CXX='-static' | |
19193 | ;; | |
19194 | icpc* ) | |
19195 | # Intel C++, used to be incompatible with GCC. | |
19196 | # ICC 10 doesn't accept -KPIC any more. | |
19197 | lt_prog_compiler_wl_CXX='-Wl,' | |
19198 | lt_prog_compiler_pic_CXX='-fPIC' | |
19199 | lt_prog_compiler_static_CXX='-static' | |
19200 | ;; | |
19201 | pgCC* | pgcpp*) | |
19202 | # Portland Group C++ compiler | |
19203 | lt_prog_compiler_wl_CXX='-Wl,' | |
19204 | lt_prog_compiler_pic_CXX='-fpic' | |
19205 | lt_prog_compiler_static_CXX='-Bstatic' | |
19206 | ;; | |
19207 | cxx*) | |
19208 | # Compaq C++ | |
19209 | # Make sure the PIC flag is empty. It appears that all Alpha | |
19210 | # Linux and Compaq Tru64 Unix objects are PIC. | |
19211 | lt_prog_compiler_pic_CXX= | |
19212 | lt_prog_compiler_static_CXX='-non_shared' | |
19213 | ;; | |
43e02a8a RW |
19214 | xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) |
19215 | # IBM XL 8.0, 9.0 on PPC and BlueGene | |
00020c16 ILT |
19216 | lt_prog_compiler_wl_CXX='-Wl,' |
19217 | lt_prog_compiler_pic_CXX='-qpic' | |
19218 | lt_prog_compiler_static_CXX='-qstaticlink' | |
19219 | ;; | |
19220 | *) | |
19221 | case `$CC -V 2>&1 | sed 5q` in | |
19222 | *Sun\ C*) | |
19223 | # Sun C++ 5.9 | |
19224 | lt_prog_compiler_pic_CXX='-KPIC' | |
19225 | lt_prog_compiler_static_CXX='-Bstatic' | |
19226 | lt_prog_compiler_wl_CXX='-Qoption ld ' | |
19227 | ;; | |
19228 | esac | |
19229 | ;; | |
19230 | esac | |
19231 | ;; | |
19232 | lynxos*) | |
19233 | ;; | |
19234 | m88k*) | |
19235 | ;; | |
19236 | mvs*) | |
19237 | case $cc_basename in | |
19238 | cxx*) | |
19239 | lt_prog_compiler_pic_CXX='-W c,exportall' | |
19240 | ;; | |
19241 | *) | |
19242 | ;; | |
19243 | esac | |
19244 | ;; | |
19245 | netbsd*) | |
19246 | ;; | |
19247 | *qnx* | *nto*) | |
19248 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
19249 | # it will coredump. | |
19250 | lt_prog_compiler_pic_CXX='-fPIC -shared' | |
19251 | ;; | |
19252 | osf3* | osf4* | osf5*) | |
19253 | case $cc_basename in | |
19254 | KCC*) | |
19255 | lt_prog_compiler_wl_CXX='--backend -Wl,' | |
19256 | ;; | |
19257 | RCC*) | |
19258 | # Rational C++ 2.4.1 | |
19259 | lt_prog_compiler_pic_CXX='-pic' | |
19260 | ;; | |
19261 | cxx*) | |
19262 | # Digital/Compaq C++ | |
19263 | lt_prog_compiler_wl_CXX='-Wl,' | |
19264 | # Make sure the PIC flag is empty. It appears that all Alpha | |
19265 | # Linux and Compaq Tru64 Unix objects are PIC. | |
19266 | lt_prog_compiler_pic_CXX= | |
19267 | lt_prog_compiler_static_CXX='-non_shared' | |
19268 | ;; | |
19269 | *) | |
19270 | ;; | |
19271 | esac | |
19272 | ;; | |
19273 | psos*) | |
19274 | ;; | |
19275 | solaris*) | |
19276 | case $cc_basename in | |
19277 | CC*) | |
19278 | # Sun C++ 4.2, 5.x and Centerline C++ | |
19279 | lt_prog_compiler_pic_CXX='-KPIC' | |
19280 | lt_prog_compiler_static_CXX='-Bstatic' | |
19281 | lt_prog_compiler_wl_CXX='-Qoption ld ' | |
19282 | ;; | |
19283 | gcx*) | |
19284 | # Green Hills C++ Compiler | |
19285 | lt_prog_compiler_pic_CXX='-PIC' | |
19286 | ;; | |
19287 | *) | |
19288 | ;; | |
19289 | esac | |
19290 | ;; | |
19291 | sunos4*) | |
19292 | case $cc_basename in | |
19293 | CC*) | |
19294 | # Sun C++ 4.x | |
19295 | lt_prog_compiler_pic_CXX='-pic' | |
19296 | lt_prog_compiler_static_CXX='-Bstatic' | |
19297 | ;; | |
19298 | lcc*) | |
19299 | # Lucid | |
19300 | lt_prog_compiler_pic_CXX='-pic' | |
19301 | ;; | |
19302 | *) | |
19303 | ;; | |
19304 | esac | |
19305 | ;; | |
19306 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | |
19307 | case $cc_basename in | |
19308 | CC*) | |
19309 | lt_prog_compiler_wl_CXX='-Wl,' | |
19310 | lt_prog_compiler_pic_CXX='-KPIC' | |
19311 | lt_prog_compiler_static_CXX='-Bstatic' | |
19312 | ;; | |
19313 | esac | |
19314 | ;; | |
19315 | tandem*) | |
19316 | case $cc_basename in | |
19317 | NCC*) | |
19318 | # NonStop-UX NCC 3.20 | |
19319 | lt_prog_compiler_pic_CXX='-KPIC' | |
19320 | ;; | |
19321 | *) | |
19322 | ;; | |
19323 | esac | |
19324 | ;; | |
19325 | vxworks*) | |
19326 | ;; | |
19327 | *) | |
19328 | lt_prog_compiler_can_build_shared_CXX=no | |
19329 | ;; | |
19330 | esac | |
19331 | fi | |
19332 | ||
19333 | case $host_os in | |
19334 | # For platforms which do not support PIC, -DPIC is meaningless: | |
19335 | *djgpp*) | |
19336 | lt_prog_compiler_pic_CXX= | |
19337 | ;; | |
19338 | *) | |
19339 | lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" | |
19340 | ;; | |
19341 | esac | |
5213506e RW |
19342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 |
19343 | $as_echo "$lt_prog_compiler_pic_CXX" >&6; } | |
00020c16 ILT |
19344 | |
19345 | ||
19346 | ||
19347 | # | |
19348 | # Check to make sure the PIC flag actually works. | |
19349 | # | |
19350 | if test -n "$lt_prog_compiler_pic_CXX"; then | |
5213506e RW |
19351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 |
19352 | $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } | |
19353 | if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : | |
19354 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19355 | else |
19356 | lt_cv_prog_compiler_pic_works_CXX=no | |
19357 | ac_outfile=conftest.$ac_objext | |
19358 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19359 | lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" | |
19360 | # Insert the option either (1) after the last *FLAGS variable, or | |
19361 | # (2) before a word containing "conftest.", or (3) at the end. | |
19362 | # Note that $ac_compile itself does not contain backslashes and begins | |
19363 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
19364 | # The option is referenced via a variable to avoid confusing sed. | |
19365 | lt_compile=`echo "$ac_compile" | $SED \ | |
19366 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
19367 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
19368 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 19369 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
19370 | (eval "$lt_compile" 2>conftest.err) |
19371 | ac_status=$? | |
19372 | cat conftest.err >&5 | |
43e02a8a | 19373 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
19374 | if (exit $ac_status) && test -s "$ac_outfile"; then |
19375 | # The compiler can only warn and ignore the option if not recognized | |
19376 | # So say no if there are warnings other than the usual output. | |
43e02a8a | 19377 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp |
00020c16 ILT |
19378 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
19379 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
19380 | lt_cv_prog_compiler_pic_works_CXX=yes | |
19381 | fi | |
19382 | fi | |
19383 | $RM conftest* | |
19384 | ||
19385 | fi | |
5213506e RW |
19386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 |
19387 | $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } | |
00020c16 ILT |
19388 | |
19389 | if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then | |
19390 | case $lt_prog_compiler_pic_CXX in | |
19391 | "" | " "*) ;; | |
19392 | *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; | |
19393 | esac | |
19394 | else | |
19395 | lt_prog_compiler_pic_CXX= | |
19396 | lt_prog_compiler_can_build_shared_CXX=no | |
19397 | fi | |
19398 | ||
19399 | fi | |
19400 | ||
19401 | ||
19402 | ||
19403 | # | |
19404 | # Check to make sure the static flag actually works. | |
19405 | # | |
19406 | wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" | |
5213506e RW |
19407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 |
19408 | $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } | |
19409 | if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : | |
19410 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19411 | else |
19412 | lt_cv_prog_compiler_static_works_CXX=no | |
19413 | save_LDFLAGS="$LDFLAGS" | |
19414 | LDFLAGS="$LDFLAGS $lt_tmp_static_flag" | |
19415 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
19416 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
19417 | # The linker can only warn and ignore the option if not recognized | |
19418 | # So say no if there are warnings | |
19419 | if test -s conftest.err; then | |
19420 | # Append any errors to the config.log. | |
19421 | cat conftest.err 1>&5 | |
43e02a8a | 19422 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp |
00020c16 ILT |
19423 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
19424 | if diff conftest.exp conftest.er2 >/dev/null; then | |
19425 | lt_cv_prog_compiler_static_works_CXX=yes | |
19426 | fi | |
19427 | else | |
19428 | lt_cv_prog_compiler_static_works_CXX=yes | |
19429 | fi | |
19430 | fi | |
19431 | $RM -r conftest* | |
19432 | LDFLAGS="$save_LDFLAGS" | |
19433 | ||
19434 | fi | |
5213506e RW |
19435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 |
19436 | $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } | |
00020c16 ILT |
19437 | |
19438 | if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then | |
19439 | : | |
19440 | else | |
19441 | lt_prog_compiler_static_CXX= | |
19442 | fi | |
19443 | ||
19444 | ||
19445 | ||
19446 | ||
5213506e RW |
19447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
19448 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
19449 | if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : | |
19450 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19451 | else |
19452 | lt_cv_prog_compiler_c_o_CXX=no | |
19453 | $RM -r conftest 2>/dev/null | |
19454 | mkdir conftest | |
19455 | cd conftest | |
19456 | mkdir out | |
19457 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19458 | ||
19459 | lt_compiler_flag="-o out/conftest2.$ac_objext" | |
19460 | # Insert the option either (1) after the last *FLAGS variable, or | |
19461 | # (2) before a word containing "conftest.", or (3) at the end. | |
19462 | # Note that $ac_compile itself does not contain backslashes and begins | |
19463 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
19464 | lt_compile=`echo "$ac_compile" | $SED \ | |
19465 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
19466 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
19467 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 19468 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
19469 | (eval "$lt_compile" 2>out/conftest.err) |
19470 | ac_status=$? | |
19471 | cat out/conftest.err >&5 | |
43e02a8a | 19472 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
19473 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
19474 | then | |
19475 | # The compiler can only warn and ignore the option if not recognized | |
19476 | # So say no if there are warnings | |
43e02a8a | 19477 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
19478 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
19479 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
19480 | lt_cv_prog_compiler_c_o_CXX=yes | |
19481 | fi | |
19482 | fi | |
19483 | chmod u+w . 2>&5 | |
19484 | $RM conftest* | |
19485 | # SGI C++ compiler will create directory out/ii_files/ for | |
19486 | # template instantiation | |
19487 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
19488 | $RM out/* && rmdir out | |
19489 | cd .. | |
19490 | $RM -r conftest | |
19491 | $RM conftest* | |
19492 | ||
19493 | fi | |
5213506e RW |
19494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 |
19495 | $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } | |
00020c16 ILT |
19496 | |
19497 | ||
19498 | ||
5213506e RW |
19499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 |
19500 | $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } | |
19501 | if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : | |
19502 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19503 | else |
19504 | lt_cv_prog_compiler_c_o_CXX=no | |
19505 | $RM -r conftest 2>/dev/null | |
19506 | mkdir conftest | |
19507 | cd conftest | |
19508 | mkdir out | |
19509 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19510 | ||
19511 | lt_compiler_flag="-o out/conftest2.$ac_objext" | |
19512 | # Insert the option either (1) after the last *FLAGS variable, or | |
19513 | # (2) before a word containing "conftest.", or (3) at the end. | |
19514 | # Note that $ac_compile itself does not contain backslashes and begins | |
19515 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
19516 | lt_compile=`echo "$ac_compile" | $SED \ | |
19517 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
19518 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
19519 | -e 's:$: $lt_compiler_flag:'` | |
43e02a8a | 19520 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) |
00020c16 ILT |
19521 | (eval "$lt_compile" 2>out/conftest.err) |
19522 | ac_status=$? | |
19523 | cat out/conftest.err >&5 | |
43e02a8a | 19524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
00020c16 ILT |
19525 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
19526 | then | |
19527 | # The compiler can only warn and ignore the option if not recognized | |
19528 | # So say no if there are warnings | |
43e02a8a | 19529 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
00020c16 ILT |
19530 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
19531 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
19532 | lt_cv_prog_compiler_c_o_CXX=yes | |
19533 | fi | |
19534 | fi | |
19535 | chmod u+w . 2>&5 | |
19536 | $RM conftest* | |
19537 | # SGI C++ compiler will create directory out/ii_files/ for | |
19538 | # template instantiation | |
19539 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
19540 | $RM out/* && rmdir out | |
19541 | cd .. | |
19542 | $RM -r conftest | |
19543 | $RM conftest* | |
19544 | ||
19545 | fi | |
5213506e RW |
19546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 |
19547 | $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } | |
00020c16 ILT |
19548 | |
19549 | ||
19550 | ||
19551 | ||
19552 | hard_links="nottested" | |
19553 | if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then | |
19554 | # do not overwrite the value of need_locks provided by the user | |
5213506e RW |
19555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 |
19556 | $as_echo_n "checking if we can lock with hard links... " >&6; } | |
00020c16 ILT |
19557 | hard_links=yes |
19558 | $RM conftest* | |
19559 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
19560 | touch conftest.a | |
19561 | ln conftest.a conftest.b 2>&5 || hard_links=no | |
19562 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
5213506e RW |
19563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 |
19564 | $as_echo "$hard_links" >&6; } | |
00020c16 | 19565 | if test "$hard_links" = no; then |
5213506e RW |
19566 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 |
19567 | $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | |
00020c16 ILT |
19568 | need_locks=warn |
19569 | fi | |
19570 | else | |
19571 | need_locks=no | |
19572 | fi | |
19573 | ||
19574 | ||
19575 | ||
5213506e RW |
19576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 |
19577 | $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } | |
00020c16 ILT |
19578 | |
19579 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
19580 | case $host_os in | |
19581 | aix[4-9]*) | |
19582 | # If we're using GNU nm, then we don't want the "-C" option. | |
19583 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
43e02a8a RW |
19584 | # Also, AIX nm treats weak defined symbols like other global defined |
19585 | # symbols, whereas GNU nm marks them as "W". | |
00020c16 | 19586 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
43e02a8a | 19587 | export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
00020c16 ILT |
19588 | else |
19589 | export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
19590 | fi | |
19591 | ;; | |
19592 | pw32*) | |
19593 | export_symbols_cmds_CXX="$ltdll_cmds" | |
19594 | ;; | |
19595 | cygwin* | mingw* | cegcc*) | |
19596 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' | |
19597 | ;; | |
19598 | *) | |
19599 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
19600 | ;; | |
19601 | esac | |
19602 | exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' | |
19603 | ||
5213506e RW |
19604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 |
19605 | $as_echo "$ld_shlibs_CXX" >&6; } | |
00020c16 ILT |
19606 | test "$ld_shlibs_CXX" = no && can_build_shared=no |
19607 | ||
19608 | with_gnu_ld_CXX=$with_gnu_ld | |
19609 | ||
19610 | ||
19611 | ||
19612 | ||
19613 | ||
19614 | ||
19615 | # | |
19616 | # Do we need to explicitly link libc? | |
19617 | # | |
19618 | case "x$archive_cmds_need_lc_CXX" in | |
19619 | x|xyes) | |
19620 | # Assume -lc should be added | |
19621 | archive_cmds_need_lc_CXX=yes | |
19622 | ||
19623 | if test "$enable_shared" = yes && test "$GCC" = yes; then | |
19624 | case $archive_cmds_CXX in | |
19625 | *'~'*) | |
19626 | # FIXME: we may have to deal with multi-command sequences. | |
19627 | ;; | |
19628 | '$CC '*) | |
19629 | # Test whether the compiler implicitly links with -lc since on some | |
19630 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
19631 | # to ld, don't add -lc before -lgcc. | |
5213506e RW |
19632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 |
19633 | $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } | |
19634 | if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then : | |
19635 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
19636 | else |
19637 | $RM conftest* | |
19638 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
19639 | ||
5213506e | 19640 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
00020c16 ILT |
19641 | (eval $ac_compile) 2>&5 |
19642 | ac_status=$? | |
5213506e RW |
19643 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
19644 | test $ac_status = 0; } 2>conftest.err; then | |
00020c16 ILT |
19645 | soname=conftest |
19646 | lib=conftest | |
19647 | libobjs=conftest.$ac_objext | |
19648 | deplibs= | |
19649 | wl=$lt_prog_compiler_wl_CXX | |
19650 | pic_flag=$lt_prog_compiler_pic_CXX | |
19651 | compiler_flags=-v | |
19652 | linker_flags=-v | |
19653 | verstring= | |
19654 | output_objdir=. | |
19655 | libname=conftest | |
19656 | lt_save_allow_undefined_flag=$allow_undefined_flag_CXX | |
19657 | allow_undefined_flag_CXX= | |
5213506e | 19658 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 |
00020c16 ILT |
19659 | (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 |
19660 | ac_status=$? | |
5213506e RW |
19661 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
19662 | test $ac_status = 0; } | |
00020c16 ILT |
19663 | then |
19664 | lt_cv_archive_cmds_need_lc_CXX=no | |
19665 | else | |
19666 | lt_cv_archive_cmds_need_lc_CXX=yes | |
19667 | fi | |
19668 | allow_undefined_flag_CXX=$lt_save_allow_undefined_flag | |
19669 | else | |
19670 | cat conftest.err 1>&5 | |
19671 | fi | |
19672 | $RM conftest* | |
19673 | ||
19674 | fi | |
5213506e RW |
19675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 |
19676 | $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } | |
00020c16 ILT |
19677 | archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX |
19678 | ;; | |
19679 | esac | |
19680 | fi | |
19681 | ;; | |
19682 | esac | |
19683 | ||
19684 | ||
19685 | ||
19686 | ||
19687 | ||
19688 | ||
19689 | ||
19690 | ||
19691 | ||
19692 | ||
19693 | ||
19694 | ||
19695 | ||
19696 | ||
19697 | ||
19698 | ||
19699 | ||
19700 | ||
19701 | ||
19702 | ||
19703 | ||
19704 | ||
19705 | ||
19706 | ||
19707 | ||
19708 | ||
19709 | ||
19710 | ||
19711 | ||
19712 | ||
19713 | ||
19714 | ||
19715 | ||
19716 | ||
19717 | ||
19718 | ||
19719 | ||
19720 | ||
19721 | ||
19722 | ||
19723 | ||
19724 | ||
19725 | ||
19726 | ||
19727 | ||
19728 | ||
19729 | ||
19730 | ||
19731 | ||
19732 | ||
19733 | ||
19734 | ||
19735 | ||
19736 | ||
19737 | ||
19738 | ||
19739 | ||
19740 | ||
19741 | ||
19742 | ||
19743 | ||
19744 | ||
19745 | ||
19746 | ||
5213506e RW |
19747 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 |
19748 | $as_echo_n "checking dynamic linker characteristics... " >&6; } | |
00020c16 ILT |
19749 | |
19750 | library_names_spec= | |
19751 | libname_spec='lib$name' | |
19752 | soname_spec= | |
19753 | shrext_cmds=".so" | |
19754 | postinstall_cmds= | |
19755 | postuninstall_cmds= | |
19756 | finish_cmds= | |
19757 | finish_eval= | |
19758 | shlibpath_var= | |
19759 | shlibpath_overrides_runpath=unknown | |
19760 | version_type=none | |
19761 | dynamic_linker="$host_os ld.so" | |
19762 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
19763 | need_lib_prefix=unknown | |
19764 | hardcode_into_libs=no | |
19765 | ||
19766 | # when you set need_version to no, make sure it does not cause -set_version | |
19767 | # flags to be left without arguments | |
19768 | need_version=unknown | |
19769 | ||
19770 | case $host_os in | |
19771 | aix3*) | |
19772 | version_type=linux | |
19773 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | |
19774 | shlibpath_var=LIBPATH | |
19775 | ||
19776 | # AIX 3 has no versioning support, so we append a major version to the name. | |
19777 | soname_spec='${libname}${release}${shared_ext}$major' | |
19778 | ;; | |
19779 | ||
19780 | aix[4-9]*) | |
19781 | version_type=linux | |
19782 | need_lib_prefix=no | |
19783 | need_version=no | |
19784 | hardcode_into_libs=yes | |
19785 | if test "$host_cpu" = ia64; then | |
19786 | # AIX 5 supports IA64 | |
19787 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | |
19788 | shlibpath_var=LD_LIBRARY_PATH | |
19789 | else | |
19790 | # With GCC up to 2.95.x, collect2 would create an import file | |
19791 | # for dependence libraries. The import file would start with | |
19792 | # the line `#! .'. This would cause the generated library to | |
19793 | # depend on `.', always an invalid library. This was fixed in | |
19794 | # development snapshots of GCC prior to 3.0. | |
19795 | case $host_os in | |
19796 | aix4 | aix4.[01] | aix4.[01].*) | |
19797 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
19798 | echo ' yes ' | |
19799 | echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then | |
19800 | : | |
19801 | else | |
19802 | can_build_shared=no | |
19803 | fi | |
19804 | ;; | |
19805 | esac | |
19806 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | |
19807 | # soname into executable. Probably we can add versioning support to | |
19808 | # collect2, so additional links can be useful in future. | |
19809 | if test "$aix_use_runtimelinking" = yes; then | |
19810 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
19811 | # instead of lib<name>.a to let people know that these are not | |
19812 | # typical AIX shared libraries. | |
19813 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
19814 | else | |
19815 | # We preserve .a as extension for shared libraries through AIX4.2 | |
19816 | # and later when we are not doing run time linking. | |
19817 | library_names_spec='${libname}${release}.a $libname.a' | |
19818 | soname_spec='${libname}${release}${shared_ext}$major' | |
19819 | fi | |
19820 | shlibpath_var=LIBPATH | |
19821 | fi | |
19822 | ;; | |
19823 | ||
19824 | amigaos*) | |
19825 | case $host_cpu in | |
19826 | powerpc) | |
19827 | # Since July 2007 AmigaOS4 officially supports .so libraries. | |
19828 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | |
19829 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
19830 | ;; | |
19831 | m68k) | |
19832 | library_names_spec='$libname.ixlibrary $libname.a' | |
19833 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
43e02a8a | 19834 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' |
00020c16 ILT |
19835 | ;; |
19836 | esac | |
19837 | ;; | |
19838 | ||
19839 | beos*) | |
19840 | library_names_spec='${libname}${shared_ext}' | |
19841 | dynamic_linker="$host_os ld.so" | |
19842 | shlibpath_var=LIBRARY_PATH | |
19843 | ;; | |
19844 | ||
19845 | bsdi[45]*) | |
19846 | version_type=linux | |
19847 | need_version=no | |
19848 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
19849 | soname_spec='${libname}${release}${shared_ext}$major' | |
19850 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
19851 | shlibpath_var=LD_LIBRARY_PATH | |
19852 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
19853 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
19854 | # the default ld.so.conf also contains /usr/contrib/lib and | |
19855 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
19856 | # libtool to hard-code these into programs | |
19857 | ;; | |
19858 | ||
19859 | cygwin* | mingw* | pw32* | cegcc*) | |
19860 | version_type=windows | |
19861 | shrext_cmds=".dll" | |
19862 | need_version=no | |
19863 | need_lib_prefix=no | |
19864 | ||
19865 | case $GCC,$host_os in | |
19866 | yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | |
19867 | library_names_spec='$libname.dll.a' | |
19868 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
19869 | postinstall_cmds='base_file=`basename \${file}`~ | |
19870 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | |
19871 | dldir=$destdir/`dirname \$dlpath`~ | |
19872 | test -d \$dldir || mkdir -p \$dldir~ | |
19873 | $install_prog $dir/$dlname \$dldir/$dlname~ | |
19874 | chmod a+x \$dldir/$dlname~ | |
19875 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | |
19876 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | |
19877 | fi' | |
19878 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
19879 | dlpath=$dir/\$dldll~ | |
19880 | $RM \$dlpath' | |
19881 | shlibpath_overrides_runpath=yes | |
19882 | ||
19883 | case $host_os in | |
19884 | cygwin*) | |
19885 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | |
19886 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
43e02a8a | 19887 | |
00020c16 ILT |
19888 | ;; |
19889 | mingw* | cegcc*) | |
19890 | # MinGW DLLs use traditional 'lib' prefix | |
19891 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
00020c16 ILT |
19892 | ;; |
19893 | pw32*) | |
19894 | # pw32 DLLs use 'pw' prefix rather than 'lib' | |
19895 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | |
19896 | ;; | |
19897 | esac | |
19898 | ;; | |
19899 | ||
19900 | *) | |
19901 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | |
19902 | ;; | |
19903 | esac | |
19904 | dynamic_linker='Win32 ld.exe' | |
19905 | # FIXME: first we should search . and the directory the executable is in | |
19906 | shlibpath_var=PATH | |
19907 | ;; | |
19908 | ||
19909 | darwin* | rhapsody*) | |
19910 | dynamic_linker="$host_os dyld" | |
19911 | version_type=darwin | |
19912 | need_lib_prefix=no | |
19913 | need_version=no | |
19914 | library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' | |
19915 | soname_spec='${libname}${release}${major}$shared_ext' | |
19916 | shlibpath_overrides_runpath=yes | |
19917 | shlibpath_var=DYLD_LIBRARY_PATH | |
19918 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | |
19919 | ||
19920 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | |
19921 | ;; | |
19922 | ||
19923 | dgux*) | |
19924 | version_type=linux | |
19925 | need_lib_prefix=no | |
19926 | need_version=no | |
19927 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | |
19928 | soname_spec='${libname}${release}${shared_ext}$major' | |
19929 | shlibpath_var=LD_LIBRARY_PATH | |
19930 | ;; | |
19931 | ||
19932 | freebsd1*) | |
19933 | dynamic_linker=no | |
19934 | ;; | |
19935 | ||
19936 | freebsd* | dragonfly*) | |
19937 | # DragonFly does not have aout. When/if they implement a new | |
19938 | # versioning mechanism, adjust this. | |
19939 | if test -x /usr/bin/objformat; then | |
19940 | objformat=`/usr/bin/objformat` | |
19941 | else | |
19942 | case $host_os in | |
19943 | freebsd[123]*) objformat=aout ;; | |
19944 | *) objformat=elf ;; | |
19945 | esac | |
19946 | fi | |
19947 | version_type=freebsd-$objformat | |
19948 | case $version_type in | |
19949 | freebsd-elf*) | |
19950 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
19951 | need_version=no | |
19952 | need_lib_prefix=no | |
19953 | ;; | |
19954 | freebsd-*) | |
19955 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | |
19956 | need_version=yes | |
19957 | ;; | |
19958 | esac | |
19959 | shlibpath_var=LD_LIBRARY_PATH | |
19960 | case $host_os in | |
19961 | freebsd2*) | |
19962 | shlibpath_overrides_runpath=yes | |
19963 | ;; | |
19964 | freebsd3.[01]* | freebsdelf3.[01]*) | |
19965 | shlibpath_overrides_runpath=yes | |
19966 | hardcode_into_libs=yes | |
19967 | ;; | |
19968 | freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ | |
19969 | freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) | |
19970 | shlibpath_overrides_runpath=no | |
19971 | hardcode_into_libs=yes | |
19972 | ;; | |
19973 | *) # from 4.6 on, and DragonFly | |
19974 | shlibpath_overrides_runpath=yes | |
19975 | hardcode_into_libs=yes | |
19976 | ;; | |
19977 | esac | |
19978 | ;; | |
19979 | ||
19980 | gnu*) | |
19981 | version_type=linux | |
19982 | need_lib_prefix=no | |
19983 | need_version=no | |
19984 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
19985 | soname_spec='${libname}${release}${shared_ext}$major' | |
19986 | shlibpath_var=LD_LIBRARY_PATH | |
19987 | hardcode_into_libs=yes | |
19988 | ;; | |
19989 | ||
43e02a8a RW |
19990 | haiku*) |
19991 | version_type=linux | |
19992 | need_lib_prefix=no | |
19993 | need_version=no | |
19994 | dynamic_linker="$host_os runtime_loader" | |
19995 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
19996 | soname_spec='${libname}${release}${shared_ext}$major' | |
19997 | shlibpath_var=LIBRARY_PATH | |
19998 | shlibpath_overrides_runpath=yes | |
19999 | sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | |
20000 | hardcode_into_libs=yes | |
20001 | ;; | |
20002 | ||
00020c16 ILT |
20003 | hpux9* | hpux10* | hpux11*) |
20004 | # Give a soname corresponding to the major version so that dld.sl refuses to | |
20005 | # link against other versions. | |
20006 | version_type=sunos | |
20007 | need_lib_prefix=no | |
20008 | need_version=no | |
20009 | case $host_cpu in | |
20010 | ia64*) | |
20011 | shrext_cmds='.so' | |
20012 | hardcode_into_libs=yes | |
20013 | dynamic_linker="$host_os dld.so" | |
20014 | shlibpath_var=LD_LIBRARY_PATH | |
20015 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
20016 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20017 | soname_spec='${libname}${release}${shared_ext}$major' | |
20018 | if test "X$HPUX_IA64_MODE" = X32; then | |
20019 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
20020 | else | |
20021 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
20022 | fi | |
20023 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
20024 | ;; | |
20025 | hppa*64*) | |
20026 | shrext_cmds='.sl' | |
20027 | hardcode_into_libs=yes | |
20028 | dynamic_linker="$host_os dld.sl" | |
20029 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | |
20030 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
20031 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20032 | soname_spec='${libname}${release}${shared_ext}$major' | |
20033 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | |
20034 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
20035 | ;; | |
20036 | *) | |
20037 | shrext_cmds='.sl' | |
20038 | dynamic_linker="$host_os dld.sl" | |
20039 | shlibpath_var=SHLIB_PATH | |
20040 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
20041 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20042 | soname_spec='${libname}${release}${shared_ext}$major' | |
20043 | ;; | |
20044 | esac | |
43e02a8a | 20045 | # HP-UX runs *really* slowly unless shared libraries are mode 555, ... |
00020c16 | 20046 | postinstall_cmds='chmod 555 $lib' |
43e02a8a RW |
20047 | # or fails outright, so override atomically: |
20048 | install_override_mode=555 | |
00020c16 ILT |
20049 | ;; |
20050 | ||
20051 | interix[3-9]*) | |
20052 | version_type=linux | |
20053 | need_lib_prefix=no | |
20054 | need_version=no | |
20055 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
20056 | soname_spec='${libname}${release}${shared_ext}$major' | |
20057 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | |
20058 | shlibpath_var=LD_LIBRARY_PATH | |
20059 | shlibpath_overrides_runpath=no | |
20060 | hardcode_into_libs=yes | |
20061 | ;; | |
20062 | ||
20063 | irix5* | irix6* | nonstopux*) | |
20064 | case $host_os in | |
20065 | nonstopux*) version_type=nonstopux ;; | |
20066 | *) | |
20067 | if test "$lt_cv_prog_gnu_ld" = yes; then | |
20068 | version_type=linux | |
20069 | else | |
20070 | version_type=irix | |
20071 | fi ;; | |
20072 | esac | |
20073 | need_lib_prefix=no | |
20074 | need_version=no | |
20075 | soname_spec='${libname}${release}${shared_ext}$major' | |
20076 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | |
20077 | case $host_os in | |
20078 | irix5* | nonstopux*) | |
20079 | libsuff= shlibsuff= | |
20080 | ;; | |
20081 | *) | |
20082 | case $LD in # libtool.m4 will add one of these switches to LD | |
20083 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | |
20084 | libsuff= shlibsuff= libmagic=32-bit;; | |
20085 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | |
20086 | libsuff=32 shlibsuff=N32 libmagic=N32;; | |
20087 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | |
20088 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
20089 | *) libsuff= shlibsuff= libmagic=never-match;; | |
20090 | esac | |
20091 | ;; | |
20092 | esac | |
20093 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
20094 | shlibpath_overrides_runpath=no | |
20095 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
20096 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
20097 | hardcode_into_libs=yes | |
20098 | ;; | |
20099 | ||
20100 | # No shared lib support for Linux oldld, aout, or coff. | |
20101 | linux*oldld* | linux*aout* | linux*coff*) | |
20102 | dynamic_linker=no | |
20103 | ;; | |
20104 | ||
20105 | # This must be Linux ELF. | |
20106 | linux* | k*bsd*-gnu | kopensolaris*-gnu) | |
20107 | version_type=linux | |
20108 | need_lib_prefix=no | |
20109 | need_version=no | |
20110 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20111 | soname_spec='${libname}${release}${shared_ext}$major' | |
20112 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
20113 | shlibpath_var=LD_LIBRARY_PATH | |
20114 | shlibpath_overrides_runpath=no | |
20115 | ||
20116 | # Some binutils ld are patched to set DT_RUNPATH | |
5213506e RW |
20117 | if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : |
20118 | $as_echo_n "(cached) " >&6 | |
00020c16 ILT |
20119 | else |
20120 | lt_cv_shlibpath_overrides_runpath=no | |
20121 | save_LDFLAGS=$LDFLAGS | |
20122 | save_libdir=$libdir | |
20123 | eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ | |
20124 | LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" | |
5213506e | 20125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
00020c16 ILT |
20126 | /* end confdefs.h. */ |
20127 | ||
20128 | int | |
20129 | main () | |
20130 | { | |
20131 | ||
da0f6381 PB |
20132 | ; |
20133 | return 0; | |
20134 | } | |
20135 | _ACEOF | |
5213506e RW |
20136 | if ac_fn_cxx_try_link "$LINENO"; then : |
20137 | if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : | |
00020c16 ILT |
20138 | lt_cv_shlibpath_overrides_runpath=yes |
20139 | fi | |
da0f6381 | 20140 | fi |
5213506e RW |
20141 | rm -f core conftest.err conftest.$ac_objext \ |
20142 | conftest$ac_exeext conftest.$ac_ext | |
00020c16 ILT |
20143 | LDFLAGS=$save_LDFLAGS |
20144 | libdir=$save_libdir | |
da0f6381 PB |
20145 | |
20146 | fi | |
20147 | ||
00020c16 | 20148 | shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath |
da0f6381 | 20149 | |
00020c16 ILT |
20150 | # This implies no fast_install, which is unacceptable. |
20151 | # Some rework will be needed to allow for fast_install | |
20152 | # before this can be enabled. | |
20153 | hardcode_into_libs=yes | |
da0f6381 | 20154 | |
00020c16 ILT |
20155 | # Append ld.so.conf contents to the search path |
20156 | if test -f /etc/ld.so.conf; then | |
43e02a8a | 20157 | lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` |
00020c16 ILT |
20158 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" |
20159 | fi | |
da0f6381 | 20160 | |
00020c16 ILT |
20161 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
20162 | # powerpc, because MkLinux only supported shared libraries with the | |
20163 | # GNU dynamic linker. Since this was broken with cross compilers, | |
20164 | # most powerpc-linux boxes support dynamic linking these days and | |
20165 | # people can always --disable-shared, the test was removed, and we | |
20166 | # assume the GNU/Linux dynamic linker is in use. | |
20167 | dynamic_linker='GNU/Linux ld.so' | |
20168 | ;; | |
da0f6381 | 20169 | |
00020c16 ILT |
20170 | netbsd*) |
20171 | version_type=sunos | |
20172 | need_lib_prefix=no | |
20173 | need_version=no | |
20174 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
20175 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
20176 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
20177 | dynamic_linker='NetBSD (a.out) ld.so' | |
20178 | else | |
20179 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
20180 | soname_spec='${libname}${release}${shared_ext}$major' | |
20181 | dynamic_linker='NetBSD ld.elf_so' | |
20182 | fi | |
20183 | shlibpath_var=LD_LIBRARY_PATH | |
20184 | shlibpath_overrides_runpath=yes | |
20185 | hardcode_into_libs=yes | |
20186 | ;; | |
da0f6381 | 20187 | |
00020c16 ILT |
20188 | newsos6) |
20189 | version_type=linux | |
20190 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20191 | shlibpath_var=LD_LIBRARY_PATH | |
20192 | shlibpath_overrides_runpath=yes | |
20193 | ;; | |
da0f6381 | 20194 | |
00020c16 ILT |
20195 | *nto* | *qnx*) |
20196 | version_type=qnx | |
20197 | need_lib_prefix=no | |
20198 | need_version=no | |
20199 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20200 | soname_spec='${libname}${release}${shared_ext}$major' | |
20201 | shlibpath_var=LD_LIBRARY_PATH | |
20202 | shlibpath_overrides_runpath=no | |
20203 | hardcode_into_libs=yes | |
20204 | dynamic_linker='ldqnx.so' | |
20205 | ;; | |
da0f6381 | 20206 | |
00020c16 ILT |
20207 | openbsd*) |
20208 | version_type=sunos | |
20209 | sys_lib_dlsearch_path_spec="/usr/lib" | |
20210 | need_lib_prefix=no | |
20211 | # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | |
20212 | case $host_os in | |
20213 | openbsd3.3 | openbsd3.3.*) need_version=yes ;; | |
20214 | *) need_version=no ;; | |
da0f6381 | 20215 | esac |
00020c16 ILT |
20216 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
20217 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
20218 | shlibpath_var=LD_LIBRARY_PATH | |
20219 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
20220 | case $host_os in | |
20221 | openbsd2.[89] | openbsd2.[89].*) | |
20222 | shlibpath_overrides_runpath=no | |
20223 | ;; | |
20224 | *) | |
20225 | shlibpath_overrides_runpath=yes | |
20226 | ;; | |
20227 | esac | |
da0f6381 | 20228 | else |
00020c16 | 20229 | shlibpath_overrides_runpath=yes |
da0f6381 | 20230 | fi |
00020c16 | 20231 | ;; |
da0f6381 | 20232 | |
00020c16 ILT |
20233 | os2*) |
20234 | libname_spec='$name' | |
20235 | shrext_cmds=".dll" | |
20236 | need_lib_prefix=no | |
20237 | library_names_spec='$libname${shared_ext} $libname.a' | |
20238 | dynamic_linker='OS/2 ld.exe' | |
20239 | shlibpath_var=LIBPATH | |
20240 | ;; | |
da0f6381 | 20241 | |
00020c16 ILT |
20242 | osf3* | osf4* | osf5*) |
20243 | version_type=osf | |
20244 | need_lib_prefix=no | |
20245 | need_version=no | |
20246 | soname_spec='${libname}${release}${shared_ext}$major' | |
20247 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20248 | shlibpath_var=LD_LIBRARY_PATH | |
20249 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
20250 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
20251 | ;; | |
da0f6381 | 20252 | |
00020c16 ILT |
20253 | rdos*) |
20254 | dynamic_linker=no | |
20255 | ;; | |
da0f6381 | 20256 | |
00020c16 ILT |
20257 | solaris*) |
20258 | version_type=linux | |
20259 | need_lib_prefix=no | |
20260 | need_version=no | |
20261 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20262 | soname_spec='${libname}${release}${shared_ext}$major' | |
20263 | shlibpath_var=LD_LIBRARY_PATH | |
20264 | shlibpath_overrides_runpath=yes | |
20265 | hardcode_into_libs=yes | |
20266 | # ldd complains unless libraries are executable | |
20267 | postinstall_cmds='chmod +x $lib' | |
20268 | ;; | |
da0f6381 | 20269 | |
00020c16 ILT |
20270 | sunos4*) |
20271 | version_type=sunos | |
20272 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
20273 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
20274 | shlibpath_var=LD_LIBRARY_PATH | |
20275 | shlibpath_overrides_runpath=yes | |
20276 | if test "$with_gnu_ld" = yes; then | |
20277 | need_lib_prefix=no | |
20278 | fi | |
20279 | need_version=yes | |
20280 | ;; | |
da0f6381 | 20281 | |
00020c16 ILT |
20282 | sysv4 | sysv4.3*) |
20283 | version_type=linux | |
20284 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20285 | soname_spec='${libname}${release}${shared_ext}$major' | |
20286 | shlibpath_var=LD_LIBRARY_PATH | |
20287 | case $host_vendor in | |
20288 | sni) | |
20289 | shlibpath_overrides_runpath=no | |
20290 | need_lib_prefix=no | |
20291 | runpath_var=LD_RUN_PATH | |
20292 | ;; | |
20293 | siemens) | |
20294 | need_lib_prefix=no | |
20295 | ;; | |
20296 | motorola) | |
20297 | need_lib_prefix=no | |
20298 | need_version=no | |
20299 | shlibpath_overrides_runpath=no | |
20300 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
20301 | ;; | |
20302 | esac | |
20303 | ;; | |
da0f6381 | 20304 | |
00020c16 ILT |
20305 | sysv4*MP*) |
20306 | if test -d /usr/nec ;then | |
20307 | version_type=linux | |
20308 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | |
20309 | soname_spec='$libname${shared_ext}.$major' | |
20310 | shlibpath_var=LD_LIBRARY_PATH | |
20311 | fi | |
20312 | ;; | |
da0f6381 | 20313 | |
00020c16 ILT |
20314 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
20315 | version_type=freebsd-elf | |
20316 | need_lib_prefix=no | |
20317 | need_version=no | |
20318 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
20319 | soname_spec='${libname}${release}${shared_ext}$major' | |
20320 | shlibpath_var=LD_LIBRARY_PATH | |
20321 | shlibpath_overrides_runpath=yes | |
20322 | hardcode_into_libs=yes | |
20323 | if test "$with_gnu_ld" = yes; then | |
20324 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | |
da0f6381 | 20325 | else |
00020c16 ILT |
20326 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' |
20327 | case $host_os in | |
20328 | sco3.2v5*) | |
20329 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | |
20330 | ;; | |
da0f6381 | 20331 | esac |
da0f6381 | 20332 | fi |
00020c16 ILT |
20333 | sys_lib_dlsearch_path_spec='/usr/lib' |
20334 | ;; | |
da0f6381 | 20335 | |
00020c16 ILT |
20336 | tpf*) |
20337 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | |
20338 | version_type=linux | |
20339 | need_lib_prefix=no | |
20340 | need_version=no | |
20341 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20342 | shlibpath_var=LD_LIBRARY_PATH | |
20343 | shlibpath_overrides_runpath=no | |
20344 | hardcode_into_libs=yes | |
20345 | ;; | |
da0f6381 | 20346 | |
00020c16 ILT |
20347 | uts4*) |
20348 | version_type=linux | |
20349 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
20350 | soname_spec='${libname}${release}${shared_ext}$major' | |
20351 | shlibpath_var=LD_LIBRARY_PATH | |
20352 | ;; | |
da0f6381 | 20353 | |
00020c16 ILT |
20354 | *) |
20355 | dynamic_linker=no | |
20356 | ;; | |
20357 | esac | |
5213506e RW |
20358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 |
20359 | $as_echo "$dynamic_linker" >&6; } | |
00020c16 | 20360 | test "$dynamic_linker" = no && can_build_shared=no |
da0f6381 | 20361 | |
00020c16 ILT |
20362 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
20363 | if test "$GCC" = yes; then | |
20364 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
20365 | fi | |
da0f6381 | 20366 | |
00020c16 ILT |
20367 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then |
20368 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | |
20369 | fi | |
20370 | if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then | |
20371 | sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | |
20372 | fi | |
da0f6381 | 20373 | |
da0f6381 | 20374 | |
da0f6381 | 20375 | |
da0f6381 | 20376 | |
da0f6381 | 20377 | |
da0f6381 PB |
20378 | |
20379 | ||
da0f6381 | 20380 | |
da0f6381 | 20381 | |
da0f6381 | 20382 | |
da0f6381 PB |
20383 | |
20384 | ||
20385 | ||
20386 | ||
20387 | ||
20388 | ||
20389 | ||
20390 | ||
20391 | ||
20392 | ||
20393 | ||
20394 | ||
20395 | ||
20396 | ||
20397 | ||
20398 | ||
20399 | ||
da0f6381 PB |
20400 | |
20401 | ||
20402 | ||
20403 | ||
20404 | ||
20405 | ||
43e02a8a RW |
20406 | |
20407 | ||
da0f6381 PB |
20408 | |
20409 | ||
20410 | ||
5213506e RW |
20411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 |
20412 | $as_echo_n "checking how to hardcode library paths into programs... " >&6; } | |
00020c16 ILT |
20413 | hardcode_action_CXX= |
20414 | if test -n "$hardcode_libdir_flag_spec_CXX" || | |
20415 | test -n "$runpath_var_CXX" || | |
20416 | test "X$hardcode_automatic_CXX" = "Xyes" ; then | |
da0f6381 | 20417 | |
00020c16 ILT |
20418 | # We can hardcode non-existent directories. |
20419 | if test "$hardcode_direct_CXX" != no && | |
20420 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
20421 | # have to relink, otherwise we might link with an installed library | |
20422 | # when we should be linking with a yet-to-be-installed one | |
20423 | ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && | |
20424 | test "$hardcode_minus_L_CXX" != no; then | |
20425 | # Linking always hardcodes the temporary library directory. | |
20426 | hardcode_action_CXX=relink | |
20427 | else | |
20428 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
20429 | hardcode_action_CXX=immediate | |
20430 | fi | |
20431 | else | |
20432 | # We cannot hardcode anything, or else we can only hardcode existing | |
20433 | # directories. | |
20434 | hardcode_action_CXX=unsupported | |
20435 | fi | |
5213506e RW |
20436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 |
20437 | $as_echo "$hardcode_action_CXX" >&6; } | |
da0f6381 | 20438 | |
00020c16 ILT |
20439 | if test "$hardcode_action_CXX" = relink || |
20440 | test "$inherit_rpath_CXX" = yes; then | |
20441 | # Fast installation is not supported | |
20442 | enable_fast_install=no | |
20443 | elif test "$shlibpath_overrides_runpath" = yes || | |
20444 | test "$enable_shared" = no; then | |
20445 | # Fast installation is not necessary | |
20446 | enable_fast_install=needless | |
20447 | fi | |
da0f6381 | 20448 | |
da0f6381 | 20449 | |
da0f6381 | 20450 | |
da0f6381 | 20451 | |
da0f6381 | 20452 | |
da0f6381 PB |
20453 | |
20454 | ||
00020c16 | 20455 | fi # test -n "$compiler" |
da0f6381 | 20456 | |
00020c16 ILT |
20457 | CC=$lt_save_CC |
20458 | LDCXX=$LD | |
20459 | LD=$lt_save_LD | |
20460 | GCC=$lt_save_GCC | |
20461 | with_gnu_ld=$lt_save_with_gnu_ld | |
20462 | lt_cv_path_LDCXX=$lt_cv_path_LD | |
20463 | lt_cv_path_LD=$lt_save_path_LD | |
20464 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | |
20465 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | |
20466 | fi # test "$_lt_caught_CXX_error" != yes | |
da0f6381 | 20467 | |
da0f6381 PB |
20468 | ac_ext=c |
20469 | ac_cpp='$CPP $CPPFLAGS' | |
20470 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
20471 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
20472 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
20473 | ||
da0f6381 PB |
20474 | |
20475 | ||
20476 | ||
20477 | ||
20478 | ||
20479 | ||
20480 | ||
20481 | ||
20482 | ||
20483 | ||
20484 | ||
20485 | ||
20486 | ||
20487 | ||
20488 | ||
20489 | # Only expand once: | |
20490 | ||
20491 | ||
20492 | ||
20493 | ||
20494 | ||
20495 | # Identify the assembler which will work hand-in-glove with the newly | |
20496 | # built GCC, so that we can examine its features. This is the assembler | |
20497 | # which will be driven by the driver program. | |
20498 | # | |
20499 | # If build != host, and we aren't building gas in-tree, we identify a | |
20500 | # build->target assembler and hope that it will have the same features | |
20501 | # as the host->target assembler we'll be using. | |
20502 | gcc_cv_gas_major_version= | |
20503 | gcc_cv_gas_minor_version= | |
20504 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas | |
20505 | ||
5213506e RW |
20506 | if test "${gcc_cv_as+set}" = set; then : |
20507 | ||
da0f6381 PB |
20508 | else |
20509 | ||
20510 | if test -x "$DEFAULT_ASSEMBLER"; then | |
20511 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
20512 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ | |
20513 | && test -f ../gas/Makefile \ | |
20514 | && test x$build = x$host; then | |
20515 | gcc_cv_as=../gas/as-new$build_exeext | |
20516 | elif test -x as$build_exeext; then | |
20517 | # Build using assembler in the current directory. | |
20518 | gcc_cv_as=./as$build_exeext | |
20519 | elif test -x $AS_FOR_TARGET; then | |
20520 | gcc_cv_as="$AS_FOR_TARGET" | |
20521 | else | |
20522 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
20523 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20525 | $as_echo_n "checking for $ac_word... " >&6; } | |
20526 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then : | |
20527 | $as_echo_n "(cached) " >&6 | |
da0f6381 PB |
20528 | else |
20529 | case $gcc_cv_as in | |
20530 | [\\/]* | ?:[\\/]*) | |
20531 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
20532 | ;; | |
20533 | *) | |
20534 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20535 | for as_dir in $PATH | |
20536 | do | |
20537 | IFS=$as_save_IFS | |
20538 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20539 | for ac_exec_ext in '' $ac_executable_extensions; do |
20540 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
da0f6381 | 20541 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20542 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
da0f6381 PB |
20543 | break 2 |
20544 | fi | |
20545 | done | |
5213506e RW |
20546 | done |
20547 | IFS=$as_save_IFS | |
da0f6381 PB |
20548 | |
20549 | ;; | |
20550 | esac | |
20551 | fi | |
20552 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
da0f6381 | 20553 | if test -n "$gcc_cv_as"; then |
5213506e RW |
20554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5 |
20555 | $as_echo "$gcc_cv_as" >&6; } | |
da0f6381 | 20556 | else |
5213506e RW |
20557 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20558 | $as_echo "no" >&6; } | |
da0f6381 PB |
20559 | fi |
20560 | ||
5213506e | 20561 | |
da0f6381 PB |
20562 | fi |
20563 | fi | |
20564 | ||
da0f6381 PB |
20565 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as |
20566 | ||
20567 | case "$ORIGINAL_AS_FOR_TARGET" in | |
20568 | ./as | ./as$build_exeext) ;; | |
5213506e | 20569 | *) ac_config_files="$ac_config_files as:exec-tool.in" |
da0f6381 PB |
20570 | ;; |
20571 | esac | |
20572 | ||
5213506e RW |
20573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5 |
20574 | $as_echo_n "checking what assembler to use... " >&6; } | |
da0f6381 PB |
20575 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then |
20576 | # Single tree build which includes gas. We want to prefer it | |
20577 | # over whatever linker top-level may have detected, since | |
20578 | # we'll use what we're building after installation anyway. | |
5213506e RW |
20579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5 |
20580 | $as_echo "newly built gas" >&6; } | |
da0f6381 PB |
20581 | in_tree_gas=yes |
20582 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
20583 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
20584 | $gcc_cv_as_gas_srcdir/configure \ | |
20585 | $gcc_cv_as_gas_srcdir/configure.in \ | |
20586 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
20587 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
20588 | if test x$gcc_cv_gas_version != x; then | |
20589 | break | |
20590 | fi | |
20591 | done | |
20592 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
20593 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
20594 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
20595 | case $gcc_cv_gas_patch_version in | |
20596 | "") gcc_cv_gas_patch_version="0" ;; | |
20597 | esac | |
20598 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ | |
20599 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
20600 | + $gcc_cv_gas_patch_version` | |
20601 | ||
20602 | in_tree_gas_is_elf=no | |
20603 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
20604 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
20605 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
20606 | then | |
20607 | in_tree_gas_is_elf=yes | |
20608 | fi | |
20609 | else | |
5213506e RW |
20610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5 |
20611 | $as_echo "$gcc_cv_as" >&6; } | |
da0f6381 PB |
20612 | in_tree_gas=no |
20613 | fi | |
20614 | ||
20615 | # Identify the linker which will work hand-in-glove with the newly | |
20616 | # built GCC, so that we can examine its features. This is the linker | |
20617 | # which will be driven by the driver program. | |
20618 | # | |
20619 | # If build != host, and we aren't building gas in-tree, we identify a | |
20620 | # build->target linker and hope that it will have the same features | |
20621 | # as the host->target linker we'll be using. | |
20622 | gcc_cv_gld_major_version= | |
20623 | gcc_cv_gld_minor_version= | |
20624 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
20625 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
20626 | ||
5213506e RW |
20627 | if test "${gcc_cv_ld+set}" = set; then : |
20628 | ||
da0f6381 PB |
20629 | else |
20630 | ||
20631 | if test -x "$DEFAULT_LINKER"; then | |
20632 | gcc_cv_ld="$DEFAULT_LINKER" | |
20633 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
20634 | && test -f ../ld/Makefile \ | |
20635 | && test x$build = x$host; then | |
20636 | gcc_cv_ld=../ld/ld-new$build_exeext | |
e8b05380 PB |
20637 | elif test -x collect-ld$build_exeext; then |
20638 | # Build using linker in the current directory. | |
20639 | gcc_cv_ld=./collect-ld$build_exeext | |
20640 | elif test -x $LD_FOR_TARGET; then | |
20641 | gcc_cv_ld="$LD_FOR_TARGET" | |
20642 | else | |
20643 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
20644 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20646 | $as_echo_n "checking for $ac_word... " >&6; } | |
20647 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then : | |
20648 | $as_echo_n "(cached) " >&6 | |
d739199a | 20649 | else |
e8b05380 | 20650 | case $gcc_cv_ld in |
d739199a | 20651 | [\\/]* | ?:[\\/]*) |
e8b05380 | 20652 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
20653 | ;; |
20654 | *) | |
20655 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20656 | for as_dir in $PATH | |
20657 | do | |
20658 | IFS=$as_save_IFS | |
20659 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20660 | for ac_exec_ext in '' $ac_executable_extensions; do |
20661 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e8b05380 | 20662 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20663 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
d739199a DJ |
20664 | break 2 |
20665 | fi | |
20666 | done | |
5213506e RW |
20667 | done |
20668 | IFS=$as_save_IFS | |
d739199a DJ |
20669 | |
20670 | ;; | |
20671 | esac | |
20672 | fi | |
e8b05380 | 20673 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
e8b05380 | 20674 | if test -n "$gcc_cv_ld"; then |
5213506e RW |
20675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5 |
20676 | $as_echo "$gcc_cv_ld" >&6; } | |
d739199a | 20677 | else |
5213506e RW |
20678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20679 | $as_echo "no" >&6; } | |
d739199a DJ |
20680 | fi |
20681 | ||
5213506e | 20682 | |
d739199a | 20683 | fi |
e8b05380 PB |
20684 | fi |
20685 | ||
5938f74d L |
20686 | ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld |
20687 | PLUGIN_LD=`basename $gcc_cv_ld` | |
20688 | ||
20689 | # Check whether --with-plugin-ld was given. | |
20690 | if test "${with_plugin_ld+set}" = set; then : | |
20691 | withval=$with_plugin_ld; if test x"$withval" != x; then | |
20692 | ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval" | |
20693 | PLUGIN_LD="$withval" | |
20694 | fi | |
20695 | fi | |
20696 | ||
20697 | ||
20698 | ||
20699 | cat >>confdefs.h <<_ACEOF | |
20700 | #define PLUGIN_LD "$PLUGIN_LD" | |
20701 | _ACEOF | |
20702 | ||
20703 | ||
1dcc82c2 DK |
20704 | # Check to see if we are using gold instead of ld |
20705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gold" >&5 | |
20706 | $as_echo_n "checking whether we are using gold... " >&6; } | |
20707 | ld_is_gold=no | |
20708 | if test x$gcc_cv_ld != x; then | |
20709 | if $gcc_cv_ld --version 2>/dev/null | sed 1q \ | |
20710 | | grep "GNU gold" > /dev/null; then | |
20711 | ld_is_gold=yes | |
20712 | fi | |
20713 | fi | |
20714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5 | |
20715 | $as_echo "$ld_is_gold" >&6; } | |
20716 | ||
e8b05380 PB |
20717 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld |
20718 | ||
be0fe523 PB |
20719 | case "$ORIGINAL_LD_FOR_TARGET" in |
20720 | ./collect-ld | ./collect-ld$build_exeext) ;; | |
5213506e | 20721 | *) ac_config_files="$ac_config_files collect-ld:exec-tool.in" |
be0fe523 PB |
20722 | ;; |
20723 | esac | |
e8b05380 | 20724 | |
5213506e RW |
20725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5 |
20726 | $as_echo_n "checking what linker to use... " >&6; } | |
e8b05380 PB |
20727 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then |
20728 | # Single tree build which includes ld. We want to prefer it | |
20729 | # over whatever linker top-level may have detected, since | |
20730 | # we'll use what we're building after installation anyway. | |
5213506e RW |
20731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built ld" >&5 |
20732 | $as_echo "newly built ld" >&6; } | |
e8b05380 PB |
20733 | in_tree_ld=yes |
20734 | in_tree_ld_is_elf=no | |
20735 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
20736 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
20737 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
20738 | in_tree_ld_is_elf=yes | |
20739 | fi | |
20740 | for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in | |
20741 | do | |
20742 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
20743 | if test x$gcc_cv_gld_version != x; then | |
20744 | break | |
20745 | fi | |
20746 | done | |
20747 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
20748 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
20749 | else | |
5213506e RW |
20750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5 |
20751 | $as_echo "$gcc_cv_ld" >&6; } | |
e8b05380 PB |
20752 | in_tree_ld=no |
20753 | fi | |
20754 | ||
20755 | # Figure out what nm we will be using. | |
20756 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
5213506e RW |
20757 | if test "${gcc_cv_nm+set}" = set; then : |
20758 | ||
e8b05380 PB |
20759 | else |
20760 | ||
20761 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
20762 | && test -f ../binutils/Makefile \ |
20763 | && test x$build = x$host; then | |
e8b05380 PB |
20764 | gcc_cv_nm=../binutils/nm-new$build_exeext |
20765 | elif test -x nm$build_exeext; then | |
20766 | gcc_cv_nm=./nm$build_exeext | |
20767 | elif test -x $NM_FOR_TARGET; then | |
20768 | gcc_cv_nm="$NM_FOR_TARGET" | |
20769 | else | |
20770 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
20771 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20773 | $as_echo_n "checking for $ac_word... " >&6; } | |
20774 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then : | |
20775 | $as_echo_n "(cached) " >&6 | |
d739199a | 20776 | else |
e8b05380 | 20777 | case $gcc_cv_nm in |
d739199a | 20778 | [\\/]* | ?:[\\/]*) |
e8b05380 | 20779 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
20780 | ;; |
20781 | *) | |
20782 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20783 | for as_dir in $PATH | |
20784 | do | |
20785 | IFS=$as_save_IFS | |
20786 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20787 | for ac_exec_ext in '' $ac_executable_extensions; do |
20788 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e8b05380 | 20789 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20790 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
d739199a DJ |
20791 | break 2 |
20792 | fi | |
20793 | done | |
5213506e RW |
20794 | done |
20795 | IFS=$as_save_IFS | |
d739199a DJ |
20796 | |
20797 | ;; | |
20798 | esac | |
20799 | fi | |
e8b05380 | 20800 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
e8b05380 | 20801 | if test -n "$gcc_cv_nm"; then |
5213506e RW |
20802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5 |
20803 | $as_echo "$gcc_cv_nm" >&6; } | |
d739199a | 20804 | else |
5213506e RW |
20805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20806 | $as_echo "no" >&6; } | |
d739199a DJ |
20807 | fi |
20808 | ||
5213506e | 20809 | |
d739199a | 20810 | fi |
e8b05380 | 20811 | fi |
d739199a | 20812 | |
5213506e RW |
20813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what nm to use" >&5 |
20814 | $as_echo_n "checking what nm to use... " >&6; } | |
e8b05380 PB |
20815 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then |
20816 | # Single tree build which includes binutils. | |
5213506e RW |
20817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built nm" >&5 |
20818 | $as_echo "newly built nm" >&6; } | |
e8b05380 PB |
20819 | in_tree_nm=yes |
20820 | else | |
5213506e RW |
20821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5 |
20822 | $as_echo "$gcc_cv_nm" >&6; } | |
e8b05380 PB |
20823 | in_tree_nm=no |
20824 | fi | |
20825 | ||
20826 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
20827 | ||
be0fe523 PB |
20828 | case "$ORIGINAL_NM_FOR_TARGET" in |
20829 | ./nm | ./nm$build_exeext) ;; | |
5213506e | 20830 | *) ac_config_files="$ac_config_files nm:exec-tool.in" |
be0fe523 PB |
20831 | ;; |
20832 | esac | |
20833 | ||
e8b05380 PB |
20834 | |
20835 | # Figure out what objdump we will be using. | |
5213506e RW |
20836 | if test "${gcc_cv_objdump+set}" = set; then : |
20837 | ||
e8b05380 PB |
20838 | else |
20839 | ||
20840 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
20841 | && test -f ../binutils/Makefile \ |
20842 | && test x$build = x$host; then | |
e8b05380 PB |
20843 | # Single tree build which includes binutils. |
20844 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
20845 | elif test -x objdump$build_exeext; then | |
20846 | gcc_cv_objdump=./objdump$build_exeext | |
20847 | elif test -x $OBJDUMP_FOR_TARGET; then | |
20848 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
20849 | else | |
20850 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
20851 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
5213506e RW |
20852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20853 | $as_echo_n "checking for $ac_word... " >&6; } | |
20854 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then : | |
20855 | $as_echo_n "(cached) " >&6 | |
9f18db39 | 20856 | else |
e8b05380 | 20857 | case $gcc_cv_objdump in |
9f18db39 | 20858 | [\\/]* | ?:[\\/]*) |
e8b05380 | 20859 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
20860 | ;; |
20861 | *) | |
20862 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 20863 | for as_dir in $PATH |
9f18db39 PB |
20864 | do |
20865 | IFS=$as_save_IFS | |
20866 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20867 | for ac_exec_ext in '' $ac_executable_extensions; do |
20868 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e8b05380 | 20869 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20870 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
9f18db39 PB |
20871 | break 2 |
20872 | fi | |
20873 | done | |
5213506e RW |
20874 | done |
20875 | IFS=$as_save_IFS | |
779243f7 | 20876 | |
9f18db39 PB |
20877 | ;; |
20878 | esac | |
20879 | fi | |
e8b05380 | 20880 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
e8b05380 | 20881 | if test -n "$gcc_cv_objdump"; then |
5213506e RW |
20882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5 |
20883 | $as_echo "$gcc_cv_objdump" >&6; } | |
9f18db39 | 20884 | else |
5213506e RW |
20885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20886 | $as_echo "no" >&6; } | |
9f18db39 PB |
20887 | fi |
20888 | ||
5213506e | 20889 | |
e8b05380 PB |
20890 | fi |
20891 | fi | |
9f18db39 | 20892 | |
5213506e RW |
20893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what objdump to use" >&5 |
20894 | $as_echo_n "checking what objdump to use... " >&6; } | |
e8b05380 PB |
20895 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then |
20896 | # Single tree build which includes binutils. | |
5213506e RW |
20897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built objdump" >&5 |
20898 | $as_echo "newly built objdump" >&6; } | |
e8b05380 | 20899 | elif test x$gcc_cv_objdump = x; then |
5213506e RW |
20900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 |
20901 | $as_echo "not found" >&6; } | |
e8b05380 | 20902 | else |
5213506e RW |
20903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5 |
20904 | $as_echo "$gcc_cv_objdump" >&6; } | |
a2eafc76 | 20905 | fi |
3cae5780 | 20906 | |
6e97481b | 20907 | # Figure out what readelf we will be using. |
5213506e RW |
20908 | if test "${gcc_cv_readelf+set}" = set; then : |
20909 | ||
6e97481b JJ |
20910 | else |
20911 | ||
20912 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
20913 | && test -f ../binutils/Makefile \ | |
20914 | && test x$build = x$host; then | |
20915 | # Single tree build which includes binutils. | |
20916 | gcc_cv_readelf=../binutils/readelf$build_exeext | |
20917 | elif test -x readelf$build_exeext; then | |
20918 | gcc_cv_readelf=./readelf$build_exeext | |
20919 | else | |
20920 | # Extract the first word of "readelf", so it can be a program name with args. | |
20921 | set dummy readelf; ac_word=$2 | |
5213506e RW |
20922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
20923 | $as_echo_n "checking for $ac_word... " >&6; } | |
20924 | if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then : | |
20925 | $as_echo_n "(cached) " >&6 | |
6e97481b JJ |
20926 | else |
20927 | case $gcc_cv_readelf in | |
20928 | [\\/]* | ?:[\\/]*) | |
20929 | ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path. | |
20930 | ;; | |
20931 | *) | |
20932 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20933 | for as_dir in $PATH | |
20934 | do | |
20935 | IFS=$as_save_IFS | |
20936 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
20937 | for ac_exec_ext in '' $ac_executable_extensions; do |
20938 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6e97481b | 20939 | ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext" |
5213506e | 20940 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
6e97481b JJ |
20941 | break 2 |
20942 | fi | |
20943 | done | |
5213506e RW |
20944 | done |
20945 | IFS=$as_save_IFS | |
6e97481b JJ |
20946 | |
20947 | ;; | |
20948 | esac | |
20949 | fi | |
20950 | gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf | |
6e97481b | 20951 | if test -n "$gcc_cv_readelf"; then |
5213506e RW |
20952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5 |
20953 | $as_echo "$gcc_cv_readelf" >&6; } | |
6e97481b | 20954 | else |
5213506e RW |
20955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
20956 | $as_echo "no" >&6; } | |
6e97481b JJ |
20957 | fi |
20958 | ||
5213506e | 20959 | |
6e97481b JJ |
20960 | fi |
20961 | fi | |
20962 | ||
5213506e RW |
20963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5 |
20964 | $as_echo_n "checking what readelf to use... " >&6; } | |
6e97481b JJ |
20965 | if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then |
20966 | # Single tree build which includes binutils. | |
5213506e RW |
20967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" >&5 |
20968 | $as_echo "newly built readelf" >&6; } | |
6e97481b | 20969 | elif test x$gcc_cv_readelf = x; then |
5213506e RW |
20970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 |
20971 | $as_echo "not found" >&6; } | |
6e97481b | 20972 | else |
5213506e RW |
20973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5 |
20974 | $as_echo "$gcc_cv_readelf" >&6; } | |
6e97481b JJ |
20975 | fi |
20976 | ||
981d4858 | 20977 | # Figure out what assembler alignment features are present. |
e0b0fd74 L |
20978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5 |
20979 | $as_echo_n "checking assembler flags... " >&6; } | |
20980 | if test "${gcc_cv_as_flags+set}" = set; then : | |
20981 | $as_echo_n "(cached) " >&6 | |
20982 | else | |
20983 | case "$target" in | |
20984 | i[34567]86-*-linux*) | |
20985 | gcc_cv_as_flags="--32" | |
20986 | ;; | |
20987 | *) | |
20988 | gcc_cv_as_flags=" " | |
20989 | ;; | |
20990 | esac | |
20991 | fi | |
20992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_flags" >&5 | |
20993 | $as_echo "$gcc_cv_as_flags" >&6; } | |
20994 | ||
5213506e RW |
20995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .balign and .p2align" >&5 |
20996 | $as_echo_n "checking assembler for .balign and .p2align... " >&6; } | |
20997 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then : | |
20998 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
20999 | else |
21000 | gcc_cv_as_balign_and_p2align=no | |
21001 | if test $in_tree_gas = yes; then | |
21002 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
21003 | then gcc_cv_as_balign_and_p2align=yes | |
21004 | fi | |
21005 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21006 | echo '.balign 4 |
8ada417f | 21007 | .p2align 2' > conftest.s |
e0b0fd74 | 21008 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21009 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21010 | (eval $ac_try) 2>&5 |
21011 | ac_status=$? | |
5213506e RW |
21012 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21013 | test $ac_status = 0; }; } | |
8ada417f ZW |
21014 | then |
21015 | gcc_cv_as_balign_and_p2align=yes | |
21016 | else | |
21017 | echo "configure: failed program was" >&5 | |
21018 | cat conftest.s >&5 | |
21019 | fi | |
21020 | rm -f conftest.o conftest.s | |
21021 | fi | |
21022 | fi | |
5213506e RW |
21023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_balign_and_p2align" >&5 |
21024 | $as_echo "$gcc_cv_as_balign_and_p2align" >&6; } | |
63cf211a | 21025 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 | 21026 | |
5213506e | 21027 | $as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h |
981d4858 | 21028 | |
ad9c4d9f NN |
21029 | fi |
21030 | ||
5213506e RW |
21031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5 |
21032 | $as_echo_n "checking assembler for .p2align with maximum skip... " >&6; } | |
21033 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then : | |
21034 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21035 | else |
21036 | gcc_cv_as_max_skip_p2align=no | |
21037 | if test $in_tree_gas = yes; then | |
21038 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
21039 | then gcc_cv_as_max_skip_p2align=yes | |
21040 | fi | |
21041 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21042 | echo '.p2align 4,,7' > conftest.s |
e0b0fd74 | 21043 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21044 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21045 | (eval $ac_try) 2>&5 |
21046 | ac_status=$? | |
5213506e RW |
21047 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21048 | test $ac_status = 0; }; } | |
8ada417f ZW |
21049 | then |
21050 | gcc_cv_as_max_skip_p2align=yes | |
21051 | else | |
21052 | echo "configure: failed program was" >&5 | |
21053 | cat conftest.s >&5 | |
21054 | fi | |
21055 | rm -f conftest.o conftest.s | |
21056 | fi | |
ad9c4d9f | 21057 | fi |
5213506e RW |
21058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_max_skip_p2align" >&5 |
21059 | $as_echo "$gcc_cv_as_max_skip_p2align" >&6; } | |
63cf211a | 21060 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 | 21061 | |
5213506e | 21062 | $as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h |
9e423e6d | 21063 | |
9e423e6d | 21064 | fi |
ad9c4d9f | 21065 | |
5213506e RW |
21066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5 |
21067 | $as_echo_n "checking assembler for .literal16... " >&6; } | |
21068 | if test "${gcc_cv_as_literal16+set}" = set; then : | |
21069 | $as_echo_n "(cached) " >&6 | |
5708d18d MS |
21070 | else |
21071 | gcc_cv_as_literal16=no | |
21072 | if test $in_tree_gas = yes; then | |
21073 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
21074 | then gcc_cv_as_literal16=yes | |
21075 | fi | |
21076 | elif test x$gcc_cv_as != x; then | |
21077 | echo '.literal16' > conftest.s | |
e0b0fd74 | 21078 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21079 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
5708d18d MS |
21080 | (eval $ac_try) 2>&5 |
21081 | ac_status=$? | |
5213506e RW |
21082 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21083 | test $ac_status = 0; }; } | |
5708d18d MS |
21084 | then |
21085 | gcc_cv_as_literal16=yes | |
21086 | else | |
21087 | echo "configure: failed program was" >&5 | |
21088 | cat conftest.s >&5 | |
21089 | fi | |
21090 | rm -f conftest.o conftest.s | |
21091 | fi | |
21092 | fi | |
5213506e RW |
21093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_literal16" >&5 |
21094 | $as_echo "$gcc_cv_as_literal16" >&6; } | |
5708d18d MS |
21095 | if test $gcc_cv_as_literal16 = yes; then |
21096 | ||
5213506e | 21097 | $as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h |
5708d18d MS |
21098 | |
21099 | fi | |
21100 | ||
5213506e RW |
21101 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5 |
21102 | $as_echo_n "checking assembler for working .subsection -1... " >&6; } | |
21103 | if test "${gcc_cv_as_subsection_m1+set}" = set; then : | |
21104 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21105 | else |
21106 | gcc_cv_as_subsection_m1=no | |
21107 | if test $in_tree_gas = yes; then | |
21108 | if test $in_tree_gas_is_elf = yes \ | |
21109 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
21110 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 21111 | fi |
8ada417f | 21112 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 21113 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
21114 | .subsection -1 |
21115 | conftest_label2: .word 0 | |
8ada417f | 21116 | .previous' > conftest.s |
e0b0fd74 | 21117 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21118 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21119 | (eval $ac_try) 2>&5 |
21120 | ac_status=$? | |
5213506e RW |
21121 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21122 | test $ac_status = 0; }; } | |
8ada417f ZW |
21123 | then |
21124 | if test x$gcc_cv_nm != x; then | |
21125 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
21126 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
21127 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
21128 | then : | |
21129 | else gcc_cv_as_subsection_m1=yes | |
21130 | fi | |
21131 | rm -f conftest.nm1 conftest.nm2 | |
21132 | fi | |
21133 | else | |
21134 | echo "configure: failed program was" >&5 | |
21135 | cat conftest.s >&5 | |
21136 | fi | |
21137 | rm -f conftest.o conftest.s | |
21138 | fi | |
981d4858 | 21139 | fi |
5213506e RW |
21140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_subsection_m1" >&5 |
21141 | $as_echo "$gcc_cv_as_subsection_m1" >&6; } | |
63cf211a | 21142 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 | 21143 | |
5213506e | 21144 | $as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h |
981d4858 | 21145 | |
d1accaa3 | 21146 | fi |
ad9c4d9f | 21147 | |
5213506e RW |
21148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5 |
21149 | $as_echo_n "checking assembler for .weak... " >&6; } | |
21150 | if test "${gcc_cv_as_weak+set}" = set; then : | |
21151 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21152 | else |
21153 | gcc_cv_as_weak=no | |
21154 | if test $in_tree_gas = yes; then | |
21155 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
21156 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 21157 | fi |
8ada417f | 21158 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 21159 | echo ' .weak foobar' > conftest.s |
e0b0fd74 | 21160 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21161 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21162 | (eval $ac_try) 2>&5 |
21163 | ac_status=$? | |
5213506e RW |
21164 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21165 | test $ac_status = 0; }; } | |
8ada417f ZW |
21166 | then |
21167 | gcc_cv_as_weak=yes | |
21168 | else | |
21169 | echo "configure: failed program was" >&5 | |
21170 | cat conftest.s >&5 | |
21171 | fi | |
21172 | rm -f conftest.o conftest.s | |
21173 | fi | |
981d4858 | 21174 | fi |
5213506e RW |
21175 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weak" >&5 |
21176 | $as_echo "$gcc_cv_as_weak" >&6; } | |
63cf211a | 21177 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 | 21178 | |
5213506e | 21179 | $as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h |
981d4858 | 21180 | |
12822146 | 21181 | fi |
ad9c4d9f | 21182 | |
5213506e RW |
21183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5 |
21184 | $as_echo_n "checking assembler for .weakref... " >&6; } | |
21185 | if test "${gcc_cv_as_weakref+set}" = set; then : | |
21186 | $as_echo_n "(cached) " >&6 | |
a0203ca7 AO |
21187 | else |
21188 | gcc_cv_as_weakref=no | |
21189 | if test $in_tree_gas = yes; then | |
21190 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
21191 | then gcc_cv_as_weakref=yes | |
21192 | fi | |
21193 | elif test x$gcc_cv_as != x; then | |
21194 | echo ' .weakref foobar, barfnot' > conftest.s | |
e0b0fd74 | 21195 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21196 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
a0203ca7 AO |
21197 | (eval $ac_try) 2>&5 |
21198 | ac_status=$? | |
5213506e RW |
21199 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21200 | test $ac_status = 0; }; } | |
a0203ca7 AO |
21201 | then |
21202 | gcc_cv_as_weakref=yes | |
21203 | else | |
21204 | echo "configure: failed program was" >&5 | |
21205 | cat conftest.s >&5 | |
21206 | fi | |
21207 | rm -f conftest.o conftest.s | |
21208 | fi | |
21209 | fi | |
5213506e RW |
21210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weakref" >&5 |
21211 | $as_echo "$gcc_cv_as_weakref" >&6; } | |
a0203ca7 AO |
21212 | if test $gcc_cv_as_weakref = yes; then |
21213 | ||
5213506e | 21214 | $as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h |
a0203ca7 AO |
21215 | |
21216 | fi | |
21217 | ||
5213506e RW |
21218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5 |
21219 | $as_echo_n "checking assembler for .nsubspa comdat... " >&6; } | |
21220 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then : | |
21221 | $as_echo_n "(cached) " >&6 | |
e41f3691 JDA |
21222 | else |
21223 | gcc_cv_as_nsubspa_comdat=no | |
21224 | if test $in_tree_gas = yes; then | |
21225 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
21226 | then gcc_cv_as_nsubspa_comdat=yes | |
21227 | fi | |
21228 | elif test x$gcc_cv_as != x; then | |
21229 | echo ' .SPACE $TEXT$ | |
21230 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
e0b0fd74 | 21231 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21232 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
e41f3691 JDA |
21233 | (eval $ac_try) 2>&5 |
21234 | ac_status=$? | |
5213506e RW |
21235 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21236 | test $ac_status = 0; }; } | |
e41f3691 JDA |
21237 | then |
21238 | gcc_cv_as_nsubspa_comdat=yes | |
21239 | else | |
21240 | echo "configure: failed program was" >&5 | |
21241 | cat conftest.s >&5 | |
21242 | fi | |
21243 | rm -f conftest.o conftest.s | |
21244 | fi | |
21245 | fi | |
5213506e RW |
21246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_nsubspa_comdat" >&5 |
21247 | $as_echo "$gcc_cv_as_nsubspa_comdat" >&6; } | |
e41f3691 JDA |
21248 | if test $gcc_cv_as_nsubspa_comdat = yes; then |
21249 | ||
5213506e | 21250 | $as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h |
e41f3691 JDA |
21251 | |
21252 | fi | |
21253 | ||
8ada417f ZW |
21254 | # .hidden needs to be supported in both the assembler and the linker, |
21255 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
21256 | # This is irritatingly difficult to feature test for; we have to check the | |
21257 | # date string after the version number. If we've got an in-tree | |
21258 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
21259 | # to be safe. | |
21260 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
5213506e RW |
21261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .hidden" >&5 |
21262 | $as_echo_n "checking assembler for .hidden... " >&6; } | |
21263 | if test "${gcc_cv_as_hidden+set}" = set; then : | |
21264 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21265 | else |
21266 | gcc_cv_as_hidden=no | |
21267 | if test $in_tree_gas = yes; then | |
21268 | if test $in_tree_gas_is_elf = yes \ | |
21269 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
21270 | then gcc_cv_as_hidden=yes | |
21271 | fi | |
21272 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21273 | echo ' .hidden foobar |
8ada417f | 21274 | foobar:' > conftest.s |
e0b0fd74 | 21275 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21276 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21277 | (eval $ac_try) 2>&5 |
21278 | ac_status=$? | |
5213506e RW |
21279 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21280 | test $ac_status = 0; }; } | |
8ada417f | 21281 | then |
ed104137 RO |
21282 | |
21283 | # Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with | |
21284 | # STV_HIDDEN, so disable .hidden support if so. | |
21285 | case "${target}" in | |
21286 | i?86-*-solaris2*) | |
21287 | if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then | |
21288 | cat > conftest.s <<EOF | |
21289 | .globl hidden | |
21290 | .hidden hidden | |
21291 | hidden: | |
21292 | .globl default | |
21293 | .set default,hidden | |
21294 | EOF | |
21295 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
21296 | && $gcc_cv_objdump -t conftest.o 2>/dev/null | \ | |
21297 | grep '\.hidden default' > /dev/null; then | |
21298 | gcc_cv_as_hidden=no | |
21299 | else | |
21300 | gcc_cv_as_hidden=yes | |
21301 | fi | |
21302 | else | |
21303 | # Assume bug is present if objdump is missing. | |
21304 | gcc_cv_as_hidden=no | |
21305 | fi | |
21306 | ;; | |
21307 | *) | |
21308 | gcc_cv_as_hidden=yes | |
21309 | ;; | |
21310 | esac | |
8ada417f ZW |
21311 | else |
21312 | echo "configure: failed program was" >&5 | |
21313 | cat conftest.s >&5 | |
21314 | fi | |
21315 | rm -f conftest.o conftest.s | |
21316 | fi | |
21317 | fi | |
5213506e RW |
21318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5 |
21319 | $as_echo "$gcc_cv_as_hidden" >&6; } | |
63cf211a | 21320 | |
ad9c4d9f | 21321 | |
10ca6198 JJ |
21322 | if test $in_tree_ld != yes ; then |
21323 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` | |
1dcc82c2 DK |
21324 | if test x"$ld_is_gold" = xyes; then |
21325 | gcc_cv_ld_hidden=yes | |
21326 | elif echo "$ld_ver" | grep GNU > /dev/null; then | |
10ca6198 JJ |
21327 | ld_vers=`echo $ld_ver | sed -n \ |
21328 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` | |
21329 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | |
21330 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
21331 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
21332 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
55c4f715 RO |
21333 | else |
21334 | case "${target}" in | |
21335 | *-*-solaris2*) | |
21336 | # | |
21337 | # Solaris 2 ld -V output looks like this for a regular version: | |
21338 | # | |
21339 | # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 | |
21340 | # | |
21341 | # but test versions add stuff at the end: | |
21342 | # | |
21343 | # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 | |
21344 | # | |
21345 | ld_ver=`$gcc_cv_ld -V 2>&1` | |
21346 | if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then | |
21347 | ld_vers=`echo $ld_ver | sed -n \ | |
21348 | -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` | |
21349 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
21350 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
21351 | fi | |
21352 | ;; | |
21353 | esac | |
10ca6198 JJ |
21354 | fi |
21355 | fi | |
21356 | ||
5213506e RW |
21357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .hidden support" >&5 |
21358 | $as_echo_n "checking linker for .hidden support... " >&6; } | |
21359 | if test "${gcc_cv_ld_hidden+set}" = set; then : | |
21360 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21361 | else |
21362 | if test $in_tree_ld = yes ; then | |
21363 | gcc_cv_ld_hidden=no | |
21364 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
21365 | && test $in_tree_ld_is_elf = yes; then | |
21366 | gcc_cv_ld_hidden=yes | |
21367 | fi | |
21368 | else | |
21369 | gcc_cv_ld_hidden=yes | |
8ada417f | 21370 | if echo "$ld_ver" | grep GNU > /dev/null; then |
8ada417f ZW |
21371 | if test 0"$ld_date" -lt 20020404; then |
21372 | if test -n "$ld_date"; then | |
21373 | # If there was date string, but was earlier than 2002-04-04, fail | |
21374 | gcc_cv_ld_hidden=no | |
21375 | elif test -z "$ld_vers"; then | |
21376 | # If there was no date string nor ld version number, something is wrong | |
21377 | gcc_cv_ld_hidden=no | |
21378 | else | |
8ada417f ZW |
21379 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
21380 | if test "$ld_vers_major" -lt 2; then | |
21381 | gcc_cv_ld_hidden=no | |
21382 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
21383 | gcc_cv_ld_hidden="no" | |
21384 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
21385 | gcc_cv_ld_hidden=no | |
c72931a6 | 21386 | fi |
8ada417f | 21387 | fi |
789b7de5 | 21388 | fi |
8ada417f | 21389 | else |
28690784 | 21390 | case "${target}" in |
b0fd7d27 | 21391 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
21392 | gcc_cv_ld_hidden=yes |
21393 | ;; | |
5e87dc23 | 21394 | *-*-solaris2.9* | *-*-solaris2.1[0-9]*) |
a93e1899 RO |
21395 | # Support for .hidden in Sun ld appeared in Solaris 9 FCS, but |
21396 | # .symbolic was only added in Solaris 9 12/02. | |
5e87dc23 RO |
21397 | gcc_cv_ld_hidden=yes |
21398 | ;; | |
28690784 JDA |
21399 | *) |
21400 | gcc_cv_ld_hidden=no | |
21401 | ;; | |
21402 | esac | |
8ada417f ZW |
21403 | fi |
21404 | fi | |
6d07784a | 21405 | fi |
5213506e RW |
21406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_hidden" >&5 |
21407 | $as_echo "$gcc_cv_ld_hidden" >&6; } | |
8ada417f | 21408 | libgcc_visibility=no |
ad9c4d9f | 21409 | |
232b67d9 | 21410 | |
8e3940b2 | 21411 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 21412 | libgcc_visibility=yes |
ba479fd2 | 21413 | |
5213506e | 21414 | $as_echo "#define HAVE_GAS_HIDDEN 1" >>confdefs.h |
ad9c4d9f NN |
21415 | |
21416 | fi | |
21417 | ||
5213506e RW |
21418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker read-only and read-write section mixing" >&5 |
21419 | $as_echo_n "checking linker read-only and read-write section mixing... " >&6; } | |
e73da78e RO |
21420 | gcc_cv_ld_ro_rw_mix=unknown |
21421 | if test $in_tree_ld = yes ; then | |
21422 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
21423 | && test $in_tree_ld_is_elf = yes; then | |
21424 | gcc_cv_ld_ro_rw_mix=read-write | |
21425 | fi | |
21426 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
21427 | echo '.section myfoosect, "a"' > conftest1.s | |
21428 | echo '.section myfoosect, "aw"' > conftest2.s | |
21429 | echo '.byte 1' >> conftest2.s | |
21430 | echo '.section myfoosect, "a"' > conftest3.s | |
21431 | echo '.byte 0' >> conftest3.s | |
21432 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
21433 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
21434 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
21435 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ | |
21436 | conftest2.o conftest3.o > /dev/null 2>&1; then | |
21437 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ | |
21438 | | sed -e '/myfoosect/!d' -e N` | |
21439 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then | |
21440 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
21441 | gcc_cv_ld_ro_rw_mix=read-only | |
21442 | else | |
21443 | gcc_cv_ld_ro_rw_mix=read-write | |
21444 | fi | |
21445 | fi | |
21446 | fi | |
21447 | rm -f conftest.* conftest[123].* | |
21448 | fi | |
21449 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
21450 | ||
5213506e | 21451 | $as_echo "#define HAVE_LD_RO_RW_SECTION_MIXING 1" >>confdefs.h |
e73da78e RO |
21452 | |
21453 | fi | |
5213506e RW |
21454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5 |
21455 | $as_echo "$gcc_cv_ld_ro_rw_mix" >&6; } | |
e73da78e | 21456 | |
8ada417f | 21457 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
5213506e RW |
21458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .sleb128 and .uleb128" >&5 |
21459 | $as_echo_n "checking assembler for .sleb128 and .uleb128... " >&6; } | |
21460 | if test "${gcc_cv_as_leb128+set}" = set; then : | |
21461 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21462 | else |
21463 | gcc_cv_as_leb128=no | |
21464 | if test $in_tree_gas = yes; then | |
21465 | if test $in_tree_gas_is_elf = yes \ | |
21466 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
21467 | then gcc_cv_as_leb128=yes | |
21468 | fi | |
21469 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21470 | echo ' .data |
b7460f24 RH |
21471 | .uleb128 L2 - L1 |
21472 | L1: | |
21473 | .uleb128 1280 | |
21474 | .sleb128 -1010 | |
8ada417f | 21475 | L2:' > conftest.s |
e0b0fd74 | 21476 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21477 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21478 | (eval $ac_try) 2>&5 |
21479 | ac_status=$? | |
5213506e RW |
21480 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21481 | test $ac_status = 0; }; } | |
8ada417f ZW |
21482 | then |
21483 | # GAS versions before 2.11 do not support uleb128, | |
21484 | # despite appearing to. | |
21485 | # ??? There exists an elf-specific test that will crash | |
21486 | # the assembler. Perhaps it's better to figure out whether | |
21487 | # arbitrary sections are supported and try the test. | |
bace148a | 21488 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f | 21489 | if echo "$as_ver" | grep GNU > /dev/null; then |
ddcd0f6f | 21490 | as_vers=`echo $as_ver | sed -n \ |
115e6e55 | 21491 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` |
ddcd0f6f BS |
21492 | as_major=`expr "$as_vers" : '\([0-9]*\)'` |
21493 | as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
21494 | if test $as_major -eq 2 && test $as_minor -lt 11 |
21495 | then : | |
21496 | else gcc_cv_as_leb128=yes | |
21497 | fi | |
21498 | fi | |
21499 | else | |
21500 | echo "configure: failed program was" >&5 | |
21501 | cat conftest.s >&5 | |
21502 | fi | |
21503 | rm -f conftest.o conftest.s | |
21504 | fi | |
b7460f24 | 21505 | fi |
5213506e RW |
21506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_leb128" >&5 |
21507 | $as_echo "$gcc_cv_as_leb128" >&6; } | |
63cf211a | 21508 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 | 21509 | |
5213506e | 21510 | $as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h |
b7460f24 RH |
21511 | |
21512 | fi | |
ad9c4d9f | 21513 | |
d4ea4622 | 21514 | # Check if we have assembler support for unwind directives. |
5213506e RW |
21515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5 |
21516 | $as_echo_n "checking assembler for cfi directives... " >&6; } | |
21517 | if test "${gcc_cv_as_cfi_directive+set}" = set; then : | |
21518 | $as_echo_n "(cached) " >&6 | |
d4ea4622 RH |
21519 | else |
21520 | gcc_cv_as_cfi_directive=no | |
6e60703f | 21521 | if test x$gcc_cv_as != x; then |
d4ea4622 RH |
21522 | echo ' .text |
21523 | .cfi_startproc | |
21524 | .cfi_offset 0, 0 | |
21525 | .cfi_same_value 1 | |
21526 | .cfi_def_cfa 1, 2 | |
21527 | .cfi_escape 1, 2, 3, 4, 5 | |
21528 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21529 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21530 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d4ea4622 RH |
21531 | (eval $ac_try) 2>&5 |
21532 | ac_status=$? | |
5213506e RW |
21533 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21534 | test $ac_status = 0; }; } | |
d4ea4622 | 21535 | then |
e73da78e RO |
21536 | case "$target" in |
21537 | *-*-solaris*) | |
21538 | # If the linker used on Solaris (like Sun ld) isn't capable of merging | |
21539 | # read-only and read-write sections, we need to make sure that the | |
21540 | # assembler used emits read-write .eh_frame sections. | |
21541 | if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then | |
21542 | if test "x$gcc_cv_objdump" != x; then | |
21543 | if $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
21544 | sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then | |
21545 | gcc_cv_as_cfi_directive=no | |
21546 | else | |
eb2573ee RO |
21547 | case "$target" in |
21548 | i?86-*-solaris2.1[0-9]*) | |
21549 | # On Solaris/x86, make sure that GCC and gas agree on using | |
21550 | # read-only .eh_frame sections for 64-bit. | |
21551 | if $gcc_cv_as --64 -o conftest.o conftest.s > /dev/null 2>&1 && \ | |
21552 | $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
21553 | sed -e /.eh_frame/!d -e N | \ | |
21554 | grep READONLY > /dev/null; then | |
21555 | gcc_cv_as_cfi_directive=yes | |
21556 | else | |
21557 | gcc_cv_as_cfi_directive=no | |
21558 | fi | |
21559 | ;; | |
21560 | *) | |
21561 | gcc_cv_as_cfi_directive=yes | |
21562 | ;; | |
21563 | esac | |
e73da78e RO |
21564 | fi |
21565 | else | |
21566 | # no objdump, err on the side of caution | |
21567 | gcc_cv_as_cfi_directive=no | |
21568 | fi | |
21569 | else | |
21570 | gcc_cv_as_cfi_directive=yes | |
21571 | fi | |
21572 | ;; | |
21573 | *-*-*) | |
21574 | gcc_cv_as_cfi_directive=yes | |
21575 | ;; | |
21576 | esac | |
d4ea4622 RH |
21577 | else |
21578 | echo "configure: failed program was" >&5 | |
21579 | cat conftest.s >&5 | |
21580 | fi | |
21581 | rm -f conftest.o conftest.s | |
21582 | fi | |
21583 | fi | |
5213506e RW |
21584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5 |
21585 | $as_echo "$gcc_cv_as_cfi_directive" >&6; } | |
d4ea4622 | 21586 | |
6e97481b | 21587 | if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_readelf != x; then |
5213506e RW |
21588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5 |
21589 | $as_echo_n "checking assembler for working cfi advance... " >&6; } | |
21590 | if test "${gcc_cv_as_cfi_advance_working+set}" = set; then : | |
21591 | $as_echo_n "(cached) " >&6 | |
6e97481b JJ |
21592 | else |
21593 | gcc_cv_as_cfi_advance_working=no | |
21594 | if test x$gcc_cv_as != x; then | |
21595 | echo ' .text | |
21596 | .cfi_startproc | |
21597 | .cfi_adjust_cfa_offset 64 | |
7ac22e17 | 21598 | .skip 75040, 0 |
6e97481b JJ |
21599 | .cfi_adjust_cfa_offset 128 |
21600 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21601 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21602 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
6e97481b JJ |
21603 | (eval $ac_try) 2>&5 |
21604 | ac_status=$? | |
5213506e RW |
21605 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21606 | test $ac_status = 0; }; } | |
6e97481b JJ |
21607 | then |
21608 | ||
21609 | if $gcc_cv_readelf -wf conftest.o 2>/dev/null \ | |
7ac22e17 | 21610 | | grep 'DW_CFA_advance_loc[24]:[ ][ ]*75040[ ]' >/dev/null; then |
6e97481b JJ |
21611 | gcc_cv_as_cfi_advance_working=yes |
21612 | fi | |
21613 | ||
21614 | else | |
21615 | echo "configure: failed program was" >&5 | |
21616 | cat conftest.s >&5 | |
21617 | fi | |
21618 | rm -f conftest.o conftest.s | |
21619 | fi | |
21620 | fi | |
5213506e RW |
21621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5 |
21622 | $as_echo "$gcc_cv_as_cfi_advance_working" >&6; } | |
6e97481b JJ |
21623 | |
21624 | else | |
66f91112 EB |
21625 | # no readelf, err on the side of caution |
21626 | gcc_cv_as_cfi_advance_working=no | |
6e97481b | 21627 | fi |
d4ea4622 RH |
21628 | |
21629 | cat >>confdefs.h <<_ACEOF | |
6e97481b JJ |
21630 | #define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \ |
21631 | && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi` | |
d4ea4622 RH |
21632 | _ACEOF |
21633 | ||
21634 | ||
5213506e RW |
21635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi personality directive" >&5 |
21636 | $as_echo_n "checking assembler for cfi personality directive... " >&6; } | |
21637 | if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then : | |
21638 | $as_echo_n "(cached) " >&6 | |
058514b3 RH |
21639 | else |
21640 | gcc_cv_as_cfi_personality_directive=no | |
6e60703f | 21641 | if test x$gcc_cv_as != x; then |
058514b3 | 21642 | echo ' .text |
042628f9 | 21643 | .cfi_startproc |
058514b3 RH |
21644 | .cfi_personality 0, symbol |
21645 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21646 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21647 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
058514b3 RH |
21648 | (eval $ac_try) 2>&5 |
21649 | ac_status=$? | |
5213506e RW |
21650 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21651 | test $ac_status = 0; }; } | |
058514b3 RH |
21652 | then |
21653 | gcc_cv_as_cfi_personality_directive=yes | |
21654 | else | |
21655 | echo "configure: failed program was" >&5 | |
21656 | cat conftest.s >&5 | |
21657 | fi | |
21658 | rm -f conftest.o conftest.s | |
21659 | fi | |
21660 | fi | |
5213506e RW |
21661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_personality_directive" >&5 |
21662 | $as_echo "$gcc_cv_as_cfi_personality_directive" >&6; } | |
058514b3 RH |
21663 | |
21664 | ||
21665 | cat >>confdefs.h <<_ACEOF | |
21666 | #define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes; | |
21667 | then echo 1; else echo 0; fi` | |
21668 | _ACEOF | |
21669 | ||
21670 | ||
7d45fb94 JJ |
21671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi sections directive" >&5 |
21672 | $as_echo_n "checking assembler for cfi sections directive... " >&6; } | |
21673 | if test "${gcc_cv_as_cfi_sections_directive+set}" = set; then : | |
21674 | $as_echo_n "(cached) " >&6 | |
21675 | else | |
21676 | gcc_cv_as_cfi_sections_directive=no | |
21677 | if test x$gcc_cv_as != x; then | |
21678 | echo ' .text | |
21679 | .cfi_sections .debug_frame, .eh_frame | |
21680 | .cfi_startproc | |
21681 | .cfi_endproc' > conftest.s | |
e0b0fd74 | 21682 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
7d45fb94 JJ |
21683 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
21684 | (eval $ac_try) 2>&5 | |
21685 | ac_status=$? | |
21686 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
21687 | test $ac_status = 0; }; } | |
21688 | then | |
21689 | gcc_cv_as_cfi_sections_directive=yes | |
21690 | else | |
21691 | echo "configure: failed program was" >&5 | |
21692 | cat conftest.s >&5 | |
21693 | fi | |
21694 | rm -f conftest.o conftest.s | |
21695 | fi | |
21696 | fi | |
21697 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_sections_directive" >&5 | |
21698 | $as_echo "$gcc_cv_as_cfi_sections_directive" >&6; } | |
21699 | ||
21700 | ||
21701 | cat >>confdefs.h <<_ACEOF | |
21702 | #define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes; | |
21703 | then echo 1; else echo 0; fi` | |
21704 | _ACEOF | |
21705 | ||
21706 | ||
8ada417f ZW |
21707 | # GAS versions up to and including 2.11.0 may mis-optimize |
21708 | # .eh_frame data. | |
5213506e RW |
21709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for eh_frame optimization" >&5 |
21710 | $as_echo_n "checking assembler for eh_frame optimization... " >&6; } | |
21711 | if test "${gcc_cv_as_eh_frame+set}" = set; then : | |
21712 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21713 | else |
21714 | gcc_cv_as_eh_frame=no | |
21715 | if test $in_tree_gas = yes; then | |
21716 | if test $in_tree_gas_is_elf = yes \ | |
21717 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
21718 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 21719 | fi |
8ada417f | 21720 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 21721 | echo ' .text |
c64688ae RH |
21722 | .LFB1: |
21723 | .4byte 0 | |
21724 | .L1: | |
21725 | .4byte 0 | |
21726 | .LFE1: | |
21727 | .section .eh_frame,"aw",@progbits | |
21728 | __FRAME_BEGIN__: | |
21729 | .4byte .LECIE1-.LSCIE1 | |
21730 | .LSCIE1: | |
21731 | .4byte 0x0 | |
21732 | .byte 0x1 | |
21733 | .ascii "z\0" | |
21734 | .byte 0x1 | |
21735 | .byte 0x78 | |
21736 | .byte 0x1a | |
21737 | .byte 0x0 | |
21738 | .byte 0x4 | |
21739 | .4byte 1 | |
21740 | .p2align 1 | |
21741 | .LECIE1: | |
21742 | .LSFDE1: | |
21743 | .4byte .LEFDE1-.LASFDE1 | |
21744 | .LASFDE1: | |
21745 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
21746 | .4byte .LFB1 | |
21747 | .4byte .LFE1-.LFB1 | |
21748 | .byte 0x4 | |
21749 | .4byte .LFE1-.LFB1 | |
21750 | .byte 0x4 | |
21751 | .4byte .L1-.LFB1 | |
8ada417f | 21752 | .LEFDE1:' > conftest.s |
e0b0fd74 | 21753 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 21754 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21755 | (eval $ac_try) 2>&5 |
21756 | ac_status=$? | |
5213506e RW |
21757 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21758 | test $ac_status = 0; }; } | |
8ada417f ZW |
21759 | then |
21760 | cat > conftest.lit <<EOF | |
c64688ae RH |
21761 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
21762 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 21763 | 0020 08000000 04080000 0044 .........D |
01efb963 | 21764 | EOF |
ba479fd2 | 21765 | cat > conftest.big <<EOF |
01efb963 AS |
21766 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
21767 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 21768 | 0020 00000008 04000000 0844 .........D |
c64688ae | 21769 | EOF |
8ada417f ZW |
21770 | # If the assembler didn't choke, and we can objdump, |
21771 | # and we got the correct data, then succeed. | |
dbc02e7f AS |
21772 | # The text in the here-document typically retains its unix-style line |
21773 | # endings, while the output of objdump will use host line endings. | |
21774 | # Therefore, use diff -b for the comparisons. | |
8ada417f ZW |
21775 | if test x$gcc_cv_objdump != x \ |
21776 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
21777 | | tail -3 > conftest.got \ | |
dbc02e7f AS |
21778 | && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ |
21779 | || diff -b conftest.big conftest.got > /dev/null 2>&1; } | |
8ada417f ZW |
21780 | then |
21781 | gcc_cv_as_eh_frame=yes | |
ba479fd2 | 21782 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
5213506e | 21783 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21784 | (eval $ac_try) 2>&5 |
21785 | ac_status=$? | |
5213506e RW |
21786 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21787 | test $ac_status = 0; }; }; then | |
8ada417f ZW |
21788 | gcc_cv_as_eh_frame=buggy |
21789 | else | |
21790 | # Uh oh, what do we do now? | |
21791 | gcc_cv_as_eh_frame=no | |
21792 | fi | |
21793 | else | |
21794 | echo "configure: failed program was" >&5 | |
21795 | cat conftest.s >&5 | |
21796 | fi | |
21797 | rm -f conftest.o conftest.s | |
21798 | fi | |
c64688ae | 21799 | fi |
5213506e RW |
21800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_eh_frame" >&5 |
21801 | $as_echo "$gcc_cv_as_eh_frame" >&6; } | |
ad9c4d9f | 21802 | |
6e3f3080 | 21803 | |
63cf211a | 21804 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 | 21805 | |
5213506e | 21806 | $as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h |
ad9c4d9f NN |
21807 | |
21808 | fi | |
21809 | ||
5213506e RW |
21810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5 |
21811 | $as_echo_n "checking assembler for section merging support... " >&6; } | |
21812 | if test "${gcc_cv_as_shf_merge+set}" = set; then : | |
21813 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
21814 | else |
21815 | gcc_cv_as_shf_merge=no | |
21816 | if test $in_tree_gas = yes; then | |
21817 | if test $in_tree_gas_is_elf = yes \ | |
21818 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
21819 | then gcc_cv_as_shf_merge=yes | |
21820 | fi | |
21821 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 21822 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
e0b0fd74 | 21823 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21824 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
21825 | (eval $ac_try) 2>&5 |
21826 | ac_status=$? | |
5213506e RW |
21827 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21828 | test $ac_status = 0; }; } | |
8ada417f ZW |
21829 | then |
21830 | gcc_cv_as_shf_merge=yes | |
21831 | else | |
21832 | echo "configure: failed program was" >&5 | |
21833 | cat conftest.s >&5 | |
21834 | fi | |
21835 | rm -f conftest.o conftest.s | |
21836 | fi | |
201556f0 | 21837 | fi |
5213506e RW |
21838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 |
21839 | $as_echo "$gcc_cv_as_shf_merge" >&6; } | |
8ada417f | 21840 | |
c18a5b6c | 21841 | if test $gcc_cv_as_shf_merge = no; then |
5213506e RW |
21842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5 |
21843 | $as_echo_n "checking assembler for section merging support... " >&6; } | |
21844 | if test "${gcc_cv_as_shf_merge+set}" = set; then : | |
21845 | $as_echo_n "(cached) " >&6 | |
c18a5b6c MM |
21846 | else |
21847 | gcc_cv_as_shf_merge=no | |
21848 | if test $in_tree_gas = yes; then | |
21849 | if test $in_tree_gas_is_elf = yes \ | |
21850 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
21851 | then gcc_cv_as_shf_merge=yes | |
21852 | fi | |
21853 | elif test x$gcc_cv_as != x; then | |
21854 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
e0b0fd74 | 21855 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21856 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c18a5b6c MM |
21857 | (eval $ac_try) 2>&5 |
21858 | ac_status=$? | |
5213506e RW |
21859 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21860 | test $ac_status = 0; }; } | |
c18a5b6c MM |
21861 | then |
21862 | gcc_cv_as_shf_merge=yes | |
21863 | else | |
21864 | echo "configure: failed program was" >&5 | |
21865 | cat conftest.s >&5 | |
21866 | fi | |
21867 | rm -f conftest.o conftest.s | |
21868 | fi | |
21869 | fi | |
5213506e RW |
21870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 |
21871 | $as_echo "$gcc_cv_as_shf_merge" >&6; } | |
c18a5b6c MM |
21872 | |
21873 | fi | |
8ad9fb33 | 21874 | |
ba479fd2 | 21875 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 21876 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 21877 | _ACEOF |
201556f0 | 21878 | |
201556f0 | 21879 | |
5213506e RW |
21880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5 |
21881 | $as_echo_n "checking assembler for COMDAT group support... " >&6; } | |
21882 | if test "${gcc_cv_as_comdat_group+set}" = set; then : | |
21883 | $as_echo_n "(cached) " >&6 | |
c18a5b6c MM |
21884 | else |
21885 | gcc_cv_as_comdat_group=no | |
21886 | if test $in_tree_gas = yes; then | |
21887 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 21888 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
21889 | then gcc_cv_as_comdat_group=yes |
21890 | fi | |
21891 | elif test x$gcc_cv_as != x; then | |
21892 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
e0b0fd74 | 21893 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21894 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c18a5b6c MM |
21895 | (eval $ac_try) 2>&5 |
21896 | ac_status=$? | |
5213506e RW |
21897 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21898 | test $ac_status = 0; }; } | |
c18a5b6c MM |
21899 | then |
21900 | gcc_cv_as_comdat_group=yes | |
21901 | else | |
21902 | echo "configure: failed program was" >&5 | |
21903 | cat conftest.s >&5 | |
21904 | fi | |
21905 | rm -f conftest.o conftest.s | |
21906 | fi | |
21907 | fi | |
5213506e RW |
21908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5 |
21909 | $as_echo "$gcc_cv_as_comdat_group" >&6; } | |
c18a5b6c MM |
21910 | |
21911 | if test $gcc_cv_as_comdat_group = yes; then | |
21912 | gcc_cv_as_comdat_group_percent=no | |
21913 | else | |
5213506e RW |
21914 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5 |
21915 | $as_echo_n "checking assembler for COMDAT group support... " >&6; } | |
21916 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then : | |
21917 | $as_echo_n "(cached) " >&6 | |
c18a5b6c MM |
21918 | else |
21919 | gcc_cv_as_comdat_group_percent=no | |
21920 | if test $in_tree_gas = yes; then | |
21921 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 21922 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
21923 | then gcc_cv_as_comdat_group_percent=yes |
21924 | fi | |
21925 | elif test x$gcc_cv_as != x; then | |
21926 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
e0b0fd74 | 21927 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' |
5213506e | 21928 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c18a5b6c MM |
21929 | (eval $ac_try) 2>&5 |
21930 | ac_status=$? | |
5213506e RW |
21931 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
21932 | test $ac_status = 0; }; } | |
c18a5b6c MM |
21933 | then |
21934 | gcc_cv_as_comdat_group_percent=yes | |
21935 | else | |
21936 | echo "configure: failed program was" >&5 | |
21937 | cat conftest.s >&5 | |
21938 | fi | |
21939 | rm -f conftest.o conftest.s | |
21940 | fi | |
21941 | fi | |
5213506e RW |
21942 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5 |
21943 | $as_echo "$gcc_cv_as_comdat_group_percent" >&6; } | |
c18a5b6c MM |
21944 | |
21945 | fi | |
1dcc82c2 DK |
21946 | if test x"$ld_is_gold" = xyes; then |
21947 | comdat_group=yes | |
21948 | elif test $in_tree_ld = yes ; then | |
39ba7b7d JB |
21949 | comdat_group=no |
21950 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
21951 | && test $in_tree_ld_is_elf = yes; then | |
21952 | comdat_group=yes | |
21953 | fi | |
55c4f715 | 21954 | elif echo "$ld_ver" | grep GNU > /dev/null; then |
11176d2a JB |
21955 | comdat_group=yes |
21956 | if test 0"$ld_date" -lt 20050308; then | |
21957 | if test -n "$ld_date"; then | |
21958 | # If there was date string, but was earlier than 2005-03-08, fail | |
21959 | comdat_group=no | |
21960 | elif test "$ld_vers_major" -lt 2; then | |
21961 | comdat_group=no | |
21962 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
21963 | comdat_group=no | |
21964 | fi | |
21965 | fi | |
1cf0118d | 21966 | else |
55c4f715 RO |
21967 | case "${target}" in |
21968 | *-*-solaris2.1[1-9]*) | |
21969 | # Sun ld has COMDAT group support since Solaris 9, but it doesn't | |
21970 | # interoperate with GNU as until Solaris 11 build 130, i.e. ld | |
21971 | # version 1.688. | |
21972 | # | |
21973 | # FIXME: Maybe need to refine later when COMDAT group support with | |
21974 | # Sun as is implemented. | |
21975 | if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 1688; then | |
21976 | comdat_group=yes | |
21977 | else | |
21978 | comdat_group=no | |
21979 | fi | |
21980 | ;; | |
21981 | *) | |
21982 | # Assume linkers other than GNU ld don't support COMDAT group. | |
21983 | comdat_group=no | |
21984 | ;; | |
21985 | esac | |
21986 | fi | |
21987 | # Allow overriding the automatic COMDAT group tests above. | |
21988 | # Check whether --enable-comdat was given. | |
21989 | if test "${enable_comdat+set}" = set; then : | |
21990 | enableval=$enable_comdat; comdat_group="$enable_comdat" | |
1cf0118d | 21991 | fi |
55c4f715 | 21992 | |
1cf0118d RO |
21993 | if test $comdat_group = no; then |
21994 | gcc_cv_as_comdat_group=no | |
21995 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 21996 | fi |
c18a5b6c MM |
21997 | |
21998 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 21999 | #define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi` |
c18a5b6c MM |
22000 | _ACEOF |
22001 | ||
22002 | ||
5213506e RW |
22003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for line table discriminator support" >&5 |
22004 | $as_echo_n "checking assembler for line table discriminator support... " >&6; } | |
22005 | if test "${gcc_cv_as_discriminator+set}" = set; then : | |
22006 | $as_echo_n "(cached) " >&6 | |
6c52e687 CC |
22007 | else |
22008 | gcc_cv_as_discriminator=no | |
22009 | if test $in_tree_gas = yes; then | |
22010 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 51` | |
22011 | then gcc_cv_as_discriminator=yes | |
22012 | fi | |
22013 | elif test x$gcc_cv_as != x; then | |
22014 | echo ' .text | |
22015 | .file 1 "conf.c" | |
22016 | .loc 1 1 0 discriminator 1' > conftest.s | |
e0b0fd74 | 22017 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22018 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
6c52e687 CC |
22019 | (eval $ac_try) 2>&5 |
22020 | ac_status=$? | |
5213506e RW |
22021 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22022 | test $ac_status = 0; }; } | |
6c52e687 CC |
22023 | then |
22024 | gcc_cv_as_discriminator=yes | |
22025 | else | |
22026 | echo "configure: failed program was" >&5 | |
22027 | cat conftest.s >&5 | |
22028 | fi | |
22029 | rm -f conftest.o conftest.s | |
22030 | fi | |
22031 | fi | |
5213506e RW |
22032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_discriminator" >&5 |
22033 | $as_echo "$gcc_cv_as_discriminator" >&6; } | |
6c52e687 CC |
22034 | if test $gcc_cv_as_discriminator = yes; then |
22035 | ||
5213506e | 22036 | $as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h |
6c52e687 CC |
22037 | |
22038 | fi | |
22039 | ||
6a7a462c | 22040 | # Thread-local storage - the check is heavily parameterized. |
f996902d RH |
22041 | conftest_s= |
22042 | tls_first_major= | |
22043 | tls_first_minor= | |
9739c90c | 22044 | tls_as_opt= |
f996902d | 22045 | case "$target" in |
6f9b006d RH |
22046 | alpha*-*-*) |
22047 | conftest_s=' | |
22048 | .section ".tdata","awT",@progbits | |
22049 | foo: .long 25 | |
22050 | .text | |
22051 | ldq $27,__tls_get_addr($29) !literal!1 | |
22052 | lda $16,foo($29) !tlsgd!1 | |
22053 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
22054 | ldq $27,__tls_get_addr($29) !literal!2 | |
22055 | lda $16,foo($29) !tlsldm!2 | |
22056 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
22057 | ldq $1,foo($29) !gotdtprel | |
22058 | ldah $2,foo($29) !dtprelhi | |
22059 | lda $3,foo($2) !dtprello | |
22060 | lda $4,foo($29) !dtprel | |
22061 | ldq $1,foo($29) !gottprel | |
22062 | ldah $2,foo($29) !tprelhi | |
22063 | lda $3,foo($2) !tprello | |
22064 | lda $4,foo($29) !tprel' | |
22065 | tls_first_major=2 | |
22066 | tls_first_minor=13 | |
2f3321ca | 22067 | tls_as_opt=--fatal-warnings |
6f9b006d | 22068 | ;; |
ad9646c7 HPN |
22069 | cris-*-*|crisv32-*-*) |
22070 | conftest_s=' | |
22071 | .section ".tdata","awT",@progbits | |
22072 | x: .long 25 | |
22073 | .text | |
22074 | move.d x:IE,$r10 | |
22075 | nop' | |
22076 | tls_first_major=2 | |
22077 | tls_first_minor=20 | |
22078 | tls_as_opt=--fatal-warnings | |
22079 | ;; | |
e4dd71de AH |
22080 | frv*-*-*) |
22081 | conftest_s=' | |
22082 | .section ".tdata","awT",@progbits | |
22083 | x: .long 25 | |
22084 | .text | |
22085 | call #gettlsoff(x)' | |
22086 | tls_first_major=2 | |
22087 | tls_first_minor=14 | |
22088 | ;; | |
51076f96 RC |
22089 | hppa*-*-linux*) |
22090 | conftest_s=' | |
22091 | t1: .reg %r20 | |
22092 | t2: .reg %r21 | |
22093 | gp: .reg %r19 | |
22094 | .section ".tdata","awT",@progbits | |
22095 | foo: .long 25 | |
22096 | .text | |
22097 | .align 4 | |
22098 | addil LT%foo-$tls_gdidx$,gp | |
22099 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
22100 | b __tls_get_addr | |
22101 | nop | |
22102 | addil LT%foo-$tls_ldidx$,gp | |
22103 | b __tls_get_addr | |
22104 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
22105 | addil LR%foo-$tls_dtpoff$,%ret0 | |
22106 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
22107 | mfctl %cr27,%t1 | |
22108 | addil LT%foo-$tls_ieoff$,gp | |
22109 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
22110 | add %t1,%t2,%t3 | |
22111 | mfctl %cr27,%t1 | |
22112 | addil LR%foo-$tls_leoff$,%t1 | |
22113 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
22114 | tls_first_major=2 | |
22115 | tls_first_minor=15 | |
22116 | tls_as_opt=--fatal-warnings | |
22117 | ;; | |
d3585b76 DJ |
22118 | arm*-*-*) |
22119 | conftest_s=' | |
22120 | .section ".tdata","awT",%progbits | |
22121 | foo: .long 25 | |
22122 | .text | |
22123 | .word foo(gottpoff) | |
22124 | .word foo(tpoff) | |
22125 | .word foo(tlsgd) | |
22126 | .word foo(tlsldm) | |
22127 | .word foo(tlsldo)' | |
22128 | tls_first_major=2 | |
22129 | tls_first_minor=17 | |
22130 | ;; | |
f996902d | 22131 | i[34567]86-*-*) |
f1c26cad | 22132 | case "$target" in |
f1c26cad RO |
22133 | i[34567]86-*-solaris2.*) |
22134 | on_solaris=yes | |
16c9d3b1 | 22135 | tga_func=___tls_get_addr |
f1c26cad RO |
22136 | ;; |
22137 | *) | |
22138 | on_solaris=no | |
22139 | ;; | |
22140 | esac | |
22141 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
22142 | conftest_s=' | |
22143 | .section .tdata,"awt",@progbits' | |
22144 | tls_first_major=0 | |
22145 | tls_first_minor=0 | |
22146 | ||
22147 | $as_echo "#define TLS_SECTION_ASM_FLAG 't'" >>confdefs.h | |
22148 | ||
22149 | else | |
22150 | conftest_s=' | |
22151 | .section ".tdata","awT",@progbits' | |
22152 | tls_first_major=2 | |
22153 | tls_first_minor=14 | |
22154 | tls_as_opt="--fatal-warnings" | |
22155 | fi | |
22156 | conftest_s="$conftest_s | |
f996902d RH |
22157 | foo: .long 25 |
22158 | .text | |
22159 | movl %gs:0, %eax | |
f1c26cad RO |
22160 | leal foo@tlsgd(,%ebx,1), %eax |
22161 | leal foo@tlsldm(%ebx), %eax | |
22162 | leal foo@dtpoff(%eax), %edx | |
22163 | movl foo@gottpoff(%ebx), %eax | |
22164 | subl foo@gottpoff(%ebx), %eax | |
22165 | addl foo@gotntpoff(%ebx), %eax | |
22166 | movl foo@indntpoff, %eax | |
22167 | movl \$foo@tpoff, %eax | |
22168 | subl \$foo@tpoff, %eax | |
22169 | leal foo@ntpoff(%ecx), %eax" | |
22170 | ;; | |
75d38379 JJ |
22171 | x86_64-*-*) |
22172 | conftest_s=' | |
22173 | .section ".tdata","awT",@progbits | |
22174 | foo: .long 25 | |
22175 | .text | |
22176 | movq %fs:0, %rax | |
22177 | leaq foo@TLSGD(%rip), %rdi | |
22178 | leaq foo@TLSLD(%rip), %rdi | |
22179 | leaq foo@DTPOFF(%rax), %rdx | |
22180 | movq foo@GOTTPOFF(%rip), %rax | |
22181 | movq $foo@TPOFF, %rax' | |
22182 | tls_first_major=2 | |
22183 | tls_first_minor=14 | |
2f3321ca | 22184 | tls_as_opt=--fatal-warnings |
f996902d | 22185 | ;; |
7b6e506e RH |
22186 | ia64-*-*) |
22187 | conftest_s=' | |
22188 | .section ".tdata","awT",@progbits | |
22189 | foo: data8 25 | |
22190 | .text | |
22191 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
22192 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
22193 | addl r18 = @ltoff(@tprel(foo#)), gp | |
22194 | addl r19 = @dtprel(foo#), gp | |
22195 | adds r21 = @dtprel(foo#), r13 | |
22196 | movl r23 = @dtprel(foo#) | |
22197 | addl r20 = @tprel(foo#), gp | |
22198 | adds r22 = @tprel(foo#), r13 | |
22199 | movl r24 = @tprel(foo#)' | |
22200 | tls_first_major=2 | |
22201 | tls_first_minor=13 | |
2f3321ca | 22202 | tls_as_opt=--fatal-warnings |
7b6e506e | 22203 | ;; |
69229b81 DJ |
22204 | mips*-*-*) |
22205 | conftest_s=' | |
22206 | .section .tdata,"awT",@progbits | |
22207 | x: | |
22208 | .word 2 | |
22209 | .text | |
22210 | addiu $4, $28, %tlsgd(x) | |
22211 | addiu $4, $28, %tlsldm(x) | |
22212 | lui $4, %dtprel_hi(x) | |
22213 | addiu $4, $4, %dtprel_lo(x) | |
22214 | lw $4, %gottprel(x)($28) | |
22215 | lui $4, %tprel_hi(x) | |
22216 | addiu $4, $4, %tprel_lo(x)' | |
22217 | tls_first_major=2 | |
22218 | tls_first_minor=16 | |
22219 | tls_as_opt='-32 --fatal-warnings' | |
22220 | ;; | |
75df395f MK |
22221 | m68k-*-*) |
22222 | conftest_s=' | |
22223 | .section .tdata,"awT",@progbits | |
22224 | x: | |
22225 | .word 2 | |
22226 | .text | |
22227 | foo: | |
22228 | move.l x@TLSGD(%a5),%a0 | |
22229 | move.l x@TLSLDM(%a5),%a0 | |
22230 | move.l x@TLSLDO(%a5),%a0 | |
22231 | move.l x@TLSIE(%a5),%a0 | |
22232 | move.l x@TLSLE(%a5),%a0' | |
22233 | tls_first_major=2 | |
22234 | tls_first_minor=19 | |
22235 | tls_as_opt='--fatal-warnings' | |
22236 | ;; | |
c4501e62 JJ |
22237 | powerpc-*-*) |
22238 | conftest_s=' | |
22239 | .section ".tdata","awT",@progbits | |
22240 | .align 2 | |
22241 | ld0: .space 4 | |
22242 | ld1: .space 4 | |
22243 | x1: .space 4 | |
22244 | x2: .space 4 | |
22245 | x3: .space 4 | |
22246 | .text | |
22247 | addi 3,31,ld0@got@tlsgd | |
22248 | bl __tls_get_addr | |
22249 | addi 3,31,x1@got@tlsld | |
22250 | bl __tls_get_addr | |
22251 | addi 9,3,x1@dtprel | |
22252 | addis 9,3,x2@dtprel@ha | |
22253 | addi 9,9,x2@dtprel@l | |
22254 | lwz 9,x3@got@tprel(31) | |
22255 | add 9,9,x@tls | |
22256 | addi 9,2,x1@tprel | |
22257 | addis 9,2,x2@tprel@ha | |
22258 | addi 9,9,x2@tprel@l' | |
22259 | tls_first_major=2 | |
22260 | tls_first_minor=14 | |
2f3321ca | 22261 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
22262 | ;; |
22263 | powerpc64-*-*) | |
22264 | conftest_s=' | |
22265 | .section ".tdata","awT",@progbits | |
22266 | .align 3 | |
22267 | ld0: .space 8 | |
22268 | ld1: .space 8 | |
22269 | x1: .space 8 | |
22270 | x2: .space 8 | |
22271 | x3: .space 8 | |
22272 | .text | |
22273 | addi 3,2,ld0@got@tlsgd | |
22274 | bl .__tls_get_addr | |
22275 | nop | |
22276 | addi 3,2,ld1@toc | |
22277 | bl .__tls_get_addr | |
22278 | nop | |
22279 | addi 3,2,x1@got@tlsld | |
22280 | bl .__tls_get_addr | |
22281 | nop | |
22282 | addi 9,3,x1@dtprel | |
22283 | bl .__tls_get_addr | |
22284 | nop | |
22285 | addis 9,3,x2@dtprel@ha | |
22286 | addi 9,9,x2@dtprel@l | |
22287 | bl .__tls_get_addr | |
22288 | nop | |
22289 | ld 9,x3@got@dtprel(2) | |
22290 | add 9,9,3 | |
22291 | bl .__tls_get_addr | |
22292 | nop' | |
22293 | tls_first_major=2 | |
22294 | tls_first_minor=14 | |
2f3321ca | 22295 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 22296 | ;; |
fd3cd001 UW |
22297 | s390-*-*) |
22298 | conftest_s=' | |
22299 | .section ".tdata","awT",@progbits | |
22300 | foo: .long 25 | |
22301 | .text | |
22302 | .long foo@TLSGD | |
22303 | .long foo@TLSLDM | |
22304 | .long foo@DTPOFF | |
22305 | .long foo@NTPOFF | |
22306 | .long foo@GOTNTPOFF | |
22307 | .long foo@INDNTPOFF | |
22308 | l %r1,foo@GOTNTPOFF(%r12) | |
22309 | l %r1,0(%r1):tls_load:foo | |
22310 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
22311 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
22312 | tls_first_major=2 | |
22313 | tls_first_minor=14 | |
2f3321ca | 22314 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
22315 | ;; |
22316 | s390x-*-*) | |
22317 | conftest_s=' | |
22318 | .section ".tdata","awT",@progbits | |
22319 | foo: .long 25 | |
22320 | .text | |
22321 | .quad foo@TLSGD | |
22322 | .quad foo@TLSLDM | |
22323 | .quad foo@DTPOFF | |
22324 | .quad foo@NTPOFF | |
22325 | .quad foo@GOTNTPOFF | |
22326 | lg %r1,foo@GOTNTPOFF(%r12) | |
22327 | larl %r1,foo@INDNTPOFF | |
22328 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
22329 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
22330 | tls_first_major=2 | |
22331 | tls_first_minor=14 | |
2f3321ca | 22332 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 22333 | ;; |
9ff13962 KK |
22334 | sh-*-* | sh[34]-*-*) |
22335 | conftest_s=' | |
22336 | .section ".tdata","awT",@progbits | |
22337 | foo: .long 25 | |
22338 | .text | |
22339 | .long foo@TLSGD | |
22340 | .long foo@TLSLDM | |
22341 | .long foo@DTPOFF | |
22342 | .long foo@GOTTPOFF | |
22343 | .long foo@TPOFF' | |
22344 | tls_first_major=2 | |
22345 | tls_first_minor=13 | |
2f3321ca | 22346 | tls_as_opt=--fatal-warnings |
9ff13962 | 22347 | ;; |
5751a10b | 22348 | sparc*-*-*) |
2f3321ca EB |
22349 | case "$target" in |
22350 | sparc*-sun-solaris2.*) | |
22351 | on_solaris=yes | |
16c9d3b1 | 22352 | tga_func=__tls_get_addr |
2f3321ca EB |
22353 | ;; |
22354 | *) | |
22355 | on_solaris=no | |
22356 | ;; | |
22357 | esac | |
22358 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
22359 | conftest_s=' | |
16c9d3b1 | 22360 | .section ".tdata",#alloc,#write,#tls' |
2f3321ca EB |
22361 | tls_first_major=0 |
22362 | tls_first_minor=0 | |
22363 | else | |
22364 | conftest_s=' | |
16c9d3b1 RO |
22365 | .section ".tdata","awT",@progbits' |
22366 | tls_first_major=2 | |
22367 | tls_first_minor=14 | |
22368 | tls_as_opt="-32 --fatal-warnings" | |
22369 | fi | |
22370 | conftest_s="$conftest_s | |
5751a10b JJ |
22371 | foo: .long 25 |
22372 | .text | |
22373 | sethi %tgd_hi22(foo), %o0 | |
22374 | add %o0, %tgd_lo10(foo), %o1 | |
22375 | add %l7, %o1, %o0, %tgd_add(foo) | |
22376 | call __tls_get_addr, %tgd_call(foo) | |
22377 | sethi %tldm_hi22(foo), %l1 | |
22378 | add %l1, %tldm_lo10(foo), %l2 | |
22379 | add %l7, %l2, %o0, %tldm_add(foo) | |
22380 | call __tls_get_addr, %tldm_call(foo) | |
22381 | sethi %tldo_hix22(foo), %l3 | |
22382 | xor %l3, %tldo_lox10(foo), %l4 | |
22383 | add %o0, %l4, %l5, %tldo_add(foo) | |
22384 | sethi %tie_hi22(foo), %o3 | |
22385 | add %o3, %tie_lo10(foo), %o3 | |
22386 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
22387 | add %g7, %o2, %o4, %tie_add(foo) | |
22388 | sethi %tle_hix22(foo), %l1 | |
22389 | xor %l1, %tle_lox10(foo), %o5 | |
16c9d3b1 | 22390 | ld [%g7 + %o5], %o1" |
5751a10b | 22391 | ;; |
6a7a462c BW |
22392 | xtensa*-*-*) |
22393 | conftest_s=' | |
22394 | .section ".tdata","awT",@progbits | |
22395 | foo: .long 25 | |
22396 | .text | |
22397 | movi a8, foo@TLSFUNC | |
22398 | movi a10, foo@TLSARG | |
22399 | callx8.tls a8, foo@TLSCALL' | |
22400 | tls_first_major=2 | |
22401 | tls_first_minor=19 | |
22402 | ;; | |
f996902d | 22403 | esac |
8dea1cca DD |
22404 | set_have_as_tls=no |
22405 | if test "x$enable_tls" = xno ; then | |
22406 | : # TLS explicitly disabled. | |
22407 | elif test "x$enable_tls" = xyes ; then | |
22408 | set_have_as_tls=yes # TLS explicitly enabled. | |
22409 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
22410 | : # If we don't have a check, assume no support. |
22411 | else | |
5213506e RW |
22412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for thread-local storage support" >&5 |
22413 | $as_echo_n "checking assembler for thread-local storage support... " >&6; } | |
22414 | if test "${gcc_cv_as_tls+set}" = set; then : | |
22415 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
22416 | else |
22417 | gcc_cv_as_tls=no | |
22418 | if test $in_tree_gas = yes; then | |
22419 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
22420 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 22421 | fi |
8ada417f | 22422 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 22423 | echo "$conftest_s" > conftest.s |
e0b0fd74 | 22424 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags $tls_as_opt -o conftest.o conftest.s >&5' |
5213506e | 22425 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22426 | (eval $ac_try) 2>&5 |
22427 | ac_status=$? | |
5213506e RW |
22428 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22429 | test $ac_status = 0; }; } | |
8ada417f ZW |
22430 | then |
22431 | gcc_cv_as_tls=yes | |
22432 | else | |
22433 | echo "configure: failed program was" >&5 | |
22434 | cat conftest.s >&5 | |
22435 | fi | |
22436 | rm -f conftest.o conftest.s | |
f996902d | 22437 | fi |
f996902d | 22438 | fi |
5213506e RW |
22439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_tls" >&5 |
22440 | $as_echo "$gcc_cv_as_tls" >&6; } | |
63cf211a | 22441 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
22442 | set_have_as_tls=yes |
22443 | fi | |
22444 | fi | |
16c9d3b1 RO |
22445 | case "$target" in |
22446 | # TLS was introduced in the Solaris 9 FCS release and backported to | |
22447 | # Solaris 8 patches. Support for GNU-style TLS on x86 was only | |
22448 | # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun | |
22449 | # ld and GCC don't support any longer. | |
22450 | *-*-solaris2.*) | |
22451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker and ld.so.1 TLS support" >&5 | |
22452 | $as_echo_n "checking linker and ld.so.1 TLS support... " >&6; } | |
22453 | ld_tls_support=no | |
22454 | # Check ld and ld.so.1 TLS support. | |
22455 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
22456 | # Assume all interesting versions of GNU ld have TLS support. | |
22457 | # FIXME: still need ld.so.1 support, i.e. ld version checks below. | |
22458 | ld_tls_support=yes | |
22459 | else | |
22460 | case "$target" in | |
22461 | # Solaris 8/x86 ld has GNU style TLS support since version 1.280. | |
22462 | i?86-*-solaris2.8) | |
22463 | min_tls_ld_vers_minor=280 | |
22464 | ;; | |
22465 | # Solaris 8/SPARC ld has TLS support since version 1.272. | |
22466 | sparc*-*-solaris2.8) | |
22467 | min_tls_ld_vers_minor=272 | |
22468 | ;; | |
22469 | # Solaris 9/x86 ld has GNU style TLS support since version 1.374. | |
22470 | i?86-*-solaris2.9) | |
22471 | min_tls_ld_vers_minor=374 | |
22472 | ;; | |
22473 | # Solaris 9/SPARC and Solaris 10+ ld have TLS support since FCS. | |
22474 | sparc*-*-solaris2.9 | *-*-solaris2.1[0-9]*) | |
22475 | min_tls_ld_vers_minor=343 | |
22476 | ;; | |
22477 | esac | |
22478 | if test "$ls_vers_major" -gt 1 || \ | |
22479 | test "$ld_vers_minor" -ge "$min_tls_ld_vers_minor"; then | |
22480 | ld_tls_support=yes | |
22481 | else | |
22482 | set_have_as_tls=no | |
22483 | fi | |
22484 | fi | |
22485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_tls_support" >&5 | |
22486 | $as_echo "$ld_tls_support" >&6; } | |
22487 | ||
22488 | save_LIBS="$LIBS" | |
22489 | save_LDFLAGS="$LDFLAGS" | |
22490 | LIBS= | |
22491 | LDFLAGS= | |
22492 | ||
22493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking alternate thread library" >&5 | |
22494 | $as_echo_n "checking alternate thread library... " >&6; } | |
22495 | case "$target" in | |
22496 | # TLS support was backported to Solaris 8 patches, but only lives in | |
22497 | # the alternate thread library which became the default in Solaris 9. | |
22498 | # We want to always use that, irrespective of TLS support. | |
22499 | *-*-solaris2.8) | |
22500 | # Take multilib subdir into account. There's no spec to handle | |
22501 | # this. The 64 symlink exists since Solaris 8. | |
22502 | lwp_dir=/usr/lib/lwp | |
22503 | lwp_spec="-L$lwp_dir%{m64:/64} -R$lwp_dir%{m64:/64}" | |
22504 | LDFLAGS="-L$lwp_dir -R$lwp_dir" | |
22505 | ;; | |
22506 | *-*-solaris2*) | |
22507 | lwp_dir="none" | |
22508 | lwp_spec="" | |
22509 | ;; | |
22510 | esac | |
22511 | # Always define LIB_THREAD_LDFLAGS_SPEC, even without TLS support. | |
22512 | ||
22513 | cat >>confdefs.h <<_ACEOF | |
22514 | #define LIB_THREAD_LDFLAGS_SPEC "$lwp_spec" | |
22515 | _ACEOF | |
22516 | ||
22517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lwp_dir" >&5 | |
22518 | $as_echo "$lwp_dir" >&6; } | |
22519 | ||
22520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking library containing $tga_func" >&5 | |
22521 | $as_echo_n "checking library containing $tga_func... " >&6; } | |
22522 | # Before Solaris 10, __tls_get_addr (SPARC/x64) resp. ___tls_get_addr | |
22523 | # (32-bit x86) only lived in libthread, so check for that. Keep | |
22524 | # set_have_as_tls if found, disable if not. | |
22525 | as_ac_Search=`$as_echo "ac_cv_search_$tga_func" | $as_tr_sh` | |
22526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tga_func" >&5 | |
22527 | $as_echo_n "checking for library containing $tga_func... " >&6; } | |
22528 | if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then : | |
22529 | $as_echo_n "(cached) " >&6 | |
22530 | else | |
22531 | ac_func_search_save_LIBS=$LIBS | |
22532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22533 | /* end confdefs.h. */ | |
22534 | ||
22535 | /* Override any GCC internal prototype to avoid an error. | |
22536 | Use char because int might match the return type of a GCC | |
22537 | builtin and then its argument prototype would still apply. */ | |
22538 | #ifdef __cplusplus | |
22539 | extern "C" | |
22540 | #endif | |
22541 | char $tga_func (); | |
22542 | int | |
22543 | main () | |
22544 | { | |
22545 | return $tga_func (); | |
22546 | ; | |
22547 | return 0; | |
22548 | } | |
22549 | _ACEOF | |
22550 | for ac_lib in '' thread; do | |
22551 | if test -z "$ac_lib"; then | |
22552 | ac_res="none required" | |
22553 | else | |
22554 | ac_res=-l$ac_lib | |
22555 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
22556 | fi | |
22557 | if ac_fn_c_try_link "$LINENO"; then : | |
22558 | eval "$as_ac_Search=\$ac_res" | |
22559 | fi | |
22560 | rm -f core conftest.err conftest.$ac_objext \ | |
22561 | conftest$ac_exeext | |
22562 | if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then : | |
22563 | break | |
22564 | fi | |
22565 | done | |
22566 | if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then : | |
22567 | ||
22568 | else | |
22569 | eval "$as_ac_Search=no" | |
22570 | fi | |
22571 | rm conftest.$ac_ext | |
22572 | LIBS=$ac_func_search_save_LIBS | |
22573 | fi | |
22574 | eval ac_res=\$$as_ac_Search | |
22575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
22576 | $as_echo "$ac_res" >&6; } | |
22577 | eval ac_res=\$$as_ac_Search | |
22578 | if test "$ac_res" != no; then : | |
22579 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
22580 | ||
22581 | else | |
22582 | set_have_as_tls=no | |
22583 | fi | |
22584 | ||
22585 | # Clear LIBS if we cannot support TLS. | |
22586 | if test $set_have_as_tls = no; then | |
22587 | LIBS= | |
22588 | fi | |
22589 | # Always define LIB_TLS_SPEC, even without TLS support. | |
22590 | ||
22591 | cat >>confdefs.h <<_ACEOF | |
22592 | #define LIB_TLS_SPEC "$LIBS" | |
22593 | _ACEOF | |
22594 | ||
22595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBS" >&5 | |
22596 | $as_echo "$LIBS" >&6; } | |
22597 | ||
22598 | LIBS="$save_LIBS" | |
22599 | LDFLAGS="$save_LDFLAGS" | |
22600 | ;; | |
22601 | esac | |
8dea1cca | 22602 | if test $set_have_as_tls = yes ; then |
ba479fd2 | 22603 | |
5213506e | 22604 | $as_echo "#define HAVE_AS_TLS 1" >>confdefs.h |
f996902d | 22605 | |
8ada417f ZW |
22606 | fi |
22607 | ||
22608 | # Target-specific assembler checks. | |
f996902d | 22609 | |
5213506e RW |
22610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker -Bstatic/-Bdynamic option" >&5 |
22611 | $as_echo_n "checking linker -Bstatic/-Bdynamic option... " >&6; } | |
7e9d8517 L |
22612 | gcc_cv_ld_static_dynamic=no |
22613 | if test $in_tree_ld = yes ; then | |
83f0ccb8 | 22614 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2; then |
7e9d8517 L |
22615 | gcc_cv_ld_static_dynamic=yes |
22616 | fi | |
22617 | elif test x$gcc_cv_ld != x; then | |
22618 | # Check if linker supports -Bstatic/-Bdynamic option | |
22619 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
22620 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
22621 | gcc_cv_ld_static_dynamic=yes | |
22622 | fi | |
22623 | fi | |
22624 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
22625 | ||
5213506e | 22626 | $as_echo "#define HAVE_LD_STATIC_DYNAMIC 1" >>confdefs.h |
7e9d8517 L |
22627 | |
22628 | fi | |
5213506e RW |
22629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_static_dynamic" >&5 |
22630 | $as_echo "$gcc_cv_ld_static_dynamic" >&6; } | |
7e9d8517 | 22631 | |
d594623a | 22632 | if test x"$demangler_in_ld" = xyes; then |
5213506e RW |
22633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --demangle support" >&5 |
22634 | $as_echo_n "checking linker --demangle support... " >&6; } | |
d594623a L |
22635 | gcc_cv_ld_demangle=no |
22636 | if test $in_tree_ld = yes; then | |
22637 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \ | |
22638 | gcc_cv_ld_demangle=yes | |
22639 | fi | |
22640 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
22641 | # Check if the GNU linker supports --demangle option | |
22642 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
22643 | gcc_cv_ld_demangle=yes | |
22644 | fi | |
22645 | fi | |
22646 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
22647 | ||
5213506e | 22648 | $as_echo "#define HAVE_LD_DEMANGLE 1" >>confdefs.h |
d594623a L |
22649 | |
22650 | fi | |
5213506e RW |
22651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_demangle" >&5 |
22652 | $as_echo "$gcc_cv_ld_demangle" >&6; } | |
d594623a L |
22653 | fi |
22654 | ||
3a37b08e RH |
22655 | case "$target" in |
22656 | # All TARGET_ABI_OSF targets. | |
22657 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
5213506e RW |
22658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5 |
22659 | $as_echo_n "checking assembler for explicit relocation support... " >&6; } | |
22660 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then : | |
22661 | $as_echo_n "(cached) " >&6 | |
3a37b08e | 22662 | else |
8ada417f ZW |
22663 | gcc_cv_as_alpha_explicit_relocs=no |
22664 | if test $in_tree_gas = yes; then | |
22665 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
22666 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 22667 | fi |
8ada417f | 22668 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 22669 | echo ' .set nomacro |
3a37b08e RH |
22670 | .text |
22671 | extbl $3, $2, $3 !lituse_bytoff!1 | |
22672 | ldq $2, a($29) !literal!1 | |
22673 | ldq $4, b($29) !literal!2 | |
22674 | ldq_u $3, 0($2) !lituse_base!1 | |
22675 | ldq $27, f($29) !literal!5 | |
22676 | jsr $26, ($27), f !lituse_jsr!5 | |
22677 | ldah $29, 0($26) !gpdisp!3 | |
22678 | lda $0, c($29) !gprel | |
22679 | ldah $1, d($29) !gprelhigh | |
22680 | lda $1, d($1) !gprellow | |
8ada417f | 22681 | lda $29, 0($29) !gpdisp!3' > conftest.s |
e0b0fd74 | 22682 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22683 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22684 | (eval $ac_try) 2>&5 |
22685 | ac_status=$? | |
5213506e RW |
22686 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22687 | test $ac_status = 0; }; } | |
8ada417f ZW |
22688 | then |
22689 | gcc_cv_as_alpha_explicit_relocs=yes | |
22690 | else | |
22691 | echo "configure: failed program was" >&5 | |
22692 | cat conftest.s >&5 | |
22693 | fi | |
22694 | rm -f conftest.o conftest.s | |
22695 | fi | |
cafe096b | 22696 | fi |
5213506e RW |
22697 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
22698 | $as_echo "$gcc_cv_as_alpha_explicit_relocs" >&6; } | |
63cf211a | 22699 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 | 22700 | |
5213506e | 22701 | $as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h |
3a37b08e | 22702 | |
d006f5eb | 22703 | fi |
5213506e RW |
22704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5 |
22705 | $as_echo_n "checking assembler for jsrdirect relocation support... " >&6; } | |
22706 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then : | |
22707 | $as_echo_n "(cached) " >&6 | |
d006f5eb RH |
22708 | else |
22709 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
22710 | if test $in_tree_gas = yes; then | |
22711 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
22712 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
22713 | fi | |
22714 | elif test x$gcc_cv_as != x; then | |
22715 | echo ' .set nomacro | |
22716 | .text | |
22717 | ldq $27, a($29) !literal!1 | |
22718 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
e0b0fd74 | 22719 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22720 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d006f5eb RH |
22721 | (eval $ac_try) 2>&5 |
22722 | ac_status=$? | |
5213506e RW |
22723 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22724 | test $ac_status = 0; }; } | |
d006f5eb RH |
22725 | then |
22726 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
22727 | else | |
22728 | echo "configure: failed program was" >&5 | |
22729 | cat conftest.s >&5 | |
22730 | fi | |
22731 | rm -f conftest.o conftest.s | |
22732 | fi | |
22733 | fi | |
5213506e RW |
22734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 |
22735 | $as_echo "$gcc_cv_as_alpha_jsrdirect_relocs" >&6; } | |
d006f5eb RH |
22736 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then |
22737 | ||
5213506e | 22738 | $as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h |
d006f5eb | 22739 | |
86da66b5 HPN |
22740 | fi |
22741 | ;; | |
22742 | ||
22743 | cris-*-*) | |
5213506e RW |
22744 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -no-mul-bug-abort option" >&5 |
22745 | $as_echo_n "checking assembler for -no-mul-bug-abort option... " >&6; } | |
22746 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then : | |
22747 | $as_echo_n "(cached) " >&6 | |
86da66b5 HPN |
22748 | else |
22749 | gcc_cv_as_cris_no_mul_bug=no | |
22750 | if test $in_tree_gas = yes; then | |
22751 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
22752 | then gcc_cv_as_cris_no_mul_bug=yes | |
22753 | fi | |
22754 | elif test x$gcc_cv_as != x; then | |
22755 | echo '.text' > conftest.s | |
e0b0fd74 | 22756 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -no-mul-bug-abort -o conftest.o conftest.s >&5' |
5213506e | 22757 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
86da66b5 HPN |
22758 | (eval $ac_try) 2>&5 |
22759 | ac_status=$? | |
5213506e RW |
22760 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22761 | test $ac_status = 0; }; } | |
86da66b5 HPN |
22762 | then |
22763 | gcc_cv_as_cris_no_mul_bug=yes | |
22764 | else | |
22765 | echo "configure: failed program was" >&5 | |
22766 | cat conftest.s >&5 | |
22767 | fi | |
22768 | rm -f conftest.o conftest.s | |
22769 | fi | |
22770 | fi | |
5213506e RW |
22771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cris_no_mul_bug" >&5 |
22772 | $as_echo "$gcc_cv_as_cris_no_mul_bug" >&6; } | |
86da66b5 HPN |
22773 | if test $gcc_cv_as_cris_no_mul_bug = yes; then |
22774 | ||
5213506e | 22775 | $as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h |
86da66b5 | 22776 | |
8ada417f | 22777 | fi |
3a37b08e | 22778 | ;; |
8ada417f | 22779 | |
1cb36a98 | 22780 | sparc*-*-*) |
5213506e RW |
22781 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .register" >&5 |
22782 | $as_echo_n "checking assembler for .register... " >&6; } | |
22783 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then : | |
22784 | $as_echo_n "(cached) " >&6 | |
5b68c389 | 22785 | else |
8ada417f ZW |
22786 | gcc_cv_as_sparc_register_op=no |
22787 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22788 | echo '.register %g2, #scratch' > conftest.s |
e0b0fd74 | 22789 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 22790 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22791 | (eval $ac_try) 2>&5 |
22792 | ac_status=$? | |
5213506e RW |
22793 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22794 | test $ac_status = 0; }; } | |
8ada417f ZW |
22795 | then |
22796 | gcc_cv_as_sparc_register_op=yes | |
22797 | else | |
22798 | echo "configure: failed program was" >&5 | |
22799 | cat conftest.s >&5 | |
22800 | fi | |
22801 | rm -f conftest.o conftest.s | |
22802 | fi | |
cafe096b | 22803 | fi |
5213506e RW |
22804 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_register_op" >&5 |
22805 | $as_echo "$gcc_cv_as_sparc_register_op" >&6; } | |
63cf211a | 22806 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 | 22807 | |
5213506e | 22808 | $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h |
1cb36a98 | 22809 | |
8ada417f | 22810 | fi |
1cb36a98 | 22811 | |
5213506e RW |
22812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5 |
22813 | $as_echo_n "checking assembler for -relax option... " >&6; } | |
22814 | if test "${gcc_cv_as_sparc_relax+set}" = set; then : | |
22815 | $as_echo_n "(cached) " >&6 | |
e95b1e6a | 22816 | else |
8ada417f ZW |
22817 | gcc_cv_as_sparc_relax=no |
22818 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22819 | echo '.text' > conftest.s |
e0b0fd74 | 22820 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -relax -o conftest.o conftest.s >&5' |
5213506e | 22821 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22822 | (eval $ac_try) 2>&5 |
22823 | ac_status=$? | |
5213506e RW |
22824 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22825 | test $ac_status = 0; }; } | |
8ada417f ZW |
22826 | then |
22827 | gcc_cv_as_sparc_relax=yes | |
22828 | else | |
22829 | echo "configure: failed program was" >&5 | |
22830 | cat conftest.s >&5 | |
22831 | fi | |
22832 | rm -f conftest.o conftest.s | |
22833 | fi | |
cafe096b | 22834 | fi |
5213506e RW |
22835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_relax" >&5 |
22836 | $as_echo "$gcc_cv_as_sparc_relax" >&6; } | |
63cf211a | 22837 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 | 22838 | |
5213506e | 22839 | $as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h |
e95b1e6a | 22840 | |
878ee0ab DM |
22841 | fi |
22842 | ||
22843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5 | |
22844 | $as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; } | |
22845 | if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then : | |
22846 | $as_echo_n "(cached) " >&6 | |
22847 | else | |
22848 | gcc_cv_as_sparc_gotdata_op=no | |
22849 | if test x$gcc_cv_as != x; then | |
22850 | echo '.text | |
22851 | foo: | |
22852 | nop | |
22853 | bar: | |
22854 | sethi %gdop_hix22(foo), %g1 | |
22855 | xor %g1, %gdop_lox10(foo), %g1 | |
22856 | ld [%l7 + %g1], %g2, %gdop(foo)' > conftest.s | |
22857 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5' | |
22858 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
22859 | (eval $ac_try) 2>&5 | |
22860 | ac_status=$? | |
22861 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
22862 | test $ac_status = 0; }; } | |
22863 | then | |
22864 | if test x$gcc_cv_ld != x \ | |
46bc665f DM |
22865 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then |
22866 | if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then | |
22867 | if test x$gcc_cv_objdump != x; then | |
22868 | if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \ | |
22869 | | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then | |
22870 | gcc_cv_as_sparc_gotdata_op=no | |
22871 | else | |
22872 | gcc_cv_as_sparc_gotdata_op=yes | |
22873 | fi | |
22874 | fi | |
22875 | else | |
22876 | gcc_cv_as_sparc_gotdata_op=yes | |
22877 | fi | |
878ee0ab DM |
22878 | fi |
22879 | rm -f conftest | |
22880 | else | |
22881 | echo "configure: failed program was" >&5 | |
22882 | cat conftest.s >&5 | |
22883 | fi | |
22884 | rm -f conftest.o conftest.s | |
22885 | fi | |
22886 | fi | |
22887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_gotdata_op" >&5 | |
22888 | $as_echo "$gcc_cv_as_sparc_gotdata_op" >&6; } | |
22889 | if test $gcc_cv_as_sparc_gotdata_op = yes; then | |
22890 | ||
22891 | $as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h | |
22892 | ||
8ada417f | 22893 | fi |
e95b1e6a | 22894 | |
5213506e RW |
22895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5 |
22896 | $as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; } | |
22897 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then : | |
22898 | $as_echo_n "(cached) " >&6 | |
17e9e88c | 22899 | else |
8ada417f ZW |
22900 | gcc_cv_as_sparc_ua_pcrel=no |
22901 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22902 | echo '.text |
8ada417f ZW |
22903 | foo: |
22904 | nop | |
22905 | .data | |
22906 | .align 4 | |
22907 | .byte 0 | |
22908 | .uaword %r_disp32(foo)' > conftest.s | |
e0b0fd74 | 22909 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5' |
5213506e | 22910 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22911 | (eval $ac_try) 2>&5 |
22912 | ac_status=$? | |
5213506e RW |
22913 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22914 | test $ac_status = 0; }; } | |
8ada417f ZW |
22915 | then |
22916 | if test x$gcc_cv_ld != x \ | |
22917 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
22918 | gcc_cv_as_sparc_ua_pcrel=yes | |
22919 | fi | |
22920 | rm -f conftest | |
22921 | else | |
22922 | echo "configure: failed program was" >&5 | |
22923 | cat conftest.s >&5 | |
22924 | fi | |
22925 | rm -f conftest.o conftest.s | |
22926 | fi | |
cafe096b | 22927 | fi |
5213506e RW |
22928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
22929 | $as_echo "$gcc_cv_as_sparc_ua_pcrel" >&6; } | |
63cf211a | 22930 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 | 22931 | |
5213506e | 22932 | $as_echo "#define HAVE_AS_SPARC_UA_PCREL 1" >>confdefs.h |
17e9e88c | 22933 | |
17e9e88c | 22934 | |
5213506e RW |
22935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
22936 | $as_echo_n "checking assembler for unaligned pcrel relocs against hidden symbols... " >&6; } | |
22937 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then : | |
22938 | $as_echo_n "(cached) " >&6 | |
cf7b8b0d | 22939 | else |
8ada417f ZW |
22940 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
22941 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22942 | echo '.data |
8ada417f ZW |
22943 | .align 4 |
22944 | .byte 0x31 | |
22945 | .uaword %r_disp32(foo) | |
22946 | .byte 0x32, 0x33, 0x34 | |
22947 | .global foo | |
22948 | .hidden foo | |
22949 | foo: | |
22950 | .skip 4' > conftest.s | |
e0b0fd74 | 22951 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5' |
5213506e | 22952 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22953 | (eval $ac_try) 2>&5 |
22954 | ac_status=$? | |
5213506e RW |
22955 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
22956 | test $ac_status = 0; }; } | |
8ada417f ZW |
22957 | then |
22958 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
22959 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
22960 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
22961 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
22962 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
22963 | | grep 'DISP32' > /dev/null 2>&1; then | |
22964 | : | |
22965 | else | |
22966 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 22967 | fi |
8ada417f ZW |
22968 | fi |
22969 | rm -f conftest | |
22970 | else | |
22971 | echo "configure: failed program was" >&5 | |
22972 | cat conftest.s >&5 | |
22973 | fi | |
22974 | rm -f conftest.o conftest.s | |
22975 | fi | |
cafe096b | 22976 | fi |
5213506e RW |
22977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
22978 | $as_echo "$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; } | |
63cf211a | 22979 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 | 22980 | |
5213506e | 22981 | $as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h |
cf7b8b0d | 22982 | |
8ada417f | 22983 | fi |
ba479fd2 | 22984 | |
8ada417f | 22985 | fi # unaligned pcrel relocs |
cf7b8b0d | 22986 | |
5213506e RW |
22987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5 |
22988 | $as_echo_n "checking assembler for offsetable %lo()... " >&6; } | |
22989 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then : | |
22990 | $as_echo_n "(cached) " >&6 | |
5b68c389 | 22991 | else |
8ada417f ZW |
22992 | gcc_cv_as_sparc_offsetable_lo10=no |
22993 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 22994 | echo '.text |
8ada417f ZW |
22995 | or %g1, %lo(ab) + 12, %g1 |
22996 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
e0b0fd74 | 22997 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xarch=v9 -o conftest.o conftest.s >&5' |
5213506e | 22998 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
22999 | (eval $ac_try) 2>&5 |
23000 | ac_status=$? | |
5213506e RW |
23001 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23002 | test $ac_status = 0; }; } | |
8ada417f ZW |
23003 | then |
23004 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 23005 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 23006 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 23007 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
23008 | fi |
23009 | else | |
23010 | echo "configure: failed program was" >&5 | |
23011 | cat conftest.s >&5 | |
23012 | fi | |
23013 | rm -f conftest.o conftest.s | |
23014 | fi | |
cafe096b | 23015 | fi |
5213506e RW |
23016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
23017 | $as_echo "$gcc_cv_as_sparc_offsetable_lo10" >&6; } | |
63cf211a | 23018 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 | 23019 | |
5213506e | 23020 | $as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h |
1cb36a98 | 23021 | |
8ada417f | 23022 | fi |
1cb36a98 RH |
23023 | ;; |
23024 | ||
c307e6dd | 23025 | i[34567]86-*-* | x86_64-*-*) |
f7e413e2 DK |
23026 | case $target_os in |
23027 | cygwin*) | |
23028 | # Full C++ conformance when using a shared libstdc++-v3 requires some | |
23029 | # support from the Cygwin DLL, which in more recent versions exports | |
23030 | # wrappers to aid in interposing and redirecting operators new, delete, | |
23031 | # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we | |
23032 | # are configuring for a version of Cygwin that exports the wrappers. | |
23033 | if test x$host = x$target; then | |
23034 | ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj" | |
23035 | if test "x$ac_cv_func___wrap__Znaj" = x""yes; then : | |
23036 | gcc_ac_cygwin_dll_wrappers=yes | |
23037 | else | |
23038 | gcc_ac_cygwin_dll_wrappers=no | |
23039 | fi | |
23040 | ||
23041 | else | |
23042 | # Can't check presence of libc functions during cross-compile, so | |
23043 | # we just have to assume we're building for an up-to-date target. | |
23044 | gcc_ac_cygwin_dll_wrappers=yes | |
23045 | fi | |
23046 | ||
23047 | cat >>confdefs.h <<_ACEOF | |
23048 | #define USE_CYGWIN_LIBSTDCXX_WRAPPERS `if test $gcc_ac_cygwin_dll_wrappers = yes; then echo 1; else echo 0; fi` | |
23049 | _ACEOF | |
23050 | ||
23051 | esac | |
d38bc601 BF |
23052 | case $target_os in |
23053 | cygwin* | pe | mingw32*) | |
233215fe DK |
23054 | # Recent binutils allows the three-operand form of ".comm" on PE. This |
23055 | # definition is used unconditionally to initialise the default state of | |
23056 | # the target option variable that governs usage of the feature. | |
5213506e RW |
23057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .comm with alignment" >&5 |
23058 | $as_echo_n "checking assembler for .comm with alignment... " >&6; } | |
23059 | if test "${gcc_cv_as_comm_has_align+set}" = set; then : | |
23060 | $as_echo_n "(cached) " >&6 | |
233215fe DK |
23061 | else |
23062 | gcc_cv_as_comm_has_align=no | |
23063 | if test $in_tree_gas = yes; then | |
23064 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52` | |
23065 | then gcc_cv_as_comm_has_align=yes | |
23066 | fi | |
23067 | elif test x$gcc_cv_as != x; then | |
23068 | echo '.comm foo,1,32' > conftest.s | |
e0b0fd74 | 23069 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23070 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
233215fe DK |
23071 | (eval $ac_try) 2>&5 |
23072 | ac_status=$? | |
5213506e RW |
23073 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23074 | test $ac_status = 0; }; } | |
233215fe DK |
23075 | then |
23076 | gcc_cv_as_comm_has_align=yes | |
23077 | else | |
23078 | echo "configure: failed program was" >&5 | |
23079 | cat conftest.s >&5 | |
23080 | fi | |
23081 | rm -f conftest.o conftest.s | |
23082 | fi | |
23083 | fi | |
5213506e RW |
23084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comm_has_align" >&5 |
23085 | $as_echo "$gcc_cv_as_comm_has_align" >&6; } | |
233215fe DK |
23086 | |
23087 | ||
23088 | cat >>confdefs.h <<_ACEOF | |
23089 | #define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi` | |
23090 | _ACEOF | |
23091 | ||
d38bc601 | 23092 | # Used for DWARF 2 in PE |
5213506e RW |
23093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .secrel32 relocs" >&5 |
23094 | $as_echo_n "checking assembler for .secrel32 relocs... " >&6; } | |
23095 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then : | |
23096 | $as_echo_n "(cached) " >&6 | |
d38bc601 BF |
23097 | else |
23098 | gcc_cv_as_ix86_pe_secrel32=no | |
23099 | if test $in_tree_gas = yes; then | |
23100 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
23101 | then gcc_cv_as_ix86_pe_secrel32=yes | |
23102 | fi | |
23103 | elif test x$gcc_cv_as != x; then | |
23104 | echo '.text | |
23105 | foo: nop | |
23106 | .data | |
23107 | .secrel32 foo' > conftest.s | |
e0b0fd74 | 23108 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23109 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d38bc601 BF |
23110 | (eval $ac_try) 2>&5 |
23111 | ac_status=$? | |
5213506e RW |
23112 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23113 | test $ac_status = 0; }; } | |
d38bc601 BF |
23114 | then |
23115 | if test x$gcc_cv_ld != x \ | |
23116 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
23117 | gcc_cv_as_ix86_pe_secrel32=yes | |
23118 | fi | |
23119 | rm -f conftest | |
23120 | else | |
23121 | echo "configure: failed program was" >&5 | |
23122 | cat conftest.s >&5 | |
23123 | fi | |
23124 | rm -f conftest.o conftest.s | |
23125 | fi | |
23126 | fi | |
5213506e RW |
23127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_pe_secrel32" >&5 |
23128 | $as_echo "$gcc_cv_as_ix86_pe_secrel32" >&6; } | |
d38bc601 BF |
23129 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then |
23130 | ||
5213506e | 23131 | $as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h |
d38bc601 BF |
23132 | |
23133 | fi | |
3bec79c5 DK |
23134 | # Test if the assembler supports the extended form of the .section |
23135 | # directive that specifies section alignment. LTO support uses this, | |
23136 | # but normally only after installation, so we warn but don't fail the | |
23137 | # configure if LTO is enabled but the assembler does not support it. | |
23138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with alignment" >&5 | |
23139 | $as_echo_n "checking assembler for .section with alignment... " >&6; } | |
23140 | if test "${gcc_cv_as_section_has_align+set}" = set; then : | |
23141 | $as_echo_n "(cached) " >&6 | |
23142 | else | |
23143 | gcc_cv_as_section_has_align=no | |
23144 | if test $in_tree_gas = yes; then | |
23145 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 1` | |
23146 | then gcc_cv_as_section_has_align=yes | |
23147 | fi | |
23148 | elif test x$gcc_cv_as != x; then | |
23149 | echo '.section lto_test,"dr0"' > conftest.s | |
23150 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -fatal-warnings -o conftest.o conftest.s >&5' | |
23151 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
23152 | (eval $ac_try) 2>&5 | |
23153 | ac_status=$? | |
23154 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
23155 | test $ac_status = 0; }; } | |
23156 | then | |
23157 | gcc_cv_as_section_has_align=yes | |
23158 | else | |
23159 | echo "configure: failed program was" >&5 | |
23160 | cat conftest.s >&5 | |
23161 | fi | |
23162 | rm -f conftest.o conftest.s | |
23163 | fi | |
23164 | fi | |
23165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5 | |
23166 | $as_echo "$gcc_cv_as_section_has_align" >&6; } | |
23167 | ||
23168 | if test x$gcc_cv_as_section_has_align != xyes; then | |
23169 | case ",$enable_languages," in | |
23170 | *,lto,*) | |
23171 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: LTO for $target requires binutils >= 2.20.1, but version found appears insufficient; LTO will not work until binutils is upgraded." >&5 | |
23172 | $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but version found appears insufficient; LTO will not work until binutils is upgraded." >&2;} | |
23173 | ;; | |
23174 | esac | |
23175 | fi | |
d38bc601 BF |
23176 | ;; |
23177 | esac | |
23178 | ||
5213506e RW |
23179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5 |
23180 | $as_echo_n "checking assembler for filds and fists mnemonics... " >&6; } | |
23181 | if test "${gcc_cv_as_ix86_filds+set}" = set; then : | |
23182 | $as_echo_n "(cached) " >&6 | |
8ada417f | 23183 | else |
a3a5e3d1 UB |
23184 | gcc_cv_as_ix86_filds=no |
23185 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 23186 | echo 'filds mem; fists mem' > conftest.s |
e0b0fd74 | 23187 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23188 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23189 | (eval $ac_try) 2>&5 |
23190 | ac_status=$? | |
5213506e RW |
23191 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23192 | test $ac_status = 0; }; } | |
8ada417f | 23193 | then |
a3a5e3d1 UB |
23194 | gcc_cv_as_ix86_filds=yes |
23195 | else | |
23196 | echo "configure: failed program was" >&5 | |
23197 | cat conftest.s >&5 | |
23198 | fi | |
23199 | rm -f conftest.o conftest.s | |
23200 | fi | |
23201 | fi | |
5213506e RW |
23202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_filds" >&5 |
23203 | $as_echo "$gcc_cv_as_ix86_filds" >&6; } | |
a3a5e3d1 UB |
23204 | if test $gcc_cv_as_ix86_filds = yes; then |
23205 | ||
5213506e | 23206 | $as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h |
a3a5e3d1 UB |
23207 | |
23208 | fi | |
23209 | ||
5213506e RW |
23210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5 |
23211 | $as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; } | |
23212 | if test "${gcc_cv_as_ix86_fildq+set}" = set; then : | |
23213 | $as_echo_n "(cached) " >&6 | |
a3a5e3d1 UB |
23214 | else |
23215 | gcc_cv_as_ix86_fildq=no | |
23216 | if test x$gcc_cv_as != x; then | |
23217 | echo 'fildq mem; fistpq mem' > conftest.s | |
e0b0fd74 | 23218 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23219 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
a3a5e3d1 UB |
23220 | (eval $ac_try) 2>&5 |
23221 | ac_status=$? | |
5213506e RW |
23222 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23223 | test $ac_status = 0; }; } | |
a3a5e3d1 UB |
23224 | then |
23225 | gcc_cv_as_ix86_fildq=yes | |
8ada417f ZW |
23226 | else |
23227 | echo "configure: failed program was" >&5 | |
23228 | cat conftest.s >&5 | |
981d4858 | 23229 | fi |
8ada417f ZW |
23230 | rm -f conftest.o conftest.s |
23231 | fi | |
23232 | fi | |
5213506e RW |
23233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_fildq" >&5 |
23234 | $as_echo "$gcc_cv_as_ix86_fildq" >&6; } | |
a3a5e3d1 | 23235 | if test $gcc_cv_as_ix86_fildq = yes; then |
ba479fd2 | 23236 | |
5213506e | 23237 | $as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h |
ad9c4d9f | 23238 | |
f6f5dff2 RO |
23239 | fi |
23240 | ||
5213506e RW |
23241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5 |
23242 | $as_echo_n "checking assembler for cmov syntax... " >&6; } | |
23243 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then : | |
23244 | $as_echo_n "(cached) " >&6 | |
f6f5dff2 RO |
23245 | else |
23246 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
23247 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 23248 | echo 'cmovl.l %edx, %eax' > conftest.s |
e0b0fd74 | 23249 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23250 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23251 | (eval $ac_try) 2>&5 |
23252 | ac_status=$? | |
5213506e RW |
23253 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23254 | test $ac_status = 0; }; } | |
f6f5dff2 RO |
23255 | then |
23256 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
23257 | else | |
23258 | echo "configure: failed program was" >&5 | |
23259 | cat conftest.s >&5 | |
23260 | fi | |
23261 | rm -f conftest.o conftest.s | |
23262 | fi | |
23263 | fi | |
5213506e RW |
23264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
23265 | $as_echo "$gcc_cv_as_ix86_cmov_sun_syntax" >&6; } | |
63cf211a | 23266 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 | 23267 | |
5213506e | 23268 | $as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h |
f6f5dff2 | 23269 | |
b6c03bcd RS |
23270 | fi |
23271 | ||
5213506e RW |
23272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5 |
23273 | $as_echo_n "checking assembler for ffreep mnemonic... " >&6; } | |
23274 | if test "${gcc_cv_as_ix86_ffreep+set}" = set; then : | |
23275 | $as_echo_n "(cached) " >&6 | |
b6c03bcd RS |
23276 | else |
23277 | gcc_cv_as_ix86_ffreep=no | |
23278 | if test x$gcc_cv_as != x; then | |
23279 | echo 'ffreep %st(1)' > conftest.s | |
e0b0fd74 | 23280 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23281 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
b6c03bcd RS |
23282 | (eval $ac_try) 2>&5 |
23283 | ac_status=$? | |
5213506e RW |
23284 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23285 | test $ac_status = 0; }; } | |
b6c03bcd RS |
23286 | then |
23287 | gcc_cv_as_ix86_ffreep=yes | |
23288 | else | |
23289 | echo "configure: failed program was" >&5 | |
23290 | cat conftest.s >&5 | |
23291 | fi | |
23292 | rm -f conftest.o conftest.s | |
23293 | fi | |
23294 | fi | |
5213506e RW |
23295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_ffreep" >&5 |
23296 | $as_echo "$gcc_cv_as_ix86_ffreep" >&6; } | |
b6c03bcd RS |
23297 | if test $gcc_cv_as_ix86_ffreep = yes; then |
23298 | ||
5213506e | 23299 | $as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h |
b6c03bcd | 23300 | |
ed104137 RO |
23301 | fi |
23302 | ||
23303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5 | |
23304 | $as_echo_n "checking assembler for .quad directive... " >&6; } | |
23305 | if test "${gcc_cv_as_ix86_quad+set}" = set; then : | |
23306 | $as_echo_n "(cached) " >&6 | |
23307 | else | |
23308 | gcc_cv_as_ix86_quad=no | |
23309 | if test x$gcc_cv_as != x; then | |
23310 | echo '.quad 0' > conftest.s | |
23311 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' | |
23312 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
23313 | (eval $ac_try) 2>&5 | |
23314 | ac_status=$? | |
23315 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
23316 | test $ac_status = 0; }; } | |
23317 | then | |
23318 | gcc_cv_as_ix86_quad=yes | |
23319 | else | |
23320 | echo "configure: failed program was" >&5 | |
23321 | cat conftest.s >&5 | |
23322 | fi | |
23323 | rm -f conftest.o conftest.s | |
23324 | fi | |
23325 | fi | |
23326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_quad" >&5 | |
23327 | $as_echo "$gcc_cv_as_ix86_quad" >&6; } | |
23328 | if test $gcc_cv_as_ix86_quad = yes; then | |
23329 | ||
23330 | $as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h | |
23331 | ||
38ca3765 UB |
23332 | fi |
23333 | ||
5213506e RW |
23334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5 |
23335 | $as_echo_n "checking assembler for sahf mnemonic... " >&6; } | |
23336 | if test "${gcc_cv_as_ix86_sahf+set}" = set; then : | |
23337 | $as_echo_n "(cached) " >&6 | |
38ca3765 UB |
23338 | else |
23339 | gcc_cv_as_ix86_sahf=no | |
23340 | if test x$gcc_cv_as != x; then | |
953c29f7 UB |
23341 | echo '.code64 |
23342 | sahf' > conftest.s | |
e0b0fd74 | 23343 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23344 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
38ca3765 UB |
23345 | (eval $ac_try) 2>&5 |
23346 | ac_status=$? | |
5213506e RW |
23347 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23348 | test $ac_status = 0; }; } | |
38ca3765 UB |
23349 | then |
23350 | gcc_cv_as_ix86_sahf=yes | |
23351 | else | |
23352 | echo "configure: failed program was" >&5 | |
23353 | cat conftest.s >&5 | |
23354 | fi | |
23355 | rm -f conftest.o conftest.s | |
23356 | fi | |
23357 | fi | |
5213506e RW |
23358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_sahf" >&5 |
23359 | $as_echo "$gcc_cv_as_ix86_sahf" >&6; } | |
38ca3765 UB |
23360 | if test $gcc_cv_as_ix86_sahf = yes; then |
23361 | ||
5213506e | 23362 | $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h |
38ca3765 | 23363 | |
bad72d7a RH |
23364 | fi |
23365 | ||
23366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5 | |
23367 | $as_echo_n "checking assembler for swap suffix... " >&6; } | |
23368 | if test "${gcc_cv_as_ix86_swap+set}" = set; then : | |
23369 | $as_echo_n "(cached) " >&6 | |
23370 | else | |
23371 | gcc_cv_as_ix86_swap=no | |
23372 | if test x$gcc_cv_as != x; then | |
23373 | echo 'movl.s %esp, %ebp' > conftest.s | |
e0b0fd74 | 23374 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
bad72d7a RH |
23375 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
23376 | (eval $ac_try) 2>&5 | |
23377 | ac_status=$? | |
23378 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
23379 | test $ac_status = 0; }; } | |
23380 | then | |
23381 | gcc_cv_as_ix86_swap=yes | |
23382 | else | |
23383 | echo "configure: failed program was" >&5 | |
23384 | cat conftest.s >&5 | |
23385 | fi | |
23386 | rm -f conftest.o conftest.s | |
23387 | fi | |
23388 | fi | |
23389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_swap" >&5 | |
23390 | $as_echo "$gcc_cv_as_ix86_swap" >&6; } | |
23391 | if test $gcc_cv_as_ix86_swap = yes; then | |
23392 | ||
23393 | $as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h | |
23394 | ||
68b92f78 RS |
23395 | fi |
23396 | ||
5213506e RW |
23397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5 |
23398 | $as_echo_n "checking assembler for different section symbol subtraction... " >&6; } | |
23399 | if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then : | |
23400 | $as_echo_n "(cached) " >&6 | |
68b92f78 RS |
23401 | else |
23402 | gcc_cv_as_ix86_diff_sect_delta=no | |
23403 | if test x$gcc_cv_as != x; then | |
23404 | echo '.section .rodata | |
23405 | .L1: | |
23406 | .long .L2-.L1 | |
23407 | .long .L3-.L1 | |
23408 | .text | |
23409 | .L3: nop | |
23410 | .L2: nop' > conftest.s | |
e0b0fd74 | 23411 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23412 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
68b92f78 RS |
23413 | (eval $ac_try) 2>&5 |
23414 | ac_status=$? | |
5213506e RW |
23415 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23416 | test $ac_status = 0; }; } | |
68b92f78 RS |
23417 | then |
23418 | gcc_cv_as_ix86_diff_sect_delta=yes | |
23419 | else | |
23420 | echo "configure: failed program was" >&5 | |
23421 | cat conftest.s >&5 | |
23422 | fi | |
23423 | rm -f conftest.o conftest.s | |
23424 | fi | |
23425 | fi | |
5213506e RW |
23426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_diff_sect_delta" >&5 |
23427 | $as_echo "$gcc_cv_as_ix86_diff_sect_delta" >&6; } | |
68b92f78 RS |
23428 | if test $gcc_cv_as_ix86_diff_sect_delta = yes; then |
23429 | ||
5213506e | 23430 | $as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h |
68b92f78 | 23431 | |
ad9c4d9f NN |
23432 | fi |
23433 | ||
2433310d | 23434 | # These two are used unconditionally by i386.[ch]; it is to be defined |
6f3ca281 | 23435 | # to 1 if the feature is present, 0 otherwise. |
5213506e RW |
23436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5 |
23437 | $as_echo_n "checking assembler for GOTOFF in data... " >&6; } | |
23438 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then : | |
23439 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
23440 | else |
23441 | gcc_cv_as_ix86_gotoff_in_data=no | |
23442 | if test $in_tree_gas = yes; then | |
23443 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
23444 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
23445 | fi | |
23446 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 23447 | echo ' .text |
f88c65f7 RH |
23448 | .L0: |
23449 | nop | |
23450 | .data | |
8ada417f | 23451 | .long .L0@GOTOFF' > conftest.s |
e0b0fd74 | 23452 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23453 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23454 | (eval $ac_try) 2>&5 |
23455 | ac_status=$? | |
5213506e RW |
23456 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23457 | test $ac_status = 0; }; } | |
8ada417f ZW |
23458 | then |
23459 | gcc_cv_as_ix86_gotoff_in_data=yes | |
23460 | else | |
23461 | echo "configure: failed program was" >&5 | |
23462 | cat conftest.s >&5 | |
f88c65f7 | 23463 | fi |
8ada417f ZW |
23464 | rm -f conftest.o conftest.s |
23465 | fi | |
23466 | fi | |
5213506e RW |
23467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
23468 | $as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; } | |
8ada417f | 23469 | |
6f3ca281 | 23470 | |
ba479fd2 | 23471 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 23472 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 23473 | _ACEOF |
f88c65f7 | 23474 | |
2433310d RO |
23475 | |
23476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rep and lock prefix" >&5 | |
23477 | $as_echo_n "checking assembler for rep and lock prefix... " >&6; } | |
23478 | if test "${gcc_cv_as_ix86_rep_lock_prefix+set}" = set; then : | |
23479 | $as_echo_n "(cached) " >&6 | |
23480 | else | |
23481 | gcc_cv_as_ix86_rep_lock_prefix=no | |
23482 | if test x$gcc_cv_as != x; then | |
23483 | echo 'rep movsl | |
4bade865 | 23484 | lock addl %edi, (%eax,%esi) |
2433310d RO |
23485 | lock orl $0, (%esp)' > conftest.s |
23486 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' | |
23487 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
23488 | (eval $ac_try) 2>&5 | |
23489 | ac_status=$? | |
23490 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
23491 | test $ac_status = 0; }; } | |
23492 | then | |
23493 | gcc_cv_as_ix86_rep_lock_prefix=yes | |
23494 | else | |
23495 | echo "configure: failed program was" >&5 | |
23496 | cat conftest.s >&5 | |
23497 | fi | |
23498 | rm -f conftest.o conftest.s | |
23499 | fi | |
23500 | fi | |
23501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_rep_lock_prefix" >&5 | |
23502 | $as_echo "$gcc_cv_as_ix86_rep_lock_prefix" >&6; } | |
7085bfb6 | 23503 | if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then |
2433310d | 23504 | |
7085bfb6 | 23505 | $as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h |
2433310d | 23506 | |
7085bfb6 | 23507 | fi |
2433310d | 23508 | |
1cb36a98 | 23509 | ;; |
ef1ecf87 RH |
23510 | |
23511 | ia64*-*-*) | |
5213506e RW |
23512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ltoffx and ldxmov relocs" >&5 |
23513 | $as_echo_n "checking assembler for ltoffx and ldxmov relocs... " >&6; } | |
23514 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then : | |
23515 | $as_echo_n "(cached) " >&6 | |
ef1ecf87 | 23516 | else |
8ada417f ZW |
23517 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
23518 | if test $in_tree_gas = yes; then | |
23519 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
23520 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 23521 | fi |
8ada417f | 23522 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 23523 | echo ' .text |
ef1ecf87 RH |
23524 | addl r15 = @ltoffx(x#), gp |
23525 | ;; | |
cfa9ee99 | 23526 | ld8.mov r16 = [r15], x#' > conftest.s |
e0b0fd74 | 23527 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23528 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23529 | (eval $ac_try) 2>&5 |
23530 | ac_status=$? | |
5213506e RW |
23531 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23532 | test $ac_status = 0; }; } | |
8ada417f | 23533 | then |
cfa9ee99 | 23534 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
23535 | else |
23536 | echo "configure: failed program was" >&5 | |
23537 | cat conftest.s >&5 | |
2c4a9cff | 23538 | fi |
8ada417f ZW |
23539 | rm -f conftest.o conftest.s |
23540 | fi | |
23541 | fi | |
5213506e RW |
23542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
23543 | $as_echo "$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; } | |
63cf211a | 23544 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 | 23545 | |
5213506e | 23546 | $as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h |
8ada417f | 23547 | |
cfa9ee99 | 23548 | fi |
8ada417f | 23549 | |
2c4a9cff | 23550 | ;; |
8ada417f | 23551 | |
2c4a9cff | 23552 | powerpc*-*-*) |
8ada417f | 23553 | case $target in |
432218ba DE |
23554 | *-*-aix*) conftest_s=' .machine "pwr5" |
23555 | .csect .text[PR] | |
6b37db3c | 23556 | mfcr 3,128';; |
8af4d362 | 23557 | *-*-darwin*) |
5213506e RW |
23558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine directive support" >&5 |
23559 | $as_echo_n "checking assembler for .machine directive support... " >&6; } | |
23560 | if test "${gcc_cv_as_machine_directive+set}" = set; then : | |
23561 | $as_echo_n "(cached) " >&6 | |
8af4d362 PB |
23562 | else |
23563 | gcc_cv_as_machine_directive=no | |
23564 | if test x$gcc_cv_as != x; then | |
23565 | echo ' .machine ppc7400' > conftest.s | |
e0b0fd74 | 23566 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23567 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
8af4d362 PB |
23568 | (eval $ac_try) 2>&5 |
23569 | ac_status=$? | |
5213506e RW |
23570 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23571 | test $ac_status = 0; }; } | |
8af4d362 PB |
23572 | then |
23573 | gcc_cv_as_machine_directive=yes | |
23574 | else | |
23575 | echo "configure: failed program was" >&5 | |
23576 | cat conftest.s >&5 | |
23577 | fi | |
23578 | rm -f conftest.o conftest.s | |
23579 | fi | |
23580 | fi | |
5213506e RW |
23581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5 |
23582 | $as_echo "$gcc_cv_as_machine_directive" >&6; } | |
8af4d362 PB |
23583 | |
23584 | if test x$gcc_cv_as_machine_directive != xyes; then | |
23585 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
23586 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
23587 | test x$build = x$target && exit 1 | |
23588 | fi | |
23589 | conftest_s=' .text | |
6b37db3c | 23590 | mfcr r3,128';; |
4c67db14 | 23591 | *) conftest_s=' .machine power4 |
d2ab3e37 | 23592 | .text |
6b37db3c | 23593 | mfcr 3,128';; |
8ada417f | 23594 | esac |
8ada417f | 23595 | |
5213506e RW |
23596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for mfcr field support" >&5 |
23597 | $as_echo_n "checking assembler for mfcr field support... " >&6; } | |
23598 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then : | |
23599 | $as_echo_n "(cached) " >&6 | |
2c4a9cff | 23600 | else |
8ada417f ZW |
23601 | gcc_cv_as_powerpc_mfcrf=no |
23602 | if test $in_tree_gas = yes; then | |
23603 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
23604 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 23605 | fi |
8ada417f | 23606 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 23607 | echo "$conftest_s" > conftest.s |
e0b0fd74 | 23608 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23609 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
23610 | (eval $ac_try) 2>&5 |
23611 | ac_status=$? | |
5213506e RW |
23612 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23613 | test $ac_status = 0; }; } | |
8ada417f ZW |
23614 | then |
23615 | gcc_cv_as_powerpc_mfcrf=yes | |
23616 | else | |
23617 | echo "configure: failed program was" >&5 | |
23618 | cat conftest.s >&5 | |
23619 | fi | |
23620 | rm -f conftest.o conftest.s | |
23621 | fi | |
2c4a9cff | 23622 | fi |
5213506e RW |
23623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
23624 | $as_echo "$gcc_cv_as_powerpc_mfcrf" >&6; } | |
63cf211a | 23625 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 | 23626 | |
5213506e | 23627 | $as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h |
ef1ecf87 | 23628 | |
8ada417f | 23629 | fi |
432218ba DE |
23630 | |
23631 | case $target in | |
23632 | *-*-aix*) conftest_s=' .machine "pwr5" | |
23633 | .csect .text[PR] | |
23634 | popcntb 3,3';; | |
23635 | *) conftest_s=' .machine power5 | |
23636 | .text | |
23637 | popcntb 3,3';; | |
23638 | esac | |
23639 | ||
5213506e RW |
23640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntb support" >&5 |
23641 | $as_echo_n "checking assembler for popcntb support... " >&6; } | |
23642 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then : | |
23643 | $as_echo_n "(cached) " >&6 | |
432218ba DE |
23644 | else |
23645 | gcc_cv_as_powerpc_popcntb=no | |
23646 | if test $in_tree_gas = yes; then | |
23647 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
23648 | then gcc_cv_as_powerpc_popcntb=yes | |
23649 | fi | |
23650 | elif test x$gcc_cv_as != x; then | |
23651 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23652 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23653 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
432218ba DE |
23654 | (eval $ac_try) 2>&5 |
23655 | ac_status=$? | |
5213506e RW |
23656 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23657 | test $ac_status = 0; }; } | |
432218ba DE |
23658 | then |
23659 | gcc_cv_as_powerpc_popcntb=yes | |
23660 | else | |
23661 | echo "configure: failed program was" >&5 | |
23662 | cat conftest.s >&5 | |
23663 | fi | |
23664 | rm -f conftest.o conftest.s | |
23665 | fi | |
23666 | fi | |
5213506e RW |
23667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntb" >&5 |
23668 | $as_echo "$gcc_cv_as_powerpc_popcntb" >&6; } | |
432218ba DE |
23669 | if test $gcc_cv_as_powerpc_popcntb = yes; then |
23670 | ||
5213506e | 23671 | $as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h |
432218ba | 23672 | |
9719f3b7 DE |
23673 | fi |
23674 | ||
23675 | case $target in | |
23676 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
23677 | .csect .text[PR] | |
23678 | frin 1,1';; | |
1e04bfdc | 23679 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
23680 | .text |
23681 | frin 1,1';; | |
23682 | esac | |
23683 | ||
5213506e RW |
23684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fp round support" >&5 |
23685 | $as_echo_n "checking assembler for fp round support... " >&6; } | |
23686 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then : | |
23687 | $as_echo_n "(cached) " >&6 | |
9719f3b7 DE |
23688 | else |
23689 | gcc_cv_as_powerpc_fprnd=no | |
23690 | if test $in_tree_gas = yes; then | |
23691 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
23692 | then gcc_cv_as_powerpc_fprnd=yes | |
23693 | fi | |
23694 | elif test x$gcc_cv_as != x; then | |
23695 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23696 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23697 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
9719f3b7 DE |
23698 | (eval $ac_try) 2>&5 |
23699 | ac_status=$? | |
5213506e RW |
23700 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23701 | test $ac_status = 0; }; } | |
9719f3b7 DE |
23702 | then |
23703 | gcc_cv_as_powerpc_fprnd=yes | |
23704 | else | |
23705 | echo "configure: failed program was" >&5 | |
23706 | cat conftest.s >&5 | |
23707 | fi | |
23708 | rm -f conftest.o conftest.s | |
23709 | fi | |
23710 | fi | |
5213506e RW |
23711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_fprnd" >&5 |
23712 | $as_echo "$gcc_cv_as_powerpc_fprnd" >&6; } | |
9719f3b7 DE |
23713 | if test $gcc_cv_as_powerpc_fprnd = yes; then |
23714 | ||
5213506e | 23715 | $as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h |
9719f3b7 | 23716 | |
44cd321e PS |
23717 | fi |
23718 | ||
23719 | case $target in | |
23720 | *-*-aix*) conftest_s=' .machine "pwr6" | |
23721 | .csect .text[PR] | |
23722 | mffgpr 1,3';; | |
23723 | *) conftest_s=' .machine power6 | |
23724 | .text | |
23725 | mffgpr 1,3';; | |
23726 | esac | |
23727 | ||
5213506e RW |
23728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for move fp gpr support" >&5 |
23729 | $as_echo_n "checking assembler for move fp gpr support... " >&6; } | |
23730 | if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then : | |
23731 | $as_echo_n "(cached) " >&6 | |
44cd321e PS |
23732 | else |
23733 | gcc_cv_as_powerpc_mfpgpr=no | |
23734 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23735 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
44cd321e PS |
23736 | then gcc_cv_as_powerpc_mfpgpr=yes |
23737 | fi | |
23738 | elif test x$gcc_cv_as != x; then | |
23739 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23740 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 23741 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
44cd321e PS |
23742 | (eval $ac_try) 2>&5 |
23743 | ac_status=$? | |
5213506e RW |
23744 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23745 | test $ac_status = 0; }; } | |
44cd321e PS |
23746 | then |
23747 | gcc_cv_as_powerpc_mfpgpr=yes | |
23748 | else | |
23749 | echo "configure: failed program was" >&5 | |
23750 | cat conftest.s >&5 | |
23751 | fi | |
23752 | rm -f conftest.o conftest.s | |
23753 | fi | |
23754 | fi | |
5213506e RW |
23755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfpgpr" >&5 |
23756 | $as_echo "$gcc_cv_as_powerpc_mfpgpr" >&6; } | |
44cd321e PS |
23757 | if test $gcc_cv_as_powerpc_mfpgpr = yes; then |
23758 | ||
5213506e | 23759 | $as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h |
44cd321e | 23760 | |
432218ba DE |
23761 | fi |
23762 | ||
7f970b70 AM |
23763 | case $target in |
23764 | *-*-aix*) conftest_s=' .csect .text[PR] | |
23765 | LCF..0: | |
23766 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
23767 | *-*-darwin*) | |
23768 | conftest_s=' .text | |
23769 | LCF0: | |
23770 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
23771 | *) conftest_s=' .text | |
23772 | .LCF0: | |
23773 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
23774 | esac | |
23775 | ||
5213506e RW |
23776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rel16 relocs" >&5 |
23777 | $as_echo_n "checking assembler for rel16 relocs... " >&6; } | |
23778 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then : | |
23779 | $as_echo_n "(cached) " >&6 | |
695d8830 AS |
23780 | else |
23781 | gcc_cv_as_powerpc_rel16=no | |
23782 | if test $in_tree_gas = yes; then | |
23783 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
23784 | then gcc_cv_as_powerpc_rel16=yes | |
23785 | fi | |
23786 | elif test x$gcc_cv_as != x; then | |
23787 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23788 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23789 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
695d8830 AS |
23790 | (eval $ac_try) 2>&5 |
23791 | ac_status=$? | |
5213506e RW |
23792 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23793 | test $ac_status = 0; }; } | |
695d8830 AS |
23794 | then |
23795 | gcc_cv_as_powerpc_rel16=yes | |
23796 | else | |
23797 | echo "configure: failed program was" >&5 | |
23798 | cat conftest.s >&5 | |
23799 | fi | |
23800 | rm -f conftest.o conftest.s | |
23801 | fi | |
23802 | fi | |
5213506e RW |
23803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_rel16" >&5 |
23804 | $as_echo "$gcc_cv_as_powerpc_rel16" >&6; } | |
695d8830 AS |
23805 | if test $gcc_cv_as_powerpc_rel16 = yes; then |
23806 | ||
5213506e | 23807 | $as_echo "#define HAVE_AS_REL16 1" >>confdefs.h |
695d8830 AS |
23808 | |
23809 | fi | |
23810 | ||
b639c3c2 JJ |
23811 | case $target in |
23812 | *-*-aix*) conftest_s=' .machine "pwr6" | |
23813 | .csect .text[PR] | |
23814 | cmpb 3,4,5';; | |
23815 | *) conftest_s=' .machine power6 | |
23816 | .text | |
23817 | cmpb 3,4,5';; | |
23818 | esac | |
23819 | ||
5213506e RW |
23820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compare bytes support" >&5 |
23821 | $as_echo_n "checking assembler for compare bytes support... " >&6; } | |
23822 | if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then : | |
23823 | $as_echo_n "(cached) " >&6 | |
b639c3c2 JJ |
23824 | else |
23825 | gcc_cv_as_powerpc_cmpb=no | |
23826 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23827 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
b639c3c2 JJ |
23828 | then gcc_cv_as_powerpc_cmpb=yes |
23829 | fi | |
23830 | elif test x$gcc_cv_as != x; then | |
23831 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23832 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23833 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
b639c3c2 JJ |
23834 | (eval $ac_try) 2>&5 |
23835 | ac_status=$? | |
5213506e RW |
23836 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23837 | test $ac_status = 0; }; } | |
b639c3c2 JJ |
23838 | then |
23839 | gcc_cv_as_powerpc_cmpb=yes | |
23840 | else | |
23841 | echo "configure: failed program was" >&5 | |
23842 | cat conftest.s >&5 | |
23843 | fi | |
23844 | rm -f conftest.o conftest.s | |
23845 | fi | |
23846 | fi | |
5213506e RW |
23847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_cmpb" >&5 |
23848 | $as_echo "$gcc_cv_as_powerpc_cmpb" >&6; } | |
b639c3c2 JJ |
23849 | if test $gcc_cv_as_powerpc_cmpb = yes; then |
23850 | ||
5213506e | 23851 | $as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h |
b639c3c2 JJ |
23852 | |
23853 | fi | |
23854 | ||
23855 | case $target in | |
23856 | *-*-aix*) conftest_s=' .machine "pwr6" | |
23857 | .csect .text[PR] | |
0d74c0ee | 23858 | dadd 1,2,3';; |
b639c3c2 JJ |
23859 | *) conftest_s=' .machine power6 |
23860 | .text | |
0d74c0ee | 23861 | dadd 1,2,3';; |
b639c3c2 JJ |
23862 | esac |
23863 | ||
5213506e RW |
23864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for decimal float support" >&5 |
23865 | $as_echo_n "checking assembler for decimal float support... " >&6; } | |
23866 | if test "${gcc_cv_as_powerpc_dfp+set}" = set; then : | |
23867 | $as_echo_n "(cached) " >&6 | |
b639c3c2 JJ |
23868 | else |
23869 | gcc_cv_as_powerpc_dfp=no | |
23870 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23871 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
b639c3c2 JJ |
23872 | then gcc_cv_as_powerpc_dfp=yes |
23873 | fi | |
23874 | elif test x$gcc_cv_as != x; then | |
23875 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23876 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23877 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
b639c3c2 JJ |
23878 | (eval $ac_try) 2>&5 |
23879 | ac_status=$? | |
5213506e RW |
23880 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23881 | test $ac_status = 0; }; } | |
b639c3c2 JJ |
23882 | then |
23883 | gcc_cv_as_powerpc_dfp=yes | |
23884 | else | |
23885 | echo "configure: failed program was" >&5 | |
23886 | cat conftest.s >&5 | |
23887 | fi | |
23888 | rm -f conftest.o conftest.s | |
23889 | fi | |
23890 | fi | |
5213506e RW |
23891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dfp" >&5 |
23892 | $as_echo "$gcc_cv_as_powerpc_dfp" >&6; } | |
b639c3c2 JJ |
23893 | if test $gcc_cv_as_powerpc_dfp = yes; then |
23894 | ||
5213506e | 23895 | $as_echo "#define HAVE_AS_DFP 1" >>confdefs.h |
b639c3c2 | 23896 | |
d40c9e33 PB |
23897 | fi |
23898 | ||
23899 | case $target in | |
23900 | *-*-aix*) conftest_s=' .machine "pwr7" | |
23901 | .csect .text[PR] | |
23902 | lxvd2x 1,2,3';; | |
23903 | *) conftest_s=' .machine power7 | |
23904 | .text | |
23905 | lxvd2x 1,2,3';; | |
23906 | esac | |
23907 | ||
5213506e RW |
23908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for vector-scalar support" >&5 |
23909 | $as_echo_n "checking assembler for vector-scalar support... " >&6; } | |
23910 | if test "${gcc_cv_as_powerpc_vsx+set}" = set; then : | |
23911 | $as_echo_n "(cached) " >&6 | |
d40c9e33 PB |
23912 | else |
23913 | gcc_cv_as_powerpc_vsx=no | |
23914 | if test $in_tree_gas = yes; then | |
cacf1ca8 | 23915 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` |
d40c9e33 PB |
23916 | then gcc_cv_as_powerpc_vsx=yes |
23917 | fi | |
23918 | elif test x$gcc_cv_as != x; then | |
23919 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23920 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23921 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
d40c9e33 PB |
23922 | (eval $ac_try) 2>&5 |
23923 | ac_status=$? | |
5213506e RW |
23924 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23925 | test $ac_status = 0; }; } | |
d40c9e33 PB |
23926 | then |
23927 | gcc_cv_as_powerpc_vsx=yes | |
23928 | else | |
23929 | echo "configure: failed program was" >&5 | |
23930 | cat conftest.s >&5 | |
23931 | fi | |
23932 | rm -f conftest.o conftest.s | |
23933 | fi | |
23934 | fi | |
5213506e RW |
23935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_vsx" >&5 |
23936 | $as_echo "$gcc_cv_as_powerpc_vsx" >&6; } | |
d40c9e33 PB |
23937 | if test $gcc_cv_as_powerpc_vsx = yes; then |
23938 | ||
5213506e | 23939 | $as_echo "#define HAVE_AS_VSX 1" >>confdefs.h |
d40c9e33 | 23940 | |
cacf1ca8 MM |
23941 | fi |
23942 | ||
23943 | case $target in | |
23944 | *-*-aix*) conftest_s=' .machine "pwr7" | |
23945 | .csect .text[PR] | |
23946 | popcntd 3,3';; | |
23947 | *) conftest_s=' .machine power7 | |
23948 | .text | |
23949 | popcntd 3,3';; | |
23950 | esac | |
23951 | ||
5213506e RW |
23952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntd support" >&5 |
23953 | $as_echo_n "checking assembler for popcntd support... " >&6; } | |
23954 | if test "${gcc_cv_as_powerpc_popcntd+set}" = set; then : | |
23955 | $as_echo_n "(cached) " >&6 | |
cacf1ca8 MM |
23956 | else |
23957 | gcc_cv_as_powerpc_popcntd=no | |
23958 | if test $in_tree_gas = yes; then | |
23959 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` | |
23960 | then gcc_cv_as_powerpc_popcntd=yes | |
23961 | fi | |
23962 | elif test x$gcc_cv_as != x; then | |
23963 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 23964 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 23965 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
cacf1ca8 MM |
23966 | (eval $ac_try) 2>&5 |
23967 | ac_status=$? | |
5213506e RW |
23968 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
23969 | test $ac_status = 0; }; } | |
cacf1ca8 MM |
23970 | then |
23971 | gcc_cv_as_powerpc_popcntd=yes | |
23972 | else | |
23973 | echo "configure: failed program was" >&5 | |
23974 | cat conftest.s >&5 | |
23975 | fi | |
23976 | rm -f conftest.o conftest.s | |
23977 | fi | |
23978 | fi | |
5213506e RW |
23979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntd" >&5 |
23980 | $as_echo "$gcc_cv_as_powerpc_popcntd" >&6; } | |
cacf1ca8 MM |
23981 | if test $gcc_cv_as_powerpc_popcntd = yes; then |
23982 | ||
5213506e | 23983 | $as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h |
cacf1ca8 MM |
23984 | |
23985 | fi | |
23986 | ||
23987 | case $target in | |
23988 | *-*-aix*) conftest_s=' .csect .text[PR] | |
23989 | lwsync';; | |
23990 | *) conftest_s=' .text | |
23991 | lwsync';; | |
23992 | esac | |
23993 | ||
5213506e RW |
23994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for lwsync support" >&5 |
23995 | $as_echo_n "checking assembler for lwsync support... " >&6; } | |
23996 | if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then : | |
23997 | $as_echo_n "(cached) " >&6 | |
cacf1ca8 MM |
23998 | else |
23999 | gcc_cv_as_powerpc_lwsync=no | |
24000 | if test $in_tree_gas = yes; then | |
24001 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` | |
24002 | then gcc_cv_as_powerpc_lwsync=yes | |
24003 | fi | |
24004 | elif test x$gcc_cv_as != x; then | |
24005 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 24006 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
5213506e | 24007 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
cacf1ca8 MM |
24008 | (eval $ac_try) 2>&5 |
24009 | ac_status=$? | |
5213506e RW |
24010 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24011 | test $ac_status = 0; }; } | |
cacf1ca8 MM |
24012 | then |
24013 | gcc_cv_as_powerpc_lwsync=yes | |
24014 | else | |
24015 | echo "configure: failed program was" >&5 | |
24016 | cat conftest.s >&5 | |
24017 | fi | |
24018 | rm -f conftest.o conftest.s | |
24019 | fi | |
24020 | fi | |
5213506e RW |
24021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_lwsync" >&5 |
24022 | $as_echo "$gcc_cv_as_powerpc_lwsync" >&6; } | |
cacf1ca8 MM |
24023 | if test $gcc_cv_as_powerpc_lwsync = yes; then |
24024 | ||
5213506e | 24025 | $as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h |
cacf1ca8 | 24026 | |
47f67e51 PB |
24027 | fi |
24028 | ||
24029 | case $target in | |
24030 | *-*-aix*) conftest_s=' .machine "476" | |
24031 | .csect .text[PR] | |
24032 | dci 0';; | |
24033 | *) conftest_s=' .machine "476" | |
24034 | .text | |
24035 | dci 0';; | |
24036 | esac | |
24037 | ||
24038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for data cache invalidate support" >&5 | |
24039 | $as_echo_n "checking assembler for data cache invalidate support... " >&6; } | |
24040 | if test "${gcc_cv_as_powerpc_dci+set}" = set; then : | |
24041 | $as_echo_n "(cached) " >&6 | |
24042 | else | |
24043 | gcc_cv_as_powerpc_dci=no | |
24044 | if test $in_tree_gas = yes; then | |
24045 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
24046 | then gcc_cv_as_powerpc_dci=yes | |
24047 | fi | |
24048 | elif test x$gcc_cv_as != x; then | |
24049 | echo "$conftest_s" > conftest.s | |
e0b0fd74 | 24050 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' |
47f67e51 PB |
24051 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
24052 | (eval $ac_try) 2>&5 | |
24053 | ac_status=$? | |
24054 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
24055 | test $ac_status = 0; }; } | |
24056 | then | |
24057 | gcc_cv_as_powerpc_dci=yes | |
24058 | else | |
24059 | echo "configure: failed program was" >&5 | |
24060 | cat conftest.s >&5 | |
24061 | fi | |
24062 | rm -f conftest.o conftest.s | |
24063 | fi | |
24064 | fi | |
24065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dci" >&5 | |
24066 | $as_echo "$gcc_cv_as_powerpc_dci" >&6; } | |
24067 | if test $gcc_cv_as_powerpc_dci = yes; then | |
24068 | ||
24069 | $as_echo "#define HAVE_AS_DCI 1" >>confdefs.h | |
24070 | ||
e51917ae JM |
24071 | fi |
24072 | ||
5213506e RW |
24073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 |
24074 | $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } | |
24075 | if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then : | |
24076 | $as_echo_n "(cached) " >&6 | |
e51917ae JM |
24077 | else |
24078 | gcc_cv_as_powerpc_gnu_attribute=no | |
24079 | if test $in_tree_gas = yes; then | |
24080 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
24081 | then gcc_cv_as_powerpc_gnu_attribute=yes | |
24082 | fi | |
24083 | elif test x$gcc_cv_as != x; then | |
24084 | echo '.gnu_attribute 4,1' > conftest.s | |
e0b0fd74 | 24085 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24086 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
e51917ae JM |
24087 | (eval $ac_try) 2>&5 |
24088 | ac_status=$? | |
5213506e RW |
24089 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24090 | test $ac_status = 0; }; } | |
e51917ae JM |
24091 | then |
24092 | gcc_cv_as_powerpc_gnu_attribute=yes | |
24093 | else | |
24094 | echo "configure: failed program was" >&5 | |
24095 | cat conftest.s >&5 | |
24096 | fi | |
24097 | rm -f conftest.o conftest.s | |
24098 | fi | |
24099 | fi | |
5213506e RW |
24100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_gnu_attribute" >&5 |
24101 | $as_echo "$gcc_cv_as_powerpc_gnu_attribute" >&6; } | |
e51917ae JM |
24102 | if test $gcc_cv_as_powerpc_gnu_attribute = yes; then |
24103 | ||
5213506e | 24104 | $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h |
e51917ae | 24105 | |
9752c4ad AM |
24106 | fi |
24107 | ||
5213506e RW |
24108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5 |
24109 | $as_echo_n "checking assembler for tls marker support... " >&6; } | |
24110 | if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then : | |
24111 | $as_echo_n "(cached) " >&6 | |
9752c4ad AM |
24112 | else |
24113 | gcc_cv_as_powerpc_tls_markers=no | |
24114 | if test $in_tree_gas = yes; then | |
207bf79d | 24115 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0` |
9752c4ad AM |
24116 | then gcc_cv_as_powerpc_tls_markers=yes |
24117 | fi | |
24118 | elif test x$gcc_cv_as != x; then | |
24119 | echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s | |
e0b0fd74 | 24120 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24121 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
9752c4ad AM |
24122 | (eval $ac_try) 2>&5 |
24123 | ac_status=$? | |
5213506e RW |
24124 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24125 | test $ac_status = 0; }; } | |
9752c4ad AM |
24126 | then |
24127 | gcc_cv_as_powerpc_tls_markers=yes | |
24128 | else | |
24129 | echo "configure: failed program was" >&5 | |
24130 | cat conftest.s >&5 | |
24131 | fi | |
24132 | rm -f conftest.o conftest.s | |
24133 | fi | |
24134 | fi | |
5213506e RW |
24135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_tls_markers" >&5 |
24136 | $as_echo "$gcc_cv_as_powerpc_tls_markers" >&6; } | |
9752c4ad AM |
24137 | if test $gcc_cv_as_powerpc_tls_markers = yes; then |
24138 | ||
5213506e | 24139 | $as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h |
9752c4ad | 24140 | |
7f970b70 | 24141 | fi |
636cf8b1 RS |
24142 | |
24143 | case $target in | |
24144 | *-*-aix*) | |
24145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5 | |
24146 | $as_echo_n "checking assembler for .ref support... " >&6; } | |
24147 | if test "${gcc_cv_as_aix_ref+set}" = set; then : | |
24148 | $as_echo_n "(cached) " >&6 | |
24149 | else | |
24150 | gcc_cv_as_aix_ref=no | |
24151 | if test $in_tree_gas = yes; then | |
24152 | if test $gcc_cv_gas_vers -ge `expr \( \( 2.21.0 \* 1000 \) + gcc_cv_as_aix_ref=yes \) \* 1000 + ` | |
24153 | then : | |
24154 | fi | |
24155 | elif test x$gcc_cv_as != x; then | |
24156 | echo ' .csect stuff[rw] | |
24157 | stuff: | |
24158 | .long 1 | |
24159 | .extern sym | |
24160 | .ref sym | |
24161 | ' > conftest.s | |
24162 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' | |
24163 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | |
24164 | (eval $ac_try) 2>&5 | |
24165 | ac_status=$? | |
24166 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
24167 | test $ac_status = 0; }; } | |
24168 | then | |
24169 | gcc_cv_as_aix_ref=yes | |
24170 | else | |
24171 | echo "configure: failed program was" >&5 | |
24172 | cat conftest.s >&5 | |
24173 | fi | |
24174 | rm -f conftest.o conftest.s | |
24175 | fi | |
24176 | fi | |
24177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aix_ref" >&5 | |
24178 | $as_echo "$gcc_cv_as_aix_ref" >&6; } | |
24179 | if test $gcc_cv_as_aix_ref = yes; then | |
24180 | ||
24181 | $as_echo "#define HAVE_AS_REF 1" >>confdefs.h | |
24182 | ||
24183 | fi | |
24184 | ;; | |
24185 | esac | |
8ada417f ZW |
24186 | ;; |
24187 | ||
24188 | mips*-*-*) | |
5213506e RW |
24189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5 |
24190 | $as_echo_n "checking assembler for explicit relocation support... " >&6; } | |
24191 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then : | |
24192 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24193 | else |
24194 | gcc_cv_as_mips_explicit_relocs=no | |
24195 | if test $in_tree_gas = yes; then | |
24196 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
24197 | then gcc_cv_as_mips_explicit_relocs=yes | |
24198 | fi | |
24199 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 24200 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
e0b0fd74 | 24201 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24202 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24203 | (eval $ac_try) 2>&5 |
24204 | ac_status=$? | |
5213506e RW |
24205 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24206 | test $ac_status = 0; }; } | |
8ada417f ZW |
24207 | then |
24208 | gcc_cv_as_mips_explicit_relocs=yes | |
24209 | else | |
24210 | echo "configure: failed program was" >&5 | |
24211 | cat conftest.s >&5 | |
ef1ecf87 | 24212 | fi |
8ada417f ZW |
24213 | rm -f conftest.o conftest.s |
24214 | fi | |
24215 | fi | |
5213506e RW |
24216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
24217 | $as_echo "$gcc_cv_as_mips_explicit_relocs" >&6; } | |
8ada417f ZW |
24218 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
24219 | if test x$target_cpu_default = x | |
24220 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
24221 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
24222 | fi | |
4551169f | 24223 | fi |
5213506e RW |
24224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5 |
24225 | $as_echo_n "checking assembler for -mno-shared support... " >&6; } | |
24226 | if test "${gcc_cv_as_mips_no_shared+set}" = set; then : | |
24227 | $as_echo_n "(cached) " >&6 | |
4551169f RS |
24228 | else |
24229 | gcc_cv_as_mips_no_shared=no | |
24230 | if test $in_tree_gas = yes; then | |
24231 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` | |
24232 | then gcc_cv_as_mips_no_shared=yes | |
24233 | fi | |
24234 | elif test x$gcc_cv_as != x; then | |
24235 | echo 'nop' > conftest.s | |
e0b0fd74 | 24236 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mno-shared -o conftest.o conftest.s >&5' |
5213506e | 24237 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
4551169f RS |
24238 | (eval $ac_try) 2>&5 |
24239 | ac_status=$? | |
5213506e RW |
24240 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24241 | test $ac_status = 0; }; } | |
4551169f RS |
24242 | then |
24243 | gcc_cv_as_mips_no_shared=yes | |
24244 | else | |
24245 | echo "configure: failed program was" >&5 | |
24246 | cat conftest.s >&5 | |
24247 | fi | |
24248 | rm -f conftest.o conftest.s | |
24249 | fi | |
24250 | fi | |
5213506e RW |
24251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_no_shared" >&5 |
24252 | $as_echo "$gcc_cv_as_mips_no_shared" >&6; } | |
4551169f RS |
24253 | if test $gcc_cv_as_mips_no_shared = yes; then |
24254 | ||
5213506e | 24255 | $as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h |
4551169f | 24256 | |
dcb957d9 JM |
24257 | fi |
24258 | ||
5213506e RW |
24259 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 |
24260 | $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } | |
24261 | if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then : | |
24262 | $as_echo_n "(cached) " >&6 | |
dcb957d9 JM |
24263 | else |
24264 | gcc_cv_as_mips_gnu_attribute=no | |
24265 | if test $in_tree_gas = yes; then | |
24266 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
24267 | then gcc_cv_as_mips_gnu_attribute=yes | |
24268 | fi | |
24269 | elif test x$gcc_cv_as != x; then | |
24270 | echo '.gnu_attribute 4,1' > conftest.s | |
e0b0fd74 | 24271 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24272 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
dcb957d9 JM |
24273 | (eval $ac_try) 2>&5 |
24274 | ac_status=$? | |
5213506e RW |
24275 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24276 | test $ac_status = 0; }; } | |
dcb957d9 JM |
24277 | then |
24278 | gcc_cv_as_mips_gnu_attribute=yes | |
24279 | else | |
24280 | echo "configure: failed program was" >&5 | |
24281 | cat conftest.s >&5 | |
24282 | fi | |
24283 | rm -f conftest.o conftest.s | |
24284 | fi | |
24285 | fi | |
5213506e RW |
24286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_gnu_attribute" >&5 |
24287 | $as_echo "$gcc_cv_as_mips_gnu_attribute" >&6; } | |
dcb957d9 JM |
24288 | if test $gcc_cv_as_mips_gnu_attribute = yes; then |
24289 | ||
5213506e | 24290 | $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h |
dcb957d9 | 24291 | |
a44380d2 JM |
24292 | fi |
24293 | ||
5213506e RW |
24294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5 |
24295 | $as_echo_n "checking assembler for .dtprelword support... " >&6; } | |
24296 | if test "${gcc_cv_as_mips_dtprelword+set}" = set; then : | |
24297 | $as_echo_n "(cached) " >&6 | |
a44380d2 JM |
24298 | else |
24299 | gcc_cv_as_mips_dtprelword=no | |
24300 | if test $in_tree_gas = yes; then | |
24301 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
24302 | then gcc_cv_as_mips_dtprelword=yes | |
24303 | fi | |
24304 | elif test x$gcc_cv_as != x; then | |
24305 | echo '.section .tdata,"awT",@progbits | |
24306 | x: | |
24307 | .word 2 | |
24308 | .text | |
24309 | .dtprelword x+0x8000' > conftest.s | |
e0b0fd74 | 24310 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24311 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
a44380d2 JM |
24312 | (eval $ac_try) 2>&5 |
24313 | ac_status=$? | |
5213506e RW |
24314 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24315 | test $ac_status = 0; }; } | |
a44380d2 JM |
24316 | then |
24317 | gcc_cv_as_mips_dtprelword=yes | |
24318 | else | |
24319 | echo "configure: failed program was" >&5 | |
24320 | cat conftest.s >&5 | |
24321 | fi | |
24322 | rm -f conftest.o conftest.s | |
24323 | fi | |
24324 | fi | |
5213506e RW |
24325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_dtprelword" >&5 |
24326 | $as_echo "$gcc_cv_as_mips_dtprelword" >&6; } | |
a44380d2 JM |
24327 | if test $gcc_cv_as_mips_dtprelword = yes; then |
24328 | ||
5213506e | 24329 | $as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h |
a44380d2 | 24330 | |
8ada417f | 24331 | fi |
b53da244 AN |
24332 | |
24333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5 | |
24334 | $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; } | |
24335 | gcc_cv_as_ld_jalr_reloc=no | |
24336 | if test $gcc_cv_as_mips_explicit_relocs = yes; then | |
24337 | if test $in_tree_ld = yes ; then | |
24338 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 20 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
24339 | && test $in_tree_ld_is_elf = yes; then | |
24340 | gcc_cv_as_ld_jalr_reloc=yes | |
24341 | fi | |
24342 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then | |
24343 | echo ' .ent x' > conftest.s | |
24344 | echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s | |
24345 | echo ' ld $25,%call16(y)($28)' >> conftest.s | |
24346 | echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s | |
24347 | echo '1: jalr $25' >> conftest.s | |
24348 | echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s | |
24349 | echo '1: jalr $25' >> conftest.s | |
24350 | echo ' .end x' >> conftest.s | |
24351 | if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&5 \ | |
24352 | && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&5; then | |
bc492e47 RO |
24353 | if $gcc_cv_objdump -d conftest.so | grep jalr >/dev/null 2>&1 \ |
24354 | && $gcc_cv_objdump -d conftest.so | grep "bal.*<x>" >/dev/null 2>&1; then | |
b53da244 AN |
24355 | gcc_cv_as_ld_jalr_reloc=yes |
24356 | fi | |
24357 | fi | |
24358 | rm -f conftest.* | |
24359 | fi | |
24360 | fi | |
24361 | if test $gcc_cv_as_ld_jalr_reloc = yes; then | |
24362 | if test x$target_cpu_default = x; then | |
24363 | target_cpu_default=MASK_RELAX_PIC_CALLS | |
24364 | else | |
24365 | target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" | |
24366 | fi | |
24367 | fi | |
24368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 | |
24369 | $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } | |
49576e25 RS |
24370 | |
24371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .eh_frame personality relaxation" >&5 | |
24372 | $as_echo_n "checking linker for .eh_frame personality relaxation... " >&6; } | |
24373 | if test "${gcc_cv_ld_mips_personality_relaxation+set}" = set; then : | |
24374 | $as_echo_n "(cached) " >&6 | |
24375 | else | |
24376 | gcc_cv_ld_mips_personality_relaxation=no | |
24377 | if test $in_tree_ld = yes ; then | |
24378 | if test "$gcc_cv_gld_major_version" -eq 2 \ | |
24379 | -a "$gcc_cv_gld_minor_version" -ge 21 \ | |
24380 | -o "$gcc_cv_gld_major_version" -gt 2; then | |
24381 | gcc_cv_ld_mips_personality_relaxation=yes | |
24382 | fi | |
24383 | elif test x$gcc_cv_as != x \ | |
24384 | -a x$gcc_cv_ld != x \ | |
24385 | -a x$gcc_cv_readelf != x ; then | |
24386 | cat > conftest.s <<EOF | |
24387 | .cfi_startproc | |
24388 | .cfi_personality 0x80,indirect_ptr | |
24389 | .ent test | |
24390 | test: | |
24391 | nop | |
24392 | .end test | |
24393 | .cfi_endproc | |
24394 | ||
24395 | .section .data,"aw",@progbits | |
24396 | indirect_ptr: | |
24397 | .dc.a personality | |
24398 | EOF | |
24399 | if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
24400 | && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then | |
24401 | if $gcc_cv_readelf -d conftest 2>&1 \ | |
24402 | | grep TEXTREL > /dev/null 2>&1; then | |
24403 | : | |
24404 | elif $gcc_cv_readelf --relocs conftest 2>&1 \ | |
24405 | | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then | |
24406 | : | |
24407 | else | |
24408 | gcc_cv_ld_mips_personality_relaxation=yes | |
24409 | fi | |
24410 | fi | |
24411 | fi | |
24412 | rm -f conftest.s conftest.o conftest | |
24413 | fi | |
24414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_mips_personality_relaxation" >&5 | |
24415 | $as_echo "$gcc_cv_ld_mips_personality_relaxation" >&6; } | |
24416 | if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then | |
24417 | ||
24418 | $as_echo "#define HAVE_LD_PERSONALITY_RELAXATION 1" >>confdefs.h | |
24419 | ||
24420 | fi | |
dbad5e72 SE |
24421 | ;; |
24422 | esac | |
8ada417f | 24423 | |
dbad5e72 SE |
24424 | # Mips and HP-UX need the GNU assembler. |
24425 | # Linux on IA64 might be able to use the Intel assembler. | |
24426 | ||
24427 | case "$target" in | |
24428 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
24429 | if test x$gas_flag = xyes \ |
24430 | || test x"$host" != x"$build" \ | |
24431 | || test ! -x "$gcc_cv_as" \ | |
24432 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
24433 | : | |
24434 | else | |
24435 | echo "*** This configuration requires the GNU assembler" >&2 | |
24436 | exit 1 | |
24437 | fi | |
ef1ecf87 | 24438 | ;; |
1cb36a98 | 24439 | esac |
dbad5e72 | 24440 | |
9d147085 RH |
24441 | # ??? Not all targets support dwarf2 debug_line, even within a version |
24442 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
24443 | # info to the output file. So, as supported targets are added to gas 2.11, | |
24444 | # add some instruction here to (also) show we expect this might work. | |
24445 | # ??? Once 2.11 is released, probably need to add first known working | |
24446 | # version to the per-target configury. | |
24447 | case "$target" in | |
80486e06 | 24448 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
cd985f66 | 24449 | | x86_64*-*-* | hppa*-*-* | arm*-*-* \ |
ad9646c7 | 24450 | | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \ |
15a43677 | 24451 | | spu-*-* | fido*-*-* | m32c-*-*) |
9d147085 RH |
24452 | insn="nop" |
24453 | ;; | |
57116d8d | 24454 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
24455 | insn="nop 0" |
24456 | ;; | |
2853bc5a HPN |
24457 | mmix-*-*) |
24458 | insn="swym 0" | |
24459 | ;; | |
8ada417f ZW |
24460 | esac |
24461 | if test x"$insn" != x; then | |
24462 | conftest_s="\ | |
24463 | .file 1 \"conftest.s\" | |
24464 | .loc 1 3 0 | |
24465 | $insn" | |
5213506e RW |
24466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for dwarf2 debug_line support" >&5 |
24467 | $as_echo_n "checking assembler for dwarf2 debug_line support... " >&6; } | |
24468 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then : | |
24469 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24470 | else |
24471 | gcc_cv_as_dwarf2_debug_line=no | |
24472 | if test $in_tree_gas = yes; then | |
24473 | if test $in_tree_gas_is_elf = yes \ | |
24474 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
24475 | then gcc_cv_as_dwarf2_debug_line=yes | |
24476 | fi | |
24477 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 24478 | echo "$conftest_s" > conftest.s |
e0b0fd74 | 24479 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24480 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24481 | (eval $ac_try) 2>&5 |
24482 | ac_status=$? | |
5213506e RW |
24483 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24484 | test $ac_status = 0; }; } | |
8ada417f | 24485 | then |
080a5bb0 EB |
24486 | if test x$gcc_cv_objdump != x \ |
24487 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
24488 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
24489 | gcc_cv_as_dwarf2_debug_line=yes |
24490 | fi | |
24491 | else | |
24492 | echo "configure: failed program was" >&5 | |
24493 | cat conftest.s >&5 | |
24494 | fi | |
24495 | rm -f conftest.o conftest.s | |
24496 | fi | |
24497 | fi | |
5213506e RW |
24498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
24499 | $as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; } | |
ad9c4d9f | 24500 | |
ad9c4d9f | 24501 | |
8ada417f ZW |
24502 | # The .debug_line file table must be in the exact order that |
24503 | # we specified the files, since these indices are also used | |
24504 | # by DW_AT_decl_file. Approximate this test by testing if | |
24505 | # the assembler bitches if the same index is assigned twice. | |
5213506e RW |
24506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for buggy dwarf2 .file directive" >&5 |
24507 | $as_echo_n "checking assembler for buggy dwarf2 .file directive... " >&6; } | |
24508 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then : | |
24509 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24510 | else |
24511 | gcc_cv_as_dwarf2_file_buggy=no | |
24512 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 24513 | echo ' .file 1 "foo.s" |
8ada417f | 24514 | .file 1 "bar.s"' > conftest.s |
e0b0fd74 | 24515 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24516 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24517 | (eval $ac_try) 2>&5 |
24518 | ac_status=$? | |
5213506e RW |
24519 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24520 | test $ac_status = 0; }; } | |
8ada417f ZW |
24521 | then |
24522 | gcc_cv_as_dwarf2_file_buggy=yes | |
24523 | else | |
24524 | echo "configure: failed program was" >&5 | |
24525 | cat conftest.s >&5 | |
24526 | fi | |
24527 | rm -f conftest.o conftest.s | |
24528 | fi | |
ad9c4d9f | 24529 | fi |
5213506e RW |
24530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
24531 | $as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; } | |
8ada417f ZW |
24532 | |
24533 | ||
24534 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
24535 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 | 24536 | |
5213506e | 24537 | $as_echo "#define HAVE_AS_DWARF2_DEBUG_LINE 1" >>confdefs.h |
9d147085 | 24538 | |
8ada417f | 24539 | fi |
ad9c4d9f | 24540 | |
5213506e RW |
24541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf2 option" >&5 |
24542 | $as_echo_n "checking assembler for --gdwarf2 option... " >&6; } | |
24543 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then : | |
24544 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24545 | else |
24546 | gcc_cv_as_gdwarf2_flag=no | |
24547 | if test $in_tree_gas = yes; then | |
24548 | if test $in_tree_gas_is_elf = yes \ | |
24549 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
24550 | then gcc_cv_as_gdwarf2_flag=yes | |
24551 | fi | |
24552 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 24553 | echo "$insn" > conftest.s |
e0b0fd74 | 24554 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf2 -o conftest.o conftest.s >&5' |
5213506e | 24555 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24556 | (eval $ac_try) 2>&5 |
24557 | ac_status=$? | |
5213506e RW |
24558 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24559 | test $ac_status = 0; }; } | |
8ada417f ZW |
24560 | then |
24561 | gcc_cv_as_gdwarf2_flag=yes | |
24562 | else | |
24563 | echo "configure: failed program was" >&5 | |
24564 | cat conftest.s >&5 | |
24565 | fi | |
24566 | rm -f conftest.o conftest.s | |
24567 | fi | |
ad9c4d9f | 24568 | fi |
5213506e RW |
24569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gdwarf2_flag" >&5 |
24570 | $as_echo "$gcc_cv_as_gdwarf2_flag" >&6; } | |
63cf211a | 24571 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 | 24572 | |
5213506e | 24573 | $as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h |
5f0e9ea2 GK |
24574 | |
24575 | fi | |
ad9c4d9f | 24576 | |
5213506e RW |
24577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5 |
24578 | $as_echo_n "checking assembler for --gstabs option... " >&6; } | |
24579 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then : | |
24580 | $as_echo_n "(cached) " >&6 | |
8ada417f ZW |
24581 | else |
24582 | gcc_cv_as_gstabs_flag=no | |
24583 | if test $in_tree_gas = yes; then | |
24584 | if test $in_tree_gas_is_elf = yes \ | |
24585 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
24586 | then gcc_cv_as_gstabs_flag=yes | |
24587 | fi | |
24588 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 24589 | echo "$insn" > conftest.s |
e0b0fd74 | 24590 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gstabs -o conftest.o conftest.s >&5' |
5213506e | 24591 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24592 | (eval $ac_try) 2>&5 |
24593 | ac_status=$? | |
5213506e RW |
24594 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24595 | test $ac_status = 0; }; } | |
8ada417f ZW |
24596 | then |
24597 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
24598 | # and warns about it, but still exits successfully. So check for | |
24599 | # this. | |
ba479fd2 | 24600 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
5213506e | 24601 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
ba479fd2 NN |
24602 | (eval $ac_try) 2>&5 |
24603 | ac_status=$? | |
5213506e RW |
24604 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24605 | test $ac_status = 0; }; } | |
8ada417f ZW |
24606 | then : |
24607 | else gcc_cv_as_gstabs_flag=yes | |
24608 | fi | |
24609 | else | |
24610 | echo "configure: failed program was" >&5 | |
24611 | cat conftest.s >&5 | |
24612 | fi | |
24613 | rm -f conftest.o conftest.s | |
24614 | fi | |
ad9c4d9f | 24615 | fi |
5213506e RW |
24616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gstabs_flag" >&5 |
24617 | $as_echo "$gcc_cv_as_gstabs_flag" >&6; } | |
63cf211a | 24618 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 | 24619 | |
5213506e | 24620 | $as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h |
5f0e9ea2 | 24621 | |
c8aea42c PB |
24622 | fi |
24623 | ||
5213506e RW |
24624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5 |
24625 | $as_echo_n "checking assembler for --debug-prefix-map option... " >&6; } | |
24626 | if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then : | |
24627 | $as_echo_n "(cached) " >&6 | |
c8aea42c PB |
24628 | else |
24629 | gcc_cv_as_debug_prefix_map_flag=no | |
24630 | if test $in_tree_gas = yes; then | |
303a4698 | 24631 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` |
c8aea42c PB |
24632 | then gcc_cv_as_debug_prefix_map_flag=yes |
24633 | fi | |
24634 | elif test x$gcc_cv_as != x; then | |
24635 | echo "$insn" > conftest.s | |
e0b0fd74 | 24636 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags --debug-prefix-map /a=/b -o conftest.o conftest.s >&5' |
5213506e | 24637 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
c8aea42c PB |
24638 | (eval $ac_try) 2>&5 |
24639 | ac_status=$? | |
5213506e RW |
24640 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24641 | test $ac_status = 0; }; } | |
c8aea42c PB |
24642 | then |
24643 | gcc_cv_as_debug_prefix_map_flag=yes | |
24644 | else | |
24645 | echo "configure: failed program was" >&5 | |
24646 | cat conftest.s >&5 | |
24647 | fi | |
24648 | rm -f conftest.o conftest.s | |
24649 | fi | |
24650 | fi | |
5213506e RW |
24651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_debug_prefix_map_flag" >&5 |
24652 | $as_echo "$gcc_cv_as_debug_prefix_map_flag" >&6; } | |
c8aea42c PB |
24653 | if test $gcc_cv_as_debug_prefix_map_flag = yes; then |
24654 | ||
5213506e | 24655 | $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h |
c8aea42c | 24656 | |
5f0e9ea2 | 24657 | fi |
8ada417f | 24658 | fi |
5f0e9ea2 | 24659 | |
5213506e RW |
24660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5 |
24661 | $as_echo_n "checking assembler for .lcomm with alignment... " >&6; } | |
24662 | if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then : | |
24663 | $as_echo_n "(cached) " >&6 | |
28e6bb13 NC |
24664 | else |
24665 | gcc_cv_as_lcomm_with_alignment=no | |
24666 | if test x$gcc_cv_as != x; then | |
24667 | echo '.lcomm bar,4,16' > conftest.s | |
e0b0fd74 | 24668 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24669 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
28e6bb13 NC |
24670 | (eval $ac_try) 2>&5 |
24671 | ac_status=$? | |
5213506e RW |
24672 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24673 | test $ac_status = 0; }; } | |
28e6bb13 NC |
24674 | then |
24675 | gcc_cv_as_lcomm_with_alignment=yes | |
24676 | else | |
24677 | echo "configure: failed program was" >&5 | |
24678 | cat conftest.s >&5 | |
24679 | fi | |
24680 | rm -f conftest.o conftest.s | |
24681 | fi | |
24682 | fi | |
5213506e RW |
24683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_lcomm_with_alignment" >&5 |
24684 | $as_echo "$gcc_cv_as_lcomm_with_alignment" >&6; } | |
28e6bb13 NC |
24685 | if test $gcc_cv_as_lcomm_with_alignment = yes; then |
24686 | ||
5213506e | 24687 | $as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h |
28e6bb13 NC |
24688 | |
24689 | fi | |
24690 | ||
5213506e RW |
24691 | # Check whether --enable-gnu-unique-object was given. |
24692 | if test "${enable_gnu_unique_object+set}" = set; then : | |
24693 | enableval=$enable_gnu_unique_object; case $enable_gnu_unique_object in | |
e31bcd1b | 24694 | yes | no) ;; |
5213506e RW |
24695 | *) as_fn_error "'$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object. |
24696 | Valid choices are 'yes' and 'no'." "$LINENO" 5 ;; | |
e31bcd1b JM |
24697 | esac |
24698 | else | |
5213506e RW |
24699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_unique_object" >&5 |
24700 | $as_echo_n "checking assembler for gnu_unique_object... " >&6; } | |
24701 | if test "${gcc_cv_as_gnu_unique_object+set}" = set; then : | |
24702 | $as_echo_n "(cached) " >&6 | |
e31bcd1b JM |
24703 | else |
24704 | gcc_cv_as_gnu_unique_object=no | |
24705 | if test $in_tree_gas = yes; then | |
24706 | if test $in_tree_gas_is_elf = yes \ | |
24707 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52` | |
24708 | then gcc_cv_as_gnu_unique_object=yes | |
24709 | fi | |
24710 | elif test x$gcc_cv_as != x; then | |
24711 | echo '.type foo, @gnu_unique_object' > conftest.s | |
e0b0fd74 | 24712 | if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' |
5213506e | 24713 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
e31bcd1b JM |
24714 | (eval $ac_try) 2>&5 |
24715 | ac_status=$? | |
5213506e RW |
24716 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24717 | test $ac_status = 0; }; } | |
e31bcd1b | 24718 | then |
e00ded68 | 24719 | gcc_cv_as_gnu_unique_object=yes |
e31bcd1b JM |
24720 | else |
24721 | echo "configure: failed program was" >&5 | |
24722 | cat conftest.s >&5 | |
24723 | fi | |
24724 | rm -f conftest.o conftest.s | |
24725 | fi | |
24726 | fi | |
5213506e RW |
24727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5 |
24728 | $as_echo "$gcc_cv_as_gnu_unique_object" >&6; } | |
e31bcd1b | 24729 | if test $gcc_cv_as_gnu_unique_object = yes; then |
e00ded68 JM |
24730 | # Also check for ld.so support, i.e. glibc 2.11 or higher. |
24731 | if test x$host = x$build -a x$host = x$target && | |
cdf6bfb7 | 24732 | glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then |
1a242e3c UB |
24733 | glibcmajor=`expr "$glibcver" : "\([0-9]*\)"` |
24734 | glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"` | |
e00ded68 JM |
24735 | glibcnum=`expr $glibcmajor \* 1000 + $glibcminor` |
24736 | if test "$glibcnum" -ge 2011 ; then | |
24737 | enable_gnu_unique_object=yes | |
24738 | fi | |
24739 | fi | |
e31bcd1b | 24740 | fi |
5213506e RW |
24741 | fi |
24742 | ||
e31bcd1b JM |
24743 | if test x$enable_gnu_unique_object = xyes; then |
24744 | ||
5213506e | 24745 | $as_echo "#define HAVE_GAS_GNU_UNIQUE_OBJECT 1" >>confdefs.h |
e31bcd1b JM |
24746 | |
24747 | fi | |
24748 | ||
5213506e RW |
24749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tolerance to line number 0" >&5 |
24750 | $as_echo_n "checking assembler for tolerance to line number 0... " >&6; } | |
24751 | if test "${gcc_cv_as_line_zero+set}" = set; then : | |
24752 | $as_echo_n "(cached) " >&6 | |
03943c05 AO |
24753 | else |
24754 | gcc_cv_as_line_zero=no | |
24755 | if test $in_tree_gas = yes; then | |
cf0eb7a1 AO |
24756 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91` |
24757 | then gcc_cv_as_line_zero=yes | |
03943c05 AO |
24758 | fi |
24759 | elif test "x$gcc_cv_as" != x; then | |
24760 | { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s | |
24761 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out' | |
5213506e | 24762 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 |
03943c05 AO |
24763 | (eval $ac_try) 2>&5 |
24764 | ac_status=$? | |
5213506e RW |
24765 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
24766 | test $ac_status = 0; }; } && | |
03943c05 AO |
24767 | test "x`cat conftest.out`" = x |
24768 | then | |
24769 | gcc_cv_as_line_zero=yes | |
24770 | else | |
24771 | echo "configure: failed program was" >&5 | |
24772 | cat conftest.s >&5 | |
24773 | echo "configure: error output was" >&5 | |
24774 | cat conftest.out >&5 | |
24775 | fi | |
24776 | rm -f conftest.o conftest.s conftest.out | |
24777 | fi | |
24778 | fi | |
5213506e RW |
24779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_line_zero" >&5 |
24780 | $as_echo "$gcc_cv_as_line_zero" >&6; } | |
03943c05 AO |
24781 | if test "x$gcc_cv_as_line_zero" = xyes; then |
24782 | ||
5213506e | 24783 | $as_echo "#define HAVE_AS_LINE_ZERO 1" >>confdefs.h |
03943c05 AO |
24784 | |
24785 | fi | |
24786 | ||
5213506e RW |
24787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker PT_GNU_EH_FRAME support" >&5 |
24788 | $as_echo_n "checking linker PT_GNU_EH_FRAME support... " >&6; } | |
275b60d6 | 24789 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 24790 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
24791 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \ |
24792 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
24793 | gcc_cv_ld_eh_frame_hdr=yes |
24794 | fi | |
24795 | elif test x$gcc_cv_ld != x; then | |
24796 | # Check if linker supports --eh-frame-hdr option | |
24797 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
24798 | gcc_cv_ld_eh_frame_hdr=yes | |
24799 | fi | |
24800 | fi | |
232b67d9 | 24801 | |
275b60d6 | 24802 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 | 24803 | |
5213506e | 24804 | $as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h |
275b60d6 JJ |
24805 | |
24806 | fi | |
5213506e RW |
24807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
24808 | $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; } | |
275b60d6 | 24809 | |
5213506e RW |
24810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker position independent executable support" >&5 |
24811 | $as_echo_n "checking linker position independent executable support... " >&6; } | |
24a4dd31 JJ |
24812 | gcc_cv_ld_pie=no |
24813 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
24814 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \ |
24815 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
24816 | gcc_cv_ld_pie=yes |
24817 | fi | |
24818 | elif test x$gcc_cv_ld != x; then | |
24819 | # Check if linker supports -pie option | |
24820 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
24821 | gcc_cv_ld_pie=yes | |
24822 | fi | |
24823 | fi | |
24824 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 | 24825 | |
5213506e | 24826 | $as_echo "#define HAVE_LD_PIE 1" >>confdefs.h |
24a4dd31 JJ |
24827 | |
24828 | fi | |
5213506e RW |
24829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_pie" >&5 |
24830 | $as_echo "$gcc_cv_ld_pie" >&6; } | |
24a4dd31 | 24831 | |
5213506e RW |
24832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker EH-compatible garbage collection of sections" >&5 |
24833 | $as_echo_n "checking linker EH-compatible garbage collection of sections... " >&6; } | |
22ba88ef | 24834 | gcc_cv_ld_eh_gc_sections=no |
b639c3c2 JJ |
24835 | if test $in_tree_ld = yes ; then |
24836 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
24837 | && test $in_tree_ld_is_elf = yes; then | |
24838 | gcc_cv_ld_eh_gc_sections=yes | |
24839 | fi | |
24840 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
24841 | cat > conftest.s <<EOF | |
24842 | .section .text | |
24843 | .globl _start | |
24844 | .type _start, @function | |
24845 | _start: | |
24846 | .long foo | |
24847 | .size _start, .-_start | |
24848 | .section .text.foo,"ax",@progbits | |
24849 | .type foo, @function | |
24850 | foo: | |
24851 | .long 0 | |
24852 | .size foo, .-foo | |
24853 | .section .gcc_except_table.foo,"a",@progbits | |
24854 | .L0: | |
24855 | .long 0 | |
24856 | .section .eh_frame,"a",@progbits | |
24857 | .long .L0 | |
24858 | EOF | |
24859 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
24860 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
24861 | | grep "gc-sections option ignored" > /dev/null; then | |
24862 | gcc_cv_ld_eh_gc_sections=no | |
2e2b183b RO |
24863 | elif $gcc_cv_objdump -h conftest 2> /dev/null \ |
24864 | | grep gcc_except_table > /dev/null; then | |
b639c3c2 JJ |
24865 | gcc_cv_ld_eh_gc_sections=yes |
24866 | # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections. | |
24867 | if test x$gcc_cv_as_comdat_group != xyes; then | |
24868 | gcc_cv_ld_eh_gc_sections=no | |
24869 | cat > conftest.s <<EOF | |
24870 | .section .text | |
24871 | .globl _start | |
24872 | .type _start, @function | |
24873 | _start: | |
24874 | .long foo | |
24875 | .size _start, .-_start | |
24876 | .section .gnu.linkonce.t.foo,"ax",@progbits | |
24877 | .type foo, @function | |
24878 | foo: | |
24879 | .long 0 | |
24880 | .size foo, .-foo | |
24881 | .section .gcc_except_table.foo,"a",@progbits | |
24882 | .L0: | |
24883 | .long 0 | |
24884 | .section .eh_frame,"a",@progbits | |
24885 | .long .L0 | |
24886 | EOF | |
24887 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
24888 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
24889 | | grep "gc-sections option ignored" > /dev/null; then | |
24890 | gcc_cv_ld_eh_gc_sections=no | |
2e2b183b RO |
24891 | elif $gcc_cv_objdump -h conftest 2> /dev/null \ |
24892 | | grep gcc_except_table > /dev/null; then | |
b639c3c2 JJ |
24893 | gcc_cv_ld_eh_gc_sections=yes |
24894 | fi | |
24895 | fi | |
24896 | fi | |
24897 | fi | |
24898 | fi | |
24899 | rm -f conftest.s conftest.o conftest | |
24900 | fi | |
e9d207d9 EB |
24901 | case "$target" in |
24902 | hppa*-*-linux*) | |
24903 | # ??? This apparently exposes a binutils bug with PC-relative relocations. | |
24904 | gcc_cv_ld_eh_gc_sections=no | |
24905 | ;; | |
24906 | esac | |
22ba88ef EB |
24907 | if test x$gcc_cv_ld_eh_gc_sections = xyes; then |
24908 | ||
5213506e | 24909 | $as_echo "#define HAVE_LD_EH_GC_SECTIONS 1" >>confdefs.h |
22ba88ef EB |
24910 | |
24911 | fi | |
5213506e RW |
24912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections" >&5 |
24913 | $as_echo "$gcc_cv_ld_eh_gc_sections" >&6; } | |
22ba88ef | 24914 | |
8bb915b6 NN |
24915 | # -------- |
24916 | # UNSORTED | |
24917 | # -------- | |
24918 | ||
5213506e RW |
24919 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5 |
24920 | $as_echo_n "checking linker --as-needed support... " >&6; } | |
24921 | if test "${gcc_cv_ld_as_needed+set}" = set; then : | |
24922 | $as_echo_n "(cached) " >&6 | |
82e923f6 RS |
24923 | else |
24924 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
24925 | if test $in_tree_ld = yes ; then |
24926 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
24927 | && test $in_tree_ld_is_elf = yes; then | |
24928 | gcc_cv_ld_as_needed=yes | |
24929 | fi | |
24930 | elif test x$gcc_cv_ld != x; then | |
24931 | # Check if linker supports --as-needed and --no-as-needed options | |
24932 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
24933 | gcc_cv_ld_as_needed=yes | |
24934 | fi | |
24935 | fi | |
82e923f6 RS |
24936 | |
24937 | fi | |
5213506e RW |
24938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_as_needed" >&5 |
24939 | $as_echo "$gcc_cv_ld_as_needed" >&6; } | |
765f1bf9 AM |
24940 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
24941 | ||
5213506e | 24942 | $as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h |
765f1bf9 AM |
24943 | |
24944 | fi | |
765f1bf9 | 24945 | |
d82bf747 AM |
24946 | case "$target:$tm_file" in |
24947 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
5213506e RW |
24948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5 |
24949 | $as_echo_n "checking linker support for omitting dot symbols... " >&6; } | |
24950 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then : | |
24951 | $as_echo_n "(cached) " >&6 | |
85b776df AM |
24952 | else |
24953 | gcc_cv_ld_no_dot_syms=no | |
24954 | if test $in_tree_ld = yes ; then | |
24955 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then | |
24956 | gcc_cv_ld_no_dot_syms=yes | |
24957 | fi | |
24958 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
24959 | cat > conftest1.s <<EOF | |
24960 | .text | |
24961 | bl .foo | |
24962 | EOF | |
24963 | cat > conftest2.s <<EOF | |
24964 | .section ".opd","aw" | |
24965 | .align 3 | |
24966 | .globl foo | |
24967 | .type foo,@function | |
24968 | foo: | |
24969 | .quad .LEfoo,.TOC.@tocbase,0 | |
24970 | .text | |
24971 | .LEfoo: | |
24972 | blr | |
24973 | .size foo,.-.LEfoo | |
24974 | EOF | |
24975 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
24976 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
24977 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
24978 | gcc_cv_ld_no_dot_syms=yes | |
24979 | fi | |
24980 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
24981 | fi | |
24982 | ||
24983 | fi | |
5213506e RW |
24984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_no_dot_syms" >&5 |
24985 | $as_echo "$gcc_cv_ld_no_dot_syms" >&6; } | |
85b776df AM |
24986 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then |
24987 | ||
5213506e | 24988 | $as_echo "#define HAVE_LD_NO_DOT_SYMS 1" >>confdefs.h |
85b776df | 24989 | |
070b27da AM |
24990 | fi |
24991 | ||
24992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker large toc support" >&5 | |
24993 | $as_echo_n "checking linker large toc support... " >&6; } | |
24994 | if test "${gcc_cv_ld_large_toc+set}" = set; then : | |
24995 | $as_echo_n "(cached) " >&6 | |
24996 | else | |
24997 | gcc_cv_ld_large_toc=no | |
24998 | if test $in_tree_ld = yes ; then | |
24999 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then | |
25000 | gcc_cv_ld_large_toc=yes | |
25001 | fi | |
25002 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
25003 | cat > conftest.s <<EOF | |
25004 | .section ".tbss","awT",@nobits | |
25005 | .align 3 | |
25006 | ie0: .space 8 | |
25007 | .global _start | |
25008 | .text | |
25009 | _start: | |
25010 | addis 9,13,ie0@got@tprel@ha | |
25011 | ld 9,ie0@got@tprel@l(9) | |
25012 | EOF | |
25013 | if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \ | |
25014 | && $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then | |
25015 | gcc_cv_ld_large_toc=yes | |
25016 | fi | |
25017 | rm -f conftest conftest.o conftest.s | |
25018 | fi | |
25019 | ||
25020 | fi | |
25021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_large_toc" >&5 | |
25022 | $as_echo "$gcc_cv_ld_large_toc" >&6; } | |
25023 | if test x"$gcc_cv_ld_large_toc" = xyes; then | |
25024 | ||
25025 | $as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h | |
25026 | ||
85b776df AM |
25027 | fi |
25028 | ;; | |
25029 | esac | |
25030 | ||
5213506e RW |
25031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5 |
25032 | $as_echo_n "checking linker --build-id support... " >&6; } | |
25033 | if test "${gcc_cv_ld_buildid+set}" = set; then : | |
25034 | $as_echo_n "(cached) " >&6 | |
cd533689 PP |
25035 | else |
25036 | gcc_cv_ld_buildid=no | |
25037 | if test $in_tree_ld = yes ; then | |
25038 | if test "$gcc_cv_gld_major_version" -eq 2 -a \ | |
25039 | "$gcc_cv_gld_minor_version" -ge 18 -o \ | |
25040 | "$gcc_cv_gld_major_version" -gt 2 \ | |
25041 | && test $in_tree_ld_is_elf = yes; then | |
25042 | gcc_cv_ld_buildid=yes | |
25043 | fi | |
25044 | elif test x$gcc_cv_ld != x; then | |
25045 | if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then | |
25046 | gcc_cv_ld_buildid=yes | |
25047 | fi | |
25048 | fi | |
25049 | fi | |
5213506e RW |
25050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_buildid" >&5 |
25051 | $as_echo "$gcc_cv_ld_buildid" >&6; } | |
cd533689 PP |
25052 | if test x"$gcc_cv_ld_buildid" = xyes; then |
25053 | ||
5213506e | 25054 | $as_echo "#define HAVE_LD_BUILDID 1" >>confdefs.h |
cd533689 PP |
25055 | |
25056 | fi | |
25057 | ||
5213506e RW |
25058 | # Check whether --enable-linker-build-id was given. |
25059 | if test "${enable_linker_build_id+set}" = set; then : | |
25060 | enableval=$enable_linker_build_id; | |
cd533689 PP |
25061 | else |
25062 | enable_linker_build_id=no | |
5213506e RW |
25063 | fi |
25064 | ||
cd533689 PP |
25065 | |
25066 | if test x"$enable_linker_build_id" = xyes; then | |
25067 | if test x"$gcc_cv_ld_buildid" = xyes; then | |
25068 | ||
5213506e | 25069 | $as_echo "#define ENABLE_LD_BUILDID 1" >>confdefs.h |
cd533689 PP |
25070 | |
25071 | else | |
5213506e RW |
25072 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&5 |
25073 | $as_echo "$as_me: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&2;} | |
cd533689 PP |
25074 | fi |
25075 | fi | |
25076 | ||
a6198222 RO |
25077 | # In binutils 2.21, GNU ld gained support for new emulations fully |
25078 | # supporting the Solaris 2 ABI. Detect their presence in the linker used. | |
25079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker *_sol2 emulation support" >&5 | |
25080 | $as_echo_n "checking linker *_sol2 emulation support... " >&6; } | |
25081 | if test "${gcc_cv_ld_sol2_emulation+set}" = set; then : | |
25082 | $as_echo_n "(cached) " >&6 | |
25083 | else | |
25084 | gcc_cv_ld_sol2_emulation=no | |
25085 | if test $in_tree_ld = yes ; then | |
25086 | if test "$gcc_cv_gld_major_version" -eq 2 -a \ | |
25087 | "$gcc_cv_gld_minor_version" -ge 21 -o \ | |
25088 | "$gcc_cv_gld_major_version" -gt 2 \ | |
25089 | && test $in_tree_ld_is_elf = yes; then | |
25090 | gcc_cv_ld_sol2_emulation=yes | |
25091 | fi | |
25092 | elif test x$gcc_cv_ld != x; then | |
25093 | if $gcc_cv_ld -V 2>/dev/null | sed -e '1,/Supported emulations/d;q' | \ | |
25094 | grep _sol2 > /dev/null; then | |
25095 | gcc_cv_ld_sol2_emulation=yes | |
25096 | fi | |
25097 | fi | |
25098 | fi | |
25099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sol2_emulation" >&5 | |
25100 | $as_echo "$gcc_cv_ld_sol2_emulation" >&6; } | |
25101 | if test x"$gcc_cv_ld_sol2_emulation" = xyes; then | |
25102 | ||
25103 | $as_echo "#define HAVE_LD_SOL2_EMULATION 1" >>confdefs.h | |
25104 | ||
25105 | fi | |
25106 | ||
5213506e RW |
25107 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --sysroot support" >&5 |
25108 | $as_echo_n "checking linker --sysroot support... " >&6; } | |
25109 | if test "${gcc_cv_ld_sysroot+set}" = set; then : | |
25110 | $as_echo_n "(cached) " >&6 | |
380e5ca4 MM |
25111 | else |
25112 | gcc_cv_ld_sysroot=no | |
25113 | if test $in_tree_ld = yes ; then | |
25114 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then | |
7032df40 | 25115 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
25116 | fi |
25117 | elif test x$gcc_cv_ld != x; then | |
25118 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
25119 | gcc_cv_ld_sysroot=yes | |
25120 | fi | |
25121 | fi | |
25122 | fi | |
5213506e RW |
25123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sysroot" >&5 |
25124 | $as_echo "$gcc_cv_ld_sysroot" >&6; } | |
380e5ca4 MM |
25125 | if test x"$gcc_cv_ld_sysroot" = xyes; then |
25126 | ||
5213506e | 25127 | $as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h |
380e5ca4 MM |
25128 | |
25129 | fi | |
25130 | ||
9fb28a67 | 25131 | if test x$with_sysroot = x && test x$host = x$target \ |
c794c06f CD |
25132 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ |
25133 | && test "$prefix" != "NONE"; then | |
ba479fd2 NN |
25134 | |
25135 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 25136 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 25137 | _ACEOF |
793e9558 PB |
25138 | |
25139 | fi | |
25140 | ||
77008252 | 25141 | # Test for stack protector support in target C library. |
5213506e RW |
25142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5 |
25143 | $as_echo_n "checking __stack_chk_fail in target C library... " >&6; } | |
25144 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then : | |
25145 | $as_echo_n "(cached) " >&6 | |
77008252 JJ |
25146 | else |
25147 | gcc_cv_libc_provides_ssp=no | |
a6ccdbab | 25148 | case "$target" in |
22f96a0f | 25149 | *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) |
77008252 | 25150 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then |
b0a69d20 MK |
25151 | if test "x$with_headers" != x; then |
25152 | glibc_header_dir=$with_headers | |
25153 | elif test "x$with_sysroot" = x; then | |
77008252 | 25154 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" |
c9ecbf86 JM |
25155 | elif test "x$with_build_sysroot" != "x"; then |
25156 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
77008252 JJ |
25157 | elif test "x$with_sysroot" = xyes; then |
25158 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
25159 | else | |
25160 | glibc_header_dir="${with_sysroot}/usr/include" | |
25161 | fi | |
25162 | else | |
25163 | glibc_header_dir=/usr/include | |
25164 | fi | |
25165 | # glibc 2.4 and later provides __stack_chk_fail and | |
25166 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
25167 | if test -f $glibc_header_dir/features.h \ | |
25168 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
25169 | $glibc_header_dir/features.h > /dev/null; then | |
25170 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
25171 | $glibc_header_dir/features.h > /dev/null; then | |
25172 | gcc_cv_libc_provides_ssp=yes | |
25173 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
25174 | $glibc_header_dir/features.h > /dev/null \ | |
25175 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
25176 | $glibc_header_dir/features.h > /dev/null; then | |
25177 | gcc_cv_libc_provides_ssp=yes | |
fed6d628 BF |
25178 | elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ |
25179 | $glibc_header_dir/features.h > /dev/null && \ | |
25180 | test -f $glibc_header_dir/bits/uClibc_config.h && \ | |
25181 | $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \ | |
25182 | $glibc_header_dir/bits/uClibc_config.h > /dev/null; then | |
25183 | gcc_cv_libc_provides_ssp=yes | |
77008252 | 25184 | fi |
fed6d628 | 25185 | fi |
a6ccdbab | 25186 | ;; |
4cc115a2 TS |
25187 | *-*-gnu*) |
25188 | # Avoid complicated tests (see | |
25189 | # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now | |
25190 | # simply assert that glibc does provide this, which is true for all | |
25191 | # realistically usable GNU/Hurd configurations. | |
25192 | gcc_cv_libc_provides_ssp=yes;; | |
61e1d511 | 25193 | *-*-darwin* | *-*-freebsd*) |
5213506e RW |
25194 | ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" |
25195 | if test "x$ac_cv_func___stack_chk_fail" = x""yes; then : | |
a6ccdbab EC |
25196 | gcc_cv_libc_provides_ssp=yes |
25197 | else | |
25198 | echo "no __stack_chk_fail on this target" | |
77008252 | 25199 | fi |
a6ccdbab EC |
25200 | |
25201 | ;; | |
77008252 | 25202 | *) gcc_cv_libc_provides_ssp=no ;; |
a6ccdbab EC |
25203 | esac |
25204 | fi | |
5213506e RW |
25205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_libc_provides_ssp" >&5 |
25206 | $as_echo "$gcc_cv_libc_provides_ssp" >&6; } | |
a6ccdbab | 25207 | |
77008252 JJ |
25208 | if test x$gcc_cv_libc_provides_ssp = xyes; then |
25209 | ||
5213506e | 25210 | $as_echo "#define TARGET_LIBC_PROVIDES_SSP 1" >>confdefs.h |
77008252 JJ |
25211 | |
25212 | fi | |
25213 | ||
ed965309 JJ |
25214 | # Check if TFmode long double should be used by default or not. |
25215 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
25216 | # and later they can use TFmode. | |
25217 | case "$target" in | |
f7cc5390 JM |
25218 | powerpc*-*-linux* | \ |
25219 | powerpc*-*-gnu* | \ | |
ed965309 JJ |
25220 | sparc*-*-linux* | \ |
25221 | s390*-*-linux* | \ | |
25222 | alpha*-*-linux*) | |
25223 | ||
5213506e RW |
25224 | # Check whether --with-long-double-128 was given. |
25225 | if test "${with_long_double_128+set}" = set; then : | |
25226 | withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128" | |
ed965309 JJ |
25227 | else |
25228 | gcc_cv_target_ldbl128=no | |
25229 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
25230 | if test "x$with_sysroot" = x; then | |
25231 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
c9ecbf86 JM |
25232 | elif test "x$with_build_sysroot" != "x"; then |
25233 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
ed965309 JJ |
25234 | elif test "x$with_sysroot" = xyes; then |
25235 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
25236 | else | |
25237 | glibc_header_dir="${with_sysroot}/usr/include" | |
25238 | fi | |
25239 | else | |
25240 | glibc_header_dir=/usr/include | |
25241 | fi | |
65280f6c | 25242 | grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ |
ed965309 JJ |
25243 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ |
25244 | && gcc_cv_target_ldbl128=yes | |
65280f6c | 25245 | |
5213506e RW |
25246 | fi |
25247 | ||
ed965309 JJ |
25248 | ;; |
25249 | esac | |
25250 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
25251 | ||
5213506e | 25252 | $as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h |
ed965309 JJ |
25253 | |
25254 | fi | |
25255 | ||
81bf3d9e | 25256 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 25257 | |
5213506e RW |
25258 | # Check whether --with-gc was given. |
25259 | if test "${with_gc+set}" = set; then : | |
25260 | withval=$with_gc; case "$withval" in | |
08cee789 | 25261 | page) |
81bf3d9e | 25262 | GGC=ggc-$withval |
08cee789 DJ |
25263 | ;; |
25264 | zone) | |
25265 | GGC=ggc-$withval | |
25266 | ||
5213506e | 25267 | $as_echo "#define GGC_ZONE 1" >>confdefs.h |
08cee789 | 25268 | |
81bf3d9e RH |
25269 | ;; |
25270 | *) | |
5213506e | 25271 | as_fn_error "$withval is an invalid option to --with-gc" "$LINENO" 5 |
81bf3d9e RH |
25272 | ;; |
25273 | esac | |
25274 | else | |
005537df | 25275 | GGC=ggc-page |
5213506e RW |
25276 | fi |
25277 | ||
81bf3d9e RH |
25278 | |
25279 | echo "Using $GGC for garbage collection." | |
25280 | ||
00020c16 ILT |
25281 | # Libraries to use on the host. This will normally be set by the top |
25282 | # level Makefile. Here we simply capture the value for our Makefile. | |
25283 | if test -z "${HOST_LIBS+set}"; then | |
25284 | HOST_LIBS= | |
25285 | fi | |
25286 | ||
25287 | ||
3c809ba4 | 25288 | # Use the system's zlib library. |
b8dad04b ZW |
25289 | zlibdir=-L../zlib |
25290 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 25291 | |
5213506e RW |
25292 | # Check whether --with-system-zlib was given. |
25293 | if test "${with_system_zlib+set}" = set; then : | |
25294 | withval=$with_system_zlib; zlibdir= | |
3c809ba4 AG |
25295 | zlibinc= |
25296 | ||
5213506e RW |
25297 | fi |
25298 | ||
b8ec3cc8 | 25299 | |
703d89ab | 25300 | |
ab22c1fa | 25301 | |
1a4b763e | 25302 | |
5213506e RW |
25303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
25304 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
25305 | # Check whether --enable-maintainer-mode was given. | |
25306 | if test "${enable_maintainer_mode+set}" = set; then : | |
25307 | enableval=$enable_maintainer_mode; maintainer_mode=$enableval | |
dc6746e7 PT |
25308 | else |
25309 | maintainer_mode=no | |
5213506e | 25310 | fi |
a6ccdbab | 25311 | |
5213506e RW |
25312 | |
25313 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5 | |
25314 | $as_echo "$maintainer_mode" >&6; } | |
dc6746e7 PT |
25315 | |
25316 | if test "$maintainer_mode" = "yes"; then | |
25317 | MAINT='' | |
25318 | else | |
25319 | MAINT='#' | |
25320 | fi | |
25321 | ||
8bb915b6 NN |
25322 | # -------------- |
25323 | # Language hooks | |
25324 | # -------------- | |
25325 | ||
861bb6c1 JL |
25326 | # Make empty files to contain the specs and options for each language. |
25327 | # Then add #include lines to for a compiler that has specs and/or options. | |
25328 | ||
cc11cc9b | 25329 | subdirs= |
d7b42618 | 25330 | lang_opt_files= |
861bb6c1 | 25331 | lang_specs_files= |
3103b7db | 25332 | lang_tree_files= |
861bb6c1 JL |
25333 | # These (without "all_") are set in each config-lang.in. |
25334 | # `language' must be a single word so is spelled singularly. | |
25335 | all_languages= | |
861bb6c1 | 25336 | all_compilers= |
47ad7893 | 25337 | all_outputs='Makefile gccbug' |
861bb6c1 | 25338 | # List of language makefile fragments. |
2ed26f6b | 25339 | all_lang_makefrags= |
703d89ab | 25340 | # Additional files for gengtype |
ef69da62 | 25341 | all_gtfiles="$target_gtfiles" |
861bb6c1 | 25342 | |
cc11cc9b PB |
25343 | # These are the languages that are set in --enable-languages, |
25344 | # and are available in the GCC tree. | |
25345 | all_selected_languages= | |
25346 | ||
861bb6c1 JL |
25347 | # Add the language fragments. |
25348 | # Languages are added via two mechanisms. Some information must be | |
25349 | # recorded in makefile variables, these are defined in config-lang.in. | |
25350 | # We accumulate them and plug them into the main Makefile. | |
25351 | # The other mechanism is a set of hooks for each of the main targets | |
25352 | # like `clean', `install', etc. | |
25353 | ||
861bb6c1 | 25354 | language_hooks="Make-hooks" |
861bb6c1 | 25355 | |
cc11cc9b | 25356 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 25357 | do |
1546bb64 PB |
25358 | test "$lang" = "${srcdir}/*/config-lang.in" && continue |
25359 | ||
cc11cc9b PB |
25360 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` |
25361 | if test "x$lang_alias" = x | |
25362 | then | |
25363 | echo "$lang doesn't set \$language." 1>&2 | |
25364 | exit 1 | |
25365 | fi | |
25366 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
25367 | subdirs="$subdirs $subdir" | |
349c3166 OH |
25368 | |
25369 | # $gcc_subdir is where the gcc integration files are to be found | |
25370 | # for a language, both for internal compiler purposes (compiler | |
25371 | # sources implementing front-end to GCC tree converters), and for | |
25372 | # build infrastructure purposes (Make-lang.in, etc.) | |
25373 | # | |
25374 | # This will be <subdir> (relative to $srcdir) if a line like | |
25375 | # gcc_subdir="<subdir>" or gcc_subdir=<subdir> | |
25376 | # is found in <langdir>/config-lang.in, and will remain <langdir> | |
25377 | # otherwise. | |
25378 | # | |
25379 | # Except for the language alias (fetched above), the regular | |
25380 | # "config-lang.in" contents are always retrieved from $gcc_subdir, | |
25381 | # so a <langdir>/config-lang.in setting gcc_subdir typically sets | |
25382 | # only this and the language alias. | |
25383 | ||
25384 | gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang` | |
25385 | if [ "$gcc_subdir" = "" ]; then | |
25386 | gcc_subdir="$subdir" | |
25387 | fi | |
25388 | ||
cc11cc9b PB |
25389 | case ",$enable_languages," in |
25390 | *,$lang_alias,*) | |
25391 | all_selected_languages="$all_selected_languages $lang_alias" | |
349c3166 OH |
25392 | if test -f $srcdir/$gcc_subdir/lang-specs.h; then |
25393 | lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h" | |
cc11cc9b PB |
25394 | fi |
25395 | ;; | |
25396 | esac | |
25397 | ||
cc11cc9b PB |
25398 | language= |
25399 | boot_language= | |
25400 | compilers= | |
cc11cc9b PB |
25401 | outputs= |
25402 | gtfiles= | |
1546bb64 | 25403 | subdir_requires= |
349c3166 | 25404 | . ${srcdir}/$gcc_subdir/config-lang.in |
cc11cc9b PB |
25405 | if test "x$language" = x |
25406 | then | |
349c3166 | 25407 | echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2 |
cc11cc9b PB |
25408 | exit 1 |
25409 | fi | |
1546bb64 PB |
25410 | |
25411 | ok=: | |
25412 | case ",$enable_languages," in | |
25413 | *,$lang_alias,*) ;; | |
25414 | *) | |
25415 | for i in $subdir_requires; do | |
b6348cb3 | 25416 | test -f "${srcdir}/$i/config-lang.in" && continue |
1546bb64 PB |
25417 | ok=false |
25418 | break | |
25419 | done | |
25420 | ;; | |
25421 | esac | |
25422 | $ok || continue | |
25423 | ||
349c3166 OH |
25424 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" |
25425 | if test -f $srcdir/$gcc_subdir/lang.opt; then | |
25426 | lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" | |
1546bb64 | 25427 | fi |
349c3166 OH |
25428 | if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then |
25429 | lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def" | |
1546bb64 | 25430 | fi |
cc11cc9b | 25431 | all_languages="$all_languages $language" |
cc11cc9b | 25432 | all_compilers="$all_compilers $compilers" |
cc11cc9b | 25433 | all_outputs="$all_outputs $outputs" |
703d89ab | 25434 | all_gtfiles="$all_gtfiles [$subdir] $gtfiles" |
d7f09764 DN |
25435 | case ",$enable_languages," in |
25436 | *,lto,*) | |
25437 | ||
25438 | $as_echo "#define ENABLE_LTO 1" >>confdefs.h | |
25439 | ||
25440 | enable_lto=yes | |
25441 | ||
3bec79c5 DK |
25442 | # LTO needs to speak the platform's object file format, and has a |
25443 | # number of implementations of the required binary file access APIs. | |
25444 | # ELF is the most common, and default. We only link libelf if ELF | |
25445 | # is indeed the selected format. | |
25446 | LTO_BINARY_READER=${lto_binary_reader} | |
25447 | LTO_USE_LIBELF=-lelf | |
25448 | if test "x$lto_binary_reader" != "xlto-elf" ; then | |
25449 | LTO_USE_LIBELF= | |
25450 | fi | |
25451 | ||
25452 | ||
d7f09764 DN |
25453 | ;; |
25454 | *) ;; | |
25455 | esac | |
861bb6c1 JL |
25456 | done |
25457 | ||
8ac9d31f TJ |
25458 | # Pick up gtfiles for c |
25459 | gtfiles= | |
8ac9d31f | 25460 | . ${srcdir}/c-config-lang.in |
703d89ab | 25461 | all_gtfiles="$all_gtfiles [c] $gtfiles" |
8ac9d31f | 25462 | |
cbc59f01 | 25463 | check_languages= |
cc11cc9b | 25464 | for language in $all_selected_languages |
cbc59f01 | 25465 | do |
cc11cc9b | 25466 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
25467 | done |
25468 | ||
62b81e45 | 25469 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 25470 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
25471 | |
25472 | rm -f Make-hooks | |
25473 | touch Make-hooks | |
bd97af06 | 25474 | target_list="all.cross start.encap rest.encap tags \ |
55bcd32b AJ |
25475 | install-common install-man install-info install-pdf install-html dvi \ |
25476 | pdf html uninstall info man srcextra srcman srcinfo \ | |
2a4c0366 | 25477 | mostlyclean clean distclean maintainer-clean install-plugin" |
cc11cc9b | 25478 | |
861bb6c1 JL |
25479 | for t in $target_list |
25480 | do | |
25481 | x= | |
cc11cc9b | 25482 | for lang in $all_selected_languages |
861bb6c1 | 25483 | do |
cc11cc9b | 25484 | x="$x $lang.$t" |
861bb6c1 JL |
25485 | done |
25486 | echo "lang.$t: $x" >> Make-hooks | |
25487 | done | |
25488 | ||
8bb915b6 NN |
25489 | # -------- |
25490 | # UNSORTED | |
25491 | # -------- | |
25492 | ||
cc06d68c | 25493 | # Create .gdbinit. |
861bb6c1 | 25494 | |
cc06d68c GP |
25495 | echo "dir ." > .gdbinit |
25496 | echo "dir ${srcdir}" >> .gdbinit | |
25497 | if test x$gdb_needs_out_file_path = xyes | |
25498 | then | |
25499 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
25500 | fi | |
25501 | if test "x$subdirs" != x; then | |
25502 | for s in $subdirs | |
25503 | do | |
25504 | echo "dir ${srcdir}/$s" >> .gdbinit | |
25505 | done | |
861bb6c1 | 25506 | fi |
cc06d68c | 25507 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 25508 | |
15c723f3 | 25509 | gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' |
d062c304 JL |
25510 | |
25511 | ||
2ce3c6c6 | 25512 | |
2bbea3a6 RH |
25513 | # Find a directory in which to install a shared libgcc. |
25514 | ||
5213506e RW |
25515 | # Check whether --enable-version-specific-runtime-libs was given. |
25516 | if test "${enable_version_specific_runtime_libs+set}" = set; then : | |
25517 | enableval=$enable_version_specific_runtime_libs; | |
25518 | fi | |
ba479fd2 | 25519 | |
2bbea3a6 RH |
25520 | |
25521 | ||
5213506e RW |
25522 | # Check whether --with-slibdir was given. |
25523 | if test "${with_slibdir+set}" = set; then : | |
25524 | withval=$with_slibdir; slibdir="$with_slibdir" | |
5b15f277 RH |
25525 | else |
25526 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 25527 | slibdir='$(libsubdir)' |
5b15f277 | 25528 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
25529 | slibdir='$(build_tooldir)/lib' |
25530 | else | |
5b15f277 | 25531 | slibdir='$(libdir)' |
2bbea3a6 | 25532 | fi |
5213506e RW |
25533 | fi |
25534 | ||
2bbea3a6 RH |
25535 | |
25536 | ||
703d89ab | 25537 | # Substitute configuration variables |
861bb6c1 JL |
25538 | |
25539 | ||
25540 | ||
25541 | ||
25542 | ||
25543 | ||
25544 | ||
25545 | ||
25546 | ||
25547 | ||
25548 | ||
25549 | ||
25550 | ||
25551 | ||
25552 | ||
25553 | ||
25554 | ||
25555 | ||
25556 | ||
25557 | ||
25558 | ||
25559 | ||
25560 | ||
25561 | ||
25562 | ||
25563 | ||
25564 | ||
25565 | ||
25566 | ||
25567 | ||
25568 | ||
25569 | ||
25570 | ||
25571 | ||
25572 | ||
25573 | ||
25574 | ||
25575 | ||
25576 | ||
25577 | ||
25578 | ||
25579 | ||
25580 | ||
25581 | ||
9b16d2c4 | 25582 | |
e9a25f70 | 25583 | |
6e26218f | 25584 | |
c8724862 | 25585 | |
11642c3a ZW |
25586 | |
25587 | ||
25588 | ||
3d9d2476 | 25589 | |
e2500fed | 25590 | |
a0e527e3 | 25591 | |
aca600aa AS |
25592 | |
25593 | ||
25594 | ||
9b91e436 KT |
25595 | |
25596 | ||
c776a6d0 | 25597 | |
51b9ff45 | 25598 | |
861bb6c1 | 25599 | |
6e3f3080 NN |
25600 | # Echo link setup. |
25601 | if test x${build} = x${host} ; then | |
25602 | if test x${host} = x${target} ; then | |
25603 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
25604 | else | |
25605 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
25606 | echo " from ${host} to ${target}." 1>&2 | |
25607 | fi | |
25608 | else | |
25609 | if test x${host} = x${target} ; then | |
25610 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
25611 | echo " for ${target}." 1>&2 | |
25612 | else | |
25613 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
25614 | echo " from ${host} to ${target}." 1>&2 | |
25615 | fi | |
25616 | fi | |
25617 | ||
6de9cd9a DN |
25618 | |
25619 | ||
25620 | ||
f8bf9252 SP |
25621 | |
25622 | ||
25623 | ||
25624 | ||
25625 | ||
25626 | if test "x${CLOOGLIBS}" != "x" ; then | |
25627 | ||
5213506e | 25628 | $as_echo "#define HAVE_cloog 1" >>confdefs.h |
f8bf9252 | 25629 | |
f8bf9252 SP |
25630 | fi |
25631 | ||
d7f09764 DN |
25632 | |
25633 | ||
25634 | if test "x${LIBELFLIBS}" != "x" ; then | |
25635 | ||
25636 | $as_echo "#define HAVE_libelf 1" >>confdefs.h | |
25637 | ||
25638 | fi | |
25639 | ||
68a607d8 | 25640 | # Check for plugin support |
5213506e RW |
25641 | # Check whether --enable-plugin was given. |
25642 | if test "${enable_plugin+set}" = set; then : | |
25643 | enableval=$enable_plugin; enable_plugin=$enableval | |
68a607d8 DN |
25644 | else |
25645 | enable_plugin=yes; default_plugin=yes | |
5213506e RW |
25646 | fi |
25647 | ||
68a607d8 DN |
25648 | |
25649 | pluginlibs= | |
25650 | if test x"$enable_plugin" = x"yes"; then | |
68a607d8 | 25651 | |
9ec69d2e JH |
25652 | case "${host}" in |
25653 | *-*-darwin*) | |
25654 | export_sym_check="$gcc_cv_nm -g" | |
25655 | ;; | |
25656 | *) | |
25657 | export_sym_check="$gcc_cv_objdump -T" | |
25658 | ;; | |
25659 | esac | |
601fc26e SE |
25660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5 |
25661 | $as_echo_n "checking for exported symbols... " >&6; } | |
25662 | echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c | |
25663 | ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 | |
9ec69d2e | 25664 | if $export_sym_check conftest | grep foobar > /dev/null; then |
601fc26e SE |
25665 | : # No need to use a flag |
25666 | else | |
25667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5 | |
25668 | $as_echo_n "checking for -rdynamic... " >&6; } | |
25669 | ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 | |
9ec69d2e | 25670 | if $export_sym_check conftest | grep foobar > /dev/null; then |
fcf52686 | 25671 | plugin_rdynamic=yes |
601fc26e SE |
25672 | pluginlibs="-rdynamic" |
25673 | else | |
fcf52686 | 25674 | plugin_rdynamic=no |
601fc26e SE |
25675 | enable_plugin=no |
25676 | fi | |
fcf52686 RO |
25677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_rdynamic" >&5 |
25678 | $as_echo "$plugin_rdynamic" >&6; } | |
68a607d8 DN |
25679 | fi |
25680 | ||
25681 | # Check -ldl | |
30ce157e | 25682 | saved_LIBS="$LIBS" |
0c2edd9f ILT |
25683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
25684 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
25685 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
25686 | $as_echo_n "(cached) " >&6 | |
25687 | else | |
25688 | ac_func_search_save_LIBS=$LIBS | |
25689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
68a607d8 | 25690 | /* end confdefs.h. */ |
0c2edd9f ILT |
25691 | |
25692 | /* Override any GCC internal prototype to avoid an error. | |
25693 | Use char because int might match the return type of a GCC | |
25694 | builtin and then its argument prototype would still apply. */ | |
25695 | #ifdef __cplusplus | |
25696 | extern "C" | |
25697 | #endif | |
25698 | char dlopen (); | |
68a607d8 DN |
25699 | int |
25700 | main () | |
25701 | { | |
0c2edd9f | 25702 | return dlopen (); |
68a607d8 DN |
25703 | ; |
25704 | return 0; | |
25705 | } | |
25706 | _ACEOF | |
0c2edd9f ILT |
25707 | for ac_lib in '' dl; do |
25708 | if test -z "$ac_lib"; then | |
25709 | ac_res="none required" | |
25710 | else | |
25711 | ac_res=-l$ac_lib | |
25712 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
25713 | fi | |
25714 | if ac_fn_c_try_link "$LINENO"; then : | |
25715 | ac_cv_search_dlopen=$ac_res | |
68a607d8 | 25716 | fi |
5213506e | 25717 | rm -f core conftest.err conftest.$ac_objext \ |
0c2edd9f ILT |
25718 | conftest$ac_exeext |
25719 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
25720 | break | |
25721 | fi | |
25722 | done | |
25723 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
25724 | ||
25725 | else | |
25726 | ac_cv_search_dlopen=no | |
25727 | fi | |
25728 | rm conftest.$ac_ext | |
25729 | LIBS=$ac_func_search_save_LIBS | |
25730 | fi | |
25731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
25732 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
25733 | ac_res=$ac_cv_search_dlopen | |
25734 | if test "$ac_res" != no; then : | |
25735 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
25736 | ||
25737 | fi | |
25738 | ||
25739 | if test x"$ac_cv_search_dlopen" = x"-ldl"; then | |
68a607d8 DN |
25740 | pluginlibs="$pluginlibs -ldl" |
25741 | fi | |
30ce157e | 25742 | LIBS="$saved_LIBS" |
68a607d8 DN |
25743 | |
25744 | # Check that we can build shared objects with -fPIC -shared | |
30ce157e | 25745 | saved_LDFLAGS="$LDFLAGS" |
9ec69d2e JH |
25746 | case "${host}" in |
25747 | *-*-darwin*) | |
25748 | LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup" | |
25749 | ;; | |
25750 | *) | |
25751 | LDFLAGS="$LDFLAGS -fPIC -shared" | |
25752 | ;; | |
25753 | esac | |
5213506e RW |
25754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 |
25755 | $as_echo_n "checking for -fPIC -shared... " >&6; } | |
25756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
68a607d8 DN |
25757 | /* end confdefs.h. */ |
25758 | extern int X; | |
25759 | int | |
25760 | main () | |
25761 | { | |
25762 | return X == 0; | |
25763 | ; | |
25764 | return 0; | |
25765 | } | |
25766 | _ACEOF | |
5213506e RW |
25767 | if ac_fn_c_try_link "$LINENO"; then : |
25768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
25769 | $as_echo "yes" >&6; }; have_pic_shared=yes | |
68a607d8 | 25770 | else |
5213506e RW |
25771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
25772 | $as_echo "no" >&6; }; have_pic_shared=no | |
68a607d8 | 25773 | fi |
5213506e RW |
25774 | rm -f core conftest.err conftest.$ac_objext \ |
25775 | conftest$ac_exeext conftest.$ac_ext | |
0c2edd9f | 25776 | if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then |
68a607d8 DN |
25777 | pluginlibs= |
25778 | enable_plugin=no | |
25779 | fi | |
30ce157e | 25780 | LDFLAGS="$saved_LDFLAGS" |
68a607d8 DN |
25781 | |
25782 | # If plugin support had been requested but not available, fail. | |
25783 | if test x"$enable_plugin" = x"no" ; then | |
25784 | if test x"$default_plugin" != x"yes"; then | |
5213506e | 25785 | as_fn_error " |
68a607d8 | 25786 | Building GCC with plugin support requires a host that supports |
5213506e | 25787 | -fPIC, -shared, -ldl and -rdynamic." "$LINENO" 5 |
68a607d8 DN |
25788 | fi |
25789 | fi | |
68a607d8 DN |
25790 | fi |
25791 | ||
25792 | ||
25793 | ||
25794 | if test x"$enable_plugin" = x"yes"; then | |
25795 | ||
5213506e | 25796 | $as_echo "#define ENABLE_PLUGIN 1" >>confdefs.h |
68a607d8 DN |
25797 | |
25798 | fi | |
25799 | ||
6e3f3080 NN |
25800 | # Configure the subdirectories |
25801 | # AC_CONFIG_SUBDIRS($subdirs) | |
25802 | ||
25803 | # Create the Makefile | |
25804 | # and configure language subdirectories | |
5213506e | 25805 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
25806 | |
25807 | ||
5213506e | 25808 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 25809 | |
ba479fd2 | 25810 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
25811 | # This file is a shell script that caches the results of configure |
25812 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
25813 | # scripts and configure runs, see configure's option --config-cache. |
25814 | # It is not useful on other systems. If it contains results you don't | |
25815 | # want to keep, you may remove or edit it. | |
6e3f3080 | 25816 | # |
ba479fd2 NN |
25817 | # config.status only pays attention to the cache file if you give it |
25818 | # the --recheck option to rerun configure. | |
6e3f3080 | 25819 | # |
ba479fd2 NN |
25820 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
25821 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
25822 | # following values. | |
25823 | ||
25824 | _ACEOF | |
25825 | ||
6e3f3080 NN |
25826 | # The following way of writing the cache mishandles newlines in values, |
25827 | # but we know of no workaround that is simple, portable, and efficient. | |
5213506e | 25828 | # So, we kill variables containing newlines. |
6e3f3080 NN |
25829 | # Ultrix sh set writes to stderr and can't be redirected directly, |
25830 | # and sets the high bit in the cache file unless we assign to the vars. | |
5213506e RW |
25831 | ( |
25832 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
25833 | eval ac_val=\$$ac_var | |
25834 | case $ac_val in #( | |
25835 | *${as_nl}*) | |
25836 | case $ac_var in #( | |
25837 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
25838 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
25839 | esac | |
25840 | case $ac_var in #( | |
25841 | _ | IFS | as_nl) ;; #( | |
25842 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
25843 | *) { eval $ac_var=; unset $ac_var;} ;; | |
25844 | esac ;; | |
25845 | esac | |
25846 | done | |
25847 | ||
ba479fd2 | 25848 | (set) 2>&1 | |
5213506e RW |
25849 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
25850 | *${as_nl}ac_space=\ *) | |
25851 | # `set' does not quote correctly, so add quotes: double-quote | |
25852 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
ba479fd2 | 25853 | sed -n \ |
86da66b5 HPN |
25854 | "s/'/'\\\\''/g; |
25855 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
5213506e | 25856 | ;; #( |
ba479fd2 NN |
25857 | *) |
25858 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5213506e | 25859 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
ba479fd2 | 25860 | ;; |
5213506e RW |
25861 | esac | |
25862 | sort | |
25863 | ) | | |
ba479fd2 | 25864 | sed ' |
5213506e | 25865 | /^ac_cv_env_/b end |
ba479fd2 | 25866 | t clear |
5213506e | 25867 | :clear |
ba479fd2 NN |
25868 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
25869 | t end | |
5213506e RW |
25870 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
25871 | :end' >>confcache | |
25872 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
25873 | if test -w "$cache_file"; then | |
25874 | test "x$cache_file" != "x/dev/null" && | |
25875 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
25876 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
ba479fd2 | 25877 | cat confcache >$cache_file |
6e3f3080 | 25878 | else |
5213506e RW |
25879 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
25880 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
6e3f3080 NN |
25881 | fi |
25882 | fi | |
25883 | rm -f confcache | |
25884 | ||
25885 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
25886 | # Let make expand exec_prefix. | |
25887 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
25888 | ||
63cf211a | 25889 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 25890 | |
ba479fd2 NN |
25891 | ac_libobjs= |
25892 | ac_ltlibobjs= | |
25893 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
25894 | # 1. Remove the extension, and $U if already installed. | |
5213506e RW |
25895 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
25896 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
25897 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
25898 | # will be set to the directory where LIBOBJS objects are built. | |
25899 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
25900 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
ba479fd2 NN |
25901 | done |
25902 | LIBOBJS=$ac_libobjs | |
63cf211a | 25903 | |
ba479fd2 NN |
25904 | LTLIBOBJS=$ac_ltlibobjs |
25905 | ||
25906 | ||
25907 | ||
5213506e | 25908 | |
ba479fd2 | 25909 | : ${CONFIG_STATUS=./config.status} |
5213506e | 25910 | ac_write_fail=0 |
ba479fd2 NN |
25911 | ac_clean_files_save=$ac_clean_files |
25912 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
5213506e RW |
25913 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
25914 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
25915 | as_write_fail=0 | |
25916 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
ba479fd2 NN |
25917 | #! $SHELL |
25918 | # Generated by $as_me. | |
6e3f3080 NN |
25919 | # Run this file to recreate the current configuration. |
25920 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 25921 | # configure, is in config.log if it exists. |
6e3f3080 | 25922 | |
ba479fd2 NN |
25923 | debug=false |
25924 | ac_cs_recheck=false | |
25925 | ac_cs_silent=false | |
ba479fd2 | 25926 | |
5213506e RW |
25927 | SHELL=\${CONFIG_SHELL-$SHELL} |
25928 | export SHELL | |
25929 | _ASEOF | |
25930 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
25931 | ## -------------------- ## | |
25932 | ## M4sh Initialization. ## | |
25933 | ## -------------------- ## | |
ba479fd2 | 25934 | |
5213506e RW |
25935 | # Be more Bourne compatible |
25936 | DUALCASE=1; export DUALCASE # for MKS sh | |
25937 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
ba479fd2 NN |
25938 | emulate sh |
25939 | NULLCMD=: | |
5213506e | 25940 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
ba479fd2 NN |
25941 | # is contrary to our usage. Disable this feature. |
25942 | alias -g '${1+"$@"}'='"$@"' | |
5213506e RW |
25943 | setopt NO_GLOB_SUBST |
25944 | else | |
25945 | case `(set -o) 2>/dev/null` in #( | |
25946 | *posix*) : | |
25947 | set -o posix ;; #( | |
25948 | *) : | |
25949 | ;; | |
25950 | esac | |
2f41c1d6 | 25951 | fi |
ab22c1fa | 25952 | |
5213506e RW |
25953 | |
25954 | as_nl=' | |
25955 | ' | |
25956 | export as_nl | |
25957 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
25958 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
25959 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
25960 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
25961 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
25962 | # but without wasting forks for bash or zsh. | |
25963 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
25964 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
25965 | as_echo='print -r --' | |
25966 | as_echo_n='print -rn --' | |
25967 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
25968 | as_echo='printf %s\n' | |
25969 | as_echo_n='printf %s' | |
25970 | else | |
25971 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
25972 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
25973 | as_echo_n='/usr/ucb/echo -n' | |
25974 | else | |
25975 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
25976 | as_echo_n_body='eval | |
25977 | arg=$1; | |
25978 | case $arg in #( | |
25979 | *"$as_nl"*) | |
25980 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
25981 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
25982 | esac; | |
25983 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
25984 | ' | |
25985 | export as_echo_n_body | |
25986 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
25987 | fi | |
25988 | export as_echo_body | |
25989 | as_echo='sh -c $as_echo_body as_echo' | |
25990 | fi | |
25991 | ||
25992 | # The user is always right. | |
25993 | if test "${PATH_SEPARATOR+set}" != set; then | |
25994 | PATH_SEPARATOR=: | |
25995 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
25996 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
25997 | PATH_SEPARATOR=';' | |
25998 | } | |
1a4b763e BS |
25999 | fi |
26000 | ||
ab22c1fa | 26001 | |
5213506e RW |
26002 | # IFS |
26003 | # We need space, tab and new line, in precisely that order. Quoting is | |
26004 | # there to prevent editors from complaining about space-tab. | |
26005 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
26006 | # splitting by setting IFS to empty value.) | |
26007 | IFS=" "" $as_nl" | |
26008 | ||
26009 | # Find who we are. Look in the path if we contain no directory separator. | |
26010 | case $0 in #(( | |
26011 | *[\\/]* ) as_myself=$0 ;; | |
26012 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
26013 | for as_dir in $PATH | |
26014 | do | |
26015 | IFS=$as_save_IFS | |
26016 | test -z "$as_dir" && as_dir=. | |
26017 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
26018 | done | |
26019 | IFS=$as_save_IFS | |
26020 | ||
26021 | ;; | |
26022 | esac | |
26023 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
26024 | # in which case we are not to be found in the path. | |
26025 | if test "x$as_myself" = x; then | |
26026 | as_myself=$0 | |
26027 | fi | |
26028 | if test ! -f "$as_myself"; then | |
26029 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
26030 | exit 1 | |
26031 | fi | |
26032 | ||
26033 | # Unset variables that we do not need and which cause bugs (e.g. in | |
26034 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
26035 | # suppresses any "Segmentation fault" message there. '((' could | |
26036 | # trigger a bug in pdksh 5.2.14. | |
26037 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
26038 | do eval test x\${$as_var+set} = xset \ | |
26039 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
26040 | done | |
1a4b763e BS |
26041 | PS1='$ ' |
26042 | PS2='> ' | |
26043 | PS4='+ ' | |
26044 | ||
26045 | # NLS nuisances. | |
5213506e RW |
26046 | LC_ALL=C |
26047 | export LC_ALL | |
26048 | LANGUAGE=C | |
26049 | export LANGUAGE | |
26050 | ||
26051 | # CDPATH. | |
26052 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
26053 | ||
26054 | ||
26055 | # as_fn_error ERROR [LINENO LOG_FD] | |
26056 | # --------------------------------- | |
26057 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
26058 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
26059 | # script with status $?, using 1 if that was 0. | |
26060 | as_fn_error () | |
26061 | { | |
26062 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
26063 | if test "$3"; then | |
26064 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
26065 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
1a4b763e | 26066 | fi |
5213506e RW |
26067 | $as_echo "$as_me: error: $1" >&2 |
26068 | as_fn_exit $as_status | |
26069 | } # as_fn_error | |
26070 | ||
26071 | ||
26072 | # as_fn_set_status STATUS | |
26073 | # ----------------------- | |
26074 | # Set $? to STATUS, without forking. | |
26075 | as_fn_set_status () | |
26076 | { | |
26077 | return $1 | |
26078 | } # as_fn_set_status | |
26079 | ||
26080 | # as_fn_exit STATUS | |
26081 | # ----------------- | |
26082 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
26083 | as_fn_exit () | |
26084 | { | |
26085 | set +e | |
26086 | as_fn_set_status $1 | |
26087 | exit $1 | |
26088 | } # as_fn_exit | |
26089 | ||
26090 | # as_fn_unset VAR | |
26091 | # --------------- | |
26092 | # Portably unset VAR. | |
26093 | as_fn_unset () | |
26094 | { | |
26095 | { eval $1=; unset $1;} | |
26096 | } | |
26097 | as_unset=as_fn_unset | |
26098 | # as_fn_append VAR VALUE | |
26099 | # ---------------------- | |
26100 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
26101 | # advantage of any shell optimizations that allow amortized linear growth over | |
26102 | # repeated appends, instead of the typical quadratic growth present in naive | |
26103 | # implementations. | |
26104 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
26105 | eval 'as_fn_append () | |
26106 | { | |
26107 | eval $1+=\$2 | |
26108 | }' | |
26109 | else | |
26110 | as_fn_append () | |
26111 | { | |
26112 | eval $1=\$$1\$2 | |
26113 | } | |
26114 | fi # as_fn_append | |
26115 | ||
26116 | # as_fn_arith ARG... | |
26117 | # ------------------ | |
26118 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
26119 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
26120 | # must be portable across $(()) and expr. | |
26121 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
26122 | eval 'as_fn_arith () | |
26123 | { | |
26124 | as_val=$(( $* )) | |
26125 | }' | |
26126 | else | |
26127 | as_fn_arith () | |
26128 | { | |
26129 | as_val=`expr "$@" || test $? -eq 1` | |
26130 | } | |
26131 | fi # as_fn_arith | |
1a4b763e | 26132 | |
5213506e RW |
26133 | |
26134 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
26135 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
1a4b763e BS |
26136 | as_expr=expr |
26137 | else | |
26138 | as_expr=false | |
26139 | fi | |
26140 | ||
5213506e | 26141 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
1a4b763e BS |
26142 | as_basename=basename |
26143 | else | |
26144 | as_basename=false | |
26145 | fi | |
26146 | ||
5213506e RW |
26147 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
26148 | as_dirname=dirname | |
26149 | else | |
26150 | as_dirname=false | |
26151 | fi | |
1a4b763e | 26152 | |
5213506e | 26153 | as_me=`$as_basename -- "$0" || |
1a4b763e BS |
26154 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
26155 | X"$0" : 'X\(//\)$' \| \ | |
5213506e RW |
26156 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
26157 | $as_echo X/"$0" | | |
26158 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
26159 | s//\1/ | |
26160 | q | |
26161 | } | |
26162 | /^X\/\(\/\/\)$/{ | |
26163 | s//\1/ | |
26164 | q | |
26165 | } | |
26166 | /^X\/\(\/\).*/{ | |
26167 | s//\1/ | |
26168 | q | |
26169 | } | |
26170 | s/.*/./; q'` | |
b61ff9c8 | 26171 | |
b61ff9c8 BS |
26172 | # Avoid depending upon Character Ranges. |
26173 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
26174 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
26175 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
26176 | as_cr_digits='0123456789' | |
26177 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
26178 | ||
5213506e RW |
26179 | ECHO_C= ECHO_N= ECHO_T= |
26180 | case `echo -n x` in #((((( | |
26181 | -n*) | |
26182 | case `echo 'xy\c'` in | |
26183 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
26184 | xy) ECHO_C='\c';; | |
26185 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
26186 | ECHO_T=' ';; | |
26187 | esac;; | |
26188 | *) | |
26189 | ECHO_N='-n';; | |
ba479fd2 NN |
26190 | esac |
26191 | ||
ba479fd2 | 26192 | rm -f conf$$ conf$$.exe conf$$.file |
5213506e RW |
26193 | if test -d conf$$.dir; then |
26194 | rm -f conf$$.dir/conf$$.file | |
26195 | else | |
26196 | rm -f conf$$.dir | |
26197 | mkdir conf$$.dir 2>/dev/null | |
26198 | fi | |
26199 | if (echo >conf$$.file) 2>/dev/null; then | |
26200 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b61ff9c8 | 26201 | as_ln_s='ln -s' |
5213506e RW |
26202 | # ... but there are two gotchas: |
26203 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
26204 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
26205 | # In both cases, we have to default to `cp -p'. | |
26206 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
26207 | as_ln_s='cp -p' | |
26208 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
26209 | as_ln_s=ln | |
26210 | else | |
26211 | as_ln_s='cp -p' | |
b61ff9c8 | 26212 | fi |
ba479fd2 NN |
26213 | else |
26214 | as_ln_s='cp -p' | |
26215 | fi | |
5213506e RW |
26216 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
26217 | rmdir conf$$.dir 2>/dev/null | |
26218 | ||
26219 | ||
26220 | # as_fn_mkdir_p | |
26221 | # ------------- | |
26222 | # Create "$as_dir" as a directory, including parents if necessary. | |
26223 | as_fn_mkdir_p () | |
26224 | { | |
26225 | ||
26226 | case $as_dir in #( | |
26227 | -*) as_dir=./$as_dir;; | |
26228 | esac | |
26229 | test -d "$as_dir" || eval $as_mkdir_p || { | |
26230 | as_dirs= | |
26231 | while :; do | |
26232 | case $as_dir in #( | |
26233 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
26234 | *) as_qdir=$as_dir;; | |
26235 | esac | |
26236 | as_dirs="'$as_qdir' $as_dirs" | |
26237 | as_dir=`$as_dirname -- "$as_dir" || | |
26238 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
26239 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
26240 | X"$as_dir" : 'X\(//\)$' \| \ | |
26241 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
26242 | $as_echo X"$as_dir" | | |
26243 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
26244 | s//\1/ | |
26245 | q | |
26246 | } | |
26247 | /^X\(\/\/\)[^/].*/{ | |
26248 | s//\1/ | |
26249 | q | |
26250 | } | |
26251 | /^X\(\/\/\)$/{ | |
26252 | s//\1/ | |
26253 | q | |
26254 | } | |
26255 | /^X\(\/\).*/{ | |
26256 | s//\1/ | |
26257 | q | |
26258 | } | |
26259 | s/.*/./; q'` | |
26260 | test -d "$as_dir" && break | |
26261 | done | |
26262 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
26263 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
26264 | ||
ba479fd2 | 26265 | |
5213506e | 26266 | } # as_fn_mkdir_p |
ba479fd2 | 26267 | if mkdir -p . 2>/dev/null; then |
5213506e | 26268 | as_mkdir_p='mkdir -p "$as_dir"' |
ba479fd2 | 26269 | else |
86da66b5 | 26270 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
26271 | as_mkdir_p=false |
26272 | fi | |
26273 | ||
5213506e RW |
26274 | if test -x / >/dev/null 2>&1; then |
26275 | as_test_x='test -x' | |
26276 | else | |
26277 | if ls -dL / >/dev/null 2>&1; then | |
26278 | as_ls_L_option=L | |
26279 | else | |
26280 | as_ls_L_option= | |
26281 | fi | |
26282 | as_test_x=' | |
26283 | eval sh -c '\'' | |
26284 | if test -d "$1"; then | |
26285 | test -d "$1/."; | |
26286 | else | |
26287 | case $1 in #( | |
26288 | -*)set "./$1";; | |
26289 | esac; | |
26290 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
26291 | ???[sx]*):;;*)false;;esac;fi | |
26292 | '\'' sh | |
26293 | ' | |
26294 | fi | |
26295 | as_executable_p=$as_test_x | |
ba479fd2 NN |
26296 | |
26297 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 26298 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
26299 | |
26300 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 26301 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
26302 | |
26303 | ||
ba479fd2 | 26304 | exec 6>&1 |
5213506e RW |
26305 | ## ----------------------------------- ## |
26306 | ## Main body of $CONFIG_STATUS script. ## | |
26307 | ## ----------------------------------- ## | |
26308 | _ASEOF | |
26309 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
ba479fd2 | 26310 | |
5213506e RW |
26311 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26312 | # Save the log message, to keep $0 and so on meaningful, and to | |
ba479fd2 | 26313 | # report actual input values of CONFIG_FILES etc. instead of their |
5213506e RW |
26314 | # values after options handling. |
26315 | ac_log=" | |
ba479fd2 | 26316 | This file was extended by $as_me, which was |
5213506e | 26317 | generated by GNU Autoconf 2.64. Invocation command line was |
ba479fd2 NN |
26318 | |
26319 | CONFIG_FILES = $CONFIG_FILES | |
26320 | CONFIG_HEADERS = $CONFIG_HEADERS | |
26321 | CONFIG_LINKS = $CONFIG_LINKS | |
26322 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
26323 | $ $0 $@ | |
26324 | ||
5213506e RW |
26325 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
26326 | " | |
26327 | ||
ba479fd2 NN |
26328 | _ACEOF |
26329 | ||
5213506e RW |
26330 | case $ac_config_files in *" |
26331 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
26332 | esac | |
2f41c1d6 | 26333 | |
5213506e RW |
26334 | case $ac_config_headers in *" |
26335 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
26336 | esac | |
b61ff9c8 | 26337 | |
b61ff9c8 | 26338 | |
5213506e RW |
26339 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
26340 | # Files that config.status was made for. | |
26341 | config_files="$ac_config_files" | |
26342 | config_headers="$ac_config_headers" | |
26343 | config_commands="$ac_config_commands" | |
ba479fd2 | 26344 | |
5213506e | 26345 | _ACEOF |
b61ff9c8 | 26346 | |
5213506e | 26347 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ba479fd2 | 26348 | ac_cs_usage="\ |
5213506e RW |
26349 | \`$as_me' instantiates files and other configuration actions |
26350 | from templates according to the current configuration. Unless the files | |
26351 | and actions are specified as TAGs, all are instantiated by default. | |
ba479fd2 | 26352 | |
5213506e | 26353 | Usage: $0 [OPTION]... [TAG]... |
ba479fd2 NN |
26354 | |
26355 | -h, --help print this help, then exit | |
5213506e RW |
26356 | -V, --version print version number and configuration settings, then exit |
26357 | -q, --quiet, --silent | |
26358 | do not print progress messages | |
ba479fd2 NN |
26359 | -d, --debug don't remove temporary files |
26360 | --recheck update $as_me by reconfiguring in the same conditions | |
5213506e RW |
26361 | --file=FILE[:TEMPLATE] |
26362 | instantiate the configuration file FILE | |
26363 | --header=FILE[:TEMPLATE] | |
26364 | instantiate the configuration header FILE | |
ba479fd2 NN |
26365 | |
26366 | Configuration files: | |
26367 | $config_files | |
26368 | ||
26369 | Configuration headers: | |
26370 | $config_headers | |
26371 | ||
26372 | Configuration commands: | |
26373 | $config_commands | |
26374 | ||
5213506e | 26375 | Report bugs to the package provider." |
b61ff9c8 | 26376 | |
5213506e RW |
26377 | _ACEOF |
26378 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
ba479fd2 NN |
26379 | ac_cs_version="\\ |
26380 | config.status | |
5213506e RW |
26381 | configured by $0, generated by GNU Autoconf 2.64, |
26382 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
ba479fd2 | 26383 | |
5213506e | 26384 | Copyright (C) 2009 Free Software Foundation, Inc. |
ba479fd2 NN |
26385 | This config.status script is free software; the Free Software Foundation |
26386 | gives unlimited permission to copy, distribute and modify it." | |
5213506e RW |
26387 | |
26388 | ac_pwd='$ac_pwd' | |
26389 | srcdir='$srcdir' | |
26390 | AWK='$AWK' | |
26391 | test -n "\$AWK" || AWK=awk | |
ba479fd2 NN |
26392 | _ACEOF |
26393 | ||
5213506e RW |
26394 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26395 | # The default lists apply if the user does not specify any file. | |
ba479fd2 NN |
26396 | ac_need_defaults=: |
26397 | while test $# != 0 | |
26398 | do | |
26399 | case $1 in | |
26400 | --*=*) | |
5213506e RW |
26401 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
26402 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
ba479fd2 NN |
26403 | ac_shift=: |
26404 | ;; | |
5213506e | 26405 | *) |
ba479fd2 NN |
26406 | ac_option=$1 |
26407 | ac_optarg=$2 | |
26408 | ac_shift=shift | |
26409 | ;; | |
ba479fd2 NN |
26410 | esac |
26411 | ||
26412 | case $ac_option in | |
26413 | # Handling of the options. | |
ba479fd2 NN |
26414 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
26415 | ac_cs_recheck=: ;; | |
5213506e RW |
26416 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
26417 | $as_echo "$ac_cs_version"; exit ;; | |
26418 | --debug | --debu | --deb | --de | --d | -d ) | |
ba479fd2 NN |
26419 | debug=: ;; |
26420 | --file | --fil | --fi | --f ) | |
26421 | $ac_shift | |
5213506e RW |
26422 | case $ac_optarg in |
26423 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
26424 | esac | |
26425 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
ba479fd2 NN |
26426 | ac_need_defaults=false;; |
26427 | --header | --heade | --head | --hea ) | |
26428 | $ac_shift | |
5213506e RW |
26429 | case $ac_optarg in |
26430 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
26431 | esac | |
26432 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
ba479fd2 | 26433 | ac_need_defaults=false;; |
5213506e RW |
26434 | --he | --h) |
26435 | # Conflict between --help and --header | |
26436 | as_fn_error "ambiguous option: \`$1' | |
26437 | Try \`$0 --help' for more information.";; | |
26438 | --help | --hel | -h ) | |
26439 | $as_echo "$ac_cs_usage"; exit ;; | |
ba479fd2 NN |
26440 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
26441 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
26442 | ac_cs_silent=: ;; | |
26443 | ||
26444 | # This is an error. | |
5213506e RW |
26445 | -*) as_fn_error "unrecognized option: \`$1' |
26446 | Try \`$0 --help' for more information." ;; | |
ba479fd2 | 26447 | |
5213506e RW |
26448 | *) as_fn_append ac_config_targets " $1" |
26449 | ac_need_defaults=false ;; | |
ba479fd2 NN |
26450 | |
26451 | esac | |
26452 | shift | |
6e3f3080 | 26453 | done |
ba479fd2 NN |
26454 | |
26455 | ac_configure_extra_args= | |
26456 | ||
26457 | if $ac_cs_silent; then | |
26458 | exec 6>/dev/null | |
26459 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
26460 | fi |
26461 | ||
ba479fd2 | 26462 | _ACEOF |
5213506e | 26463 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
ba479fd2 | 26464 | if \$ac_cs_recheck; then |
5213506e RW |
26465 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
26466 | shift | |
26467 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
26468 | CONFIG_SHELL='$SHELL' | |
26469 | export CONFIG_SHELL | |
26470 | exec "\$@" | |
ba479fd2 | 26471 | fi |
861bb6c1 | 26472 | |
ba479fd2 | 26473 | _ACEOF |
5213506e RW |
26474 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26475 | exec 5>>config.log | |
26476 | { | |
26477 | echo | |
26478 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
26479 | ## Running $as_me. ## | |
26480 | _ASBOX | |
26481 | $as_echo "$ac_log" | |
26482 | } >&5 | |
ba479fd2 | 26483 | |
5213506e RW |
26484 | _ACEOF |
26485 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
ba479fd2 | 26486 | # |
5213506e | 26487 | # INIT-COMMANDS |
ba479fd2 | 26488 | # |
ba479fd2 | 26489 | subdirs='$subdirs' |
ba479fd2 NN |
26490 | |
26491 | _ACEOF | |
26492 | ||
5213506e | 26493 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
1a4b763e | 26494 | |
5213506e | 26495 | # Handling of arguments. |
ba479fd2 NN |
26496 | for ac_config_target in $ac_config_targets |
26497 | do | |
5213506e RW |
26498 | case $ac_config_target in |
26499 | "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
26500 | "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;; | |
26501 | "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;; | |
26502 | "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;; | |
26503 | "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
26504 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
26505 | ||
26506 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
861bb6c1 | 26507 | esac |
ba479fd2 NN |
26508 | done |
26509 | ||
5213506e | 26510 | |
ba479fd2 NN |
26511 | # If the user did not use the arguments to specify the items to instantiate, |
26512 | # then the envvar interface is used. Set only those that are not. | |
26513 | # We use the long form for the default assignment because of an extremely | |
26514 | # bizarre bug on SunOS 4.1.3. | |
26515 | if $ac_need_defaults; then | |
26516 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
26517 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
26518 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
26519 | fi | |
26520 | ||
26521 | # Have a temporary directory for convenience. Make it in the build tree | |
5213506e | 26522 | # simply because there is no reason against having it here, and in addition, |
ba479fd2 | 26523 | # creating and moving files from /tmp can sometimes cause problems. |
5213506e RW |
26524 | # Hook for its removal unless debugging. |
26525 | # Note that there is a small window in which the directory will not be cleaned: | |
26526 | # after its creation but before its name has been assigned to `$tmp'. | |
ba479fd2 NN |
26527 | $debug || |
26528 | { | |
5213506e RW |
26529 | tmp= |
26530 | trap 'exit_status=$? | |
26531 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
26532 | ' 0 | |
26533 | trap 'as_fn_exit 1' 1 2 13 15 | |
ba479fd2 | 26534 | } |
ba479fd2 | 26535 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 26536 | |
ba479fd2 | 26537 | { |
5213506e | 26538 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
ba479fd2 NN |
26539 | test -n "$tmp" && test -d "$tmp" |
26540 | } || | |
26541 | { | |
5213506e RW |
26542 | tmp=./conf$$-$RANDOM |
26543 | (umask 077 && mkdir "$tmp") | |
26544 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
26545 | ||
26546 | # Set up the scripts for CONFIG_FILES section. | |
26547 | # No need to generate them if there are no CONFIG_FILES. | |
26548 | # This happens for instance with `./config.status config.h'. | |
26549 | if test -n "$CONFIG_FILES"; then | |
26550 | ||
26551 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
26552 | ac_cs_awk_getline=: | |
26553 | ac_cs_awk_pipe_init= | |
26554 | ac_cs_awk_read_file=' | |
26555 | while ((getline aline < (F[key])) > 0) | |
26556 | print(aline) | |
26557 | close(F[key])' | |
26558 | ac_cs_awk_pipe_fini= | |
26559 | else | |
26560 | ac_cs_awk_getline=false | |
26561 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
26562 | ac_cs_awk_read_file=' | |
26563 | print "|#_!!_#|" | |
26564 | print "cat " F[key] " &&" | |
26565 | '$ac_cs_awk_pipe_init | |
26566 | # The final `:' finishes the AND list. | |
26567 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
26568 | fi | |
26569 | ac_cr=`echo X | tr X '\015'` | |
26570 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
26571 | # But we know of no other shell where ac_cr would be empty at this | |
26572 | # point, so we can use a bashism as a fallback. | |
26573 | if test "x$ac_cr" = x; then | |
26574 | eval ac_cr=\$\'\\r\' | |
26575 | fi | |
26576 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
26577 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
26578 | ac_cs_awk_cr='\r' | |
26579 | else | |
26580 | ac_cs_awk_cr=$ac_cr | |
26581 | fi | |
26582 | ||
26583 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
26584 | _ACEOF | |
26585 | ||
26586 | # Create commands to substitute file output variables. | |
ba479fd2 | 26587 | { |
5213506e RW |
26588 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && |
26589 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
26590 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
26591 | echo "_ACAWK" && | |
26592 | echo "_ACEOF" | |
26593 | } >conf$$files.sh && | |
26594 | . ./conf$$files.sh || | |
26595 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26596 | rm -f conf$$files.sh | |
ba479fd2 | 26597 | |
5213506e RW |
26598 | { |
26599 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
26600 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
26601 | echo "_ACEOF" | |
26602 | } >conf$$subs.sh || | |
26603 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26604 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
26605 | ac_delim='%!_!# ' | |
26606 | for ac_last_try in false false false false false :; do | |
26607 | . ./conf$$subs.sh || | |
26608 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26609 | ||
26610 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
26611 | if test $ac_delim_n = $ac_delim_num; then | |
26612 | break | |
26613 | elif $ac_last_try; then | |
26614 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
26615 | else | |
26616 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
26617 | fi | |
26618 | done | |
26619 | rm -f conf$$subs.sh | |
26620 | ||
26621 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26622 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
26623 | _ACEOF | |
26624 | sed -n ' | |
26625 | h | |
26626 | s/^/S["/; s/!.*/"]=/ | |
26627 | p | |
26628 | g | |
26629 | s/^[^!]*!// | |
26630 | :repl | |
26631 | t repl | |
26632 | s/'"$ac_delim"'$// | |
26633 | t delim | |
26634 | :nl | |
26635 | h | |
26636 | s/\(.\{148\}\).*/\1/ | |
26637 | t more1 | |
26638 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
26639 | p | |
26640 | n | |
26641 | b repl | |
26642 | :more1 | |
26643 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
26644 | p | |
26645 | g | |
26646 | s/.\{148\}// | |
26647 | t nl | |
26648 | :delim | |
26649 | h | |
26650 | s/\(.\{148\}\).*/\1/ | |
26651 | t more2 | |
26652 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
26653 | p | |
26654 | b | |
26655 | :more2 | |
26656 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
26657 | p | |
26658 | g | |
26659 | s/.\{148\}// | |
26660 | t delim | |
26661 | ' <conf$$subs.awk | sed ' | |
26662 | /^[^""]/{ | |
26663 | N | |
26664 | s/\n// | |
26665 | } | |
26666 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
26667 | rm -f conf$$subs.awk | |
26668 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26669 | _ACAWK | |
26670 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
26671 | for (key in S) S_is_set[key] = 1 | |
26672 | FS = "\a" | |
26673 | \$ac_cs_awk_pipe_init | |
26674 | } | |
26675 | { | |
26676 | line = $ 0 | |
26677 | nfields = split(line, field, "@") | |
26678 | substed = 0 | |
26679 | len = length(field[1]) | |
26680 | for (i = 2; i < nfields; i++) { | |
26681 | key = field[i] | |
26682 | keylen = length(key) | |
26683 | if (S_is_set[key]) { | |
26684 | value = S[key] | |
26685 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
26686 | len += length(value) + length(field[++i]) | |
26687 | substed = 1 | |
26688 | } else | |
26689 | len += 1 + keylen | |
26690 | } | |
26691 | if (nfields == 3 && !substed) { | |
26692 | key = field[2] | |
26693 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
26694 | \$ac_cs_awk_read_file | |
26695 | next | |
26696 | } | |
26697 | } | |
26698 | print line | |
26699 | } | |
26700 | \$ac_cs_awk_pipe_fini | |
26701 | _ACAWK | |
26702 | _ACEOF | |
26703 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
26704 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
26705 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
26706 | else | |
26707 | cat | |
26708 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
26709 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
b61ff9c8 BS |
26710 | _ACEOF |
26711 | ||
5213506e RW |
26712 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
26713 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
26714 | # trailing colons and then remove the whole line if VPATH becomes empty | |
26715 | # (actually we leave an empty line to preserve line numbers). | |
26716 | if test "x$srcdir" = x.; then | |
26717 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
26718 | s/:*\$(srcdir):*/:/ | |
26719 | s/:*\${srcdir}:*/:/ | |
26720 | s/:*@srcdir@:*/:/ | |
26721 | s/^\([^=]*=[ ]*\):*/\1/ | |
26722 | s/:*$// | |
26723 | s/^[^=]*=[ ]*$// | |
26724 | }' | |
26725 | fi | |
ba479fd2 | 26726 | |
5213506e RW |
26727 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26728 | fi # test -n "$CONFIG_FILES" | |
b61ff9c8 | 26729 | |
5213506e RW |
26730 | # Set up the scripts for CONFIG_HEADERS section. |
26731 | # No need to generate them if there are no CONFIG_HEADERS. | |
26732 | # This happens for instance with `./config.status Makefile'. | |
26733 | if test -n "$CONFIG_HEADERS"; then | |
26734 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
26735 | BEGIN { | |
b61ff9c8 BS |
26736 | _ACEOF |
26737 | ||
5213506e RW |
26738 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
26739 | # here-document in config.status, that substitutes the proper values into | |
26740 | # config.h.in to produce config.h. | |
26741 | ||
26742 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
26743 | # handling of long lines. | |
26744 | ac_delim='%!_!# ' | |
26745 | for ac_last_try in false false :; do | |
26746 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
26747 | if test -z "$ac_t"; then | |
26748 | break | |
26749 | elif $ac_last_try; then | |
26750 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
26751 | else | |
26752 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
1a4b763e | 26753 | fi |
5213506e | 26754 | done |
1a4b763e | 26755 | |
5213506e RW |
26756 | # For the awk script, D is an array of macro values keyed by name, |
26757 | # likewise P contains macro parameters if any. Preserve backslash | |
26758 | # newline sequences. | |
26759 | ||
26760 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
26761 | sed -n ' | |
26762 | s/.\{148\}/&'"$ac_delim"'/g | |
26763 | t rset | |
26764 | :rset | |
26765 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
26766 | t def | |
26767 | d | |
26768 | :def | |
26769 | s/\\$// | |
26770 | t bsnl | |
26771 | s/["\\]/\\&/g | |
26772 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
26773 | D["\1"]=" \3"/p | |
26774 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
26775 | d | |
26776 | :bsnl | |
26777 | s/["\\]/\\&/g | |
26778 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
26779 | D["\1"]=" \3\\\\\\n"\\/p | |
26780 | t cont | |
26781 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
26782 | t cont | |
26783 | d | |
26784 | :cont | |
26785 | n | |
26786 | s/.\{148\}/&'"$ac_delim"'/g | |
26787 | t clear | |
26788 | :clear | |
26789 | s/\\$// | |
26790 | t bsnlc | |
26791 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
26792 | d | |
26793 | :bsnlc | |
26794 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
26795 | b cont | |
26796 | ' <confdefs.h | sed ' | |
26797 | s/'"$ac_delim"'/"\\\ | |
26798 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
26799 | ||
26800 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26801 | for (key in D) D_is_set[key] = 1 | |
26802 | FS = "\a" | |
26803 | } | |
26804 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
26805 | line = \$ 0 | |
26806 | split(line, arg, " ") | |
26807 | if (arg[1] == "#") { | |
26808 | defundef = arg[2] | |
26809 | mac1 = arg[3] | |
26810 | } else { | |
26811 | defundef = substr(arg[1], 2) | |
26812 | mac1 = arg[2] | |
26813 | } | |
26814 | split(mac1, mac2, "(") #) | |
26815 | macro = mac2[1] | |
26816 | prefix = substr(line, 1, index(line, defundef) - 1) | |
26817 | if (D_is_set[macro]) { | |
26818 | # Preserve the white space surrounding the "#". | |
26819 | print prefix "define", macro P[macro] D[macro] | |
26820 | next | |
26821 | } else { | |
26822 | # Replace #undef with comments. This is necessary, for example, | |
26823 | # in the case of _POSIX_SOURCE, which is predefined and required | |
26824 | # on some systems where configure will not decide to define it. | |
26825 | if (defundef == "undef") { | |
26826 | print "/*", prefix defundef, macro, "*/" | |
26827 | next | |
26828 | } | |
26829 | } | |
26830 | } | |
26831 | { print } | |
26832 | _ACAWK | |
1a4b763e | 26833 | _ACEOF |
5213506e RW |
26834 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26835 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
26836 | fi # test -n "$CONFIG_HEADERS" | |
26837 | ||
26838 | ||
26839 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
26840 | shift | |
26841 | for ac_tag | |
26842 | do | |
26843 | case $ac_tag in | |
26844 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
26845 | esac | |
26846 | case $ac_mode$ac_tag in | |
26847 | :[FHL]*:*);; | |
26848 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
26849 | :[FH]-) ac_tag=-:-;; | |
26850 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
26851 | esac | |
26852 | ac_save_IFS=$IFS | |
26853 | IFS=: | |
26854 | set x $ac_tag | |
26855 | IFS=$ac_save_IFS | |
26856 | shift | |
26857 | ac_file=$1 | |
26858 | shift | |
26859 | ||
26860 | case $ac_mode in | |
26861 | :L) ac_source=$1;; | |
26862 | :[FH]) | |
26863 | ac_file_inputs= | |
26864 | for ac_f | |
26865 | do | |
26866 | case $ac_f in | |
26867 | -) ac_f="$tmp/stdin";; | |
26868 | *) # Look for the file first in the build tree, then in the source tree | |
26869 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
26870 | # because $ac_f cannot contain `:'. | |
26871 | test -f "$ac_f" || | |
26872 | case $ac_f in | |
26873 | [\\/$]*) false;; | |
26874 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
26875 | esac || | |
26876 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
26877 | esac | |
26878 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
26879 | as_fn_append ac_file_inputs " '$ac_f'" | |
26880 | done | |
26881 | ||
26882 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
26883 | # use $as_me), people would be surprised to read: | |
26884 | # /* config.h. Generated by config.status. */ | |
26885 | configure_input='Generated from '` | |
26886 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
26887 | `' by configure.' | |
26888 | if test x"$ac_file" != x-; then | |
26889 | configure_input="$ac_file. $configure_input" | |
26890 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
26891 | $as_echo "$as_me: creating $ac_file" >&6;} | |
26892 | fi | |
26893 | # Neutralize special characters interpreted by sed in replacement strings. | |
26894 | case $configure_input in #( | |
26895 | *\&* | *\|* | *\\* ) | |
26896 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
26897 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
26898 | *) ac_sed_conf_input=$configure_input;; | |
26899 | esac | |
26900 | ||
26901 | case $ac_tag in | |
26902 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
26903 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
26904 | esac | |
26905 | ;; | |
703d89ab ZW |
26906 | esac |
26907 | ||
5213506e | 26908 | ac_dir=`$as_dirname -- "$ac_file" || |
ba479fd2 | 26909 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
26910 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
26911 | X"$ac_file" : 'X\(//\)$' \| \ | |
5213506e RW |
26912 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
26913 | $as_echo X"$ac_file" | | |
26914 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
26915 | s//\1/ | |
26916 | q | |
26917 | } | |
26918 | /^X\(\/\/\)[^/].*/{ | |
26919 | s//\1/ | |
26920 | q | |
26921 | } | |
26922 | /^X\(\/\/\)$/{ | |
26923 | s//\1/ | |
26924 | q | |
26925 | } | |
26926 | /^X\(\/\).*/{ | |
26927 | s//\1/ | |
26928 | q | |
26929 | } | |
26930 | s/.*/./; q'` | |
26931 | as_dir="$ac_dir"; as_fn_mkdir_p | |
ba479fd2 NN |
26932 | ac_builddir=. |
26933 | ||
5213506e RW |
26934 | case "$ac_dir" in |
26935 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
26936 | *) | |
26937 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
26938 | # A ".." for each directory in $ac_dir_suffix. | |
26939 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
26940 | case $ac_top_builddir_sub in | |
26941 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
26942 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
26943 | esac ;; | |
26944 | esac | |
26945 | ac_abs_top_builddir=$ac_pwd | |
26946 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
26947 | # for backward compatibility: | |
26948 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
26949 | |
26950 | case $srcdir in | |
5213506e | 26951 | .) # We are building in place. |
ba479fd2 | 26952 | ac_srcdir=. |
5213506e RW |
26953 | ac_top_srcdir=$ac_top_builddir_sub |
26954 | ac_abs_top_srcdir=$ac_pwd ;; | |
26955 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 26956 | ac_srcdir=$srcdir$ac_dir_suffix; |
5213506e RW |
26957 | ac_top_srcdir=$srcdir |
26958 | ac_abs_top_srcdir=$srcdir ;; | |
26959 | *) # Relative name. | |
26960 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
26961 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
26962 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
ba479fd2 | 26963 | esac |
5213506e | 26964 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
ba479fd2 | 26965 | |
703d89ab | 26966 | |
5213506e RW |
26967 | case $ac_mode in |
26968 | :F) | |
26969 | # | |
26970 | # CONFIG_FILE | |
26971 | # | |
ab22c1fa | 26972 | |
5213506e | 26973 | _ACEOF |
1a4b763e | 26974 | |
5213506e RW |
26975 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
26976 | # If the template does not know about datarootdir, expand it. | |
26977 | # FIXME: This hack should be removed a few years after 2.60. | |
26978 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
26979 | ac_sed_dataroot=' | |
26980 | /datarootdir/ { | |
26981 | p | |
26982 | q | |
26983 | } | |
26984 | /@datadir@/p | |
26985 | /@docdir@/p | |
26986 | /@infodir@/p | |
26987 | /@localedir@/p | |
26988 | /@mandir@/p' | |
26989 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
26990 | *datarootdir*) ac_datarootdir_seen=yes;; | |
26991 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
26992 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
26993 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
26994 | _ACEOF | |
26995 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
26996 | ac_datarootdir_hack=' | |
26997 | s&@datadir@&$datadir&g | |
26998 | s&@docdir@&$docdir&g | |
26999 | s&@infodir@&$infodir&g | |
27000 | s&@localedir@&$localedir&g | |
27001 | s&@mandir@&$mandir&g | |
27002 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
27003 | esac | |
a6ccdbab | 27004 | _ACEOF |
5213506e RW |
27005 | |
27006 | # Neutralize VPATH when `$srcdir' = `.'. | |
27007 | # Shell code in configure.ac might set extrasub. | |
27008 | # FIXME: do we really want to maintain this feature? | |
27009 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
27010 | ac_sed_extra="$ac_vpsub | |
ba479fd2 NN |
27011 | $extrasub |
27012 | _ACEOF | |
5213506e | 27013 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ba479fd2 NN |
27014 | :t |
27015 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
5213506e RW |
27016 | s|@configure_input@|$ac_sed_conf_input|;t t |
27017 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
27018 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
27019 | s&@srcdir@&$ac_srcdir&;t t | |
27020 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
27021 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
27022 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
27023 | s&@builddir@&$ac_builddir&;t t | |
27024 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
27025 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
27026 | $ac_datarootdir_hack | |
27027 | " | |
27028 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
27029 | if $ac_cs_awk_getline; then | |
27030 | $AWK -f "$tmp/subs.awk" | |
27031 | else | |
27032 | $AWK -f "$tmp/subs.awk" | $SHELL | |
27033 | fi >$tmp/out \ | |
27034 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
27035 | ||
27036 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
27037 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
27038 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
27039 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
27040 | which seems to be undefined. Please make sure it is defined." >&5 | |
27041 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
27042 | which seems to be undefined. Please make sure it is defined." >&2;} | |
27043 | ||
27044 | rm -f "$tmp/stdin" | |
b61ff9c8 | 27045 | case $ac_file in |
5213506e RW |
27046 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
27047 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
27048 | esac \ | |
27049 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
27050 | ;; | |
27051 | :H) | |
27052 | # | |
27053 | # CONFIG_HEADER | |
27054 | # | |
ba479fd2 | 27055 | if test x"$ac_file" != x-; then |
5213506e RW |
27056 | { |
27057 | $as_echo "/* $configure_input */" \ | |
27058 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
27059 | } >"$tmp/config.h" \ | |
27060 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
27061 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
27062 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
27063 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
ba479fd2 | 27064 | else |
5213506e RW |
27065 | rm -f "$ac_file" |
27066 | mv "$tmp/config.h" "$ac_file" \ | |
27067 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
ba479fd2 NN |
27068 | fi |
27069 | else | |
5213506e RW |
27070 | $as_echo "/* $configure_input */" \ |
27071 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
27072 | || as_fn_error "could not create -" "$LINENO" 5 | |
ba479fd2 | 27073 | fi |
5213506e | 27074 | ;; |
b61ff9c8 | 27075 | |
5213506e RW |
27076 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
27077 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
27078 | ;; | |
27079 | esac | |
b61ff9c8 BS |
27080 | |
27081 | ||
5213506e RW |
27082 | case $ac_file$ac_mode in |
27083 | "as":F) chmod +x as ;; | |
27084 | "collect-ld":F) chmod +x collect-ld ;; | |
27085 | "nm":F) chmod +x nm ;; | |
27086 | "default":C) | |
f1faaabd NN |
27087 | case ${CONFIG_HEADERS} in |
27088 | *auto-host.h:config.in*) | |
27089 | echo > cstamp-h ;; | |
861bb6c1 | 27090 | esac |
2ed26f6b | 27091 | # Make sure all the subdirs exist. |
39dabefd | 27092 | for d in $subdirs doc build c-family |
2ed26f6b | 27093 | do |
2ed26f6b | 27094 | test -d $d || mkdir $d |
2ed26f6b | 27095 | done |
ba479fd2 | 27096 | ;; |
5213506e | 27097 | |
ba479fd2 | 27098 | esac |
5213506e | 27099 | done # for ac_tag |
cafe096b | 27100 | |
ba479fd2 | 27101 | |
5213506e | 27102 | as_fn_exit 0 |
ba479fd2 | 27103 | _ACEOF |
ba479fd2 NN |
27104 | ac_clean_files=$ac_clean_files_save |
27105 | ||
5213506e RW |
27106 | test $ac_write_fail = 0 || |
27107 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
27108 | ||
ba479fd2 NN |
27109 | |
27110 | # configure is writing to config.log, and then calls config.status. | |
27111 | # config.status does its own redirection, appending to config.log. | |
27112 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
27113 | # by configure, so config.status won't be able to write to it; its | |
27114 | # output is simply discarded. So we exec the FD to /dev/null, | |
27115 | # effectively closing config.log, so it can be properly (re)opened and | |
27116 | # appended to by config.status. When coming back to configure, we | |
27117 | # need to make the FD available again. | |
27118 | if test "$no_create" != yes; then | |
27119 | ac_cs_success=: | |
27120 | ac_config_status_args= | |
27121 | test "$silent" = yes && | |
27122 | ac_config_status_args="$ac_config_status_args --quiet" | |
27123 | exec 5>/dev/null | |
27124 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
27125 | exec 5>>config.log | |
27126 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
27127 | # would make configure fail if this is the last instruction. | |
5213506e RW |
27128 | $ac_cs_success || as_fn_exit $? |
27129 | fi | |
27130 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
27131 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
27132 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
ba479fd2 | 27133 | fi |
861bb6c1 | 27134 |