]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
a6ccdbab | 3 | # Generated by GNU Autoconf 2.61. |
861bb6c1 | 4 | # |
a6ccdbab EC |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
6 | # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | |
861bb6c1 JL |
7 | # This configure script is free software; the Free Software Foundation |
8 | # gives unlimited permission to copy, distribute and modify it. | |
ba479fd2 NN |
9 | ## --------------------- ## |
10 | ## M4sh Initialization. ## | |
11 | ## --------------------- ## | |
12 | ||
a6ccdbab EC |
13 | # Be more Bourne compatible |
14 | DUALCASE=1; export DUALCASE # for MKS sh | |
ba479fd2 NN |
15 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
16 | emulate sh | |
17 | NULLCMD=: | |
18 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
19 | # is contrary to our usage. Disable this feature. | |
20 | alias -g '${1+"$@"}'='"$@"' | |
a6ccdbab EC |
21 | setopt NO_GLOB_SUBST |
22 | else | |
23 | case `(set -o) 2>/dev/null` in | |
24 | *posix*) set -o posix ;; | |
25 | esac | |
26 | ||
27 | fi | |
28 | ||
29 | ||
30 | ||
31 | ||
32 | # PATH needs CR | |
33 | # Avoid depending upon Character Ranges. | |
34 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
35 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
36 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
37 | as_cr_digits='0123456789' | |
38 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
39 | ||
40 | # The user is always right. | |
41 | if test "${PATH_SEPARATOR+set}" != set; then | |
42 | echo "#! /bin/sh" >conf$$.sh | |
43 | echo "exit 0" >>conf$$.sh | |
44 | chmod +x conf$$.sh | |
45 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
46 | PATH_SEPARATOR=';' | |
47 | else | |
48 | PATH_SEPARATOR=: | |
49 | fi | |
50 | rm -f conf$$.sh | |
ba479fd2 NN |
51 | fi |
52 | ||
53 | # Support unset when possible. | |
86da66b5 | 54 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
55 | as_unset=unset |
56 | else | |
57 | as_unset=false | |
58 | fi | |
59 | ||
60 | ||
a6ccdbab EC |
61 | # IFS |
62 | # We need space, tab and new line, in precisely that order. Quoting is | |
63 | # there to prevent editors from complaining about space-tab. | |
64 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
65 | # splitting by setting IFS to empty value.) | |
66 | as_nl=' | |
67 | ' | |
68 | IFS=" "" $as_nl" | |
69 | ||
70 | # Find who we are. Look in the path if we contain no directory separator. | |
71 | case $0 in | |
72 | *[\\/]* ) as_myself=$0 ;; | |
73 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
74 | for as_dir in $PATH | |
75 | do | |
76 | IFS=$as_save_IFS | |
77 | test -z "$as_dir" && as_dir=. | |
78 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
79 | done | |
80 | IFS=$as_save_IFS | |
81 | ||
82 | ;; | |
83 | esac | |
84 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
85 | # in which case we are not to be found in the path. | |
86 | if test "x$as_myself" = x; then | |
87 | as_myself=$0 | |
88 | fi | |
89 | if test ! -f "$as_myself"; then | |
90 | echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
91 | { (exit 1); exit 1; } | |
92 | fi | |
93 | ||
ba479fd2 | 94 | # Work around bugs in pre-3.0 UWIN ksh. |
a6ccdbab EC |
95 | for as_var in ENV MAIL MAILPATH |
96 | do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var | |
97 | done | |
ba479fd2 NN |
98 | PS1='$ ' |
99 | PS2='> ' | |
100 | PS4='+ ' | |
101 | ||
102 | # NLS nuisances. | |
103 | for as_var in \ | |
104 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
105 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
106 | LC_TELEPHONE LC_TIME | |
107 | do | |
86da66b5 | 108 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
109 | eval $as_var=C; export $as_var |
110 | else | |
a6ccdbab | 111 | ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var |
ba479fd2 NN |
112 | fi |
113 | done | |
114 | ||
115 | # Required to use basename. | |
a6ccdbab EC |
116 | if expr a : '\(a\)' >/dev/null 2>&1 && |
117 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
ba479fd2 NN |
118 | as_expr=expr |
119 | else | |
120 | as_expr=false | |
121 | fi | |
122 | ||
a6ccdbab | 123 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
ba479fd2 NN |
124 | as_basename=basename |
125 | else | |
126 | as_basename=false | |
127 | fi | |
128 | ||
129 | ||
130 | # Name of the executable. | |
a6ccdbab | 131 | as_me=`$as_basename -- "$0" || |
ba479fd2 NN |
132 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
133 | X"$0" : 'X\(//\)$' \| \ | |
a6ccdbab | 134 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 135 | echo X/"$0" | |
a6ccdbab EC |
136 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
137 | s//\1/ | |
138 | q | |
139 | } | |
140 | /^X\/\(\/\/\)$/{ | |
141 | s//\1/ | |
142 | q | |
143 | } | |
144 | /^X\/\(\/\).*/{ | |
145 | s//\1/ | |
146 | q | |
147 | } | |
148 | s/.*/./; q'` | |
ba479fd2 | 149 | |
a6ccdbab EC |
150 | # CDPATH. |
151 | $as_unset CDPATH | |
ba479fd2 | 152 | |
ba479fd2 | 153 | |
a6ccdbab EC |
154 | if test "x$CONFIG_SHELL" = x; then |
155 | if (eval ":") 2>/dev/null; then | |
156 | as_have_required=yes | |
157 | else | |
158 | as_have_required=no | |
b8ec3cc8 EC |
159 | fi |
160 | ||
a6ccdbab EC |
161 | if test $as_have_required = yes && (eval ": |
162 | (as_func_return () { | |
163 | (exit \$1) | |
164 | } | |
165 | as_func_success () { | |
166 | as_func_return 0 | |
167 | } | |
168 | as_func_failure () { | |
169 | as_func_return 1 | |
170 | } | |
171 | as_func_ret_success () { | |
172 | return 0 | |
173 | } | |
174 | as_func_ret_failure () { | |
175 | return 1 | |
176 | } | |
b8ec3cc8 | 177 | |
a6ccdbab EC |
178 | exitcode=0 |
179 | if as_func_success; then | |
180 | : | |
181 | else | |
182 | exitcode=1 | |
183 | echo as_func_success failed. | |
184 | fi | |
b8ec3cc8 | 185 | |
a6ccdbab EC |
186 | if as_func_failure; then |
187 | exitcode=1 | |
188 | echo as_func_failure succeeded. | |
189 | fi | |
190 | ||
191 | if as_func_ret_success; then | |
192 | : | |
193 | else | |
194 | exitcode=1 | |
195 | echo as_func_ret_success failed. | |
196 | fi | |
197 | ||
198 | if as_func_ret_failure; then | |
199 | exitcode=1 | |
200 | echo as_func_ret_failure succeeded. | |
201 | fi | |
202 | ||
203 | if ( set x; as_func_ret_success y && test x = \"\$1\" ); then | |
204 | : | |
205 | else | |
206 | exitcode=1 | |
207 | echo positional parameters were not saved. | |
208 | fi | |
209 | ||
210 | test \$exitcode = 0) || { (exit 1); exit 1; } | |
211 | ||
212 | ( | |
213 | as_lineno_1=\$LINENO | |
214 | as_lineno_2=\$LINENO | |
215 | test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && | |
216 | test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } | |
217 | ") 2> /dev/null; then | |
218 | : | |
219 | else | |
220 | as_candidate_shells= | |
ba479fd2 | 221 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
dd7f7a6e | 222 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH |
ba479fd2 NN |
223 | do |
224 | IFS=$as_save_IFS | |
225 | test -z "$as_dir" && as_dir=. | |
a6ccdbab | 226 | case $as_dir in |
ba479fd2 | 227 | /*) |
a6ccdbab EC |
228 | for as_base in sh bash ksh sh5; do |
229 | as_candidate_shells="$as_candidate_shells $as_dir/$as_base" | |
230 | done;; | |
231 | esac | |
232 | done | |
233 | IFS=$as_save_IFS | |
234 | ||
235 | ||
236 | for as_shell in $as_candidate_shells $SHELL; do | |
237 | # Try only shells that exist, to save several forks. | |
238 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
239 | { ("$as_shell") 2> /dev/null <<\_ASEOF | |
240 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
241 | emulate sh | |
242 | NULLCMD=: | |
243 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
244 | # is contrary to our usage. Disable this feature. | |
245 | alias -g '${1+"$@"}'='"$@"' | |
246 | setopt NO_GLOB_SUBST | |
247 | else | |
248 | case `(set -o) 2>/dev/null` in | |
249 | *posix*) set -o posix ;; | |
250 | esac | |
251 | ||
252 | fi | |
253 | ||
254 | ||
255 | : | |
256 | _ASEOF | |
257 | }; then | |
258 | CONFIG_SHELL=$as_shell | |
259 | as_have_required=yes | |
260 | if { "$as_shell" 2> /dev/null <<\_ASEOF | |
261 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
262 | emulate sh | |
263 | NULLCMD=: | |
264 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
265 | # is contrary to our usage. Disable this feature. | |
266 | alias -g '${1+"$@"}'='"$@"' | |
267 | setopt NO_GLOB_SUBST | |
268 | else | |
269 | case `(set -o) 2>/dev/null` in | |
270 | *posix*) set -o posix ;; | |
271 | esac | |
272 | ||
273 | fi | |
274 | ||
275 | ||
276 | : | |
277 | (as_func_return () { | |
278 | (exit $1) | |
279 | } | |
280 | as_func_success () { | |
281 | as_func_return 0 | |
282 | } | |
283 | as_func_failure () { | |
284 | as_func_return 1 | |
285 | } | |
286 | as_func_ret_success () { | |
287 | return 0 | |
288 | } | |
289 | as_func_ret_failure () { | |
290 | return 1 | |
291 | } | |
292 | ||
293 | exitcode=0 | |
294 | if as_func_success; then | |
295 | : | |
296 | else | |
297 | exitcode=1 | |
298 | echo as_func_success failed. | |
299 | fi | |
300 | ||
301 | if as_func_failure; then | |
302 | exitcode=1 | |
303 | echo as_func_failure succeeded. | |
304 | fi | |
305 | ||
306 | if as_func_ret_success; then | |
307 | : | |
308 | else | |
309 | exitcode=1 | |
310 | echo as_func_ret_success failed. | |
311 | fi | |
312 | ||
313 | if as_func_ret_failure; then | |
314 | exitcode=1 | |
315 | echo as_func_ret_failure succeeded. | |
316 | fi | |
317 | ||
318 | if ( set x; as_func_ret_success y && test x = "$1" ); then | |
319 | : | |
320 | else | |
321 | exitcode=1 | |
322 | echo positional parameters were not saved. | |
323 | fi | |
324 | ||
325 | test $exitcode = 0) || { (exit 1); exit 1; } | |
326 | ||
327 | ( | |
b8ec3cc8 EC |
328 | as_lineno_1=$LINENO |
329 | as_lineno_2=$LINENO | |
330 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
a6ccdbab EC |
331 | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } |
332 | ||
333 | _ASEOF | |
334 | }; then | |
335 | break | |
336 | fi | |
337 | ||
338 | fi | |
339 | ||
340 | done | |
341 | ||
342 | if test "x$CONFIG_SHELL" != x; then | |
343 | for as_var in BASH_ENV ENV | |
344 | do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var | |
345 | done | |
346 | export CONFIG_SHELL | |
347 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
348 | fi | |
349 | ||
350 | ||
351 | if test $as_have_required = no; then | |
352 | echo This script requires a shell more modern than all the | |
353 | echo shells that I found on your system. Please install a | |
354 | echo modern shell, or manually run the script under such a | |
355 | echo shell if you do have one. | |
356 | { (exit 1); exit 1; } | |
357 | fi | |
358 | ||
359 | ||
360 | fi | |
361 | ||
362 | fi | |
363 | ||
364 | ||
365 | ||
366 | (eval "as_func_return () { | |
367 | (exit \$1) | |
368 | } | |
369 | as_func_success () { | |
370 | as_func_return 0 | |
371 | } | |
372 | as_func_failure () { | |
373 | as_func_return 1 | |
374 | } | |
375 | as_func_ret_success () { | |
376 | return 0 | |
377 | } | |
378 | as_func_ret_failure () { | |
379 | return 1 | |
380 | } | |
381 | ||
382 | exitcode=0 | |
383 | if as_func_success; then | |
384 | : | |
385 | else | |
386 | exitcode=1 | |
387 | echo as_func_success failed. | |
388 | fi | |
389 | ||
390 | if as_func_failure; then | |
391 | exitcode=1 | |
392 | echo as_func_failure succeeded. | |
393 | fi | |
394 | ||
395 | if as_func_ret_success; then | |
396 | : | |
397 | else | |
398 | exitcode=1 | |
399 | echo as_func_ret_success failed. | |
400 | fi | |
401 | ||
402 | if as_func_ret_failure; then | |
403 | exitcode=1 | |
404 | echo as_func_ret_failure succeeded. | |
405 | fi | |
406 | ||
407 | if ( set x; as_func_ret_success y && test x = \"\$1\" ); then | |
408 | : | |
409 | else | |
410 | exitcode=1 | |
411 | echo positional parameters were not saved. | |
412 | fi | |
413 | ||
414 | test \$exitcode = 0") || { | |
415 | echo No shell found that supports shell functions. | |
416 | echo Please tell autoconf@gnu.org about your system, | |
417 | echo including any error possibly output before this | |
418 | echo message | |
419 | } | |
420 | ||
421 | ||
422 | ||
423 | as_lineno_1=$LINENO | |
424 | as_lineno_2=$LINENO | |
425 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
426 | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { | |
ba479fd2 NN |
427 | |
428 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
429 | # uniformly replaced by the line number. The first 'sed' inserts a | |
a6ccdbab EC |
430 | # line-number line after each line using $LINENO; the second 'sed' |
431 | # does the real work. The second script uses 'N' to pair each | |
432 | # line-number line with the line containing $LINENO, and appends | |
433 | # trailing '-' during substitution so that $LINENO is not a special | |
434 | # case at line end. | |
ba479fd2 | 435 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the |
a6ccdbab EC |
436 | # scripts with optimization help from Paolo Bonzini. Blame Lee |
437 | # E. McMahon (1931-1989) for sed's syntax. :-) | |
438 | sed -n ' | |
439 | p | |
440 | /[$]LINENO/= | |
441 | ' <$as_myself | | |
ba479fd2 | 442 | sed ' |
a6ccdbab EC |
443 | s/[$]LINENO.*/&-/ |
444 | t lineno | |
445 | b | |
446 | :lineno | |
ba479fd2 | 447 | N |
a6ccdbab EC |
448 | :loop |
449 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
ba479fd2 | 450 | t loop |
a6ccdbab | 451 | s/-\n.*// |
ba479fd2 | 452 | ' >$as_me.lineno && |
a6ccdbab | 453 | chmod +x "$as_me.lineno" || |
ba479fd2 NN |
454 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 |
455 | { (exit 1); exit 1; }; } | |
456 | ||
457 | # Don't try to exec as it changes $[0], causing all sort of problems | |
458 | # (the dirname of $[0] is not the place where we might find the | |
a6ccdbab EC |
459 | # original and so on. Autoconf is especially sensitive to this). |
460 | . "./$as_me.lineno" | |
ba479fd2 NN |
461 | # Exit status is that of the last command. |
462 | exit | |
463 | } | |
464 | ||
465 | ||
a6ccdbab EC |
466 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
467 | as_dirname=dirname | |
468 | else | |
469 | as_dirname=false | |
470 | fi | |
471 | ||
472 | ECHO_C= ECHO_N= ECHO_T= | |
473 | case `echo -n x` in | |
474 | -n*) | |
475 | case `echo 'x\c'` in | |
476 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
477 | *) ECHO_C='\c';; | |
478 | esac;; | |
479 | *) | |
480 | ECHO_N='-n';; | |
ba479fd2 NN |
481 | esac |
482 | ||
a6ccdbab EC |
483 | if expr a : '\(a\)' >/dev/null 2>&1 && |
484 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
ba479fd2 NN |
485 | as_expr=expr |
486 | else | |
487 | as_expr=false | |
488 | fi | |
489 | ||
490 | rm -f conf$$ conf$$.exe conf$$.file | |
a6ccdbab EC |
491 | if test -d conf$$.dir; then |
492 | rm -f conf$$.dir/conf$$.file | |
493 | else | |
494 | rm -f conf$$.dir | |
495 | mkdir conf$$.dir | |
496 | fi | |
ba479fd2 NN |
497 | echo >conf$$.file |
498 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
a6ccdbab EC |
499 | as_ln_s='ln -s' |
500 | # ... but there are two gotchas: | |
501 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
502 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
503 | # In both cases, we have to default to `cp -p'. | |
504 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
ba479fd2 | 505 | as_ln_s='cp -p' |
ba479fd2 NN |
506 | elif ln conf$$.file conf$$ 2>/dev/null; then |
507 | as_ln_s=ln | |
508 | else | |
509 | as_ln_s='cp -p' | |
510 | fi | |
a6ccdbab EC |
511 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
512 | rmdir conf$$.dir 2>/dev/null | |
861bb6c1 | 513 | |
ba479fd2 NN |
514 | if mkdir -p . 2>/dev/null; then |
515 | as_mkdir_p=: | |
516 | else | |
86da66b5 | 517 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
518 | as_mkdir_p=false |
519 | fi | |
520 | ||
a6ccdbab EC |
521 | if test -x / >/dev/null 2>&1; then |
522 | as_test_x='test -x' | |
523 | else | |
524 | if ls -dL / >/dev/null 2>&1; then | |
525 | as_ls_L_option=L | |
526 | else | |
527 | as_ls_L_option= | |
528 | fi | |
529 | as_test_x=' | |
530 | eval sh -c '\'' | |
531 | if test -d "$1"; then | |
532 | test -d "$1/."; | |
533 | else | |
534 | case $1 in | |
535 | -*)set "./$1";; | |
536 | esac; | |
537 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in | |
538 | ???[sx]*):;;*)false;;esac;fi | |
539 | '\'' sh | |
540 | ' | |
541 | fi | |
542 | as_executable_p=$as_test_x | |
ba479fd2 NN |
543 | |
544 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 545 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
546 | |
547 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 548 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
549 | |
550 | ||
ba479fd2 | 551 | |
a6ccdbab | 552 | exec 7<&0 </dev/null 6>&1 |
ba479fd2 NN |
553 | |
554 | # Name of the host. | |
555 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
556 | # so uname gets run too. | |
557 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
558 | ||
ba479fd2 NN |
559 | # |
560 | # Initializations. | |
561 | # | |
861bb6c1 | 562 | ac_default_prefix=/usr/local |
a6ccdbab | 563 | ac_clean_files= |
ba479fd2 | 564 | ac_config_libobj_dir=. |
a6ccdbab | 565 | LIBOBJS= |
ba479fd2 NN |
566 | cross_compiling=no |
567 | subdirs= | |
568 | MFLAGS= | |
569 | MAKEFLAGS= | |
570 | SHELL=${CONFIG_SHELL-/bin/sh} | |
571 | ||
ba479fd2 NN |
572 | # Identity of this package. |
573 | PACKAGE_NAME= | |
574 | PACKAGE_TARNAME= | |
575 | PACKAGE_VERSION= | |
576 | PACKAGE_STRING= | |
577 | PACKAGE_BUGREPORT= | |
578 | ||
579 | ac_unique_file="tree.c" | |
580 | # Factoring default headers for most tests. | |
581 | ac_includes_default="\ | |
582 | #include <stdio.h> | |
a6ccdbab | 583 | #ifdef HAVE_SYS_TYPES_H |
ba479fd2 NN |
584 | # include <sys/types.h> |
585 | #endif | |
a6ccdbab | 586 | #ifdef HAVE_SYS_STAT_H |
ba479fd2 NN |
587 | # include <sys/stat.h> |
588 | #endif | |
a6ccdbab | 589 | #ifdef STDC_HEADERS |
ba479fd2 NN |
590 | # include <stdlib.h> |
591 | # include <stddef.h> | |
592 | #else | |
a6ccdbab | 593 | # ifdef HAVE_STDLIB_H |
ba479fd2 NN |
594 | # include <stdlib.h> |
595 | # endif | |
596 | #endif | |
a6ccdbab EC |
597 | #ifdef HAVE_STRING_H |
598 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
ba479fd2 NN |
599 | # include <memory.h> |
600 | # endif | |
601 | # include <string.h> | |
602 | #endif | |
a6ccdbab | 603 | #ifdef HAVE_STRINGS_H |
ba479fd2 NN |
604 | # include <strings.h> |
605 | #endif | |
a6ccdbab | 606 | #ifdef HAVE_INTTYPES_H |
ba479fd2 | 607 | # include <inttypes.h> |
ba479fd2 | 608 | #endif |
a6ccdbab EC |
609 | #ifdef HAVE_STDINT_H |
610 | # include <stdint.h> | |
611 | #endif | |
612 | #ifdef HAVE_UNISTD_H | |
ba479fd2 NN |
613 | # include <unistd.h> |
614 | #endif" | |
615 | ||
a6ccdbab EC |
616 | ac_subst_vars='SHELL |
617 | PATH_SEPARATOR | |
618 | PACKAGE_NAME | |
619 | PACKAGE_TARNAME | |
620 | PACKAGE_VERSION | |
621 | PACKAGE_STRING | |
622 | PACKAGE_BUGREPORT | |
623 | exec_prefix | |
624 | prefix | |
625 | program_transform_name | |
626 | bindir | |
627 | sbindir | |
628 | libexecdir | |
629 | datarootdir | |
630 | datadir | |
631 | sysconfdir | |
632 | sharedstatedir | |
633 | localstatedir | |
634 | includedir | |
635 | oldincludedir | |
636 | docdir | |
637 | infodir | |
638 | htmldir | |
639 | dvidir | |
640 | pdfdir | |
641 | psdir | |
642 | libdir | |
643 | localedir | |
644 | mandir | |
645 | DEFS | |
646 | ECHO_C | |
647 | ECHO_N | |
648 | ECHO_T | |
649 | LIBS | |
650 | build_alias | |
651 | host_alias | |
652 | target_alias | |
653 | build | |
654 | build_cpu | |
655 | build_vendor | |
656 | build_os | |
657 | host | |
658 | host_cpu | |
659 | host_vendor | |
660 | host_os | |
661 | target | |
662 | target_cpu | |
663 | target_vendor | |
664 | target_os | |
665 | target_noncanonical | |
666 | build_libsubdir | |
667 | build_subdir | |
668 | host_subdir | |
669 | target_subdir | |
670 | GENINSRC | |
671 | CC | |
672 | CFLAGS | |
673 | LDFLAGS | |
674 | CPPFLAGS | |
675 | ac_ct_CC | |
676 | EXEEXT | |
677 | OBJEXT | |
678 | NO_MINUS_C_MINUS_O | |
679 | OUTPUT_OPTION | |
680 | CPP | |
681 | GREP | |
682 | EGREP | |
683 | strict1_warn | |
684 | cxx_compat_warn | |
685 | warn_cflags | |
686 | WERROR | |
687 | nocommon_flag | |
688 | TREEBROWSER | |
689 | valgrind_path | |
690 | valgrind_path_defines | |
691 | valgrind_command | |
692 | coverage_flags | |
693 | enable_multilib | |
694 | enable_decimal_float | |
695 | enable_shared | |
696 | TARGET_SYSTEM_ROOT | |
697 | TARGET_SYSTEM_ROOT_DEFINE | |
698 | CROSS_SYSTEM_HEADER_DIR | |
699 | onestep | |
700 | SET_MAKE | |
701 | AWK | |
702 | LN_S | |
703 | LN | |
704 | RANLIB | |
705 | ranlib_flags | |
706 | INSTALL | |
707 | INSTALL_PROGRAM | |
708 | INSTALL_DATA | |
709 | make_compare_target | |
710 | have_mktemp_command | |
711 | MAKEINFO | |
712 | BUILD_INFO | |
713 | GENERATED_MANPAGES | |
714 | FLEX | |
715 | BISON | |
716 | NM | |
717 | AR | |
718 | stage1_cflags | |
719 | COLLECT2_LIBS | |
720 | GNAT_LIBEXC | |
721 | LDEXP_LIB | |
722 | TARGET_GETGROUPS_T | |
723 | LIBICONV | |
724 | LTLIBICONV | |
725 | LIBICONV_DEP | |
726 | manext | |
727 | objext | |
728 | gthread_flags | |
729 | extra_modes_file | |
730 | extra_opt_files | |
731 | USE_NLS | |
732 | LIBINTL | |
733 | LIBINTL_DEP | |
734 | INCINTL | |
735 | XGETTEXT | |
736 | GMSGFMT | |
737 | POSUB | |
738 | CATALOGS | |
739 | DATADIRNAME | |
740 | INSTOBJEXT | |
741 | GENCAT | |
742 | CATOBJEXT | |
743 | host_cc_for_libada | |
744 | CROSS | |
745 | ALL | |
746 | SYSTEM_HEADER_DIR | |
747 | inhibit_libc | |
748 | CC_FOR_BUILD | |
749 | BUILD_CFLAGS | |
750 | STMP_FIXINC | |
751 | STMP_FIXPROTO | |
752 | collect2 | |
753 | gcc_cv_as | |
754 | ORIGINAL_AS_FOR_TARGET | |
755 | gcc_cv_ld | |
756 | ORIGINAL_LD_FOR_TARGET | |
757 | gcc_cv_nm | |
758 | ORIGINAL_NM_FOR_TARGET | |
759 | gcc_cv_objdump | |
760 | libgcc_visibility | |
761 | GGC | |
762 | zlibdir | |
763 | zlibinc | |
764 | MAINT | |
765 | gcc_tooldir | |
766 | dollar | |
767 | slibdir | |
768 | objdir | |
769 | subdirs | |
770 | srcdir | |
771 | all_boot_languages | |
772 | all_compilers | |
773 | all_gtfiles | |
774 | all_gtfiles_files_langs | |
775 | all_gtfiles_files_files | |
776 | all_lang_makefrags | |
777 | all_lang_makefiles | |
778 | all_languages | |
779 | all_selected_languages | |
780 | all_stagestuff | |
781 | build_exeext | |
782 | build_install_headers_dir | |
783 | build_xm_file_list | |
784 | build_xm_include_list | |
785 | build_xm_defines | |
786 | check_languages | |
787 | cc_set_by_configure | |
788 | quoted_cc_set_by_configure | |
789 | cpp_install_dir | |
790 | xmake_file | |
791 | tmake_file | |
792 | extra_gcc_objs | |
793 | extra_headers_list | |
794 | extra_objs | |
795 | extra_parts | |
796 | extra_passes | |
797 | extra_programs | |
798 | float_h_file | |
799 | gcc_config_arguments | |
800 | gcc_gxx_include_dir | |
801 | host_exeext | |
802 | host_xm_file_list | |
803 | host_xm_include_list | |
804 | host_xm_defines | |
805 | out_host_hook_obj | |
806 | install | |
807 | lang_opt_files | |
808 | lang_specs_files | |
809 | lang_tree_files | |
810 | local_prefix | |
811 | md_file | |
812 | objc_boehm_gc | |
813 | out_file | |
814 | out_object_file | |
815 | stage_prefix_set_by_configure | |
816 | quoted_stage_prefix_set_by_configure | |
817 | thread_file | |
818 | tm_file_list | |
819 | tm_include_list | |
820 | tm_defines | |
821 | tm_p_file_list | |
822 | tm_p_include_list | |
823 | xm_file_list | |
824 | xm_include_list | |
825 | xm_defines | |
826 | c_target_objs | |
827 | cxx_target_objs | |
828 | target_cpu_default | |
829 | GMPLIBS | |
830 | GMPINC | |
831 | LIBOBJS | |
832 | LTLIBOBJS' | |
ba479fd2 | 833 | ac_subst_files='language_hooks' |
a6ccdbab EC |
834 | ac_precious_vars='build_alias |
835 | host_alias | |
836 | target_alias | |
837 | CC | |
838 | CFLAGS | |
839 | LDFLAGS | |
840 | LIBS | |
841 | CPPFLAGS | |
842 | CPP | |
843 | GMPLIBS | |
844 | GMPINC' | |
845 | ||
861bb6c1 JL |
846 | |
847 | # Initialize some variables set by options. | |
ba479fd2 NN |
848 | ac_init_help= |
849 | ac_init_version=false | |
861bb6c1 JL |
850 | # The variables have the same names as the options, with |
851 | # dashes changed to underlines. | |
ba479fd2 | 852 | cache_file=/dev/null |
861bb6c1 | 853 | exec_prefix=NONE |
861bb6c1 | 854 | no_create= |
861bb6c1 JL |
855 | no_recursion= |
856 | prefix=NONE | |
857 | program_prefix=NONE | |
858 | program_suffix=NONE | |
859 | program_transform_name=s,x,x, | |
860 | silent= | |
861 | site= | |
862 | srcdir= | |
861bb6c1 JL |
863 | verbose= |
864 | x_includes=NONE | |
865 | x_libraries=NONE | |
ba479fd2 NN |
866 | |
867 | # Installation directory options. | |
868 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
869 | # and all the variables that are supposed to be based on exec_prefix | |
870 | # by default will actually change. | |
871 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
a6ccdbab | 872 | # (The list follows the same order as the GNU Coding Standards.) |
861bb6c1 JL |
873 | bindir='${exec_prefix}/bin' |
874 | sbindir='${exec_prefix}/sbin' | |
875 | libexecdir='${exec_prefix}/libexec' | |
a6ccdbab EC |
876 | datarootdir='${prefix}/share' |
877 | datadir='${datarootdir}' | |
861bb6c1 JL |
878 | sysconfdir='${prefix}/etc' |
879 | sharedstatedir='${prefix}/com' | |
880 | localstatedir='${prefix}/var' | |
861bb6c1 JL |
881 | includedir='${prefix}/include' |
882 | oldincludedir='/usr/include' | |
a6ccdbab EC |
883 | docdir='${datarootdir}/doc/${PACKAGE}' |
884 | infodir='${datarootdir}/info' | |
885 | htmldir='${docdir}' | |
886 | dvidir='${docdir}' | |
887 | pdfdir='${docdir}' | |
888 | psdir='${docdir}' | |
889 | libdir='${exec_prefix}/lib' | |
890 | localedir='${datarootdir}/locale' | |
891 | mandir='${datarootdir}/man' | |
861bb6c1 | 892 | |
861bb6c1 | 893 | ac_prev= |
a6ccdbab | 894 | ac_dashdash= |
861bb6c1 JL |
895 | for ac_option |
896 | do | |
861bb6c1 JL |
897 | # If the previous option needs an argument, assign it. |
898 | if test -n "$ac_prev"; then | |
a6ccdbab | 899 | eval $ac_prev=\$ac_option |
861bb6c1 JL |
900 | ac_prev= |
901 | continue | |
902 | fi | |
903 | ||
a6ccdbab EC |
904 | case $ac_option in |
905 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
906 | *) ac_optarg=yes ;; | |
907 | esac | |
861bb6c1 JL |
908 | |
909 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
910 | ||
a6ccdbab EC |
911 | case $ac_dashdash$ac_option in |
912 | --) | |
913 | ac_dashdash=yes ;; | |
861bb6c1 JL |
914 | |
915 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
916 | ac_prev=bindir ;; | |
917 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 918 | bindir=$ac_optarg ;; |
861bb6c1 JL |
919 | |
920 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 921 | ac_prev=build_alias ;; |
861bb6c1 | 922 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 923 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
924 | |
925 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
926 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
927 | ac_prev=cache_file ;; | |
928 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
929 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
930 | cache_file=$ac_optarg ;; |
931 | ||
932 | --config-cache | -C) | |
933 | cache_file=config.cache ;; | |
861bb6c1 | 934 | |
a6ccdbab | 935 | -datadir | --datadir | --datadi | --datad) |
861bb6c1 | 936 | ac_prev=datadir ;; |
a6ccdbab | 937 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
ba479fd2 | 938 | datadir=$ac_optarg ;; |
861bb6c1 | 939 | |
a6ccdbab EC |
940 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
941 | | --dataroo | --dataro | --datar) | |
942 | ac_prev=datarootdir ;; | |
943 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
944 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
945 | datarootdir=$ac_optarg ;; | |
946 | ||
861bb6c1 | 947 | -disable-* | --disable-*) |
ba479fd2 | 948 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 949 | # Reject names that are not valid shell variable names. |
a6ccdbab | 950 | expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
951 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 |
952 | { (exit 1); exit 1; }; } | |
a6ccdbab EC |
953 | ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` |
954 | eval enable_$ac_feature=no ;; | |
955 | ||
956 | -docdir | --docdir | --docdi | --doc | --do) | |
957 | ac_prev=docdir ;; | |
958 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
959 | docdir=$ac_optarg ;; | |
960 | ||
961 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
962 | ac_prev=dvidir ;; | |
963 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
964 | dvidir=$ac_optarg ;; | |
861bb6c1 JL |
965 | |
966 | -enable-* | --enable-*) | |
ba479fd2 | 967 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 968 | # Reject names that are not valid shell variable names. |
a6ccdbab | 969 | expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
970 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 |
971 | { (exit 1); exit 1; }; } | |
a6ccdbab EC |
972 | ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` |
973 | eval enable_$ac_feature=\$ac_optarg ;; | |
861bb6c1 JL |
974 | |
975 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
976 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
977 | | --exec | --exe | --ex) | |
978 | ac_prev=exec_prefix ;; | |
979 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
980 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
981 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 982 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
983 | |
984 | -gas | --gas | --ga | --g) | |
985 | # Obsolete; use --with-gas. | |
986 | with_gas=yes ;; | |
987 | ||
ba479fd2 NN |
988 | -help | --help | --hel | --he | -h) |
989 | ac_init_help=long ;; | |
990 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
991 | ac_init_help=recursive ;; | |
992 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
993 | ac_init_help=short ;; | |
861bb6c1 JL |
994 | |
995 | -host | --host | --hos | --ho) | |
ba479fd2 | 996 | ac_prev=host_alias ;; |
861bb6c1 | 997 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 998 | host_alias=$ac_optarg ;; |
861bb6c1 | 999 | |
a6ccdbab EC |
1000 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1001 | ac_prev=htmldir ;; | |
1002 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1003 | | --ht=*) | |
1004 | htmldir=$ac_optarg ;; | |
1005 | ||
861bb6c1 JL |
1006 | -includedir | --includedir | --includedi | --included | --include \ |
1007 | | --includ | --inclu | --incl | --inc) | |
1008 | ac_prev=includedir ;; | |
1009 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1010 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 1011 | includedir=$ac_optarg ;; |
861bb6c1 JL |
1012 | |
1013 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1014 | ac_prev=infodir ;; | |
1015 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 1016 | infodir=$ac_optarg ;; |
861bb6c1 JL |
1017 | |
1018 | -libdir | --libdir | --libdi | --libd) | |
1019 | ac_prev=libdir ;; | |
1020 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 1021 | libdir=$ac_optarg ;; |
861bb6c1 JL |
1022 | |
1023 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1024 | | --libexe | --libex | --libe) | |
1025 | ac_prev=libexecdir ;; | |
1026 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1027 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 1028 | libexecdir=$ac_optarg ;; |
861bb6c1 | 1029 | |
a6ccdbab EC |
1030 | -localedir | --localedir | --localedi | --localed | --locale) |
1031 | ac_prev=localedir ;; | |
1032 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1033 | localedir=$ac_optarg ;; | |
1034 | ||
861bb6c1 | 1035 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
a6ccdbab | 1036 | | --localstate | --localstat | --localsta | --localst | --locals) |
861bb6c1 JL |
1037 | ac_prev=localstatedir ;; |
1038 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
a6ccdbab | 1039 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
ba479fd2 | 1040 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
1041 | |
1042 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1043 | ac_prev=mandir ;; | |
1044 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 1045 | mandir=$ac_optarg ;; |
861bb6c1 JL |
1046 | |
1047 | -nfp | --nfp | --nf) | |
1048 | # Obsolete; use --without-fp. | |
1049 | with_fp=no ;; | |
1050 | ||
1051 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 1052 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
1053 | no_create=yes ;; |
1054 | ||
1055 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1056 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1057 | no_recursion=yes ;; | |
1058 | ||
1059 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1060 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1061 | | --oldin | --oldi | --old | --ol | --o) | |
1062 | ac_prev=oldincludedir ;; | |
1063 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1064 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1065 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 1066 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
1067 | |
1068 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1069 | ac_prev=prefix ;; | |
1070 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 1071 | prefix=$ac_optarg ;; |
861bb6c1 JL |
1072 | |
1073 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1074 | | --program-pre | --program-pr | --program-p) | |
1075 | ac_prev=program_prefix ;; | |
1076 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1077 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 1078 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
1079 | |
1080 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1081 | | --program-suf | --program-su | --program-s) | |
1082 | ac_prev=program_suffix ;; | |
1083 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1084 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 1085 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
1086 | |
1087 | -program-transform-name | --program-transform-name \ | |
1088 | | --program-transform-nam | --program-transform-na \ | |
1089 | | --program-transform-n | --program-transform- \ | |
1090 | | --program-transform | --program-transfor \ | |
1091 | | --program-transfo | --program-transf \ | |
1092 | | --program-trans | --program-tran \ | |
1093 | | --progr-tra | --program-tr | --program-t) | |
1094 | ac_prev=program_transform_name ;; | |
1095 | -program-transform-name=* | --program-transform-name=* \ | |
1096 | | --program-transform-nam=* | --program-transform-na=* \ | |
1097 | | --program-transform-n=* | --program-transform-=* \ | |
1098 | | --program-transform=* | --program-transfor=* \ | |
1099 | | --program-transfo=* | --program-transf=* \ | |
1100 | | --program-trans=* | --program-tran=* \ | |
1101 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 1102 | program_transform_name=$ac_optarg ;; |
861bb6c1 | 1103 | |
a6ccdbab EC |
1104 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1105 | ac_prev=pdfdir ;; | |
1106 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1107 | pdfdir=$ac_optarg ;; | |
1108 | ||
1109 | -psdir | --psdir | --psdi | --psd | --ps) | |
1110 | ac_prev=psdir ;; | |
1111 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1112 | psdir=$ac_optarg ;; | |
1113 | ||
861bb6c1 JL |
1114 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1115 | | -silent | --silent | --silen | --sile | --sil) | |
1116 | silent=yes ;; | |
1117 | ||
1118 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1119 | ac_prev=sbindir ;; | |
1120 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1121 | | --sbi=* | --sb=*) | |
ba479fd2 | 1122 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
1123 | |
1124 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1125 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1126 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1127 | | --sha | --sh) | |
1128 | ac_prev=sharedstatedir ;; | |
1129 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1130 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1131 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1132 | | --sha=* | --sh=*) | |
ba479fd2 | 1133 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
1134 | |
1135 | -site | --site | --sit) | |
1136 | ac_prev=site ;; | |
1137 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 1138 | site=$ac_optarg ;; |
861bb6c1 JL |
1139 | |
1140 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1141 | ac_prev=srcdir ;; | |
1142 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 1143 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
1144 | |
1145 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1146 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1147 | ac_prev=sysconfdir ;; | |
1148 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1149 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 1150 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
1151 | |
1152 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 1153 | ac_prev=target_alias ;; |
861bb6c1 | 1154 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 1155 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
1156 | |
1157 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1158 | verbose=yes ;; | |
1159 | ||
ba479fd2 NN |
1160 | -version | --version | --versio | --versi | --vers | -V) |
1161 | ac_init_version=: ;; | |
861bb6c1 JL |
1162 | |
1163 | -with-* | --with-*) | |
ba479fd2 | 1164 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 1165 | # Reject names that are not valid shell variable names. |
a6ccdbab | 1166 | expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
1167 | { echo "$as_me: error: invalid package name: $ac_package" >&2 |
1168 | { (exit 1); exit 1; }; } | |
a6ccdbab EC |
1169 | ac_package=`echo $ac_package | sed 's/[-.]/_/g'` |
1170 | eval with_$ac_package=\$ac_optarg ;; | |
861bb6c1 JL |
1171 | |
1172 | -without-* | --without-*) | |
ba479fd2 | 1173 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 1174 | # Reject names that are not valid shell variable names. |
a6ccdbab | 1175 | expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
1176 | { echo "$as_me: error: invalid package name: $ac_package" >&2 |
1177 | { (exit 1); exit 1; }; } | |
a6ccdbab EC |
1178 | ac_package=`echo $ac_package | sed 's/[-.]/_/g'` |
1179 | eval with_$ac_package=no ;; | |
861bb6c1 JL |
1180 | |
1181 | --x) | |
1182 | # Obsolete; use --with-x. | |
1183 | with_x=yes ;; | |
1184 | ||
1185 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1186 | | --x-incl | --x-inc | --x-in | --x-i) | |
1187 | ac_prev=x_includes ;; | |
1188 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1189 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 1190 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
1191 | |
1192 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1193 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1194 | ac_prev=x_libraries ;; | |
1195 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1196 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 1197 | x_libraries=$ac_optarg ;; |
861bb6c1 | 1198 | |
ba479fd2 NN |
1199 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
1200 | Try \`$0 --help' for more information." >&2 | |
1201 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
1202 | ;; |
1203 | ||
ba479fd2 NN |
1204 | *=*) |
1205 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1206 | # Reject names that are not valid shell variable names. | |
1207 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
1208 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
1209 | { (exit 1); exit 1; }; } | |
a6ccdbab | 1210 | eval $ac_envvar=\$ac_optarg |
ba479fd2 NN |
1211 | export $ac_envvar ;; |
1212 | ||
861bb6c1 | 1213 | *) |
ba479fd2 NN |
1214 | # FIXME: should be removed in autoconf 3.0. |
1215 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1216 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1217 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
1218 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
861bb6c1 JL |
1219 | ;; |
1220 | ||
1221 | esac | |
1222 | done | |
1223 | ||
1224 | if test -n "$ac_prev"; then | |
ba479fd2 NN |
1225 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
1226 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
1227 | { (exit 1); exit 1; }; } | |
63cf211a | 1228 | fi |
63cf211a | 1229 | |
a6ccdbab EC |
1230 | # Be sure to have absolute directory names. |
1231 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1232 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1233 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1234 | libdir localedir mandir | |
861bb6c1 | 1235 | do |
a6ccdbab | 1236 | eval ac_val=\$$ac_var |
ba479fd2 | 1237 | case $ac_val in |
a6ccdbab EC |
1238 | [\\/$]* | ?:[\\/]* ) continue;; |
1239 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
861bb6c1 | 1240 | esac |
a6ccdbab EC |
1241 | { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 |
1242 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
1243 | done |
1244 | ||
ba479fd2 NN |
1245 | # There might be people who depend on the old broken behavior: `$host' |
1246 | # used to hold the argument of --host etc. | |
1247 | # FIXME: To remove some day. | |
1248 | build=$build_alias | |
1249 | host=$host_alias | |
1250 | target=$target_alias | |
1251 | ||
1252 | # FIXME: To remove some day. | |
1253 | if test "x$host_alias" != x; then | |
1254 | if test "x$build_alias" = x; then | |
1255 | cross_compiling=maybe | |
1256 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
1257 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
1258 | elif test "x$build_alias" != "x$host_alias"; then | |
1259 | cross_compiling=yes | |
1260 | fi | |
1261 | fi | |
6e3f3080 | 1262 | |
ba479fd2 NN |
1263 | ac_tool_prefix= |
1264 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1265 | ||
1266 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 1267 | |
861bb6c1 | 1268 | |
a6ccdbab EC |
1269 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1270 | ac_ls_di=`ls -di .` && | |
1271 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1272 | { echo "$as_me: error: Working directory cannot be determined" >&2 | |
1273 | { (exit 1); exit 1; }; } | |
1274 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1275 | { echo "$as_me: error: pwd does not report name of working directory" >&2 | |
1276 | { (exit 1); exit 1; }; } | |
1277 | ||
1278 | ||
861bb6c1 JL |
1279 | # Find the source files, if location was not specified. |
1280 | if test -z "$srcdir"; then | |
1281 | ac_srcdir_defaulted=yes | |
a6ccdbab EC |
1282 | # Try the directory containing this script, then the parent directory. |
1283 | ac_confdir=`$as_dirname -- "$0" || | |
ba479fd2 | 1284 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
1285 | X"$0" : 'X\(//\)[^/]' \| \ |
1286 | X"$0" : 'X\(//\)$' \| \ | |
a6ccdbab | 1287 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 1288 | echo X"$0" | |
a6ccdbab EC |
1289 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
1290 | s//\1/ | |
1291 | q | |
1292 | } | |
1293 | /^X\(\/\/\)[^/].*/{ | |
1294 | s//\1/ | |
1295 | q | |
1296 | } | |
1297 | /^X\(\/\/\)$/{ | |
1298 | s//\1/ | |
1299 | q | |
1300 | } | |
1301 | /^X\(\/\).*/{ | |
1302 | s//\1/ | |
1303 | q | |
1304 | } | |
1305 | s/.*/./; q'` | |
861bb6c1 | 1306 | srcdir=$ac_confdir |
a6ccdbab | 1307 | if test ! -r "$srcdir/$ac_unique_file"; then |
861bb6c1 JL |
1308 | srcdir=.. |
1309 | fi | |
1310 | else | |
1311 | ac_srcdir_defaulted=no | |
1312 | fi | |
a6ccdbab EC |
1313 | if test ! -r "$srcdir/$ac_unique_file"; then |
1314 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1315 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 | |
ba479fd2 | 1316 | { (exit 1); exit 1; }; } |
dd7f7a6e | 1317 | fi |
a6ccdbab EC |
1318 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" |
1319 | ac_abs_confdir=`( | |
1320 | cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 | |
dd7f7a6e | 1321 | { (exit 1); exit 1; }; } |
a6ccdbab EC |
1322 | pwd)` |
1323 | # When building in place, set srcdir=. | |
1324 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1325 | srcdir=. | |
1326 | fi | |
1327 | # Remove unnecessary trailing slashes from srcdir. | |
1328 | # Double slashes in file names in object file debugging info | |
1329 | # mess up M-x gdb in Emacs. | |
1330 | case $srcdir in | |
1331 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1332 | esac | |
1333 | for ac_var in $ac_precious_vars; do | |
1334 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1335 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1336 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1337 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1338 | done | |
63cf211a | 1339 | |
ba479fd2 NN |
1340 | # |
1341 | # Report the --help message. | |
1342 | # | |
1343 | if test "$ac_init_help" = "long"; then | |
1344 | # Omit some internal or obsolete options to make the list less imposing. | |
1345 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1346 | cat <<_ACEOF | |
1347 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 1348 | |
ba479fd2 | 1349 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 1350 | |
ba479fd2 NN |
1351 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
1352 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 1353 | |
ba479fd2 | 1354 | Defaults for the options are specified in brackets. |
861bb6c1 | 1355 | |
ba479fd2 NN |
1356 | Configuration: |
1357 | -h, --help display this help and exit | |
1358 | --help=short display options specific to this package | |
1359 | --help=recursive display the short help of all the included packages | |
1360 | -V, --version display version information and exit | |
1361 | -q, --quiet, --silent do not print \`checking...' messages | |
1362 | --cache-file=FILE cache test results in FILE [disabled] | |
1363 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1364 | -n, --no-create do not create output files | |
1365 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1366 | ||
ba479fd2 NN |
1367 | Installation directories: |
1368 | --prefix=PREFIX install architecture-independent files in PREFIX | |
86da66b5 | 1369 | [$ac_default_prefix] |
ba479fd2 | 1370 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
86da66b5 | 1371 | [PREFIX] |
861bb6c1 | 1372 | |
ba479fd2 NN |
1373 | By default, \`make install' will install all the files in |
1374 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1375 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1376 | for instance \`--prefix=\$HOME'. | |
13c22933 | 1377 | |
ba479fd2 | 1378 | For better control, use the options below. |
13c22933 | 1379 | |
ba479fd2 NN |
1380 | Fine tuning of the installation directories: |
1381 | --bindir=DIR user executables [EPREFIX/bin] | |
1382 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1383 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
ba479fd2 NN |
1384 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
1385 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1386 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1387 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1388 | --includedir=DIR C header files [PREFIX/include] | |
1389 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
a6ccdbab EC |
1390 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
1391 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1392 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1393 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1394 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1395 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1396 | --htmldir=DIR html documentation [DOCDIR] | |
1397 | --dvidir=DIR dvi documentation [DOCDIR] | |
1398 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1399 | --psdir=DIR ps documentation [DOCDIR] | |
ba479fd2 | 1400 | _ACEOF |
13c22933 | 1401 | |
ba479fd2 | 1402 | cat <<\_ACEOF |
13c22933 | 1403 | |
ba479fd2 NN |
1404 | Program names: |
1405 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1406 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1407 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 1408 | |
ba479fd2 NN |
1409 | System types: |
1410 | --build=BUILD configure for building on BUILD [guessed] | |
1411 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1412 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1413 | _ACEOF | |
13c22933 JJ |
1414 | fi |
1415 | ||
ba479fd2 | 1416 | if test -n "$ac_init_help"; then |
13c22933 | 1417 | |
ba479fd2 | 1418 | cat <<\_ACEOF |
13c22933 | 1419 | |
ba479fd2 NN |
1420 | Optional Features: |
1421 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1422 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
1423 | --enable-generated-files-in-srcdir |
1424 | put copies of generated files in source dir | |
1425 | intended for creating source tarballs for users | |
1426 | without texinfo bison or flex. | |
09a9c095 | 1427 | --enable-werror-always enable -Werror always |
ba479fd2 NN |
1428 | --enable-werror enable -Werror in bootstrap stage2 and later |
1429 | --enable-checking=LIST | |
1430 | enable expensive run-time checks. With LIST, | |
1431 | enable only specific categories of checks. | |
cdce5c16 NS |
1432 | Categories are: yes,no,all,none,release. |
1433 | Flags are: assert,fold,gc,gcac,misc, | |
1434 | rtlflag,rtl,runtime,tree,valgrind. | |
74ee1642 | 1435 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 1436 | --enable-coverage=LEVEL |
fb38008e | 1437 | enable compiler's code coverage collection. |
ba479fd2 NN |
1438 | Use to measure compiler performance and locate |
1439 | unused parts of the compiler. With LEVEL, specify | |
1440 | optimization. Values are opt, noopt, | |
1441 | default is noopt | |
1442 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
1443 | --enable-multilib enable library support for multiple ABIs | |
1444 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
486aa804 | 1445 | --enable-decimal-float enable decimal float extension to C |
ba479fd2 NN |
1446 | --enable-threads enable thread usage for target GCC |
1447 | --enable-threads=LIB use LIB thread package for target GCC | |
8dea1cca DD |
1448 | --enable-tls enable or disable generation of tls code |
1449 | overriding the assembler check for tls support | |
ba479fd2 NN |
1450 | --enable-objc-gc enable the use of Boehm's garbage collector with |
1451 | the GNU Objective-C runtime | |
1452 | --disable-shared don't provide a shared libgcc | |
1453 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 1454 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 1455 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
1456 | --enable-initfini-array use .init_array/.fini_array sections |
1457 | --enable-sjlj-exceptions | |
1458 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 1459 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ba479fd2 NN |
1460 | --disable-win32-registry |
1461 | disable lookup of installation paths in the | |
1462 | Registry on Windows hosts | |
1463 | --enable-win32-registry enable registry lookup (default) | |
1464 | --enable-win32-registry=KEY | |
1465 | use KEY instead of GCC version as the last portion | |
1466 | of the registry key | |
1467 | --enable-maintainer-mode | |
1468 | enable make rules and dependencies not useful | |
1469 | (and sometimes confusing) to the casual installer | |
1470 | --enable-version-specific-runtime-libs | |
1471 | specify that runtime libraries should be | |
1472 | installed in a compiler-specific directory | |
093e61a6 | 1473 | |
ba479fd2 NN |
1474 | Optional Packages: |
1475 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1476 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1546bb64 | 1477 | --with-build-libsubdir=DIR Directory where to find libraries for build system |
ba479fd2 NN |
1478 | --with-local-prefix=DIR specifies directory to put local include |
1479 | --with-gxx-include-dir=DIR | |
1480 | specifies directory to put g++ header files | |
1481 | --with-cpp-install-dir=DIR | |
1482 | install the user visible C preprocessor in DIR | |
1483 | (relative to PREFIX) as well as PREFIX/bin | |
1484 | --with-gnu-ld arrange to work with GNU ld. | |
1485 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 1486 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
1487 | --with-gnu-as arrange to work with GNU as |
1488 | --with-as arrange to use the specified as (full pathname) | |
1489 | --with-stabs arrange to use stabs instead of host debug format | |
1490 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
1491 | --with-build-sysroot=sysroot |
1492 | use sysroot as the system root during the build | |
ba479fd2 | 1493 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
dfb77e37 KC |
1494 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1495 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1496 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 1497 | --with-system-libunwind use installed libunwind |
ed965309 | 1498 | --with-long-double-128 Use 128-bit long double by default. |
59415997 | 1499 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
1500 | with the compiler |
1501 | --with-system-zlib use installed libz | |
22482f74 MS |
1502 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] |
1503 | --with-datarootdir=DIR Use DIR as the data root [PREFIX/share] | |
1504 | --with-docdir=DIR Install documentation in DIR [DATAROOTDIR] | |
1505 | --with-htmldir=DIR html documentation in in DIR [DOCDIR] | |
13c22933 | 1506 | |
ba479fd2 NN |
1507 | Some influential environment variables: |
1508 | CC C compiler command | |
1509 | CFLAGS C compiler flags | |
1510 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1511 | nonstandard directory <lib dir> | |
a6ccdbab EC |
1512 | LIBS libraries to pass to the linker, e.g. -l<library> |
1513 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1514 | you have headers in a nonstandard directory <include dir> | |
ba479fd2 | 1515 | CPP C preprocessor |
6de9cd9a DN |
1516 | GMPLIBS How to link GMP |
1517 | GMPINC How to find GMP include files | |
13c22933 | 1518 | |
ba479fd2 NN |
1519 | Use these variables to override the choices made by `configure' or to help |
1520 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 1521 | |
ba479fd2 | 1522 | _ACEOF |
a6ccdbab | 1523 | ac_status=$? |
ba479fd2 | 1524 | fi |
6e3f3080 | 1525 | |
ba479fd2 NN |
1526 | if test "$ac_init_help" = "recursive"; then |
1527 | # If there are subdirs, report their specific --help. | |
ba479fd2 | 1528 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
a6ccdbab | 1529 | test -d "$ac_dir" || continue |
ba479fd2 NN |
1530 | ac_builddir=. |
1531 | ||
a6ccdbab EC |
1532 | case "$ac_dir" in |
1533 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1534 | *) | |
ba479fd2 | 1535 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
a6ccdbab EC |
1536 | # A ".." for each directory in $ac_dir_suffix. |
1537 | ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` | |
1538 | case $ac_top_builddir_sub in | |
1539 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1540 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1541 | esac ;; | |
1542 | esac | |
1543 | ac_abs_top_builddir=$ac_pwd | |
1544 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1545 | # for backward compatibility: | |
1546 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
1547 | |
1548 | case $srcdir in | |
a6ccdbab | 1549 | .) # We are building in place. |
ba479fd2 | 1550 | ac_srcdir=. |
a6ccdbab EC |
1551 | ac_top_srcdir=$ac_top_builddir_sub |
1552 | ac_abs_top_srcdir=$ac_pwd ;; | |
1553 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 1554 | ac_srcdir=$srcdir$ac_dir_suffix; |
a6ccdbab EC |
1555 | ac_top_srcdir=$srcdir |
1556 | ac_abs_top_srcdir=$srcdir ;; | |
1557 | *) # Relative name. | |
1558 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1559 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1560 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
86da66b5 | 1561 | esac |
a6ccdbab EC |
1562 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1563 | ||
1564 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1565 | # Check for guested configure. | |
1566 | if test -f "$ac_srcdir/configure.gnu"; then | |
1567 | echo && | |
1568 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1569 | elif test -f "$ac_srcdir/configure"; then | |
1570 | echo && | |
1571 | $SHELL "$ac_srcdir/configure" --help=recursive | |
ba479fd2 NN |
1572 | else |
1573 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
a6ccdbab EC |
1574 | fi || ac_status=$? |
1575 | cd "$ac_pwd" || { ac_status=$?; break; } | |
ba479fd2 NN |
1576 | done |
1577 | fi | |
1578 | ||
a6ccdbab | 1579 | test -n "$ac_init_help" && exit $ac_status |
ba479fd2 NN |
1580 | if $ac_init_version; then |
1581 | cat <<\_ACEOF | |
a6ccdbab EC |
1582 | configure |
1583 | generated by GNU Autoconf 2.61 | |
ba479fd2 | 1584 | |
a6ccdbab EC |
1585 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
1586 | 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | |
ba479fd2 NN |
1587 | This configure script is free software; the Free Software Foundation |
1588 | gives unlimited permission to copy, distribute and modify it. | |
1589 | _ACEOF | |
a6ccdbab | 1590 | exit |
ba479fd2 | 1591 | fi |
a6ccdbab | 1592 | cat >config.log <<_ACEOF |
ba479fd2 NN |
1593 | This file contains any messages produced by compilers while |
1594 | running configure, to aid debugging if configure makes a mistake. | |
1595 | ||
1596 | It was created by $as_me, which was | |
a6ccdbab | 1597 | generated by GNU Autoconf 2.61. Invocation command line was |
ba479fd2 NN |
1598 | |
1599 | $ $0 $@ | |
1600 | ||
1601 | _ACEOF | |
a6ccdbab | 1602 | exec 5>>config.log |
ba479fd2 NN |
1603 | { |
1604 | cat <<_ASUNAME | |
1605 | ## --------- ## | |
1606 | ## Platform. ## | |
1607 | ## --------- ## | |
1608 | ||
1609 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1610 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1611 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1612 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1613 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1614 | ||
1615 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1616 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1617 | ||
1618 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1619 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1620 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
a6ccdbab | 1621 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` |
ba479fd2 NN |
1622 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
1623 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1624 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1625 | ||
1626 | _ASUNAME | |
1627 | ||
1628 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1629 | for as_dir in $PATH | |
1630 | do | |
1631 | IFS=$as_save_IFS | |
1632 | test -z "$as_dir" && as_dir=. | |
1633 | echo "PATH: $as_dir" | |
1634 | done | |
a6ccdbab | 1635 | IFS=$as_save_IFS |
ba479fd2 NN |
1636 | |
1637 | } >&5 | |
1638 | ||
1639 | cat >&5 <<_ACEOF | |
1640 | ||
1641 | ||
1642 | ## ----------- ## | |
1643 | ## Core tests. ## | |
1644 | ## ----------- ## | |
1645 | ||
1646 | _ACEOF | |
1647 | ||
1648 | ||
1649 | # Keep a trace of the command line. | |
1650 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1651 | # Strip out --silent because we don't want to record it for future runs. | |
1652 | # Also quote any args containing shell meta-characters. | |
1653 | # Make two passes to allow for proper duplicate-argument suppression. | |
1654 | ac_configure_args= | |
1655 | ac_configure_args0= | |
1656 | ac_configure_args1= | |
ba479fd2 NN |
1657 | ac_must_keep_next=false |
1658 | for ac_pass in 1 2 | |
1659 | do | |
1660 | for ac_arg | |
1661 | do | |
1662 | case $ac_arg in | |
1663 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1664 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1665 | | -silent | --silent | --silen | --sile | --sil) | |
1666 | continue ;; | |
a6ccdbab | 1667 | *\'*) |
ba479fd2 NN |
1668 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
1669 | esac | |
1670 | case $ac_pass in | |
1671 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1672 | 2) | |
1673 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1674 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1675 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1676 | else |
86da66b5 HPN |
1677 | case $ac_arg in |
1678 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1679 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1680 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1681 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1682 | case "$ac_configure_args0 " in | |
1683 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1684 | esac | |
1685 | ;; | |
1686 | -* ) ac_must_keep_next=true ;; | |
1687 | esac | |
ba479fd2 | 1688 | fi |
a6ccdbab | 1689 | ac_configure_args="$ac_configure_args '$ac_arg'" |
ba479fd2 NN |
1690 | ;; |
1691 | esac | |
1692 | done | |
1693 | done | |
1694 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1695 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1696 | ||
1697 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1698 | # config.log. We remove comments because anyway the quotes in there | |
1699 | # would cause problems or look ugly. | |
a6ccdbab EC |
1700 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
1701 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
ba479fd2 NN |
1702 | trap 'exit_status=$? |
1703 | # Save into config.log some information that might help in debugging. | |
1704 | { | |
1705 | echo | |
1706 | ||
1707 | cat <<\_ASBOX | |
1708 | ## ---------------- ## | |
1709 | ## Cache variables. ## | |
1710 | ## ---------------- ## | |
1711 | _ASBOX | |
1712 | echo | |
1713 | # The following way of writing the cache mishandles newlines in values, | |
a6ccdbab EC |
1714 | ( |
1715 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
1716 | eval ac_val=\$$ac_var | |
1717 | case $ac_val in #( | |
1718 | *${as_nl}*) | |
1719 | case $ac_var in #( | |
1720 | *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 | |
1721 | echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; | |
1722 | esac | |
1723 | case $ac_var in #( | |
1724 | _ | IFS | as_nl) ;; #( | |
1725 | *) $as_unset $ac_var ;; | |
1726 | esac ;; | |
1727 | esac | |
1728 | done | |
ba479fd2 | 1729 | (set) 2>&1 | |
a6ccdbab EC |
1730 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
1731 | *${as_nl}ac_space=\ *) | |
ba479fd2 | 1732 | sed -n \ |
a6ccdbab EC |
1733 | "s/'\''/'\''\\\\'\'''\''/g; |
1734 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
1735 | ;; #( | |
ba479fd2 | 1736 | *) |
a6ccdbab | 1737 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
ba479fd2 | 1738 | ;; |
a6ccdbab EC |
1739 | esac | |
1740 | sort | |
1741 | ) | |
ba479fd2 NN |
1742 | echo |
1743 | ||
1744 | cat <<\_ASBOX | |
1745 | ## ----------------- ## | |
1746 | ## Output variables. ## | |
1747 | ## ----------------- ## | |
1748 | _ASBOX | |
1749 | echo | |
1750 | for ac_var in $ac_subst_vars | |
1751 | do | |
a6ccdbab EC |
1752 | eval ac_val=\$$ac_var |
1753 | case $ac_val in | |
1754 | *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
1755 | esac | |
1756 | echo "$ac_var='\''$ac_val'\''" | |
ba479fd2 NN |
1757 | done | sort |
1758 | echo | |
1759 | ||
1760 | if test -n "$ac_subst_files"; then | |
1761 | cat <<\_ASBOX | |
a6ccdbab EC |
1762 | ## ------------------- ## |
1763 | ## File substitutions. ## | |
1764 | ## ------------------- ## | |
ba479fd2 NN |
1765 | _ASBOX |
1766 | echo | |
1767 | for ac_var in $ac_subst_files | |
1768 | do | |
a6ccdbab EC |
1769 | eval ac_val=\$$ac_var |
1770 | case $ac_val in | |
1771 | *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
1772 | esac | |
1773 | echo "$ac_var='\''$ac_val'\''" | |
ba479fd2 NN |
1774 | done | sort |
1775 | echo | |
1776 | fi | |
1777 | ||
1778 | if test -s confdefs.h; then | |
1779 | cat <<\_ASBOX | |
1780 | ## ----------- ## | |
1781 | ## confdefs.h. ## | |
1782 | ## ----------- ## | |
1783 | _ASBOX | |
1784 | echo | |
a6ccdbab | 1785 | cat confdefs.h |
ba479fd2 NN |
1786 | echo |
1787 | fi | |
1788 | test "$ac_signal" != 0 && | |
1789 | echo "$as_me: caught signal $ac_signal" | |
1790 | echo "$as_me: exit $exit_status" | |
1791 | } >&5 | |
a6ccdbab EC |
1792 | rm -f core *.core core.conftest.* && |
1793 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
ba479fd2 | 1794 | exit $exit_status |
a6ccdbab | 1795 | ' 0 |
ba479fd2 NN |
1796 | for ac_signal in 1 2 13 15; do |
1797 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1798 | done | |
1799 | ac_signal=0 | |
1800 | ||
1801 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
a6ccdbab | 1802 | rm -f -r conftest* confdefs.h |
ba479fd2 NN |
1803 | |
1804 | # Predefined preprocessor variables. | |
1805 | ||
1806 | cat >>confdefs.h <<_ACEOF | |
1807 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1808 | _ACEOF | |
1809 | ||
1810 | ||
1811 | cat >>confdefs.h <<_ACEOF | |
1812 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1813 | _ACEOF | |
1814 | ||
1815 | ||
1816 | cat >>confdefs.h <<_ACEOF | |
1817 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1818 | _ACEOF | |
1819 | ||
1820 | ||
1821 | cat >>confdefs.h <<_ACEOF | |
1822 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1823 | _ACEOF | |
1824 | ||
1825 | ||
1826 | cat >>confdefs.h <<_ACEOF | |
1827 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1828 | _ACEOF | |
1829 | ||
1830 | ||
1831 | # Let the site file select an alternate cache file if it wants to. | |
1832 | # Prefer explicitly selected file to automatically selected ones. | |
a6ccdbab EC |
1833 | if test -n "$CONFIG_SITE"; then |
1834 | set x "$CONFIG_SITE" | |
1835 | elif test "x$prefix" != xNONE; then | |
1836 | set x "$prefix/share/config.site" "$prefix/etc/config.site" | |
1837 | else | |
1838 | set x "$ac_default_prefix/share/config.site" \ | |
1839 | "$ac_default_prefix/etc/config.site" | |
ba479fd2 | 1840 | fi |
a6ccdbab EC |
1841 | shift |
1842 | for ac_site_file | |
1843 | do | |
ba479fd2 NN |
1844 | if test -r "$ac_site_file"; then |
1845 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1846 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1847 | sed 's/^/| /' "$ac_site_file" >&5 | |
1848 | . "$ac_site_file" | |
1849 | fi | |
1850 | done | |
1851 | ||
1852 | if test -r "$cache_file"; then | |
1853 | # Some versions of bash will fail to source /dev/null (special | |
1854 | # files actually), so we avoid doing that. | |
1855 | if test -f "$cache_file"; then | |
1856 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1857 | echo "$as_me: loading cache $cache_file" >&6;} | |
1858 | case $cache_file in | |
a6ccdbab EC |
1859 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
1860 | *) . "./$cache_file";; | |
ba479fd2 NN |
1861 | esac |
1862 | fi | |
1863 | else | |
1864 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1865 | echo "$as_me: creating cache $cache_file" >&6;} | |
1866 | >$cache_file | |
1867 | fi | |
1868 | ||
1869 | # Check that the precious variables saved in the cache have kept the same | |
1870 | # value. | |
1871 | ac_cache_corrupted=false | |
a6ccdbab | 1872 | for ac_var in $ac_precious_vars; do |
ba479fd2 NN |
1873 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1874 | eval ac_new_set=\$ac_env_${ac_var}_set | |
a6ccdbab EC |
1875 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
1876 | eval ac_new_val=\$ac_env_${ac_var}_value | |
ba479fd2 NN |
1877 | case $ac_old_set,$ac_new_set in |
1878 | set,) | |
1879 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1880 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1881 | ac_cache_corrupted=: ;; | |
1882 | ,set) | |
1883 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1884 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1885 | ac_cache_corrupted=: ;; | |
1886 | ,);; | |
1887 | *) | |
1888 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1889 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1890 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1891 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1892 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1893 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1894 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1895 | ac_cache_corrupted=: |
ba479fd2 NN |
1896 | fi;; |
1897 | esac | |
1898 | # Pass precious variables to config.status. | |
1899 | if test "$ac_new_set" = set; then | |
1900 | case $ac_new_val in | |
a6ccdbab | 1901 | *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
ba479fd2 NN |
1902 | *) ac_arg=$ac_var=$ac_new_val ;; |
1903 | esac | |
1904 | case " $ac_configure_args " in | |
1905 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1906 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1907 | esac | |
1908 | fi | |
1909 | done | |
1910 | if $ac_cache_corrupted; then | |
1911 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1912 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1913 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1914 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1915 | { (exit 1); exit 1; }; } | |
1916 | fi | |
1917 | ||
ba479fd2 NN |
1918 | |
1919 | ||
1920 | ||
1921 | ||
1922 | ||
1923 | ||
1924 | ||
1925 | ||
1926 | ||
1927 | ||
1928 | ||
1929 | ||
1930 | ||
1931 | ||
1932 | ||
1933 | ||
a6ccdbab EC |
1934 | ac_ext=c |
1935 | ac_cpp='$CPP $CPPFLAGS' | |
1936 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1937 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1938 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
ba479fd2 NN |
1939 | |
1940 | ||
914c5af7 | 1941 | |
a6ccdbab | 1942 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
ba479fd2 NN |
1943 | |
1944 | ||
9f18db39 PB |
1945 | gcc_version=`cat $srcdir/BASE-VER` |
1946 | ||
ba479fd2 NN |
1947 | # Determine the host, build, and target systems |
1948 | ac_aux_dir= | |
a6ccdbab EC |
1949 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do |
1950 | if test -f "$ac_dir/install-sh"; then | |
ba479fd2 NN |
1951 | ac_aux_dir=$ac_dir |
1952 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1953 | break | |
a6ccdbab | 1954 | elif test -f "$ac_dir/install.sh"; then |
ba479fd2 NN |
1955 | ac_aux_dir=$ac_dir |
1956 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1957 | break | |
a6ccdbab | 1958 | elif test -f "$ac_dir/shtool"; then |
ba479fd2 NN |
1959 | ac_aux_dir=$ac_dir |
1960 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1961 | break | |
1962 | fi | |
1963 | done | |
1964 | if test -z "$ac_aux_dir"; then | |
a6ccdbab EC |
1965 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 |
1966 | echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} | |
ba479fd2 NN |
1967 | { (exit 1); exit 1; }; } |
1968 | fi | |
a6ccdbab EC |
1969 | |
1970 | # These three variables are undocumented and unsupported, | |
1971 | # and are intended to be withdrawn in a future Autoconf release. | |
1972 | # They can cause serious problems if a builder's source tree is in a directory | |
1973 | # whose full name contains unusual characters. | |
1974 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
1975 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
1976 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
1977 | ||
ba479fd2 NN |
1978 | |
1979 | # Make sure we can run config.sub. | |
a6ccdbab EC |
1980 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
1981 | { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 | |
1982 | echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} | |
ba479fd2 NN |
1983 | { (exit 1); exit 1; }; } |
1984 | ||
a6ccdbab EC |
1985 | { echo "$as_me:$LINENO: checking build system type" >&5 |
1986 | echo $ECHO_N "checking build system type... $ECHO_C" >&6; } | |
ba479fd2 NN |
1987 | if test "${ac_cv_build+set}" = set; then |
1988 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1989 | else | |
a6ccdbab EC |
1990 | ac_build_alias=$build_alias |
1991 | test "x$ac_build_alias" = x && | |
1992 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
1993 | test "x$ac_build_alias" = x && | |
ba479fd2 NN |
1994 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 |
1995 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1996 | { (exit 1); exit 1; }; } | |
a6ccdbab EC |
1997 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
1998 | { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 | |
1999 | echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} | |
ba479fd2 NN |
2000 | { (exit 1); exit 1; }; } |
2001 | ||
2002 | fi | |
a6ccdbab EC |
2003 | { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 |
2004 | echo "${ECHO_T}$ac_cv_build" >&6; } | |
2005 | case $ac_cv_build in | |
2006 | *-*-*) ;; | |
2007 | *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 | |
2008 | echo "$as_me: error: invalid value of canonical build" >&2;} | |
2009 | { (exit 1); exit 1; }; };; | |
2010 | esac | |
ba479fd2 | 2011 | build=$ac_cv_build |
a6ccdbab EC |
2012 | ac_save_IFS=$IFS; IFS='-' |
2013 | set x $ac_cv_build | |
2014 | shift | |
2015 | build_cpu=$1 | |
2016 | build_vendor=$2 | |
2017 | shift; shift | |
2018 | # Remember, the first character of IFS is used to create $*, | |
2019 | # except with old shells: | |
2020 | build_os=$* | |
2021 | IFS=$ac_save_IFS | |
2022 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
2023 | ||
2024 | ||
2025 | { echo "$as_me:$LINENO: checking host system type" >&5 | |
2026 | echo $ECHO_N "checking host system type... $ECHO_C" >&6; } | |
ba479fd2 NN |
2027 | if test "${ac_cv_host+set}" = set; then |
2028 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2029 | else | |
a6ccdbab EC |
2030 | if test "x$host_alias" = x; then |
2031 | ac_cv_host=$ac_cv_build | |
2032 | else | |
2033 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2034 | { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 | |
2035 | echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} | |
ba479fd2 | 2036 | { (exit 1); exit 1; }; } |
a6ccdbab | 2037 | fi |
ba479fd2 NN |
2038 | |
2039 | fi | |
a6ccdbab EC |
2040 | { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 |
2041 | echo "${ECHO_T}$ac_cv_host" >&6; } | |
2042 | case $ac_cv_host in | |
2043 | *-*-*) ;; | |
2044 | *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 | |
2045 | echo "$as_me: error: invalid value of canonical host" >&2;} | |
2046 | { (exit 1); exit 1; }; };; | |
2047 | esac | |
ba479fd2 | 2048 | host=$ac_cv_host |
a6ccdbab EC |
2049 | ac_save_IFS=$IFS; IFS='-' |
2050 | set x $ac_cv_host | |
2051 | shift | |
2052 | host_cpu=$1 | |
2053 | host_vendor=$2 | |
2054 | shift; shift | |
2055 | # Remember, the first character of IFS is used to create $*, | |
2056 | # except with old shells: | |
2057 | host_os=$* | |
2058 | IFS=$ac_save_IFS | |
2059 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
2060 | ||
2061 | ||
2062 | { echo "$as_me:$LINENO: checking target system type" >&5 | |
2063 | echo $ECHO_N "checking target system type... $ECHO_C" >&6; } | |
ba479fd2 NN |
2064 | if test "${ac_cv_target+set}" = set; then |
2065 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2066 | else | |
a6ccdbab EC |
2067 | if test "x$target_alias" = x; then |
2068 | ac_cv_target=$ac_cv_host | |
2069 | else | |
2070 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
2071 | { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 | |
2072 | echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} | |
ba479fd2 | 2073 | { (exit 1); exit 1; }; } |
a6ccdbab | 2074 | fi |
ba479fd2 NN |
2075 | |
2076 | fi | |
a6ccdbab EC |
2077 | { echo "$as_me:$LINENO: result: $ac_cv_target" >&5 |
2078 | echo "${ECHO_T}$ac_cv_target" >&6; } | |
2079 | case $ac_cv_target in | |
2080 | *-*-*) ;; | |
2081 | *) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 | |
2082 | echo "$as_me: error: invalid value of canonical target" >&2;} | |
2083 | { (exit 1); exit 1; }; };; | |
2084 | esac | |
ba479fd2 | 2085 | target=$ac_cv_target |
a6ccdbab EC |
2086 | ac_save_IFS=$IFS; IFS='-' |
2087 | set x $ac_cv_target | |
2088 | shift | |
2089 | target_cpu=$1 | |
2090 | target_vendor=$2 | |
2091 | shift; shift | |
2092 | # Remember, the first character of IFS is used to create $*, | |
2093 | # except with old shells: | |
2094 | target_os=$* | |
2095 | IFS=$ac_save_IFS | |
2096 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
ba479fd2 NN |
2097 | |
2098 | ||
2099 | # The aliases save the names the user supplied, while $host etc. | |
2100 | # will get canonicalized. | |
2101 | test -n "$target_alias" && | |
2102 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
2103 | NONENONEs,x,x, && | |
2104 | program_prefix=${target_alias}- | |
2105 | ||
2106 | # Determine the noncanonical target name, for directory use. | |
18fc9bd4 RG |
2107 | case ${build_alias} in |
2108 | "") build_noncanonical=${build} ;; | |
2109 | *) build_noncanonical=${build_alias} ;; | |
2110 | esac | |
2111 | ||
2112 | case ${host_alias} in | |
2113 | "") host_noncanonical=${build_noncanonical} ;; | |
2114 | *) host_noncanonical=${host_alias} ;; | |
2115 | esac | |
2116 | ||
2117 | case ${target_alias} in | |
2118 | "") target_noncanonical=${host_noncanonical} ;; | |
2119 | *) target_noncanonical=${target_alias} ;; | |
2120 | esac | |
2121 | ||
2122 | ||
2123 | ||
8f1529e6 L |
2124 | |
2125 | # Determine the target- and build-specific subdirectories | |
57255173 PB |
2126 | |
2127 | # post-stage1 host modules use a different CC_FOR_BUILD so, in order to | |
2128 | # have matching libraries, they should use host libraries: Makefile.tpl | |
2129 | # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). | |
2130 | # However, they still use the build modules, because the corresponding | |
2131 | # host modules (e.g. bison) are only built for the host when bootstrap | |
2132 | # finishes. So: | |
2133 | # - build_subdir is where we find build modules, and never changes. | |
2134 | # - build_libsubdir is where we find build libraries, and can be overridden. | |
2135 | ||
2136 | # Prefix 'build-' so this never conflicts with target_subdir. | |
18fc9bd4 | 2137 | build_subdir="build-${build_noncanonical}" |
1546bb64 | 2138 | |
a6ccdbab | 2139 | # Check whether --with-build-libsubdir was given. |
1546bb64 | 2140 | if test "${with_build_libsubdir+set}" = set; then |
a6ccdbab | 2141 | withval=$with_build_libsubdir; build_libsubdir="$withval" |
1546bb64 PB |
2142 | else |
2143 | build_libsubdir="$build_subdir" | |
a6ccdbab EC |
2144 | fi |
2145 | ||
18fc9bd4 RG |
2146 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
2147 | if ( test $srcdir = . && test -d gcc ) \ | |
2148 | || test -d $srcdir/../host-${host_noncanonical}; then | |
2149 | host_subdir="host-${host_noncanonical}" | |
2150 | else | |
2151 | host_subdir=. | |
2152 | fi | |
2153 | # No prefix. | |
2154 | target_subdir=${target_noncanonical} | |
2155 | ||
73458fb7 | 2156 | |
093e61a6 | 2157 | # Set program_transform_name |
13c22933 | 2158 | test "$program_prefix" != NONE && |
a6ccdbab | 2159 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
13c22933 JJ |
2160 | # Use a double $ so make ignores it. |
2161 | test "$program_suffix" != NONE && | |
a6ccdbab | 2162 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
ba479fd2 NN |
2163 | # Double any \ or $. echo might interpret backslashes. |
2164 | # By default was `s,x,x', remove it if useless. | |
2165 | cat <<\_ACEOF >conftest.sed | |
2166 | s/[\\$]/&&/g;s/;s,x,x,$// | |
2167 | _ACEOF | |
2168 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
a6ccdbab | 2169 | rm -f conftest.sed |
13c22933 JJ |
2170 | |
2171 | ||
34a86c2b NN |
2172 | # Check for bogus environment variables. |
2173 | # Test if LIBRARY_PATH contains the notation for the current directory | |
2174 | # since this would lead to problems installing/building glibc. | |
2175 | # LIBRARY_PATH contains the current directory if one of the following | |
2176 | # is true: | |
2177 | # - one of the terminals (":" and ";") is the first or last sign | |
2178 | # - two terminals occur directly after each other | |
2179 | # - the path contains an element with a dot in it | |
a6ccdbab EC |
2180 | { echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
2181 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6; } | |
34a86c2b NN |
2182 | case ${LIBRARY_PATH} in |
2183 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
2184 | library_path_setting="contains current directory" | |
2185 | ;; | |
2186 | *) | |
2187 | library_path_setting="ok" | |
2188 | ;; | |
2189 | esac | |
a6ccdbab EC |
2190 | { echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
2191 | echo "${ECHO_T}$library_path_setting" >&6; } | |
34a86c2b | 2192 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 2193 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
2194 | *** LIBRARY_PATH shouldn't contain the current directory when |
2195 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
2196 | *** and run configure again." >&5 |
2197 | echo "$as_me: error: | |
2198 | *** LIBRARY_PATH shouldn't contain the current directory when | |
2199 | *** building gcc. Please change the environment variable | |
2200 | *** and run configure again." >&2;} | |
2201 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
2202 | fi |
2203 | ||
34a86c2b NN |
2204 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
2205 | # since this would lead to problems installing/building glibc. | |
2206 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
2207 | # is true: | |
2208 | # - one of the terminals (":" and ";") is the first or last sign | |
2209 | # - two terminals occur directly after each other | |
2210 | # - the path contains an element with a dot in it | |
a6ccdbab EC |
2211 | { echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
2212 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6; } | |
34a86c2b NN |
2213 | case ${GCC_EXEC_PREFIX} in |
2214 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
2215 | gcc_exec_prefix_setting="contains current directory" | |
2216 | ;; | |
2217 | *) | |
2218 | gcc_exec_prefix_setting="ok" | |
2219 | ;; | |
2220 | esac | |
a6ccdbab EC |
2221 | { echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
2222 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6; } | |
34a86c2b | 2223 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
2224 | { { echo "$as_me:$LINENO: error: |
2225 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
2226 | *** building gcc. Please change the environment variable | |
2227 | *** and run configure again." >&5 | |
2228 | echo "$as_me: error: | |
cafe096b EC |
2229 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
2230 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
2231 | *** and run configure again." >&2;} |
2232 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2233 | fi |
2234 | ||
2235 | # ----------- | |
2236 | # Directories | |
2237 | # ----------- | |
2238 | ||
2239 | # Specify the local prefix | |
2240 | local_prefix= | |
ba479fd2 | 2241 | |
a6ccdbab | 2242 | # Check whether --with-local-prefix was given. |
34a86c2b | 2243 | if test "${with_local_prefix+set}" = set; then |
a6ccdbab | 2244 | withval=$with_local_prefix; case "${withval}" in |
ba479fd2 NN |
2245 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
2246 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
2247 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
2248 | no) ;; |
2249 | *) local_prefix=$with_local_prefix ;; | |
2250 | esac | |
a6ccdbab EC |
2251 | fi |
2252 | ||
34a86c2b NN |
2253 | |
2254 | # Default local prefix if it is empty | |
2255 | if test x$local_prefix = x; then | |
2256 | local_prefix=/usr/local | |
2257 | fi | |
2258 | ||
2259 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
2260 | # passed in by the toplevel make and thus we'd get different behavior | |
2261 | # depending on where we built the sources. | |
2262 | gcc_gxx_include_dir= | |
2263 | # Specify the g++ header file directory | |
ba479fd2 | 2264 | |
a6ccdbab | 2265 | # Check whether --with-gxx-include-dir was given. |
34a86c2b | 2266 | if test "${with_gxx_include_dir+set}" = set; then |
a6ccdbab | 2267 | withval=$with_gxx_include_dir; case "${withval}" in |
ba479fd2 NN |
2268 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
2269 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
2270 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
2271 | no) ;; |
2272 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
2273 | esac | |
a6ccdbab EC |
2274 | fi |
2275 | ||
34a86c2b | 2276 | |
0f57bf40 | 2277 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. |
34a86c2b NN |
2278 | if test x${gcc_gxx_include_dir} = x; then |
2279 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
2280 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
2281 | else | |
0f57bf40 MM |
2282 | libstdcxx_incdir='include/c++/$(version)' |
2283 | if test x$host != x$target; then | |
2284 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
2285 | fi | |
2286 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir" | |
34a86c2b NN |
2287 | fi |
2288 | fi | |
2289 | ||
ba479fd2 | 2290 | |
a6ccdbab | 2291 | # Check whether --with-cpp_install_dir was given. |
34a86c2b | 2292 | if test "${with_cpp_install_dir+set}" = set; then |
a6ccdbab | 2293 | withval=$with_cpp_install_dir; if test x$withval = xyes; then |
ba479fd2 NN |
2294 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
2295 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
2296 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2297 | elif test x$withval != xno; then |
2298 | cpp_install_dir=$withval | |
2299 | fi | |
a6ccdbab EC |
2300 | fi |
2301 | ||
34a86c2b | 2302 | |
51b9ff45 | 2303 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 2304 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 2305 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 2306 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
2307 | # just that. |
2308 | ||
a6ccdbab EC |
2309 | { echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
2310 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6; } | |
2311 | # Check whether --enable-generated-files-in-srcdir was given. | |
51b9ff45 | 2312 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
a6ccdbab | 2313 | enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval |
51b9ff45 | 2314 | else |
03787dfd | 2315 | generated_files_in_srcdir=no |
a6ccdbab | 2316 | fi |
b8ec3cc8 | 2317 | |
a6ccdbab EC |
2318 | |
2319 | { echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 | |
2320 | echo "${ECHO_T}$generated_files_in_srcdir" >&6; } | |
03787dfd KC |
2321 | |
2322 | if test "$generated_files_in_srcdir" = "yes"; then | |
2323 | GENINSRC='' | |
03787dfd KC |
2324 | else |
2325 | GENINSRC='#' | |
03787dfd KC |
2326 | fi |
2327 | ||
2328 | ||
34a86c2b NN |
2329 | # ------------------- |
2330 | # Find default linker | |
2331 | # ------------------- | |
2332 | ||
2333 | # With GNU ld | |
ba479fd2 | 2334 | |
a6ccdbab | 2335 | # Check whether --with-gnu-ld was given. |
34a86c2b | 2336 | if test "${with_gnu_ld+set}" = set; then |
a6ccdbab | 2337 | withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld" |
34a86c2b NN |
2338 | else |
2339 | gnu_ld_flag=no | |
a6ccdbab EC |
2340 | fi |
2341 | ||
6e3f3080 | 2342 | |
63cf211a | 2343 | # With pre-defined ld |
ba479fd2 | 2344 | |
a6ccdbab | 2345 | # Check whether --with-ld was given. |
34a86c2b | 2346 | if test "${with_ld+set}" = set; then |
a6ccdbab EC |
2347 | withval=$with_ld; DEFAULT_LINKER="$with_ld" |
2348 | fi | |
2349 | ||
34a86c2b NN |
2350 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
2351 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
2352 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
2353 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
2354 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2355 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
2356 | gnu_ld_flag=yes | |
2357 | fi | |
ba479fd2 NN |
2358 | |
2359 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 2360 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 2361 | _ACEOF |
34a86c2b NN |
2362 | |
2363 | fi | |
2364 | ||
a6ccdbab EC |
2365 | { echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
2366 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6; } | |
34a86c2b NN |
2367 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
2368 | if test x"$gnu_ld_flag" = x"no"; then | |
a6ccdbab EC |
2369 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
2370 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6; } | |
34a86c2b | 2371 | else |
a6ccdbab EC |
2372 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
2373 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6; } | |
34a86c2b NN |
2374 | fi |
2375 | else | |
a6ccdbab EC |
2376 | { echo "$as_me:$LINENO: result: no" >&5 |
2377 | echo "${ECHO_T}no" >&6; } | |
34a86c2b NN |
2378 | fi |
2379 | ||
d594623a L |
2380 | # With demangler in GNU ld |
2381 | ||
a6ccdbab | 2382 | # Check whether --with-demangler-in-ld was given. |
d594623a | 2383 | if test "${with_demangler_in_ld+set}" = set; then |
a6ccdbab | 2384 | withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld" |
d594623a L |
2385 | else |
2386 | demangler_in_ld=no | |
a6ccdbab EC |
2387 | fi |
2388 | ||
d594623a | 2389 | |
34a86c2b NN |
2390 | # ---------------------- |
2391 | # Find default assembler | |
2392 | # ---------------------- | |
2393 | ||
2394 | # With GNU as | |
ba479fd2 | 2395 | |
a6ccdbab | 2396 | # Check whether --with-gnu-as was given. |
34a86c2b | 2397 | if test "${with_gnu_as+set}" = set; then |
a6ccdbab | 2398 | withval=$with_gnu_as; gas_flag="$with_gnu_as" |
34a86c2b NN |
2399 | else |
2400 | gas_flag=no | |
a6ccdbab | 2401 | fi |
34a86c2b | 2402 | |
b8ec3cc8 | 2403 | |
a6ccdbab EC |
2404 | |
2405 | # Check whether --with-as was given. | |
34a86c2b | 2406 | if test "${with_as+set}" = set; then |
a6ccdbab EC |
2407 | withval=$with_as; DEFAULT_ASSEMBLER="$with_as" |
2408 | fi | |
2409 | ||
34a86c2b NN |
2410 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
2411 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
2412 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
2413 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
2414 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2415 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
2416 | gas_flag=yes | |
2417 | fi | |
ba479fd2 NN |
2418 | |
2419 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 2420 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 2421 | _ACEOF |
34a86c2b NN |
2422 | |
2423 | fi | |
2424 | ||
a6ccdbab EC |
2425 | { echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
2426 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6; } | |
34a86c2b NN |
2427 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
2428 | if test x"$gas_flag" = x"no"; then | |
a6ccdbab EC |
2429 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
2430 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6; } | |
34a86c2b | 2431 | else |
a6ccdbab EC |
2432 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
2433 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; } | |
34a86c2b NN |
2434 | fi |
2435 | else | |
a6ccdbab EC |
2436 | { echo "$as_me:$LINENO: result: no" >&5 |
2437 | echo "${ECHO_T}no" >&6; } | |
34a86c2b NN |
2438 | fi |
2439 | ||
2440 | # --------------- | |
2441 | # Find C compiler | |
2442 | # --------------- | |
2443 | ||
426ca3ca RO |
2444 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
2445 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
2446 | # file, even when creating an executable, so an execution test fails. | |
2447 | # Remove possible default executable files to avoid this. | |
2448 | # | |
2449 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
2450 | # Autoconf includes it. | |
2451 | rm -f a.out a.exe b.out | |
2452 | ||
34a86c2b | 2453 | # Find the native compiler |
ba479fd2 NN |
2454 | ac_ext=c |
2455 | ac_cpp='$CPP $CPPFLAGS' | |
2456 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2457 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2458 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2459 | if test -n "$ac_tool_prefix"; then | |
2460 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2461 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
a6ccdbab EC |
2462 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2463 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2464 | if test "${ac_cv_prog_CC+set}" = set; then |
2465 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2466 | else | |
2467 | if test -n "$CC"; then | |
2468 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2469 | else | |
2470 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2471 | for as_dir in $PATH | |
2472 | do | |
2473 | IFS=$as_save_IFS | |
2474 | test -z "$as_dir" && as_dir=. | |
2475 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 2476 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2477 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
2478 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2479 | break 2 | |
2480 | fi | |
2481 | done | |
2482 | done | |
a6ccdbab | 2483 | IFS=$as_save_IFS |
ba479fd2 NN |
2484 | |
2485 | fi | |
2486 | fi | |
2487 | CC=$ac_cv_prog_CC | |
2488 | if test -n "$CC"; then | |
a6ccdbab EC |
2489 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2490 | echo "${ECHO_T}$CC" >&6; } | |
ba479fd2 | 2491 | else |
a6ccdbab EC |
2492 | { echo "$as_me:$LINENO: result: no" >&5 |
2493 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
2494 | fi |
2495 | ||
a6ccdbab | 2496 | |
ba479fd2 NN |
2497 | fi |
2498 | if test -z "$ac_cv_prog_CC"; then | |
2499 | ac_ct_CC=$CC | |
2500 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 2501 | set dummy gcc; ac_word=$2 |
a6ccdbab EC |
2502 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2503 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2504 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
2505 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2506 | else | |
2507 | if test -n "$ac_ct_CC"; then | |
2508 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2509 | else | |
2510 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2511 | for as_dir in $PATH | |
2512 | do | |
2513 | IFS=$as_save_IFS | |
2514 | test -z "$as_dir" && as_dir=. | |
2515 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 2516 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2517 | ac_cv_prog_ac_ct_CC="gcc" |
2518 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2519 | break 2 | |
2520 | fi | |
2521 | done | |
2522 | done | |
a6ccdbab | 2523 | IFS=$as_save_IFS |
ba479fd2 NN |
2524 | |
2525 | fi | |
2526 | fi | |
2527 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2528 | if test -n "$ac_ct_CC"; then | |
a6ccdbab EC |
2529 | { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
2530 | echo "${ECHO_T}$ac_ct_CC" >&6; } | |
ba479fd2 | 2531 | else |
a6ccdbab EC |
2532 | { echo "$as_me:$LINENO: result: no" >&5 |
2533 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
2534 | fi |
2535 | ||
a6ccdbab EC |
2536 | if test "x$ac_ct_CC" = x; then |
2537 | CC="" | |
2538 | else | |
2539 | case $cross_compiling:$ac_tool_warned in | |
2540 | yes:) | |
2541 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools | |
2542 | whose name does not start with the host triplet. If you think this | |
2543 | configuration is useful to you, please write to autoconf@gnu.org." >&5 | |
2544 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools | |
2545 | whose name does not start with the host triplet. If you think this | |
2546 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} | |
2547 | ac_tool_warned=yes ;; | |
2548 | esac | |
2549 | CC=$ac_ct_CC | |
2550 | fi | |
ba479fd2 NN |
2551 | else |
2552 | CC="$ac_cv_prog_CC" | |
2553 | fi | |
2554 | ||
2555 | if test -z "$CC"; then | |
a6ccdbab EC |
2556 | if test -n "$ac_tool_prefix"; then |
2557 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
ba479fd2 | 2558 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
a6ccdbab EC |
2559 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2560 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2561 | if test "${ac_cv_prog_CC+set}" = set; then |
2562 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
2563 | else |
2564 | if test -n "$CC"; then | |
2565 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2566 | else | |
ba479fd2 NN |
2567 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2568 | for as_dir in $PATH | |
2569 | do | |
2570 | IFS=$as_save_IFS | |
2571 | test -z "$as_dir" && as_dir=. | |
2572 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 2573 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2574 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
2575 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2576 | break 2 | |
2577 | fi | |
2578 | done | |
2579 | done | |
a6ccdbab | 2580 | IFS=$as_save_IFS |
ba479fd2 | 2581 | |
cd9e5e7c MK |
2582 | fi |
2583 | fi | |
ba479fd2 | 2584 | CC=$ac_cv_prog_CC |
cd9e5e7c | 2585 | if test -n "$CC"; then |
a6ccdbab EC |
2586 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2587 | echo "${ECHO_T}$CC" >&6; } | |
dd7f7a6e | 2588 | else |
a6ccdbab EC |
2589 | { echo "$as_me:$LINENO: result: no" >&5 |
2590 | echo "${ECHO_T}no" >&6; } | |
dd7f7a6e EC |
2591 | fi |
2592 | ||
dd7f7a6e | 2593 | |
a6ccdbab | 2594 | fi |
ba479fd2 | 2595 | fi |
6e3f3080 NN |
2596 | if test -z "$CC"; then |
2597 | # Extract the first word of "cc", so it can be a program name with args. | |
2598 | set dummy cc; ac_word=$2 | |
a6ccdbab EC |
2599 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2600 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2601 | if test "${ac_cv_prog_CC+set}" = set; then |
2602 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2603 | else |
2604 | if test -n "$CC"; then | |
2605 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2606 | else | |
2607 | ac_prog_rejected=no | |
ba479fd2 NN |
2608 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2609 | for as_dir in $PATH | |
2610 | do | |
2611 | IFS=$as_save_IFS | |
2612 | test -z "$as_dir" && as_dir=. | |
2613 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 2614 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2615 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
2616 | ac_prog_rejected=yes | |
2617 | continue | |
2618 | fi | |
2619 | ac_cv_prog_CC="cc" | |
2620 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2621 | break 2 | |
2622 | fi | |
2623 | done | |
2624 | done | |
a6ccdbab | 2625 | IFS=$as_save_IFS |
ba479fd2 | 2626 | |
6e3f3080 NN |
2627 | if test $ac_prog_rejected = yes; then |
2628 | # We found a bogon in the path, so make sure we never use it. | |
2629 | set dummy $ac_cv_prog_CC | |
2630 | shift | |
ba479fd2 | 2631 | if test $# != 0; then |
6e3f3080 NN |
2632 | # We chose a different compiler from the bogus one. |
2633 | # However, it has the same basename, so the bogon will be chosen | |
2634 | # first if we set CC to just the basename; use the full file name. | |
2635 | shift | |
ba479fd2 | 2636 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2637 | fi |
6e3f3080 NN |
2638 | fi |
2639 | fi | |
2640 | fi | |
ba479fd2 | 2641 | CC=$ac_cv_prog_CC |
6e3f3080 | 2642 | if test -n "$CC"; then |
a6ccdbab EC |
2643 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2644 | echo "${ECHO_T}$CC" >&6; } | |
e9a25f70 | 2645 | else |
a6ccdbab EC |
2646 | { echo "$as_me:$LINENO: result: no" >&5 |
2647 | echo "${ECHO_T}no" >&6; } | |
e9a25f70 | 2648 | fi |
6e3f3080 | 2649 | |
a6ccdbab | 2650 | |
ba479fd2 NN |
2651 | fi |
2652 | if test -z "$CC"; then | |
2653 | if test -n "$ac_tool_prefix"; then | |
a6ccdbab | 2654 | for ac_prog in cl.exe |
ba479fd2 NN |
2655 | do |
2656 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2657 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
a6ccdbab EC |
2658 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2659 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2660 | if test "${ac_cv_prog_CC+set}" = set; then |
2661 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2662 | else |
6e3f3080 NN |
2663 | if test -n "$CC"; then |
2664 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2665 | else | |
ba479fd2 NN |
2666 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2667 | for as_dir in $PATH | |
2668 | do | |
2669 | IFS=$as_save_IFS | |
2670 | test -z "$as_dir" && as_dir=. | |
2671 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 2672 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2673 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
2674 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2675 | break 2 | |
2676 | fi | |
2677 | done | |
2678 | done | |
a6ccdbab | 2679 | IFS=$as_save_IFS |
ba479fd2 | 2680 | |
093e61a6 | 2681 | fi |
6e3f3080 | 2682 | fi |
ba479fd2 | 2683 | CC=$ac_cv_prog_CC |
6e3f3080 | 2684 | if test -n "$CC"; then |
a6ccdbab EC |
2685 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2686 | echo "${ECHO_T}$CC" >&6; } | |
6e3f3080 | 2687 | else |
a6ccdbab EC |
2688 | { echo "$as_me:$LINENO: result: no" >&5 |
2689 | echo "${ECHO_T}no" >&6; } | |
093e61a6 | 2690 | fi |
cafe096b | 2691 | |
a6ccdbab | 2692 | |
ba479fd2 NN |
2693 | test -n "$CC" && break |
2694 | done | |
2695 | fi | |
2696 | if test -z "$CC"; then | |
2697 | ac_ct_CC=$CC | |
a6ccdbab | 2698 | for ac_prog in cl.exe |
ba479fd2 NN |
2699 | do |
2700 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2701 | set dummy $ac_prog; ac_word=$2 | |
a6ccdbab EC |
2702 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2703 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2704 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
2705 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2706 | else | |
2707 | if test -n "$ac_ct_CC"; then | |
2708 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2709 | else | |
2710 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2711 | for as_dir in $PATH | |
2712 | do | |
2713 | IFS=$as_save_IFS | |
2714 | test -z "$as_dir" && as_dir=. | |
2715 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 2716 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2717 | ac_cv_prog_ac_ct_CC="$ac_prog" |
2718 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2719 | break 2 | |
2720 | fi | |
2721 | done | |
2722 | done | |
a6ccdbab | 2723 | IFS=$as_save_IFS |
6e3f3080 | 2724 | |
ba479fd2 NN |
2725 | fi |
2726 | fi | |
2727 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2728 | if test -n "$ac_ct_CC"; then | |
a6ccdbab EC |
2729 | { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
2730 | echo "${ECHO_T}$ac_ct_CC" >&6; } | |
ba479fd2 | 2731 | else |
a6ccdbab EC |
2732 | { echo "$as_me:$LINENO: result: no" >&5 |
2733 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 | 2734 | fi |
6e3f3080 | 2735 | |
a6ccdbab | 2736 | |
ba479fd2 NN |
2737 | test -n "$ac_ct_CC" && break |
2738 | done | |
63cf211a | 2739 | |
a6ccdbab EC |
2740 | if test "x$ac_ct_CC" = x; then |
2741 | CC="" | |
2742 | else | |
2743 | case $cross_compiling:$ac_tool_warned in | |
2744 | yes:) | |
2745 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools | |
2746 | whose name does not start with the host triplet. If you think this | |
2747 | configuration is useful to you, please write to autoconf@gnu.org." >&5 | |
2748 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools | |
2749 | whose name does not start with the host triplet. If you think this | |
2750 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} | |
2751 | ac_tool_warned=yes ;; | |
2752 | esac | |
2753 | CC=$ac_ct_CC | |
2754 | fi | |
ba479fd2 NN |
2755 | fi |
2756 | ||
2757 | fi | |
2758 | ||
2759 | ||
2760 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2761 | See \`config.log' for more details." >&5 | |
2762 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2763 | See \`config.log' for more details." >&2;} | |
2764 | { (exit 1); exit 1; }; } | |
2765 | ||
2766 | # Provide some information about the compiler. | |
a6ccdbab | 2767 | echo "$as_me:$LINENO: checking for C compiler version" >&5 |
ba479fd2 | 2768 | ac_compiler=`set X $ac_compile; echo $2` |
a6ccdbab EC |
2769 | { (ac_try="$ac_compiler --version >&5" |
2770 | case "(($ac_try" in | |
2771 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2772 | *) ac_try_echo=$ac_try;; | |
2773 | esac | |
2774 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2775 | (eval "$ac_compiler --version >&5") 2>&5 | |
ba479fd2 NN |
2776 | ac_status=$? |
2777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2778 | (exit $ac_status); } | |
a6ccdbab EC |
2779 | { (ac_try="$ac_compiler -v >&5" |
2780 | case "(($ac_try" in | |
2781 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2782 | *) ac_try_echo=$ac_try;; | |
2783 | esac | |
2784 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2785 | (eval "$ac_compiler -v >&5") 2>&5 | |
ba479fd2 NN |
2786 | ac_status=$? |
2787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2788 | (exit $ac_status); } | |
a6ccdbab EC |
2789 | { (ac_try="$ac_compiler -V >&5" |
2790 | case "(($ac_try" in | |
2791 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2792 | *) ac_try_echo=$ac_try;; | |
2793 | esac | |
2794 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2795 | (eval "$ac_compiler -V >&5") 2>&5 | |
ba479fd2 NN |
2796 | ac_status=$? |
2797 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2798 | (exit $ac_status); } | |
2799 | ||
2800 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2801 | /* confdefs.h. */ |
2802 | _ACEOF | |
2803 | cat confdefs.h >>conftest.$ac_ext | |
2804 | cat >>conftest.$ac_ext <<_ACEOF | |
2805 | /* end confdefs.h. */ | |
2806 | ||
2807 | int | |
2808 | main () | |
2809 | { | |
63cf211a | 2810 | |
ba479fd2 NN |
2811 | ; |
2812 | return 0; | |
2813 | } | |
2814 | _ACEOF | |
2815 | ac_clean_files_save=$ac_clean_files | |
2816 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2817 | # Try to create an executable without -o first, disregard a.out. | |
2818 | # It will help us diagnose broken compilers, and finding out an intuition | |
2819 | # of exeext. | |
a6ccdbab EC |
2820 | { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2821 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } | |
ba479fd2 | 2822 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
a6ccdbab EC |
2823 | # |
2824 | # List of possible output files, starting from the most likely. | |
2825 | # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) | |
2826 | # only as a last resort. b.out is created by i960 compilers. | |
2827 | ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' | |
2828 | # | |
2829 | # The IRIX 6 linker writes into existing files which may not be | |
2830 | # executable, retaining their permissions. Remove them first so a | |
2831 | # subsequent execution test works. | |
2832 | ac_rmfiles= | |
2833 | for ac_file in $ac_files | |
2834 | do | |
2835 | case $ac_file in | |
2836 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; | |
2837 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
2838 | esac | |
2839 | done | |
2840 | rm -f $ac_rmfiles | |
2841 | ||
2842 | if { (ac_try="$ac_link_default" | |
2843 | case "(($ac_try" in | |
2844 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2845 | *) ac_try_echo=$ac_try;; | |
2846 | esac | |
2847 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2848 | (eval "$ac_link_default") 2>&5 | |
ba479fd2 NN |
2849 | ac_status=$? |
2850 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2851 | (exit $ac_status); }; then | |
a6ccdbab EC |
2852 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. |
2853 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
2854 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
2855 | # so that the user can short-circuit this test for compilers unknown to | |
2856 | # Autoconf. | |
2857 | for ac_file in $ac_files '' | |
ba479fd2 NN |
2858 | do |
2859 | test -f "$ac_file" || continue | |
2860 | case $ac_file in | |
a6ccdbab | 2861 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) |
86da66b5 | 2862 | ;; |
ba479fd2 | 2863 | [ab].out ) |
86da66b5 HPN |
2864 | # We found the default executable, but exeext='' is most |
2865 | # certainly right. | |
2866 | break;; | |
ba479fd2 | 2867 | *.* ) |
a6ccdbab EC |
2868 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
2869 | then :; else | |
2870 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
2871 | fi | |
2872 | # We set ac_cv_exeext here because the later test for it is not | |
2873 | # safe: cross compilers may not add the suffix if given an `-o' | |
2874 | # argument, so we may need to know it at that point already. | |
2875 | # Even if this section looks crufty: it has the advantage of | |
2876 | # actually working. | |
86da66b5 | 2877 | break;; |
ba479fd2 | 2878 | * ) |
86da66b5 | 2879 | break;; |
ba479fd2 NN |
2880 | esac |
2881 | done | |
a6ccdbab EC |
2882 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
2883 | ||
ba479fd2 | 2884 | else |
a6ccdbab EC |
2885 | ac_file='' |
2886 | fi | |
2887 | ||
2888 | { echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2889 | echo "${ECHO_T}$ac_file" >&6; } | |
2890 | if test -z "$ac_file"; then | |
ba479fd2 NN |
2891 | echo "$as_me: failed program was:" >&5 |
2892 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2893 | ||
2894 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2895 | See \`config.log' for more details." >&5 | |
2896 | echo "$as_me: error: C compiler cannot create executables | |
2897 | See \`config.log' for more details." >&2;} | |
2898 | { (exit 77); exit 77; }; } | |
2899 | fi | |
2900 | ||
2901 | ac_exeext=$ac_cv_exeext | |
ba479fd2 | 2902 | |
a6ccdbab | 2903 | # Check that the compiler produces executables we can run. If not, either |
ba479fd2 | 2904 | # the compiler is broken, or we cross compile. |
a6ccdbab EC |
2905 | { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 |
2906 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } | |
ba479fd2 NN |
2907 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 |
2908 | # If not cross compiling, check that we can run a simple program. | |
2909 | if test "$cross_compiling" != yes; then | |
2910 | if { ac_try='./$ac_file' | |
a6ccdbab EC |
2911 | { (case "(($ac_try" in |
2912 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2913 | *) ac_try_echo=$ac_try;; | |
2914 | esac | |
2915 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2916 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
2917 | ac_status=$? |
2918 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2919 | (exit $ac_status); }; }; then | |
2920 | cross_compiling=no | |
6e3f3080 | 2921 | else |
ba479fd2 NN |
2922 | if test "$cross_compiling" = maybe; then |
2923 | cross_compiling=yes | |
2924 | else | |
2925 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2926 | If you meant to cross compile, use \`--host'. | |
2927 | See \`config.log' for more details." >&5 | |
2928 | echo "$as_me: error: cannot run C compiled programs. | |
2929 | If you meant to cross compile, use \`--host'. | |
2930 | See \`config.log' for more details." >&2;} | |
2931 | { (exit 1); exit 1; }; } | |
2932 | fi | |
6e3f3080 NN |
2933 | fi |
2934 | fi | |
a6ccdbab EC |
2935 | { echo "$as_me:$LINENO: result: yes" >&5 |
2936 | echo "${ECHO_T}yes" >&6; } | |
ba479fd2 NN |
2937 | |
2938 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2939 | ac_clean_files=$ac_clean_files_save | |
a6ccdbab | 2940 | # Check that the compiler produces executables we can run. If not, either |
ba479fd2 | 2941 | # the compiler is broken, or we cross compile. |
a6ccdbab EC |
2942 | { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 |
2943 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } | |
2944 | { echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2945 | echo "${ECHO_T}$cross_compiling" >&6; } | |
2946 | ||
2947 | { echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2948 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } | |
2949 | if { (ac_try="$ac_link" | |
2950 | case "(($ac_try" in | |
2951 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2952 | *) ac_try_echo=$ac_try;; | |
2953 | esac | |
2954 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2955 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
2956 | ac_status=$? |
2957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2958 | (exit $ac_status); }; then | |
2959 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2960 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2961 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2962 | # `rm'. | |
2963 | for ac_file in conftest.exe conftest conftest.*; do | |
2964 | test -f "$ac_file" || continue | |
2965 | case $ac_file in | |
a6ccdbab | 2966 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; |
ba479fd2 | 2967 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
86da66b5 | 2968 | break;; |
ba479fd2 NN |
2969 | * ) break;; |
2970 | esac | |
2971 | done | |
e9a25f70 | 2972 | else |
ba479fd2 NN |
2973 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2974 | See \`config.log' for more details." >&5 | |
2975 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2976 | See \`config.log' for more details." >&2;} | |
2977 | { (exit 1); exit 1; }; } | |
2978 | fi | |
2979 | ||
2980 | rm -f conftest$ac_cv_exeext | |
a6ccdbab EC |
2981 | { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 |
2982 | echo "${ECHO_T}$ac_cv_exeext" >&6; } | |
ba479fd2 NN |
2983 | |
2984 | rm -f conftest.$ac_ext | |
2985 | EXEEXT=$ac_cv_exeext | |
2986 | ac_exeext=$EXEEXT | |
a6ccdbab EC |
2987 | { echo "$as_me:$LINENO: checking for suffix of object files" >&5 |
2988 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } | |
ba479fd2 NN |
2989 | if test "${ac_cv_objext+set}" = set; then |
2990 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2991 | else | |
2992 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2993 | /* confdefs.h. */ |
2994 | _ACEOF | |
2995 | cat confdefs.h >>conftest.$ac_ext | |
2996 | cat >>conftest.$ac_ext <<_ACEOF | |
2997 | /* end confdefs.h. */ | |
2998 | ||
2999 | int | |
3000 | main () | |
3001 | { | |
6e3f3080 | 3002 | |
ba479fd2 NN |
3003 | ; |
3004 | return 0; | |
3005 | } | |
3006 | _ACEOF | |
3007 | rm -f conftest.o conftest.obj | |
a6ccdbab EC |
3008 | if { (ac_try="$ac_compile" |
3009 | case "(($ac_try" in | |
3010 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3011 | *) ac_try_echo=$ac_try;; | |
3012 | esac | |
3013 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3014 | (eval "$ac_compile") 2>&5 | |
ba479fd2 NN |
3015 | ac_status=$? |
3016 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3017 | (exit $ac_status); }; then | |
a6ccdbab EC |
3018 | for ac_file in conftest.o conftest.obj conftest.*; do |
3019 | test -f "$ac_file" || continue; | |
ba479fd2 | 3020 | case $ac_file in |
a6ccdbab | 3021 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; |
ba479fd2 NN |
3022 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3023 | break;; | |
3024 | esac | |
3025 | done | |
63cf211a | 3026 | else |
ba479fd2 NN |
3027 | echo "$as_me: failed program was:" >&5 |
3028 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3029 | ||
3030 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
3031 | See \`config.log' for more details." >&5 | |
3032 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
3033 | See \`config.log' for more details." >&2;} | |
3034 | { (exit 1); exit 1; }; } | |
3035 | fi | |
3036 | ||
3037 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
3038 | fi | |
a6ccdbab EC |
3039 | { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 |
3040 | echo "${ECHO_T}$ac_cv_objext" >&6; } | |
ba479fd2 NN |
3041 | OBJEXT=$ac_cv_objext |
3042 | ac_objext=$OBJEXT | |
a6ccdbab EC |
3043 | { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 |
3044 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } | |
ba479fd2 NN |
3045 | if test "${ac_cv_c_compiler_gnu+set}" = set; then |
3046 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3047 | else | |
3048 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3049 | /* confdefs.h. */ |
3050 | _ACEOF | |
3051 | cat confdefs.h >>conftest.$ac_ext | |
3052 | cat >>conftest.$ac_ext <<_ACEOF | |
3053 | /* end confdefs.h. */ | |
3054 | ||
3055 | int | |
3056 | main () | |
3057 | { | |
3058 | #ifndef __GNUC__ | |
3059 | choke me | |
3060 | #endif | |
6e3f3080 | 3061 | |
ba479fd2 NN |
3062 | ; |
3063 | return 0; | |
3064 | } | |
3065 | _ACEOF | |
3066 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
3067 | if { (ac_try="$ac_compile" |
3068 | case "(($ac_try" in | |
3069 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3070 | *) ac_try_echo=$ac_try;; | |
3071 | esac | |
3072 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3073 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3074 | ac_status=$? |
86da66b5 HPN |
3075 | grep -v '^ *+' conftest.er1 >conftest.err |
3076 | rm -f conftest.er1 | |
3077 | cat conftest.err >&5 | |
ba479fd2 | 3078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
3079 | (exit $ac_status); } && { |
3080 | test -z "$ac_c_werror_flag" || | |
3081 | test ! -s conftest.err | |
3082 | } && test -s conftest.$ac_objext; then | |
ba479fd2 NN |
3083 | ac_compiler_gnu=yes |
3084 | else | |
3085 | echo "$as_me: failed program was:" >&5 | |
3086 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3087 | ||
a6ccdbab | 3088 | ac_compiler_gnu=no |
ba479fd2 | 3089 | fi |
a6ccdbab EC |
3090 | |
3091 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
ba479fd2 NN |
3092 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3093 | ||
3094 | fi | |
a6ccdbab EC |
3095 | { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 |
3096 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } | |
ba479fd2 NN |
3097 | GCC=`test $ac_compiler_gnu = yes && echo yes` |
3098 | ac_test_CFLAGS=${CFLAGS+set} | |
3099 | ac_save_CFLAGS=$CFLAGS | |
a6ccdbab EC |
3100 | { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 |
3101 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } | |
ba479fd2 NN |
3102 | if test "${ac_cv_prog_cc_g+set}" = set; then |
3103 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3104 | else | |
a6ccdbab EC |
3105 | ac_save_c_werror_flag=$ac_c_werror_flag |
3106 | ac_c_werror_flag=yes | |
3107 | ac_cv_prog_cc_g=no | |
3108 | CFLAGS="-g" | |
3109 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3110 | /* confdefs.h. */ |
3111 | _ACEOF | |
3112 | cat confdefs.h >>conftest.$ac_ext | |
3113 | cat >>conftest.$ac_ext <<_ACEOF | |
3114 | /* end confdefs.h. */ | |
3115 | ||
3116 | int | |
3117 | main () | |
3118 | { | |
3119 | ||
3120 | ; | |
3121 | return 0; | |
3122 | } | |
3123 | _ACEOF | |
3124 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
3125 | if { (ac_try="$ac_compile" |
3126 | case "(($ac_try" in | |
3127 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3128 | *) ac_try_echo=$ac_try;; | |
3129 | esac | |
3130 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3131 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3132 | ac_status=$? |
86da66b5 HPN |
3133 | grep -v '^ *+' conftest.er1 >conftest.err |
3134 | rm -f conftest.er1 | |
3135 | cat conftest.err >&5 | |
ba479fd2 | 3136 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
3137 | (exit $ac_status); } && { |
3138 | test -z "$ac_c_werror_flag" || | |
3139 | test ! -s conftest.err | |
3140 | } && test -s conftest.$ac_objext; then | |
3141 | ac_cv_prog_cc_g=yes | |
3142 | else | |
3143 | echo "$as_me: failed program was:" >&5 | |
3144 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3145 | ||
3146 | CFLAGS="" | |
3147 | cat >conftest.$ac_ext <<_ACEOF | |
3148 | /* confdefs.h. */ | |
3149 | _ACEOF | |
3150 | cat confdefs.h >>conftest.$ac_ext | |
3151 | cat >>conftest.$ac_ext <<_ACEOF | |
3152 | /* end confdefs.h. */ | |
3153 | ||
3154 | int | |
3155 | main () | |
3156 | { | |
3157 | ||
3158 | ; | |
3159 | return 0; | |
3160 | } | |
3161 | _ACEOF | |
3162 | rm -f conftest.$ac_objext | |
3163 | if { (ac_try="$ac_compile" | |
3164 | case "(($ac_try" in | |
3165 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3166 | *) ac_try_echo=$ac_try;; | |
3167 | esac | |
3168 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3169 | (eval "$ac_compile") 2>conftest.er1 | |
86da66b5 | 3170 | ac_status=$? |
a6ccdbab EC |
3171 | grep -v '^ *+' conftest.er1 >conftest.err |
3172 | rm -f conftest.er1 | |
3173 | cat conftest.err >&5 | |
86da66b5 | 3174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
3175 | (exit $ac_status); } && { |
3176 | test -z "$ac_c_werror_flag" || | |
3177 | test ! -s conftest.err | |
3178 | } && test -s conftest.$ac_objext; then | |
3179 | : | |
3180 | else | |
3181 | echo "$as_me: failed program was:" >&5 | |
3182 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3183 | ||
3184 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3185 | CFLAGS="-g" | |
3186 | cat >conftest.$ac_ext <<_ACEOF | |
3187 | /* confdefs.h. */ | |
3188 | _ACEOF | |
3189 | cat confdefs.h >>conftest.$ac_ext | |
3190 | cat >>conftest.$ac_ext <<_ACEOF | |
3191 | /* end confdefs.h. */ | |
3192 | ||
3193 | int | |
3194 | main () | |
3195 | { | |
3196 | ||
3197 | ; | |
3198 | return 0; | |
3199 | } | |
3200 | _ACEOF | |
3201 | rm -f conftest.$ac_objext | |
3202 | if { (ac_try="$ac_compile" | |
3203 | case "(($ac_try" in | |
3204 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3205 | *) ac_try_echo=$ac_try;; | |
3206 | esac | |
3207 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3208 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3209 | ac_status=$? |
a6ccdbab EC |
3210 | grep -v '^ *+' conftest.er1 >conftest.err |
3211 | rm -f conftest.er1 | |
3212 | cat conftest.err >&5 | |
ba479fd2 | 3213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
3214 | (exit $ac_status); } && { |
3215 | test -z "$ac_c_werror_flag" || | |
3216 | test ! -s conftest.err | |
3217 | } && test -s conftest.$ac_objext; then | |
6e3f3080 NN |
3218 | ac_cv_prog_cc_g=yes |
3219 | else | |
ba479fd2 NN |
3220 | echo "$as_me: failed program was:" >&5 |
3221 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 3222 | |
a6ccdbab EC |
3223 | |
3224 | fi | |
3225 | ||
3226 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3227 | fi | |
3228 | ||
3229 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
dd7f7a6e | 3230 | fi |
a6ccdbab EC |
3231 | |
3232 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3233 | ac_c_werror_flag=$ac_save_c_werror_flag | |
dd7f7a6e | 3234 | fi |
a6ccdbab EC |
3235 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 |
3236 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } | |
dd7f7a6e EC |
3237 | if test "$ac_test_CFLAGS" = set; then |
3238 | CFLAGS=$ac_save_CFLAGS | |
3239 | elif test $ac_cv_prog_cc_g = yes; then | |
3240 | if test "$GCC" = yes; then | |
3241 | CFLAGS="-g -O2" | |
3242 | else | |
3243 | CFLAGS="-g" | |
3244 | fi | |
3245 | else | |
3246 | if test "$GCC" = yes; then | |
3247 | CFLAGS="-O2" | |
3248 | else | |
3249 | CFLAGS= | |
3250 | fi | |
3251 | fi | |
a6ccdbab EC |
3252 | { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 |
3253 | echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } | |
3254 | if test "${ac_cv_prog_cc_c89+set}" = set; then | |
dd7f7a6e EC |
3255 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3256 | else | |
a6ccdbab | 3257 | ac_cv_prog_cc_c89=no |
dd7f7a6e EC |
3258 | ac_save_CC=$CC |
3259 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3260 | /* confdefs.h. */ |
3261 | _ACEOF | |
3262 | cat confdefs.h >>conftest.$ac_ext | |
3263 | cat >>conftest.$ac_ext <<_ACEOF | |
3264 | /* end confdefs.h. */ | |
dd7f7a6e EC |
3265 | #include <stdarg.h> |
3266 | #include <stdio.h> | |
3267 | #include <sys/types.h> | |
3268 | #include <sys/stat.h> | |
3269 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3270 | struct buf { int x; }; | |
3271 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3272 | static char *e (p, i) | |
3273 | char **p; | |
3274 | int i; | |
3275 | { | |
3276 | return p[i]; | |
3277 | } | |
3278 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3279 | { | |
3280 | char *s; | |
3281 | va_list v; | |
3282 | va_start (v,p); | |
3283 | s = g (p, va_arg (v,int)); | |
3284 | va_end (v); | |
3285 | return s; | |
3286 | } | |
86da66b5 | 3287 | |
dd7f7a6e EC |
3288 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has |
3289 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3290 | These don't provoke an error unfortunately, instead are silently treated | |
a6ccdbab | 3291 | as 'x'. The following induces an error, until -std is added to get |
dd7f7a6e EC |
3292 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3293 | array size at least. It's necessary to write '\x00'==0 to get something | |
a6ccdbab | 3294 | that's true only with -std. */ |
dd7f7a6e EC |
3295 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3296 | ||
a6ccdbab EC |
3297 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3298 | inside strings and character constants. */ | |
3299 | #define FOO(x) 'x' | |
3300 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3301 | ||
dd7f7a6e EC |
3302 | int test (int i, double x); |
3303 | struct s1 {int (*f) (int a);}; | |
3304 | struct s2 {int (*f) (double a);}; | |
3305 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3306 | int argc; | |
3307 | char **argv; | |
ba479fd2 NN |
3308 | int |
3309 | main () | |
3310 | { | |
dd7f7a6e | 3311 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
ba479fd2 NN |
3312 | ; |
3313 | return 0; | |
3314 | } | |
3315 | _ACEOF | |
a6ccdbab EC |
3316 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3317 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
dd7f7a6e EC |
3318 | do |
3319 | CC="$ac_save_CC $ac_arg" | |
3320 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
3321 | if { (ac_try="$ac_compile" |
3322 | case "(($ac_try" in | |
3323 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3324 | *) ac_try_echo=$ac_try;; | |
3325 | esac | |
3326 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3327 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3328 | ac_status=$? |
86da66b5 HPN |
3329 | grep -v '^ *+' conftest.er1 >conftest.err |
3330 | rm -f conftest.er1 | |
3331 | cat conftest.err >&5 | |
ba479fd2 | 3332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
3333 | (exit $ac_status); } && { |
3334 | test -z "$ac_c_werror_flag" || | |
3335 | test ! -s conftest.err | |
3336 | } && test -s conftest.$ac_objext; then | |
3337 | ac_cv_prog_cc_c89=$ac_arg | |
ba479fd2 NN |
3338 | else |
3339 | echo "$as_me: failed program was:" >&5 | |
3340 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 3341 | |
a6ccdbab | 3342 | |
dd7f7a6e | 3343 | fi |
a6ccdbab EC |
3344 | |
3345 | rm -f core conftest.err conftest.$ac_objext | |
3346 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
dd7f7a6e | 3347 | done |
a6ccdbab | 3348 | rm -f conftest.$ac_ext |
dd7f7a6e EC |
3349 | CC=$ac_save_CC |
3350 | ||
3351 | fi | |
a6ccdbab EC |
3352 | # AC_CACHE_VAL |
3353 | case "x$ac_cv_prog_cc_c89" in | |
3354 | x) | |
3355 | { echo "$as_me:$LINENO: result: none needed" >&5 | |
3356 | echo "${ECHO_T}none needed" >&6; } ;; | |
3357 | xno) | |
3358 | { echo "$as_me:$LINENO: result: unsupported" >&5 | |
3359 | echo "${ECHO_T}unsupported" >&6; } ;; | |
dd7f7a6e | 3360 | *) |
a6ccdbab EC |
3361 | CC="$CC $ac_cv_prog_cc_c89" |
3362 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 | |
3363 | echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; | |
dd7f7a6e EC |
3364 | esac |
3365 | ||
ba479fd2 | 3366 | |
ba479fd2 NN |
3367 | ac_ext=c |
3368 | ac_cpp='$CPP $CPPFLAGS' | |
3369 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3370 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3371 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3372 | ||
3373 | if test "x$CC" != xcc; then | |
a6ccdbab EC |
3374 | { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 |
3375 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } | |
ba479fd2 | 3376 | else |
a6ccdbab EC |
3377 | { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 |
3378 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } | |
ba479fd2 NN |
3379 | fi |
3380 | set dummy $CC; ac_cc=`echo $2 | | |
3381 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
a6ccdbab | 3382 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then |
ba479fd2 NN |
3383 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3384 | else | |
3385 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3386 | /* confdefs.h. */ |
3387 | _ACEOF | |
3388 | cat confdefs.h >>conftest.$ac_ext | |
3389 | cat >>conftest.$ac_ext <<_ACEOF | |
3390 | /* end confdefs.h. */ | |
3391 | ||
3392 | int | |
3393 | main () | |
3394 | { | |
3395 | ||
3396 | ; | |
3397 | return 0; | |
3398 | } | |
3399 | _ACEOF | |
3ec83fc2 RH |
3400 | # Make sure it works both with $CC and with simple cc. |
3401 | # We do the test twice because some compilers refuse to overwrite an | |
3402 | # existing .o file with -o, though they will create one. | |
a6ccdbab EC |
3403 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' |
3404 | rm -f conftest2.* | |
3405 | if { (case "(($ac_try" in | |
3406 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3407 | *) ac_try_echo=$ac_try;; | |
3408 | esac | |
3409 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3410 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3411 | ac_status=$? |
3412 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3413 | (exit $ac_status); } && | |
a6ccdbab EC |
3414 | test -f conftest2.$ac_objext && { (case "(($ac_try" in |
3415 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3416 | *) ac_try_echo=$ac_try;; | |
3417 | esac | |
3418 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3419 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3420 | ac_status=$? |
3421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3422 | (exit $ac_status); }; | |
3ec83fc2 RH |
3423 | then |
3424 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
3425 | if test "x$CC" != xcc; then | |
3426 | # Test first that cc exists at all. | |
ba479fd2 | 3427 | if { ac_try='cc -c conftest.$ac_ext >&5' |
a6ccdbab EC |
3428 | { (case "(($ac_try" in |
3429 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3430 | *) ac_try_echo=$ac_try;; | |
3431 | esac | |
3432 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3433 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3434 | ac_status=$? |
3435 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3436 | (exit $ac_status); }; }; then | |
a6ccdbab EC |
3437 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' |
3438 | rm -f conftest2.* | |
3439 | if { (case "(($ac_try" in | |
3440 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3441 | *) ac_try_echo=$ac_try;; | |
3442 | esac | |
3443 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3444 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3445 | ac_status=$? |
3446 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3447 | (exit $ac_status); } && | |
a6ccdbab EC |
3448 | test -f conftest2.$ac_objext && { (case "(($ac_try" in |
3449 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3450 | *) ac_try_echo=$ac_try;; | |
3451 | esac | |
3452 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3453 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3454 | ac_status=$? |
3455 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3456 | (exit $ac_status); }; | |
3ec83fc2 | 3457 | then |
86da66b5 HPN |
3458 | # cc works too. |
3459 | : | |
3ec83fc2 | 3460 | else |
86da66b5 HPN |
3461 | # cc exists but doesn't like -o. |
3462 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
3463 | fi |
3464 | fi | |
3465 | fi | |
3466 | else | |
3467 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3468 | fi | |
a6ccdbab | 3469 | rm -f core conftest* |
3ec83fc2 RH |
3470 | |
3471 | fi | |
a6ccdbab EC |
3472 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then |
3473 | { echo "$as_me:$LINENO: result: yes" >&5 | |
3474 | echo "${ECHO_T}yes" >&6; } | |
3ec83fc2 | 3475 | else |
a6ccdbab EC |
3476 | { echo "$as_me:$LINENO: result: no" >&5 |
3477 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
3478 | |
3479 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 3480 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 3481 | _ACEOF |
3ec83fc2 RH |
3482 | |
3483 | fi | |
3484 | ||
3b620440 KC |
3485 | # expand $ac_aux_dir to an absolute path |
3486 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
3487 | ||
3488 | # FIXME: we rely on the cache variable name because | |
3489 | # there is no other way. | |
3490 | set dummy $CC | |
3491 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
3492 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
3493 | # Losing compiler, so override with the script. | |
3494 | # FIXME: It is wrong to rewrite CC. | |
3495 | # But if we don't then we get into trouble of one sort or another. | |
3496 | # A longer-term fix would be to have automake use am__CC in this case, | |
3497 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
3498 | CC="$am_aux_dir/compile $CC" | |
3499 | fi | |
3500 | ||
414d23ae HPN |
3501 | # autoconf is lame and doesn't give us any substitution variable for this. |
3502 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
3503 | NO_MINUS_C_MINUS_O=yes | |
3504 | else | |
3505 | OUTPUT_OPTION='-o $@' | |
3506 | fi | |
3507 | ||
3508 | ||
3509 | ||
ec6c7392 PB |
3510 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer |
3511 | # optimizations to be activated explicitly by the toplevel. | |
3512 | case "$CC" in | |
3513 | */prev-gcc/xgcc*) ;; | |
3514 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
3515 | esac | |
3516 | ||
3517 | ||
73458fb7 NN |
3518 | # ------------------------- |
3519 | # Check C compiler features | |
3520 | # ------------------------- | |
3521 | ||
ba479fd2 NN |
3522 | ac_ext=c |
3523 | ac_cpp='$CPP $CPPFLAGS' | |
3524 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3525 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3526 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
a6ccdbab EC |
3527 | { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 |
3528 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } | |
84c041a1 ZW |
3529 | # On Suns, sometimes $CPP names a directory. |
3530 | if test -n "$CPP" && test -d "$CPP"; then | |
3531 | CPP= | |
3532 | fi | |
3533 | if test -z "$CPP"; then | |
ba479fd2 NN |
3534 | if test "${ac_cv_prog_CPP+set}" = set; then |
3535 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3536 | else | |
3537 | # Double quotes because CPP needs to be expanded | |
3538 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3539 | do | |
3540 | ac_preproc_ok=false | |
3541 | for ac_c_preproc_warn_flag in '' yes | |
3542 | do | |
3543 | # Use a header file that comes with gcc, so configuring glibc | |
3544 | # with a fresh cross-compiler works. | |
3545 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3546 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 3547 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
3548 | # not just through cpp. "Syntax error" is here to catch this case. |
3549 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3550 | /* confdefs.h. */ |
3551 | _ACEOF | |
3552 | cat confdefs.h >>conftest.$ac_ext | |
3553 | cat >>conftest.$ac_ext <<_ACEOF | |
3554 | /* end confdefs.h. */ | |
3555 | #ifdef __STDC__ | |
3556 | # include <limits.h> | |
3557 | #else | |
3558 | # include <assert.h> | |
3559 | #endif | |
86da66b5 | 3560 | Syntax error |
ba479fd2 | 3561 | _ACEOF |
a6ccdbab EC |
3562 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3563 | case "(($ac_try" in | |
3564 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3565 | *) ac_try_echo=$ac_try;; | |
3566 | esac | |
3567 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3568 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3569 | ac_status=$? |
3570 | grep -v '^ *+' conftest.er1 >conftest.err | |
3571 | rm -f conftest.er1 | |
3572 | cat conftest.err >&5 | |
3573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
3574 | (exit $ac_status); } >/dev/null && { |
3575 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3576 | test ! -s conftest.err | |
3577 | }; then | |
093e61a6 | 3578 | : |
cafe096b | 3579 | else |
ba479fd2 NN |
3580 | echo "$as_me: failed program was:" >&5 |
3581 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3582 | ||
3583 | # Broken: fails on valid input. | |
3584 | continue | |
3585 | fi | |
a6ccdbab | 3586 | |
ba479fd2 NN |
3587 | rm -f conftest.err conftest.$ac_ext |
3588 | ||
a6ccdbab | 3589 | # OK, works on sane cases. Now check whether nonexistent headers |
ba479fd2 NN |
3590 | # can be detected and how. |
3591 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3592 | /* confdefs.h. */ |
3593 | _ACEOF | |
3594 | cat confdefs.h >>conftest.$ac_ext | |
3595 | cat >>conftest.$ac_ext <<_ACEOF | |
3596 | /* end confdefs.h. */ | |
3597 | #include <ac_nonexistent.h> | |
3598 | _ACEOF | |
a6ccdbab EC |
3599 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3600 | case "(($ac_try" in | |
3601 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3602 | *) ac_try_echo=$ac_try;; | |
3603 | esac | |
3604 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3605 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3606 | ac_status=$? |
3607 | grep -v '^ *+' conftest.er1 >conftest.err | |
3608 | rm -f conftest.er1 | |
3609 | cat conftest.err >&5 | |
3610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
3611 | (exit $ac_status); } >/dev/null && { |
3612 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3613 | test ! -s conftest.err | |
3614 | }; then | |
ba479fd2 NN |
3615 | # Broken: success on invalid input. |
3616 | continue | |
3617 | else | |
3618 | echo "$as_me: failed program was:" >&5 | |
3619 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3620 | ||
3621 | # Passes both tests. | |
3622 | ac_preproc_ok=: | |
3623 | break | |
3624 | fi | |
a6ccdbab | 3625 | |
ba479fd2 NN |
3626 | rm -f conftest.err conftest.$ac_ext |
3627 | ||
3628 | done | |
3629 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3630 | rm -f conftest.err conftest.$ac_ext | |
3631 | if $ac_preproc_ok; then | |
3632 | break | |
3633 | fi | |
3634 | ||
3635 | done | |
3636 | ac_cv_prog_CPP=$CPP | |
3637 | ||
3638 | fi | |
3639 | CPP=$ac_cv_prog_CPP | |
3640 | else | |
3641 | ac_cv_prog_CPP=$CPP | |
3642 | fi | |
a6ccdbab EC |
3643 | { echo "$as_me:$LINENO: result: $CPP" >&5 |
3644 | echo "${ECHO_T}$CPP" >&6; } | |
ba479fd2 NN |
3645 | ac_preproc_ok=false |
3646 | for ac_c_preproc_warn_flag in '' yes | |
3647 | do | |
3648 | # Use a header file that comes with gcc, so configuring glibc | |
3649 | # with a fresh cross-compiler works. | |
3650 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3651 | # <limits.h> exists even on freestanding compilers. | |
3652 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3653 | # not just through cpp. "Syntax error" is here to catch this case. | |
3654 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3655 | /* confdefs.h. */ |
3656 | _ACEOF | |
3657 | cat confdefs.h >>conftest.$ac_ext | |
3658 | cat >>conftest.$ac_ext <<_ACEOF | |
3659 | /* end confdefs.h. */ | |
3660 | #ifdef __STDC__ | |
3661 | # include <limits.h> | |
3662 | #else | |
3663 | # include <assert.h> | |
3664 | #endif | |
86da66b5 | 3665 | Syntax error |
ba479fd2 | 3666 | _ACEOF |
a6ccdbab EC |
3667 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3668 | case "(($ac_try" in | |
3669 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3670 | *) ac_try_echo=$ac_try;; | |
3671 | esac | |
3672 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3673 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3674 | ac_status=$? |
3675 | grep -v '^ *+' conftest.er1 >conftest.err | |
3676 | rm -f conftest.er1 | |
3677 | cat conftest.err >&5 | |
3678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
3679 | (exit $ac_status); } >/dev/null && { |
3680 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3681 | test ! -s conftest.err | |
3682 | }; then | |
6e3f3080 | 3683 | : |
414d23ae | 3684 | else |
ba479fd2 NN |
3685 | echo "$as_me: failed program was:" >&5 |
3686 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3687 | ||
3688 | # Broken: fails on valid input. | |
3689 | continue | |
3690 | fi | |
a6ccdbab | 3691 | |
ba479fd2 NN |
3692 | rm -f conftest.err conftest.$ac_ext |
3693 | ||
a6ccdbab | 3694 | # OK, works on sane cases. Now check whether nonexistent headers |
ba479fd2 NN |
3695 | # can be detected and how. |
3696 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3697 | /* confdefs.h. */ |
3698 | _ACEOF | |
3699 | cat confdefs.h >>conftest.$ac_ext | |
3700 | cat >>conftest.$ac_ext <<_ACEOF | |
3701 | /* end confdefs.h. */ | |
3702 | #include <ac_nonexistent.h> | |
3703 | _ACEOF | |
a6ccdbab EC |
3704 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3705 | case "(($ac_try" in | |
3706 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3707 | *) ac_try_echo=$ac_try;; | |
3708 | esac | |
3709 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3710 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3711 | ac_status=$? |
3712 | grep -v '^ *+' conftest.er1 >conftest.err | |
3713 | rm -f conftest.er1 | |
3714 | cat conftest.err >&5 | |
3715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
3716 | (exit $ac_status); } >/dev/null && { |
3717 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3718 | test ! -s conftest.err | |
3719 | }; then | |
ba479fd2 NN |
3720 | # Broken: success on invalid input. |
3721 | continue | |
3722 | else | |
3723 | echo "$as_me: failed program was:" >&5 | |
3724 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3725 | ||
3726 | # Passes both tests. | |
3727 | ac_preproc_ok=: | |
3728 | break | |
63cf211a | 3729 | fi |
a6ccdbab | 3730 | |
ba479fd2 NN |
3731 | rm -f conftest.err conftest.$ac_ext |
3732 | ||
3733 | done | |
3734 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3735 | rm -f conftest.err conftest.$ac_ext | |
3736 | if $ac_preproc_ok; then | |
3737 | : | |
6e3f3080 | 3738 | else |
ba479fd2 NN |
3739 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3740 | See \`config.log' for more details." >&5 | |
3741 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3742 | See \`config.log' for more details." >&2;} | |
3743 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3744 | fi |
3745 | ||
ba479fd2 NN |
3746 | ac_ext=c |
3747 | ac_cpp='$CPP $CPPFLAGS' | |
3748 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3749 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3750 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3751 | ||
b5472e1d | 3752 | |
a6ccdbab EC |
3753 | { echo "$as_me:$LINENO: checking for inline" >&5 |
3754 | echo $ECHO_N "checking for inline... $ECHO_C" >&6; } | |
ba479fd2 NN |
3755 | if test "${ac_cv_c_inline+set}" = set; then |
3756 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3757 | else |
3758 | ac_cv_c_inline=no | |
3759 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3760 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3761 | /* confdefs.h. */ |
3762 | _ACEOF | |
3763 | cat confdefs.h >>conftest.$ac_ext | |
3764 | cat >>conftest.$ac_ext <<_ACEOF | |
3765 | /* end confdefs.h. */ | |
3766 | #ifndef __cplusplus | |
3767 | typedef int foo_t; | |
3768 | static $ac_kw foo_t static_foo () {return 0; } | |
3769 | $ac_kw foo_t foo () {return 0; } | |
3770 | #endif | |
414d23ae | 3771 | |
ba479fd2 NN |
3772 | _ACEOF |
3773 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
3774 | if { (ac_try="$ac_compile" |
3775 | case "(($ac_try" in | |
3776 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3777 | *) ac_try_echo=$ac_try;; | |
3778 | esac | |
3779 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3780 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3781 | ac_status=$? |
86da66b5 HPN |
3782 | grep -v '^ *+' conftest.er1 >conftest.err |
3783 | rm -f conftest.er1 | |
3784 | cat conftest.err >&5 | |
ba479fd2 | 3785 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
3786 | (exit $ac_status); } && { |
3787 | test -z "$ac_c_werror_flag" || | |
3788 | test ! -s conftest.err | |
3789 | } && test -s conftest.$ac_objext; then | |
3790 | ac_cv_c_inline=$ac_kw | |
414d23ae | 3791 | else |
ba479fd2 NN |
3792 | echo "$as_me: failed program was:" >&5 |
3793 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3794 | ||
a6ccdbab | 3795 | |
414d23ae | 3796 | fi |
a6ccdbab EC |
3797 | |
3798 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3799 | test "$ac_cv_c_inline" != no && break | |
414d23ae HPN |
3800 | done |
3801 | ||
3802 | fi | |
a6ccdbab EC |
3803 | { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3804 | echo "${ECHO_T}$ac_cv_c_inline" >&6; } | |
86da66b5 HPN |
3805 | |
3806 | ||
ba479fd2 | 3807 | case $ac_cv_c_inline in |
414d23ae | 3808 | inline | yes) ;; |
86da66b5 HPN |
3809 | *) |
3810 | case $ac_cv_c_inline in | |
3811 | no) ac_val=;; | |
3812 | *) ac_val=$ac_cv_c_inline;; | |
3813 | esac | |
3814 | cat >>confdefs.h <<_ACEOF | |
3815 | #ifndef __cplusplus | |
3816 | #define inline $ac_val | |
3817 | #endif | |
ba479fd2 | 3818 | _ACEOF |
86da66b5 | 3819 | ;; |
414d23ae HPN |
3820 | esac |
3821 | ||
414d23ae | 3822 | |
414d23ae | 3823 | # sizeof(char) is 1 by definition. |
bf3b7cd3 | 3824 | |
a6ccdbab EC |
3825 | { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 |
3826 | echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } | |
3827 | if test "${ac_cv_path_GREP+set}" = set; then | |
3828 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3829 | else | |
3830 | # Extract the first word of "grep ggrep" to use in msg output | |
3831 | if test -z "$GREP"; then | |
3832 | set dummy grep ggrep; ac_prog_name=$2 | |
3833 | if test "${ac_cv_path_GREP+set}" = set; then | |
3834 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3835 | else | |
3836 | ac_path_GREP_found=false | |
3837 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3838 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3839 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3840 | do | |
3841 | IFS=$as_save_IFS | |
3842 | test -z "$as_dir" && as_dir=. | |
3843 | for ac_prog in grep ggrep; do | |
3844 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3845 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3846 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3847 | # Check for GNU ac_path_GREP and select it if it is found. | |
3848 | # Check for GNU $ac_path_GREP | |
3849 | case `"$ac_path_GREP" --version 2>&1` in | |
3850 | *GNU*) | |
3851 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3852 | *) | |
3853 | ac_count=0 | |
3854 | echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" | |
3855 | while : | |
3856 | do | |
3857 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3858 | mv "conftest.tmp" "conftest.in" | |
3859 | cp "conftest.in" "conftest.nl" | |
3860 | echo 'GREP' >> "conftest.nl" | |
3861 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3862 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3863 | ac_count=`expr $ac_count + 1` | |
3864 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3865 | # Best one so far, save it but keep looking for a better one | |
3866 | ac_cv_path_GREP="$ac_path_GREP" | |
3867 | ac_path_GREP_max=$ac_count | |
3868 | fi | |
3869 | # 10*(2^10) chars as input seems more than enough | |
3870 | test $ac_count -gt 10 && break | |
3871 | done | |
3872 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3873 | esac | |
3874 | ||
3875 | ||
3876 | $ac_path_GREP_found && break 3 | |
3877 | done | |
3878 | done | |
3879 | ||
3880 | done | |
3881 | IFS=$as_save_IFS | |
3882 | ||
3883 | ||
3884 | fi | |
3885 | ||
3886 | GREP="$ac_cv_path_GREP" | |
3887 | if test -z "$GREP"; then | |
3888 | { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 | |
3889 | echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} | |
3890 | { (exit 1); exit 1; }; } | |
3891 | fi | |
3892 | ||
3893 | else | |
3894 | ac_cv_path_GREP=$GREP | |
3895 | fi | |
3896 | ||
3897 | ||
3898 | fi | |
3899 | { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 | |
3900 | echo "${ECHO_T}$ac_cv_path_GREP" >&6; } | |
3901 | GREP="$ac_cv_path_GREP" | |
3902 | ||
3903 | ||
3904 | { echo "$as_me:$LINENO: checking for egrep" >&5 | |
3905 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } | |
3906 | if test "${ac_cv_path_EGREP+set}" = set; then | |
3907 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3908 | else | |
3909 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
3910 | then ac_cv_path_EGREP="$GREP -E" | |
3911 | else | |
3912 | # Extract the first word of "egrep" to use in msg output | |
3913 | if test -z "$EGREP"; then | |
3914 | set dummy egrep; ac_prog_name=$2 | |
3915 | if test "${ac_cv_path_EGREP+set}" = set; then | |
b8ec3cc8 EC |
3916 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3917 | else | |
a6ccdbab EC |
3918 | ac_path_EGREP_found=false |
3919 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3920 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3921 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3922 | do | |
3923 | IFS=$as_save_IFS | |
3924 | test -z "$as_dir" && as_dir=. | |
3925 | for ac_prog in egrep; do | |
3926 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3927 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3928 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3929 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3930 | # Check for GNU $ac_path_EGREP | |
3931 | case `"$ac_path_EGREP" --version 2>&1` in | |
3932 | *GNU*) | |
3933 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3934 | *) | |
3935 | ac_count=0 | |
3936 | echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" | |
3937 | while : | |
3938 | do | |
3939 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3940 | mv "conftest.tmp" "conftest.in" | |
3941 | cp "conftest.in" "conftest.nl" | |
3942 | echo 'EGREP' >> "conftest.nl" | |
3943 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3944 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3945 | ac_count=`expr $ac_count + 1` | |
3946 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3947 | # Best one so far, save it but keep looking for a better one | |
3948 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3949 | ac_path_EGREP_max=$ac_count | |
bf3b7cd3 | 3950 | fi |
a6ccdbab EC |
3951 | # 10*(2^10) chars as input seems more than enough |
3952 | test $ac_count -gt 10 && break | |
3953 | done | |
3954 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3955 | esac | |
3956 | ||
3957 | ||
3958 | $ac_path_EGREP_found && break 3 | |
3959 | done | |
3960 | done | |
3961 | ||
3962 | done | |
3963 | IFS=$as_save_IFS | |
3964 | ||
3965 | ||
3966 | fi | |
3967 | ||
3968 | EGREP="$ac_cv_path_EGREP" | |
3969 | if test -z "$EGREP"; then | |
3970 | { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 | |
3971 | echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} | |
3972 | { (exit 1); exit 1; }; } | |
3973 | fi | |
3974 | ||
3975 | else | |
3976 | ac_cv_path_EGREP=$EGREP | |
3977 | fi | |
3978 | ||
3979 | ||
3980 | fi | |
bf3b7cd3 | 3981 | fi |
a6ccdbab EC |
3982 | { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 |
3983 | echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } | |
3984 | EGREP="$ac_cv_path_EGREP" | |
bf3b7cd3 JD |
3985 | |
3986 | ||
a6ccdbab EC |
3987 | { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
3988 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
3989 | if test "${ac_cv_header_stdc+set}" = set; then |
3990 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3991 | else | |
3992 | cat >conftest.$ac_ext <<_ACEOF | |
3993 | /* confdefs.h. */ | |
3994 | _ACEOF | |
3995 | cat confdefs.h >>conftest.$ac_ext | |
3996 | cat >>conftest.$ac_ext <<_ACEOF | |
3997 | /* end confdefs.h. */ | |
3998 | #include <stdlib.h> | |
3999 | #include <stdarg.h> | |
4000 | #include <string.h> | |
4001 | #include <float.h> | |
4002 | ||
4003 | int | |
4004 | main () | |
4005 | { | |
4006 | ||
4007 | ; | |
4008 | return 0; | |
4009 | } | |
4010 | _ACEOF | |
4011 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4012 | if { (ac_try="$ac_compile" |
4013 | case "(($ac_try" in | |
4014 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4015 | *) ac_try_echo=$ac_try;; | |
4016 | esac | |
4017 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4018 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4019 | ac_status=$? |
4020 | grep -v '^ *+' conftest.er1 >conftest.err | |
4021 | rm -f conftest.er1 | |
4022 | cat conftest.err >&5 | |
4023 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4024 | (exit $ac_status); } && { |
4025 | test -z "$ac_c_werror_flag" || | |
4026 | test ! -s conftest.err | |
4027 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4028 | ac_cv_header_stdc=yes |
4029 | else | |
4030 | echo "$as_me: failed program was:" >&5 | |
4031 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4032 | ||
a6ccdbab | 4033 | ac_cv_header_stdc=no |
bf3b7cd3 | 4034 | fi |
a6ccdbab EC |
4035 | |
4036 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4037 | |
4038 | if test $ac_cv_header_stdc = yes; then | |
4039 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4040 | cat >conftest.$ac_ext <<_ACEOF | |
4041 | /* confdefs.h. */ | |
4042 | _ACEOF | |
4043 | cat confdefs.h >>conftest.$ac_ext | |
4044 | cat >>conftest.$ac_ext <<_ACEOF | |
4045 | /* end confdefs.h. */ | |
4046 | #include <string.h> | |
4047 | ||
4048 | _ACEOF | |
4049 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4050 | $EGREP "memchr" >/dev/null 2>&1; then | |
4051 | : | |
4052 | else | |
4053 | ac_cv_header_stdc=no | |
4054 | fi | |
4055 | rm -f conftest* | |
4056 | ||
4057 | fi | |
4058 | ||
4059 | if test $ac_cv_header_stdc = yes; then | |
4060 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4061 | cat >conftest.$ac_ext <<_ACEOF | |
4062 | /* confdefs.h. */ | |
4063 | _ACEOF | |
4064 | cat confdefs.h >>conftest.$ac_ext | |
4065 | cat >>conftest.$ac_ext <<_ACEOF | |
4066 | /* end confdefs.h. */ | |
4067 | #include <stdlib.h> | |
4068 | ||
4069 | _ACEOF | |
4070 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4071 | $EGREP "free" >/dev/null 2>&1; then | |
4072 | : | |
4073 | else | |
4074 | ac_cv_header_stdc=no | |
4075 | fi | |
4076 | rm -f conftest* | |
4077 | ||
4078 | fi | |
4079 | ||
4080 | if test $ac_cv_header_stdc = yes; then | |
4081 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4082 | if test "$cross_compiling" = yes; then | |
4083 | : | |
4084 | else | |
4085 | cat >conftest.$ac_ext <<_ACEOF | |
4086 | /* confdefs.h. */ | |
4087 | _ACEOF | |
4088 | cat confdefs.h >>conftest.$ac_ext | |
4089 | cat >>conftest.$ac_ext <<_ACEOF | |
4090 | /* end confdefs.h. */ | |
4091 | #include <ctype.h> | |
a6ccdbab | 4092 | #include <stdlib.h> |
bf3b7cd3 JD |
4093 | #if ((' ' & 0x0FF) == 0x020) |
4094 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4095 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4096 | #else | |
4097 | # define ISLOWER(c) \ | |
4098 | (('a' <= (c) && (c) <= 'i') \ | |
4099 | || ('j' <= (c) && (c) <= 'r') \ | |
4100 | || ('s' <= (c) && (c) <= 'z')) | |
4101 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4102 | #endif | |
4103 | ||
4104 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4105 | int | |
4106 | main () | |
4107 | { | |
4108 | int i; | |
4109 | for (i = 0; i < 256; i++) | |
4110 | if (XOR (islower (i), ISLOWER (i)) | |
4111 | || toupper (i) != TOUPPER (i)) | |
a6ccdbab EC |
4112 | return 2; |
4113 | return 0; | |
bf3b7cd3 JD |
4114 | } |
4115 | _ACEOF | |
4116 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
4117 | if { (ac_try="$ac_link" |
4118 | case "(($ac_try" in | |
4119 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4120 | *) ac_try_echo=$ac_try;; | |
4121 | esac | |
4122 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4123 | (eval "$ac_link") 2>&5 | |
bf3b7cd3 JD |
4124 | ac_status=$? |
4125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4126 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
4127 | { (case "(($ac_try" in |
4128 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4129 | *) ac_try_echo=$ac_try;; | |
4130 | esac | |
4131 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4132 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
4133 | ac_status=$? |
4134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4135 | (exit $ac_status); }; }; then | |
4136 | : | |
4137 | else | |
4138 | echo "$as_me: program exited with status $ac_status" >&5 | |
4139 | echo "$as_me: failed program was:" >&5 | |
4140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4141 | ||
4142 | ( exit $ac_status ) | |
4143 | ac_cv_header_stdc=no | |
4144 | fi | |
a6ccdbab | 4145 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4146 | fi |
a6ccdbab EC |
4147 | |
4148 | ||
bf3b7cd3 JD |
4149 | fi |
4150 | fi | |
a6ccdbab EC |
4151 | { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
4152 | echo "${ECHO_T}$ac_cv_header_stdc" >&6; } | |
bf3b7cd3 JD |
4153 | if test $ac_cv_header_stdc = yes; then |
4154 | ||
4155 | cat >>confdefs.h <<\_ACEOF | |
4156 | #define STDC_HEADERS 1 | |
4157 | _ACEOF | |
4158 | ||
4159 | fi | |
4160 | ||
4161 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
4162 | ||
4163 | ||
4164 | ||
4165 | ||
4166 | ||
4167 | ||
4168 | ||
4169 | ||
4170 | ||
4171 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4172 | inttypes.h stdint.h unistd.h | |
4173 | do | |
4174 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
a6ccdbab EC |
4175 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
4176 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } | |
4177 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then | |
bf3b7cd3 JD |
4178 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
4179 | else | |
4180 | cat >conftest.$ac_ext <<_ACEOF | |
4181 | /* confdefs.h. */ | |
4182 | _ACEOF | |
4183 | cat confdefs.h >>conftest.$ac_ext | |
4184 | cat >>conftest.$ac_ext <<_ACEOF | |
4185 | /* end confdefs.h. */ | |
4186 | $ac_includes_default | |
4187 | ||
4188 | #include <$ac_header> | |
4189 | _ACEOF | |
4190 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4191 | if { (ac_try="$ac_compile" |
4192 | case "(($ac_try" in | |
4193 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4194 | *) ac_try_echo=$ac_try;; | |
4195 | esac | |
4196 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4197 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4198 | ac_status=$? |
4199 | grep -v '^ *+' conftest.er1 >conftest.err | |
4200 | rm -f conftest.er1 | |
4201 | cat conftest.err >&5 | |
4202 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4203 | (exit $ac_status); } && { |
4204 | test -z "$ac_c_werror_flag" || | |
4205 | test ! -s conftest.err | |
4206 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4207 | eval "$as_ac_Header=yes" |
4208 | else | |
4209 | echo "$as_me: failed program was:" >&5 | |
4210 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4211 | ||
a6ccdbab | 4212 | eval "$as_ac_Header=no" |
bf3b7cd3 | 4213 | fi |
a6ccdbab EC |
4214 | |
4215 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4216 | fi |
a6ccdbab EC |
4217 | ac_res=`eval echo '${'$as_ac_Header'}'` |
4218 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
4219 | echo "${ECHO_T}$ac_res" >&6; } | |
bf3b7cd3 JD |
4220 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
4221 | cat >>confdefs.h <<_ACEOF | |
4222 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4223 | _ACEOF | |
4224 | ||
4225 | fi | |
4226 | ||
4227 | done | |
4228 | ||
4229 | ||
a6ccdbab EC |
4230 | { echo "$as_me:$LINENO: checking for void *" >&5 |
4231 | echo $ECHO_N "checking for void *... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
4232 | if test "${ac_cv_type_void_p+set}" = set; then |
4233 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4234 | else | |
4235 | cat >conftest.$ac_ext <<_ACEOF | |
4236 | /* confdefs.h. */ | |
4237 | _ACEOF | |
4238 | cat confdefs.h >>conftest.$ac_ext | |
4239 | cat >>conftest.$ac_ext <<_ACEOF | |
4240 | /* end confdefs.h. */ | |
4241 | $ac_includes_default | |
a6ccdbab | 4242 | typedef void * ac__type_new_; |
bf3b7cd3 JD |
4243 | int |
4244 | main () | |
4245 | { | |
a6ccdbab | 4246 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 4247 | return 0; |
a6ccdbab | 4248 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
4249 | return 0; |
4250 | ; | |
4251 | return 0; | |
4252 | } | |
4253 | _ACEOF | |
4254 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4255 | if { (ac_try="$ac_compile" |
4256 | case "(($ac_try" in | |
4257 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4258 | *) ac_try_echo=$ac_try;; | |
4259 | esac | |
4260 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4261 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4262 | ac_status=$? |
4263 | grep -v '^ *+' conftest.er1 >conftest.err | |
4264 | rm -f conftest.er1 | |
4265 | cat conftest.err >&5 | |
4266 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4267 | (exit $ac_status); } && { |
4268 | test -z "$ac_c_werror_flag" || | |
4269 | test ! -s conftest.err | |
4270 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4271 | ac_cv_type_void_p=yes |
4272 | else | |
4273 | echo "$as_me: failed program was:" >&5 | |
4274 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4275 | ||
a6ccdbab | 4276 | ac_cv_type_void_p=no |
bf3b7cd3 | 4277 | fi |
a6ccdbab EC |
4278 | |
4279 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4280 | fi |
a6ccdbab EC |
4281 | { echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 |
4282 | echo "${ECHO_T}$ac_cv_type_void_p" >&6; } | |
bf3b7cd3 | 4283 | |
a6ccdbab EC |
4284 | # The cast to long int works around a bug in the HP C Compiler |
4285 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4286 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4287 | # This bug is HP SR number 8606223364. | |
4288 | { echo "$as_me:$LINENO: checking size of void *" >&5 | |
4289 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } | |
ba479fd2 NN |
4290 | if test "${ac_cv_sizeof_void_p+set}" = set; then |
4291 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 4292 | else |
bf3b7cd3 JD |
4293 | if test "$cross_compiling" = yes; then |
4294 | # Depending upon the size, compute the lo and hi bounds. | |
4295 | cat >conftest.$ac_ext <<_ACEOF | |
4296 | /* confdefs.h. */ | |
4297 | _ACEOF | |
4298 | cat confdefs.h >>conftest.$ac_ext | |
4299 | cat >>conftest.$ac_ext <<_ACEOF | |
4300 | /* end confdefs.h. */ | |
4301 | $ac_includes_default | |
a6ccdbab | 4302 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4303 | int |
4304 | main () | |
4305 | { | |
a6ccdbab | 4306 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
4307 | test_array [0] = 0 |
4308 | ||
4309 | ; | |
4310 | return 0; | |
4311 | } | |
4312 | _ACEOF | |
4313 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4314 | if { (ac_try="$ac_compile" |
4315 | case "(($ac_try" in | |
4316 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4317 | *) ac_try_echo=$ac_try;; | |
4318 | esac | |
4319 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4320 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4321 | ac_status=$? |
4322 | grep -v '^ *+' conftest.er1 >conftest.err | |
4323 | rm -f conftest.er1 | |
4324 | cat conftest.err >&5 | |
4325 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4326 | (exit $ac_status); } && { |
4327 | test -z "$ac_c_werror_flag" || | |
4328 | test ! -s conftest.err | |
4329 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4330 | ac_lo=0 ac_mid=0 |
4331 | while :; do | |
4332 | cat >conftest.$ac_ext <<_ACEOF | |
4333 | /* confdefs.h. */ | |
4334 | _ACEOF | |
4335 | cat confdefs.h >>conftest.$ac_ext | |
4336 | cat >>conftest.$ac_ext <<_ACEOF | |
4337 | /* end confdefs.h. */ | |
4338 | $ac_includes_default | |
a6ccdbab | 4339 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4340 | int |
4341 | main () | |
4342 | { | |
a6ccdbab | 4343 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4344 | test_array [0] = 0 |
4345 | ||
4346 | ; | |
4347 | return 0; | |
4348 | } | |
4349 | _ACEOF | |
4350 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4351 | if { (ac_try="$ac_compile" |
4352 | case "(($ac_try" in | |
4353 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4354 | *) ac_try_echo=$ac_try;; | |
4355 | esac | |
4356 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4357 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4358 | ac_status=$? |
4359 | grep -v '^ *+' conftest.er1 >conftest.err | |
4360 | rm -f conftest.er1 | |
4361 | cat conftest.err >&5 | |
4362 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4363 | (exit $ac_status); } && { |
4364 | test -z "$ac_c_werror_flag" || | |
4365 | test ! -s conftest.err | |
4366 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4367 | ac_hi=$ac_mid; break |
4368 | else | |
4369 | echo "$as_me: failed program was:" >&5 | |
4370 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4371 | ||
a6ccdbab EC |
4372 | ac_lo=`expr $ac_mid + 1` |
4373 | if test $ac_lo -le $ac_mid; then | |
4374 | ac_lo= ac_hi= | |
4375 | break | |
4376 | fi | |
4377 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 4378 | fi |
a6ccdbab EC |
4379 | |
4380 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4381 | done |
4382 | else | |
4383 | echo "$as_me: failed program was:" >&5 | |
4384 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4385 | ||
a6ccdbab | 4386 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
4387 | /* confdefs.h. */ |
4388 | _ACEOF | |
4389 | cat confdefs.h >>conftest.$ac_ext | |
4390 | cat >>conftest.$ac_ext <<_ACEOF | |
4391 | /* end confdefs.h. */ | |
4392 | $ac_includes_default | |
a6ccdbab | 4393 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4394 | int |
4395 | main () | |
4396 | { | |
a6ccdbab | 4397 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
4398 | test_array [0] = 0 |
4399 | ||
4400 | ; | |
4401 | return 0; | |
4402 | } | |
4403 | _ACEOF | |
4404 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4405 | if { (ac_try="$ac_compile" |
4406 | case "(($ac_try" in | |
4407 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4408 | *) ac_try_echo=$ac_try;; | |
4409 | esac | |
4410 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4411 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4412 | ac_status=$? |
4413 | grep -v '^ *+' conftest.er1 >conftest.err | |
4414 | rm -f conftest.er1 | |
4415 | cat conftest.err >&5 | |
4416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4417 | (exit $ac_status); } && { |
4418 | test -z "$ac_c_werror_flag" || | |
4419 | test ! -s conftest.err | |
4420 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4421 | ac_hi=-1 ac_mid=-1 |
4422 | while :; do | |
4423 | cat >conftest.$ac_ext <<_ACEOF | |
4424 | /* confdefs.h. */ | |
4425 | _ACEOF | |
4426 | cat confdefs.h >>conftest.$ac_ext | |
4427 | cat >>conftest.$ac_ext <<_ACEOF | |
4428 | /* end confdefs.h. */ | |
4429 | $ac_includes_default | |
a6ccdbab | 4430 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4431 | int |
4432 | main () | |
4433 | { | |
a6ccdbab | 4434 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
4435 | test_array [0] = 0 |
4436 | ||
4437 | ; | |
4438 | return 0; | |
4439 | } | |
4440 | _ACEOF | |
4441 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4442 | if { (ac_try="$ac_compile" |
4443 | case "(($ac_try" in | |
4444 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4445 | *) ac_try_echo=$ac_try;; | |
4446 | esac | |
4447 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4448 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4449 | ac_status=$? |
4450 | grep -v '^ *+' conftest.er1 >conftest.err | |
4451 | rm -f conftest.er1 | |
4452 | cat conftest.err >&5 | |
4453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4454 | (exit $ac_status); } && { |
4455 | test -z "$ac_c_werror_flag" || | |
4456 | test ! -s conftest.err | |
4457 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4458 | ac_lo=$ac_mid; break |
4459 | else | |
4460 | echo "$as_me: failed program was:" >&5 | |
4461 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4462 | ||
a6ccdbab EC |
4463 | ac_hi=`expr '(' $ac_mid ')' - 1` |
4464 | if test $ac_mid -le $ac_hi; then | |
4465 | ac_lo= ac_hi= | |
4466 | break | |
4467 | fi | |
4468 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 4469 | fi |
a6ccdbab EC |
4470 | |
4471 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4472 | done |
4473 | else | |
4474 | echo "$as_me: failed program was:" >&5 | |
4475 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4476 | ||
a6ccdbab | 4477 | ac_lo= ac_hi= |
bf3b7cd3 | 4478 | fi |
a6ccdbab EC |
4479 | |
4480 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4481 | fi |
a6ccdbab EC |
4482 | |
4483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4484 | # Binary search between lo and hi bounds. |
4485 | while test "x$ac_lo" != "x$ac_hi"; do | |
4486 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4487 | cat >conftest.$ac_ext <<_ACEOF | |
4488 | /* confdefs.h. */ | |
4489 | _ACEOF | |
4490 | cat confdefs.h >>conftest.$ac_ext | |
4491 | cat >>conftest.$ac_ext <<_ACEOF | |
4492 | /* end confdefs.h. */ | |
4493 | $ac_includes_default | |
a6ccdbab | 4494 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4495 | int |
4496 | main () | |
4497 | { | |
a6ccdbab | 4498 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4499 | test_array [0] = 0 |
4500 | ||
4501 | ; | |
4502 | return 0; | |
4503 | } | |
4504 | _ACEOF | |
4505 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4506 | if { (ac_try="$ac_compile" |
4507 | case "(($ac_try" in | |
4508 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4509 | *) ac_try_echo=$ac_try;; | |
4510 | esac | |
4511 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4512 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4513 | ac_status=$? |
4514 | grep -v '^ *+' conftest.er1 >conftest.err | |
4515 | rm -f conftest.er1 | |
4516 | cat conftest.err >&5 | |
4517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4518 | (exit $ac_status); } && { |
4519 | test -z "$ac_c_werror_flag" || | |
4520 | test ! -s conftest.err | |
4521 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4522 | ac_hi=$ac_mid |
4523 | else | |
4524 | echo "$as_me: failed program was:" >&5 | |
4525 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4526 | ||
a6ccdbab | 4527 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 4528 | fi |
a6ccdbab EC |
4529 | |
4530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4531 | done |
4532 | case $ac_lo in | |
4533 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
a6ccdbab EC |
4534 | '') if test "$ac_cv_type_void_p" = yes; then |
4535 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) | |
bf3b7cd3 | 4536 | See \`config.log' for more details." >&5 |
a6ccdbab | 4537 | echo "$as_me: error: cannot compute sizeof (void *) |
bf3b7cd3 | 4538 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
4539 | { (exit 77); exit 77; }; } |
4540 | else | |
4541 | ac_cv_sizeof_void_p=0 | |
4542 | fi ;; | |
bf3b7cd3 | 4543 | esac |
bf3b7cd3 JD |
4544 | else |
4545 | cat >conftest.$ac_ext <<_ACEOF | |
4546 | /* confdefs.h. */ | |
4547 | _ACEOF | |
4548 | cat confdefs.h >>conftest.$ac_ext | |
4549 | cat >>conftest.$ac_ext <<_ACEOF | |
4550 | /* end confdefs.h. */ | |
4551 | $ac_includes_default | |
a6ccdbab EC |
4552 | typedef void * ac__type_sizeof_; |
4553 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
4554 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
4555 | #include <stdio.h> |
4556 | #include <stdlib.h> | |
4557 | int | |
4558 | main () | |
4559 | { | |
4560 | ||
4561 | FILE *f = fopen ("conftest.val", "w"); | |
4562 | if (! f) | |
a6ccdbab EC |
4563 | return 1; |
4564 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 4565 | { |
a6ccdbab EC |
4566 | long int i = longval (); |
4567 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4568 | return 1; | |
bf3b7cd3 JD |
4569 | fprintf (f, "%ld\n", i); |
4570 | } | |
4571 | else | |
4572 | { | |
a6ccdbab EC |
4573 | unsigned long int i = ulongval (); |
4574 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4575 | return 1; | |
bf3b7cd3 JD |
4576 | fprintf (f, "%lu\n", i); |
4577 | } | |
a6ccdbab | 4578 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
4579 | |
4580 | ; | |
4581 | return 0; | |
4582 | } | |
4583 | _ACEOF | |
4584 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
4585 | if { (ac_try="$ac_link" |
4586 | case "(($ac_try" in | |
4587 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4588 | *) ac_try_echo=$ac_try;; | |
4589 | esac | |
4590 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4591 | (eval "$ac_link") 2>&5 | |
bf3b7cd3 JD |
4592 | ac_status=$? |
4593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4594 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
4595 | { (case "(($ac_try" in |
4596 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4597 | *) ac_try_echo=$ac_try;; | |
4598 | esac | |
4599 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4600 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
4601 | ac_status=$? |
4602 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4603 | (exit $ac_status); }; }; then | |
4604 | ac_cv_sizeof_void_p=`cat conftest.val` | |
4605 | else | |
4606 | echo "$as_me: program exited with status $ac_status" >&5 | |
4607 | echo "$as_me: failed program was:" >&5 | |
4608 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4609 | ||
4610 | ( exit $ac_status ) | |
a6ccdbab EC |
4611 | if test "$ac_cv_type_void_p" = yes; then |
4612 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) | |
bf3b7cd3 | 4613 | See \`config.log' for more details." >&5 |
a6ccdbab | 4614 | echo "$as_me: error: cannot compute sizeof (void *) |
bf3b7cd3 | 4615 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
4616 | { (exit 77); exit 77; }; } |
4617 | else | |
4618 | ac_cv_sizeof_void_p=0 | |
4619 | fi | |
bf3b7cd3 | 4620 | fi |
a6ccdbab | 4621 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4622 | fi |
4623 | rm -f conftest.val | |
bf3b7cd3 | 4624 | fi |
a6ccdbab EC |
4625 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 |
4626 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } | |
4627 | ||
4628 | ||
4629 | ||
bf3b7cd3 JD |
4630 | cat >>confdefs.h <<_ACEOF |
4631 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
4632 | _ACEOF | |
4633 | ||
4634 | ||
a6ccdbab EC |
4635 | { echo "$as_me:$LINENO: checking for short" >&5 |
4636 | echo $ECHO_N "checking for short... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
4637 | if test "${ac_cv_type_short+set}" = set; then |
4638 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4639 | else | |
4640 | cat >conftest.$ac_ext <<_ACEOF | |
4641 | /* confdefs.h. */ | |
4642 | _ACEOF | |
4643 | cat confdefs.h >>conftest.$ac_ext | |
4644 | cat >>conftest.$ac_ext <<_ACEOF | |
4645 | /* end confdefs.h. */ | |
4646 | $ac_includes_default | |
a6ccdbab | 4647 | typedef short ac__type_new_; |
bf3b7cd3 JD |
4648 | int |
4649 | main () | |
4650 | { | |
a6ccdbab | 4651 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 4652 | return 0; |
a6ccdbab | 4653 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
4654 | return 0; |
4655 | ; | |
4656 | return 0; | |
4657 | } | |
4658 | _ACEOF | |
4659 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4660 | if { (ac_try="$ac_compile" |
4661 | case "(($ac_try" in | |
4662 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4663 | *) ac_try_echo=$ac_try;; | |
4664 | esac | |
4665 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4666 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4667 | ac_status=$? |
4668 | grep -v '^ *+' conftest.er1 >conftest.err | |
4669 | rm -f conftest.er1 | |
4670 | cat conftest.err >&5 | |
4671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4672 | (exit $ac_status); } && { |
4673 | test -z "$ac_c_werror_flag" || | |
4674 | test ! -s conftest.err | |
4675 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4676 | ac_cv_type_short=yes |
4677 | else | |
4678 | echo "$as_me: failed program was:" >&5 | |
4679 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4680 | ||
a6ccdbab | 4681 | ac_cv_type_short=no |
bf3b7cd3 | 4682 | fi |
a6ccdbab EC |
4683 | |
4684 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4685 | fi |
a6ccdbab EC |
4686 | { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 |
4687 | echo "${ECHO_T}$ac_cv_type_short" >&6; } | |
bf3b7cd3 | 4688 | |
a6ccdbab EC |
4689 | # The cast to long int works around a bug in the HP C Compiler |
4690 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4691 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4692 | # This bug is HP SR number 8606223364. | |
4693 | { echo "$as_me:$LINENO: checking size of short" >&5 | |
4694 | echo $ECHO_N "checking size of short... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
4695 | if test "${ac_cv_sizeof_short+set}" = set; then |
4696 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4697 | else | |
bf3b7cd3 JD |
4698 | if test "$cross_compiling" = yes; then |
4699 | # Depending upon the size, compute the lo and hi bounds. | |
4700 | cat >conftest.$ac_ext <<_ACEOF | |
4701 | /* confdefs.h. */ | |
4702 | _ACEOF | |
4703 | cat confdefs.h >>conftest.$ac_ext | |
4704 | cat >>conftest.$ac_ext <<_ACEOF | |
4705 | /* end confdefs.h. */ | |
4706 | $ac_includes_default | |
a6ccdbab | 4707 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4708 | int |
4709 | main () | |
4710 | { | |
a6ccdbab | 4711 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
4712 | test_array [0] = 0 |
4713 | ||
4714 | ; | |
4715 | return 0; | |
4716 | } | |
4717 | _ACEOF | |
4718 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4719 | if { (ac_try="$ac_compile" |
4720 | case "(($ac_try" in | |
4721 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4722 | *) ac_try_echo=$ac_try;; | |
4723 | esac | |
4724 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4725 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4726 | ac_status=$? |
4727 | grep -v '^ *+' conftest.er1 >conftest.err | |
4728 | rm -f conftest.er1 | |
4729 | cat conftest.err >&5 | |
4730 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4731 | (exit $ac_status); } && { |
4732 | test -z "$ac_c_werror_flag" || | |
4733 | test ! -s conftest.err | |
4734 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4735 | ac_lo=0 ac_mid=0 |
4736 | while :; do | |
4737 | cat >conftest.$ac_ext <<_ACEOF | |
4738 | /* confdefs.h. */ | |
4739 | _ACEOF | |
4740 | cat confdefs.h >>conftest.$ac_ext | |
4741 | cat >>conftest.$ac_ext <<_ACEOF | |
4742 | /* end confdefs.h. */ | |
4743 | $ac_includes_default | |
a6ccdbab | 4744 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4745 | int |
4746 | main () | |
4747 | { | |
a6ccdbab | 4748 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4749 | test_array [0] = 0 |
4750 | ||
4751 | ; | |
4752 | return 0; | |
4753 | } | |
4754 | _ACEOF | |
4755 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4756 | if { (ac_try="$ac_compile" |
4757 | case "(($ac_try" in | |
4758 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4759 | *) ac_try_echo=$ac_try;; | |
4760 | esac | |
4761 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4762 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4763 | ac_status=$? |
4764 | grep -v '^ *+' conftest.er1 >conftest.err | |
4765 | rm -f conftest.er1 | |
4766 | cat conftest.err >&5 | |
4767 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4768 | (exit $ac_status); } && { |
4769 | test -z "$ac_c_werror_flag" || | |
4770 | test ! -s conftest.err | |
4771 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4772 | ac_hi=$ac_mid; break |
4773 | else | |
4774 | echo "$as_me: failed program was:" >&5 | |
4775 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4776 | ||
a6ccdbab EC |
4777 | ac_lo=`expr $ac_mid + 1` |
4778 | if test $ac_lo -le $ac_mid; then | |
4779 | ac_lo= ac_hi= | |
4780 | break | |
4781 | fi | |
4782 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 4783 | fi |
a6ccdbab EC |
4784 | |
4785 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4786 | done |
4787 | else | |
4788 | echo "$as_me: failed program was:" >&5 | |
4789 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4790 | ||
a6ccdbab | 4791 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
4792 | /* confdefs.h. */ |
4793 | _ACEOF | |
4794 | cat confdefs.h >>conftest.$ac_ext | |
4795 | cat >>conftest.$ac_ext <<_ACEOF | |
4796 | /* end confdefs.h. */ | |
4797 | $ac_includes_default | |
a6ccdbab | 4798 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4799 | int |
4800 | main () | |
4801 | { | |
a6ccdbab | 4802 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
4803 | test_array [0] = 0 |
4804 | ||
4805 | ; | |
4806 | return 0; | |
4807 | } | |
4808 | _ACEOF | |
4809 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4810 | if { (ac_try="$ac_compile" |
4811 | case "(($ac_try" in | |
4812 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4813 | *) ac_try_echo=$ac_try;; | |
4814 | esac | |
4815 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4816 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4817 | ac_status=$? |
4818 | grep -v '^ *+' conftest.er1 >conftest.err | |
4819 | rm -f conftest.er1 | |
4820 | cat conftest.err >&5 | |
4821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4822 | (exit $ac_status); } && { |
4823 | test -z "$ac_c_werror_flag" || | |
4824 | test ! -s conftest.err | |
4825 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4826 | ac_hi=-1 ac_mid=-1 |
4827 | while :; do | |
4828 | cat >conftest.$ac_ext <<_ACEOF | |
4829 | /* confdefs.h. */ | |
4830 | _ACEOF | |
4831 | cat confdefs.h >>conftest.$ac_ext | |
4832 | cat >>conftest.$ac_ext <<_ACEOF | |
4833 | /* end confdefs.h. */ | |
4834 | $ac_includes_default | |
a6ccdbab | 4835 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4836 | int |
4837 | main () | |
4838 | { | |
a6ccdbab | 4839 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
4840 | test_array [0] = 0 |
4841 | ||
4842 | ; | |
4843 | return 0; | |
4844 | } | |
4845 | _ACEOF | |
4846 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4847 | if { (ac_try="$ac_compile" |
4848 | case "(($ac_try" in | |
4849 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4850 | *) ac_try_echo=$ac_try;; | |
4851 | esac | |
4852 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4853 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4854 | ac_status=$? |
4855 | grep -v '^ *+' conftest.er1 >conftest.err | |
4856 | rm -f conftest.er1 | |
4857 | cat conftest.err >&5 | |
4858 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4859 | (exit $ac_status); } && { |
4860 | test -z "$ac_c_werror_flag" || | |
4861 | test ! -s conftest.err | |
4862 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4863 | ac_lo=$ac_mid; break |
4864 | else | |
4865 | echo "$as_me: failed program was:" >&5 | |
4866 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4867 | ||
a6ccdbab EC |
4868 | ac_hi=`expr '(' $ac_mid ')' - 1` |
4869 | if test $ac_mid -le $ac_hi; then | |
4870 | ac_lo= ac_hi= | |
4871 | break | |
4872 | fi | |
4873 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 4874 | fi |
a6ccdbab EC |
4875 | |
4876 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4877 | done |
4878 | else | |
4879 | echo "$as_me: failed program was:" >&5 | |
4880 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4881 | ||
a6ccdbab | 4882 | ac_lo= ac_hi= |
bf3b7cd3 | 4883 | fi |
a6ccdbab EC |
4884 | |
4885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4886 | fi |
a6ccdbab EC |
4887 | |
4888 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4889 | # Binary search between lo and hi bounds. |
4890 | while test "x$ac_lo" != "x$ac_hi"; do | |
4891 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4892 | cat >conftest.$ac_ext <<_ACEOF | |
4893 | /* confdefs.h. */ | |
4894 | _ACEOF | |
4895 | cat confdefs.h >>conftest.$ac_ext | |
4896 | cat >>conftest.$ac_ext <<_ACEOF | |
4897 | /* end confdefs.h. */ | |
4898 | $ac_includes_default | |
a6ccdbab | 4899 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4900 | int |
4901 | main () | |
4902 | { | |
a6ccdbab | 4903 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4904 | test_array [0] = 0 |
4905 | ||
4906 | ; | |
4907 | return 0; | |
4908 | } | |
4909 | _ACEOF | |
4910 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
4911 | if { (ac_try="$ac_compile" |
4912 | case "(($ac_try" in | |
4913 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4914 | *) ac_try_echo=$ac_try;; | |
4915 | esac | |
4916 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4917 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4918 | ac_status=$? |
4919 | grep -v '^ *+' conftest.er1 >conftest.err | |
4920 | rm -f conftest.er1 | |
4921 | cat conftest.err >&5 | |
4922 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
4923 | (exit $ac_status); } && { |
4924 | test -z "$ac_c_werror_flag" || | |
4925 | test ! -s conftest.err | |
4926 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4927 | ac_hi=$ac_mid |
4928 | else | |
4929 | echo "$as_me: failed program was:" >&5 | |
4930 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4931 | ||
a6ccdbab | 4932 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 4933 | fi |
a6ccdbab EC |
4934 | |
4935 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4936 | done |
4937 | case $ac_lo in | |
4938 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
a6ccdbab EC |
4939 | '') if test "$ac_cv_type_short" = yes; then |
4940 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) | |
bf3b7cd3 | 4941 | See \`config.log' for more details." >&5 |
a6ccdbab | 4942 | echo "$as_me: error: cannot compute sizeof (short) |
bf3b7cd3 | 4943 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
4944 | { (exit 77); exit 77; }; } |
4945 | else | |
4946 | ac_cv_sizeof_short=0 | |
4947 | fi ;; | |
bf3b7cd3 | 4948 | esac |
bf3b7cd3 JD |
4949 | else |
4950 | cat >conftest.$ac_ext <<_ACEOF | |
4951 | /* confdefs.h. */ | |
4952 | _ACEOF | |
4953 | cat confdefs.h >>conftest.$ac_ext | |
4954 | cat >>conftest.$ac_ext <<_ACEOF | |
4955 | /* end confdefs.h. */ | |
4956 | $ac_includes_default | |
a6ccdbab EC |
4957 | typedef short ac__type_sizeof_; |
4958 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
4959 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
4960 | #include <stdio.h> |
4961 | #include <stdlib.h> | |
4962 | int | |
4963 | main () | |
4964 | { | |
4965 | ||
4966 | FILE *f = fopen ("conftest.val", "w"); | |
4967 | if (! f) | |
a6ccdbab EC |
4968 | return 1; |
4969 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 4970 | { |
a6ccdbab EC |
4971 | long int i = longval (); |
4972 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4973 | return 1; | |
bf3b7cd3 JD |
4974 | fprintf (f, "%ld\n", i); |
4975 | } | |
4976 | else | |
4977 | { | |
a6ccdbab EC |
4978 | unsigned long int i = ulongval (); |
4979 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4980 | return 1; | |
bf3b7cd3 JD |
4981 | fprintf (f, "%lu\n", i); |
4982 | } | |
a6ccdbab | 4983 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
4984 | |
4985 | ; | |
4986 | return 0; | |
4987 | } | |
4988 | _ACEOF | |
4989 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
4990 | if { (ac_try="$ac_link" |
4991 | case "(($ac_try" in | |
4992 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4993 | *) ac_try_echo=$ac_try;; | |
4994 | esac | |
4995 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4996 | (eval "$ac_link") 2>&5 | |
bf3b7cd3 JD |
4997 | ac_status=$? |
4998 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4999 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
5000 | { (case "(($ac_try" in |
5001 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5002 | *) ac_try_echo=$ac_try;; | |
5003 | esac | |
5004 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5005 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
5006 | ac_status=$? |
5007 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5008 | (exit $ac_status); }; }; then | |
5009 | ac_cv_sizeof_short=`cat conftest.val` | |
5010 | else | |
5011 | echo "$as_me: program exited with status $ac_status" >&5 | |
5012 | echo "$as_me: failed program was:" >&5 | |
5013 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5014 | ||
5015 | ( exit $ac_status ) | |
a6ccdbab EC |
5016 | if test "$ac_cv_type_short" = yes; then |
5017 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) | |
bf3b7cd3 | 5018 | See \`config.log' for more details." >&5 |
a6ccdbab | 5019 | echo "$as_me: error: cannot compute sizeof (short) |
bf3b7cd3 | 5020 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
5021 | { (exit 77); exit 77; }; } |
5022 | else | |
5023 | ac_cv_sizeof_short=0 | |
5024 | fi | |
bf3b7cd3 | 5025 | fi |
a6ccdbab | 5026 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5027 | fi |
5028 | rm -f conftest.val | |
bf3b7cd3 | 5029 | fi |
a6ccdbab EC |
5030 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 |
5031 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } | |
5032 | ||
5033 | ||
5034 | ||
bf3b7cd3 JD |
5035 | cat >>confdefs.h <<_ACEOF |
5036 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
5037 | _ACEOF | |
5038 | ||
5039 | ||
a6ccdbab EC |
5040 | { echo "$as_me:$LINENO: checking for int" >&5 |
5041 | echo $ECHO_N "checking for int... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5042 | if test "${ac_cv_type_int+set}" = set; then |
5043 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5044 | else | |
5045 | cat >conftest.$ac_ext <<_ACEOF | |
5046 | /* confdefs.h. */ | |
5047 | _ACEOF | |
5048 | cat confdefs.h >>conftest.$ac_ext | |
5049 | cat >>conftest.$ac_ext <<_ACEOF | |
5050 | /* end confdefs.h. */ | |
5051 | $ac_includes_default | |
a6ccdbab | 5052 | typedef int ac__type_new_; |
bf3b7cd3 JD |
5053 | int |
5054 | main () | |
5055 | { | |
a6ccdbab | 5056 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 5057 | return 0; |
a6ccdbab | 5058 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
5059 | return 0; |
5060 | ; | |
5061 | return 0; | |
5062 | } | |
5063 | _ACEOF | |
5064 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5065 | if { (ac_try="$ac_compile" |
5066 | case "(($ac_try" in | |
5067 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5068 | *) ac_try_echo=$ac_try;; | |
5069 | esac | |
5070 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5071 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5072 | ac_status=$? |
5073 | grep -v '^ *+' conftest.er1 >conftest.err | |
5074 | rm -f conftest.er1 | |
5075 | cat conftest.err >&5 | |
5076 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5077 | (exit $ac_status); } && { |
5078 | test -z "$ac_c_werror_flag" || | |
5079 | test ! -s conftest.err | |
5080 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5081 | ac_cv_type_int=yes |
5082 | else | |
5083 | echo "$as_me: failed program was:" >&5 | |
5084 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5085 | ||
a6ccdbab | 5086 | ac_cv_type_int=no |
bf3b7cd3 | 5087 | fi |
a6ccdbab EC |
5088 | |
5089 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5090 | fi |
a6ccdbab EC |
5091 | { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 |
5092 | echo "${ECHO_T}$ac_cv_type_int" >&6; } | |
bf3b7cd3 | 5093 | |
a6ccdbab EC |
5094 | # The cast to long int works around a bug in the HP C Compiler |
5095 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5096 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5097 | # This bug is HP SR number 8606223364. | |
5098 | { echo "$as_me:$LINENO: checking size of int" >&5 | |
5099 | echo $ECHO_N "checking size of int... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5100 | if test "${ac_cv_sizeof_int+set}" = set; then |
5101 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5102 | else | |
bf3b7cd3 JD |
5103 | if test "$cross_compiling" = yes; then |
5104 | # Depending upon the size, compute the lo and hi bounds. | |
5105 | cat >conftest.$ac_ext <<_ACEOF | |
5106 | /* confdefs.h. */ | |
5107 | _ACEOF | |
5108 | cat confdefs.h >>conftest.$ac_ext | |
5109 | cat >>conftest.$ac_ext <<_ACEOF | |
5110 | /* end confdefs.h. */ | |
5111 | $ac_includes_default | |
a6ccdbab | 5112 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5113 | int |
5114 | main () | |
5115 | { | |
a6ccdbab | 5116 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
5117 | test_array [0] = 0 |
5118 | ||
5119 | ; | |
5120 | return 0; | |
5121 | } | |
5122 | _ACEOF | |
5123 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5124 | if { (ac_try="$ac_compile" |
5125 | case "(($ac_try" in | |
5126 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5127 | *) ac_try_echo=$ac_try;; | |
5128 | esac | |
5129 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5130 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5131 | ac_status=$? |
5132 | grep -v '^ *+' conftest.er1 >conftest.err | |
5133 | rm -f conftest.er1 | |
5134 | cat conftest.err >&5 | |
5135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5136 | (exit $ac_status); } && { |
5137 | test -z "$ac_c_werror_flag" || | |
5138 | test ! -s conftest.err | |
5139 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5140 | ac_lo=0 ac_mid=0 |
5141 | while :; do | |
5142 | cat >conftest.$ac_ext <<_ACEOF | |
5143 | /* confdefs.h. */ | |
5144 | _ACEOF | |
5145 | cat confdefs.h >>conftest.$ac_ext | |
5146 | cat >>conftest.$ac_ext <<_ACEOF | |
5147 | /* end confdefs.h. */ | |
5148 | $ac_includes_default | |
a6ccdbab | 5149 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5150 | int |
5151 | main () | |
5152 | { | |
a6ccdbab | 5153 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5154 | test_array [0] = 0 |
5155 | ||
5156 | ; | |
5157 | return 0; | |
5158 | } | |
5159 | _ACEOF | |
5160 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5161 | if { (ac_try="$ac_compile" |
5162 | case "(($ac_try" in | |
5163 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5164 | *) ac_try_echo=$ac_try;; | |
5165 | esac | |
5166 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5167 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5168 | ac_status=$? |
5169 | grep -v '^ *+' conftest.er1 >conftest.err | |
5170 | rm -f conftest.er1 | |
5171 | cat conftest.err >&5 | |
5172 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5173 | (exit $ac_status); } && { |
5174 | test -z "$ac_c_werror_flag" || | |
5175 | test ! -s conftest.err | |
5176 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5177 | ac_hi=$ac_mid; break |
5178 | else | |
5179 | echo "$as_me: failed program was:" >&5 | |
5180 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5181 | ||
a6ccdbab EC |
5182 | ac_lo=`expr $ac_mid + 1` |
5183 | if test $ac_lo -le $ac_mid; then | |
5184 | ac_lo= ac_hi= | |
5185 | break | |
5186 | fi | |
5187 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 5188 | fi |
a6ccdbab EC |
5189 | |
5190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5191 | done |
5192 | else | |
5193 | echo "$as_me: failed program was:" >&5 | |
5194 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5195 | ||
a6ccdbab | 5196 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
5197 | /* confdefs.h. */ |
5198 | _ACEOF | |
5199 | cat confdefs.h >>conftest.$ac_ext | |
5200 | cat >>conftest.$ac_ext <<_ACEOF | |
5201 | /* end confdefs.h. */ | |
5202 | $ac_includes_default | |
a6ccdbab | 5203 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5204 | int |
5205 | main () | |
5206 | { | |
a6ccdbab | 5207 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
5208 | test_array [0] = 0 |
5209 | ||
5210 | ; | |
5211 | return 0; | |
5212 | } | |
5213 | _ACEOF | |
5214 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5215 | if { (ac_try="$ac_compile" |
5216 | case "(($ac_try" in | |
5217 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5218 | *) ac_try_echo=$ac_try;; | |
5219 | esac | |
5220 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5221 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5222 | ac_status=$? |
5223 | grep -v '^ *+' conftest.er1 >conftest.err | |
5224 | rm -f conftest.er1 | |
5225 | cat conftest.err >&5 | |
5226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5227 | (exit $ac_status); } && { |
5228 | test -z "$ac_c_werror_flag" || | |
5229 | test ! -s conftest.err | |
5230 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5231 | ac_hi=-1 ac_mid=-1 |
5232 | while :; do | |
5233 | cat >conftest.$ac_ext <<_ACEOF | |
5234 | /* confdefs.h. */ | |
5235 | _ACEOF | |
5236 | cat confdefs.h >>conftest.$ac_ext | |
5237 | cat >>conftest.$ac_ext <<_ACEOF | |
5238 | /* end confdefs.h. */ | |
5239 | $ac_includes_default | |
a6ccdbab | 5240 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5241 | int |
5242 | main () | |
5243 | { | |
a6ccdbab | 5244 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
5245 | test_array [0] = 0 |
5246 | ||
5247 | ; | |
5248 | return 0; | |
5249 | } | |
5250 | _ACEOF | |
5251 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5252 | if { (ac_try="$ac_compile" |
5253 | case "(($ac_try" in | |
5254 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5255 | *) ac_try_echo=$ac_try;; | |
5256 | esac | |
5257 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5258 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5259 | ac_status=$? |
5260 | grep -v '^ *+' conftest.er1 >conftest.err | |
5261 | rm -f conftest.er1 | |
5262 | cat conftest.err >&5 | |
5263 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5264 | (exit $ac_status); } && { |
5265 | test -z "$ac_c_werror_flag" || | |
5266 | test ! -s conftest.err | |
5267 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5268 | ac_lo=$ac_mid; break |
5269 | else | |
5270 | echo "$as_me: failed program was:" >&5 | |
5271 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5272 | ||
a6ccdbab EC |
5273 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5274 | if test $ac_mid -le $ac_hi; then | |
5275 | ac_lo= ac_hi= | |
5276 | break | |
5277 | fi | |
5278 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 5279 | fi |
a6ccdbab EC |
5280 | |
5281 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5282 | done |
5283 | else | |
5284 | echo "$as_me: failed program was:" >&5 | |
5285 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5286 | ||
a6ccdbab | 5287 | ac_lo= ac_hi= |
bf3b7cd3 | 5288 | fi |
a6ccdbab EC |
5289 | |
5290 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5291 | fi |
a6ccdbab EC |
5292 | |
5293 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5294 | # Binary search between lo and hi bounds. |
5295 | while test "x$ac_lo" != "x$ac_hi"; do | |
5296 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5297 | cat >conftest.$ac_ext <<_ACEOF | |
5298 | /* confdefs.h. */ | |
5299 | _ACEOF | |
5300 | cat confdefs.h >>conftest.$ac_ext | |
5301 | cat >>conftest.$ac_ext <<_ACEOF | |
5302 | /* end confdefs.h. */ | |
5303 | $ac_includes_default | |
a6ccdbab | 5304 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5305 | int |
5306 | main () | |
5307 | { | |
a6ccdbab | 5308 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5309 | test_array [0] = 0 |
5310 | ||
5311 | ; | |
5312 | return 0; | |
5313 | } | |
5314 | _ACEOF | |
5315 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5316 | if { (ac_try="$ac_compile" |
5317 | case "(($ac_try" in | |
5318 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5319 | *) ac_try_echo=$ac_try;; | |
5320 | esac | |
5321 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5322 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5323 | ac_status=$? |
5324 | grep -v '^ *+' conftest.er1 >conftest.err | |
5325 | rm -f conftest.er1 | |
5326 | cat conftest.err >&5 | |
5327 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5328 | (exit $ac_status); } && { |
5329 | test -z "$ac_c_werror_flag" || | |
5330 | test ! -s conftest.err | |
5331 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5332 | ac_hi=$ac_mid |
5333 | else | |
5334 | echo "$as_me: failed program was:" >&5 | |
5335 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5336 | ||
a6ccdbab | 5337 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 5338 | fi |
a6ccdbab EC |
5339 | |
5340 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5341 | done |
5342 | case $ac_lo in | |
5343 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
a6ccdbab EC |
5344 | '') if test "$ac_cv_type_int" = yes; then |
5345 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) | |
bf3b7cd3 | 5346 | See \`config.log' for more details." >&5 |
a6ccdbab | 5347 | echo "$as_me: error: cannot compute sizeof (int) |
bf3b7cd3 | 5348 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
5349 | { (exit 77); exit 77; }; } |
5350 | else | |
5351 | ac_cv_sizeof_int=0 | |
5352 | fi ;; | |
bf3b7cd3 | 5353 | esac |
bf3b7cd3 JD |
5354 | else |
5355 | cat >conftest.$ac_ext <<_ACEOF | |
5356 | /* confdefs.h. */ | |
5357 | _ACEOF | |
5358 | cat confdefs.h >>conftest.$ac_ext | |
5359 | cat >>conftest.$ac_ext <<_ACEOF | |
5360 | /* end confdefs.h. */ | |
5361 | $ac_includes_default | |
a6ccdbab EC |
5362 | typedef int ac__type_sizeof_; |
5363 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
5364 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
5365 | #include <stdio.h> |
5366 | #include <stdlib.h> | |
5367 | int | |
5368 | main () | |
5369 | { | |
5370 | ||
5371 | FILE *f = fopen ("conftest.val", "w"); | |
5372 | if (! f) | |
a6ccdbab EC |
5373 | return 1; |
5374 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 5375 | { |
a6ccdbab EC |
5376 | long int i = longval (); |
5377 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5378 | return 1; | |
bf3b7cd3 JD |
5379 | fprintf (f, "%ld\n", i); |
5380 | } | |
5381 | else | |
5382 | { | |
a6ccdbab EC |
5383 | unsigned long int i = ulongval (); |
5384 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5385 | return 1; | |
bf3b7cd3 JD |
5386 | fprintf (f, "%lu\n", i); |
5387 | } | |
a6ccdbab | 5388 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
5389 | |
5390 | ; | |
5391 | return 0; | |
5392 | } | |
5393 | _ACEOF | |
5394 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
5395 | if { (ac_try="$ac_link" |
5396 | case "(($ac_try" in | |
5397 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5398 | *) ac_try_echo=$ac_try;; | |
5399 | esac | |
5400 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5401 | (eval "$ac_link") 2>&5 | |
bf3b7cd3 JD |
5402 | ac_status=$? |
5403 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5404 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
5405 | { (case "(($ac_try" in |
5406 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5407 | *) ac_try_echo=$ac_try;; | |
5408 | esac | |
5409 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5410 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
5411 | ac_status=$? |
5412 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5413 | (exit $ac_status); }; }; then | |
5414 | ac_cv_sizeof_int=`cat conftest.val` | |
5415 | else | |
5416 | echo "$as_me: program exited with status $ac_status" >&5 | |
5417 | echo "$as_me: failed program was:" >&5 | |
5418 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5419 | ||
5420 | ( exit $ac_status ) | |
a6ccdbab EC |
5421 | if test "$ac_cv_type_int" = yes; then |
5422 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) | |
bf3b7cd3 | 5423 | See \`config.log' for more details." >&5 |
a6ccdbab | 5424 | echo "$as_me: error: cannot compute sizeof (int) |
bf3b7cd3 | 5425 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
5426 | { (exit 77); exit 77; }; } |
5427 | else | |
5428 | ac_cv_sizeof_int=0 | |
5429 | fi | |
bf3b7cd3 | 5430 | fi |
a6ccdbab | 5431 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5432 | fi |
5433 | rm -f conftest.val | |
bf3b7cd3 | 5434 | fi |
a6ccdbab EC |
5435 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 |
5436 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } | |
5437 | ||
5438 | ||
5439 | ||
bf3b7cd3 JD |
5440 | cat >>confdefs.h <<_ACEOF |
5441 | #define SIZEOF_INT $ac_cv_sizeof_int | |
5442 | _ACEOF | |
5443 | ||
5444 | ||
a6ccdbab EC |
5445 | { echo "$as_me:$LINENO: checking for long" >&5 |
5446 | echo $ECHO_N "checking for long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5447 | if test "${ac_cv_type_long+set}" = set; then |
5448 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5449 | else | |
5450 | cat >conftest.$ac_ext <<_ACEOF | |
5451 | /* confdefs.h. */ | |
5452 | _ACEOF | |
5453 | cat confdefs.h >>conftest.$ac_ext | |
5454 | cat >>conftest.$ac_ext <<_ACEOF | |
5455 | /* end confdefs.h. */ | |
5456 | $ac_includes_default | |
a6ccdbab | 5457 | typedef long ac__type_new_; |
bf3b7cd3 JD |
5458 | int |
5459 | main () | |
5460 | { | |
a6ccdbab | 5461 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 5462 | return 0; |
a6ccdbab | 5463 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
5464 | return 0; |
5465 | ; | |
5466 | return 0; | |
5467 | } | |
5468 | _ACEOF | |
5469 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5470 | if { (ac_try="$ac_compile" |
5471 | case "(($ac_try" in | |
5472 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5473 | *) ac_try_echo=$ac_try;; | |
5474 | esac | |
5475 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5476 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5477 | ac_status=$? |
5478 | grep -v '^ *+' conftest.er1 >conftest.err | |
5479 | rm -f conftest.er1 | |
5480 | cat conftest.err >&5 | |
5481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5482 | (exit $ac_status); } && { |
5483 | test -z "$ac_c_werror_flag" || | |
5484 | test ! -s conftest.err | |
5485 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5486 | ac_cv_type_long=yes |
5487 | else | |
5488 | echo "$as_me: failed program was:" >&5 | |
5489 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5490 | ||
a6ccdbab | 5491 | ac_cv_type_long=no |
bf3b7cd3 | 5492 | fi |
a6ccdbab EC |
5493 | |
5494 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5495 | fi |
a6ccdbab EC |
5496 | { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 |
5497 | echo "${ECHO_T}$ac_cv_type_long" >&6; } | |
bf3b7cd3 | 5498 | |
a6ccdbab EC |
5499 | # The cast to long int works around a bug in the HP C Compiler |
5500 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5501 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5502 | # This bug is HP SR number 8606223364. | |
5503 | { echo "$as_me:$LINENO: checking size of long" >&5 | |
5504 | echo $ECHO_N "checking size of long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5505 | if test "${ac_cv_sizeof_long+set}" = set; then |
5506 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5507 | else | |
bf3b7cd3 JD |
5508 | if test "$cross_compiling" = yes; then |
5509 | # Depending upon the size, compute the lo and hi bounds. | |
5510 | cat >conftest.$ac_ext <<_ACEOF | |
5511 | /* confdefs.h. */ | |
5512 | _ACEOF | |
5513 | cat confdefs.h >>conftest.$ac_ext | |
5514 | cat >>conftest.$ac_ext <<_ACEOF | |
5515 | /* end confdefs.h. */ | |
5516 | $ac_includes_default | |
a6ccdbab | 5517 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5518 | int |
5519 | main () | |
5520 | { | |
a6ccdbab | 5521 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
5522 | test_array [0] = 0 |
5523 | ||
5524 | ; | |
5525 | return 0; | |
5526 | } | |
5527 | _ACEOF | |
5528 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5529 | if { (ac_try="$ac_compile" |
5530 | case "(($ac_try" in | |
5531 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5532 | *) ac_try_echo=$ac_try;; | |
5533 | esac | |
5534 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5535 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5536 | ac_status=$? |
5537 | grep -v '^ *+' conftest.er1 >conftest.err | |
5538 | rm -f conftest.er1 | |
5539 | cat conftest.err >&5 | |
5540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5541 | (exit $ac_status); } && { |
5542 | test -z "$ac_c_werror_flag" || | |
5543 | test ! -s conftest.err | |
5544 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5545 | ac_lo=0 ac_mid=0 |
5546 | while :; do | |
5547 | cat >conftest.$ac_ext <<_ACEOF | |
5548 | /* confdefs.h. */ | |
5549 | _ACEOF | |
5550 | cat confdefs.h >>conftest.$ac_ext | |
5551 | cat >>conftest.$ac_ext <<_ACEOF | |
5552 | /* end confdefs.h. */ | |
5553 | $ac_includes_default | |
a6ccdbab | 5554 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5555 | int |
5556 | main () | |
5557 | { | |
a6ccdbab | 5558 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5559 | test_array [0] = 0 |
5560 | ||
5561 | ; | |
5562 | return 0; | |
5563 | } | |
5564 | _ACEOF | |
5565 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5566 | if { (ac_try="$ac_compile" |
5567 | case "(($ac_try" in | |
5568 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5569 | *) ac_try_echo=$ac_try;; | |
5570 | esac | |
5571 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5572 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5573 | ac_status=$? |
5574 | grep -v '^ *+' conftest.er1 >conftest.err | |
5575 | rm -f conftest.er1 | |
5576 | cat conftest.err >&5 | |
5577 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5578 | (exit $ac_status); } && { |
5579 | test -z "$ac_c_werror_flag" || | |
5580 | test ! -s conftest.err | |
5581 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5582 | ac_hi=$ac_mid; break |
5583 | else | |
5584 | echo "$as_me: failed program was:" >&5 | |
5585 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5586 | ||
a6ccdbab EC |
5587 | ac_lo=`expr $ac_mid + 1` |
5588 | if test $ac_lo -le $ac_mid; then | |
5589 | ac_lo= ac_hi= | |
5590 | break | |
5591 | fi | |
5592 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 5593 | fi |
a6ccdbab EC |
5594 | |
5595 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5596 | done |
5597 | else | |
5598 | echo "$as_me: failed program was:" >&5 | |
5599 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5600 | ||
a6ccdbab | 5601 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
5602 | /* confdefs.h. */ |
5603 | _ACEOF | |
5604 | cat confdefs.h >>conftest.$ac_ext | |
5605 | cat >>conftest.$ac_ext <<_ACEOF | |
5606 | /* end confdefs.h. */ | |
5607 | $ac_includes_default | |
a6ccdbab | 5608 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5609 | int |
5610 | main () | |
5611 | { | |
a6ccdbab | 5612 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
5613 | test_array [0] = 0 |
5614 | ||
5615 | ; | |
5616 | return 0; | |
5617 | } | |
5618 | _ACEOF | |
5619 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5620 | if { (ac_try="$ac_compile" |
5621 | case "(($ac_try" in | |
5622 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5623 | *) ac_try_echo=$ac_try;; | |
5624 | esac | |
5625 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5626 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5627 | ac_status=$? |
5628 | grep -v '^ *+' conftest.er1 >conftest.err | |
5629 | rm -f conftest.er1 | |
5630 | cat conftest.err >&5 | |
5631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5632 | (exit $ac_status); } && { |
5633 | test -z "$ac_c_werror_flag" || | |
5634 | test ! -s conftest.err | |
5635 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5636 | ac_hi=-1 ac_mid=-1 |
5637 | while :; do | |
5638 | cat >conftest.$ac_ext <<_ACEOF | |
5639 | /* confdefs.h. */ | |
5640 | _ACEOF | |
5641 | cat confdefs.h >>conftest.$ac_ext | |
5642 | cat >>conftest.$ac_ext <<_ACEOF | |
5643 | /* end confdefs.h. */ | |
5644 | $ac_includes_default | |
a6ccdbab | 5645 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5646 | int |
5647 | main () | |
5648 | { | |
a6ccdbab | 5649 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
5650 | test_array [0] = 0 |
5651 | ||
5652 | ; | |
5653 | return 0; | |
5654 | } | |
5655 | _ACEOF | |
5656 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5657 | if { (ac_try="$ac_compile" |
5658 | case "(($ac_try" in | |
5659 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5660 | *) ac_try_echo=$ac_try;; | |
5661 | esac | |
5662 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5663 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5664 | ac_status=$? |
5665 | grep -v '^ *+' conftest.er1 >conftest.err | |
5666 | rm -f conftest.er1 | |
5667 | cat conftest.err >&5 | |
5668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5669 | (exit $ac_status); } && { |
5670 | test -z "$ac_c_werror_flag" || | |
5671 | test ! -s conftest.err | |
5672 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5673 | ac_lo=$ac_mid; break |
5674 | else | |
5675 | echo "$as_me: failed program was:" >&5 | |
5676 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5677 | ||
a6ccdbab EC |
5678 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5679 | if test $ac_mid -le $ac_hi; then | |
5680 | ac_lo= ac_hi= | |
5681 | break | |
5682 | fi | |
5683 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 5684 | fi |
a6ccdbab EC |
5685 | |
5686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5687 | done |
5688 | else | |
5689 | echo "$as_me: failed program was:" >&5 | |
5690 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5691 | ||
a6ccdbab | 5692 | ac_lo= ac_hi= |
bf3b7cd3 | 5693 | fi |
a6ccdbab EC |
5694 | |
5695 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5696 | fi |
a6ccdbab EC |
5697 | |
5698 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5699 | # Binary search between lo and hi bounds. |
5700 | while test "x$ac_lo" != "x$ac_hi"; do | |
5701 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5702 | cat >conftest.$ac_ext <<_ACEOF | |
5703 | /* confdefs.h. */ | |
5704 | _ACEOF | |
5705 | cat confdefs.h >>conftest.$ac_ext | |
5706 | cat >>conftest.$ac_ext <<_ACEOF | |
5707 | /* end confdefs.h. */ | |
5708 | $ac_includes_default | |
a6ccdbab | 5709 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5710 | int |
5711 | main () | |
5712 | { | |
a6ccdbab | 5713 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5714 | test_array [0] = 0 |
5715 | ||
5716 | ; | |
5717 | return 0; | |
5718 | } | |
5719 | _ACEOF | |
5720 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5721 | if { (ac_try="$ac_compile" |
5722 | case "(($ac_try" in | |
5723 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5724 | *) ac_try_echo=$ac_try;; | |
5725 | esac | |
5726 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5727 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5728 | ac_status=$? |
5729 | grep -v '^ *+' conftest.er1 >conftest.err | |
5730 | rm -f conftest.er1 | |
5731 | cat conftest.err >&5 | |
5732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5733 | (exit $ac_status); } && { |
5734 | test -z "$ac_c_werror_flag" || | |
5735 | test ! -s conftest.err | |
5736 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5737 | ac_hi=$ac_mid |
5738 | else | |
5739 | echo "$as_me: failed program was:" >&5 | |
5740 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5741 | ||
a6ccdbab | 5742 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 5743 | fi |
a6ccdbab EC |
5744 | |
5745 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5746 | done |
5747 | case $ac_lo in | |
5748 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
a6ccdbab EC |
5749 | '') if test "$ac_cv_type_long" = yes; then |
5750 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) | |
bf3b7cd3 | 5751 | See \`config.log' for more details." >&5 |
a6ccdbab | 5752 | echo "$as_me: error: cannot compute sizeof (long) |
bf3b7cd3 | 5753 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
5754 | { (exit 77); exit 77; }; } |
5755 | else | |
5756 | ac_cv_sizeof_long=0 | |
5757 | fi ;; | |
bf3b7cd3 | 5758 | esac |
bf3b7cd3 JD |
5759 | else |
5760 | cat >conftest.$ac_ext <<_ACEOF | |
5761 | /* confdefs.h. */ | |
5762 | _ACEOF | |
5763 | cat confdefs.h >>conftest.$ac_ext | |
5764 | cat >>conftest.$ac_ext <<_ACEOF | |
5765 | /* end confdefs.h. */ | |
5766 | $ac_includes_default | |
a6ccdbab EC |
5767 | typedef long ac__type_sizeof_; |
5768 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
5769 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
5770 | #include <stdio.h> |
5771 | #include <stdlib.h> | |
5772 | int | |
5773 | main () | |
5774 | { | |
5775 | ||
5776 | FILE *f = fopen ("conftest.val", "w"); | |
5777 | if (! f) | |
a6ccdbab EC |
5778 | return 1; |
5779 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 5780 | { |
a6ccdbab EC |
5781 | long int i = longval (); |
5782 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5783 | return 1; | |
bf3b7cd3 JD |
5784 | fprintf (f, "%ld\n", i); |
5785 | } | |
5786 | else | |
5787 | { | |
a6ccdbab EC |
5788 | unsigned long int i = ulongval (); |
5789 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5790 | return 1; | |
bf3b7cd3 JD |
5791 | fprintf (f, "%lu\n", i); |
5792 | } | |
a6ccdbab | 5793 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
5794 | |
5795 | ; | |
5796 | return 0; | |
5797 | } | |
5798 | _ACEOF | |
5799 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
5800 | if { (ac_try="$ac_link" |
5801 | case "(($ac_try" in | |
5802 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5803 | *) ac_try_echo=$ac_try;; | |
5804 | esac | |
5805 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5806 | (eval "$ac_link") 2>&5 | |
bf3b7cd3 JD |
5807 | ac_status=$? |
5808 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5809 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
5810 | { (case "(($ac_try" in |
5811 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5812 | *) ac_try_echo=$ac_try;; | |
5813 | esac | |
5814 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5815 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
5816 | ac_status=$? |
5817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5818 | (exit $ac_status); }; }; then | |
5819 | ac_cv_sizeof_long=`cat conftest.val` | |
5820 | else | |
5821 | echo "$as_me: program exited with status $ac_status" >&5 | |
5822 | echo "$as_me: failed program was:" >&5 | |
5823 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5824 | ||
5825 | ( exit $ac_status ) | |
a6ccdbab EC |
5826 | if test "$ac_cv_type_long" = yes; then |
5827 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) | |
bf3b7cd3 | 5828 | See \`config.log' for more details." >&5 |
a6ccdbab | 5829 | echo "$as_me: error: cannot compute sizeof (long) |
bf3b7cd3 | 5830 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
5831 | { (exit 77); exit 77; }; } |
5832 | else | |
5833 | ac_cv_sizeof_long=0 | |
5834 | fi | |
bf3b7cd3 | 5835 | fi |
a6ccdbab | 5836 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5837 | fi |
5838 | rm -f conftest.val | |
bf3b7cd3 | 5839 | fi |
a6ccdbab EC |
5840 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 |
5841 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } | |
5842 | ||
5843 | ||
5844 | ||
bf3b7cd3 JD |
5845 | cat >>confdefs.h <<_ACEOF |
5846 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5847 | _ACEOF | |
5848 | ||
5849 | ||
a6ccdbab EC |
5850 | { echo "$as_me:$LINENO: checking for long long" >&5 |
5851 | echo $ECHO_N "checking for long long... $ECHO_C" >&6; } | |
5ec1c5e6 KC |
5852 | if test "${ac_cv_type_long_long+set}" = set; then |
5853 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5854 | else | |
5855 | cat >conftest.$ac_ext <<_ACEOF | |
5856 | /* confdefs.h. */ | |
5857 | _ACEOF | |
5858 | cat confdefs.h >>conftest.$ac_ext | |
5859 | cat >>conftest.$ac_ext <<_ACEOF | |
5860 | /* end confdefs.h. */ | |
5861 | $ac_includes_default | |
a6ccdbab | 5862 | typedef long long ac__type_new_; |
5ec1c5e6 KC |
5863 | int |
5864 | main () | |
5865 | { | |
a6ccdbab | 5866 | if ((ac__type_new_ *) 0) |
5ec1c5e6 | 5867 | return 0; |
a6ccdbab | 5868 | if (sizeof (ac__type_new_)) |
5ec1c5e6 KC |
5869 | return 0; |
5870 | ; | |
5871 | return 0; | |
5872 | } | |
5873 | _ACEOF | |
5874 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5875 | if { (ac_try="$ac_compile" |
5876 | case "(($ac_try" in | |
5877 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5878 | *) ac_try_echo=$ac_try;; | |
5879 | esac | |
5880 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5881 | (eval "$ac_compile") 2>conftest.er1 | |
5ec1c5e6 KC |
5882 | ac_status=$? |
5883 | grep -v '^ *+' conftest.er1 >conftest.err | |
5884 | rm -f conftest.er1 | |
5885 | cat conftest.err >&5 | |
5886 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5887 | (exit $ac_status); } && { |
5888 | test -z "$ac_c_werror_flag" || | |
5889 | test ! -s conftest.err | |
5890 | } && test -s conftest.$ac_objext; then | |
5ec1c5e6 KC |
5891 | ac_cv_type_long_long=yes |
5892 | else | |
5893 | echo "$as_me: failed program was:" >&5 | |
5894 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5895 | ||
a6ccdbab | 5896 | ac_cv_type_long_long=no |
5ec1c5e6 | 5897 | fi |
a6ccdbab EC |
5898 | |
5899 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ec1c5e6 | 5900 | fi |
a6ccdbab EC |
5901 | { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 |
5902 | echo "${ECHO_T}$ac_cv_type_long_long" >&6; } | |
5ec1c5e6 KC |
5903 | if test $ac_cv_type_long_long = yes; then |
5904 | ||
5905 | cat >>confdefs.h <<_ACEOF | |
5906 | #define HAVE_LONG_LONG 1 | |
5907 | _ACEOF | |
5908 | ||
a6ccdbab EC |
5909 | { echo "$as_me:$LINENO: checking for long long" >&5 |
5910 | echo $ECHO_N "checking for long long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5911 | if test "${ac_cv_type_long_long+set}" = set; then |
5912 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5913 | else | |
5914 | cat >conftest.$ac_ext <<_ACEOF | |
5915 | /* confdefs.h. */ | |
5916 | _ACEOF | |
5917 | cat confdefs.h >>conftest.$ac_ext | |
5918 | cat >>conftest.$ac_ext <<_ACEOF | |
5919 | /* end confdefs.h. */ | |
5920 | $ac_includes_default | |
a6ccdbab | 5921 | typedef long long ac__type_new_; |
bf3b7cd3 JD |
5922 | int |
5923 | main () | |
5924 | { | |
a6ccdbab | 5925 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 5926 | return 0; |
a6ccdbab | 5927 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
5928 | return 0; |
5929 | ; | |
5930 | return 0; | |
5931 | } | |
5932 | _ACEOF | |
5933 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5934 | if { (ac_try="$ac_compile" |
5935 | case "(($ac_try" in | |
5936 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5937 | *) ac_try_echo=$ac_try;; | |
5938 | esac | |
5939 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5940 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5941 | ac_status=$? |
5942 | grep -v '^ *+' conftest.er1 >conftest.err | |
5943 | rm -f conftest.er1 | |
5944 | cat conftest.err >&5 | |
5945 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
5946 | (exit $ac_status); } && { |
5947 | test -z "$ac_c_werror_flag" || | |
5948 | test ! -s conftest.err | |
5949 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5950 | ac_cv_type_long_long=yes |
5951 | else | |
5952 | echo "$as_me: failed program was:" >&5 | |
5953 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5954 | ||
a6ccdbab | 5955 | ac_cv_type_long_long=no |
bf3b7cd3 | 5956 | fi |
a6ccdbab EC |
5957 | |
5958 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5959 | fi |
a6ccdbab EC |
5960 | { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 |
5961 | echo "${ECHO_T}$ac_cv_type_long_long" >&6; } | |
bf3b7cd3 | 5962 | |
a6ccdbab EC |
5963 | # The cast to long int works around a bug in the HP C Compiler |
5964 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5965 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5966 | # This bug is HP SR number 8606223364. | |
5967 | { echo "$as_me:$LINENO: checking size of long long" >&5 | |
5968 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5969 | if test "${ac_cv_sizeof_long_long+set}" = set; then |
5970 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5971 | else | |
bf3b7cd3 JD |
5972 | if test "$cross_compiling" = yes; then |
5973 | # Depending upon the size, compute the lo and hi bounds. | |
5974 | cat >conftest.$ac_ext <<_ACEOF | |
5975 | /* confdefs.h. */ | |
5976 | _ACEOF | |
5977 | cat confdefs.h >>conftest.$ac_ext | |
5978 | cat >>conftest.$ac_ext <<_ACEOF | |
5979 | /* end confdefs.h. */ | |
5980 | $ac_includes_default | |
a6ccdbab | 5981 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
5982 | int |
5983 | main () | |
5984 | { | |
a6ccdbab | 5985 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
5986 | test_array [0] = 0 |
5987 | ||
5988 | ; | |
5989 | return 0; | |
5990 | } | |
5991 | _ACEOF | |
5992 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
5993 | if { (ac_try="$ac_compile" |
5994 | case "(($ac_try" in | |
5995 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5996 | *) ac_try_echo=$ac_try;; | |
5997 | esac | |
5998 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5999 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6000 | ac_status=$? |
6001 | grep -v '^ *+' conftest.er1 >conftest.err | |
6002 | rm -f conftest.er1 | |
6003 | cat conftest.err >&5 | |
6004 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6005 | (exit $ac_status); } && { |
6006 | test -z "$ac_c_werror_flag" || | |
6007 | test ! -s conftest.err | |
6008 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6009 | ac_lo=0 ac_mid=0 |
6010 | while :; do | |
6011 | cat >conftest.$ac_ext <<_ACEOF | |
6012 | /* confdefs.h. */ | |
6013 | _ACEOF | |
6014 | cat confdefs.h >>conftest.$ac_ext | |
6015 | cat >>conftest.$ac_ext <<_ACEOF | |
6016 | /* end confdefs.h. */ | |
6017 | $ac_includes_default | |
a6ccdbab | 6018 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6019 | int |
6020 | main () | |
6021 | { | |
a6ccdbab | 6022 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6023 | test_array [0] = 0 |
6024 | ||
6025 | ; | |
6026 | return 0; | |
6027 | } | |
6028 | _ACEOF | |
6029 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6030 | if { (ac_try="$ac_compile" |
6031 | case "(($ac_try" in | |
6032 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6033 | *) ac_try_echo=$ac_try;; | |
6034 | esac | |
6035 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6036 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6037 | ac_status=$? |
6038 | grep -v '^ *+' conftest.er1 >conftest.err | |
6039 | rm -f conftest.er1 | |
6040 | cat conftest.err >&5 | |
6041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6042 | (exit $ac_status); } && { |
6043 | test -z "$ac_c_werror_flag" || | |
6044 | test ! -s conftest.err | |
6045 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6046 | ac_hi=$ac_mid; break |
6047 | else | |
6048 | echo "$as_me: failed program was:" >&5 | |
6049 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6050 | ||
a6ccdbab EC |
6051 | ac_lo=`expr $ac_mid + 1` |
6052 | if test $ac_lo -le $ac_mid; then | |
6053 | ac_lo= ac_hi= | |
6054 | break | |
6055 | fi | |
6056 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 6057 | fi |
a6ccdbab EC |
6058 | |
6059 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6060 | done |
6061 | else | |
6062 | echo "$as_me: failed program was:" >&5 | |
6063 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6064 | ||
a6ccdbab | 6065 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
6066 | /* confdefs.h. */ |
6067 | _ACEOF | |
6068 | cat confdefs.h >>conftest.$ac_ext | |
6069 | cat >>conftest.$ac_ext <<_ACEOF | |
6070 | /* end confdefs.h. */ | |
6071 | $ac_includes_default | |
a6ccdbab | 6072 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6073 | int |
6074 | main () | |
6075 | { | |
a6ccdbab | 6076 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
6077 | test_array [0] = 0 |
6078 | ||
6079 | ; | |
6080 | return 0; | |
6081 | } | |
6082 | _ACEOF | |
6083 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6084 | if { (ac_try="$ac_compile" |
6085 | case "(($ac_try" in | |
6086 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6087 | *) ac_try_echo=$ac_try;; | |
6088 | esac | |
6089 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6090 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6091 | ac_status=$? |
6092 | grep -v '^ *+' conftest.er1 >conftest.err | |
6093 | rm -f conftest.er1 | |
6094 | cat conftest.err >&5 | |
6095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6096 | (exit $ac_status); } && { |
6097 | test -z "$ac_c_werror_flag" || | |
6098 | test ! -s conftest.err | |
6099 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6100 | ac_hi=-1 ac_mid=-1 |
6101 | while :; do | |
6102 | cat >conftest.$ac_ext <<_ACEOF | |
6103 | /* confdefs.h. */ | |
6104 | _ACEOF | |
6105 | cat confdefs.h >>conftest.$ac_ext | |
6106 | cat >>conftest.$ac_ext <<_ACEOF | |
6107 | /* end confdefs.h. */ | |
6108 | $ac_includes_default | |
a6ccdbab | 6109 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6110 | int |
6111 | main () | |
6112 | { | |
a6ccdbab | 6113 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
6114 | test_array [0] = 0 |
6115 | ||
6116 | ; | |
6117 | return 0; | |
6118 | } | |
6119 | _ACEOF | |
6120 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6121 | if { (ac_try="$ac_compile" |
6122 | case "(($ac_try" in | |
6123 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6124 | *) ac_try_echo=$ac_try;; | |
6125 | esac | |
6126 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6127 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6128 | ac_status=$? |
6129 | grep -v '^ *+' conftest.er1 >conftest.err | |
6130 | rm -f conftest.er1 | |
6131 | cat conftest.err >&5 | |
6132 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6133 | (exit $ac_status); } && { |
6134 | test -z "$ac_c_werror_flag" || | |
6135 | test ! -s conftest.err | |
6136 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6137 | ac_lo=$ac_mid; break |
6138 | else | |
6139 | echo "$as_me: failed program was:" >&5 | |
6140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6141 | ||
a6ccdbab EC |
6142 | ac_hi=`expr '(' $ac_mid ')' - 1` |
6143 | if test $ac_mid -le $ac_hi; then | |
6144 | ac_lo= ac_hi= | |
6145 | break | |
6146 | fi | |
6147 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 6148 | fi |
a6ccdbab EC |
6149 | |
6150 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6151 | done |
6152 | else | |
6153 | echo "$as_me: failed program was:" >&5 | |
6154 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6155 | ||
a6ccdbab | 6156 | ac_lo= ac_hi= |
bf3b7cd3 | 6157 | fi |
a6ccdbab EC |
6158 | |
6159 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 6160 | fi |
a6ccdbab EC |
6161 | |
6162 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6163 | # Binary search between lo and hi bounds. |
6164 | while test "x$ac_lo" != "x$ac_hi"; do | |
6165 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
6166 | cat >conftest.$ac_ext <<_ACEOF | |
6167 | /* confdefs.h. */ | |
6168 | _ACEOF | |
6169 | cat confdefs.h >>conftest.$ac_ext | |
6170 | cat >>conftest.$ac_ext <<_ACEOF | |
6171 | /* end confdefs.h. */ | |
6172 | $ac_includes_default | |
a6ccdbab | 6173 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6174 | int |
6175 | main () | |
6176 | { | |
a6ccdbab | 6177 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6178 | test_array [0] = 0 |
6179 | ||
6180 | ; | |
6181 | return 0; | |
6182 | } | |
6183 | _ACEOF | |
6184 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6185 | if { (ac_try="$ac_compile" |
6186 | case "(($ac_try" in | |
6187 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6188 | *) ac_try_echo=$ac_try;; | |
6189 | esac | |
6190 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6191 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6192 | ac_status=$? |
6193 | grep -v '^ *+' conftest.er1 >conftest.err | |
6194 | rm -f conftest.er1 | |
6195 | cat conftest.err >&5 | |
6196 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6197 | (exit $ac_status); } && { |
6198 | test -z "$ac_c_werror_flag" || | |
6199 | test ! -s conftest.err | |
6200 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6201 | ac_hi=$ac_mid |
6202 | else | |
6203 | echo "$as_me: failed program was:" >&5 | |
6204 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6205 | ||
a6ccdbab | 6206 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 6207 | fi |
a6ccdbab EC |
6208 | |
6209 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6210 | done |
6211 | case $ac_lo in | |
6212 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
a6ccdbab EC |
6213 | '') if test "$ac_cv_type_long_long" = yes; then |
6214 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) | |
bf3b7cd3 | 6215 | See \`config.log' for more details." >&5 |
a6ccdbab | 6216 | echo "$as_me: error: cannot compute sizeof (long long) |
bf3b7cd3 | 6217 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
6218 | { (exit 77); exit 77; }; } |
6219 | else | |
6220 | ac_cv_sizeof_long_long=0 | |
6221 | fi ;; | |
bf3b7cd3 | 6222 | esac |
bf3b7cd3 JD |
6223 | else |
6224 | cat >conftest.$ac_ext <<_ACEOF | |
6225 | /* confdefs.h. */ | |
6226 | _ACEOF | |
6227 | cat confdefs.h >>conftest.$ac_ext | |
6228 | cat >>conftest.$ac_ext <<_ACEOF | |
6229 | /* end confdefs.h. */ | |
6230 | $ac_includes_default | |
a6ccdbab EC |
6231 | typedef long long ac__type_sizeof_; |
6232 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
6233 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
6234 | #include <stdio.h> |
6235 | #include <stdlib.h> | |
6236 | int | |
6237 | main () | |
6238 | { | |
6239 | ||
6240 | FILE *f = fopen ("conftest.val", "w"); | |
6241 | if (! f) | |
a6ccdbab EC |
6242 | return 1; |
6243 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 6244 | { |
a6ccdbab EC |
6245 | long int i = longval (); |
6246 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6247 | return 1; | |
bf3b7cd3 JD |
6248 | fprintf (f, "%ld\n", i); |
6249 | } | |
6250 | else | |
6251 | { | |
a6ccdbab EC |
6252 | unsigned long int i = ulongval (); |
6253 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6254 | return 1; | |
bf3b7cd3 JD |
6255 | fprintf (f, "%lu\n", i); |
6256 | } | |
a6ccdbab | 6257 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
6258 | |
6259 | ; | |
6260 | return 0; | |
6261 | } | |
6262 | _ACEOF | |
6263 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
6264 | if { (ac_try="$ac_link" |
6265 | case "(($ac_try" in | |
6266 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6267 | *) ac_try_echo=$ac_try;; | |
6268 | esac | |
6269 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6270 | (eval "$ac_link") 2>&5 | |
bf3b7cd3 JD |
6271 | ac_status=$? |
6272 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6273 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
6274 | { (case "(($ac_try" in |
6275 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6276 | *) ac_try_echo=$ac_try;; | |
6277 | esac | |
6278 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6279 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
6280 | ac_status=$? |
6281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6282 | (exit $ac_status); }; }; then | |
6283 | ac_cv_sizeof_long_long=`cat conftest.val` | |
6284 | else | |
6285 | echo "$as_me: program exited with status $ac_status" >&5 | |
6286 | echo "$as_me: failed program was:" >&5 | |
6287 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6288 | ||
6289 | ( exit $ac_status ) | |
a6ccdbab EC |
6290 | if test "$ac_cv_type_long_long" = yes; then |
6291 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) | |
bf3b7cd3 | 6292 | See \`config.log' for more details." >&5 |
a6ccdbab | 6293 | echo "$as_me: error: cannot compute sizeof (long long) |
bf3b7cd3 | 6294 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
6295 | { (exit 77); exit 77; }; } |
6296 | else | |
6297 | ac_cv_sizeof_long_long=0 | |
6298 | fi | |
bf3b7cd3 | 6299 | fi |
a6ccdbab | 6300 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
6301 | fi |
6302 | rm -f conftest.val | |
bf3b7cd3 | 6303 | fi |
a6ccdbab EC |
6304 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 |
6305 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } | |
6306 | ||
6307 | ||
6308 | ||
bf3b7cd3 JD |
6309 | cat >>confdefs.h <<_ACEOF |
6310 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
6311 | _ACEOF | |
6312 | ||
6313 | ||
6314 | fi | |
5ec1c5e6 | 6315 | |
a6ccdbab EC |
6316 | { echo "$as_me:$LINENO: checking for __int64" >&5 |
6317 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6; } | |
5ec1c5e6 KC |
6318 | if test "${ac_cv_type___int64+set}" = set; then |
6319 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6320 | else | |
6321 | cat >conftest.$ac_ext <<_ACEOF | |
6322 | /* confdefs.h. */ | |
6323 | _ACEOF | |
6324 | cat confdefs.h >>conftest.$ac_ext | |
6325 | cat >>conftest.$ac_ext <<_ACEOF | |
6326 | /* end confdefs.h. */ | |
6327 | $ac_includes_default | |
a6ccdbab | 6328 | typedef __int64 ac__type_new_; |
5ec1c5e6 KC |
6329 | int |
6330 | main () | |
6331 | { | |
a6ccdbab | 6332 | if ((ac__type_new_ *) 0) |
5ec1c5e6 | 6333 | return 0; |
a6ccdbab | 6334 | if (sizeof (ac__type_new_)) |
5ec1c5e6 KC |
6335 | return 0; |
6336 | ; | |
6337 | return 0; | |
6338 | } | |
6339 | _ACEOF | |
6340 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6341 | if { (ac_try="$ac_compile" |
6342 | case "(($ac_try" in | |
6343 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6344 | *) ac_try_echo=$ac_try;; | |
6345 | esac | |
6346 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6347 | (eval "$ac_compile") 2>conftest.er1 | |
5ec1c5e6 KC |
6348 | ac_status=$? |
6349 | grep -v '^ *+' conftest.er1 >conftest.err | |
6350 | rm -f conftest.er1 | |
6351 | cat conftest.err >&5 | |
6352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6353 | (exit $ac_status); } && { |
6354 | test -z "$ac_c_werror_flag" || | |
6355 | test ! -s conftest.err | |
6356 | } && test -s conftest.$ac_objext; then | |
5ec1c5e6 KC |
6357 | ac_cv_type___int64=yes |
6358 | else | |
6359 | echo "$as_me: failed program was:" >&5 | |
6360 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6361 | ||
a6ccdbab | 6362 | ac_cv_type___int64=no |
5ec1c5e6 | 6363 | fi |
a6ccdbab EC |
6364 | |
6365 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ec1c5e6 | 6366 | fi |
a6ccdbab EC |
6367 | { echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
6368 | echo "${ECHO_T}$ac_cv_type___int64" >&6; } | |
5ec1c5e6 KC |
6369 | if test $ac_cv_type___int64 = yes; then |
6370 | ||
6371 | cat >>confdefs.h <<_ACEOF | |
6372 | #define HAVE___INT64 1 | |
6373 | _ACEOF | |
6374 | ||
a6ccdbab EC |
6375 | { echo "$as_me:$LINENO: checking for __int64" >&5 |
6376 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
6377 | if test "${ac_cv_type___int64+set}" = set; then |
6378 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6379 | else | |
ba479fd2 | 6380 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6381 | /* confdefs.h. */ |
6382 | _ACEOF | |
6383 | cat confdefs.h >>conftest.$ac_ext | |
6384 | cat >>conftest.$ac_ext <<_ACEOF | |
6385 | /* end confdefs.h. */ | |
bf3b7cd3 | 6386 | $ac_includes_default |
a6ccdbab | 6387 | typedef __int64 ac__type_new_; |
ba479fd2 NN |
6388 | int |
6389 | main () | |
6390 | { | |
a6ccdbab | 6391 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 6392 | return 0; |
a6ccdbab | 6393 | if (sizeof (ac__type_new_)) |
bf3b7cd3 | 6394 | return 0; |
ba479fd2 NN |
6395 | ; |
6396 | return 0; | |
6397 | } | |
6398 | _ACEOF | |
6399 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6400 | if { (ac_try="$ac_compile" |
6401 | case "(($ac_try" in | |
6402 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6403 | *) ac_try_echo=$ac_try;; | |
6404 | esac | |
6405 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6406 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6407 | ac_status=$? |
86da66b5 HPN |
6408 | grep -v '^ *+' conftest.er1 >conftest.err |
6409 | rm -f conftest.er1 | |
6410 | cat conftest.err >&5 | |
ba479fd2 | 6411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
6412 | (exit $ac_status); } && { |
6413 | test -z "$ac_c_werror_flag" || | |
6414 | test ! -s conftest.err | |
6415 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6416 | ac_cv_type___int64=yes |
75b6f3fd | 6417 | else |
ba479fd2 NN |
6418 | echo "$as_me: failed program was:" >&5 |
6419 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6420 | ||
a6ccdbab | 6421 | ac_cv_type___int64=no |
75b6f3fd | 6422 | fi |
a6ccdbab EC |
6423 | |
6424 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
75b6f3fd | 6425 | fi |
a6ccdbab EC |
6426 | { echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
6427 | echo "${ECHO_T}$ac_cv_type___int64" >&6; } | |
75b6f3fd | 6428 | |
a6ccdbab EC |
6429 | # The cast to long int works around a bug in the HP C Compiler |
6430 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6431 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6432 | # This bug is HP SR number 8606223364. | |
6433 | { echo "$as_me:$LINENO: checking size of __int64" >&5 | |
6434 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6; } | |
bf3b7cd3 | 6435 | if test "${ac_cv_sizeof___int64+set}" = set; then |
ba479fd2 | 6436 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 6437 | else |
bf3b7cd3 JD |
6438 | if test "$cross_compiling" = yes; then |
6439 | # Depending upon the size, compute the lo and hi bounds. | |
6440 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6441 | /* confdefs.h. */ |
6442 | _ACEOF | |
6443 | cat confdefs.h >>conftest.$ac_ext | |
6444 | cat >>conftest.$ac_ext <<_ACEOF | |
6445 | /* end confdefs.h. */ | |
bf3b7cd3 | 6446 | $ac_includes_default |
a6ccdbab | 6447 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6448 | int |
6449 | main () | |
6450 | { | |
a6ccdbab | 6451 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
6452 | test_array [0] = 0 |
6453 | ||
ba479fd2 NN |
6454 | ; |
6455 | return 0; | |
6456 | } | |
6457 | _ACEOF | |
6458 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6459 | if { (ac_try="$ac_compile" |
6460 | case "(($ac_try" in | |
6461 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6462 | *) ac_try_echo=$ac_try;; | |
6463 | esac | |
6464 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6465 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6466 | ac_status=$? |
86da66b5 HPN |
6467 | grep -v '^ *+' conftest.er1 >conftest.err |
6468 | rm -f conftest.er1 | |
6469 | cat conftest.err >&5 | |
ba479fd2 | 6470 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
6471 | (exit $ac_status); } && { |
6472 | test -z "$ac_c_werror_flag" || | |
6473 | test ! -s conftest.err | |
6474 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6475 | ac_lo=0 ac_mid=0 |
6476 | while :; do | |
6477 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6478 | /* confdefs.h. */ |
6479 | _ACEOF | |
6480 | cat confdefs.h >>conftest.$ac_ext | |
6481 | cat >>conftest.$ac_ext <<_ACEOF | |
6482 | /* end confdefs.h. */ | |
bf3b7cd3 | 6483 | $ac_includes_default |
a6ccdbab | 6484 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6485 | int |
6486 | main () | |
6487 | { | |
a6ccdbab | 6488 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6489 | test_array [0] = 0 |
6490 | ||
ba479fd2 NN |
6491 | ; |
6492 | return 0; | |
6493 | } | |
6494 | _ACEOF | |
6495 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6496 | if { (ac_try="$ac_compile" |
6497 | case "(($ac_try" in | |
6498 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6499 | *) ac_try_echo=$ac_try;; | |
6500 | esac | |
6501 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6502 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6503 | ac_status=$? |
86da66b5 HPN |
6504 | grep -v '^ *+' conftest.er1 >conftest.err |
6505 | rm -f conftest.er1 | |
6506 | cat conftest.err >&5 | |
ba479fd2 | 6507 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
6508 | (exit $ac_status); } && { |
6509 | test -z "$ac_c_werror_flag" || | |
6510 | test ! -s conftest.err | |
6511 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6512 | ac_hi=$ac_mid; break |
75e93faa | 6513 | else |
ba479fd2 NN |
6514 | echo "$as_me: failed program was:" >&5 |
6515 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6516 | ||
a6ccdbab EC |
6517 | ac_lo=`expr $ac_mid + 1` |
6518 | if test $ac_lo -le $ac_mid; then | |
6519 | ac_lo= ac_hi= | |
6520 | break | |
6521 | fi | |
6522 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 6523 | fi |
a6ccdbab EC |
6524 | |
6525 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 6526 | done |
75e93faa | 6527 | else |
bf3b7cd3 JD |
6528 | echo "$as_me: failed program was:" >&5 |
6529 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6530 | ||
a6ccdbab | 6531 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6532 | /* confdefs.h. */ |
6533 | _ACEOF | |
6534 | cat confdefs.h >>conftest.$ac_ext | |
6535 | cat >>conftest.$ac_ext <<_ACEOF | |
6536 | /* end confdefs.h. */ | |
bf3b7cd3 | 6537 | $ac_includes_default |
a6ccdbab | 6538 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6539 | int |
6540 | main () | |
6541 | { | |
a6ccdbab | 6542 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
6543 | test_array [0] = 0 |
6544 | ||
ba479fd2 NN |
6545 | ; |
6546 | return 0; | |
6547 | } | |
6548 | _ACEOF | |
6549 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6550 | if { (ac_try="$ac_compile" |
6551 | case "(($ac_try" in | |
6552 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6553 | *) ac_try_echo=$ac_try;; | |
6554 | esac | |
6555 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6556 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6557 | ac_status=$? |
86da66b5 HPN |
6558 | grep -v '^ *+' conftest.er1 >conftest.err |
6559 | rm -f conftest.er1 | |
6560 | cat conftest.err >&5 | |
ba479fd2 | 6561 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
6562 | (exit $ac_status); } && { |
6563 | test -z "$ac_c_werror_flag" || | |
6564 | test ! -s conftest.err | |
6565 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6566 | ac_hi=-1 ac_mid=-1 |
6567 | while :; do | |
6568 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6569 | /* confdefs.h. */ |
6570 | _ACEOF | |
6571 | cat confdefs.h >>conftest.$ac_ext | |
6572 | cat >>conftest.$ac_ext <<_ACEOF | |
6573 | /* end confdefs.h. */ | |
bf3b7cd3 | 6574 | $ac_includes_default |
a6ccdbab | 6575 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6576 | int |
6577 | main () | |
6578 | { | |
a6ccdbab | 6579 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
6580 | test_array [0] = 0 |
6581 | ||
ba479fd2 NN |
6582 | ; |
6583 | return 0; | |
6584 | } | |
6585 | _ACEOF | |
6586 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6587 | if { (ac_try="$ac_compile" |
6588 | case "(($ac_try" in | |
6589 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6590 | *) ac_try_echo=$ac_try;; | |
6591 | esac | |
6592 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6593 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6594 | ac_status=$? |
86da66b5 HPN |
6595 | grep -v '^ *+' conftest.er1 >conftest.err |
6596 | rm -f conftest.er1 | |
6597 | cat conftest.err >&5 | |
ba479fd2 | 6598 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
6599 | (exit $ac_status); } && { |
6600 | test -z "$ac_c_werror_flag" || | |
6601 | test ! -s conftest.err | |
6602 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6603 | ac_lo=$ac_mid; break |
04cabffc | 6604 | else |
ba479fd2 NN |
6605 | echo "$as_me: failed program was:" >&5 |
6606 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6607 | ||
a6ccdbab EC |
6608 | ac_hi=`expr '(' $ac_mid ')' - 1` |
6609 | if test $ac_mid -le $ac_hi; then | |
6610 | ac_lo= ac_hi= | |
6611 | break | |
6612 | fi | |
6613 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 6614 | fi |
a6ccdbab EC |
6615 | |
6616 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6617 | done |
6618 | else | |
6619 | echo "$as_me: failed program was:" >&5 | |
6620 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 6621 | |
a6ccdbab | 6622 | ac_lo= ac_hi= |
414d23ae | 6623 | fi |
a6ccdbab EC |
6624 | |
6625 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
414d23ae | 6626 | fi |
a6ccdbab EC |
6627 | |
6628 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6629 | # Binary search between lo and hi bounds. |
6630 | while test "x$ac_lo" != "x$ac_hi"; do | |
6631 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 6632 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6633 | /* confdefs.h. */ |
6634 | _ACEOF | |
6635 | cat confdefs.h >>conftest.$ac_ext | |
6636 | cat >>conftest.$ac_ext <<_ACEOF | |
6637 | /* end confdefs.h. */ | |
bf3b7cd3 | 6638 | $ac_includes_default |
a6ccdbab | 6639 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6640 | int |
6641 | main () | |
6642 | { | |
a6ccdbab | 6643 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6644 | test_array [0] = 0 |
6645 | ||
ba479fd2 NN |
6646 | ; |
6647 | return 0; | |
6648 | } | |
6649 | _ACEOF | |
6650 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6651 | if { (ac_try="$ac_compile" |
6652 | case "(($ac_try" in | |
6653 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6654 | *) ac_try_echo=$ac_try;; | |
6655 | esac | |
6656 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6657 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6658 | ac_status=$? |
86da66b5 HPN |
6659 | grep -v '^ *+' conftest.er1 >conftest.err |
6660 | rm -f conftest.er1 | |
6661 | cat conftest.err >&5 | |
ba479fd2 | 6662 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
6663 | (exit $ac_status); } && { |
6664 | test -z "$ac_c_werror_flag" || | |
6665 | test ! -s conftest.err | |
6666 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6667 | ac_hi=$ac_mid |
75e93faa | 6668 | else |
ba479fd2 NN |
6669 | echo "$as_me: failed program was:" >&5 |
6670 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6671 | ||
a6ccdbab | 6672 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 6673 | fi |
a6ccdbab EC |
6674 | |
6675 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
414d23ae | 6676 | done |
bf3b7cd3 JD |
6677 | case $ac_lo in |
6678 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
a6ccdbab EC |
6679 | '') if test "$ac_cv_type___int64" = yes; then |
6680 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) | |
bf3b7cd3 | 6681 | See \`config.log' for more details." >&5 |
a6ccdbab | 6682 | echo "$as_me: error: cannot compute sizeof (__int64) |
bf3b7cd3 | 6683 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
6684 | { (exit 77); exit 77; }; } |
6685 | else | |
6686 | ac_cv_sizeof___int64=0 | |
6687 | fi ;; | |
bf3b7cd3 | 6688 | esac |
bf3b7cd3 JD |
6689 | else |
6690 | cat >conftest.$ac_ext <<_ACEOF | |
6691 | /* confdefs.h. */ | |
6692 | _ACEOF | |
6693 | cat confdefs.h >>conftest.$ac_ext | |
6694 | cat >>conftest.$ac_ext <<_ACEOF | |
6695 | /* end confdefs.h. */ | |
6696 | $ac_includes_default | |
a6ccdbab EC |
6697 | typedef __int64 ac__type_sizeof_; |
6698 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
6699 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
6700 | #include <stdio.h> |
6701 | #include <stdlib.h> | |
6702 | int | |
6703 | main () | |
6704 | { | |
414d23ae | 6705 | |
bf3b7cd3 JD |
6706 | FILE *f = fopen ("conftest.val", "w"); |
6707 | if (! f) | |
a6ccdbab EC |
6708 | return 1; |
6709 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 6710 | { |
a6ccdbab EC |
6711 | long int i = longval (); |
6712 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6713 | return 1; | |
bf3b7cd3 JD |
6714 | fprintf (f, "%ld\n", i); |
6715 | } | |
6716 | else | |
6717 | { | |
a6ccdbab EC |
6718 | unsigned long int i = ulongval (); |
6719 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6720 | return 1; | |
bf3b7cd3 JD |
6721 | fprintf (f, "%lu\n", i); |
6722 | } | |
a6ccdbab | 6723 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
6724 | |
6725 | ; | |
6726 | return 0; | |
6727 | } | |
6728 | _ACEOF | |
6729 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
6730 | if { (ac_try="$ac_link" |
6731 | case "(($ac_try" in | |
6732 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6733 | *) ac_try_echo=$ac_try;; | |
6734 | esac | |
6735 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6736 | (eval "$ac_link") 2>&5 | |
bf3b7cd3 JD |
6737 | ac_status=$? |
6738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6739 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
6740 | { (case "(($ac_try" in |
6741 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6742 | *) ac_try_echo=$ac_try;; | |
6743 | esac | |
6744 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6745 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
6746 | ac_status=$? |
6747 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6748 | (exit $ac_status); }; }; then | |
6749 | ac_cv_sizeof___int64=`cat conftest.val` | |
6750 | else | |
6751 | echo "$as_me: program exited with status $ac_status" >&5 | |
6752 | echo "$as_me: failed program was:" >&5 | |
6753 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6754 | |
bf3b7cd3 | 6755 | ( exit $ac_status ) |
a6ccdbab EC |
6756 | if test "$ac_cv_type___int64" = yes; then |
6757 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) | |
bf3b7cd3 | 6758 | See \`config.log' for more details." >&5 |
a6ccdbab | 6759 | echo "$as_me: error: cannot compute sizeof (__int64) |
bf3b7cd3 | 6760 | See \`config.log' for more details." >&2;} |
a6ccdbab EC |
6761 | { (exit 77); exit 77; }; } |
6762 | else | |
6763 | ac_cv_sizeof___int64=0 | |
6764 | fi | |
bf3b7cd3 | 6765 | fi |
a6ccdbab | 6766 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
6767 | fi |
6768 | rm -f conftest.val | |
bf3b7cd3 | 6769 | fi |
a6ccdbab EC |
6770 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
6771 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6; } | |
6772 | ||
6773 | ||
6774 | ||
ba479fd2 | 6775 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6776 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6777 | _ACEOF |
414d23ae | 6778 | |
cafe096b | 6779 | |
414d23ae HPN |
6780 | fi |
6781 | ||
5ec1c5e6 | 6782 | |
34a86c2b NN |
6783 | # --------------------- |
6784 | # Warnings and checking | |
6785 | # --------------------- | |
6786 | ||
b5472e1d NN |
6787 | # Check $CC warning features (if it's GCC). |
6788 | # We want to use -pedantic, but we don't want warnings about | |
6789 | # * 'long long' | |
6790 | # * variadic macros | |
89a42ac8 | 6791 | # * overlong strings |
b5472e1d NN |
6792 | # So, we only use -pedantic if we can disable those warnings. |
6793 | ||
a6ccdbab EC |
6794 | { echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 |
6795 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6; } | |
b5472e1d NN |
6796 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then |
6797 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6798 | else | |
6799 | save_CFLAGS="$CFLAGS" | |
6800 | CFLAGS="-Wno-long-long" | |
6801 | cat >conftest.$ac_ext <<_ACEOF | |
6802 | /* confdefs.h. */ | |
6803 | _ACEOF | |
6804 | cat confdefs.h >>conftest.$ac_ext | |
6805 | cat >>conftest.$ac_ext <<_ACEOF | |
6806 | /* end confdefs.h. */ | |
6807 | ||
6808 | _ACEOF | |
6809 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6810 | if { (ac_try="$ac_compile" |
6811 | case "(($ac_try" in | |
6812 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6813 | *) ac_try_echo=$ac_try;; | |
6814 | esac | |
6815 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6816 | (eval "$ac_compile") 2>conftest.er1 | |
b5472e1d NN |
6817 | ac_status=$? |
6818 | grep -v '^ *+' conftest.er1 >conftest.err | |
6819 | rm -f conftest.er1 | |
6820 | cat conftest.err >&5 | |
6821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6822 | (exit $ac_status); } && { |
6823 | test -z "$ac_c_werror_flag" || | |
6824 | test ! -s conftest.err | |
6825 | } && test -s conftest.$ac_objext; then | |
b5472e1d NN |
6826 | ac_cv_prog_cc_w_no_long_long=yes |
6827 | else | |
6828 | echo "$as_me: failed program was:" >&5 | |
6829 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6830 | ||
a6ccdbab | 6831 | ac_cv_prog_cc_w_no_long_long=no |
b5472e1d | 6832 | fi |
a6ccdbab EC |
6833 | |
6834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b5472e1d NN |
6835 | CFLAGS="$save_CFLAGS" |
6836 | ||
6837 | fi | |
a6ccdbab EC |
6838 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 |
6839 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6; } | |
b5472e1d | 6840 | |
a6ccdbab EC |
6841 | { echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 |
6842 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6; } | |
b5472e1d NN |
6843 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then |
6844 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6845 | else | |
6846 | save_CFLAGS="$CFLAGS" | |
6847 | CFLAGS="-Wno-variadic-macros" | |
6848 | cat >conftest.$ac_ext <<_ACEOF | |
6849 | /* confdefs.h. */ | |
6850 | _ACEOF | |
6851 | cat confdefs.h >>conftest.$ac_ext | |
6852 | cat >>conftest.$ac_ext <<_ACEOF | |
6853 | /* end confdefs.h. */ | |
6854 | ||
6855 | _ACEOF | |
6856 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6857 | if { (ac_try="$ac_compile" |
6858 | case "(($ac_try" in | |
6859 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6860 | *) ac_try_echo=$ac_try;; | |
6861 | esac | |
6862 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6863 | (eval "$ac_compile") 2>conftest.er1 | |
b5472e1d NN |
6864 | ac_status=$? |
6865 | grep -v '^ *+' conftest.er1 >conftest.err | |
6866 | rm -f conftest.er1 | |
6867 | cat conftest.err >&5 | |
6868 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6869 | (exit $ac_status); } && { |
6870 | test -z "$ac_c_werror_flag" || | |
6871 | test ! -s conftest.err | |
6872 | } && test -s conftest.$ac_objext; then | |
b5472e1d NN |
6873 | ac_cv_prog_cc_w_no_variadic_macros=yes |
6874 | else | |
6875 | echo "$as_me: failed program was:" >&5 | |
6876 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6877 | ||
a6ccdbab | 6878 | ac_cv_prog_cc_w_no_variadic_macros=no |
b5472e1d | 6879 | fi |
a6ccdbab EC |
6880 | |
6881 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b5472e1d NN |
6882 | CFLAGS="$save_CFLAGS" |
6883 | ||
6884 | fi | |
a6ccdbab EC |
6885 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 |
6886 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6; } | |
b5472e1d | 6887 | |
a6ccdbab EC |
6888 | { echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5 |
6889 | echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6; } | |
89a42ac8 ZW |
6890 | if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then |
6891 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6892 | else | |
6893 | save_CFLAGS="$CFLAGS" | |
6894 | CFLAGS="-Wno-overlength-strings" | |
6895 | cat >conftest.$ac_ext <<_ACEOF | |
6896 | /* confdefs.h. */ | |
6897 | _ACEOF | |
6898 | cat confdefs.h >>conftest.$ac_ext | |
6899 | cat >>conftest.$ac_ext <<_ACEOF | |
6900 | /* end confdefs.h. */ | |
6901 | ||
6902 | _ACEOF | |
6903 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6904 | if { (ac_try="$ac_compile" |
6905 | case "(($ac_try" in | |
6906 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6907 | *) ac_try_echo=$ac_try;; | |
6908 | esac | |
6909 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6910 | (eval "$ac_compile") 2>conftest.er1 | |
89a42ac8 ZW |
6911 | ac_status=$? |
6912 | grep -v '^ *+' conftest.er1 >conftest.err | |
6913 | rm -f conftest.er1 | |
6914 | cat conftest.err >&5 | |
6915 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6916 | (exit $ac_status); } && { |
6917 | test -z "$ac_c_werror_flag" || | |
6918 | test ! -s conftest.err | |
6919 | } && test -s conftest.$ac_objext; then | |
89a42ac8 ZW |
6920 | ac_cv_prog_cc_w_no_overlength_strings=yes |
6921 | else | |
6922 | echo "$as_me: failed program was:" >&5 | |
6923 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6924 | ||
a6ccdbab | 6925 | ac_cv_prog_cc_w_no_overlength_strings=no |
89a42ac8 | 6926 | fi |
a6ccdbab EC |
6927 | |
6928 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
89a42ac8 ZW |
6929 | CFLAGS="$save_CFLAGS" |
6930 | ||
6931 | fi | |
a6ccdbab EC |
6932 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5 |
6933 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6; } | |
89a42ac8 | 6934 | |
34a86c2b | 6935 | strict1_warn= |
b5472e1d | 6936 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
89a42ac8 ZW |
6937 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes \ |
6938 | && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then | |
6939 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" | |
34a86c2b NN |
6940 | fi |
6941 | ||
643d3bd2 | 6942 | # Add -Wold-style-definition if it's accepted |
a6ccdbab EC |
6943 | { echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 |
6944 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6; } | |
643d3bd2 NN |
6945 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then |
6946 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6947 | else | |
6948 | save_CFLAGS="$CFLAGS" | |
6949 | CFLAGS="-Wold-style-definition" | |
6950 | cat >conftest.$ac_ext <<_ACEOF | |
6951 | /* confdefs.h. */ | |
6952 | _ACEOF | |
6953 | cat confdefs.h >>conftest.$ac_ext | |
6954 | cat >>conftest.$ac_ext <<_ACEOF | |
6955 | /* end confdefs.h. */ | |
6956 | ||
6957 | _ACEOF | |
6958 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
6959 | if { (ac_try="$ac_compile" |
6960 | case "(($ac_try" in | |
6961 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6962 | *) ac_try_echo=$ac_try;; | |
6963 | esac | |
6964 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6965 | (eval "$ac_compile") 2>conftest.er1 | |
643d3bd2 NN |
6966 | ac_status=$? |
6967 | grep -v '^ *+' conftest.er1 >conftest.err | |
6968 | rm -f conftest.er1 | |
6969 | cat conftest.err >&5 | |
6970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
6971 | (exit $ac_status); } && { |
6972 | test -z "$ac_c_werror_flag" || | |
6973 | test ! -s conftest.err | |
6974 | } && test -s conftest.$ac_objext; then | |
643d3bd2 NN |
6975 | ac_cv_prog_cc_w_old_style_definition=yes |
6976 | else | |
6977 | echo "$as_me: failed program was:" >&5 | |
6978 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6979 | ||
a6ccdbab | 6980 | ac_cv_prog_cc_w_old_style_definition=no |
643d3bd2 | 6981 | fi |
a6ccdbab EC |
6982 | |
6983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
643d3bd2 NN |
6984 | CFLAGS="$save_CFLAGS" |
6985 | ||
6986 | fi | |
a6ccdbab EC |
6987 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 |
6988 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6; } | |
643d3bd2 NN |
6989 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then |
6990 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6991 | fi | |
6992 | ||
ac0f3f39 | 6993 | # Add -Wmissing-format-attribute if it's accepted |
a6ccdbab EC |
6994 | { echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 |
6995 | echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6; } | |
ac0f3f39 KG |
6996 | if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then |
6997 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6998 | else | |
6999 | save_CFLAGS="$CFLAGS" | |
7000 | CFLAGS="-Wmissing-format-attribute" | |
7001 | cat >conftest.$ac_ext <<_ACEOF | |
7002 | /* confdefs.h. */ | |
7003 | _ACEOF | |
7004 | cat confdefs.h >>conftest.$ac_ext | |
7005 | cat >>conftest.$ac_ext <<_ACEOF | |
7006 | /* end confdefs.h. */ | |
7007 | ||
7008 | _ACEOF | |
7009 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
7010 | if { (ac_try="$ac_compile" |
7011 | case "(($ac_try" in | |
7012 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7013 | *) ac_try_echo=$ac_try;; | |
7014 | esac | |
7015 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7016 | (eval "$ac_compile") 2>conftest.er1 | |
ac0f3f39 KG |
7017 | ac_status=$? |
7018 | grep -v '^ *+' conftest.er1 >conftest.err | |
7019 | rm -f conftest.er1 | |
7020 | cat conftest.err >&5 | |
7021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
7022 | (exit $ac_status); } && { |
7023 | test -z "$ac_c_werror_flag" || | |
7024 | test ! -s conftest.err | |
7025 | } && test -s conftest.$ac_objext; then | |
ac0f3f39 KG |
7026 | ac_cv_prog_cc_w_missing_format_attribute=yes |
7027 | else | |
7028 | echo "$as_me: failed program was:" >&5 | |
7029 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7030 | ||
a6ccdbab | 7031 | ac_cv_prog_cc_w_missing_format_attribute=no |
ac0f3f39 | 7032 | fi |
a6ccdbab EC |
7033 | |
7034 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
ac0f3f39 KG |
7035 | CFLAGS="$save_CFLAGS" |
7036 | ||
7037 | fi | |
a6ccdbab EC |
7038 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 |
7039 | echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6; } | |
ac0f3f39 KG |
7040 | if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then |
7041 | strict1_warn="${strict1_warn} -Wmissing-format-attribute" | |
7042 | fi | |
7043 | ||
09a9c095 | 7044 | # Enable -Werror, period. |
a6ccdbab | 7045 | # Check whether --enable-werror_always was given. |
09a9c095 | 7046 | if test "${enable_werror_always+set}" = set; then |
a6ccdbab | 7047 | enableval=$enable_werror_always; |
09a9c095 NN |
7048 | else |
7049 | enable_werror_always=no | |
a6ccdbab EC |
7050 | fi |
7051 | ||
09a9c095 NN |
7052 | if test x${enable_werror_always} = xyes ; then |
7053 | strict1_warn="${strict1_warn} -Werror" | |
7054 | WERROR=-Werror | |
7055 | fi | |
7056 | ||
ac0f3f39 KG |
7057 | |
7058 | ||
373477bb | 7059 | # Get C++ compatibility warning flag, if supported. |
a6ccdbab EC |
7060 | { echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5 |
7061 | echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6; } | |
373477bb GDR |
7062 | if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then |
7063 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7064 | else | |
7065 | save_CFLAGS="$CFLAGS" | |
7066 | CFLAGS="-Wc++-compat" | |
7067 | cat >conftest.$ac_ext <<_ACEOF | |
7068 | /* confdefs.h. */ | |
7069 | _ACEOF | |
7070 | cat confdefs.h >>conftest.$ac_ext | |
7071 | cat >>conftest.$ac_ext <<_ACEOF | |
7072 | /* end confdefs.h. */ | |
7073 | ||
7074 | _ACEOF | |
7075 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
7076 | if { (ac_try="$ac_compile" |
7077 | case "(($ac_try" in | |
7078 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7079 | *) ac_try_echo=$ac_try;; | |
7080 | esac | |
7081 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7082 | (eval "$ac_compile") 2>conftest.er1 | |
373477bb GDR |
7083 | ac_status=$? |
7084 | grep -v '^ *+' conftest.er1 >conftest.err | |
7085 | rm -f conftest.er1 | |
7086 | cat conftest.err >&5 | |
7087 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
7088 | (exit $ac_status); } && { |
7089 | test -z "$ac_c_werror_flag" || | |
7090 | test ! -s conftest.err | |
7091 | } && test -s conftest.$ac_objext; then | |
373477bb GDR |
7092 | ac_cv_prog_cc_w_cxx_compat=yes |
7093 | else | |
7094 | echo "$as_me: failed program was:" >&5 | |
7095 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7096 | ||
a6ccdbab | 7097 | ac_cv_prog_cc_w_cxx_compat=no |
373477bb | 7098 | fi |
a6ccdbab EC |
7099 | |
7100 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
373477bb GDR |
7101 | CFLAGS="$save_CFLAGS" |
7102 | ||
7103 | fi | |
a6ccdbab EC |
7104 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5 |
7105 | echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6; } | |
373477bb GDR |
7106 | if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then |
7107 | cxx_compat_warn="-Wc++-compat" | |
7108 | fi | |
7109 | ||
7110 | ||
7111 | ||
ba479fd2 | 7112 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
7113 | # That's useful for people building cross-compilers, or just running a |
7114 | # quick `make'. | |
7115 | warn_cflags= | |
7116 | if test "x$GCC" = "xyes"; then | |
7117 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
7118 | fi | |
7119 | ||
7120 | ||
dd859b8a | 7121 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
7122 | is_release= |
7123 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
7124 | is_release=yes | |
7125 | fi | |
a6ccdbab | 7126 | # Check whether --enable-werror was given. |
dd859b8a | 7127 | if test "${enable_werror+set}" = set; then |
a6ccdbab | 7128 | enableval=$enable_werror; |
dd859b8a | 7129 | else |
06c37c96 NS |
7130 | if test x$is_release = x ; then |
7131 | # Default to "yes" on development branches. | |
dd859b8a | 7132 | enable_werror=yes |
06c37c96 NS |
7133 | else |
7134 | # Default to "no" on release branches. | |
7135 | enable_werror=no | |
7136 | fi | |
a6ccdbab EC |
7137 | fi |
7138 | ||
dd859b8a KG |
7139 | if test x$enable_werror = xyes ; then |
7140 | WERROR=-Werror | |
7141 | fi | |
7142 | ||
7143 | ||
414d23ae | 7144 | # Enable expensive internal checks |
a6ccdbab | 7145 | # Check whether --enable-checking was given. |
414d23ae | 7146 | if test "${enable_checking+set}" = set; then |
a6ccdbab | 7147 | enableval=$enable_checking; ac_checking_flags="${enableval}" |
e1bbfc5c NS |
7148 | else |
7149 | ||
7150 | # Determine the default checks. | |
7151 | if test x$is_release = x ; then | |
7152 | ac_checking_flags=yes | |
7153 | else | |
7154 | ac_checking_flags=release | |
7155 | fi | |
a6ccdbab EC |
7156 | fi |
7157 | ||
e1bbfc5c NS |
7158 | ac_assert_checking=1 |
7159 | ac_checking= | |
cdce5c16 NS |
7160 | ac_fold_checking= |
7161 | ac_gc_checking= | |
7162 | ac_gc_always_collect= | |
414d23ae HPN |
7163 | ac_rtl_checking= |
7164 | ac_rtlflag_checking= | |
b53ef395 | 7165 | ac_runtime_checking=1 |
cdce5c16 NS |
7166 | ac_tree_checking= |
7167 | ac_valgrind_checking= | |
e1bbfc5c NS |
7168 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
7169 | for check in $ac_checking_flags | |
7170 | do | |
7171 | case $check in | |
cdce5c16 | 7172 | # these set all the flags to specific states |
e1bbfc5c | 7173 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
7174 | ac_fold_checking= ; ac_gc_checking=1 ; |
7175 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 7176 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
7177 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
7178 | no|none) ac_assert_checking= ; ac_checking= ; | |
7179 | ac_fold_checking= ; ac_gc_checking= ; | |
7180 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 7181 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 7182 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 7183 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
7184 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
7185 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
7186 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
7187 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
7188 | release) ac_assert_checking=1 ; ac_checking= ; | |
7189 | ac_fold_checking= ; ac_gc_checking= ; | |
7190 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
7191 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
7192 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
7193 | # these enable particular checks | |
e1bbfc5c NS |
7194 | assert) ac_assert_checking=1 ;; |
7195 | fold) ac_fold_checking=1 ;; | |
7196 | gc) ac_gc_checking=1 ;; | |
7197 | gcac) ac_gc_always_collect=1 ;; | |
7198 | misc) ac_checking=1 ;; | |
e1bbfc5c | 7199 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 7200 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 7201 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 7202 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 7203 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 7204 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
7205 | echo "$as_me: error: unknown check category $check" >&2;} |
7206 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
7207 | esac |
7208 | done | |
7209 | IFS="$ac_save_IFS" | |
06c37c96 | 7210 | |
ba479fd2 NN |
7211 | nocommon_flag="" |
7212 | if test x$ac_checking != x ; then | |
7213 | ||
7214 | cat >>confdefs.h <<\_ACEOF | |
7215 | #define ENABLE_CHECKING 1 | |
7216 | _ACEOF | |
7217 | ||
7218 | nocommon_flag=-fno-common | |
7219 | fi | |
7220 | ||
06c37c96 NS |
7221 | if test x$ac_assert_checking != x ; then |
7222 | ||
7223 | cat >>confdefs.h <<\_ACEOF | |
7224 | #define ENABLE_ASSERT_CHECKING 1 | |
7225 | _ACEOF | |
7226 | ||
b53ef395 | 7227 | fi |
232b67d9 | 7228 | |
b53ef395 NS |
7229 | if test x$ac_runtime_checking != x ; then |
7230 | ||
7231 | cat >>confdefs.h <<\_ACEOF | |
7232 | #define ENABLE_RUNTIME_CHECKING 1 | |
7233 | _ACEOF | |
7234 | ||
06c37c96 | 7235 | fi |
ba479fd2 NN |
7236 | if test x$ac_tree_checking != x ; then |
7237 | ||
7238 | cat >>confdefs.h <<\_ACEOF | |
7239 | #define ENABLE_TREE_CHECKING 1 | |
7240 | _ACEOF | |
7241 | ||
13f05fd0 | 7242 | TREEBROWSER=tree-browser.o |
ba479fd2 | 7243 | fi |
13f05fd0 | 7244 | |
ba479fd2 NN |
7245 | if test x$ac_rtl_checking != x ; then |
7246 | ||
7247 | cat >>confdefs.h <<\_ACEOF | |
7248 | #define ENABLE_RTL_CHECKING 1 | |
7249 | _ACEOF | |
7250 | ||
7251 | fi | |
7252 | if test x$ac_rtlflag_checking != x ; then | |
7253 | ||
7254 | cat >>confdefs.h <<\_ACEOF | |
7255 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
7256 | _ACEOF | |
7257 | ||
7258 | fi | |
7259 | if test x$ac_gc_checking != x ; then | |
7260 | ||
7261 | cat >>confdefs.h <<\_ACEOF | |
7262 | #define ENABLE_GC_CHECKING 1 | |
7263 | _ACEOF | |
7264 | ||
7265 | fi | |
7266 | if test x$ac_gc_always_collect != x ; then | |
7267 | ||
7268 | cat >>confdefs.h <<\_ACEOF | |
7269 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
7270 | _ACEOF | |
7271 | ||
7272 | fi | |
7273 | if test x$ac_fold_checking != x ; then | |
7274 | ||
7275 | cat >>confdefs.h <<\_ACEOF | |
7276 | #define ENABLE_FOLD_CHECKING 1 | |
7277 | _ACEOF | |
7278 | ||
7279 | fi | |
7280 | valgrind_path_defines= | |
7281 | valgrind_command= | |
7282 | ||
ba479fd2 | 7283 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
a6ccdbab EC |
7284 | { echo "$as_me:$LINENO: checking for valgrind.h" >&5 |
7285 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
7286 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
7287 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7288 | fi | |
a6ccdbab EC |
7289 | { echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
7290 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; } | |
ba479fd2 NN |
7291 | else |
7292 | # Is the header compilable? | |
a6ccdbab EC |
7293 | { echo "$as_me:$LINENO: checking valgrind.h usability" >&5 |
7294 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6; } | |
ba479fd2 | 7295 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7296 | /* confdefs.h. */ |
7297 | _ACEOF | |
7298 | cat confdefs.h >>conftest.$ac_ext | |
7299 | cat >>conftest.$ac_ext <<_ACEOF | |
7300 | /* end confdefs.h. */ | |
7301 | $ac_includes_default | |
63cf211a | 7302 | #include <valgrind.h> |
ba479fd2 NN |
7303 | _ACEOF |
7304 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
7305 | if { (ac_try="$ac_compile" |
7306 | case "(($ac_try" in | |
7307 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7308 | *) ac_try_echo=$ac_try;; | |
7309 | esac | |
7310 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7311 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 7312 | ac_status=$? |
86da66b5 HPN |
7313 | grep -v '^ *+' conftest.er1 >conftest.err |
7314 | rm -f conftest.er1 | |
7315 | cat conftest.err >&5 | |
ba479fd2 | 7316 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
7317 | (exit $ac_status); } && { |
7318 | test -z "$ac_c_werror_flag" || | |
7319 | test ! -s conftest.err | |
7320 | } && test -s conftest.$ac_objext; then | |
ba479fd2 NN |
7321 | ac_header_compiler=yes |
7322 | else | |
7323 | echo "$as_me: failed program was:" >&5 | |
7324 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7325 | ||
a6ccdbab | 7326 | ac_header_compiler=no |
ba479fd2 | 7327 | fi |
a6ccdbab EC |
7328 | |
7329 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7330 | { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
7331 | echo "${ECHO_T}$ac_header_compiler" >&6; } | |
ba479fd2 NN |
7332 | |
7333 | # Is the header present? | |
a6ccdbab EC |
7334 | { echo "$as_me:$LINENO: checking valgrind.h presence" >&5 |
7335 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6; } | |
ba479fd2 | 7336 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7337 | /* confdefs.h. */ |
7338 | _ACEOF | |
7339 | cat confdefs.h >>conftest.$ac_ext | |
7340 | cat >>conftest.$ac_ext <<_ACEOF | |
7341 | /* end confdefs.h. */ | |
7342 | #include <valgrind.h> | |
7343 | _ACEOF | |
a6ccdbab EC |
7344 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
7345 | case "(($ac_try" in | |
7346 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7347 | *) ac_try_echo=$ac_try;; | |
7348 | esac | |
7349 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7350 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
7351 | ac_status=$? |
7352 | grep -v '^ *+' conftest.er1 >conftest.err | |
7353 | rm -f conftest.er1 | |
7354 | cat conftest.err >&5 | |
7355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
7356 | (exit $ac_status); } >/dev/null && { |
7357 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
7358 | test ! -s conftest.err | |
7359 | }; then | |
ba479fd2 NN |
7360 | ac_header_preproc=yes |
7361 | else | |
7362 | echo "$as_me: failed program was:" >&5 | |
7363 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7364 | ||
7365 | ac_header_preproc=no | |
7366 | fi | |
a6ccdbab | 7367 | |
ba479fd2 | 7368 | rm -f conftest.err conftest.$ac_ext |
a6ccdbab EC |
7369 | { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
7370 | echo "${ECHO_T}$ac_header_preproc" >&6; } | |
ba479fd2 NN |
7371 | |
7372 | # So? What about this header? | |
86da66b5 HPN |
7373 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
7374 | yes:no: ) | |
ba479fd2 NN |
7375 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
7376 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
7377 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
7378 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
7379 | ac_header_preproc=yes | |
ba479fd2 | 7380 | ;; |
86da66b5 | 7381 | no:yes:* ) |
ba479fd2 NN |
7382 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
7383 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
7384 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
7385 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
7386 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
7387 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
7388 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
7389 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
7390 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
7391 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
7392 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
7393 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
a6ccdbab | 7394 | |
ba479fd2 NN |
7395 | ;; |
7396 | esac | |
a6ccdbab EC |
7397 | { echo "$as_me:$LINENO: checking for valgrind.h" >&5 |
7398 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
7399 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
7400 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7401 | else | |
7402 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 7403 | fi |
a6ccdbab EC |
7404 | { echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
7405 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; } | |
ba479fd2 | 7406 | |
6e3f3080 | 7407 | fi |
ba479fd2 | 7408 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
7409 | have_valgrind_h=yes |
7410 | else | |
ba479fd2 | 7411 | have_valgrind_h=no |
6938ec6c NN |
7412 | fi |
7413 | ||
7414 | ||
ba479fd2 | 7415 | |
cdce5c16 | 7416 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
7417 | # It is certainly possible that there's valgrind but no valgrind.h. |
7418 | # GCC relies on making annotations so we must have both. | |
a6ccdbab EC |
7419 | { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
7420 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6; } | |
ba479fd2 | 7421 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7422 | /* confdefs.h. */ |
7423 | _ACEOF | |
7424 | cat confdefs.h >>conftest.$ac_ext | |
7425 | cat >>conftest.$ac_ext <<_ACEOF | |
7426 | /* end confdefs.h. */ | |
a207b594 | 7427 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
7428 | #ifndef VALGRIND_DISCARD |
7429 | #error VALGRIND_DISCARD not defined | |
7430 | #endif | |
ba479fd2 | 7431 | _ACEOF |
a6ccdbab EC |
7432 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
7433 | case "(($ac_try" in | |
7434 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7435 | *) ac_try_echo=$ac_try;; | |
7436 | esac | |
7437 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7438 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
7439 | ac_status=$? |
7440 | grep -v '^ *+' conftest.er1 >conftest.err | |
7441 | rm -f conftest.er1 | |
7442 | cat conftest.err >&5 | |
7443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
7444 | (exit $ac_status); } >/dev/null && { |
7445 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
7446 | test ! -s conftest.err | |
7447 | }; then | |
a207b594 HPN |
7448 | gcc_cv_header_valgrind_memcheck_h=yes |
7449 | else | |
ba479fd2 NN |
7450 | echo "$as_me: failed program was:" >&5 |
7451 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7452 | ||
a207b594 HPN |
7453 | gcc_cv_header_valgrind_memcheck_h=no |
7454 | fi | |
a6ccdbab | 7455 | |
ba479fd2 | 7456 | rm -f conftest.err conftest.$ac_ext |
a6ccdbab EC |
7457 | { echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 |
7458 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6; } | |
7459 | { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
7460 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6; } | |
ba479fd2 | 7461 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7462 | /* confdefs.h. */ |
7463 | _ACEOF | |
7464 | cat confdefs.h >>conftest.$ac_ext | |
7465 | cat >>conftest.$ac_ext <<_ACEOF | |
7466 | /* end confdefs.h. */ | |
a207b594 HPN |
7467 | #include <memcheck.h> |
7468 | #ifndef VALGRIND_DISCARD | |
7469 | #error VALGRIND_DISCARD not defined | |
7470 | #endif | |
ba479fd2 | 7471 | _ACEOF |
a6ccdbab EC |
7472 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
7473 | case "(($ac_try" in | |
7474 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7475 | *) ac_try_echo=$ac_try;; | |
7476 | esac | |
7477 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7478 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
7479 | ac_status=$? |
7480 | grep -v '^ *+' conftest.er1 >conftest.err | |
7481 | rm -f conftest.er1 | |
7482 | cat conftest.err >&5 | |
7483 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
7484 | (exit $ac_status); } >/dev/null && { |
7485 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
7486 | test ! -s conftest.err | |
7487 | }; then | |
14011ca4 AJ |
7488 | gcc_cv_header_memcheck_h=yes |
7489 | else | |
ba479fd2 NN |
7490 | echo "$as_me: failed program was:" >&5 |
7491 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7492 | ||
cafe096b EC |
7493 | gcc_cv_header_memcheck_h=no |
7494 | fi | |
a6ccdbab | 7495 | |
ba479fd2 | 7496 | rm -f conftest.err conftest.$ac_ext |
a6ccdbab EC |
7497 | { echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 |
7498 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6; } | |
ba479fd2 | 7499 | |
56694dd9 ZW |
7500 | # Prepare PATH_SEPARATOR. |
7501 | # The user is always right. | |
7502 | if test "${PATH_SEPARATOR+set}" != set; then | |
7503 | echo "#! /bin/sh" >conf$$.sh | |
7504 | echo "exit 0" >>conf$$.sh | |
7505 | chmod +x conf$$.sh | |
7506 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7507 | PATH_SEPARATOR=';' | |
7508 | else | |
7509 | PATH_SEPARATOR=: | |
7510 | fi | |
7511 | rm -f conf$$.sh | |
7512 | fi | |
7513 | ||
7514 | # Find out how to test for executable files. Don't use a zero-byte file, | |
7515 | # as systems may use methods other than mode bits to determine executability. | |
7516 | cat >conf$$.file <<_ASEOF | |
7517 | #! /bin/sh | |
7518 | exit 0 | |
7519 | _ASEOF | |
7520 | chmod +x conf$$.file | |
7521 | if test -x conf$$.file >/dev/null 2>&1; then | |
7522 | ac_executable_p="test -x" | |
7523 | else | |
7524 | ac_executable_p="test -f" | |
7525 | fi | |
7526 | rm -f conf$$.file | |
7527 | ||
7528 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 7529 | set dummy valgrind; ac_word=$2 |
a6ccdbab EC |
7530 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7531 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
7532 | if test "${ac_cv_path_valgrind_path+set}" = set; then |
7533 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
7534 | else |
7535 | case "$valgrind_path" in | |
56694dd9 ZW |
7536 | [\\/]* | ?:[\\/]*) |
7537 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
7538 | ;; | |
414d23ae | 7539 | *) |
56694dd9 ZW |
7540 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
7541 | for ac_dir in $PATH; do | |
7542 | IFS="$ac_save_IFS" | |
7543 | test -z "$ac_dir" && ac_dir=. | |
7544 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7545 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
7546 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
7547 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
7548 | break 2 | |
7549 | fi | |
7550 | fi | |
7551 | done | |
7552 | done | |
7553 | IFS="$ac_save_IFS" | |
7554 | ;; | |
414d23ae | 7555 | esac |
75e93faa | 7556 | fi |
414d23ae HPN |
7557 | valgrind_path="$ac_cv_path_valgrind_path" |
7558 | if test -n "$valgrind_path"; then | |
a6ccdbab EC |
7559 | { echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
7560 | echo "${ECHO_T}$valgrind_path" >&6; } | |
414d23ae | 7561 | else |
a6ccdbab EC |
7562 | { echo "$as_me:$LINENO: result: no" >&5 |
7563 | echo "${ECHO_T}no" >&6; } | |
414d23ae HPN |
7564 | fi |
7565 | ||
a207b594 HPN |
7566 | if test "x$valgrind_path" = "x" \ |
7567 | || (test $have_valgrind_h = no \ | |
7568 | && test $gcc_cv_header_memcheck_h = no \ | |
7569 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
7570 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
7571 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
7572 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
7573 | fi |
7574 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
7575 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
7576 | |
7577 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 7578 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 7579 | _ACEOF |
75e93faa | 7580 | |
a207b594 | 7581 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
7582 | |
7583 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 7584 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 7585 | _ACEOF |
a207b594 HPN |
7586 | |
7587 | fi | |
14011ca4 | 7588 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
7589 | |
7590 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 7591 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 7592 | _ACEOF |
14011ca4 AJ |
7593 | |
7594 | fi | |
414d23ae | 7595 | fi |
75e93faa | 7596 | |
75e93faa ZW |
7597 | |
7598 | ||
a6ccdbab | 7599 | # Check whether --enable-mapped-location was given. |
74ee1642 | 7600 | if test "${enable_mapped_location+set}" = set; then |
a6ccdbab | 7601 | enableval=$enable_mapped_location; |
74ee1642 PB |
7602 | else |
7603 | enable_mapped_location=no | |
a6ccdbab EC |
7604 | fi |
7605 | ||
74ee1642 PB |
7606 | |
7607 | if test "$enable_mapped_location" = yes ; then | |
7608 | ||
7609 | cat >>confdefs.h <<\_ACEOF | |
7610 | #define USE_MAPPED_LOCATION 1 | |
7611 | _ACEOF | |
7612 | ||
7613 | fi | |
7614 | ||
414d23ae | 7615 | # Enable code coverage collection |
a6ccdbab | 7616 | # Check whether --enable-coverage was given. |
414d23ae | 7617 | if test "${enable_coverage+set}" = set; then |
a6ccdbab | 7618 | enableval=$enable_coverage; case "${enableval}" in |
6dd297da NN |
7619 | yes|noopt) |
7620 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
7621 | ;; | |
7622 | opt) | |
7623 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
7624 | ;; | |
7625 | no) | |
7626 | # a.k.a. --disable-coverage | |
7627 | coverage_flags="" | |
7628 | ;; | |
7629 | *) | |
7630 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
7631 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
7632 | { (exit 1); exit 1; }; } | |
6dd297da | 7633 | ;; |
414d23ae | 7634 | esac |
75e93faa | 7635 | else |
414d23ae | 7636 | coverage_flags="" |
a6ccdbab | 7637 | fi |
414d23ae | 7638 | |
ba479fd2 | 7639 | |
dd7f7a6e | 7640 | |
a6ccdbab EC |
7641 | # Check whether --enable-gather-detailed-mem-stats was given. |
7642 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
7643 | enableval=$enable_gather_detailed_mem_stats; | |
439a7e54 DN |
7644 | else |
7645 | enable_gather_detailed_mem_stats=no | |
a6ccdbab EC |
7646 | fi |
7647 | ||
439a7e54 | 7648 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
7649 | |
7650 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 7651 | #define GATHER_STATISTICS 1 |
ba479fd2 | 7652 | _ACEOF |
439a7e54 DN |
7653 | |
7654 | fi | |
7655 | ||
73458fb7 NN |
7656 | # ------------------------------- |
7657 | # Miscenalleous configure options | |
7658 | # ------------------------------- | |
34a86c2b NN |
7659 | |
7660 | # With stabs | |
ba479fd2 | 7661 | |
a6ccdbab | 7662 | # Check whether --with-stabs was given. |
34a86c2b | 7663 | if test "${with_stabs+set}" = set; then |
a6ccdbab | 7664 | withval=$with_stabs; stabs="$with_stabs" |
34a86c2b NN |
7665 | else |
7666 | stabs=no | |
a6ccdbab EC |
7667 | fi |
7668 | ||
cafe096b | 7669 | |
34a86c2b | 7670 | # Determine whether or not multilibs are enabled. |
a6ccdbab | 7671 | # Check whether --enable-multilib was given. |
34a86c2b | 7672 | if test "${enable_multilib+set}" = set; then |
a6ccdbab | 7673 | enableval=$enable_multilib; |
34a86c2b NN |
7674 | else |
7675 | enable_multilib=yes | |
a6ccdbab EC |
7676 | fi |
7677 | ||
75e93faa | 7678 | |
34a86c2b | 7679 | |
414d23ae | 7680 | # Enable __cxa_atexit for C++. |
a6ccdbab | 7681 | # Check whether --enable-__cxa_atexit was given. |
414d23ae | 7682 | if test "${enable___cxa_atexit+set}" = set; then |
a6ccdbab EC |
7683 | enableval=$enable___cxa_atexit; |
7684 | fi | |
75e93faa ZW |
7685 | |
7686 | ||
486aa804 | 7687 | # Enable C extension for decimal float if target supports it. |
a6ccdbab | 7688 | # Check whether --enable-decimal-float was given. |
486aa804 | 7689 | if test "${enable_decimal_float+set}" = set; then |
a6ccdbab | 7690 | enableval=$enable_decimal_float; |
486aa804 BE |
7691 | if test x$enablevar = xyes ; then |
7692 | case $target in | |
7693 | powerpc*-*-linux* | i?86*-*-linux*) | |
a4a9df5f | 7694 | enable_decimal_float=yes |
486aa804 BE |
7695 | ;; |
7696 | *) | |
7697 | { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 | |
7698 | echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
7699 | enable_decimal_float=no | |
7700 | ;; | |
7701 | esac | |
7702 | fi | |
7703 | ||
7704 | else | |
a4a9df5f | 7705 | enable_decimal_float=no |
a6ccdbab EC |
7706 | fi |
7707 | ||
486aa804 BE |
7708 | |
7709 | ||
7710 | ||
7711 | dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` | |
7712 | ||
7713 | cat >>confdefs.h <<_ACEOF | |
7714 | #define ENABLE_DECIMAL_FLOAT $dfp | |
7715 | _ACEOF | |
7716 | ||
7717 | ||
414d23ae HPN |
7718 | # Enable threads |
7719 | # Pass with no value to take the default | |
7720 | # Pass with a value to specify a thread package | |
a6ccdbab | 7721 | # Check whether --enable-threads was given. |
414d23ae | 7722 | if test "${enable_threads+set}" = set; then |
a6ccdbab | 7723 | enableval=$enable_threads; |
414d23ae HPN |
7724 | else |
7725 | enable_threads='' | |
a6ccdbab | 7726 | fi |
8dea1cca | 7727 | |
dd7f7a6e | 7728 | |
a6ccdbab EC |
7729 | # Check whether --enable-tls was given. |
7730 | if test "${enable_tls+set}" = set; then | |
7731 | enableval=$enable_tls; | |
8dea1cca DD |
7732 | case $enable_tls in |
7733 | yes | no) ;; | |
7734 | *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. | |
7735 | Valid choices are 'yes' and 'no'." >&5 | |
7736 | echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. | |
7737 | Valid choices are 'yes' and 'no'." >&2;} | |
7738 | { (exit 1); exit 1; }; } ;; | |
7739 | esac | |
7740 | ||
7741 | else | |
7742 | enable_tls='' | |
a6ccdbab EC |
7743 | fi |
7744 | ||
b8ec3cc8 | 7745 | |
a6ccdbab | 7746 | # Check whether --enable-objc-gc was given. |
414d23ae | 7747 | if test "${enable_objc_gc+set}" = set; then |
a6ccdbab | 7748 | enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then |
414d23ae HPN |
7749 | objc_boehm_gc='' |
7750 | else | |
7751 | objc_boehm_gc=1 | |
7752 | fi | |
7753 | else | |
7754 | objc_boehm_gc='' | |
a6ccdbab | 7755 | fi |
75e93faa ZW |
7756 | |
7757 | ||
a6ccdbab EC |
7758 | |
7759 | # Check whether --with-dwarf2 was given. | |
414d23ae | 7760 | if test "${with_dwarf2+set}" = set; then |
a6ccdbab | 7761 | withval=$with_dwarf2; dwarf2="$with_dwarf2" |
75e93faa | 7762 | else |
414d23ae | 7763 | dwarf2=no |
a6ccdbab | 7764 | fi |
ba479fd2 | 7765 | |
dd7f7a6e | 7766 | |
a6ccdbab EC |
7767 | # Check whether --enable-shared was given. |
7768 | if test "${enable_shared+set}" = set; then | |
7769 | enableval=$enable_shared; | |
414d23ae HPN |
7770 | case $enable_shared in |
7771 | yes | no) ;; | |
7772 | *) | |
7773 | enable_shared=no | |
7774 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
7775 | for pkg in $enableval; do | |
7776 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
7777 | enable_shared=yes | |
7778 | fi | |
7779 | done | |
7780 | IFS="$ac_save_ifs" | |
7781 | ;; | |
7782 | esac | |
7783 | ||
75e93faa | 7784 | else |
414d23ae | 7785 | enable_shared=yes |
a6ccdbab EC |
7786 | fi |
7787 | ||
75e93faa | 7788 | |
75e93faa | 7789 | |
b8ec3cc8 | 7790 | |
a6ccdbab | 7791 | # Check whether --with-build-sysroot was given. |
160633c6 | 7792 | if test "${with_build_sysroot+set}" = set; then |
a6ccdbab EC |
7793 | withval=$with_build_sysroot; |
7794 | fi | |
160633c6 | 7795 | |
160633c6 MM |
7796 | |
7797 | ||
a6ccdbab | 7798 | # Check whether --with-sysroot was given. |
4977bab6 | 7799 | if test "${with_sysroot+set}" = set; then |
a6ccdbab | 7800 | withval=$with_sysroot; |
4977bab6 | 7801 | case ${with_sysroot} in |
caa55b1e | 7802 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
7803 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
7804 | esac | |
ba479fd2 | 7805 | |
4977bab6 ZW |
7806 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
7807 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
7808 | ||
047d636f DJ |
7809 | if test "x$exec_prefix" = xNONE; then |
7810 | if test "x$prefix" = xNONE; then | |
7811 | test_prefix=/usr/local | |
7812 | else | |
7813 | test_prefix=$prefix | |
7814 | fi | |
7815 | else | |
7816 | test_prefix=$exec_prefix | |
7817 | fi | |
7818 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
7819 | "${test_prefix}"|"${test_prefix}/"*|\ |
7820 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
7821 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
7822 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
7823 | ;; | |
7824 | esac | |
7825 | ||
4977bab6 | 7826 | else |
ba479fd2 | 7827 | |
4977bab6 | 7828 | TARGET_SYSTEM_ROOT= |
db720d9a | 7829 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
7830 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
7831 | ||
a6ccdbab EC |
7832 | fi |
7833 | ||
4977bab6 ZW |
7834 | |
7835 | ||
7836 | ||
7837 | ||
d1bd0ded | 7838 | # Build with intermodule optimisations |
a6ccdbab | 7839 | # Check whether --enable-intermodule was given. |
d1bd0ded | 7840 | if test "${enable_intermodule+set}" = set; then |
a6ccdbab | 7841 | enableval=$enable_intermodule; case ${enable_intermodule} in |
0c46c5c7 KC |
7842 | yes) onestep="-onestep";; |
7843 | *) onestep="";; | |
d1bd0ded | 7844 | esac |
0c46c5c7 KC |
7845 | else |
7846 | onestep="" | |
a6ccdbab EC |
7847 | fi |
7848 | ||
d1bd0ded GK |
7849 | |
7850 | ||
f3c9f174 NN |
7851 | # Sanity check enable_languages in case someone does not run the toplevel |
7852 | # configure # script. | |
a6ccdbab | 7853 | # Check whether --enable-languages was given. |
f3c9f174 | 7854 | if test "${enable_languages+set}" = set; then |
a6ccdbab | 7855 | enableval=$enable_languages; case ,${enable_languages}, in |
f3c9f174 NN |
7856 | ,,|,yes,) |
7857 | # go safe -- we cannot be much sure without the toplevel | |
7858 | # configure's | |
7859 | # analysis of which target libs are present and usable | |
7860 | enable_languages=c | |
7861 | ;; | |
7862 | *,all,*) | |
7863 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7864 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7865 | { (exit 1); exit 1; }; } | |
7866 | ;; | |
7867 | *,c,*) | |
7868 | ;; | |
7869 | *) | |
7870 | enable_languages=c,${enable_languages} | |
7871 | ;; | |
7872 | esac | |
7873 | else | |
7874 | enable_languages=c | |
a6ccdbab EC |
7875 | fi |
7876 | ||
f3c9f174 | 7877 | |
9288b845 CD |
7878 | # Used by documentation targets |
7879 | ||
7880 | ||
7881 | ||
f3c9f174 | 7882 | |
73458fb7 NN |
7883 | # ------------------------- |
7884 | # Checks for other programs | |
7885 | # ------------------------- | |
5b67ad6f | 7886 | |
a6ccdbab EC |
7887 | { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7888 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } | |
7889 | set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
7890 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 | 7891 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
e9a25f70 | 7892 | else |
ba479fd2 | 7893 | cat >conftest.make <<\_ACEOF |
a6ccdbab | 7894 | SHELL = /bin/sh |
e9a25f70 | 7895 | all: |
a6ccdbab | 7896 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
ba479fd2 | 7897 | _ACEOF |
e9a25f70 | 7898 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
a6ccdbab EC |
7899 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
7900 | *@@@%%%=?*=@@@%%%*) | |
7901 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
7902 | *) | |
7903 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
7904 | esac | |
ba479fd2 | 7905 | rm -f conftest.make |
e9a25f70 | 7906 | fi |
a6ccdbab EC |
7907 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
7908 | { echo "$as_me:$LINENO: result: yes" >&5 | |
7909 | echo "${ECHO_T}yes" >&6; } | |
e9a25f70 JL |
7910 | SET_MAKE= |
7911 | else | |
a6ccdbab EC |
7912 | { echo "$as_me:$LINENO: result: no" >&5 |
7913 | echo "${ECHO_T}no" >&6; } | |
e9a25f70 JL |
7914 | SET_MAKE="MAKE=${MAKE-make}" |
7915 | fi | |
7916 | ||
7917 | ||
861bb6c1 | 7918 | # Find some useful tools |
ba479fd2 | 7919 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7920 | do |
ba479fd2 | 7921 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7922 | set dummy $ac_prog; ac_word=$2 |
a6ccdbab EC |
7923 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7924 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
7925 | if test "${ac_cv_prog_AWK+set}" = set; then |
7926 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7927 | else |
7928 | if test -n "$AWK"; then | |
7929 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7930 | else | |
ba479fd2 NN |
7931 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7932 | for as_dir in $PATH | |
7933 | do | |
7934 | IFS=$as_save_IFS | |
7935 | test -z "$as_dir" && as_dir=. | |
7936 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 7937 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
7938 | ac_cv_prog_AWK="$ac_prog" |
7939 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7940 | break 2 | |
7941 | fi | |
7942 | done | |
7943 | done | |
a6ccdbab | 7944 | IFS=$as_save_IFS |
ba479fd2 | 7945 | |
861bb6c1 JL |
7946 | fi |
7947 | fi | |
ba479fd2 | 7948 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7949 | if test -n "$AWK"; then |
a6ccdbab EC |
7950 | { echo "$as_me:$LINENO: result: $AWK" >&5 |
7951 | echo "${ECHO_T}$AWK" >&6; } | |
861bb6c1 | 7952 | else |
a6ccdbab EC |
7953 | { echo "$as_me:$LINENO: result: no" >&5 |
7954 | echo "${ECHO_T}no" >&6; } | |
861bb6c1 JL |
7955 | fi |
7956 | ||
a6ccdbab | 7957 | |
ba479fd2 | 7958 | test -n "$AWK" && break |
861bb6c1 JL |
7959 | done |
7960 | ||
776dc15d | 7961 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7962 | # Bail out if it's missing. |
7963 | case ${AWK} in | |
ba479fd2 NN |
7964 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7965 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7966 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7967 | esac |
7968 | ||
a6ccdbab EC |
7969 | { echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7970 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } | |
ba479fd2 NN |
7971 | if test "${gcc_cv_prog_LN_S+set}" = set; then |
7972 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7973 | else |
7974 | rm -f conftestdata_t | |
7975 | echo >conftestdata_f | |
7976 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7977 | then | |
7978 | gcc_cv_prog_LN_S="ln -s" | |
7979 | else | |
7980 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7981 | then | |
7982 | gcc_cv_prog_LN_S=ln | |
7983 | else | |
35f06ae4 PB |
7984 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7985 | then | |
06c3418c | 7986 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7987 | else |
7988 | gcc_cv_prog_LN_S=cp | |
7989 | fi | |
0a4b6309 RL |
7990 | fi |
7991 | fi | |
7992 | rm -f conftestdata_f conftestdata_t | |
7993 | ||
7994 | fi | |
7995 | LN_S="$gcc_cv_prog_LN_S" | |
7996 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
a6ccdbab EC |
7997 | { echo "$as_me:$LINENO: result: yes" >&5 |
7998 | echo "${ECHO_T}yes" >&6; } | |
0a4b6309 RL |
7999 | else |
8000 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
a6ccdbab EC |
8001 | { echo "$as_me:$LINENO: result: no, using ln" >&5 |
8002 | echo "${ECHO_T}no, using ln" >&6; } | |
0a4b6309 | 8003 | else |
a6ccdbab EC |
8004 | { echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
8005 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; } | |
0a4b6309 RL |
8006 | fi |
8007 | fi | |
8008 | ||
a6ccdbab EC |
8009 | { echo "$as_me:$LINENO: checking whether ln works" >&5 |
8010 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6; } | |
18fc9bd4 RG |
8011 | if test "${acx_cv_prog_LN+set}" = set; then |
8012 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8013 | else | |
8014 | rm -f conftestdata_t | |
8015 | echo >conftestdata_f | |
8016 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
8017 | then | |
8018 | acx_cv_prog_LN=ln | |
8019 | else | |
8020 | acx_cv_prog_LN=no | |
8021 | fi | |
8022 | rm -f conftestdata_f conftestdata_t | |
8023 | ||
8024 | fi | |
8025 | if test $acx_cv_prog_LN = no; then | |
8026 | LN="$LN_S" | |
a6ccdbab EC |
8027 | { echo "$as_me:$LINENO: result: no, using $LN" >&5 |
8028 | echo "${ECHO_T}no, using $LN" >&6; } | |
18fc9bd4 RG |
8029 | else |
8030 | LN="$acx_cv_prog_LN" | |
a6ccdbab EC |
8031 | { echo "$as_me:$LINENO: result: yes" >&5 |
8032 | echo "${ECHO_T}yes" >&6; } | |
18fc9bd4 RG |
8033 | fi |
8034 | ||
ba479fd2 NN |
8035 | if test -n "$ac_tool_prefix"; then |
8036 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
8037 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
a6ccdbab EC |
8038 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8039 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8040 | if test "${ac_cv_prog_RANLIB+set}" = set; then |
8041 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
8042 | else |
8043 | if test -n "$RANLIB"; then | |
8044 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
8045 | else | |
ba479fd2 NN |
8046 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8047 | for as_dir in $PATH | |
8048 | do | |
8049 | IFS=$as_save_IFS | |
8050 | test -z "$as_dir" && as_dir=. | |
8051 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8052 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8053 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
8054 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8055 | break 2 | |
8056 | fi | |
8057 | done | |
8058 | done | |
a6ccdbab | 8059 | IFS=$as_save_IFS |
ba479fd2 | 8060 | |
6e3f3080 NN |
8061 | fi |
8062 | fi | |
ba479fd2 | 8063 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 8064 | if test -n "$RANLIB"; then |
a6ccdbab EC |
8065 | { echo "$as_me:$LINENO: result: $RANLIB" >&5 |
8066 | echo "${ECHO_T}$RANLIB" >&6; } | |
ba479fd2 | 8067 | else |
a6ccdbab EC |
8068 | { echo "$as_me:$LINENO: result: no" >&5 |
8069 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
8070 | fi |
8071 | ||
a6ccdbab | 8072 | |
ba479fd2 NN |
8073 | fi |
8074 | if test -z "$ac_cv_prog_RANLIB"; then | |
8075 | ac_ct_RANLIB=$RANLIB | |
8076 | # Extract the first word of "ranlib", so it can be a program name with args. | |
8077 | set dummy ranlib; ac_word=$2 | |
a6ccdbab EC |
8078 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8079 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8080 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then |
8081 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8082 | else | |
8083 | if test -n "$ac_ct_RANLIB"; then | |
8084 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
8085 | else | |
8086 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8087 | for as_dir in $PATH | |
8088 | do | |
8089 | IFS=$as_save_IFS | |
8090 | test -z "$as_dir" && as_dir=. | |
8091 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8092 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8093 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
8094 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8095 | break 2 | |
8096 | fi | |
8097 | done | |
8098 | done | |
a6ccdbab | 8099 | IFS=$as_save_IFS |
ba479fd2 | 8100 | |
ba479fd2 NN |
8101 | fi |
8102 | fi | |
8103 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
8104 | if test -n "$ac_ct_RANLIB"; then | |
a6ccdbab EC |
8105 | { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 |
8106 | echo "${ECHO_T}$ac_ct_RANLIB" >&6; } | |
6e3f3080 | 8107 | else |
a6ccdbab EC |
8108 | { echo "$as_me:$LINENO: result: no" >&5 |
8109 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
8110 | fi |
8111 | ||
a6ccdbab EC |
8112 | if test "x$ac_ct_RANLIB" = x; then |
8113 | RANLIB=":" | |
8114 | else | |
8115 | case $cross_compiling:$ac_tool_warned in | |
8116 | yes:) | |
8117 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools | |
8118 | whose name does not start with the host triplet. If you think this | |
8119 | configuration is useful to you, please write to autoconf@gnu.org." >&5 | |
8120 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools | |
8121 | whose name does not start with the host triplet. If you think this | |
8122 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} | |
8123 | ac_tool_warned=yes ;; | |
8124 | esac | |
8125 | RANLIB=$ac_ct_RANLIB | |
8126 | fi | |
ba479fd2 NN |
8127 | else |
8128 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
8129 | fi |
8130 | ||
343a6100 MM |
8131 | case "${host}" in |
8132 | *-*-darwin*) | |
8133 | # By default, the Darwin ranlib will not treat common symbols as | |
8134 | # definitions when building the archive table of contents. Other | |
8135 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
8136 | # it behave similarly. | |
8137 | ranlib_flags="-c" | |
8138 | ;; | |
8139 | *) | |
8140 | ranlib_flags="" | |
8141 | esac | |
8142 | ||
8143 | ||
0a4b6309 RL |
8144 | # Find a good install program. We prefer a C program (faster), |
8145 | # so one script is as good as another. But avoid the broken or | |
8146 | # incompatible versions: | |
8147 | # SysV /etc/install, /usr/sbin/install | |
8148 | # SunOS /usr/etc/install | |
8149 | # IRIX /sbin/install | |
8150 | # AIX /bin/install | |
8151 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
8152 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
8153 | # ./install, which can be erroneously created by make from ./install.sh. | |
a6ccdbab EC |
8154 | { echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
8155 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6; } | |
0a4b6309 | 8156 | if test -z "$INSTALL"; then |
ba479fd2 NN |
8157 | if test "${ac_cv_path_install+set}" = set; then |
8158 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
8159 | else |
8160 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
8161 | for ac_dir in $PATH; do | |
8162 | # Account for people who put trailing slashes in PATH elements. | |
8163 | case "$ac_dir/" in | |
8164 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
8165 | *) | |
8166 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
8167 | for ac_prog in ginstall scoinst install; do | |
8168 | if test -f $ac_dir/$ac_prog; then | |
8169 | if test $ac_prog = install && | |
8170 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
8171 | # AIX install. It has an incompatible calling convention. | |
8172 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
8173 | : | |
8174 | else | |
8175 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
8176 | break 2 | |
8177 | fi | |
8178 | fi | |
8179 | done | |
8180 | ;; | |
8181 | esac | |
8182 | done | |
8183 | IFS="$ac_save_IFS" | |
8184 | ||
8185 | fi | |
8186 | if test "${ac_cv_path_install+set}" = set; then | |
8187 | INSTALL="$ac_cv_path_install" | |
8188 | else | |
8189 | # As a last resort, use the slow shell script. We don't cache a | |
8190 | # path for INSTALL within a source directory, because that will | |
8191 | # break other packages using the cache if that directory is | |
8192 | # removed, or if the path is relative. | |
8193 | INSTALL="$ac_install_sh" | |
8194 | fi | |
8195 | fi | |
a6ccdbab EC |
8196 | { echo "$as_me:$LINENO: result: $INSTALL" >&5 |
8197 | echo "${ECHO_T}$INSTALL" >&6; } | |
0a4b6309 RL |
8198 | |
8199 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
8200 | # It thinks the first close brace ends the variable substitution. | |
8201 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
8202 | ||
8203 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
8204 | ||
861bb6c1 | 8205 | |
3a000df0 | 8206 | # See if cmp has --ignore-initial. |
a6ccdbab EC |
8207 | { echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
8208 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6; } | |
ba479fd2 NN |
8209 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then |
8210 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
8211 | else |
8212 | echo abfoo >t1 | |
8213 | echo cdfoo >t2 | |
269a7343 | 8214 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
8215 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
8216 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 8217 | : |
3a000df0 KC |
8218 | else |
8219 | gcc_cv_prog_cmp_skip=gnucompare | |
8220 | fi | |
269a7343 KG |
8221 | fi |
8222 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
8223 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
8224 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
8225 | : | |
8226 | else | |
8227 | gcc_cv_prog_cmp_skip=fastcompare | |
8228 | fi | |
8229 | fi | |
3a000df0 KC |
8230 | fi |
8231 | rm t1 t2 | |
8232 | ||
8233 | fi | |
a6ccdbab EC |
8234 | { echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
8235 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6; } | |
3a000df0 KC |
8236 | make_compare_target=$gcc_cv_prog_cmp_skip |
8237 | ||
8238 | ||
8239 | ||
73458fb7 NN |
8240 | # See if we have the mktemp command. |
8241 | # Extract the first word of "mktemp", so it can be a program name with args. | |
8242 | set dummy mktemp; ac_word=$2 | |
a6ccdbab EC |
8243 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8244 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8245 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then |
8246 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8247 | else |
8248 | if test -n "$have_mktemp_command"; then | |
8249 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
8250 | else | |
ba479fd2 NN |
8251 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8252 | for as_dir in $PATH | |
8253 | do | |
8254 | IFS=$as_save_IFS | |
8255 | test -z "$as_dir" && as_dir=. | |
8256 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8257 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8258 | ac_cv_prog_have_mktemp_command="yes" |
8259 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8260 | break 2 | |
8261 | fi | |
8262 | done | |
8263 | done | |
a6ccdbab | 8264 | IFS=$as_save_IFS |
ba479fd2 | 8265 | |
73458fb7 NN |
8266 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
8267 | fi | |
8268 | fi | |
ba479fd2 | 8269 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 8270 | if test -n "$have_mktemp_command"; then |
a6ccdbab EC |
8271 | { echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
8272 | echo "${ECHO_T}$have_mktemp_command" >&6; } | |
73458fb7 | 8273 | else |
a6ccdbab EC |
8274 | { echo "$as_me:$LINENO: result: no" >&5 |
8275 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8276 | fi |
8277 | ||
8278 | ||
a6ccdbab | 8279 | |
7c27e184 PB |
8280 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
8281 | ||
8282 | # See if makeinfo has been installed and is modern enough | |
8283 | # that we can use it. | |
9f18db39 PB |
8284 | |
8285 | ac_executable_extensions="$build_exeext" | |
8286 | ||
7c27e184 | 8287 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 8288 | set dummy makeinfo; ac_word=$2 |
a6ccdbab EC |
8289 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8290 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8291 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then |
8292 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8293 | else |
8294 | if test -n "$MAKEINFO"; then | |
8295 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
8296 | else | |
ba479fd2 NN |
8297 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8298 | for as_dir in $PATH | |
8299 | do | |
8300 | IFS=$as_save_IFS | |
8301 | test -z "$as_dir" && as_dir=. | |
8302 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8303 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8304 | ac_cv_prog_MAKEINFO="makeinfo" |
8305 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8306 | break 2 | |
8307 | fi | |
8308 | done | |
8309 | done | |
a6ccdbab | 8310 | IFS=$as_save_IFS |
ba479fd2 | 8311 | |
73458fb7 NN |
8312 | fi |
8313 | fi | |
ba479fd2 | 8314 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 8315 | if test -n "$MAKEINFO"; then |
a6ccdbab EC |
8316 | { echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
8317 | echo "${ECHO_T}$MAKEINFO" >&6; } | |
73458fb7 | 8318 | else |
a6ccdbab EC |
8319 | { echo "$as_me:$LINENO: result: no" >&5 |
8320 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8321 | fi |
8322 | ||
a6ccdbab | 8323 | |
73458fb7 NN |
8324 | if test -n "$MAKEINFO"; then |
8325 | # Found it, now check the version. | |
a6ccdbab EC |
8326 | { echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
8327 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6; } | |
ba479fd2 NN |
8328 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then |
8329 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8330 | else |
8331 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
8332 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
a6ccdbab | 8333 | echo "configure:8333: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
8334 | case $ac_prog_version in |
8335 | '') gcc_cv_prog_makeinfo_modern=no;; | |
1a598a97 | 8336 | 4.[4-9]*) |
73458fb7 NN |
8337 | gcc_cv_prog_makeinfo_modern=yes;; |
8338 | *) gcc_cv_prog_makeinfo_modern=no;; | |
8339 | esac | |
8340 | ||
8341 | fi | |
a6ccdbab EC |
8342 | { echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
8343 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6; } | |
73458fb7 NN |
8344 | else |
8345 | gcc_cv_prog_makeinfo_modern=no | |
8346 | fi | |
8347 | ||
73458fb7 | 8348 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 8349 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
8350 | { echo "$as_me:$LINENO: WARNING: |
8351 | *** Makeinfo is missing or too old. | |
8352 | *** Info documentation will not be built." >&5 | |
8353 | echo "$as_me: WARNING: | |
cafe096b | 8354 | *** Makeinfo is missing or too old. |
ba479fd2 | 8355 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
8356 | BUILD_INFO= |
8357 | else | |
ba479fd2 | 8358 | BUILD_INFO=info |
73458fb7 NN |
8359 | fi |
8360 | ||
7c27e184 | 8361 | |
73458fb7 | 8362 | # Is pod2man recent enough to regenerate manpages? |
a6ccdbab EC |
8363 | { echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
8364 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6; } | |
73458fb7 | 8365 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
a6ccdbab EC |
8366 | { echo "$as_me:$LINENO: result: yes" >&5 |
8367 | echo "${ECHO_T}yes" >&6; } | |
ba479fd2 | 8368 | GENERATED_MANPAGES=generated-manpages |
73458fb7 | 8369 | else |
a6ccdbab EC |
8370 | { echo "$as_me:$LINENO: result: no" >&5 |
8371 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8372 | GENERATED_MANPAGES= |
8373 | fi | |
8374 | ||
7c27e184 | 8375 | |
73458fb7 | 8376 | # How about lex? |
7c27e184 PB |
8377 | for ac_prog in flex |
8378 | do | |
8379 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8380 | set dummy $ac_prog; ac_word=$2 | |
a6ccdbab EC |
8381 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8382 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8383 | if test "${ac_cv_prog_FLEX+set}" = set; then |
8384 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8385 | else |
8386 | if test -n "$FLEX"; then | |
8387 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
8388 | else | |
ba479fd2 NN |
8389 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8390 | for as_dir in $PATH | |
8391 | do | |
8392 | IFS=$as_save_IFS | |
8393 | test -z "$as_dir" && as_dir=. | |
8394 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8395 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
7c27e184 | 8396 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
8397 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
8398 | break 2 | |
8399 | fi | |
8400 | done | |
8401 | done | |
a6ccdbab | 8402 | IFS=$as_save_IFS |
ba479fd2 | 8403 | |
73458fb7 NN |
8404 | fi |
8405 | fi | |
ba479fd2 | 8406 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 8407 | if test -n "$FLEX"; then |
a6ccdbab EC |
8408 | { echo "$as_me:$LINENO: result: $FLEX" >&5 |
8409 | echo "${ECHO_T}$FLEX" >&6; } | |
73458fb7 | 8410 | else |
a6ccdbab EC |
8411 | { echo "$as_me:$LINENO: result: no" >&5 |
8412 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8413 | fi |
8414 | ||
a6ccdbab | 8415 | |
7c27e184 PB |
8416 | test -n "$FLEX" && break |
8417 | done | |
8418 | test -n "$FLEX" || FLEX="$MISSING flex" | |
8419 | ||
73458fb7 NN |
8420 | |
8421 | # Bison? | |
7c27e184 PB |
8422 | for ac_prog in bison |
8423 | do | |
8424 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8425 | set dummy $ac_prog; ac_word=$2 | |
a6ccdbab EC |
8426 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8427 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8428 | if test "${ac_cv_prog_BISON+set}" = set; then |
8429 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8430 | else |
8431 | if test -n "$BISON"; then | |
8432 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
8433 | else | |
ba479fd2 NN |
8434 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8435 | for as_dir in $PATH | |
8436 | do | |
8437 | IFS=$as_save_IFS | |
8438 | test -z "$as_dir" && as_dir=. | |
8439 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8440 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
7c27e184 | 8441 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
8442 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
8443 | break 2 | |
8444 | fi | |
8445 | done | |
8446 | done | |
a6ccdbab | 8447 | IFS=$as_save_IFS |
ba479fd2 | 8448 | |
73458fb7 NN |
8449 | fi |
8450 | fi | |
ba479fd2 | 8451 | BISON=$ac_cv_prog_BISON |
73458fb7 | 8452 | if test -n "$BISON"; then |
a6ccdbab EC |
8453 | { echo "$as_me:$LINENO: result: $BISON" >&5 |
8454 | echo "${ECHO_T}$BISON" >&6; } | |
73458fb7 | 8455 | else |
a6ccdbab EC |
8456 | { echo "$as_me:$LINENO: result: no" >&5 |
8457 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8458 | fi |
8459 | ||
a6ccdbab | 8460 | |
7c27e184 PB |
8461 | test -n "$BISON" && break |
8462 | done | |
8463 | test -n "$BISON" || BISON="$MISSING bison" | |
8464 | ||
8465 | ||
8466 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
8467 | # check for build == host before using them. | |
73458fb7 | 8468 | |
f6a874ac | 8469 | # NM |
414adbdd GK |
8470 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
8471 | && test -d ../binutils ; then | |
f6a874ac JW |
8472 | NM='$(objdir)/../binutils/nm-new' |
8473 | else | |
8474 | # Extract the first word of "nm", so it can be a program name with args. | |
8475 | set dummy nm; ac_word=$2 | |
a6ccdbab EC |
8476 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8477 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
f6a874ac JW |
8478 | if test "${ac_cv_prog_NM+set}" = set; then |
8479 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8480 | else | |
8481 | if test -n "$NM"; then | |
8482 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
8483 | else | |
8484 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8485 | for as_dir in $PATH | |
8486 | do | |
8487 | IFS=$as_save_IFS | |
8488 | test -z "$as_dir" && as_dir=. | |
8489 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8490 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
f6a874ac JW |
8491 | ac_cv_prog_NM="nm" |
8492 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8493 | break 2 | |
8494 | fi | |
8495 | done | |
8496 | done | |
a6ccdbab | 8497 | IFS=$as_save_IFS |
f6a874ac JW |
8498 | |
8499 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
8500 | fi | |
8501 | fi | |
8502 | NM=$ac_cv_prog_NM | |
8503 | if test -n "$NM"; then | |
a6ccdbab EC |
8504 | { echo "$as_me:$LINENO: result: $NM" >&5 |
8505 | echo "${ECHO_T}$NM" >&6; } | |
f6a874ac | 8506 | else |
a6ccdbab EC |
8507 | { echo "$as_me:$LINENO: result: no" >&5 |
8508 | echo "${ECHO_T}no" >&6; } | |
f6a874ac JW |
8509 | fi |
8510 | ||
a6ccdbab | 8511 | |
f6a874ac JW |
8512 | fi |
8513 | ||
8514 | # AR | |
414adbdd GK |
8515 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
8516 | && test -d ../binutils ; then | |
f6a874ac JW |
8517 | AR='$(objdir)/../binutils/ar' |
8518 | else | |
8519 | # Extract the first word of "ar", so it can be a program name with args. | |
8520 | set dummy ar; ac_word=$2 | |
a6ccdbab EC |
8521 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8522 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
f6a874ac JW |
8523 | if test "${ac_cv_prog_AR+set}" = set; then |
8524 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8525 | else | |
8526 | if test -n "$AR"; then | |
8527 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
8528 | else | |
8529 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8530 | for as_dir in $PATH | |
8531 | do | |
8532 | IFS=$as_save_IFS | |
8533 | test -z "$as_dir" && as_dir=. | |
8534 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 8535 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
f6a874ac JW |
8536 | ac_cv_prog_AR="ar" |
8537 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8538 | break 2 | |
8539 | fi | |
8540 | done | |
8541 | done | |
a6ccdbab | 8542 | IFS=$as_save_IFS |
f6a874ac JW |
8543 | |
8544 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
8545 | fi | |
8546 | fi | |
8547 | AR=$ac_cv_prog_AR | |
8548 | if test -n "$AR"; then | |
a6ccdbab EC |
8549 | { echo "$as_me:$LINENO: result: $AR" >&5 |
8550 | echo "${ECHO_T}$AR" >&6; } | |
f6a874ac | 8551 | else |
a6ccdbab EC |
8552 | { echo "$as_me:$LINENO: result: no" >&5 |
8553 | echo "${ECHO_T}no" >&6; } | |
f6a874ac JW |
8554 | fi |
8555 | ||
a6ccdbab | 8556 | |
f6a874ac JW |
8557 | fi |
8558 | ||
8559 | ||
73458fb7 NN |
8560 | # -------------------- |
8561 | # Checks for C headers | |
8562 | # -------------------- | |
8563 | ||
a6ccdbab EC |
8564 | { echo "$as_me:$LINENO: checking for GNU C library" >&5 |
8565 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6; } | |
ba479fd2 NN |
8566 | if test "${gcc_cv_glibc+set}" = set; then |
8567 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8568 | else | |
8569 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8570 | /* confdefs.h. */ |
8571 | _ACEOF | |
8572 | cat confdefs.h >>conftest.$ac_ext | |
8573 | cat >>conftest.$ac_ext <<_ACEOF | |
8574 | /* end confdefs.h. */ | |
73458fb7 | 8575 | #include <features.h> |
ba479fd2 NN |
8576 | int |
8577 | main () | |
8578 | { | |
73458fb7 NN |
8579 | |
8580 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
8581 | #error Not a GNU C library system | |
8582 | #endif | |
ba479fd2 NN |
8583 | ; |
8584 | return 0; | |
8585 | } | |
8586 | _ACEOF | |
8587 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
8588 | if { (ac_try="$ac_compile" |
8589 | case "(($ac_try" in | |
8590 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8591 | *) ac_try_echo=$ac_try;; | |
8592 | esac | |
8593 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8594 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8595 | ac_status=$? |
86da66b5 HPN |
8596 | grep -v '^ *+' conftest.er1 >conftest.err |
8597 | rm -f conftest.er1 | |
8598 | cat conftest.err >&5 | |
ba479fd2 | 8599 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
8600 | (exit $ac_status); } && { |
8601 | test -z "$ac_c_werror_flag" || | |
8602 | test ! -s conftest.err | |
8603 | } && test -s conftest.$ac_objext; then | |
73458fb7 NN |
8604 | gcc_cv_glibc=yes |
8605 | else | |
ba479fd2 NN |
8606 | echo "$as_me: failed program was:" >&5 |
8607 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8608 | ||
a6ccdbab | 8609 | gcc_cv_glibc=no |
73458fb7 | 8610 | fi |
a6ccdbab EC |
8611 | |
8612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
73458fb7 NN |
8613 | fi |
8614 | ||
a6ccdbab EC |
8615 | { echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
8616 | echo "${ECHO_T}$gcc_cv_glibc" >&6; } | |
73458fb7 | 8617 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
8618 | |
8619 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 8620 | #define _GNU_SOURCE 1 |
ba479fd2 | 8621 | _ACEOF |
73458fb7 NN |
8622 | |
8623 | fi | |
8624 | ||
ca9bc441 NN |
8625 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
8626 | # works later. *sigh* This needs to come before all header checks. | |
18fc9bd4 | 8627 | |
ca9bc441 NN |
8628 | ac_c_preproc_warn_flag=yes |
8629 | ||
a6ccdbab EC |
8630 | { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
8631 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } | |
ba479fd2 NN |
8632 | if test "${ac_cv_header_stdc+set}" = set; then |
8633 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8634 | else |
ba479fd2 | 8635 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8636 | /* confdefs.h. */ |
8637 | _ACEOF | |
8638 | cat confdefs.h >>conftest.$ac_ext | |
8639 | cat >>conftest.$ac_ext <<_ACEOF | |
8640 | /* end confdefs.h. */ | |
956d6950 JL |
8641 | #include <stdlib.h> |
8642 | #include <stdarg.h> | |
8643 | #include <string.h> | |
8644 | #include <float.h> | |
ba479fd2 NN |
8645 | |
8646 | int | |
8647 | main () | |
8648 | { | |
8649 | ||
8650 | ; | |
8651 | return 0; | |
8652 | } | |
8653 | _ACEOF | |
8654 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
8655 | if { (ac_try="$ac_compile" |
8656 | case "(($ac_try" in | |
8657 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8658 | *) ac_try_echo=$ac_try;; | |
8659 | esac | |
8660 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8661 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8662 | ac_status=$? |
86da66b5 HPN |
8663 | grep -v '^ *+' conftest.er1 >conftest.err |
8664 | rm -f conftest.er1 | |
8665 | cat conftest.err >&5 | |
ba479fd2 | 8666 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
8667 | (exit $ac_status); } && { |
8668 | test -z "$ac_c_werror_flag" || | |
8669 | test ! -s conftest.err | |
8670 | } && test -s conftest.$ac_objext; then | |
956d6950 JL |
8671 | ac_cv_header_stdc=yes |
8672 | else | |
ba479fd2 NN |
8673 | echo "$as_me: failed program was:" >&5 |
8674 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8675 | ||
a6ccdbab | 8676 | ac_cv_header_stdc=no |
956d6950 | 8677 | fi |
a6ccdbab EC |
8678 | |
8679 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
956d6950 JL |
8680 | |
8681 | if test $ac_cv_header_stdc = yes; then | |
8682 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 8683 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8684 | /* confdefs.h. */ |
8685 | _ACEOF | |
8686 | cat confdefs.h >>conftest.$ac_ext | |
8687 | cat >>conftest.$ac_ext <<_ACEOF | |
8688 | /* end confdefs.h. */ | |
956d6950 | 8689 | #include <string.h> |
ba479fd2 NN |
8690 | |
8691 | _ACEOF | |
956d6950 | 8692 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8693 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
8694 | : |
8695 | else | |
956d6950 JL |
8696 | ac_cv_header_stdc=no |
8697 | fi | |
8698 | rm -f conftest* | |
8699 | ||
8700 | fi | |
8701 | ||
8702 | if test $ac_cv_header_stdc = yes; then | |
8703 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 8704 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8705 | /* confdefs.h. */ |
8706 | _ACEOF | |
8707 | cat confdefs.h >>conftest.$ac_ext | |
8708 | cat >>conftest.$ac_ext <<_ACEOF | |
8709 | /* end confdefs.h. */ | |
956d6950 | 8710 | #include <stdlib.h> |
ba479fd2 NN |
8711 | |
8712 | _ACEOF | |
956d6950 | 8713 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8714 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
8715 | : |
8716 | else | |
956d6950 JL |
8717 | ac_cv_header_stdc=no |
8718 | fi | |
8719 | rm -f conftest* | |
8720 | ||
8721 | fi | |
8722 | ||
8723 | if test $ac_cv_header_stdc = yes; then | |
8724 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 8725 | if test "$cross_compiling" = yes; then |
956d6950 JL |
8726 | : |
8727 | else | |
ba479fd2 | 8728 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8729 | /* confdefs.h. */ |
8730 | _ACEOF | |
8731 | cat confdefs.h >>conftest.$ac_ext | |
8732 | cat >>conftest.$ac_ext <<_ACEOF | |
8733 | /* end confdefs.h. */ | |
956d6950 | 8734 | #include <ctype.h> |
a6ccdbab | 8735 | #include <stdlib.h> |
ba479fd2 NN |
8736 | #if ((' ' & 0x0FF) == 0x020) |
8737 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8738 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8739 | #else | |
8740 | # define ISLOWER(c) \ | |
86da66b5 HPN |
8741 | (('a' <= (c) && (c) <= 'i') \ |
8742 | || ('j' <= (c) && (c) <= 'r') \ | |
8743 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
8744 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
8745 | #endif | |
63cf211a | 8746 | |
ba479fd2 NN |
8747 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
8748 | int | |
8749 | main () | |
8750 | { | |
8751 | int i; | |
8752 | for (i = 0; i < 256; i++) | |
8753 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 8754 | || toupper (i) != TOUPPER (i)) |
a6ccdbab EC |
8755 | return 2; |
8756 | return 0; | |
ba479fd2 NN |
8757 | } |
8758 | _ACEOF | |
8759 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
8760 | if { (ac_try="$ac_link" |
8761 | case "(($ac_try" in | |
8762 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8763 | *) ac_try_echo=$ac_try;; | |
8764 | esac | |
8765 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8766 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
8767 | ac_status=$? |
8768 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8769 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
8770 | { (case "(($ac_try" in |
8771 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8772 | *) ac_try_echo=$ac_try;; | |
8773 | esac | |
8774 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8775 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
8776 | ac_status=$? |
8777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8778 | (exit $ac_status); }; }; then | |
956d6950 JL |
8779 | : |
8780 | else | |
ba479fd2 NN |
8781 | echo "$as_me: program exited with status $ac_status" >&5 |
8782 | echo "$as_me: failed program was:" >&5 | |
8783 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8784 | ||
8785 | ( exit $ac_status ) | |
8786 | ac_cv_header_stdc=no | |
956d6950 | 8787 | fi |
a6ccdbab | 8788 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8789 | fi |
a6ccdbab EC |
8790 | |
8791 | ||
956d6950 JL |
8792 | fi |
8793 | fi | |
a6ccdbab EC |
8794 | { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
8795 | echo "${ECHO_T}$ac_cv_header_stdc" >&6; } | |
63cf211a | 8796 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
8797 | |
8798 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8799 | #define STDC_HEADERS 1 |
ba479fd2 | 8800 | _ACEOF |
956d6950 JL |
8801 | |
8802 | fi | |
8803 | ||
a6ccdbab EC |
8804 | { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
8805 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } | |
ba479fd2 NN |
8806 | if test "${ac_cv_header_time+set}" = set; then |
8807 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8808 | else |
ba479fd2 | 8809 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8810 | /* confdefs.h. */ |
8811 | _ACEOF | |
8812 | cat confdefs.h >>conftest.$ac_ext | |
8813 | cat >>conftest.$ac_ext <<_ACEOF | |
8814 | /* end confdefs.h. */ | |
956d6950 JL |
8815 | #include <sys/types.h> |
8816 | #include <sys/time.h> | |
8817 | #include <time.h> | |
ba479fd2 NN |
8818 | |
8819 | int | |
8820 | main () | |
8821 | { | |
8822 | if ((struct tm *) 0) | |
8823 | return 0; | |
8824 | ; | |
8825 | return 0; | |
8826 | } | |
8827 | _ACEOF | |
8828 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
8829 | if { (ac_try="$ac_compile" |
8830 | case "(($ac_try" in | |
8831 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8832 | *) ac_try_echo=$ac_try;; | |
8833 | esac | |
8834 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8835 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8836 | ac_status=$? |
86da66b5 HPN |
8837 | grep -v '^ *+' conftest.er1 >conftest.err |
8838 | rm -f conftest.er1 | |
8839 | cat conftest.err >&5 | |
ba479fd2 | 8840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
8841 | (exit $ac_status); } && { |
8842 | test -z "$ac_c_werror_flag" || | |
8843 | test ! -s conftest.err | |
8844 | } && test -s conftest.$ac_objext; then | |
956d6950 JL |
8845 | ac_cv_header_time=yes |
8846 | else | |
ba479fd2 NN |
8847 | echo "$as_me: failed program was:" >&5 |
8848 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8849 | ||
a6ccdbab | 8850 | ac_cv_header_time=no |
956d6950 | 8851 | fi |
a6ccdbab EC |
8852 | |
8853 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
956d6950 | 8854 | fi |
a6ccdbab EC |
8855 | { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
8856 | echo "${ECHO_T}$ac_cv_header_time" >&6; } | |
63cf211a | 8857 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
8858 | |
8859 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8860 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 8861 | _ACEOF |
956d6950 JL |
8862 | |
8863 | fi | |
8864 | ||
a6ccdbab EC |
8865 | { echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8866 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6; } | |
18fc9bd4 RG |
8867 | if test "${gcc_cv_header_string+set}" = set; then |
8868 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8869 | else | |
8870 | cat >conftest.$ac_ext <<_ACEOF | |
8871 | /* confdefs.h. */ | |
8872 | _ACEOF | |
8873 | cat confdefs.h >>conftest.$ac_ext | |
8874 | cat >>conftest.$ac_ext <<_ACEOF | |
8875 | /* end confdefs.h. */ | |
8876 | #include <string.h> | |
8877 | #include <strings.h> | |
8878 | int | |
8879 | main () | |
8880 | { | |
8881 | ||
8882 | ; | |
8883 | return 0; | |
8884 | } | |
8885 | _ACEOF | |
8886 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
8887 | if { (ac_try="$ac_compile" |
8888 | case "(($ac_try" in | |
8889 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8890 | *) ac_try_echo=$ac_try;; | |
8891 | esac | |
8892 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8893 | (eval "$ac_compile") 2>conftest.er1 | |
18fc9bd4 RG |
8894 | ac_status=$? |
8895 | grep -v '^ *+' conftest.er1 >conftest.err | |
8896 | rm -f conftest.er1 | |
8897 | cat conftest.err >&5 | |
8898 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
8899 | (exit $ac_status); } && { |
8900 | test -z "$ac_c_werror_flag" || | |
8901 | test ! -s conftest.err | |
8902 | } && test -s conftest.$ac_objext; then | |
18fc9bd4 RG |
8903 | gcc_cv_header_string=yes |
8904 | else | |
8905 | echo "$as_me: failed program was:" >&5 | |
8906 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8907 | ||
a6ccdbab | 8908 | gcc_cv_header_string=no |
18fc9bd4 | 8909 | fi |
a6ccdbab EC |
8910 | |
8911 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18fc9bd4 | 8912 | fi |
a6ccdbab EC |
8913 | { echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 |
8914 | echo "${ECHO_T}$gcc_cv_header_string" >&6; } | |
18fc9bd4 RG |
8915 | if test $gcc_cv_header_string = yes; then |
8916 | ||
8917 | cat >>confdefs.h <<\_ACEOF | |
8918 | #define STRING_WITH_STRINGS 1 | |
8919 | _ACEOF | |
8920 | ||
8921 | fi | |
8922 | ||
a6ccdbab EC |
8923 | { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8924 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } | |
ba479fd2 NN |
8925 | if test "${ac_cv_header_sys_wait_h+set}" = set; then |
8926 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8927 | else |
ba479fd2 | 8928 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8929 | /* confdefs.h. */ |
8930 | _ACEOF | |
8931 | cat confdefs.h >>conftest.$ac_ext | |
8932 | cat >>conftest.$ac_ext <<_ACEOF | |
8933 | /* end confdefs.h. */ | |
e9831ca0 KG |
8934 | #include <sys/types.h> |
8935 | #include <sys/wait.h> | |
8936 | #ifndef WEXITSTATUS | |
a6ccdbab | 8937 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) |
e9831ca0 KG |
8938 | #endif |
8939 | #ifndef WIFEXITED | |
ba479fd2 | 8940 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8941 | #endif |
ba479fd2 NN |
8942 | |
8943 | int | |
8944 | main () | |
8945 | { | |
8946 | int s; | |
8947 | wait (&s); | |
8948 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8949 | ; | |
8950 | return 0; | |
8951 | } | |
8952 | _ACEOF | |
8953 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
8954 | if { (ac_try="$ac_compile" |
8955 | case "(($ac_try" in | |
8956 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8957 | *) ac_try_echo=$ac_try;; | |
8958 | esac | |
8959 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8960 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8961 | ac_status=$? |
86da66b5 HPN |
8962 | grep -v '^ *+' conftest.er1 >conftest.err |
8963 | rm -f conftest.er1 | |
8964 | cat conftest.err >&5 | |
ba479fd2 | 8965 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
8966 | (exit $ac_status); } && { |
8967 | test -z "$ac_c_werror_flag" || | |
8968 | test ! -s conftest.err | |
8969 | } && test -s conftest.$ac_objext; then | |
e9831ca0 KG |
8970 | ac_cv_header_sys_wait_h=yes |
8971 | else | |
ba479fd2 NN |
8972 | echo "$as_me: failed program was:" >&5 |
8973 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8974 | ||
a6ccdbab | 8975 | ac_cv_header_sys_wait_h=no |
e9831ca0 | 8976 | fi |
a6ccdbab EC |
8977 | |
8978 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
e9831ca0 | 8979 | fi |
a6ccdbab EC |
8980 | { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8981 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } | |
63cf211a | 8982 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8983 | |
8984 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8985 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8986 | _ACEOF |
6e3f3080 | 8987 | |
63cf211a | 8988 | fi |
6e3f3080 | 8989 | |
ba479fd2 NN |
8990 | |
8991 | ||
8992 | ||
8993 | ||
8994 | ||
8995 | ||
8996 | ||
8997 | ||
8998 | ||
8999 | ||
9000 | ||
9001 | ||
9002 | ||
9003 | ||
9004 | ||
9005 | ||
9006 | ||
9007 | ||
9008 | ||
9009 | ||
9010 | ||
dfb77e37 KC |
9011 | |
9012 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 9013 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 9014 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 9015 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 9016 | do |
ba479fd2 | 9017 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
a6ccdbab EC |
9018 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
9019 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } | |
9020 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 | 9021 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
ba479fd2 | 9022 | else |
18fc9bd4 | 9023 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9024 | /* confdefs.h. */ |
9025 | _ACEOF | |
9026 | cat confdefs.h >>conftest.$ac_ext | |
9027 | cat >>conftest.$ac_ext <<_ACEOF | |
9028 | /* end confdefs.h. */ | |
9029 | #include <$ac_header> | |
9030 | _ACEOF | |
a6ccdbab EC |
9031 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
9032 | case "(($ac_try" in | |
9033 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9034 | *) ac_try_echo=$ac_try;; | |
9035 | esac | |
9036 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9037 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
9038 | ac_status=$? |
9039 | grep -v '^ *+' conftest.er1 >conftest.err | |
9040 | rm -f conftest.er1 | |
9041 | cat conftest.err >&5 | |
9042 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
9043 | (exit $ac_status); } >/dev/null && { |
9044 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
9045 | test ! -s conftest.err | |
9046 | }; then | |
18fc9bd4 | 9047 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
9048 | else |
9049 | echo "$as_me: failed program was:" >&5 | |
9050 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9051 | ||
18fc9bd4 | 9052 | eval "$as_ac_Header=no" |
ba479fd2 | 9053 | fi |
a6ccdbab | 9054 | |
ba479fd2 | 9055 | rm -f conftest.err conftest.$ac_ext |
6e3f3080 | 9056 | fi |
a6ccdbab EC |
9057 | ac_res=`eval echo '${'$as_ac_Header'}'` |
9058 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
9059 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
9060 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
9061 | cat >>confdefs.h <<_ACEOF | |
9062 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9063 | _ACEOF | |
9064 | ||
956d6950 JL |
9065 | fi |
9066 | done | |
9067 | ||
9068 | ||
f24af81b | 9069 | # Check for thread headers. |
a6ccdbab EC |
9070 | { echo "$as_me:$LINENO: checking for thread.h" >&5 |
9071 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
9072 | if test "${ac_cv_header_thread_h+set}" = set; then |
9073 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 9074 | else |
18fc9bd4 | 9075 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9076 | /* confdefs.h. */ |
9077 | _ACEOF | |
9078 | cat confdefs.h >>conftest.$ac_ext | |
9079 | cat >>conftest.$ac_ext <<_ACEOF | |
9080 | /* end confdefs.h. */ | |
9081 | #include <thread.h> | |
9082 | _ACEOF | |
a6ccdbab EC |
9083 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
9084 | case "(($ac_try" in | |
9085 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9086 | *) ac_try_echo=$ac_try;; | |
9087 | esac | |
9088 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9089 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
9090 | ac_status=$? |
9091 | grep -v '^ *+' conftest.er1 >conftest.err | |
9092 | rm -f conftest.er1 | |
9093 | cat conftest.err >&5 | |
9094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
9095 | (exit $ac_status); } >/dev/null && { |
9096 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
9097 | test ! -s conftest.err | |
9098 | }; then | |
18fc9bd4 | 9099 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
9100 | else |
9101 | echo "$as_me: failed program was:" >&5 | |
9102 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9103 | ||
18fc9bd4 | 9104 | ac_cv_header_thread_h=no |
ba479fd2 | 9105 | fi |
a6ccdbab | 9106 | |
ba479fd2 | 9107 | rm -f conftest.err conftest.$ac_ext |
6e3f3080 | 9108 | fi |
a6ccdbab EC |
9109 | { echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
9110 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6; } | |
ba479fd2 | 9111 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
9112 | have_thread_h=yes |
9113 | else | |
ba479fd2 | 9114 | have_thread_h= |
f24af81b TT |
9115 | fi |
9116 | ||
a6ccdbab EC |
9117 | { echo "$as_me:$LINENO: checking for pthread.h" >&5 |
9118 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
9119 | if test "${ac_cv_header_pthread_h+set}" = set; then |
9120 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 9121 | else |
18fc9bd4 | 9122 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9123 | /* confdefs.h. */ |
9124 | _ACEOF | |
9125 | cat confdefs.h >>conftest.$ac_ext | |
9126 | cat >>conftest.$ac_ext <<_ACEOF | |
9127 | /* end confdefs.h. */ | |
9128 | #include <pthread.h> | |
9129 | _ACEOF | |
a6ccdbab EC |
9130 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
9131 | case "(($ac_try" in | |
9132 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9133 | *) ac_try_echo=$ac_try;; | |
9134 | esac | |
9135 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9136 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
9137 | ac_status=$? |
9138 | grep -v '^ *+' conftest.er1 >conftest.err | |
9139 | rm -f conftest.er1 | |
9140 | cat conftest.err >&5 | |
9141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
9142 | (exit $ac_status); } >/dev/null && { |
9143 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
9144 | test ! -s conftest.err | |
9145 | }; then | |
18fc9bd4 | 9146 | ac_cv_header_pthread_h=yes |
ba479fd2 | 9147 | else |
18fc9bd4 RG |
9148 | echo "$as_me: failed program was:" >&5 |
9149 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9150 | ||
9151 | ac_cv_header_pthread_h=no | |
9152 | fi | |
a6ccdbab | 9153 | |
18fc9bd4 | 9154 | rm -f conftest.err conftest.$ac_ext |
6e3f3080 | 9155 | fi |
a6ccdbab EC |
9156 | { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
9157 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } | |
ba479fd2 | 9158 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
9159 | have_pthread_h=yes |
9160 | else | |
ba479fd2 | 9161 | have_pthread_h= |
f24af81b TT |
9162 | fi |
9163 | ||
9164 | ||
84c041a1 | 9165 | # These tests can't be done till we know if we have limits.h. |
a6ccdbab EC |
9166 | { echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
9167 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6; } | |
ba479fd2 NN |
9168 | if test "${gcc_cv_decl_char_bit+set}" = set; then |
9169 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9170 | else | |
9171 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9172 | /* confdefs.h. */ |
9173 | _ACEOF | |
9174 | cat confdefs.h >>conftest.$ac_ext | |
9175 | cat >>conftest.$ac_ext <<_ACEOF | |
9176 | /* end confdefs.h. */ | |
75e93faa ZW |
9177 | #ifdef HAVE_LIMITS_H |
9178 | #include <limits.h> | |
9179 | #endif | |
9180 | #ifdef CHAR_BIT | |
9181 | found | |
9182 | #endif | |
ba479fd2 | 9183 | _ACEOF |
75e93faa | 9184 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9185 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
9186 | gcc_cv_decl_char_bit=yes |
9187 | else | |
75e93faa ZW |
9188 | gcc_cv_decl_char_bit=no |
9189 | fi | |
9190 | rm -f conftest* | |
9191 | ||
9192 | ||
9193 | fi | |
a6ccdbab EC |
9194 | { echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
9195 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6; } | |
75e93faa | 9196 | if test $gcc_cv_decl_char_bit = no; then |
a6ccdbab EC |
9197 | { echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
9198 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6; } | |
ba479fd2 NN |
9199 | if test "${gcc_cv_c_nbby+set}" = set; then |
9200 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
9201 | else |
9202 | i=8 | |
9203 | gcc_cv_c_nbby= | |
9204 | while test $i -lt 65; do | |
ba479fd2 | 9205 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9206 | /* confdefs.h. */ |
9207 | _ACEOF | |
9208 | cat confdefs.h >>conftest.$ac_ext | |
9209 | cat >>conftest.$ac_ext <<_ACEOF | |
9210 | /* end confdefs.h. */ | |
9211 | ||
9212 | int | |
9213 | main () | |
9214 | { | |
4e70264f ZW |
9215 | switch(0) { |
9216 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
9217 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
9218 | ; } | |
ba479fd2 NN |
9219 | ; |
9220 | return 0; | |
9221 | } | |
9222 | _ACEOF | |
9223 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
9224 | if { (ac_try="$ac_compile" |
9225 | case "(($ac_try" in | |
9226 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9227 | *) ac_try_echo=$ac_try;; | |
9228 | esac | |
9229 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9230 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 9231 | ac_status=$? |
86da66b5 HPN |
9232 | grep -v '^ *+' conftest.er1 >conftest.err |
9233 | rm -f conftest.er1 | |
9234 | cat conftest.err >&5 | |
ba479fd2 | 9235 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
9236 | (exit $ac_status); } && { |
9237 | test -z "$ac_c_werror_flag" || | |
9238 | test ! -s conftest.err | |
9239 | } && test -s conftest.$ac_objext; then | |
4e70264f | 9240 | gcc_cv_c_nbby=$i; break |
75e93faa | 9241 | else |
ba479fd2 NN |
9242 | echo "$as_me: failed program was:" >&5 |
9243 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9244 | ||
a6ccdbab | 9245 | |
75e93faa | 9246 | fi |
a6ccdbab EC |
9247 | |
9248 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
75e93faa ZW |
9249 | i=`expr $i + 1` |
9250 | done | |
9251 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
9252 | ||
9253 | fi | |
a6ccdbab EC |
9254 | { echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
9255 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6; } | |
75e93faa | 9256 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
9257 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
9258 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
9259 | { (exit 1); exit 1; }; } | |
75e93faa | 9260 | else |
ba479fd2 NN |
9261 | |
9262 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 9263 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 9264 | _ACEOF |
75e93faa ZW |
9265 | |
9266 | fi | |
9267 | fi | |
a6ccdbab EC |
9268 | { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
9269 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } | |
ba479fd2 NN |
9270 | if test "${ac_cv_c_bigendian+set}" = set; then |
9271 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 9272 | else |
9791c75c | 9273 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 9274 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9275 | /* confdefs.h. */ |
9276 | _ACEOF | |
9277 | cat confdefs.h >>conftest.$ac_ext | |
9278 | cat >>conftest.$ac_ext <<_ACEOF | |
9279 | /* end confdefs.h. */ | |
4977bab6 ZW |
9280 | #include <sys/types.h> |
9281 | #include <sys/param.h> | |
9791c75c | 9282 | |
ba479fd2 NN |
9283 | int |
9284 | main () | |
9285 | { | |
a6ccdbab EC |
9286 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ |
9287 | && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) | |
4977bab6 | 9288 | bogus endian macros |
84c041a1 | 9289 | #endif |
9791c75c | 9290 | |
ba479fd2 NN |
9291 | ; |
9292 | return 0; | |
9293 | } | |
9294 | _ACEOF | |
9295 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
9296 | if { (ac_try="$ac_compile" |
9297 | case "(($ac_try" in | |
9298 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9299 | *) ac_try_echo=$ac_try;; | |
9300 | esac | |
9301 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9302 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 9303 | ac_status=$? |
86da66b5 HPN |
9304 | grep -v '^ *+' conftest.er1 >conftest.err |
9305 | rm -f conftest.er1 | |
9306 | cat conftest.err >&5 | |
ba479fd2 | 9307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
9308 | (exit $ac_status); } && { |
9309 | test -z "$ac_c_werror_flag" || | |
9310 | test ! -s conftest.err | |
9311 | } && test -s conftest.$ac_objext; then | |
4977bab6 | 9312 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 9313 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9314 | /* confdefs.h. */ |
9315 | _ACEOF | |
9316 | cat confdefs.h >>conftest.$ac_ext | |
9317 | cat >>conftest.$ac_ext <<_ACEOF | |
9318 | /* end confdefs.h. */ | |
4977bab6 ZW |
9319 | #include <sys/types.h> |
9320 | #include <sys/param.h> | |
9791c75c | 9321 | |
ba479fd2 NN |
9322 | int |
9323 | main () | |
9324 | { | |
4977bab6 ZW |
9325 | #if BYTE_ORDER != BIG_ENDIAN |
9326 | not big endian | |
84c041a1 | 9327 | #endif |
9791c75c | 9328 | |
ba479fd2 NN |
9329 | ; |
9330 | return 0; | |
9331 | } | |
9332 | _ACEOF | |
9333 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
9334 | if { (ac_try="$ac_compile" |
9335 | case "(($ac_try" in | |
9336 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9337 | *) ac_try_echo=$ac_try;; | |
9338 | esac | |
9339 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9340 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 9341 | ac_status=$? |
86da66b5 HPN |
9342 | grep -v '^ *+' conftest.er1 >conftest.err |
9343 | rm -f conftest.er1 | |
9344 | cat conftest.err >&5 | |
ba479fd2 | 9345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
9346 | (exit $ac_status); } && { |
9347 | test -z "$ac_c_werror_flag" || | |
9348 | test ! -s conftest.err | |
9349 | } && test -s conftest.$ac_objext; then | |
4977bab6 ZW |
9350 | ac_cv_c_bigendian=yes |
9351 | else | |
ba479fd2 NN |
9352 | echo "$as_me: failed program was:" >&5 |
9353 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9354 | ||
a6ccdbab | 9355 | ac_cv_c_bigendian=no |
4977bab6 | 9356 | fi |
a6ccdbab EC |
9357 | |
9358 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4977bab6 | 9359 | else |
ba479fd2 NN |
9360 | echo "$as_me: failed program was:" >&5 |
9361 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9362 | ||
a6ccdbab | 9363 | # It does not; compile a test program. |
9791c75c KC |
9364 | if test "$cross_compiling" = yes; then |
9365 | # try to guess the endianness by grepping values into an object file | |
9366 | ac_cv_c_bigendian=unknown | |
9367 | cat >conftest.$ac_ext <<_ACEOF | |
9368 | /* confdefs.h. */ | |
9369 | _ACEOF | |
9370 | cat confdefs.h >>conftest.$ac_ext | |
9371 | cat >>conftest.$ac_ext <<_ACEOF | |
9372 | /* end confdefs.h. */ | |
a6ccdbab EC |
9373 | short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
9374 | short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9791c75c | 9375 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } |
a6ccdbab EC |
9376 | short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; |
9377 | short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9791c75c KC |
9378 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } |
9379 | int | |
9380 | main () | |
9381 | { | |
9382 | _ascii (); _ebcdic (); | |
9383 | ; | |
9384 | return 0; | |
9385 | } | |
9386 | _ACEOF | |
9387 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
9388 | if { (ac_try="$ac_compile" |
9389 | case "(($ac_try" in | |
9390 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9391 | *) ac_try_echo=$ac_try;; | |
9392 | esac | |
9393 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9394 | (eval "$ac_compile") 2>conftest.er1 | |
9791c75c KC |
9395 | ac_status=$? |
9396 | grep -v '^ *+' conftest.er1 >conftest.err | |
9397 | rm -f conftest.er1 | |
9398 | cat conftest.err >&5 | |
9399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
9400 | (exit $ac_status); } && { |
9401 | test -z "$ac_c_werror_flag" || | |
9402 | test ! -s conftest.err | |
9403 | } && test -s conftest.$ac_objext; then | |
9791c75c KC |
9404 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then |
9405 | ac_cv_c_bigendian=yes | |
9406 | fi | |
9407 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9408 | if test "$ac_cv_c_bigendian" = unknown; then | |
9409 | ac_cv_c_bigendian=no | |
9410 | else | |
9411 | # finding both strings is unlikely to happen, but who knows? | |
9412 | ac_cv_c_bigendian=unknown | |
9413 | fi | |
9414 | fi | |
9415 | else | |
9416 | echo "$as_me: failed program was:" >&5 | |
9417 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9418 | ||
a6ccdbab | 9419 | |
4977bab6 | 9420 | fi |
a6ccdbab EC |
9421 | |
9422 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
ba479fd2 NN |
9423 | else |
9424 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9425 | /* confdefs.h. */ |
9426 | _ACEOF | |
9427 | cat confdefs.h >>conftest.$ac_ext | |
9428 | cat >>conftest.$ac_ext <<_ACEOF | |
9429 | /* end confdefs.h. */ | |
a6ccdbab | 9430 | $ac_includes_default |
9791c75c KC |
9431 | int |
9432 | main () | |
9433 | { | |
a6ccdbab | 9434 | |
4977bab6 ZW |
9435 | /* Are we little or big endian? From Harbison&Steele. */ |
9436 | union | |
9437 | { | |
a6ccdbab EC |
9438 | long int l; |
9439 | char c[sizeof (long int)]; | |
4977bab6 ZW |
9440 | } u; |
9441 | u.l = 1; | |
a6ccdbab EC |
9442 | return u.c[sizeof (long int) - 1] == 1; |
9443 | ||
9444 | ; | |
9445 | return 0; | |
4977bab6 | 9446 | } |
ba479fd2 NN |
9447 | _ACEOF |
9448 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
9449 | if { (ac_try="$ac_link" |
9450 | case "(($ac_try" in | |
9451 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9452 | *) ac_try_echo=$ac_try;; | |
9453 | esac | |
9454 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9455 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
9456 | ac_status=$? |
9457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9458 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
9459 | { (case "(($ac_try" in |
9460 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9461 | *) ac_try_echo=$ac_try;; | |
9462 | esac | |
9463 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9464 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
9465 | ac_status=$? |
9466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9467 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
9468 | ac_cv_c_bigendian=no |
9469 | else | |
ba479fd2 NN |
9470 | echo "$as_me: program exited with status $ac_status" >&5 |
9471 | echo "$as_me: failed program was:" >&5 | |
9472 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9473 | ||
9474 | ( exit $ac_status ) | |
9475 | ac_cv_c_bigendian=yes | |
4977bab6 | 9476 | fi |
a6ccdbab | 9477 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 9478 | fi |
a6ccdbab EC |
9479 | |
9480 | ||
4977bab6 | 9481 | fi |
a6ccdbab EC |
9482 | |
9483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4977bab6 | 9484 | fi |
a6ccdbab EC |
9485 | { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
9486 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } | |
9791c75c KC |
9487 | case $ac_cv_c_bigendian in |
9488 | yes) | |
ba479fd2 NN |
9489 | |
9490 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 9491 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 9492 | _ACEOF |
9791c75c KC |
9493 | ;; |
9494 | no) | |
9495 | ;; | |
9496 | *) | |
9497 | { { echo "$as_me:$LINENO: error: unknown endianness | |
9498 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
9499 | echo "$as_me: error: unknown endianness | |
9500 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
9501 | { (exit 1); exit 1; }; } ;; | |
9502 | esac | |
84c041a1 | 9503 | |
75e93faa | 9504 | |
73458fb7 NN |
9505 | # -------- |
9506 | # UNSORTED | |
9507 | # -------- | |
1e608388 | 9508 | |
73458fb7 NN |
9509 | # Stage specific cflags for build. |
9510 | stage1_cflags= | |
9511 | case $build in | |
9512 | vax-*-*) | |
9513 | if test x$GCC = xyes | |
9514 | then | |
9515 | stage1_cflags="-Wa,-J" | |
9516 | else | |
9517 | stage1_cflags="-J" | |
9518 | fi | |
9519 | ;; | |
73458fb7 | 9520 | esac |
1e608388 | 9521 | |
1e608388 | 9522 | |
4e70264f ZW |
9523 | # These libraries may be used by collect2. |
9524 | # We may need a special search path to get them linked. | |
a6ccdbab EC |
9525 | { echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
9526 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6; } | |
ba479fd2 NN |
9527 | if test "${gcc_cv_collect2_libs+set}" = set; then |
9528 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
9529 | else |
9530 | save_LIBS="$LIBS" | |
7f2749d4 | 9531 | for libs in '' -lld -lmld \ |
4e70264f ZW |
9532 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
9533 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
9534 | do | |
9535 | LIBS="$libs" | |
ba479fd2 | 9536 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9537 | /* confdefs.h. */ |
9538 | _ACEOF | |
9539 | cat confdefs.h >>conftest.$ac_ext | |
9540 | cat >>conftest.$ac_ext <<_ACEOF | |
9541 | /* end confdefs.h. */ | |
9542 | ||
a6ccdbab EC |
9543 | /* Override any GCC internal prototype to avoid an error. |
9544 | Use char because int might match the return type of a GCC | |
9545 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
9546 | #ifdef __cplusplus |
9547 | extern "C" | |
9548 | #endif | |
ba479fd2 NN |
9549 | char ldopen (); |
9550 | int | |
9551 | main () | |
9552 | { | |
a6ccdbab | 9553 | return ldopen (); |
ba479fd2 NN |
9554 | ; |
9555 | return 0; | |
9556 | } | |
9557 | _ACEOF | |
9558 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
9559 | if { (ac_try="$ac_link" |
9560 | case "(($ac_try" in | |
9561 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9562 | *) ac_try_echo=$ac_try;; | |
9563 | esac | |
9564 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9565 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 9566 | ac_status=$? |
86da66b5 HPN |
9567 | grep -v '^ *+' conftest.er1 >conftest.err |
9568 | rm -f conftest.er1 | |
9569 | cat conftest.err >&5 | |
ba479fd2 | 9570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
9571 | (exit $ac_status); } && { |
9572 | test -z "$ac_c_werror_flag" || | |
9573 | test ! -s conftest.err | |
9574 | } && test -s conftest$ac_exeext && | |
9575 | $as_test_x conftest$ac_exeext; then | |
4e70264f ZW |
9576 | gcc_cv_collect2_libs="$libs"; break |
9577 | else | |
ba479fd2 NN |
9578 | echo "$as_me: failed program was:" >&5 |
9579 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9580 | ||
a6ccdbab | 9581 | |
4e70264f | 9582 | fi |
a6ccdbab EC |
9583 | |
9584 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 9585 | conftest$ac_exeext conftest.$ac_ext |
4e70264f ZW |
9586 | done |
9587 | LIBS="$save_LIBS" | |
9588 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
9589 | fi | |
a6ccdbab EC |
9590 | { echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
9591 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6; } | |
4e70264f ZW |
9592 | case $gcc_cv_collect2_libs in |
9593 | "none required") ;; | |
9594 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
9595 | esac | |
9596 | ||
9597 | ||
7f2749d4 RK |
9598 | # When building Ada code on Alpha, we need exc_resume which is usually in |
9599 | # -lexc. So test for it. | |
9600 | save_LIBS="$LIBS" | |
9601 | LIBS= | |
a6ccdbab EC |
9602 | { echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
9603 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6; } | |
ba479fd2 NN |
9604 | if test "${ac_cv_search_exc_resume+set}" = set; then |
9605 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9606 | else | |
9607 | ac_func_search_save_LIBS=$LIBS | |
ba479fd2 | 9608 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9609 | /* confdefs.h. */ |
9610 | _ACEOF | |
9611 | cat confdefs.h >>conftest.$ac_ext | |
9612 | cat >>conftest.$ac_ext <<_ACEOF | |
9613 | /* end confdefs.h. */ | |
7f2749d4 | 9614 | |
a6ccdbab EC |
9615 | /* Override any GCC internal prototype to avoid an error. |
9616 | Use char because int might match the return type of a GCC | |
9617 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
9618 | #ifdef __cplusplus |
9619 | extern "C" | |
9620 | #endif | |
ba479fd2 NN |
9621 | char exc_resume (); |
9622 | int | |
9623 | main () | |
9624 | { | |
a6ccdbab | 9625 | return exc_resume (); |
ba479fd2 NN |
9626 | ; |
9627 | return 0; | |
9628 | } | |
9629 | _ACEOF | |
a6ccdbab EC |
9630 | for ac_lib in '' exc; do |
9631 | if test -z "$ac_lib"; then | |
9632 | ac_res="none required" | |
9633 | else | |
9634 | ac_res=-l$ac_lib | |
9635 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9636 | fi | |
9637 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9638 | if { (ac_try="$ac_link" | |
9639 | case "(($ac_try" in | |
9640 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9641 | *) ac_try_echo=$ac_try;; | |
9642 | esac | |
9643 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9644 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 9645 | ac_status=$? |
86da66b5 HPN |
9646 | grep -v '^ *+' conftest.er1 >conftest.err |
9647 | rm -f conftest.er1 | |
9648 | cat conftest.err >&5 | |
ba479fd2 | 9649 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
9650 | (exit $ac_status); } && { |
9651 | test -z "$ac_c_werror_flag" || | |
9652 | test ! -s conftest.err | |
9653 | } && test -s conftest$ac_exeext && | |
9654 | $as_test_x conftest$ac_exeext; then | |
9655 | ac_cv_search_exc_resume=$ac_res | |
7f2749d4 | 9656 | else |
ba479fd2 NN |
9657 | echo "$as_me: failed program was:" >&5 |
9658 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9659 | ||
62c9aa5f | 9660 | |
a6ccdbab | 9661 | fi |
ba479fd2 | 9662 | |
a6ccdbab EC |
9663 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
9664 | conftest$ac_exeext | |
9665 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
9666 | break | |
b8ec3cc8 | 9667 | fi |
a6ccdbab EC |
9668 | done |
9669 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
9670 | : | |
9671 | else | |
9672 | ac_cv_search_exc_resume=no | |
b8ec3cc8 | 9673 | fi |
a6ccdbab | 9674 | rm conftest.$ac_ext |
b8ec3cc8 EC |
9675 | LIBS=$ac_func_search_save_LIBS |
9676 | fi | |
a6ccdbab EC |
9677 | { echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 |
9678 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6; } | |
9679 | ac_res=$ac_cv_search_exc_resume | |
9680 | if test "$ac_res" != no; then | |
9681 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b8ec3cc8 EC |
9682 | |
9683 | fi | |
9684 | ||
dd7f7a6e | 9685 | GNAT_LIBEXC="$LIBS" |
b8ec3cc8 EC |
9686 | LIBS="$save_LIBS" |
9687 | ||
9688 | ||
dd7f7a6e EC |
9689 | # Some systems put ldexp and frexp in libm instead of libc; assume |
9690 | # they're both in the same place. jcf-dump needs them. | |
9691 | save_LIBS="$LIBS" | |
9692 | LIBS= | |
a6ccdbab EC |
9693 | { echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
9694 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6; } | |
dd7f7a6e | 9695 | if test "${ac_cv_search_ldexp+set}" = set; then |
b8ec3cc8 EC |
9696 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9697 | else | |
dd7f7a6e | 9698 | ac_func_search_save_LIBS=$LIBS |
dd7f7a6e | 9699 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9700 | /* confdefs.h. */ |
9701 | _ACEOF | |
9702 | cat confdefs.h >>conftest.$ac_ext | |
9703 | cat >>conftest.$ac_ext <<_ACEOF | |
9704 | /* end confdefs.h. */ | |
dd7f7a6e | 9705 | |
a6ccdbab EC |
9706 | /* Override any GCC internal prototype to avoid an error. |
9707 | Use char because int might match the return type of a GCC | |
9708 | builtin and then its argument prototype would still apply. */ | |
dd7f7a6e EC |
9709 | #ifdef __cplusplus |
9710 | extern "C" | |
9711 | #endif | |
dd7f7a6e | 9712 | char ldexp (); |
ba479fd2 NN |
9713 | int |
9714 | main () | |
9715 | { | |
a6ccdbab | 9716 | return ldexp (); |
ba479fd2 NN |
9717 | ; |
9718 | return 0; | |
9719 | } | |
9720 | _ACEOF | |
a6ccdbab EC |
9721 | for ac_lib in '' m; do |
9722 | if test -z "$ac_lib"; then | |
9723 | ac_res="none required" | |
9724 | else | |
9725 | ac_res=-l$ac_lib | |
dd7f7a6e | 9726 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
a6ccdbab EC |
9727 | fi |
9728 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9729 | if { (ac_try="$ac_link" | |
9730 | case "(($ac_try" in | |
9731 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9732 | *) ac_try_echo=$ac_try;; | |
9733 | esac | |
9734 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9735 | (eval "$ac_link") 2>conftest.er1 | |
dd7f7a6e EC |
9736 | ac_status=$? |
9737 | grep -v '^ *+' conftest.er1 >conftest.err | |
9738 | rm -f conftest.er1 | |
9739 | cat conftest.err >&5 | |
9740 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
9741 | (exit $ac_status); } && { |
9742 | test -z "$ac_c_werror_flag" || | |
9743 | test ! -s conftest.err | |
9744 | } && test -s conftest$ac_exeext && | |
9745 | $as_test_x conftest$ac_exeext; then | |
9746 | ac_cv_search_ldexp=$ac_res | |
dd7f7a6e EC |
9747 | else |
9748 | echo "$as_me: failed program was:" >&5 | |
9749 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9750 | ||
a6ccdbab | 9751 | |
dd7f7a6e | 9752 | fi |
a6ccdbab EC |
9753 | |
9754 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
9755 | conftest$ac_exeext | |
9756 | if test "${ac_cv_search_ldexp+set}" = set; then | |
9757 | break | |
9758 | fi | |
9759 | done | |
9760 | if test "${ac_cv_search_ldexp+set}" = set; then | |
9761 | : | |
9762 | else | |
9763 | ac_cv_search_ldexp=no | |
dd7f7a6e | 9764 | fi |
a6ccdbab | 9765 | rm conftest.$ac_ext |
dd7f7a6e EC |
9766 | LIBS=$ac_func_search_save_LIBS |
9767 | fi | |
a6ccdbab EC |
9768 | { echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 |
9769 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6; } | |
9770 | ac_res=$ac_cv_search_ldexp | |
9771 | if test "$ac_res" != no; then | |
9772 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
9773 | |
9774 | fi | |
9775 | ||
9776 | LDEXP_LIB="$LIBS" | |
9777 | LIBS="$save_LIBS" | |
9778 | ||
9779 | ||
9780 | # Use <inttypes.h> only if it exists, | |
9781 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
a6ccdbab EC |
9782 | { echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9783 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; } | |
dd7f7a6e EC |
9784 | if test "${gcc_cv_header_inttypes_h+set}" = set; then |
9785 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9786 | else | |
9787 | cat >conftest.$ac_ext <<_ACEOF | |
9788 | /* confdefs.h. */ | |
9789 | _ACEOF | |
9790 | cat confdefs.h >>conftest.$ac_ext | |
9791 | cat >>conftest.$ac_ext <<_ACEOF | |
9792 | /* end confdefs.h. */ | |
9793 | #include <sys/types.h> | |
9794 | #include <inttypes.h> | |
9795 | int | |
9796 | main () | |
9797 | { | |
9798 | intmax_t i = -1; | |
9799 | ; | |
9800 | return 0; | |
9801 | } | |
9802 | _ACEOF | |
9803 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
9804 | if { (ac_try="$ac_compile" |
9805 | case "(($ac_try" in | |
9806 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9807 | *) ac_try_echo=$ac_try;; | |
9808 | esac | |
9809 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9810 | (eval "$ac_compile") 2>conftest.er1 | |
dd7f7a6e EC |
9811 | ac_status=$? |
9812 | grep -v '^ *+' conftest.er1 >conftest.err | |
9813 | rm -f conftest.er1 | |
9814 | cat conftest.err >&5 | |
9815 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
9816 | (exit $ac_status); } && { |
9817 | test -z "$ac_c_werror_flag" || | |
9818 | test ! -s conftest.err | |
9819 | } && test -s conftest.$ac_objext; then | |
dd7f7a6e EC |
9820 | gcc_cv_header_inttypes_h=yes |
9821 | else | |
9822 | echo "$as_me: failed program was:" >&5 | |
9823 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9824 | ||
a6ccdbab | 9825 | gcc_cv_header_inttypes_h=no |
dd7f7a6e | 9826 | fi |
a6ccdbab EC |
9827 | |
9828 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
dd7f7a6e EC |
9829 | fi |
9830 | ||
a6ccdbab EC |
9831 | { echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9832 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6; } | |
dd7f7a6e EC |
9833 | if test $gcc_cv_header_inttypes_h = yes; then |
9834 | ||
9835 | cat >>confdefs.h <<\_ACEOF | |
9836 | #define HAVE_INTTYPES_H 1 | |
9837 | _ACEOF | |
9838 | ||
0056a9b5 | 9839 | fi |
956d6950 | 9840 | |
c149cc37 | 9841 | |
ba479fd2 NN |
9842 | |
9843 | ||
9844 | ||
9845 | ||
9846 | ||
9847 | ||
9848 | ||
9849 | ||
9850 | ||
9851 | ||
9852 | ||
9853 | ||
9854 | ||
9855 | ||
9856 | ||
9857 | ||
0d667716 KG |
9858 | |
9859 | ||
9860 | ||
9861 | ||
9862 | ||
9863 | ||
9864 | ||
9865 | ||
9866 | ||
9867 | ||
9868 | ||
9869 | ||
ba479fd2 NN |
9870 | |
9871 | ||
9872 | ||
9873 | ||
9874 | ||
9875 | ||
9876 | ||
9877 | ||
52a6edcc | 9878 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9879 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9880 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9881 | 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 | |
956d6950 | 9882 | do |
ba479fd2 | 9883 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
a6ccdbab EC |
9884 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 |
9885 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } | |
9886 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
9887 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9888 | else | |
9889 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9890 | /* confdefs.h. */ |
9891 | _ACEOF | |
9892 | cat confdefs.h >>conftest.$ac_ext | |
9893 | cat >>conftest.$ac_ext <<_ACEOF | |
9894 | /* end confdefs.h. */ | |
86da66b5 HPN |
9895 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9896 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9897 | #define $ac_func innocuous_$ac_func | |
9898 | ||
956d6950 | 9899 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9900 | which can conflict with char $ac_func (); below. |
9901 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9902 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9903 | |
ba479fd2 NN |
9904 | #ifdef __STDC__ |
9905 | # include <limits.h> | |
9906 | #else | |
9907 | # include <assert.h> | |
9908 | #endif | |
86da66b5 HPN |
9909 | |
9910 | #undef $ac_func | |
9911 | ||
a6ccdbab EC |
9912 | /* Override any GCC internal prototype to avoid an error. |
9913 | Use char because int might match the return type of a GCC | |
9914 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
9915 | #ifdef __cplusplus |
9916 | extern "C" | |
ba479fd2 | 9917 | #endif |
ba479fd2 | 9918 | char $ac_func (); |
956d6950 JL |
9919 | /* The GNU C library defines this for functions which it implements |
9920 | to always fail with ENOSYS. Some functions are actually named | |
9921 | something starting with __ and the normal name is an alias. */ | |
a6ccdbab | 9922 | #if defined __stub_$ac_func || defined __stub___$ac_func |
956d6950 | 9923 | choke me |
956d6950 JL |
9924 | #endif |
9925 | ||
ba479fd2 NN |
9926 | int |
9927 | main () | |
9928 | { | |
a6ccdbab | 9929 | return $ac_func (); |
ba479fd2 NN |
9930 | ; |
9931 | return 0; | |
9932 | } | |
9933 | _ACEOF | |
9934 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
9935 | if { (ac_try="$ac_link" |
9936 | case "(($ac_try" in | |
9937 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9938 | *) ac_try_echo=$ac_try;; | |
9939 | esac | |
9940 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9941 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 9942 | ac_status=$? |
86da66b5 HPN |
9943 | grep -v '^ *+' conftest.er1 >conftest.err |
9944 | rm -f conftest.er1 | |
9945 | cat conftest.err >&5 | |
ba479fd2 | 9946 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
9947 | (exit $ac_status); } && { |
9948 | test -z "$ac_c_werror_flag" || | |
9949 | test ! -s conftest.err | |
9950 | } && test -s conftest$ac_exeext && | |
9951 | $as_test_x conftest$ac_exeext; then | |
ba479fd2 NN |
9952 | eval "$as_ac_var=yes" |
9953 | else | |
9954 | echo "$as_me: failed program was:" >&5 | |
9955 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9956 | ||
a6ccdbab | 9957 | eval "$as_ac_var=no" |
ba479fd2 | 9958 | fi |
a6ccdbab EC |
9959 | |
9960 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 9961 | conftest$ac_exeext conftest.$ac_ext |
ba479fd2 | 9962 | fi |
a6ccdbab EC |
9963 | ac_res=`eval echo '${'$as_ac_var'}'` |
9964 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
9965 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
9966 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
9967 | cat >>confdefs.h <<_ACEOF | |
9968 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9969 | _ACEOF | |
956d6950 | 9970 | |
956d6950 JL |
9971 | fi |
9972 | done | |
9973 | ||
6885fc87 | 9974 | |
39f6c4c8 | 9975 | if test x$ac_cv_func_mbstowcs = xyes; then |
a6ccdbab EC |
9976 | { echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9977 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6; } | |
ba479fd2 NN |
9978 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then |
9979 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9980 | else |
9981 | if test "$cross_compiling" = yes; then | |
9982 | gcc_cv_func_mbstowcs_works=yes | |
9983 | else | |
ba479fd2 | 9984 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9985 | /* confdefs.h. */ |
9986 | _ACEOF | |
9987 | cat confdefs.h >>conftest.$ac_ext | |
9988 | cat >>conftest.$ac_ext <<_ACEOF | |
9989 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9990 | #include <stdlib.h> |
9991 | int main() | |
9992 | { | |
9993 | mbstowcs(0, "", 0); | |
9994 | return 0; | |
9995 | } | |
ba479fd2 NN |
9996 | _ACEOF |
9997 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
9998 | if { (ac_try="$ac_link" |
9999 | case "(($ac_try" in | |
10000 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10001 | *) ac_try_echo=$ac_try;; | |
10002 | esac | |
10003 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10004 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10005 | ac_status=$? |
10006 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10007 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
10008 | { (case "(($ac_try" in |
10009 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10010 | *) ac_try_echo=$ac_try;; | |
10011 | esac | |
10012 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10013 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10014 | ac_status=$? |
10015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10016 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
10017 | gcc_cv_func_mbstowcs_works=yes |
10018 | else | |
ba479fd2 NN |
10019 | echo "$as_me: program exited with status $ac_status" >&5 |
10020 | echo "$as_me: failed program was:" >&5 | |
10021 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10022 | ||
10023 | ( exit $ac_status ) | |
10024 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 10025 | fi |
a6ccdbab | 10026 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 10027 | fi |
a6ccdbab EC |
10028 | |
10029 | ||
39f6c4c8 | 10030 | fi |
a6ccdbab EC |
10031 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
10032 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6; } | |
63cf211a | 10033 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
10034 | |
10035 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 10036 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 10037 | _ACEOF |
39f6c4c8 KW |
10038 | |
10039 | fi | |
10040 | fi | |
10041 | ||
a6ccdbab EC |
10042 | { echo "$as_me:$LINENO: checking for ssize_t" >&5 |
10043 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } | |
ba479fd2 NN |
10044 | if test "${ac_cv_type_ssize_t+set}" = set; then |
10045 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 10046 | else |
ba479fd2 | 10047 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10048 | /* confdefs.h. */ |
10049 | _ACEOF | |
10050 | cat confdefs.h >>conftest.$ac_ext | |
10051 | cat >>conftest.$ac_ext <<_ACEOF | |
10052 | /* end confdefs.h. */ | |
8b4fc07a | 10053 | $ac_includes_default |
a6ccdbab | 10054 | typedef ssize_t ac__type_new_; |
8b4fc07a NN |
10055 | int |
10056 | main () | |
10057 | { | |
a6ccdbab | 10058 | if ((ac__type_new_ *) 0) |
8b4fc07a | 10059 | return 0; |
a6ccdbab | 10060 | if (sizeof (ac__type_new_)) |
8b4fc07a NN |
10061 | return 0; |
10062 | ; | |
10063 | return 0; | |
10064 | } | |
ba479fd2 | 10065 | _ACEOF |
8b4fc07a | 10066 | rm -f conftest.$ac_objext |
a6ccdbab EC |
10067 | if { (ac_try="$ac_compile" |
10068 | case "(($ac_try" in | |
10069 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10070 | *) ac_try_echo=$ac_try;; | |
10071 | esac | |
10072 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10073 | (eval "$ac_compile") 2>conftest.er1 | |
8b4fc07a | 10074 | ac_status=$? |
86da66b5 HPN |
10075 | grep -v '^ *+' conftest.er1 >conftest.err |
10076 | rm -f conftest.er1 | |
10077 | cat conftest.err >&5 | |
8b4fc07a | 10078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
10079 | (exit $ac_status); } && { |
10080 | test -z "$ac_c_werror_flag" || | |
10081 | test ! -s conftest.err | |
10082 | } && test -s conftest.$ac_objext; then | |
cb65112a | 10083 | ac_cv_type_ssize_t=yes |
f12bc141 | 10084 | else |
8b4fc07a NN |
10085 | echo "$as_me: failed program was:" >&5 |
10086 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10087 | |
a6ccdbab | 10088 | ac_cv_type_ssize_t=no |
8b4fc07a | 10089 | fi |
a6ccdbab EC |
10090 | |
10091 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
63cf211a | 10092 | fi |
a6ccdbab EC |
10093 | { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
10094 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } | |
8b4fc07a NN |
10095 | if test $ac_cv_type_ssize_t = yes; then |
10096 | : | |
10097 | else | |
ba479fd2 | 10098 | |
8b4fc07a | 10099 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 10100 | #define ssize_t int |
ba479fd2 | 10101 | _ACEOF |
f12bc141 ZW |
10102 | |
10103 | fi | |
10104 | ||
0b9d02c6 | 10105 | |
e256b8b6 DA |
10106 | # Try to determine the array type of the second argument of getgroups |
10107 | # for the target system (int or gid_t). | |
a6ccdbab EC |
10108 | { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
10109 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
10110 | if test "${ac_cv_type_uid_t+set}" = set; then |
10111 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10112 | else | |
10113 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10114 | /* confdefs.h. */ |
10115 | _ACEOF | |
10116 | cat confdefs.h >>conftest.$ac_ext | |
10117 | cat >>conftest.$ac_ext <<_ACEOF | |
10118 | /* end confdefs.h. */ | |
e256b8b6 | 10119 | #include <sys/types.h> |
ba479fd2 NN |
10120 | |
10121 | _ACEOF | |
e256b8b6 | 10122 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 10123 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
10124 | ac_cv_type_uid_t=yes |
10125 | else | |
e256b8b6 DA |
10126 | ac_cv_type_uid_t=no |
10127 | fi | |
10128 | rm -f conftest* | |
10129 | ||
10130 | fi | |
a6ccdbab EC |
10131 | { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
10132 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } | |
63cf211a | 10133 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
10134 | |
10135 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 10136 | #define uid_t int |
ba479fd2 | 10137 | _ACEOF |
cafe096b | 10138 | |
ba479fd2 NN |
10139 | |
10140 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 10141 | #define gid_t int |
ba479fd2 | 10142 | _ACEOF |
e256b8b6 DA |
10143 | |
10144 | fi | |
10145 | ||
a6ccdbab EC |
10146 | { echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
10147 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } | |
ba479fd2 NN |
10148 | if test "${ac_cv_type_getgroups+set}" = set; then |
10149 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
10150 | else |
10151 | if test "$cross_compiling" = yes; then | |
10152 | ac_cv_type_getgroups=cross | |
10153 | else | |
ba479fd2 | 10154 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10155 | /* confdefs.h. */ |
10156 | _ACEOF | |
10157 | cat confdefs.h >>conftest.$ac_ext | |
10158 | cat >>conftest.$ac_ext <<_ACEOF | |
10159 | /* end confdefs.h. */ | |
e256b8b6 | 10160 | /* Thanks to Mike Rendell for this test. */ |
a6ccdbab | 10161 | $ac_includes_default |
e256b8b6 DA |
10162 | #define NGID 256 |
10163 | #undef MAX | |
10164 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
10165 | |
10166 | int | |
10167 | main () | |
e256b8b6 DA |
10168 | { |
10169 | gid_t gidset[NGID]; | |
10170 | int i, n; | |
a6ccdbab | 10171 | union { gid_t gval; long int lval; } val; |
e256b8b6 DA |
10172 | |
10173 | val.lval = -1; | |
10174 | for (i = 0; i < NGID; i++) | |
10175 | gidset[i] = val.gval; | |
10176 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 10177 | gidset); |
e256b8b6 | 10178 | /* Exit non-zero if getgroups seems to require an array of ints. This |
a6ccdbab EC |
10179 | happens when gid_t is short int but getgroups modifies an array |
10180 | of ints. */ | |
10181 | return n > 0 && gidset[n] != val.gval; | |
63cf211a | 10182 | } |
ba479fd2 NN |
10183 | _ACEOF |
10184 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
10185 | if { (ac_try="$ac_link" |
10186 | case "(($ac_try" in | |
10187 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10188 | *) ac_try_echo=$ac_try;; | |
10189 | esac | |
10190 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10191 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10192 | ac_status=$? |
10193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10194 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
10195 | { (case "(($ac_try" in |
10196 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10197 | *) ac_try_echo=$ac_try;; | |
10198 | esac | |
10199 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10200 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10201 | ac_status=$? |
10202 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10203 | (exit $ac_status); }; }; then | |
10204 | ac_cv_type_getgroups=gid_t | |
63cf211a | 10205 | else |
ba479fd2 NN |
10206 | echo "$as_me: program exited with status $ac_status" >&5 |
10207 | echo "$as_me: failed program was:" >&5 | |
10208 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10209 | ||
10210 | ( exit $ac_status ) | |
10211 | ac_cv_type_getgroups=int | |
e256b8b6 | 10212 | fi |
a6ccdbab | 10213 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 10214 | fi |
a6ccdbab EC |
10215 | |
10216 | ||
e256b8b6 | 10217 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 10218 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10219 | /* confdefs.h. */ |
10220 | _ACEOF | |
10221 | cat confdefs.h >>conftest.$ac_ext | |
10222 | cat >>conftest.$ac_ext <<_ACEOF | |
10223 | /* end confdefs.h. */ | |
e256b8b6 | 10224 | #include <unistd.h> |
ba479fd2 NN |
10225 | |
10226 | _ACEOF | |
e256b8b6 | 10227 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 10228 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
10229 | ac_cv_type_getgroups=gid_t |
10230 | else | |
e256b8b6 DA |
10231 | ac_cv_type_getgroups=int |
10232 | fi | |
10233 | rm -f conftest* | |
10234 | ||
10235 | fi | |
10236 | fi | |
a6ccdbab EC |
10237 | { echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
10238 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } | |
e256b8b6 | 10239 | |
ba479fd2 | 10240 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 10241 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 10242 | _ACEOF |
e256b8b6 DA |
10243 | |
10244 | ||
10245 | if test "${target}" = "${build}"; then | |
10246 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
10247 | else | |
10248 | case "${target}" in | |
10249 | # This condition may need some tweaking. It should include all | |
10250 | # targets where the array type of the second argument of getgroups | |
10251 | # is int and the type of gid_t is not equivalent to int. | |
10252 | *-*-sunos* | *-*-ultrix*) | |
10253 | TARGET_GETGROUPS_T=int | |
10254 | ;; | |
10255 | *) | |
10256 | TARGET_GETGROUPS_T=gid_t | |
10257 | ;; | |
10258 | esac | |
10259 | fi | |
10260 | ||
10261 | ||
3b0727a0 | 10262 | |
a6ccdbab EC |
10263 | { echo "$as_me:$LINENO: checking for sys/mman.h" >&5 |
10264 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; } | |
3b0727a0 MR |
10265 | if test "${ac_cv_header_sys_mman_h+set}" = set; then |
10266 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 10267 | else |
18fc9bd4 | 10268 | cat >conftest.$ac_ext <<_ACEOF |
3b0727a0 MR |
10269 | /* confdefs.h. */ |
10270 | _ACEOF | |
10271 | cat confdefs.h >>conftest.$ac_ext | |
10272 | cat >>conftest.$ac_ext <<_ACEOF | |
10273 | /* end confdefs.h. */ | |
10274 | #include <sys/mman.h> | |
10275 | _ACEOF | |
a6ccdbab EC |
10276 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
10277 | case "(($ac_try" in | |
10278 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10279 | *) ac_try_echo=$ac_try;; | |
10280 | esac | |
10281 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10282 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
3b0727a0 MR |
10283 | ac_status=$? |
10284 | grep -v '^ *+' conftest.er1 >conftest.err | |
10285 | rm -f conftest.er1 | |
10286 | cat conftest.err >&5 | |
10287 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
10288 | (exit $ac_status); } >/dev/null && { |
10289 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
10290 | test ! -s conftest.err | |
10291 | }; then | |
18fc9bd4 | 10292 | ac_cv_header_sys_mman_h=yes |
3b0727a0 MR |
10293 | else |
10294 | echo "$as_me: failed program was:" >&5 | |
10295 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10296 | ||
18fc9bd4 | 10297 | ac_cv_header_sys_mman_h=no |
3b0727a0 | 10298 | fi |
a6ccdbab | 10299 | |
3b0727a0 MR |
10300 | rm -f conftest.err conftest.$ac_ext |
10301 | fi | |
a6ccdbab EC |
10302 | { echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 |
10303 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6; } | |
3b0727a0 MR |
10304 | if test $ac_cv_header_sys_mman_h = yes; then |
10305 | gcc_header_sys_mman_h=yes | |
10306 | else | |
10307 | gcc_header_sys_mman_h=no | |
10308 | fi | |
10309 | ||
a6ccdbab EC |
10310 | { echo "$as_me:$LINENO: checking for mmap" >&5 |
10311 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6; } | |
3b0727a0 MR |
10312 | if test "${ac_cv_func_mmap+set}" = set; then |
10313 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10314 | else | |
10315 | cat >conftest.$ac_ext <<_ACEOF | |
10316 | /* confdefs.h. */ | |
10317 | _ACEOF | |
10318 | cat confdefs.h >>conftest.$ac_ext | |
10319 | cat >>conftest.$ac_ext <<_ACEOF | |
10320 | /* end confdefs.h. */ | |
10321 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
10322 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10323 | #define mmap innocuous_mmap | |
10324 | ||
10325 | /* System header to define __stub macros and hopefully few prototypes, | |
10326 | which can conflict with char mmap (); below. | |
10327 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10328 | <limits.h> exists even on freestanding compilers. */ | |
10329 | ||
10330 | #ifdef __STDC__ | |
10331 | # include <limits.h> | |
10332 | #else | |
10333 | # include <assert.h> | |
10334 | #endif | |
10335 | ||
10336 | #undef mmap | |
10337 | ||
a6ccdbab EC |
10338 | /* Override any GCC internal prototype to avoid an error. |
10339 | Use char because int might match the return type of a GCC | |
10340 | builtin and then its argument prototype would still apply. */ | |
3b0727a0 MR |
10341 | #ifdef __cplusplus |
10342 | extern "C" | |
3b0727a0 | 10343 | #endif |
3b0727a0 MR |
10344 | char mmap (); |
10345 | /* The GNU C library defines this for functions which it implements | |
10346 | to always fail with ENOSYS. Some functions are actually named | |
10347 | something starting with __ and the normal name is an alias. */ | |
a6ccdbab | 10348 | #if defined __stub_mmap || defined __stub___mmap |
3b0727a0 | 10349 | choke me |
3b0727a0 MR |
10350 | #endif |
10351 | ||
10352 | int | |
10353 | main () | |
10354 | { | |
a6ccdbab | 10355 | return mmap (); |
3b0727a0 MR |
10356 | ; |
10357 | return 0; | |
10358 | } | |
10359 | _ACEOF | |
10360 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
10361 | if { (ac_try="$ac_link" |
10362 | case "(($ac_try" in | |
10363 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10364 | *) ac_try_echo=$ac_try;; | |
10365 | esac | |
10366 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10367 | (eval "$ac_link") 2>conftest.er1 | |
3b0727a0 MR |
10368 | ac_status=$? |
10369 | grep -v '^ *+' conftest.er1 >conftest.err | |
10370 | rm -f conftest.er1 | |
10371 | cat conftest.err >&5 | |
10372 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
10373 | (exit $ac_status); } && { |
10374 | test -z "$ac_c_werror_flag" || | |
10375 | test ! -s conftest.err | |
10376 | } && test -s conftest$ac_exeext && | |
10377 | $as_test_x conftest$ac_exeext; then | |
3b0727a0 MR |
10378 | ac_cv_func_mmap=yes |
10379 | else | |
10380 | echo "$as_me: failed program was:" >&5 | |
10381 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10382 | ||
a6ccdbab | 10383 | ac_cv_func_mmap=no |
3b0727a0 | 10384 | fi |
a6ccdbab EC |
10385 | |
10386 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
3b0727a0 MR |
10387 | conftest$ac_exeext conftest.$ac_ext |
10388 | fi | |
a6ccdbab EC |
10389 | { echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 |
10390 | echo "${ECHO_T}$ac_cv_func_mmap" >&6; } | |
3b0727a0 MR |
10391 | if test $ac_cv_func_mmap = yes; then |
10392 | gcc_func_mmap=yes | |
10393 | else | |
10394 | gcc_func_mmap=no | |
10395 | fi | |
10396 | ||
10397 | if test "$gcc_header_sys_mman_h" != yes \ | |
10398 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
10399 | gcc_cv_func_mmap_file=no |
10400 | gcc_cv_func_mmap_dev_zero=no | |
10401 | gcc_cv_func_mmap_anon=no | |
10402 | else | |
a6ccdbab EC |
10403 | { echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
10404 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6; } | |
ba479fd2 NN |
10405 | if test "${gcc_cv_func_mmap_file+set}" = set; then |
10406 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 10407 | else |
ba479fd2 | 10408 | # Add a system to this blacklist if |
1072ec3f ZW |
10409 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
10410 | # memory area containing the same data that you'd get if you applied | |
10411 | # read() to the same fd. The only system known to have a problem here | |
10412 | # is VMS, where text files have record structure. | |
10413 | case "$host_os" in | |
ba479fd2 | 10414 | vms* | ultrix*) |
1072ec3f ZW |
10415 | gcc_cv_func_mmap_file=no ;; |
10416 | *) | |
10417 | gcc_cv_func_mmap_file=yes;; | |
10418 | esac | |
10419 | fi | |
a6ccdbab EC |
10420 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
10421 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6; } | |
10422 | { echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
10423 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6; } | |
ba479fd2 NN |
10424 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then |
10425 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
10426 | else |
10427 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
10428 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
10429 | # zeroed pages with both the following properties: | |
10430 | # 1. If you map N consecutive pages in with one call, and then | |
10431 | # unmap any subset of those pages, the pages that were not | |
10432 | # explicitly unmapped remain accessible. | |
10433 | # 2. If you map two adjacent blocks of memory and then unmap them | |
10434 | # both at once, they must both go away. | |
10435 | # Systems known to be in this category are Windows (all variants), | |
10436 | # VMS, and Darwin. | |
10437 | case "$host_os" in | |
2ce240d3 | 10438 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
10439 | gcc_cv_func_mmap_dev_zero=no ;; |
10440 | *) | |
10441 | gcc_cv_func_mmap_dev_zero=yes;; | |
10442 | esac | |
10443 | fi | |
a6ccdbab EC |
10444 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
10445 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6; } | |
1072ec3f ZW |
10446 | |
10447 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
a6ccdbab EC |
10448 | { echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
10449 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6; } | |
ba479fd2 NN |
10450 | if test "${gcc_cv_decl_map_anon+set}" = set; then |
10451 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10452 | else | |
10453 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10454 | /* confdefs.h. */ |
10455 | _ACEOF | |
10456 | cat confdefs.h >>conftest.$ac_ext | |
10457 | cat >>conftest.$ac_ext <<_ACEOF | |
10458 | /* end confdefs.h. */ | |
1072ec3f ZW |
10459 | #include <sys/types.h> |
10460 | #include <sys/mman.h> | |
10461 | #include <unistd.h> | |
10462 | ||
10463 | #ifndef MAP_ANONYMOUS | |
10464 | #define MAP_ANONYMOUS MAP_ANON | |
10465 | #endif | |
10466 | ||
ba479fd2 NN |
10467 | int |
10468 | main () | |
10469 | { | |
1072ec3f | 10470 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
10471 | ; |
10472 | return 0; | |
10473 | } | |
10474 | _ACEOF | |
10475 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
10476 | if { (ac_try="$ac_compile" |
10477 | case "(($ac_try" in | |
10478 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10479 | *) ac_try_echo=$ac_try;; | |
10480 | esac | |
10481 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10482 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 10483 | ac_status=$? |
86da66b5 HPN |
10484 | grep -v '^ *+' conftest.er1 >conftest.err |
10485 | rm -f conftest.er1 | |
10486 | cat conftest.err >&5 | |
ba479fd2 | 10487 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
10488 | (exit $ac_status); } && { |
10489 | test -z "$ac_c_werror_flag" || | |
10490 | test ! -s conftest.err | |
10491 | } && test -s conftest.$ac_objext; then | |
1072ec3f ZW |
10492 | gcc_cv_decl_map_anon=yes |
10493 | else | |
ba479fd2 NN |
10494 | echo "$as_me: failed program was:" >&5 |
10495 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10496 | ||
a6ccdbab | 10497 | gcc_cv_decl_map_anon=no |
1072ec3f | 10498 | fi |
a6ccdbab EC |
10499 | |
10500 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1072ec3f | 10501 | fi |
a6ccdbab EC |
10502 | { echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
10503 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6; } | |
1072ec3f ZW |
10504 | |
10505 | if test $gcc_cv_decl_map_anon = no; then | |
10506 | gcc_cv_func_mmap_anon=no | |
10507 | else | |
a6ccdbab EC |
10508 | { echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
10509 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6; } | |
ba479fd2 NN |
10510 | if test "${gcc_cv_func_mmap_anon+set}" = set; then |
10511 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
10512 | else |
10513 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
10514 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
10515 | # doesn't give anonymous zeroed pages with the same properties listed | |
10516 | # above for use of /dev/zero. | |
10517 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
10518 | case "$host_os" in | |
10519 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
10520 | gcc_cv_func_mmap_anon=no ;; | |
10521 | *) | |
10522 | gcc_cv_func_mmap_anon=yes;; | |
10523 | esac | |
10524 | fi | |
a6ccdbab EC |
10525 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
10526 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6; } | |
1072ec3f ZW |
10527 | fi |
10528 | fi | |
10529 | ||
10530 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
10531 | |
10532 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10533 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 10534 | _ACEOF |
1072ec3f ZW |
10535 | |
10536 | fi | |
10537 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
10538 | |
10539 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10540 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 10541 | _ACEOF |
1072ec3f ZW |
10542 | |
10543 | fi | |
10544 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
10545 | |
10546 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10547 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 10548 | _ACEOF |
1072ec3f ZW |
10549 | |
10550 | fi | |
10551 | ||
b27d2bd5 MK |
10552 | |
10553 | case "${host}" in | |
ee262b6f | 10554 | *-*-*vms*) |
ba479fd2 | 10555 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
10556 | # won't work, and it isn't easily adaptable. It makes more sense to |
10557 | # just force it. | |
10558 | ac_cv_func_vfork_works=yes | |
10559 | ;; | |
b27d2bd5 | 10560 | esac |
a6ccdbab EC |
10561 | { echo "$as_me:$LINENO: checking for pid_t" >&5 |
10562 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } | |
ba479fd2 NN |
10563 | if test "${ac_cv_type_pid_t+set}" = set; then |
10564 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10565 | else | |
10566 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10567 | /* confdefs.h. */ |
10568 | _ACEOF | |
10569 | cat confdefs.h >>conftest.$ac_ext | |
10570 | cat >>conftest.$ac_ext <<_ACEOF | |
10571 | /* end confdefs.h. */ | |
10572 | $ac_includes_default | |
a6ccdbab | 10573 | typedef pid_t ac__type_new_; |
ba479fd2 NN |
10574 | int |
10575 | main () | |
10576 | { | |
a6ccdbab | 10577 | if ((ac__type_new_ *) 0) |
ba479fd2 | 10578 | return 0; |
a6ccdbab | 10579 | if (sizeof (ac__type_new_)) |
ba479fd2 NN |
10580 | return 0; |
10581 | ; | |
10582 | return 0; | |
10583 | } | |
10584 | _ACEOF | |
10585 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
10586 | if { (ac_try="$ac_compile" |
10587 | case "(($ac_try" in | |
10588 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10589 | *) ac_try_echo=$ac_try;; | |
10590 | esac | |
10591 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10592 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 10593 | ac_status=$? |
86da66b5 HPN |
10594 | grep -v '^ *+' conftest.er1 >conftest.err |
10595 | rm -f conftest.er1 | |
10596 | cat conftest.err >&5 | |
ba479fd2 | 10597 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
10598 | (exit $ac_status); } && { |
10599 | test -z "$ac_c_werror_flag" || | |
10600 | test ! -s conftest.err | |
10601 | } && test -s conftest.$ac_objext; then | |
cb65112a | 10602 | ac_cv_type_pid_t=yes |
c375c43b | 10603 | else |
ba479fd2 NN |
10604 | echo "$as_me: failed program was:" >&5 |
10605 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10606 | |
a6ccdbab | 10607 | ac_cv_type_pid_t=no |
ba479fd2 | 10608 | fi |
a6ccdbab EC |
10609 | |
10610 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
63cf211a | 10611 | fi |
a6ccdbab EC |
10612 | { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
10613 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } | |
ba479fd2 NN |
10614 | if test $ac_cv_type_pid_t = yes; then |
10615 | : | |
10616 | else | |
10617 | ||
10618 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 10619 | #define pid_t int |
ba479fd2 | 10620 | _ACEOF |
c375c43b KG |
10621 | |
10622 | fi | |
10623 | ||
ba479fd2 | 10624 | |
a6ccdbab | 10625 | for ac_header in vfork.h |
ba479fd2 NN |
10626 | do |
10627 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
a6ccdbab EC |
10628 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
10629 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } | |
10630 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 | 10631 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
0f57bf40 | 10632 | else |
18fc9bd4 | 10633 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10634 | /* confdefs.h. */ |
10635 | _ACEOF | |
10636 | cat confdefs.h >>conftest.$ac_ext | |
10637 | cat >>conftest.$ac_ext <<_ACEOF | |
10638 | /* end confdefs.h. */ | |
10639 | #include <$ac_header> | |
10640 | _ACEOF | |
a6ccdbab EC |
10641 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
10642 | case "(($ac_try" in | |
10643 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10644 | *) ac_try_echo=$ac_try;; | |
10645 | esac | |
10646 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10647 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
10648 | ac_status=$? |
10649 | grep -v '^ *+' conftest.er1 >conftest.err | |
10650 | rm -f conftest.er1 | |
10651 | cat conftest.err >&5 | |
10652 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
10653 | (exit $ac_status); } >/dev/null && { |
10654 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
10655 | test ! -s conftest.err | |
10656 | }; then | |
18fc9bd4 | 10657 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
10658 | else |
10659 | echo "$as_me: failed program was:" >&5 | |
10660 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10661 | ||
18fc9bd4 | 10662 | eval "$as_ac_Header=no" |
ba479fd2 | 10663 | fi |
a6ccdbab | 10664 | |
ba479fd2 | 10665 | rm -f conftest.err conftest.$ac_ext |
c375c43b | 10666 | fi |
a6ccdbab EC |
10667 | ac_res=`eval echo '${'$as_ac_Header'}'` |
10668 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
10669 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
10670 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
10671 | cat >>confdefs.h <<_ACEOF | |
10672 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10673 | _ACEOF | |
6e3f3080 NN |
10674 | |
10675 | fi | |
ba479fd2 NN |
10676 | done |
10677 | ||
10678 | ||
10679 | ||
10680 | for ac_func in fork vfork | |
10681 | do | |
10682 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
a6ccdbab EC |
10683 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 |
10684 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } | |
10685 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
10686 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
10687 | else | |
10688 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10689 | /* confdefs.h. */ |
10690 | _ACEOF | |
10691 | cat confdefs.h >>conftest.$ac_ext | |
10692 | cat >>conftest.$ac_ext <<_ACEOF | |
10693 | /* end confdefs.h. */ | |
86da66b5 HPN |
10694 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
10695 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10696 | #define $ac_func innocuous_$ac_func | |
10697 | ||
c375c43b | 10698 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
10699 | which can conflict with char $ac_func (); below. |
10700 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10701 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 10702 | |
ba479fd2 NN |
10703 | #ifdef __STDC__ |
10704 | # include <limits.h> | |
10705 | #else | |
10706 | # include <assert.h> | |
10707 | #endif | |
86da66b5 HPN |
10708 | |
10709 | #undef $ac_func | |
10710 | ||
a6ccdbab EC |
10711 | /* Override any GCC internal prototype to avoid an error. |
10712 | Use char because int might match the return type of a GCC | |
10713 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
10714 | #ifdef __cplusplus |
10715 | extern "C" | |
ba479fd2 | 10716 | #endif |
ba479fd2 | 10717 | char $ac_func (); |
c375c43b KG |
10718 | /* The GNU C library defines this for functions which it implements |
10719 | to always fail with ENOSYS. Some functions are actually named | |
10720 | something starting with __ and the normal name is an alias. */ | |
a6ccdbab | 10721 | #if defined __stub_$ac_func || defined __stub___$ac_func |
c375c43b | 10722 | choke me |
c375c43b KG |
10723 | #endif |
10724 | ||
ba479fd2 NN |
10725 | int |
10726 | main () | |
10727 | { | |
a6ccdbab | 10728 | return $ac_func (); |
ba479fd2 NN |
10729 | ; |
10730 | return 0; | |
10731 | } | |
10732 | _ACEOF | |
10733 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
10734 | if { (ac_try="$ac_link" |
10735 | case "(($ac_try" in | |
10736 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10737 | *) ac_try_echo=$ac_try;; | |
10738 | esac | |
10739 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10740 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 10741 | ac_status=$? |
86da66b5 HPN |
10742 | grep -v '^ *+' conftest.er1 >conftest.err |
10743 | rm -f conftest.er1 | |
10744 | cat conftest.err >&5 | |
ba479fd2 | 10745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
10746 | (exit $ac_status); } && { |
10747 | test -z "$ac_c_werror_flag" || | |
10748 | test ! -s conftest.err | |
10749 | } && test -s conftest$ac_exeext && | |
10750 | $as_test_x conftest$ac_exeext; then | |
ba479fd2 NN |
10751 | eval "$as_ac_var=yes" |
10752 | else | |
10753 | echo "$as_me: failed program was:" >&5 | |
10754 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10755 | ||
a6ccdbab | 10756 | eval "$as_ac_var=no" |
ba479fd2 | 10757 | fi |
a6ccdbab EC |
10758 | |
10759 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 10760 | conftest$ac_exeext conftest.$ac_ext |
ba479fd2 | 10761 | fi |
a6ccdbab EC |
10762 | ac_res=`eval echo '${'$as_ac_var'}'` |
10763 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
10764 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
10765 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
10766 | cat >>confdefs.h <<_ACEOF | |
10767 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10768 | _ACEOF | |
10769 | ||
c375c43b | 10770 | fi |
ba479fd2 | 10771 | done |
c375c43b | 10772 | |
ba479fd2 | 10773 | if test "x$ac_cv_func_fork" = xyes; then |
a6ccdbab EC |
10774 | { echo "$as_me:$LINENO: checking for working fork" >&5 |
10775 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } | |
ba479fd2 NN |
10776 | if test "${ac_cv_func_fork_works+set}" = set; then |
10777 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10778 | else |
ba479fd2 NN |
10779 | if test "$cross_compiling" = yes; then |
10780 | ac_cv_func_fork_works=cross | |
10781 | else | |
10782 | cat >conftest.$ac_ext <<_ACEOF | |
a6ccdbab EC |
10783 | /* confdefs.h. */ |
10784 | _ACEOF | |
10785 | cat confdefs.h >>conftest.$ac_ext | |
10786 | cat >>conftest.$ac_ext <<_ACEOF | |
10787 | /* end confdefs.h. */ | |
10788 | $ac_includes_default | |
10789 | int | |
10790 | main () | |
10791 | { | |
10792 | ||
10793 | /* By Ruediger Kuhlmann. */ | |
10794 | return fork () < 0; | |
10795 | ||
10796 | ; | |
10797 | return 0; | |
10798 | } | |
ba479fd2 NN |
10799 | _ACEOF |
10800 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
10801 | if { (ac_try="$ac_link" |
10802 | case "(($ac_try" in | |
10803 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10804 | *) ac_try_echo=$ac_try;; | |
10805 | esac | |
10806 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10807 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10808 | ac_status=$? |
10809 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10810 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
10811 | { (case "(($ac_try" in |
10812 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10813 | *) ac_try_echo=$ac_try;; | |
10814 | esac | |
10815 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10816 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10817 | ac_status=$? |
10818 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10819 | (exit $ac_status); }; }; then | |
10820 | ac_cv_func_fork_works=yes | |
10821 | else | |
10822 | echo "$as_me: program exited with status $ac_status" >&5 | |
10823 | echo "$as_me: failed program was:" >&5 | |
10824 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10825 | ||
10826 | ( exit $ac_status ) | |
10827 | ac_cv_func_fork_works=no | |
10828 | fi | |
a6ccdbab | 10829 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 10830 | fi |
a6ccdbab EC |
10831 | |
10832 | ||
ba479fd2 | 10833 | fi |
a6ccdbab EC |
10834 | { echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 |
10835 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } | |
ba479fd2 NN |
10836 | |
10837 | else | |
10838 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10839 | fi | |
10840 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10841 | case $host in | |
10842 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10843 | # Override, as these systems have only a dummy fork() stub | |
10844 | ac_cv_func_fork_works=no | |
10845 | ;; | |
10846 | *) | |
10847 | ac_cv_func_fork_works=yes | |
10848 | ;; | |
10849 | esac | |
10850 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10851 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10852 | fi |
c375c43b | 10853 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 | 10854 | if test "x$ac_cv_func_vfork" = xyes; then |
a6ccdbab EC |
10855 | { echo "$as_me:$LINENO: checking for working vfork" >&5 |
10856 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } | |
ba479fd2 NN |
10857 | if test "${ac_cv_func_vfork_works+set}" = set; then |
10858 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10859 | else |
ba479fd2 NN |
10860 | if test "$cross_compiling" = yes; then |
10861 | ac_cv_func_vfork_works=cross | |
10862 | else | |
10863 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10864 | /* confdefs.h. */ |
10865 | _ACEOF | |
10866 | cat confdefs.h >>conftest.$ac_ext | |
10867 | cat >>conftest.$ac_ext <<_ACEOF | |
10868 | /* end confdefs.h. */ | |
c375c43b | 10869 | /* Thanks to Paul Eggert for this test. */ |
a6ccdbab | 10870 | $ac_includes_default |
ba479fd2 | 10871 | #include <sys/wait.h> |
a6ccdbab | 10872 | #ifdef HAVE_VFORK_H |
ba479fd2 | 10873 | # include <vfork.h> |
c375c43b KG |
10874 | #endif |
10875 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10876 | argument registers are propagated back to the parent. The compiler |
10877 | is told about this with #include <vfork.h>, but some compilers | |
10878 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10879 | static variable whose address is put into a register that is | |
10880 | clobbered by the vfork. */ | |
10881 | static void | |
c375c43b KG |
10882 | #ifdef __cplusplus |
10883 | sparc_address_test (int arg) | |
ba479fd2 | 10884 | # else |
c375c43b KG |
10885 | sparc_address_test (arg) int arg; |
10886 | #endif | |
10887 | { | |
10888 | static pid_t child; | |
10889 | if (!child) { | |
10890 | child = vfork (); | |
10891 | if (child < 0) { | |
10892 | perror ("vfork"); | |
10893 | _exit(2); | |
10894 | } | |
10895 | if (!child) { | |
10896 | arg = getpid(); | |
10897 | write(-1, "", 0); | |
10898 | _exit (arg); | |
10899 | } | |
10900 | } | |
10901 | } | |
ba479fd2 NN |
10902 | |
10903 | int | |
10904 | main () | |
10905 | { | |
c375c43b KG |
10906 | pid_t parent = getpid (); |
10907 | pid_t child; | |
10908 | ||
ba479fd2 | 10909 | sparc_address_test (0); |
c375c43b KG |
10910 | |
10911 | child = vfork (); | |
10912 | ||
10913 | if (child == 0) { | |
ba479fd2 NN |
10914 | /* Here is another test for sparc vfork register problems. This |
10915 | test uses lots of local variables, at least as many local | |
10916 | variables as main has allocated so far including compiler | |
10917 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10918 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10919 | reuse the register of parent for one of the local variables, | |
10920 | since it will think that parent can't possibly be used any more | |
10921 | in this routine. Assigning to the local variable will thus | |
10922 | munge parent in the parent process. */ | |
c375c43b KG |
10923 | pid_t |
10924 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10925 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10926 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10927 | use the same hardware register for all 8 local variables. */ | |
10928 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10929 | || p != p5 || p != p6 || p != p7) | |
10930 | _exit(1); | |
10931 | ||
ba479fd2 NN |
10932 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10933 | from child file descriptors. If the child closes a descriptor | |
10934 | before it execs or exits, this munges the parent's descriptor | |
10935 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10936 | _exit(close(fileno(stdout)) != 0); |
10937 | } else { | |
10938 | int status; | |
10939 | struct stat st; | |
10940 | ||
10941 | while (wait(&status) != child) | |
10942 | ; | |
a6ccdbab | 10943 | return ( |
c375c43b KG |
10944 | /* Was there some problem with vforking? */ |
10945 | child < 0 | |
10946 | ||
10947 | /* Did the child fail? (This shouldn't happen.) */ | |
10948 | || status | |
10949 | ||
10950 | /* Did the vfork/compiler bug occur? */ | |
10951 | || parent != getpid() | |
10952 | ||
10953 | /* Did the file descriptor bug occur? */ | |
10954 | || fstat(fileno(stdout), &st) != 0 | |
10955 | ); | |
10956 | } | |
10957 | } | |
ba479fd2 NN |
10958 | _ACEOF |
10959 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
10960 | if { (ac_try="$ac_link" |
10961 | case "(($ac_try" in | |
10962 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10963 | *) ac_try_echo=$ac_try;; | |
10964 | esac | |
10965 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10966 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10967 | ac_status=$? |
10968 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10969 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
10970 | { (case "(($ac_try" in |
10971 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10972 | *) ac_try_echo=$ac_try;; | |
10973 | esac | |
10974 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10975 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10976 | ac_status=$? |
10977 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10978 | (exit $ac_status); }; }; then | |
c375c43b KG |
10979 | ac_cv_func_vfork_works=yes |
10980 | else | |
ba479fd2 NN |
10981 | echo "$as_me: program exited with status $ac_status" >&5 |
10982 | echo "$as_me: failed program was:" >&5 | |
10983 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10984 | ||
10985 | ( exit $ac_status ) | |
10986 | ac_cv_func_vfork_works=no | |
cafe096b | 10987 | fi |
a6ccdbab | 10988 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10989 | fi |
a6ccdbab EC |
10990 | |
10991 | ||
ba479fd2 | 10992 | fi |
a6ccdbab EC |
10993 | { echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 |
10994 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } | |
c375c43b | 10995 | |
ba479fd2 NN |
10996 | fi; |
10997 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10998 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10999 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
11000 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
11001 | fi |
11002 | ||
ba479fd2 NN |
11003 | if test "x$ac_cv_func_vfork_works" = xyes; then |
11004 | ||
11005 | cat >>confdefs.h <<\_ACEOF | |
11006 | #define HAVE_WORKING_VFORK 1 | |
11007 | _ACEOF | |
11008 | ||
11009 | else | |
11010 | ||
11011 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 11012 | #define vfork fork |
ba479fd2 | 11013 | _ACEOF |
c375c43b KG |
11014 | |
11015 | fi | |
ba479fd2 NN |
11016 | if test "x$ac_cv_func_fork_works" = xyes; then |
11017 | ||
11018 | cat >>confdefs.h <<\_ACEOF | |
11019 | #define HAVE_WORKING_FORK 1 | |
11020 | _ACEOF | |
11021 | ||
11022 | fi | |
11023 | ||
c375c43b | 11024 | |
81bf3d9e | 11025 | |
dfb77e37 KC |
11026 | if test "X$prefix" = "XNONE"; then |
11027 | acl_final_prefix="$ac_default_prefix" | |
11028 | else | |
11029 | acl_final_prefix="$prefix" | |
11030 | fi | |
11031 | if test "X$exec_prefix" = "XNONE"; then | |
11032 | acl_final_exec_prefix='${prefix}' | |
11033 | else | |
11034 | acl_final_exec_prefix="$exec_prefix" | |
11035 | fi | |
11036 | acl_save_prefix="$prefix" | |
11037 | prefix="$acl_final_prefix" | |
11038 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
11039 | prefix="$acl_save_prefix" | |
f91abfce TT |
11040 | |
11041 | ||
a6ccdbab | 11042 | # Check whether --with-gnu-ld was given. |
dfb77e37 | 11043 | if test "${with_gnu_ld+set}" = set; then |
a6ccdbab | 11044 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes |
ba479fd2 | 11045 | else |
dfb77e37 | 11046 | with_gnu_ld=no |
a6ccdbab EC |
11047 | fi |
11048 | ||
dfb77e37 KC |
11049 | # Prepare PATH_SEPARATOR. |
11050 | # The user is always right. | |
11051 | if test "${PATH_SEPARATOR+set}" != set; then | |
11052 | echo "#! /bin/sh" >conf$$.sh | |
11053 | echo "exit 0" >>conf$$.sh | |
11054 | chmod +x conf$$.sh | |
11055 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
11056 | PATH_SEPARATOR=';' | |
ba479fd2 | 11057 | else |
dfb77e37 | 11058 | PATH_SEPARATOR=: |
ba479fd2 | 11059 | fi |
dfb77e37 KC |
11060 | rm -f conf$$.sh |
11061 | fi | |
11062 | ac_prog=ld | |
11063 | if test "$GCC" = yes; then | |
11064 | # Check if gcc -print-prog-name=ld gives a path. | |
a6ccdbab EC |
11065 | { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 |
11066 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } | |
dfb77e37 KC |
11067 | case $host in |
11068 | *-*-mingw*) | |
11069 | # gcc leaves a trailing carriage return which upsets mingw | |
11070 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
11071 | *) | |
11072 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
11073 | esac | |
11074 | case $ac_prog in | |
11075 | # Accept absolute paths. | |
11076 | [\\/]* | [A-Za-z]:[\\/]*) | |
11077 | re_direlt='/[^/][^/]*/\.\./' | |
11078 | # Canonicalize the path of ld | |
11079 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
11080 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
11081 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
11082 | done | |
11083 | test -z "$LD" && LD="$ac_prog" | |
11084 | ;; | |
11085 | "") | |
11086 | # If it fails, then pretend we aren't using GCC. | |
11087 | ac_prog=ld | |
11088 | ;; | |
11089 | *) | |
11090 | # If it is relative, then search for the first ld in PATH. | |
11091 | with_gnu_ld=unknown | |
11092 | ;; | |
11093 | esac | |
11094 | elif test "$with_gnu_ld" = yes; then | |
a6ccdbab EC |
11095 | { echo "$as_me:$LINENO: checking for GNU ld" >&5 |
11096 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } | |
ba479fd2 | 11097 | else |
a6ccdbab EC |
11098 | { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
11099 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } | |
ba479fd2 | 11100 | fi |
dfb77e37 KC |
11101 | if test "${acl_cv_path_LD+set}" = set; then |
11102 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 11103 | else |
dfb77e37 KC |
11104 | if test -z "$LD"; then |
11105 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
11106 | for ac_dir in $PATH; do | |
11107 | test -z "$ac_dir" && ac_dir=. | |
11108 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
11109 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
11110 | # Check to see if the program is GNU ld. I'd rather use --version, | |
11111 | # but apparently some GNU ld's only accept -v. | |
11112 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
11113 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
11114 | test "$with_gnu_ld" != no && break | |
11115 | else | |
11116 | test "$with_gnu_ld" != yes && break | |
11117 | fi | |
dfb77e37 KC |
11118 | fi |
11119 | done | |
11120 | IFS="$ac_save_ifs" | |
11121 | else | |
11122 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
11123 | fi | |
11124 | fi | |
ba479fd2 | 11125 | |
dfb77e37 KC |
11126 | LD="$acl_cv_path_LD" |
11127 | if test -n "$LD"; then | |
a6ccdbab EC |
11128 | { echo "$as_me:$LINENO: result: $LD" >&5 |
11129 | echo "${ECHO_T}$LD" >&6; } | |
dfb77e37 | 11130 | else |
a6ccdbab EC |
11131 | { echo "$as_me:$LINENO: result: no" >&5 |
11132 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 | 11133 | fi |
dfb77e37 KC |
11134 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
11135 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
11136 | { (exit 1); exit 1; }; } | |
a6ccdbab EC |
11137 | { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 |
11138 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } | |
dfb77e37 KC |
11139 | if test "${acl_cv_prog_gnu_ld+set}" = set; then |
11140 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11141 | else | |
11142 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
11143 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
11144 | acl_cv_prog_gnu_ld=yes | |
11145 | else | |
11146 | acl_cv_prog_gnu_ld=no | |
11147 | fi | |
dfb77e37 | 11148 | fi |
a6ccdbab EC |
11149 | { echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 |
11150 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } | |
dfb77e37 KC |
11151 | with_gnu_ld=$acl_cv_prog_gnu_ld |
11152 | ||
11153 | ||
11154 | ||
a6ccdbab EC |
11155 | { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 |
11156 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } | |
dfb77e37 KC |
11157 | if test "${acl_cv_rpath+set}" = set; then |
11158 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11159 | else | |
11160 | ||
11161 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
11162 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
11163 | . ./conftest.sh | |
11164 | rm -f ./conftest.sh | |
11165 | acl_cv_rpath=done | |
ba479fd2 | 11166 | |
eb158727 | 11167 | fi |
a6ccdbab EC |
11168 | { echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
11169 | echo "${ECHO_T}$acl_cv_rpath" >&6; } | |
dfb77e37 KC |
11170 | wl="$acl_cv_wl" |
11171 | libext="$acl_cv_libext" | |
11172 | shlibext="$acl_cv_shlibext" | |
11173 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
11174 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
11175 | hardcode_direct="$acl_cv_hardcode_direct" | |
11176 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
a6ccdbab | 11177 | # Check whether --enable-rpath was given. |
dfb77e37 | 11178 | if test "${enable_rpath+set}" = set; then |
a6ccdbab | 11179 | enableval=$enable_rpath; : |
dfb77e37 KC |
11180 | else |
11181 | enable_rpath=yes | |
a6ccdbab EC |
11182 | fi |
11183 | ||
dfb77e37 KC |
11184 | |
11185 | ||
11186 | ||
11187 | ||
11188 | ||
11189 | ||
11190 | ||
11191 | use_additional=yes | |
11192 | ||
11193 | acl_save_prefix="$prefix" | |
11194 | prefix="$acl_final_prefix" | |
11195 | acl_save_exec_prefix="$exec_prefix" | |
11196 | exec_prefix="$acl_final_exec_prefix" | |
11197 | ||
11198 | eval additional_includedir=\"$includedir\" | |
11199 | eval additional_libdir=\"$libdir\" | |
11200 | ||
11201 | exec_prefix="$acl_save_exec_prefix" | |
11202 | prefix="$acl_save_prefix" | |
11203 | ||
11204 | ||
a6ccdbab | 11205 | # Check whether --with-libiconv-prefix was given. |
dfb77e37 | 11206 | if test "${with_libiconv_prefix+set}" = set; then |
a6ccdbab | 11207 | withval=$with_libiconv_prefix; |
dfb77e37 KC |
11208 | if test "X$withval" = "Xno"; then |
11209 | use_additional=no | |
11210 | else | |
11211 | if test "X$withval" = "X"; then | |
11212 | ||
11213 | acl_save_prefix="$prefix" | |
11214 | prefix="$acl_final_prefix" | |
11215 | acl_save_exec_prefix="$exec_prefix" | |
11216 | exec_prefix="$acl_final_exec_prefix" | |
11217 | ||
11218 | eval additional_includedir=\"$includedir\" | |
11219 | eval additional_libdir=\"$libdir\" | |
11220 | ||
11221 | exec_prefix="$acl_save_exec_prefix" | |
11222 | prefix="$acl_save_prefix" | |
11223 | ||
11224 | else | |
11225 | additional_includedir="$withval/include" | |
11226 | additional_libdir="$withval/lib" | |
11227 | fi | |
11228 | fi | |
11229 | ||
a6ccdbab EC |
11230 | fi |
11231 | ||
dfb77e37 KC |
11232 | LIBICONV= |
11233 | LTLIBICONV= | |
11234 | INCICONV= | |
11235 | rpathdirs= | |
11236 | ltrpathdirs= | |
11237 | names_already_handled= | |
11238 | names_next_round='iconv ' | |
11239 | while test -n "$names_next_round"; do | |
11240 | names_this_round="$names_next_round" | |
11241 | names_next_round= | |
11242 | for name in $names_this_round; do | |
11243 | already_handled= | |
11244 | for n in $names_already_handled; do | |
11245 | if test "$n" = "$name"; then | |
11246 | already_handled=yes | |
11247 | break | |
11248 | fi | |
11249 | done | |
11250 | if test -z "$already_handled"; then | |
11251 | names_already_handled="$names_already_handled $name" | |
11252 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
11253 | eval value=\"\$HAVE_LIB$uppername\" | |
11254 | if test -n "$value"; then | |
11255 | if test "$value" = yes; then | |
11256 | eval value=\"\$LIB$uppername\" | |
11257 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
11258 | eval value=\"\$LTLIB$uppername\" | |
11259 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
11260 | else | |
11261 | : | |
11262 | fi | |
11263 | else | |
11264 | found_dir= | |
11265 | found_la= | |
11266 | found_so= | |
11267 | found_a= | |
11268 | if test $use_additional = yes; then | |
11269 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
11270 | found_dir="$additional_libdir" | |
11271 | found_so="$additional_libdir/lib$name.$shlibext" | |
11272 | if test -f "$additional_libdir/lib$name.la"; then | |
11273 | found_la="$additional_libdir/lib$name.la" | |
11274 | fi | |
11275 | else | |
11276 | if test -f "$additional_libdir/lib$name.$libext"; then | |
11277 | found_dir="$additional_libdir" | |
11278 | found_a="$additional_libdir/lib$name.$libext" | |
11279 | if test -f "$additional_libdir/lib$name.la"; then | |
11280 | found_la="$additional_libdir/lib$name.la" | |
11281 | fi | |
11282 | fi | |
11283 | fi | |
11284 | fi | |
11285 | if test "X$found_dir" = "X"; then | |
11286 | for x in $LDFLAGS $LTLIBICONV; do | |
11287 | ||
11288 | acl_save_prefix="$prefix" | |
11289 | prefix="$acl_final_prefix" | |
11290 | acl_save_exec_prefix="$exec_prefix" | |
11291 | exec_prefix="$acl_final_exec_prefix" | |
11292 | eval x=\"$x\" | |
11293 | exec_prefix="$acl_save_exec_prefix" | |
11294 | prefix="$acl_save_prefix" | |
11295 | ||
11296 | case "$x" in | |
11297 | -L*) | |
11298 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
11299 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
11300 | found_dir="$dir" | |
11301 | found_so="$dir/lib$name.$shlibext" | |
11302 | if test -f "$dir/lib$name.la"; then | |
11303 | found_la="$dir/lib$name.la" | |
11304 | fi | |
11305 | else | |
11306 | if test -f "$dir/lib$name.$libext"; then | |
11307 | found_dir="$dir" | |
11308 | found_a="$dir/lib$name.$libext" | |
11309 | if test -f "$dir/lib$name.la"; then | |
11310 | found_la="$dir/lib$name.la" | |
11311 | fi | |
11312 | fi | |
11313 | fi | |
11314 | ;; | |
11315 | esac | |
11316 | if test "X$found_dir" != "X"; then | |
11317 | break | |
11318 | fi | |
11319 | done | |
11320 | fi | |
11321 | if test "X$found_dir" != "X"; then | |
11322 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
11323 | if test "X$found_so" != "X"; then | |
11324 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
11325 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11326 | else | |
11327 | haveit= | |
11328 | for x in $ltrpathdirs; do | |
11329 | if test "X$x" = "X$found_dir"; then | |
11330 | haveit=yes | |
11331 | break | |
11332 | fi | |
11333 | done | |
11334 | if test -z "$haveit"; then | |
11335 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11336 | fi | |
11337 | if test "$hardcode_direct" = yes; then | |
11338 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11339 | else | |
11340 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11341 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11342 | haveit= | |
11343 | for x in $rpathdirs; do | |
11344 | if test "X$x" = "X$found_dir"; then | |
11345 | haveit=yes | |
11346 | break | |
11347 | fi | |
11348 | done | |
11349 | if test -z "$haveit"; then | |
11350 | rpathdirs="$rpathdirs $found_dir" | |
11351 | fi | |
11352 | else | |
11353 | haveit= | |
11354 | for x in $LDFLAGS $LIBICONV; do | |
11355 | ||
11356 | acl_save_prefix="$prefix" | |
11357 | prefix="$acl_final_prefix" | |
11358 | acl_save_exec_prefix="$exec_prefix" | |
11359 | exec_prefix="$acl_final_exec_prefix" | |
11360 | eval x=\"$x\" | |
11361 | exec_prefix="$acl_save_exec_prefix" | |
11362 | prefix="$acl_save_prefix" | |
11363 | ||
11364 | if test "X$x" = "X-L$found_dir"; then | |
11365 | haveit=yes | |
11366 | break | |
11367 | fi | |
11368 | done | |
11369 | if test -z "$haveit"; then | |
11370 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
11371 | fi | |
11372 | if test "$hardcode_minus_L" != no; then | |
11373 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11374 | else | |
11375 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
11376 | fi | |
11377 | fi | |
11378 | fi | |
11379 | fi | |
11380 | else | |
11381 | if test "X$found_a" != "X"; then | |
11382 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
11383 | else | |
11384 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
11385 | fi | |
11386 | fi | |
11387 | additional_includedir= | |
11388 | case "$found_dir" in | |
11389 | */lib | */lib/) | |
11390 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11391 | additional_includedir="$basedir/include" | |
11392 | ;; | |
11393 | esac | |
11394 | if test "X$additional_includedir" != "X"; then | |
11395 | if test "X$additional_includedir" != "X/usr/include"; then | |
11396 | haveit= | |
11397 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11398 | if test -n "$GCC"; then | |
11399 | case $host_os in | |
18fc9bd4 | 11400 | linux*) haveit=yes;; |
dfb77e37 KC |
11401 | esac |
11402 | fi | |
11403 | fi | |
11404 | if test -z "$haveit"; then | |
11405 | for x in $CPPFLAGS $INCICONV; do | |
11406 | ||
11407 | acl_save_prefix="$prefix" | |
11408 | prefix="$acl_final_prefix" | |
11409 | acl_save_exec_prefix="$exec_prefix" | |
11410 | exec_prefix="$acl_final_exec_prefix" | |
11411 | eval x=\"$x\" | |
11412 | exec_prefix="$acl_save_exec_prefix" | |
11413 | prefix="$acl_save_prefix" | |
11414 | ||
11415 | if test "X$x" = "X-I$additional_includedir"; then | |
11416 | haveit=yes | |
11417 | break | |
11418 | fi | |
11419 | done | |
11420 | if test -z "$haveit"; then | |
11421 | if test -d "$additional_includedir"; then | |
11422 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
11423 | fi | |
11424 | fi | |
11425 | fi | |
11426 | fi | |
11427 | fi | |
11428 | if test -n "$found_la"; then | |
11429 | save_libdir="$libdir" | |
11430 | case "$found_la" in | |
11431 | */* | *\\*) . "$found_la" ;; | |
11432 | *) . "./$found_la" ;; | |
11433 | esac | |
11434 | libdir="$save_libdir" | |
11435 | for dep in $dependency_libs; do | |
11436 | case "$dep" in | |
11437 | -L*) | |
11438 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11439 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11440 | haveit= | |
11441 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11442 | if test -n "$GCC"; then | |
11443 | case $host_os in | |
18fc9bd4 | 11444 | linux*) haveit=yes;; |
dfb77e37 KC |
11445 | esac |
11446 | fi | |
11447 | fi | |
11448 | if test -z "$haveit"; then | |
11449 | haveit= | |
11450 | for x in $LDFLAGS $LIBICONV; do | |
11451 | ||
11452 | acl_save_prefix="$prefix" | |
11453 | prefix="$acl_final_prefix" | |
11454 | acl_save_exec_prefix="$exec_prefix" | |
11455 | exec_prefix="$acl_final_exec_prefix" | |
11456 | eval x=\"$x\" | |
11457 | exec_prefix="$acl_save_exec_prefix" | |
11458 | prefix="$acl_save_prefix" | |
11459 | ||
11460 | if test "X$x" = "X-L$additional_libdir"; then | |
11461 | haveit=yes | |
11462 | break | |
11463 | fi | |
11464 | done | |
11465 | if test -z "$haveit"; then | |
11466 | if test -d "$additional_libdir"; then | |
11467 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
11468 | fi | |
11469 | fi | |
11470 | haveit= | |
11471 | for x in $LDFLAGS $LTLIBICONV; do | |
11472 | ||
11473 | acl_save_prefix="$prefix" | |
11474 | prefix="$acl_final_prefix" | |
11475 | acl_save_exec_prefix="$exec_prefix" | |
11476 | exec_prefix="$acl_final_exec_prefix" | |
11477 | eval x=\"$x\" | |
11478 | exec_prefix="$acl_save_exec_prefix" | |
11479 | prefix="$acl_save_prefix" | |
11480 | ||
11481 | if test "X$x" = "X-L$additional_libdir"; then | |
11482 | haveit=yes | |
11483 | break | |
11484 | fi | |
11485 | done | |
11486 | if test -z "$haveit"; then | |
11487 | if test -d "$additional_libdir"; then | |
11488 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
11489 | fi | |
11490 | fi | |
11491 | fi | |
11492 | fi | |
11493 | ;; | |
11494 | -R*) | |
11495 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
11496 | if test "$enable_rpath" != no; then | |
11497 | haveit= | |
11498 | for x in $rpathdirs; do | |
11499 | if test "X$x" = "X$dir"; then | |
11500 | haveit=yes | |
11501 | break | |
11502 | fi | |
11503 | done | |
11504 | if test -z "$haveit"; then | |
11505 | rpathdirs="$rpathdirs $dir" | |
11506 | fi | |
11507 | haveit= | |
11508 | for x in $ltrpathdirs; do | |
11509 | if test "X$x" = "X$dir"; then | |
11510 | haveit=yes | |
11511 | break | |
11512 | fi | |
11513 | done | |
11514 | if test -z "$haveit"; then | |
11515 | ltrpathdirs="$ltrpathdirs $dir" | |
11516 | fi | |
11517 | fi | |
11518 | ;; | |
11519 | -l*) | |
11520 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
11521 | ;; | |
11522 | *.la) | |
11523 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
11524 | ;; | |
11525 | *) | |
11526 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
11527 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
11528 | ;; | |
11529 | esac | |
11530 | done | |
11531 | fi | |
11532 | else | |
11533 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
11534 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
11535 | fi | |
11536 | fi | |
11537 | fi | |
11538 | done | |
11539 | done | |
11540 | if test "X$rpathdirs" != "X"; then | |
11541 | if test -n "$hardcode_libdir_separator"; then | |
11542 | alldirs= | |
11543 | for found_dir in $rpathdirs; do | |
11544 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11545 | done | |
11546 | acl_save_libdir="$libdir" | |
11547 | libdir="$alldirs" | |
11548 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11549 | libdir="$acl_save_libdir" | |
11550 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
11551 | else | |
11552 | for found_dir in $rpathdirs; do | |
11553 | acl_save_libdir="$libdir" | |
11554 | libdir="$found_dir" | |
11555 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11556 | libdir="$acl_save_libdir" | |
11557 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
11558 | done | |
11559 | fi | |
11560 | fi | |
11561 | if test "X$ltrpathdirs" != "X"; then | |
11562 | for found_dir in $ltrpathdirs; do | |
11563 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
11564 | done | |
11565 | fi | |
11566 | ||
11567 | ||
11568 | ||
11569 | ||
11570 | ||
11571 | ||
11572 | ||
11573 | am_save_CPPFLAGS="$CPPFLAGS" | |
11574 | ||
11575 | for element in $INCICONV; do | |
11576 | haveit= | |
11577 | for x in $CPPFLAGS; do | |
11578 | ||
11579 | acl_save_prefix="$prefix" | |
11580 | prefix="$acl_final_prefix" | |
11581 | acl_save_exec_prefix="$exec_prefix" | |
11582 | exec_prefix="$acl_final_exec_prefix" | |
11583 | eval x=\"$x\" | |
11584 | exec_prefix="$acl_save_exec_prefix" | |
11585 | prefix="$acl_save_prefix" | |
11586 | ||
11587 | if test "X$x" = "X$element"; then | |
11588 | haveit=yes | |
11589 | break | |
11590 | fi | |
11591 | done | |
11592 | if test -z "$haveit"; then | |
11593 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11594 | fi | |
11595 | done | |
eb158727 ZW |
11596 | |
11597 | ||
a6ccdbab EC |
11598 | { echo "$as_me:$LINENO: checking for iconv" >&5 |
11599 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } | |
ba479fd2 NN |
11600 | if test "${am_cv_func_iconv+set}" = set; then |
11601 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11602 | else |
ba479fd2 | 11603 | |
f91abfce TT |
11604 | am_cv_func_iconv="no, consider installing GNU libiconv" |
11605 | am_cv_lib_iconv=no | |
ba479fd2 | 11606 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11607 | /* confdefs.h. */ |
11608 | _ACEOF | |
11609 | cat confdefs.h >>conftest.$ac_ext | |
11610 | cat >>conftest.$ac_ext <<_ACEOF | |
11611 | /* end confdefs.h. */ | |
f91abfce TT |
11612 | #include <stdlib.h> |
11613 | #include <iconv.h> | |
ba479fd2 NN |
11614 | int |
11615 | main () | |
11616 | { | |
f91abfce TT |
11617 | iconv_t cd = iconv_open("",""); |
11618 | iconv(cd,NULL,NULL,NULL,NULL); | |
11619 | iconv_close(cd); | |
ba479fd2 NN |
11620 | ; |
11621 | return 0; | |
11622 | } | |
11623 | _ACEOF | |
11624 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
11625 | if { (ac_try="$ac_link" |
11626 | case "(($ac_try" in | |
11627 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11628 | *) ac_try_echo=$ac_try;; | |
11629 | esac | |
11630 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11631 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 11632 | ac_status=$? |
86da66b5 HPN |
11633 | grep -v '^ *+' conftest.er1 >conftest.err |
11634 | rm -f conftest.er1 | |
11635 | cat conftest.err >&5 | |
ba479fd2 | 11636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
11637 | (exit $ac_status); } && { |
11638 | test -z "$ac_c_werror_flag" || | |
11639 | test ! -s conftest.err | |
11640 | } && test -s conftest$ac_exeext && | |
11641 | $as_test_x conftest$ac_exeext; then | |
f91abfce TT |
11642 | am_cv_func_iconv=yes |
11643 | else | |
ba479fd2 NN |
11644 | echo "$as_me: failed program was:" >&5 |
11645 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11646 | ||
a6ccdbab | 11647 | |
f91abfce | 11648 | fi |
a6ccdbab EC |
11649 | |
11650 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 11651 | conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
11652 | if test "$am_cv_func_iconv" != yes; then |
11653 | am_save_LIBS="$LIBS" | |
dfb77e37 | 11654 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 11655 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11656 | /* confdefs.h. */ |
11657 | _ACEOF | |
11658 | cat confdefs.h >>conftest.$ac_ext | |
11659 | cat >>conftest.$ac_ext <<_ACEOF | |
11660 | /* end confdefs.h. */ | |
f91abfce TT |
11661 | #include <stdlib.h> |
11662 | #include <iconv.h> | |
ba479fd2 NN |
11663 | int |
11664 | main () | |
11665 | { | |
f91abfce TT |
11666 | iconv_t cd = iconv_open("",""); |
11667 | iconv(cd,NULL,NULL,NULL,NULL); | |
11668 | iconv_close(cd); | |
ba479fd2 NN |
11669 | ; |
11670 | return 0; | |
11671 | } | |
11672 | _ACEOF | |
11673 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
11674 | if { (ac_try="$ac_link" |
11675 | case "(($ac_try" in | |
11676 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11677 | *) ac_try_echo=$ac_try;; | |
11678 | esac | |
11679 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11680 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 11681 | ac_status=$? |
86da66b5 HPN |
11682 | grep -v '^ *+' conftest.er1 >conftest.err |
11683 | rm -f conftest.er1 | |
11684 | cat conftest.err >&5 | |
ba479fd2 | 11685 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
11686 | (exit $ac_status); } && { |
11687 | test -z "$ac_c_werror_flag" || | |
11688 | test ! -s conftest.err | |
11689 | } && test -s conftest$ac_exeext && | |
11690 | $as_test_x conftest$ac_exeext; then | |
f91abfce TT |
11691 | am_cv_lib_iconv=yes |
11692 | am_cv_func_iconv=yes | |
11693 | else | |
ba479fd2 NN |
11694 | echo "$as_me: failed program was:" >&5 |
11695 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11696 | ||
a6ccdbab | 11697 | |
f91abfce | 11698 | fi |
a6ccdbab EC |
11699 | |
11700 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 11701 | conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
11702 | LIBS="$am_save_LIBS" |
11703 | fi | |
6e3f3080 | 11704 | |
ba479fd2 | 11705 | fi |
a6ccdbab EC |
11706 | { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 |
11707 | echo "${ECHO_T}$am_cv_func_iconv" >&6; } | |
63cf211a | 11708 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
11709 | |
11710 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 11711 | #define HAVE_ICONV 1 |
ba479fd2 | 11712 | _ACEOF |
f91abfce | 11713 | |
dfb77e37 KC |
11714 | fi |
11715 | if test "$am_cv_lib_iconv" = yes; then | |
a6ccdbab EC |
11716 | { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 |
11717 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } | |
11718 | { echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
11719 | echo "${ECHO_T}$LIBICONV" >&6; } | |
dfb77e37 KC |
11720 | else |
11721 | CPPFLAGS="$am_save_CPPFLAGS" | |
11722 | LIBICONV= | |
11723 | LTLIBICONV= | |
11724 | fi | |
11725 | ||
11726 | ||
11727 | ||
11728 | if test "$am_cv_func_iconv" = yes; then | |
a6ccdbab EC |
11729 | { echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
11730 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } | |
ba479fd2 NN |
11731 | if test "${am_cv_proto_iconv+set}" = set; then |
11732 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11733 | else |
ba479fd2 NN |
11734 | |
11735 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11736 | /* confdefs.h. */ |
11737 | _ACEOF | |
11738 | cat confdefs.h >>conftest.$ac_ext | |
11739 | cat >>conftest.$ac_ext <<_ACEOF | |
11740 | /* end confdefs.h. */ | |
f91abfce TT |
11741 | |
11742 | #include <stdlib.h> | |
11743 | #include <iconv.h> | |
11744 | extern | |
11745 | #ifdef __cplusplus | |
11746 | "C" | |
11747 | #endif | |
11748 | #if defined(__STDC__) || defined(__cplusplus) | |
11749 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11750 | #else | |
11751 | size_t iconv(); | |
11752 | #endif | |
11753 | ||
ba479fd2 NN |
11754 | int |
11755 | main () | |
11756 | { | |
f91abfce | 11757 | |
ba479fd2 NN |
11758 | ; |
11759 | return 0; | |
11760 | } | |
11761 | _ACEOF | |
11762 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
11763 | if { (ac_try="$ac_compile" |
11764 | case "(($ac_try" in | |
11765 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11766 | *) ac_try_echo=$ac_try;; | |
11767 | esac | |
11768 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11769 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 11770 | ac_status=$? |
86da66b5 HPN |
11771 | grep -v '^ *+' conftest.er1 >conftest.err |
11772 | rm -f conftest.er1 | |
11773 | cat conftest.err >&5 | |
ba479fd2 | 11774 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
11775 | (exit $ac_status); } && { |
11776 | test -z "$ac_c_werror_flag" || | |
11777 | test ! -s conftest.err | |
11778 | } && test -s conftest.$ac_objext; then | |
f91abfce TT |
11779 | am_cv_proto_iconv_arg1="" |
11780 | else | |
ba479fd2 NN |
11781 | echo "$as_me: failed program was:" >&5 |
11782 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11783 | ||
a6ccdbab | 11784 | am_cv_proto_iconv_arg1="const" |
f91abfce | 11785 | fi |
a6ccdbab EC |
11786 | |
11787 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
f91abfce TT |
11788 | 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);" |
11789 | fi | |
11790 | ||
11791 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
a6ccdbab | 11792 | { echo "$as_me:$LINENO: result: ${ac_t:- |
ba479fd2 NN |
11793 | }$am_cv_proto_iconv" >&5 |
11794 | echo "${ECHO_T}${ac_t:- | |
a6ccdbab | 11795 | }$am_cv_proto_iconv" >&6; } |
ba479fd2 NN |
11796 | |
11797 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11798 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11799 | _ACEOF |
f91abfce TT |
11800 | |
11801 | fi | |
f91abfce | 11802 | |
56694dd9 ZW |
11803 | # Until we have in-tree GNU iconv: |
11804 | LIBICONV_DEP= | |
11805 | ||
11806 | ||
18fc9bd4 | 11807 | |
a6ccdbab EC |
11808 | { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
11809 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } | |
18fc9bd4 RG |
11810 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then |
11811 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11812 | else | |
11813 | cat >conftest.$ac_ext <<_ACEOF | |
11814 | /* confdefs.h. */ | |
11815 | _ACEOF | |
11816 | cat confdefs.h >>conftest.$ac_ext | |
11817 | cat >>conftest.$ac_ext <<_ACEOF | |
11818 | /* end confdefs.h. */ | |
11819 | #include <locale.h> | |
11820 | int | |
11821 | main () | |
11822 | { | |
11823 | return LC_MESSAGES | |
11824 | ; | |
11825 | return 0; | |
11826 | } | |
11827 | _ACEOF | |
11828 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
11829 | if { (ac_try="$ac_link" |
11830 | case "(($ac_try" in | |
11831 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11832 | *) ac_try_echo=$ac_try;; | |
11833 | esac | |
11834 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11835 | (eval "$ac_link") 2>conftest.er1 | |
18fc9bd4 RG |
11836 | ac_status=$? |
11837 | grep -v '^ *+' conftest.er1 >conftest.err | |
11838 | rm -f conftest.er1 | |
11839 | cat conftest.err >&5 | |
11840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
11841 | (exit $ac_status); } && { |
11842 | test -z "$ac_c_werror_flag" || | |
11843 | test ! -s conftest.err | |
11844 | } && test -s conftest$ac_exeext && | |
11845 | $as_test_x conftest$ac_exeext; then | |
18fc9bd4 RG |
11846 | am_cv_val_LC_MESSAGES=yes |
11847 | else | |
11848 | echo "$as_me: failed program was:" >&5 | |
11849 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11850 | ||
a6ccdbab | 11851 | am_cv_val_LC_MESSAGES=no |
18fc9bd4 | 11852 | fi |
a6ccdbab EC |
11853 | |
11854 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
18fc9bd4 RG |
11855 | conftest$ac_exeext conftest.$ac_ext |
11856 | fi | |
a6ccdbab EC |
11857 | { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
11858 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; } | |
18fc9bd4 RG |
11859 | if test $am_cv_val_LC_MESSAGES = yes; then |
11860 | ||
11861 | cat >>confdefs.h <<\_ACEOF | |
11862 | #define HAVE_LC_MESSAGES 1 | |
11863 | _ACEOF | |
11864 | ||
11865 | fi | |
11866 | ||
f91abfce | 11867 | |
a03ea89b | 11868 | |
a6ccdbab EC |
11869 | { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 |
11870 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } | |
a03ea89b BM |
11871 | if test "${am_cv_langinfo_codeset+set}" = set; then |
11872 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11873 | else | |
11874 | cat >conftest.$ac_ext <<_ACEOF | |
11875 | /* confdefs.h. */ | |
11876 | _ACEOF | |
11877 | cat confdefs.h >>conftest.$ac_ext | |
11878 | cat >>conftest.$ac_ext <<_ACEOF | |
11879 | /* end confdefs.h. */ | |
11880 | #include <langinfo.h> | |
11881 | int | |
11882 | main () | |
11883 | { | |
11884 | char* cs = nl_langinfo(CODESET); | |
11885 | ; | |
11886 | return 0; | |
11887 | } | |
11888 | _ACEOF | |
11889 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
11890 | if { (ac_try="$ac_link" |
11891 | case "(($ac_try" in | |
11892 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11893 | *) ac_try_echo=$ac_try;; | |
11894 | esac | |
11895 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11896 | (eval "$ac_link") 2>conftest.er1 | |
a03ea89b BM |
11897 | ac_status=$? |
11898 | grep -v '^ *+' conftest.er1 >conftest.err | |
11899 | rm -f conftest.er1 | |
11900 | cat conftest.err >&5 | |
11901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
11902 | (exit $ac_status); } && { |
11903 | test -z "$ac_c_werror_flag" || | |
11904 | test ! -s conftest.err | |
11905 | } && test -s conftest$ac_exeext && | |
11906 | $as_test_x conftest$ac_exeext; then | |
a03ea89b BM |
11907 | am_cv_langinfo_codeset=yes |
11908 | else | |
11909 | echo "$as_me: failed program was:" >&5 | |
11910 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11911 | ||
a6ccdbab | 11912 | am_cv_langinfo_codeset=no |
a03ea89b | 11913 | fi |
a6ccdbab EC |
11914 | |
11915 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
a03ea89b BM |
11916 | conftest$ac_exeext conftest.$ac_ext |
11917 | ||
11918 | fi | |
a6ccdbab EC |
11919 | { echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 |
11920 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } | |
a03ea89b BM |
11921 | if test $am_cv_langinfo_codeset = yes; then |
11922 | ||
11923 | cat >>confdefs.h <<\_ACEOF | |
11924 | #define HAVE_LANGINFO_CODESET 1 | |
11925 | _ACEOF | |
11926 | ||
11927 | fi | |
11928 | ||
11929 | ||
86cf1cbd KG |
11930 | # We will need to find libiberty.h and ansidecl.h |
11931 | saved_CFLAGS="$CFLAGS" | |
11932 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11933 | |
11934 | ||
11935 | ||
11936 | ||
11937 | ||
11938 | ||
11939 | ||
11940 | ||
11941 | ||
11942 | ||
11943 | ||
11944 | ||
11945 | ||
11946 | ||
11947 | ||
11948 | ||
11949 | ||
11950 | ||
11951 | ||
11952 | ||
11953 | ||
6a257778 | 11954 | |
ad6717df PB |
11955 | |
11956 | ||
0d667716 KG |
11957 | |
11958 | ||
11959 | ||
11960 | ||
11961 | ||
11962 | ||
11963 | ||
11964 | ||
11965 | ||
11966 | ||
367e8319 | 11967 | |
0d667716 KG |
11968 | |
11969 | ||
7391b66c | 11970 | |
ed5b9f96 GK |
11971 | |
11972 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11973 | strsignal strstr strverscmp \ | |
11974 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11975 | 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 | 11976 | do |
ad6717df | 11977 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
a6ccdbab EC |
11978 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11979 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
11980 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
11981 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11982 | else | |
11983 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11984 | /* confdefs.h. */ |
11985 | _ACEOF | |
11986 | cat confdefs.h >>conftest.$ac_ext | |
11987 | cat >>conftest.$ac_ext <<_ACEOF | |
11988 | /* end confdefs.h. */ | |
7afe8c41 KG |
11989 | #undef $ac_tr_decl |
11990 | #define $ac_tr_decl 1 | |
ba479fd2 | 11991 | |
d02af173 | 11992 | #include "ansidecl.h" |
86cf1cbd | 11993 | #include "system.h" |
f31e826b | 11994 | |
ba479fd2 NN |
11995 | int |
11996 | main () | |
11997 | { | |
86cf1cbd KG |
11998 | #ifndef $ac_func |
11999 | char *(*pfn) = (char *(*)) $ac_func ; | |
12000 | #endif | |
ba479fd2 NN |
12001 | ; |
12002 | return 0; | |
12003 | } | |
12004 | _ACEOF | |
12005 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12006 | if { (ac_try="$ac_compile" |
12007 | case "(($ac_try" in | |
12008 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12009 | *) ac_try_echo=$ac_try;; | |
12010 | esac | |
12011 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12012 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12013 | ac_status=$? |
86da66b5 HPN |
12014 | grep -v '^ *+' conftest.er1 >conftest.err |
12015 | rm -f conftest.er1 | |
12016 | cat conftest.err >&5 | |
ba479fd2 | 12017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12018 | (exit $ac_status); } && { |
12019 | test -z "$ac_c_werror_flag" || | |
12020 | test ! -s conftest.err | |
12021 | } && test -s conftest.$ac_objext; then | |
f31e826b | 12022 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 12023 | else |
ba479fd2 NN |
12024 | echo "$as_me: failed program was:" >&5 |
12025 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12026 | ||
a6ccdbab | 12027 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 12028 | fi |
a6ccdbab EC |
12029 | |
12030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
81bf3d9e RH |
12031 | fi |
12032 | ||
f31e826b | 12033 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
a6ccdbab EC |
12034 | { echo "$as_me:$LINENO: result: yes" >&5 |
12035 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 12036 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12037 | _ACEOF |
12038 | ||
81bf3d9e | 12039 | else |
a6ccdbab EC |
12040 | { echo "$as_me:$LINENO: result: no" >&5 |
12041 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 12042 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12043 | _ACEOF |
12044 | ||
81bf3d9e RH |
12045 | fi |
12046 | ||
12047 | done | |
ba479fd2 | 12048 | |
ba479fd2 | 12049 | |
ba479fd2 | 12050 | |
81bf3d9e | 12051 | |
81bf3d9e RH |
12052 | |
12053 | for ac_func in getrlimit setrlimit getrusage | |
12054 | do | |
ad6717df | 12055 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
a6ccdbab EC |
12056 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12057 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12058 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
12059 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12060 | else | |
12061 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12062 | /* confdefs.h. */ |
12063 | _ACEOF | |
12064 | cat confdefs.h >>conftest.$ac_ext | |
12065 | cat >>conftest.$ac_ext <<_ACEOF | |
12066 | /* end confdefs.h. */ | |
7afe8c41 KG |
12067 | #undef $ac_tr_decl |
12068 | #define $ac_tr_decl 1 | |
ba479fd2 | 12069 | |
d02af173 | 12070 | #include "ansidecl.h" |
86cf1cbd | 12071 | #include "system.h" |
81bf3d9e RH |
12072 | #ifdef HAVE_SYS_RESOURCE_H |
12073 | #include <sys/resource.h> | |
12074 | #endif | |
12075 | ||
f31e826b | 12076 | |
ba479fd2 NN |
12077 | int |
12078 | main () | |
12079 | { | |
86cf1cbd KG |
12080 | #ifndef $ac_func |
12081 | char *(*pfn) = (char *(*)) $ac_func ; | |
12082 | #endif | |
ba479fd2 NN |
12083 | ; |
12084 | return 0; | |
12085 | } | |
12086 | _ACEOF | |
12087 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12088 | if { (ac_try="$ac_compile" |
12089 | case "(($ac_try" in | |
12090 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12091 | *) ac_try_echo=$ac_try;; | |
12092 | esac | |
12093 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12094 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12095 | ac_status=$? |
86da66b5 HPN |
12096 | grep -v '^ *+' conftest.er1 >conftest.err |
12097 | rm -f conftest.er1 | |
12098 | cat conftest.err >&5 | |
ba479fd2 | 12099 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12100 | (exit $ac_status); } && { |
12101 | test -z "$ac_c_werror_flag" || | |
12102 | test ! -s conftest.err | |
12103 | } && test -s conftest.$ac_objext; then | |
f31e826b | 12104 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 12105 | else |
ba479fd2 NN |
12106 | echo "$as_me: failed program was:" >&5 |
12107 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12108 | ||
a6ccdbab | 12109 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 12110 | fi |
a6ccdbab EC |
12111 | |
12112 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
81bf3d9e RH |
12113 | fi |
12114 | ||
f31e826b | 12115 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
a6ccdbab EC |
12116 | { echo "$as_me:$LINENO: result: yes" >&5 |
12117 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 12118 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12119 | _ACEOF |
12120 | ||
81bf3d9e | 12121 | else |
a6ccdbab EC |
12122 | { echo "$as_me:$LINENO: result: no" >&5 |
12123 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 12124 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12125 | _ACEOF |
12126 | ||
81bf3d9e RH |
12127 | fi |
12128 | ||
12129 | done | |
86cf1cbd | 12130 | |
81bf3d9e | 12131 | |
ba479fd2 | 12132 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12133 | /* confdefs.h. */ |
12134 | _ACEOF | |
12135 | cat confdefs.h >>conftest.$ac_ext | |
12136 | cat >>conftest.$ac_ext <<_ACEOF | |
12137 | /* end confdefs.h. */ | |
b2522d2b HPN |
12138 | |
12139 | #include "ansidecl.h" | |
12140 | #include "system.h" | |
12141 | #ifdef HAVE_SYS_RESOURCE_H | |
12142 | #include <sys/resource.h> | |
12143 | #endif | |
12144 | ||
ba479fd2 NN |
12145 | int |
12146 | main () | |
12147 | { | |
b2522d2b | 12148 | rlim_t l = 0; |
ba479fd2 NN |
12149 | ; |
12150 | return 0; | |
12151 | } | |
12152 | _ACEOF | |
12153 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12154 | if { (ac_try="$ac_compile" |
12155 | case "(($ac_try" in | |
12156 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12157 | *) ac_try_echo=$ac_try;; | |
12158 | esac | |
12159 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12160 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12161 | ac_status=$? |
86da66b5 HPN |
12162 | grep -v '^ *+' conftest.er1 >conftest.err |
12163 | rm -f conftest.er1 | |
12164 | cat conftest.err >&5 | |
ba479fd2 | 12165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12166 | (exit $ac_status); } && { |
12167 | test -z "$ac_c_werror_flag" || | |
12168 | test ! -s conftest.err | |
12169 | } && test -s conftest.$ac_objext; then | |
b2522d2b HPN |
12170 | : |
12171 | else | |
ba479fd2 NN |
12172 | echo "$as_me: failed program was:" >&5 |
12173 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12174 | ||
12175 | ||
12176 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 12177 | #define rlim_t long |
ba479fd2 | 12178 | _ACEOF |
b2522d2b HPN |
12179 | |
12180 | fi | |
a6ccdbab EC |
12181 | |
12182 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b2522d2b | 12183 | |
2102b2fe RS |
12184 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
12185 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
12186 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
12187 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 12188 | |
351df804 | 12189 | for ac_func in ldgetname |
c1800ec8 | 12190 | do |
ad6717df | 12191 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
a6ccdbab EC |
12192 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12193 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12194 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
12195 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12196 | else | |
12197 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12198 | /* confdefs.h. */ |
12199 | _ACEOF | |
12200 | cat confdefs.h >>conftest.$ac_ext | |
12201 | cat >>conftest.$ac_ext <<_ACEOF | |
12202 | /* end confdefs.h. */ | |
c1800ec8 ZW |
12203 | #undef $ac_tr_decl |
12204 | #define $ac_tr_decl 1 | |
ba479fd2 | 12205 | |
351df804 KG |
12206 | #include "ansidecl.h" |
12207 | #include "system.h" | |
12208 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
12209 | #undef FREAD |
12210 | #undef FWRITE | |
351df804 KG |
12211 | #include <ldfcn.h> |
12212 | #endif | |
12213 | ||
12214 | ||
ba479fd2 NN |
12215 | int |
12216 | main () | |
12217 | { | |
351df804 KG |
12218 | #ifndef $ac_func |
12219 | char *(*pfn) = (char *(*)) $ac_func ; | |
12220 | #endif | |
ba479fd2 NN |
12221 | ; |
12222 | return 0; | |
12223 | } | |
12224 | _ACEOF | |
12225 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12226 | if { (ac_try="$ac_compile" |
12227 | case "(($ac_try" in | |
12228 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12229 | *) ac_try_echo=$ac_try;; | |
12230 | esac | |
12231 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12232 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12233 | ac_status=$? |
86da66b5 HPN |
12234 | grep -v '^ *+' conftest.er1 >conftest.err |
12235 | rm -f conftest.er1 | |
12236 | cat conftest.err >&5 | |
ba479fd2 | 12237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12238 | (exit $ac_status); } && { |
12239 | test -z "$ac_c_werror_flag" || | |
12240 | test ! -s conftest.err | |
12241 | } && test -s conftest.$ac_objext; then | |
351df804 KG |
12242 | eval "gcc_cv_have_decl_$ac_func=yes" |
12243 | else | |
ba479fd2 NN |
12244 | echo "$as_me: failed program was:" >&5 |
12245 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12246 | ||
a6ccdbab | 12247 | eval "gcc_cv_have_decl_$ac_func=no" |
351df804 | 12248 | fi |
a6ccdbab EC |
12249 | |
12250 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
351df804 KG |
12251 | fi |
12252 | ||
12253 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
a6ccdbab EC |
12254 | { echo "$as_me:$LINENO: result: yes" >&5 |
12255 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 12256 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12257 | _ACEOF |
12258 | ||
351df804 | 12259 | else |
a6ccdbab EC |
12260 | { echo "$as_me:$LINENO: result: no" >&5 |
12261 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 12262 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12263 | _ACEOF |
12264 | ||
351df804 KG |
12265 | fi |
12266 | ||
12267 | done | |
ba479fd2 | 12268 | |
351df804 KG |
12269 | |
12270 | ||
12271 | for ac_func in times | |
12272 | do | |
ad6717df | 12273 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
a6ccdbab EC |
12274 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12275 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12276 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
12277 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12278 | else | |
12279 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12280 | /* confdefs.h. */ |
12281 | _ACEOF | |
12282 | cat confdefs.h >>conftest.$ac_ext | |
12283 | cat >>conftest.$ac_ext <<_ACEOF | |
12284 | /* end confdefs.h. */ | |
351df804 KG |
12285 | #undef $ac_tr_decl |
12286 | #define $ac_tr_decl 1 | |
ba479fd2 | 12287 | |
c1800ec8 ZW |
12288 | #include "ansidecl.h" |
12289 | #include "system.h" | |
12290 | #ifdef HAVE_SYS_TIMES_H | |
12291 | #include <sys/times.h> | |
12292 | #endif | |
12293 | ||
12294 | ||
ba479fd2 NN |
12295 | int |
12296 | main () | |
12297 | { | |
c1800ec8 ZW |
12298 | #ifndef $ac_func |
12299 | char *(*pfn) = (char *(*)) $ac_func ; | |
12300 | #endif | |
ba479fd2 NN |
12301 | ; |
12302 | return 0; | |
12303 | } | |
12304 | _ACEOF | |
12305 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12306 | if { (ac_try="$ac_compile" |
12307 | case "(($ac_try" in | |
12308 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12309 | *) ac_try_echo=$ac_try;; | |
12310 | esac | |
12311 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12312 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12313 | ac_status=$? |
86da66b5 HPN |
12314 | grep -v '^ *+' conftest.er1 >conftest.err |
12315 | rm -f conftest.er1 | |
12316 | cat conftest.err >&5 | |
ba479fd2 | 12317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12318 | (exit $ac_status); } && { |
12319 | test -z "$ac_c_werror_flag" || | |
12320 | test ! -s conftest.err | |
12321 | } && test -s conftest.$ac_objext; then | |
c1800ec8 ZW |
12322 | eval "gcc_cv_have_decl_$ac_func=yes" |
12323 | else | |
ba479fd2 NN |
12324 | echo "$as_me: failed program was:" >&5 |
12325 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12326 | ||
a6ccdbab | 12327 | eval "gcc_cv_have_decl_$ac_func=no" |
c1800ec8 | 12328 | fi |
a6ccdbab EC |
12329 | |
12330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c1800ec8 ZW |
12331 | fi |
12332 | ||
12333 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
a6ccdbab EC |
12334 | { echo "$as_me:$LINENO: result: yes" >&5 |
12335 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 12336 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12337 | _ACEOF |
12338 | ||
c1800ec8 | 12339 | else |
a6ccdbab EC |
12340 | { echo "$as_me:$LINENO: result: no" >&5 |
12341 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 12342 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12343 | _ACEOF |
12344 | ||
c1800ec8 ZW |
12345 | fi |
12346 | ||
12347 | done | |
c1800ec8 ZW |
12348 | |
12349 | ||
4f6d8cc8 GK |
12350 | |
12351 | for ac_func in sigaltstack | |
12352 | do | |
12353 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` | |
a6ccdbab EC |
12354 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12355 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12356 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
4f6d8cc8 GK |
12357 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12358 | else | |
12359 | cat >conftest.$ac_ext <<_ACEOF | |
12360 | /* confdefs.h. */ | |
12361 | _ACEOF | |
12362 | cat confdefs.h >>conftest.$ac_ext | |
12363 | cat >>conftest.$ac_ext <<_ACEOF | |
12364 | /* end confdefs.h. */ | |
12365 | #undef $ac_tr_decl | |
12366 | #define $ac_tr_decl 1 | |
12367 | ||
12368 | #include "ansidecl.h" | |
12369 | #include "system.h" | |
12370 | #include <signal.h> | |
12371 | ||
12372 | ||
12373 | int | |
12374 | main () | |
12375 | { | |
12376 | #ifndef $ac_func | |
12377 | char *(*pfn) = (char *(*)) $ac_func ; | |
12378 | #endif | |
12379 | ; | |
12380 | return 0; | |
12381 | } | |
12382 | _ACEOF | |
12383 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12384 | if { (ac_try="$ac_compile" |
12385 | case "(($ac_try" in | |
12386 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12387 | *) ac_try_echo=$ac_try;; | |
12388 | esac | |
12389 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12390 | (eval "$ac_compile") 2>conftest.er1 | |
4f6d8cc8 GK |
12391 | ac_status=$? |
12392 | grep -v '^ *+' conftest.er1 >conftest.err | |
12393 | rm -f conftest.er1 | |
12394 | cat conftest.err >&5 | |
12395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
12396 | (exit $ac_status); } && { |
12397 | test -z "$ac_c_werror_flag" || | |
12398 | test ! -s conftest.err | |
12399 | } && test -s conftest.$ac_objext; then | |
4f6d8cc8 GK |
12400 | eval "gcc_cv_have_decl_$ac_func=yes" |
12401 | else | |
12402 | echo "$as_me: failed program was:" >&5 | |
12403 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12404 | ||
a6ccdbab | 12405 | eval "gcc_cv_have_decl_$ac_func=no" |
4f6d8cc8 | 12406 | fi |
a6ccdbab EC |
12407 | |
12408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4f6d8cc8 GK |
12409 | fi |
12410 | ||
12411 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
a6ccdbab EC |
12412 | { echo "$as_me:$LINENO: result: yes" >&5 |
12413 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
12414 | #define $ac_tr_decl 1 |
12415 | _ACEOF | |
12416 | ||
12417 | else | |
a6ccdbab EC |
12418 | { echo "$as_me:$LINENO: result: no" >&5 |
12419 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
12420 | #define $ac_tr_decl 0 |
12421 | _ACEOF | |
12422 | ||
12423 | fi | |
12424 | ||
12425 | done | |
12426 | ||
12427 | ||
c1800ec8 | 12428 | # More time-related stuff. |
a6ccdbab EC |
12429 | { echo "$as_me:$LINENO: checking for struct tms" >&5 |
12430 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6; } | |
ba479fd2 NN |
12431 | if test "${ac_cv_struct_tms+set}" = set; then |
12432 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12433 | else | |
12434 | ||
12435 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12436 | /* confdefs.h. */ |
12437 | _ACEOF | |
12438 | cat confdefs.h >>conftest.$ac_ext | |
12439 | cat >>conftest.$ac_ext <<_ACEOF | |
12440 | /* end confdefs.h. */ | |
c1800ec8 ZW |
12441 | |
12442 | #include "ansidecl.h" | |
12443 | #include "system.h" | |
12444 | #ifdef HAVE_SYS_TIMES_H | |
12445 | #include <sys/times.h> | |
12446 | #endif | |
12447 | ||
ba479fd2 NN |
12448 | int |
12449 | main () | |
12450 | { | |
c1800ec8 | 12451 | struct tms tms; |
ba479fd2 NN |
12452 | ; |
12453 | return 0; | |
12454 | } | |
12455 | _ACEOF | |
12456 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12457 | if { (ac_try="$ac_compile" |
12458 | case "(($ac_try" in | |
12459 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12460 | *) ac_try_echo=$ac_try;; | |
12461 | esac | |
12462 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12463 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12464 | ac_status=$? |
86da66b5 HPN |
12465 | grep -v '^ *+' conftest.er1 >conftest.err |
12466 | rm -f conftest.er1 | |
12467 | cat conftest.err >&5 | |
ba479fd2 | 12468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12469 | (exit $ac_status); } && { |
12470 | test -z "$ac_c_werror_flag" || | |
12471 | test ! -s conftest.err | |
12472 | } && test -s conftest.$ac_objext; then | |
c1800ec8 ZW |
12473 | ac_cv_struct_tms=yes |
12474 | else | |
ba479fd2 NN |
12475 | echo "$as_me: failed program was:" >&5 |
12476 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12477 | ||
a6ccdbab | 12478 | ac_cv_struct_tms=no |
c1800ec8 | 12479 | fi |
a6ccdbab EC |
12480 | |
12481 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c1800ec8 | 12482 | fi |
a6ccdbab EC |
12483 | { echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
12484 | echo "${ECHO_T}$ac_cv_struct_tms" >&6; } | |
63cf211a | 12485 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
12486 | |
12487 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 12488 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 12489 | _ACEOF |
c1800ec8 ZW |
12490 | |
12491 | fi | |
12492 | ||
12493 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
12494 | # revisit after autoconf 2.50. | |
a6ccdbab EC |
12495 | { echo "$as_me:$LINENO: checking for clock_t" >&5 |
12496 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; } | |
ba479fd2 NN |
12497 | if test "${gcc_cv_type_clock_t+set}" = set; then |
12498 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12499 | else | |
12500 | ||
12501 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12502 | /* confdefs.h. */ |
12503 | _ACEOF | |
12504 | cat confdefs.h >>conftest.$ac_ext | |
12505 | cat >>conftest.$ac_ext <<_ACEOF | |
12506 | /* end confdefs.h. */ | |
c1800ec8 ZW |
12507 | |
12508 | #include "ansidecl.h" | |
12509 | #include "system.h" | |
12510 | ||
ba479fd2 NN |
12511 | int |
12512 | main () | |
12513 | { | |
c1800ec8 | 12514 | clock_t x; |
ba479fd2 NN |
12515 | ; |
12516 | return 0; | |
12517 | } | |
12518 | _ACEOF | |
12519 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12520 | if { (ac_try="$ac_compile" |
12521 | case "(($ac_try" in | |
12522 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12523 | *) ac_try_echo=$ac_try;; | |
12524 | esac | |
12525 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12526 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12527 | ac_status=$? |
86da66b5 HPN |
12528 | grep -v '^ *+' conftest.er1 >conftest.err |
12529 | rm -f conftest.er1 | |
12530 | cat conftest.err >&5 | |
ba479fd2 | 12531 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12532 | (exit $ac_status); } && { |
12533 | test -z "$ac_c_werror_flag" || | |
12534 | test ! -s conftest.err | |
12535 | } && test -s conftest.$ac_objext; then | |
c1800ec8 ZW |
12536 | gcc_cv_type_clock_t=yes |
12537 | else | |
ba479fd2 NN |
12538 | echo "$as_me: failed program was:" >&5 |
12539 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12540 | ||
a6ccdbab | 12541 | gcc_cv_type_clock_t=no |
c1800ec8 | 12542 | fi |
a6ccdbab EC |
12543 | |
12544 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c1800ec8 | 12545 | fi |
a6ccdbab EC |
12546 | { echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
12547 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6; } | |
63cf211a | 12548 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
12549 | |
12550 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 12551 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 12552 | _ACEOF |
c1800ec8 ZW |
12553 | |
12554 | fi | |
12555 | ||
eb70d86d AS |
12556 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
12557 | CFLAGS="$saved_CFLAGS" | |
12558 | ||
a6ccdbab | 12559 | # Check whether --enable-initfini-array was given. |
07cf4226 | 12560 | if test "${enable_initfini_array+set}" = set; then |
a6ccdbab | 12561 | enableval=$enable_initfini_array; |
07cf4226 | 12562 | else |
ba479fd2 | 12563 | |
a6ccdbab EC |
12564 | { echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 |
12565 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6; } | |
ba479fd2 NN |
12566 | if test "${gcc_cv_initfini_array+set}" = set; then |
12567 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 12568 | else |
eb70d86d | 12569 | if test "$cross_compiling" = yes; then |
918c4fe4 | 12570 | gcc_cv_initfini_array=no |
eb70d86d | 12571 | else |
ba479fd2 | 12572 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12573 | /* confdefs.h. */ |
12574 | _ACEOF | |
12575 | cat confdefs.h >>conftest.$ac_ext | |
12576 | cat >>conftest.$ac_ext <<_ACEOF | |
12577 | /* end confdefs.h. */ | |
eb70d86d | 12578 | |
07cf4226 DM |
12579 | static int x = -1; |
12580 | int main (void) { return x; } | |
12581 | int foo (void) { x = 0; } | |
12582 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
12583 | _ACEOF |
12584 | rm -f conftest$ac_exeext | |
a6ccdbab EC |
12585 | if { (ac_try="$ac_link" |
12586 | case "(($ac_try" in | |
12587 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12588 | *) ac_try_echo=$ac_try;; | |
12589 | esac | |
12590 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12591 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
12592 | ac_status=$? |
12593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12594 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
a6ccdbab EC |
12595 | { (case "(($ac_try" in |
12596 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12597 | *) ac_try_echo=$ac_try;; | |
12598 | esac | |
12599 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12600 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
12601 | ac_status=$? |
12602 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12603 | (exit $ac_status); }; }; then | |
918c4fe4 | 12604 | gcc_cv_initfini_array=yes |
eb70d86d | 12605 | else |
ba479fd2 NN |
12606 | echo "$as_me: program exited with status $ac_status" >&5 |
12607 | echo "$as_me: failed program was:" >&5 | |
12608 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12609 | ||
12610 | ( exit $ac_status ) | |
12611 | gcc_cv_initfini_array=no | |
eb70d86d | 12612 | fi |
a6ccdbab | 12613 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 12614 | fi |
a6ccdbab EC |
12615 | |
12616 | ||
07cf4226 | 12617 | fi |
a6ccdbab EC |
12618 | { echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
12619 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6; } | |
eb70d86d | 12620 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 12621 | |
a6ccdbab EC |
12622 | fi |
12623 | ||
63cf211a | 12624 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
12625 | |
12626 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 12627 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 12628 | _ACEOF |
07cf4226 | 12629 | |
eb70d86d | 12630 | fi |
81bf3d9e | 12631 | |
ba479fd2 | 12632 | # mkdir takes a single argument on some systems. |
a6ccdbab EC |
12633 | { echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 |
12634 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6; } | |
ba479fd2 NN |
12635 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then |
12636 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 12637 | else |
ba479fd2 | 12638 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12639 | /* confdefs.h. */ |
12640 | _ACEOF | |
12641 | cat confdefs.h >>conftest.$ac_ext | |
12642 | cat >>conftest.$ac_ext <<_ACEOF | |
12643 | /* end confdefs.h. */ | |
75923b2f MK |
12644 | |
12645 | #include <sys/types.h> | |
12646 | #ifdef HAVE_SYS_STAT_H | |
12647 | # include <sys/stat.h> | |
12648 | #endif | |
12649 | #ifdef HAVE_UNISTD_H | |
12650 | # include <unistd.h> | |
12651 | #endif | |
12652 | #ifdef HAVE_DIRECT_H | |
12653 | # include <direct.h> | |
12654 | #endif | |
ba479fd2 NN |
12655 | int |
12656 | main () | |
12657 | { | |
75923b2f | 12658 | mkdir ("foo", 0); |
ba479fd2 NN |
12659 | ; |
12660 | return 0; | |
12661 | } | |
12662 | _ACEOF | |
12663 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12664 | if { (ac_try="$ac_compile" |
12665 | case "(($ac_try" in | |
12666 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12667 | *) ac_try_echo=$ac_try;; | |
12668 | esac | |
12669 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12670 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12671 | ac_status=$? |
86da66b5 HPN |
12672 | grep -v '^ *+' conftest.er1 >conftest.err |
12673 | rm -f conftest.er1 | |
12674 | cat conftest.err >&5 | |
ba479fd2 | 12675 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
12676 | (exit $ac_status); } && { |
12677 | test -z "$ac_c_werror_flag" || | |
12678 | test ! -s conftest.err | |
12679 | } && test -s conftest.$ac_objext; then | |
75923b2f MK |
12680 | gcc_cv_mkdir_takes_one_arg=no |
12681 | else | |
ba479fd2 NN |
12682 | echo "$as_me: failed program was:" >&5 |
12683 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12684 | ||
a6ccdbab | 12685 | gcc_cv_mkdir_takes_one_arg=yes |
75923b2f | 12686 | fi |
a6ccdbab EC |
12687 | |
12688 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
75923b2f | 12689 | fi |
a6ccdbab EC |
12690 | { echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
12691 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6; } | |
63cf211a | 12692 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
12693 | |
12694 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 12695 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 12696 | _ACEOF |
75923b2f MK |
12697 | |
12698 | fi | |
12699 | ||
12700 | ||
861bb6c1 JL |
12701 | # File extensions |
12702 | manext='.1' | |
12703 | objext='.o' | |
12704 | ||
12705 | ||
12706 | ||
4977bab6 | 12707 | # With Setjmp/Longjmp based exception handling. |
a6ccdbab | 12708 | # Check whether --enable-sjlj-exceptions was given. |
4977bab6 | 12709 | if test "${enable_sjlj_exceptions+set}" = set; then |
a6ccdbab | 12710 | enableval=$enable_sjlj_exceptions; sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` |
63cf211a | 12711 | |
ba479fd2 NN |
12712 | cat >>confdefs.h <<_ACEOF |
12713 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
12714 | _ACEOF | |
4977bab6 | 12715 | |
a6ccdbab EC |
12716 | fi |
12717 | ||
4977bab6 | 12718 | |
443728bb L |
12719 | # For platforms with the unwind ABI which includes an unwind library, |
12720 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 12721 | |
a6ccdbab | 12722 | # Check whether --with-system-libunwind was given. |
443728bb | 12723 | if test "${with_system_libunwind+set}" = set; then |
a6ccdbab EC |
12724 | withval=$with_system_libunwind; |
12725 | fi | |
4977bab6 | 12726 | |
4977bab6 | 12727 | |
e64f5acf SE |
12728 | # config.gcc also contains tests of with_system_libunwind. |
12729 | if test x$with_system_libunwind = xyes; then | |
12730 | ||
12731 | cat >>confdefs.h <<\_ACEOF | |
12732 | #define HAVE_GETIPINFO 1 | |
12733 | _ACEOF | |
12734 | ||
12735 | fi | |
12736 | ||
34a86c2b NN |
12737 | # -------------------------------------------------------- |
12738 | # Build, host, and target specific configuration fragments | |
12739 | # -------------------------------------------------------- | |
12740 | ||
5b28c537 NN |
12741 | # Collect build-machine-specific information. |
12742 | . ${srcdir}/config.build | |
12743 | ||
a89ea0df NN |
12744 | # Collect host-machine-specific information. |
12745 | . ${srcdir}/config.host | |
12746 | ||
ef69da62 | 12747 | target_gtfiles= |
a89ea0df NN |
12748 | |
12749 | # Collect target-machine-specific information. | |
8ad9fb33 | 12750 | . ${srcdir}/config.gcc |
861bb6c1 JL |
12751 | |
12752 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 12753 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
12754 | |
12755 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 12756 | if test x"$tm_file" = x |
861bb6c1 JL |
12757 | then tm_file=$cpu_type/$cpu_type.h; fi |
12758 | ||
6b2adea9 | 12759 | if test x"$extra_headers" = x |
861bb6c1 JL |
12760 | then extra_headers=; fi |
12761 | ||
75bffa71 | 12762 | if test x$md_file = x |
e98e406f | 12763 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 12764 | |
75bffa71 | 12765 | if test x$out_file = x |
861bb6c1 JL |
12766 | then out_file=$cpu_type/$cpu_type.c; fi |
12767 | ||
75bffa71 | 12768 | if test x"$tmake_file" = x |
861bb6c1 JL |
12769 | then tmake_file=$cpu_type/t-$cpu_type |
12770 | fi | |
12771 | ||
90e6a802 | 12772 | if test x"$dwarf2" = xyes |
756ee602 | 12773 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
12774 | fi |
12775 | ||
861bb6c1 | 12776 | # Say what files are being used for the output code and MD file. |
11642c3a | 12777 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
12778 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
12779 | ||
11642c3a | 12780 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
12781 | # about them and drop them. |
12782 | ||
11642c3a ZW |
12783 | bx= |
12784 | for x in $build_xm_file; do | |
12785 | if test -f $srcdir/config/$x | |
12786 | then bx="$bx $x" | |
ba479fd2 NN |
12787 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12788 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12789 | fi |
12790 | done | |
12791 | build_xm_file="$bx" | |
12792 | ||
12793 | hx= | |
12794 | for x in $host_xm_file; do | |
12795 | if test -f $srcdir/config/$x | |
12796 | then hx="$hx $x" | |
ba479fd2 NN |
12797 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12798 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12799 | fi |
12800 | done | |
12801 | host_xm_file="$hx" | |
12802 | ||
12803 | tx= | |
12804 | for x in $xm_file; do | |
12805 | if test -f $srcdir/config/$x | |
12806 | then tx="$tx $x" | |
ba479fd2 NN |
12807 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12808 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12809 | fi |
12810 | done | |
12811 | xm_file="$tx" | |
12812 | ||
861bb6c1 JL |
12813 | count=a |
12814 | for f in $tm_file; do | |
12815 | count=${count}x | |
12816 | done | |
75bffa71 | 12817 | if test $count = ax; then |
861bb6c1 JL |
12818 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12819 | else | |
12820 | echo "Using the following target machine macro files:" | |
12821 | for f in $tm_file; do | |
12822 | echo " $srcdir/config/$f" | |
12823 | done | |
12824 | fi | |
12825 | ||
4977bab6 | 12826 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12827 | |
12828 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12829 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12830 | _ACEOF |
4977bab6 ZW |
12831 | |
12832 | fi | |
12833 | ||
99fa8911 AP |
12834 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12835 | ||
12836 | cat >>confdefs.h <<\_ACEOF | |
12837 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12838 | _ACEOF | |
12839 | ||
12840 | fi | |
12841 | ||
861bb6c1 JL |
12842 | count=a |
12843 | for f in $host_xm_file; do | |
12844 | count=${count}x | |
12845 | done | |
11642c3a ZW |
12846 | if test $count = a; then |
12847 | : | |
12848 | elif test $count = ax; then | |
861bb6c1 JL |
12849 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12850 | else | |
12851 | echo "Using the following host machine macro files:" | |
12852 | for f in $host_xm_file; do | |
12853 | echo " $srcdir/config/$f" | |
12854 | done | |
12855 | fi | |
476d9098 | 12856 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12857 | |
75bffa71 | 12858 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12859 | count=a |
12860 | for f in $build_xm_file; do | |
12861 | count=${count}x | |
12862 | done | |
11642c3a ZW |
12863 | if test $count = a; then |
12864 | : | |
12865 | elif test $count = ax; then | |
861bb6c1 JL |
12866 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12867 | else | |
12868 | echo "Using the following build machine macro files:" | |
12869 | for f in $build_xm_file; do | |
12870 | echo " $srcdir/config/$f" | |
12871 | done | |
12872 | fi | |
12873 | fi | |
12874 | ||
4f6d8cc8 | 12875 | case ${host} in |
b8ec3cc8 | 12876 | powerpc*-*-darwin*) |
a6ccdbab EC |
12877 | { echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 |
12878 | echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6; } | |
4f6d8cc8 GK |
12879 | if test "${gcc_cv_mcontext_underscores+set}" = set; then |
12880 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12881 | else | |
12882 | cat >conftest.$ac_ext <<_ACEOF | |
12883 | ||
de4fb767 | 12884 | #include <sys/signal.h> |
4f6d8cc8 GK |
12885 | #include <ucontext.h> |
12886 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
12887 | ||
12888 | _ACEOF | |
12889 | rm -f conftest.$ac_objext | |
a6ccdbab EC |
12890 | if { (ac_try="$ac_compile" |
12891 | case "(($ac_try" in | |
12892 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12893 | *) ac_try_echo=$ac_try;; | |
12894 | esac | |
12895 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12896 | (eval "$ac_compile") 2>conftest.er1 | |
4f6d8cc8 GK |
12897 | ac_status=$? |
12898 | grep -v '^ *+' conftest.er1 >conftest.err | |
12899 | rm -f conftest.er1 | |
12900 | cat conftest.err >&5 | |
12901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
12902 | (exit $ac_status); } && { |
12903 | test -z "$ac_c_werror_flag" || | |
12904 | test ! -s conftest.err | |
12905 | } && test -s conftest.$ac_objext; then | |
4f6d8cc8 GK |
12906 | gcc_cv_mcontext_underscores=no |
12907 | else | |
12908 | echo "$as_me: failed program was:" >&5 | |
12909 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12910 | ||
a6ccdbab | 12911 | gcc_cv_mcontext_underscores=yes |
4f6d8cc8 | 12912 | fi |
a6ccdbab EC |
12913 | |
12914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4f6d8cc8 | 12915 | fi |
a6ccdbab EC |
12916 | { echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 |
12917 | echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6; } | |
4f6d8cc8 GK |
12918 | if test $gcc_cv_mcontext_underscores = yes; then |
12919 | ||
12920 | cat >>confdefs.h <<\_ACEOF | |
12921 | #define HAS_MCONTEXT_T_UNDERSCORES | |
12922 | _ACEOF | |
12923 | ||
12924 | fi | |
12925 | ;; | |
12926 | esac | |
12927 | ||
8bb915b6 NN |
12928 | # --------- |
12929 | # Threading | |
12930 | # --------- | |
12931 | ||
c2e494a8 | 12932 | # Check if a valid thread package |
615be2cf | 12933 | case ${enable_threads} in |
c2e494a8 NN |
12934 | "" | no) |
12935 | # No threads | |
12936 | target_thread_file='single' | |
12937 | ;; | |
12938 | yes) | |
12939 | # default | |
12940 | target_thread_file='single' | |
12941 | ;; | |
18167442 | 12942 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12943 | single | solaris | vxworks | win32 ) |
615be2cf | 12944 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12945 | ;; |
12946 | *) | |
615be2cf | 12947 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12948 | exit 1 |
12949 | ;; | |
12950 | esac | |
12951 | ||
12952 | if test x${thread_file} = x; then | |
12953 | # No thread file set by target-specific clauses in config.gcc, | |
12954 | # so use file chosen by default logic above | |
12955 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12956 | fi |
12957 | ||
8bb915b6 NN |
12958 | # Make gthr-default.h if we have a thread file. |
12959 | gthread_flags= | |
12960 | if test $thread_file != single; then | |
12961 | rm -f gthr-default.h | |
12962 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12963 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12964 | fi | |
12965 | ||
12966 | ||
12967 | # -------- | |
12968 | # UNSORTED | |
12969 | # -------- | |
12970 | ||
18fbf599 | 12971 | use_cxa_atexit=no |
2121a768 JT |
12972 | if test x$enable___cxa_atexit = xyes || \ |
12973 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 | 12974 | if test x$host = x$target; then |
97388150 DS |
12975 | case $host in |
12976 | # mingw32 doesn't have __cxa_atexit but uses atexit registration | |
12977 | # keyed to flag_use_cxa_atexit | |
12978 | *-*-mingw32*) | |
12979 | use_cxa_atexit=yes | |
12980 | ;; | |
12981 | *) | |
a6ccdbab EC |
12982 | { echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 |
12983 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6; } | |
354b7da5 DH |
12984 | if test "${ac_cv_func___cxa_atexit+set}" = set; then |
12985 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12986 | else | |
12987 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12988 | /* confdefs.h. */ |
12989 | _ACEOF | |
12990 | cat confdefs.h >>conftest.$ac_ext | |
12991 | cat >>conftest.$ac_ext <<_ACEOF | |
12992 | /* end confdefs.h. */ | |
86da66b5 HPN |
12993 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12994 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12995 | #define __cxa_atexit innocuous___cxa_atexit | |
12996 | ||
354b7da5 DH |
12997 | /* System header to define __stub macros and hopefully few prototypes, |
12998 | which can conflict with char __cxa_atexit (); below. | |
12999 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
13000 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 13001 | |
354b7da5 DH |
13002 | #ifdef __STDC__ |
13003 | # include <limits.h> | |
13004 | #else | |
13005 | # include <assert.h> | |
13006 | #endif | |
86da66b5 HPN |
13007 | |
13008 | #undef __cxa_atexit | |
13009 | ||
a6ccdbab EC |
13010 | /* Override any GCC internal prototype to avoid an error. |
13011 | Use char because int might match the return type of a GCC | |
13012 | builtin and then its argument prototype would still apply. */ | |
354b7da5 DH |
13013 | #ifdef __cplusplus |
13014 | extern "C" | |
354b7da5 | 13015 | #endif |
354b7da5 DH |
13016 | char __cxa_atexit (); |
13017 | /* The GNU C library defines this for functions which it implements | |
13018 | to always fail with ENOSYS. Some functions are actually named | |
13019 | something starting with __ and the normal name is an alias. */ | |
a6ccdbab | 13020 | #if defined __stub___cxa_atexit || defined __stub_____cxa_atexit |
354b7da5 | 13021 | choke me |
354b7da5 DH |
13022 | #endif |
13023 | ||
13024 | int | |
13025 | main () | |
13026 | { | |
a6ccdbab | 13027 | return __cxa_atexit (); |
354b7da5 DH |
13028 | ; |
13029 | return 0; | |
13030 | } | |
13031 | _ACEOF | |
13032 | rm -f conftest.$ac_objext conftest$ac_exeext | |
a6ccdbab EC |
13033 | if { (ac_try="$ac_link" |
13034 | case "(($ac_try" in | |
13035 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
13036 | *) ac_try_echo=$ac_try;; | |
13037 | esac | |
13038 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
13039 | (eval "$ac_link") 2>conftest.er1 | |
354b7da5 | 13040 | ac_status=$? |
86da66b5 HPN |
13041 | grep -v '^ *+' conftest.er1 >conftest.err |
13042 | rm -f conftest.er1 | |
13043 | cat conftest.err >&5 | |
354b7da5 | 13044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
13045 | (exit $ac_status); } && { |
13046 | test -z "$ac_c_werror_flag" || | |
13047 | test ! -s conftest.err | |
13048 | } && test -s conftest$ac_exeext && | |
13049 | $as_test_x conftest$ac_exeext; then | |
354b7da5 DH |
13050 | ac_cv_func___cxa_atexit=yes |
13051 | else | |
13052 | echo "$as_me: failed program was:" >&5 | |
13053 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13054 | ||
a6ccdbab | 13055 | ac_cv_func___cxa_atexit=no |
354b7da5 | 13056 | fi |
a6ccdbab EC |
13057 | |
13058 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 13059 | conftest$ac_exeext conftest.$ac_ext |
354b7da5 | 13060 | fi |
a6ccdbab EC |
13061 | { echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 |
13062 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6; } | |
354b7da5 | 13063 | if test $ac_cv_func___cxa_atexit = yes; then |
18fbf599 PB |
13064 | use_cxa_atexit=yes |
13065 | else | |
13066 | echo "__cxa_atexit can't be enabled on this target" | |
13067 | fi | |
13068 | ||
5f60e48f | 13069 | ;; |
97388150 | 13070 | esac |
18fbf599 PB |
13071 | else |
13072 | # We can't check for __cxa_atexit when building a cross, so assume | |
13073 | # it is available | |
13074 | use_cxa_atexit=yes | |
13075 | fi | |
13076 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
13077 | |
13078 | cat >>confdefs.h <<\_ACEOF | |
c7b5e395 | 13079 | #define DEFAULT_USE_CXA_ATEXIT 2 |
ba479fd2 | 13080 | _ACEOF |
2121a768 | 13081 | |
18fbf599 | 13082 | fi |
2121a768 JT |
13083 | fi |
13084 | ||
e64f5acf SE |
13085 | use_getipinfo=yes |
13086 | if test x$with_system_libunwind = xyes; then | |
13087 | if test x$host = x$target; then | |
a6ccdbab EC |
13088 | { echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5 |
13089 | echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6; } | |
e64f5acf SE |
13090 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then |
13091 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13092 | else | |
13093 | ac_func_search_save_LIBS=$LIBS | |
e64f5acf SE |
13094 | cat >conftest.$ac_ext <<_ACEOF |
13095 | /* confdefs.h. */ | |
13096 | _ACEOF | |
13097 | cat confdefs.h >>conftest.$ac_ext | |
13098 | cat >>conftest.$ac_ext <<_ACEOF | |
13099 | /* end confdefs.h. */ | |
13100 | ||
a6ccdbab EC |
13101 | /* Override any GCC internal prototype to avoid an error. |
13102 | Use char because int might match the return type of a GCC | |
13103 | builtin and then its argument prototype would still apply. */ | |
e64f5acf SE |
13104 | #ifdef __cplusplus |
13105 | extern "C" | |
13106 | #endif | |
e64f5acf SE |
13107 | char _Unwind_GetIPInfo (); |
13108 | int | |
13109 | main () | |
13110 | { | |
a6ccdbab | 13111 | return _Unwind_GetIPInfo (); |
e64f5acf SE |
13112 | ; |
13113 | return 0; | |
13114 | } | |
13115 | _ACEOF | |
a6ccdbab EC |
13116 | for ac_lib in '' unwind; do |
13117 | if test -z "$ac_lib"; then | |
13118 | ac_res="none required" | |
13119 | else | |
13120 | ac_res=-l$ac_lib | |
13121 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13122 | fi | |
13123 | rm -f conftest.$ac_objext conftest$ac_exeext | |
13124 | if { (ac_try="$ac_link" | |
13125 | case "(($ac_try" in | |
13126 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
13127 | *) ac_try_echo=$ac_try;; | |
13128 | esac | |
13129 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
13130 | (eval "$ac_link") 2>conftest.er1 | |
e64f5acf SE |
13131 | ac_status=$? |
13132 | grep -v '^ *+' conftest.er1 >conftest.err | |
13133 | rm -f conftest.er1 | |
13134 | cat conftest.err >&5 | |
13135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a6ccdbab EC |
13136 | (exit $ac_status); } && { |
13137 | test -z "$ac_c_werror_flag" || | |
13138 | test ! -s conftest.err | |
13139 | } && test -s conftest$ac_exeext && | |
13140 | $as_test_x conftest$ac_exeext; then | |
13141 | ac_cv_search__Unwind_GetIPInfo=$ac_res | |
e64f5acf SE |
13142 | else |
13143 | echo "$as_me: failed program was:" >&5 | |
13144 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13145 | ||
a6ccdbab | 13146 | |
b8ec3cc8 | 13147 | fi |
e64f5acf | 13148 | |
a6ccdbab EC |
13149 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
13150 | conftest$ac_exeext | |
13151 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then | |
13152 | break | |
13153 | fi | |
13154 | done | |
13155 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then | |
13156 | : | |
13157 | else | |
13158 | ac_cv_search__Unwind_GetIPInfo=no | |
13159 | fi | |
13160 | rm conftest.$ac_ext | |
13161 | LIBS=$ac_func_search_save_LIBS | |
13162 | fi | |
13163 | { echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5 | |
13164 | echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6; } | |
13165 | ac_res=$ac_cv_search__Unwind_GetIPInfo | |
13166 | if test "$ac_res" != no; then | |
13167 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13168 | ||
13169 | else | |
13170 | use_getipinfo=no | |
13171 | fi | |
13172 | ||
13173 | fi | |
13174 | fi | |
13175 | ||
13176 | if test x$use_getipinfo = xyes; then | |
13177 | ||
13178 | cat >>confdefs.h <<\_ACEOF | |
13179 | #define HAVE_GETIPINFO 1 | |
e64f5acf SE |
13180 | _ACEOF |
13181 | ||
13182 | else | |
13183 | echo "The system unwind library does not support _Unwind_GetIPInfo." | |
13184 | fi | |
13185 | ||
a5381466 | 13186 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
13187 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
13188 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
13189 | |
13190 | ||
13191 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 13192 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 13193 | _ACEOF |
a5381466 ZW |
13194 | |
13195 | fi | |
13196 | ||
75685792 RS |
13197 | # Convert extra_options into a form suitable for Makefile use. |
13198 | extra_opt_files= | |
13199 | for f in $extra_options; do | |
13200 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
13201 | done | |
13202 | ||
13203 | ||
b7cb92ad | 13204 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 13205 | # the first file included by config.h. |
4977bab6 | 13206 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 13207 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 13208 | # work to find out the build config parameters. |
75bffa71 | 13209 | if test x$host = x$build |
db81d74a | 13210 | then |
eaf4e618 | 13211 | build_auto=auto-host.h |
b7cb92ad JL |
13212 | else |
13213 | # We create a subdir, then run autoconf in the subdir. | |
13214 | # To prevent recursion we set host and build for the new | |
13215 | # invocation of configure to the build for this invocation | |
ba479fd2 | 13216 | # of configure. |
b7cb92ad JL |
13217 | tempdir=build.$$ |
13218 | rm -rf $tempdir | |
13219 | mkdir $tempdir | |
13220 | cd $tempdir | |
13221 | case ${srcdir} in | |
255b8a49 | 13222 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
13223 | *) realsrcdir=../${srcdir};; |
13224 | esac | |
d920e825 L |
13225 | saved_CFLAGS="${CFLAGS}" |
13226 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
13227 | ${realsrcdir}/configure \ | |
33e70558 | 13228 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 13229 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 13230 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
13231 | |
13232 | # We just finished tests for the build machine, so rename | |
13233 | # the file auto-build.h in the gcc directory. | |
13234 | mv auto-host.h ../auto-build.h | |
13235 | cd .. | |
13236 | rm -rf $tempdir | |
eaf4e618 | 13237 | build_auto=auto-build.h |
db81d74a RH |
13238 | fi |
13239 | ||
06f0b04c | 13240 | |
eaf4e618 | 13241 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
13242 | tm_p_file="${tm_p_file} tm-preds.h" |
13243 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
13244 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 13245 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 13246 | # put this back in temporarily. |
232b67d9 | 13247 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 13248 | |
34a86c2b NN |
13249 | # -------- |
13250 | # UNSORTED | |
13251 | # -------- | |
13252 | ||
cc1e60ea | 13253 | # Compile in configure arguments. |
8105825d | 13254 | if test -f configargs.h ; then |
cc1e60ea | 13255 | # Being re-configured. |
022dae81 | 13256 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
13257 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
13258 | else | |
13259 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
13260 | fi | |
eeae7b41 DJ |
13261 | |
13262 | # Double all backslashes and backslash all quotes to turn | |
13263 | # gcc_config_arguments into a C string. | |
13264 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
13265 | $gcc_config_arguments | |
13266 | EOF | |
13267 | gcc_config_arguments_str=`cat conftest.out` | |
13268 | rm -f conftest.out | |
13269 | ||
cc1e60ea JM |
13270 | cat > configargs.h <<EOF |
13271 | /* Generated automatically. */ | |
eeae7b41 | 13272 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 13273 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
13274 | |
13275 | static const struct { | |
13276 | const char *name, *value; | |
13277 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
13278 | EOF |
13279 | ||
ab87f8c8 | 13280 | # Internationalization |
18fc9bd4 RG |
13281 | # If we haven't got the data from the intl directory, |
13282 | # assume NLS is disabled. | |
13283 | USE_NLS=no | |
13284 | LIBINTL= | |
13285 | LIBINTL_DEP= | |
13286 | INCINTL= | |
13287 | XGETTEXT= | |
13288 | GMSGFMT= | |
13289 | POSUB= | |
13290 | ||
13291 | if test -f ../intl/config.intl; then | |
13292 | . ../intl/config.intl | |
13293 | fi | |
a6ccdbab EC |
13294 | { echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
13295 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; } | |
18fc9bd4 | 13296 | if test x"$USE_NLS" != xyes; then |
a6ccdbab EC |
13297 | { echo "$as_me:$LINENO: result: no" >&5 |
13298 | echo "${ECHO_T}no" >&6; } | |
18fc9bd4 | 13299 | else |
a6ccdbab EC |
13300 | { echo "$as_me:$LINENO: result: yes" >&5 |
13301 | echo "${ECHO_T}yes" >&6; } | |
18fc9bd4 RG |
13302 | |
13303 | cat >>confdefs.h <<\_ACEOF | |
13304 | #define ENABLE_NLS 1 | |
13305 | _ACEOF | |
13306 | ||
13307 | ||
a6ccdbab EC |
13308 | { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
13309 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } | |
18fc9bd4 RG |
13310 | # Look for .po and .gmo files in the source directory. |
13311 | CATALOGS= | |
13312 | XLINGUAS= | |
13313 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
13314 | # If there aren't any .gmo files the shell will give us the | |
13315 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
13316 | # weeded out. | |
13317 | case "$cat" in *\**) | |
13318 | continue;; | |
13319 | esac | |
13320 | # The quadruple backslash is collapsed to a double backslash | |
13321 | # by the backticks, then collapsed again by the double quotes, | |
13322 | # leaving us with one backslash in the sed expression (right | |
13323 | # before the dot that mustn't act as a wildcard). | |
13324 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
13325 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
13326 | # The user is allowed to set LINGUAS to a list of languages to | |
13327 | # install catalogs for. If it's empty that means "all of them." | |
13328 | if test "x$LINGUAS" = x; then | |
13329 | CATALOGS="$CATALOGS $cat" | |
13330 | XLINGUAS="$XLINGUAS $lang" | |
13331 | else | |
13332 | case "$LINGUAS" in *$lang*) | |
13333 | CATALOGS="$CATALOGS $cat" | |
13334 | XLINGUAS="$XLINGUAS $lang" | |
13335 | ;; | |
13336 | esac | |
13337 | fi | |
13338 | done | |
13339 | LINGUAS="$XLINGUAS" | |
a6ccdbab EC |
13340 | { echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
13341 | echo "${ECHO_T}$LINGUAS" >&6; } | |
18fc9bd4 RG |
13342 | |
13343 | ||
13344 | DATADIRNAME=share | |
13345 | ||
13346 | INSTOBJEXT=.mo | |
13347 | ||
13348 | GENCAT=gencat | |
13349 | ||
13350 | CATOBJEXT=.gmo | |
13351 | ||
13352 | fi | |
861bb6c1 | 13353 | |
56694dd9 ZW |
13354 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
13355 | # -liconv on the link line twice. | |
13356 | case "$LIBINTL" in *$LIBICONV*) | |
13357 | LIBICONV= ;; | |
13358 | esac | |
dc6746e7 | 13359 | |
a6ccdbab | 13360 | # Check whether --enable-secureplt was given. |
7f970b70 | 13361 | if test "${enable_secureplt+set}" = set; then |
a6ccdbab EC |
13362 | enableval=$enable_secureplt; |
13363 | fi | |
7f970b70 | 13364 | |
7f970b70 | 13365 | |
56694dd9 | 13366 | # Windows32 Registry support for specifying GCC installation paths. |
a6ccdbab | 13367 | # Check whether --enable-win32-registry was given. |
56694dd9 | 13368 | if test "${enable_win32_registry+set}" = set; then |
a6ccdbab EC |
13369 | enableval=$enable_win32_registry; |
13370 | fi | |
dc6746e7 | 13371 | |
ba479fd2 | 13372 | |
a1286ef5 ZW |
13373 | case $host_os in |
13374 | win32 | pe | cygwin* | mingw32* | uwin*) | |
13375 | if test "x$enable_win32_registry" != xno; then | |
a6ccdbab EC |
13376 | { echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 |
13377 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6; } | |
ba479fd2 NN |
13378 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then |
13379 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13380 | else | |
13381 | ac_func_search_save_LIBS=$LIBS | |
ba479fd2 | 13382 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
13383 | /* confdefs.h. */ |
13384 | _ACEOF | |
13385 | cat confdefs.h >>conftest.$ac_ext | |
13386 | cat >>conftest.$ac_ext <<_ACEOF | |
13387 | /* end confdefs.h. */ | |
861bb6c1 | 13388 | |
a6ccdbab EC |
13389 | /* Override any GCC internal prototype to avoid an error. |
13390 | Use char because int might match the return type of a GCC | |
13391 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
13392 | #ifdef __cplusplus |
13393 | extern "C" | |
13394 | #endif | |
ba479fd2 NN |
13395 | char RegOpenKeyExA (); |
13396 | int | |
13397 | main () | |
13398 | { | |
a6ccdbab | 13399 | return RegOpenKeyExA (); |
ba479fd2 NN |
13400 | ; |
13401 | return 0; | |
13402 | } | |
13403 | _ACEOF | |
a6ccdbab EC |
13404 | for ac_lib in '' advapi32; do |
13405 | if test -z "$ac_lib"; then | |
13406 | ac_res="none required" | |
13407 | else | |
13408 | ac_res=-l$ac_lib | |
13409 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13410 | fi | |
13411 | rm -f conftest.$ac_objext conftest$ac_exeext | |
13412 | if { (ac_try="$ac_link" | |
13413 | case "(($ac_try" in | |
13414 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
13415 | *) ac_try_echo=$ac_try;; | |
13416 | esac | |
13417 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
13418 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 13419 | ac_status=$? |
86da66b5 HPN |
13420 | grep -v '^ *+' conftest.er1 >conftest.err |
13421 | rm -f conftest.er1 | |
13422 | cat conftest.err >&5 | |
ba479fd2 | 13423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a6ccdbab EC |
13424 | (exit $ac_status); } && { |
13425 | test -z "$ac_c_werror_flag" || | |
13426 | test ! -s conftest.err | |
13427 | } && test -s conftest$ac_exeext && | |
13428 | $as_test_x conftest$ac_exeext; then | |
13429 | ac_cv_search_RegOpenKeyExA=$ac_res | |
ab87f8c8 | 13430 | else |
ba479fd2 NN |
13431 | echo "$as_me: failed program was:" >&5 |
13432 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13433 | ||
cafe096b | 13434 | |
a6ccdbab | 13435 | fi |
dd7f7a6e | 13436 | |
a6ccdbab EC |
13437 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
13438 | conftest$ac_exeext | |
13439 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
13440 | break | |
dd7f7a6e | 13441 | fi |
a6ccdbab EC |
13442 | done |
13443 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
13444 | : | |
13445 | else | |
13446 | ac_cv_search_RegOpenKeyExA=no | |
dd7f7a6e | 13447 | fi |
a6ccdbab | 13448 | rm conftest.$ac_ext |
dd7f7a6e EC |
13449 | LIBS=$ac_func_search_save_LIBS |
13450 | fi | |
a6ccdbab EC |
13451 | { echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 |
13452 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6; } | |
13453 | ac_res=$ac_cv_search_RegOpenKeyExA | |
13454 | if test "$ac_res" != no; then | |
13455 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
13456 | |
13457 | else | |
13458 | enable_win32_registry=no | |
13459 | fi | |
13460 | ||
13461 | fi | |
13462 | ||
13463 | if test "x$enable_win32_registry" != xno; then | |
13464 | ||
13465 | cat >>confdefs.h <<\_ACEOF | |
13466 | #define ENABLE_WIN32_REGISTRY 1 | |
13467 | _ACEOF | |
13468 | ||
13469 | ||
13470 | if test "x$enable_win32_registry" != xyes \ | |
13471 | && test "x$enable_win32_registry" != x; then | |
13472 | ||
13473 | cat >>confdefs.h <<_ACEOF | |
13474 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" | |
13475 | _ACEOF | |
13476 | ||
13477 | fi | |
13478 | fi | |
13479 | ;; | |
13480 | esac | |
ab87f8c8 | 13481 | |
56694dd9 ZW |
13482 | # Get an absolute path to the GCC top-level source directory |
13483 | holddir=`${PWDCMD-pwd}` | |
13484 | cd $srcdir | |
13485 | topdir=`${PWDCMD-pwd}` | |
13486 | cd $holddir | |
ab87f8c8 | 13487 | |
56694dd9 | 13488 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 13489 | xmake_file= |
c406e779 | 13490 | for f in ${host_xmake_file} |
56694dd9 ZW |
13491 | do |
13492 | if test -f ${srcdir}/config/$f | |
13493 | then | |
2ed26f6b | 13494 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
13495 | fi |
13496 | done | |
093e61a6 | 13497 | |
56694dd9 | 13498 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 13499 | tmake_file_= |
c406e779 | 13500 | for f in ${tmake_file} |
56694dd9 ZW |
13501 | do |
13502 | if test -f ${srcdir}/config/$f | |
13503 | then | |
2ed26f6b | 13504 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
13505 | fi |
13506 | done | |
2ed26f6b | 13507 | tmake_file="${tmake_file_}" |
71a94577 | 13508 | |
ab87f8c8 JL |
13509 | # If the host doesn't support symlinks, modify CC in |
13510 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
13511 | # Otherwise, we can use "CC=$(CC)". | |
13512 | rm -f symtest.tem | |
35f06ae4 PB |
13513 | case "$LN_S" in |
13514 | *-s*) | |
13515 | cc_set_by_configure="\$(CC)" | |
13516 | quoted_cc_set_by_configure="\$(CC)" | |
13517 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
13518 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
13519 | ;; | |
13520 | *) | |
13521 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
13522 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
13523 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
13524 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
13525 | ;; | |
13526 | esac | |
ab87f8c8 | 13527 | |
5395b47b NN |
13528 | # This is a terrible hack which will go away some day. |
13529 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
13530 | |
13531 | ||
ab87f8c8 JL |
13532 | out_object_file=`basename $out_file .c`.o |
13533 | ||
75685792 RS |
13534 | tm_file_list="options.h" |
13535 | tm_include_list="options.h" | |
ab87f8c8 | 13536 | for f in $tm_file; do |
64ccbc99 | 13537 | case $f in |
d02af173 | 13538 | defaults.h ) |
e22340b0 ZW |
13539 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
13540 | tm_include_list="${tm_include_list} $f" | |
13541 | ;; | |
13542 | * ) | |
13543 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
13544 | tm_include_list="${tm_include_list} config/$f" | |
13545 | ;; | |
64ccbc99 | 13546 | esac |
ab87f8c8 JL |
13547 | done |
13548 | ||
11642c3a | 13549 | tm_p_file_list= |
e22340b0 | 13550 | tm_p_include_list= |
11642c3a | 13551 | for f in $tm_p_file; do |
4977bab6 ZW |
13552 | case $f in |
13553 | tm-preds.h ) | |
e22340b0 ZW |
13554 | tm_p_file_list="${tm_p_file_list} $f" |
13555 | tm_p_include_list="${tm_p_include_list} $f" | |
13556 | ;; | |
13557 | * ) | |
13558 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
13559 | tm_p_include_list="${tm_p_include_list} config/$f" | |
13560 | esac | |
13561 | done | |
13562 | ||
13563 | xm_file_list= | |
13564 | xm_include_list= | |
13565 | for f in $xm_file; do | |
13566 | case $f in | |
13567 | ansidecl.h ) | |
13568 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
13569 | xm_include_list="${xm_include_list} $f" | |
13570 | ;; | |
13571 | auto-host.h ) | |
13572 | xm_file_list="${xm_file_list} $f" | |
13573 | xm_include_list="${xm_include_list} $f" | |
13574 | ;; | |
13575 | * ) | |
13576 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
13577 | xm_include_list="${xm_include_list} config/$f" | |
13578 | ;; | |
4977bab6 | 13579 | esac |
11642c3a ZW |
13580 | done |
13581 | ||
ab87f8c8 | 13582 | host_xm_file_list= |
e22340b0 | 13583 | host_xm_include_list= |
ab87f8c8 | 13584 | for f in $host_xm_file; do |
64ccbc99 | 13585 | case $f in |
d02af173 | 13586 | ansidecl.h ) |
e22340b0 ZW |
13587 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
13588 | host_xm_include_list="${host_xm_include_list} $f" | |
13589 | ;; | |
e2500fed | 13590 | auto-host.h ) |
e22340b0 ZW |
13591 | host_xm_file_list="${host_xm_file_list} $f" |
13592 | host_xm_include_list="${host_xm_include_list} $f" | |
13593 | ;; | |
13594 | * ) | |
13595 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
13596 | host_xm_include_list="${host_xm_include_list} config/$f" | |
13597 | ;; | |
64ccbc99 | 13598 | esac |
ab87f8c8 JL |
13599 | done |
13600 | ||
13601 | build_xm_file_list= | |
13602 | for f in $build_xm_file; do | |
64ccbc99 | 13603 | case $f in |
d02af173 | 13604 | ansidecl.h ) |
e22340b0 ZW |
13605 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
13606 | build_xm_include_list="${build_xm_include_list} $f" | |
13607 | ;; | |
e2500fed | 13608 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
13609 | build_xm_file_list="${build_xm_file_list} $f" |
13610 | build_xm_include_list="${build_xm_include_list} $f" | |
13611 | ;; | |
13612 | * ) | |
13613 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
13614 | build_xm_include_list="${build_xm_include_list} config/$f" | |
13615 | ;; | |
64ccbc99 | 13616 | esac |
ab87f8c8 JL |
13617 | done |
13618 | ||
2989d30c GK |
13619 | # Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a |
13620 | # cross-compiler which does not use the native headers and libraries. | |
a078a589 | 13621 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. |
ba479fd2 NN |
13622 | CROSS= |
13623 | ALL=all.internal | |
13624 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
13625 | |
13626 | if test "x$with_build_sysroot" != x; then | |
13627 | build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)' | |
13628 | else | |
13629 | # This value is used, even on a native system, because | |
13630 | # CROSS_SYSTEM_HEADER_DIR is just | |
13631 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
13632 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
13633 | fi | |
13634 | ||
ab87f8c8 JL |
13635 | if test x$host != x$target |
13636 | then | |
2989d30c | 13637 | CROSS="-DCROSS_DIRECTORY_STRUCTURE" |
a078a589 | 13638 | ALL=all.cross |
160633c6 | 13639 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 13640 | case "$host","$target" in |
3a7e8b87 GK |
13641 | # Darwin crosses can use the host system's libraries and headers, |
13642 | # because of the fat library support. Of course, it must be the | |
13643 | # same version of Darwin on both sides. Allow the user to | |
13644 | # just say --target=foo-darwin without a version number to mean | |
13645 | # "the version on this system". | |
13646 | *-*-darwin*,*-*-darwin*) | |
13647 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
13648 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
13649 | if test $hostos = $targetos -o $targetos = darwin ; then | |
13650 | CROSS= | |
13651 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
13652 | with_headers=yes | |
13653 | fi | |
13654 | ;; | |
13655 | ||
343f59d9 AM |
13656 | i?86-*-*,x86_64-*-* \ |
13657 | | powerpc*-*-*,powerpc64*-*-*) | |
13658 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
13659 | esac | |
7a615b25 | 13660 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 13661 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
13662 | fi |
13663 | ||
b39d221a EC |
13664 | # If this is a cross-compiler that does not |
13665 | # have its own set of headers then define | |
13666 | # inhibit_libc | |
13667 | ||
dc06db20 R |
13668 | # If this is using newlib, without having the headers available now, |
13669 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
13670 | # This prevents libgcc2 from containing any code which requires libc |
13671 | # support. | |
160633c6 | 13672 | inhibit_libc=false |
dc06db20 R |
13673 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
13674 | test x$with_newlib = xyes ; } && | |
e50084fa | 13675 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 13676 | inhibit_libc=true |
b39d221a EC |
13677 | fi |
13678 | ||
13679 | ||
a078a589 ZW |
13680 | # When building gcc with a cross-compiler, we need to adjust things so |
13681 | # that the generator programs are still built with the native compiler. | |
13682 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
13683 | |
13684 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
13685 | CC_FOR_BUILD='$(CC)' |
13686 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 13687 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
13688 | |
13689 | # Possibly disable fixproto, on a per-target basis. | |
13690 | case ${use_fixproto} in | |
13691 | no) | |
13692 | STMP_FIXPROTO= | |
13693 | ;; | |
13694 | yes) | |
13695 | STMP_FIXPROTO=stmp-fixproto | |
13696 | ;; | |
13697 | esac | |
13698 | ||
a078a589 | 13699 | |
83599948 NS |
13700 | # And these apply if build != host, or we are generating coverage data |
13701 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 13702 | then |
b11e4747 | 13703 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 13704 | |
7a615b25 | 13705 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 13706 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
13707 | STMP_FIXPROTO=stmp-install-fixproto |
13708 | fi | |
7a615b25 | 13709 | fi |
ab87f8c8 JL |
13710 | fi |
13711 | ||
13712 | # Expand extra_headers to include complete path. | |
13713 | # This substitutes for lots of t-* files. | |
13714 | extra_headers_list= | |
b1ef58c8 NN |
13715 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
13716 | for file in ${extra_headers} ; do | |
13717 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
13718 | done | |
ab87f8c8 | 13719 | |
c38f02df ILT |
13720 | # Define collect2 in Makefile. |
13721 | case $host_can_use_collect2 in | |
13722 | no) collect2= ;; | |
13723 | *) collect2='collect2$(exeext)' ;; | |
13724 | esac | |
13725 | ||
13726 | ||
ab87f8c8 | 13727 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
13728 | case $use_collect2 in |
13729 | no) use_collect2= ;; | |
13730 | "") ;; | |
ba479fd2 | 13731 | *) |
34a86c2b NN |
13732 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
13733 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
13734 | case $host_can_use_collect2 in |
13735 | no) | |
13736 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
13737 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
13738 | { (exit 1); exit 1; }; } | |
13739 | ;; | |
13740 | esac | |
34a86c2b NN |
13741 | ;; |
13742 | esac | |
ab87f8c8 | 13743 | |
8bb915b6 NN |
13744 | # --------------------------- |
13745 | # Assembler & linker features | |
13746 | # --------------------------- | |
13747 | ||
d869a8c4 NN |
13748 | # Identify the assembler which will work hand-in-glove with the newly |
13749 | # built GCC, so that we can examine its features. This is the assembler | |
13750 | # which will be driven by the driver program. | |
13751 | # | |
13752 | # If build != host, and we aren't building gas in-tree, we identify a | |
13753 | # build->target assembler and hope that it will have the same features | |
13754 | # as the host->target assembler we'll be using. | |
981d4858 JM |
13755 | gcc_cv_gas_major_version= |
13756 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 13757 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
e8b05380 PB |
13758 | |
13759 | if test "${gcc_cv_as+set}" = set; then | |
13760 | : | |
13761 | else | |
13762 | ||
ab87f8c8 JL |
13763 | if test -x "$DEFAULT_ASSEMBLER"; then |
13764 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 13765 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
13766 | && test -f ../gas/Makefile \ |
13767 | && test x$build = x$host; then | |
e8b05380 PB |
13768 | gcc_cv_as=../gas/as-new$build_exeext |
13769 | elif test -x as$build_exeext; then | |
13770 | # Build using assembler in the current directory. | |
13771 | gcc_cv_as=./as$build_exeext | |
13772 | elif test -x $AS_FOR_TARGET; then | |
13773 | gcc_cv_as="$AS_FOR_TARGET" | |
13774 | else | |
13775 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
13776 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
a6ccdbab EC |
13777 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13778 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 PB |
13779 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then |
13780 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13781 | else | |
13782 | case $gcc_cv_as in | |
13783 | [\\/]* | ?:[\\/]*) | |
13784 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13785 | ;; | |
13786 | *) | |
13787 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13788 | for as_dir in $PATH | |
13789 | do | |
13790 | IFS=$as_save_IFS | |
13791 | test -z "$as_dir" && as_dir=. | |
13792 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 13793 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 PB |
13794 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" |
13795 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13796 | break 2 | |
13797 | fi | |
13798 | done | |
13799 | done | |
a6ccdbab | 13800 | IFS=$as_save_IFS |
e8b05380 PB |
13801 | |
13802 | ;; | |
13803 | esac | |
13804 | fi | |
13805 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
e8b05380 | 13806 | if test -n "$gcc_cv_as"; then |
a6ccdbab EC |
13807 | { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13808 | echo "${ECHO_T}$gcc_cv_as" >&6; } | |
e8b05380 | 13809 | else |
a6ccdbab EC |
13810 | { echo "$as_me:$LINENO: result: no" >&5 |
13811 | echo "${ECHO_T}no" >&6; } | |
e8b05380 PB |
13812 | fi |
13813 | ||
a6ccdbab | 13814 | |
e8b05380 PB |
13815 | fi |
13816 | fi | |
13817 | ||
13818 | ||
13819 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as | |
13820 | ||
13821 | ||
a6ccdbab EC |
13822 | { echo "$as_me:$LINENO: checking what assembler to use" >&5 |
13823 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6; } | |
e8b05380 | 13824 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then |
08d105fa AO |
13825 | # Single tree build which includes gas. We want to prefer it |
13826 | # over whatever linker top-level may have detected, since | |
13827 | # we'll use what we're building after installation anyway. | |
a6ccdbab EC |
13828 | { echo "$as_me:$LINENO: result: newly built gas" >&5 |
13829 | echo "${ECHO_T}newly built gas" >&6; } | |
ad9c4d9f NN |
13830 | in_tree_gas=yes |
13831 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13832 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
13833 | $gcc_cv_as_gas_srcdir/configure \ | |
13834 | $gcc_cv_as_gas_srcdir/configure.in \ | |
13835 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 13836 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
13837 | if test x$gcc_cv_gas_version != x; then |
13838 | break | |
13839 | fi | |
13840 | done | |
13841 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
13842 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13843 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
13844 | case $gcc_cv_gas_patch_version in |
13845 | "") gcc_cv_gas_patch_version="0" ;; | |
13846 | esac | |
8ada417f ZW |
13847 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
13848 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
13849 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 13850 | |
5408ac6c HPN |
13851 | in_tree_gas_is_elf=no |
13852 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
13853 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
13854 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
13855 | then | |
13856 | in_tree_gas_is_elf=yes | |
13857 | fi | |
e8b05380 | 13858 | else |
a6ccdbab EC |
13859 | { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13860 | echo "${ECHO_T}$gcc_cv_as" >&6; } | |
e8b05380 | 13861 | in_tree_gas=no |
981d4858 | 13862 | fi |
9e423e6d | 13863 | |
e8b05380 PB |
13864 | # Identify the linker which will work hand-in-glove with the newly |
13865 | # built GCC, so that we can examine its features. This is the linker | |
13866 | # which will be driven by the driver program. | |
9f18db39 | 13867 | # |
e8b05380 PB |
13868 | # If build != host, and we aren't building gas in-tree, we identify a |
13869 | # build->target linker and hope that it will have the same features | |
13870 | # as the host->target linker we'll be using. | |
13871 | gcc_cv_gld_major_version= | |
13872 | gcc_cv_gld_minor_version= | |
13873 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13874 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9f18db39 | 13875 | |
e8b05380 PB |
13876 | if test "${gcc_cv_ld+set}" = set; then |
13877 | : | |
9f18db39 | 13878 | else |
9f18db39 | 13879 | |
e8b05380 PB |
13880 | if test -x "$DEFAULT_LINKER"; then |
13881 | gcc_cv_ld="$DEFAULT_LINKER" | |
13882 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
13883 | && test -f ../ld/Makefile \ | |
13884 | && test x$build = x$host; then | |
13885 | gcc_cv_ld=../ld/ld-new$build_exeext | |
13886 | elif test -x collect-ld$build_exeext; then | |
13887 | # Build using linker in the current directory. | |
13888 | gcc_cv_ld=./collect-ld$build_exeext | |
13889 | elif test -x $LD_FOR_TARGET; then | |
13890 | gcc_cv_ld="$LD_FOR_TARGET" | |
13891 | else | |
13892 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
13893 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
a6ccdbab EC |
13894 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13895 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 | 13896 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then |
d739199a DJ |
13897 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13898 | else | |
e8b05380 | 13899 | case $gcc_cv_ld in |
d739199a | 13900 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13901 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
13902 | ;; |
13903 | *) | |
13904 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13905 | for as_dir in $PATH | |
13906 | do | |
13907 | IFS=$as_save_IFS | |
13908 | test -z "$as_dir" && as_dir=. | |
13909 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 13910 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 | 13911 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13912 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13913 | break 2 | |
13914 | fi | |
13915 | done | |
13916 | done | |
a6ccdbab | 13917 | IFS=$as_save_IFS |
d739199a DJ |
13918 | |
13919 | ;; | |
13920 | esac | |
13921 | fi | |
e8b05380 | 13922 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
e8b05380 | 13923 | if test -n "$gcc_cv_ld"; then |
a6ccdbab EC |
13924 | { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13925 | echo "${ECHO_T}$gcc_cv_ld" >&6; } | |
d739199a | 13926 | else |
a6ccdbab EC |
13927 | { echo "$as_me:$LINENO: result: no" >&5 |
13928 | echo "${ECHO_T}no" >&6; } | |
d739199a DJ |
13929 | fi |
13930 | ||
a6ccdbab | 13931 | |
d739199a | 13932 | fi |
e8b05380 PB |
13933 | fi |
13934 | ||
13935 | ||
13936 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld | |
13937 | ||
13938 | ||
a6ccdbab EC |
13939 | { echo "$as_me:$LINENO: checking what linker to use" >&5 |
13940 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6; } | |
e8b05380 PB |
13941 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then |
13942 | # Single tree build which includes ld. We want to prefer it | |
13943 | # over whatever linker top-level may have detected, since | |
13944 | # we'll use what we're building after installation anyway. | |
a6ccdbab EC |
13945 | { echo "$as_me:$LINENO: result: newly built ld" >&5 |
13946 | echo "${ECHO_T}newly built ld" >&6; } | |
e8b05380 PB |
13947 | in_tree_ld=yes |
13948 | in_tree_ld_is_elf=no | |
13949 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
13950 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
13951 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
13952 | in_tree_ld_is_elf=yes | |
13953 | fi | |
13954 | 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 | |
13955 | do | |
13956 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
13957 | if test x$gcc_cv_gld_version != x; then | |
13958 | break | |
13959 | fi | |
13960 | done | |
13961 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13962 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13963 | else | |
a6ccdbab EC |
13964 | { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13965 | echo "${ECHO_T}$gcc_cv_ld" >&6; } | |
e8b05380 PB |
13966 | in_tree_ld=no |
13967 | fi | |
13968 | ||
13969 | # Figure out what nm we will be using. | |
13970 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
13971 | if test "${gcc_cv_nm+set}" = set; then | |
13972 | : | |
13973 | else | |
13974 | ||
13975 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13976 | && test -f ../binutils/Makefile \ |
13977 | && test x$build = x$host; then | |
e8b05380 PB |
13978 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13979 | elif test -x nm$build_exeext; then | |
13980 | gcc_cv_nm=./nm$build_exeext | |
13981 | elif test -x $NM_FOR_TARGET; then | |
13982 | gcc_cv_nm="$NM_FOR_TARGET" | |
13983 | else | |
13984 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13985 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
a6ccdbab EC |
13986 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13987 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 | 13988 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then |
d739199a DJ |
13989 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13990 | else | |
e8b05380 | 13991 | case $gcc_cv_nm in |
d739199a | 13992 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13993 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
13994 | ;; |
13995 | *) | |
13996 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13997 | for as_dir in $PATH | |
13998 | do | |
13999 | IFS=$as_save_IFS | |
14000 | test -z "$as_dir" && as_dir=. | |
14001 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 14002 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 | 14003 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
14004 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
14005 | break 2 | |
14006 | fi | |
14007 | done | |
14008 | done | |
a6ccdbab | 14009 | IFS=$as_save_IFS |
d739199a DJ |
14010 | |
14011 | ;; | |
14012 | esac | |
14013 | fi | |
e8b05380 | 14014 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
e8b05380 | 14015 | if test -n "$gcc_cv_nm"; then |
a6ccdbab EC |
14016 | { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 |
14017 | echo "${ECHO_T}$gcc_cv_nm" >&6; } | |
d739199a | 14018 | else |
a6ccdbab EC |
14019 | { echo "$as_me:$LINENO: result: no" >&5 |
14020 | echo "${ECHO_T}no" >&6; } | |
d739199a DJ |
14021 | fi |
14022 | ||
a6ccdbab | 14023 | |
d739199a | 14024 | fi |
e8b05380 | 14025 | fi |
d739199a | 14026 | |
e8b05380 | 14027 | |
a6ccdbab EC |
14028 | { echo "$as_me:$LINENO: checking what nm to use" >&5 |
14029 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6; } | |
e8b05380 PB |
14030 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then |
14031 | # Single tree build which includes binutils. | |
a6ccdbab EC |
14032 | { echo "$as_me:$LINENO: result: newly built nm" >&5 |
14033 | echo "${ECHO_T}newly built nm" >&6; } | |
e8b05380 PB |
14034 | in_tree_nm=yes |
14035 | else | |
a6ccdbab EC |
14036 | { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 |
14037 | echo "${ECHO_T}$gcc_cv_nm" >&6; } | |
e8b05380 PB |
14038 | in_tree_nm=no |
14039 | fi | |
14040 | ||
14041 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
14042 | ||
14043 | ||
14044 | # Figure out what objdump we will be using. | |
14045 | if test "${gcc_cv_objdump+set}" = set; then | |
14046 | : | |
14047 | else | |
14048 | ||
14049 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
14050 | && test -f ../binutils/Makefile \ |
14051 | && test x$build = x$host; then | |
e8b05380 PB |
14052 | # Single tree build which includes binutils. |
14053 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
14054 | elif test -x objdump$build_exeext; then | |
14055 | gcc_cv_objdump=./objdump$build_exeext | |
14056 | elif test -x $OBJDUMP_FOR_TARGET; then | |
14057 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
14058 | else | |
14059 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
14060 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
a6ccdbab EC |
14061 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
14062 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 | 14063 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then |
9f18db39 PB |
14064 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
14065 | else | |
e8b05380 | 14066 | case $gcc_cv_objdump in |
9f18db39 | 14067 | [\\/]* | ?:[\\/]*) |
e8b05380 | 14068 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
14069 | ;; |
14070 | *) | |
14071 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 14072 | for as_dir in $PATH |
9f18db39 PB |
14073 | do |
14074 | IFS=$as_save_IFS | |
14075 | test -z "$as_dir" && as_dir=. | |
14076 | for ac_exec_ext in '' $ac_executable_extensions; do | |
a6ccdbab | 14077 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 | 14078 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
9f18db39 PB |
14079 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
14080 | break 2 | |
14081 | fi | |
14082 | done | |
14083 | done | |
a6ccdbab | 14084 | IFS=$as_save_IFS |
779243f7 | 14085 | |
9f18db39 PB |
14086 | ;; |
14087 | esac | |
14088 | fi | |
e8b05380 | 14089 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
e8b05380 | 14090 | if test -n "$gcc_cv_objdump"; then |
a6ccdbab EC |
14091 | { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 |
14092 | echo "${ECHO_T}$gcc_cv_objdump" >&6; } | |
9f18db39 | 14093 | else |
a6ccdbab EC |
14094 | { echo "$as_me:$LINENO: result: no" >&5 |
14095 | echo "${ECHO_T}no" >&6; } | |
9f18db39 PB |
14096 | fi |
14097 | ||
a6ccdbab | 14098 | |
e8b05380 PB |
14099 | fi |
14100 | fi | |
9f18db39 | 14101 | |
e8b05380 | 14102 | |
a6ccdbab EC |
14103 | { echo "$as_me:$LINENO: checking what objdump to use" >&5 |
14104 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6; } | |
e8b05380 PB |
14105 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then |
14106 | # Single tree build which includes binutils. | |
a6ccdbab EC |
14107 | { echo "$as_me:$LINENO: result: newly built objdump" >&5 |
14108 | echo "${ECHO_T}newly built objdump" >&6; } | |
e8b05380 | 14109 | elif test x$gcc_cv_objdump = x; then |
a6ccdbab EC |
14110 | { echo "$as_me:$LINENO: result: not found" >&5 |
14111 | echo "${ECHO_T}not found" >&6; } | |
e8b05380 | 14112 | else |
a6ccdbab EC |
14113 | { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 |
14114 | echo "${ECHO_T}$gcc_cv_objdump" >&6; } | |
a2eafc76 | 14115 | fi |
3cae5780 | 14116 | |
981d4858 | 14117 | # Figure out what assembler alignment features are present. |
a6ccdbab EC |
14118 | { echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
14119 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6; } | |
ba479fd2 NN |
14120 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then |
14121 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14122 | else |
14123 | gcc_cv_as_balign_and_p2align=no | |
14124 | if test $in_tree_gas = yes; then | |
14125 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
14126 | then gcc_cv_as_balign_and_p2align=yes | |
14127 | fi | |
14128 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14129 | echo '.balign 4 |
8ada417f | 14130 | .p2align 2' > conftest.s |
ba479fd2 NN |
14131 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14132 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14133 | (eval $ac_try) 2>&5 | |
14134 | ac_status=$? | |
14135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14136 | (exit $ac_status); }; } | |
8ada417f ZW |
14137 | then |
14138 | gcc_cv_as_balign_and_p2align=yes | |
14139 | else | |
14140 | echo "configure: failed program was" >&5 | |
14141 | cat conftest.s >&5 | |
14142 | fi | |
14143 | rm -f conftest.o conftest.s | |
14144 | fi | |
14145 | fi | |
a6ccdbab EC |
14146 | { echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
14147 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6; } | |
63cf211a | 14148 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
14149 | |
14150 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 14151 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 14152 | _ACEOF |
981d4858 | 14153 | |
ad9c4d9f NN |
14154 | fi |
14155 | ||
a6ccdbab EC |
14156 | { echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
14157 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6; } | |
ba479fd2 NN |
14158 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then |
14159 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14160 | else |
14161 | gcc_cv_as_max_skip_p2align=no | |
14162 | if test $in_tree_gas = yes; then | |
14163 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
14164 | then gcc_cv_as_max_skip_p2align=yes | |
14165 | fi | |
14166 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14167 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
14168 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14169 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14170 | (eval $ac_try) 2>&5 | |
14171 | ac_status=$? | |
14172 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14173 | (exit $ac_status); }; } | |
8ada417f ZW |
14174 | then |
14175 | gcc_cv_as_max_skip_p2align=yes | |
14176 | else | |
14177 | echo "configure: failed program was" >&5 | |
14178 | cat conftest.s >&5 | |
14179 | fi | |
14180 | rm -f conftest.o conftest.s | |
14181 | fi | |
ad9c4d9f | 14182 | fi |
a6ccdbab EC |
14183 | { echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
14184 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6; } | |
63cf211a | 14185 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
14186 | |
14187 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 14188 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 14189 | _ACEOF |
9e423e6d | 14190 | |
9e423e6d | 14191 | fi |
ad9c4d9f | 14192 | |
a6ccdbab EC |
14193 | { echo "$as_me:$LINENO: checking assembler for .literal16" >&5 |
14194 | echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6; } | |
5708d18d MS |
14195 | if test "${gcc_cv_as_literal16+set}" = set; then |
14196 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14197 | else | |
14198 | gcc_cv_as_literal16=no | |
14199 | if test $in_tree_gas = yes; then | |
14200 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
14201 | then gcc_cv_as_literal16=yes | |
14202 | fi | |
14203 | elif test x$gcc_cv_as != x; then | |
14204 | echo '.literal16' > conftest.s | |
14205 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14206 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14207 | (eval $ac_try) 2>&5 | |
14208 | ac_status=$? | |
14209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14210 | (exit $ac_status); }; } | |
14211 | then | |
14212 | gcc_cv_as_literal16=yes | |
14213 | else | |
14214 | echo "configure: failed program was" >&5 | |
14215 | cat conftest.s >&5 | |
14216 | fi | |
14217 | rm -f conftest.o conftest.s | |
14218 | fi | |
14219 | fi | |
a6ccdbab EC |
14220 | { echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5 |
14221 | echo "${ECHO_T}$gcc_cv_as_literal16" >&6; } | |
5708d18d MS |
14222 | if test $gcc_cv_as_literal16 = yes; then |
14223 | ||
14224 | cat >>confdefs.h <<\_ACEOF | |
14225 | #define HAVE_GAS_LITERAL16 1 | |
14226 | _ACEOF | |
14227 | ||
14228 | fi | |
14229 | ||
a6ccdbab EC |
14230 | { echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
14231 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6; } | |
ba479fd2 NN |
14232 | if test "${gcc_cv_as_subsection_m1+set}" = set; then |
14233 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14234 | else |
14235 | gcc_cv_as_subsection_m1=no | |
14236 | if test $in_tree_gas = yes; then | |
14237 | if test $in_tree_gas_is_elf = yes \ | |
14238 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14239 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 14240 | fi |
8ada417f | 14241 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14242 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
14243 | .subsection -1 |
14244 | conftest_label2: .word 0 | |
8ada417f | 14245 | .previous' > conftest.s |
ba479fd2 NN |
14246 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14247 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14248 | (eval $ac_try) 2>&5 | |
14249 | ac_status=$? | |
14250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14251 | (exit $ac_status); }; } | |
8ada417f ZW |
14252 | then |
14253 | if test x$gcc_cv_nm != x; then | |
14254 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
14255 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
14256 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
14257 | then : | |
14258 | else gcc_cv_as_subsection_m1=yes | |
14259 | fi | |
14260 | rm -f conftest.nm1 conftest.nm2 | |
14261 | fi | |
14262 | else | |
14263 | echo "configure: failed program was" >&5 | |
14264 | cat conftest.s >&5 | |
14265 | fi | |
14266 | rm -f conftest.o conftest.s | |
14267 | fi | |
981d4858 | 14268 | fi |
a6ccdbab EC |
14269 | { echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
14270 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6; } | |
63cf211a | 14271 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
14272 | |
14273 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 14274 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 14275 | _ACEOF |
981d4858 | 14276 | |
d1accaa3 | 14277 | fi |
ad9c4d9f | 14278 | |
a6ccdbab EC |
14279 | { echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
14280 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6; } | |
ba479fd2 NN |
14281 | if test "${gcc_cv_as_weak+set}" = set; then |
14282 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14283 | else |
14284 | gcc_cv_as_weak=no | |
14285 | if test $in_tree_gas = yes; then | |
14286 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
14287 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 14288 | fi |
8ada417f | 14289 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14290 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
14291 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14292 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14293 | (eval $ac_try) 2>&5 | |
14294 | ac_status=$? | |
14295 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14296 | (exit $ac_status); }; } | |
8ada417f ZW |
14297 | then |
14298 | gcc_cv_as_weak=yes | |
14299 | else | |
14300 | echo "configure: failed program was" >&5 | |
14301 | cat conftest.s >&5 | |
14302 | fi | |
14303 | rm -f conftest.o conftest.s | |
14304 | fi | |
981d4858 | 14305 | fi |
a6ccdbab EC |
14306 | { echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
14307 | echo "${ECHO_T}$gcc_cv_as_weak" >&6; } | |
63cf211a | 14308 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
14309 | |
14310 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 14311 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 14312 | _ACEOF |
981d4858 | 14313 | |
12822146 | 14314 | fi |
ad9c4d9f | 14315 | |
a6ccdbab EC |
14316 | { echo "$as_me:$LINENO: checking assembler for .weakref" >&5 |
14317 | echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6; } | |
a0203ca7 AO |
14318 | if test "${gcc_cv_as_weakref+set}" = set; then |
14319 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14320 | else | |
14321 | gcc_cv_as_weakref=no | |
14322 | if test $in_tree_gas = yes; then | |
14323 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
14324 | then gcc_cv_as_weakref=yes | |
14325 | fi | |
14326 | elif test x$gcc_cv_as != x; then | |
14327 | echo ' .weakref foobar, barfnot' > conftest.s | |
14328 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14329 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14330 | (eval $ac_try) 2>&5 | |
14331 | ac_status=$? | |
14332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14333 | (exit $ac_status); }; } | |
14334 | then | |
14335 | gcc_cv_as_weakref=yes | |
14336 | else | |
14337 | echo "configure: failed program was" >&5 | |
14338 | cat conftest.s >&5 | |
14339 | fi | |
14340 | rm -f conftest.o conftest.s | |
14341 | fi | |
14342 | fi | |
a6ccdbab EC |
14343 | { echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 |
14344 | echo "${ECHO_T}$gcc_cv_as_weakref" >&6; } | |
a0203ca7 AO |
14345 | if test $gcc_cv_as_weakref = yes; then |
14346 | ||
14347 | cat >>confdefs.h <<\_ACEOF | |
14348 | #define HAVE_GAS_WEAKREF 1 | |
14349 | _ACEOF | |
14350 | ||
14351 | fi | |
14352 | ||
a6ccdbab EC |
14353 | { echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
14354 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6; } | |
e41f3691 JDA |
14355 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then |
14356 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14357 | else | |
14358 | gcc_cv_as_nsubspa_comdat=no | |
14359 | if test $in_tree_gas = yes; then | |
14360 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14361 | then gcc_cv_as_nsubspa_comdat=yes | |
14362 | fi | |
14363 | elif test x$gcc_cv_as != x; then | |
14364 | echo ' .SPACE $TEXT$ | |
14365 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
14366 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14367 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14368 | (eval $ac_try) 2>&5 | |
14369 | ac_status=$? | |
14370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14371 | (exit $ac_status); }; } | |
14372 | then | |
14373 | gcc_cv_as_nsubspa_comdat=yes | |
14374 | else | |
14375 | echo "configure: failed program was" >&5 | |
14376 | cat conftest.s >&5 | |
14377 | fi | |
14378 | rm -f conftest.o conftest.s | |
14379 | fi | |
14380 | fi | |
a6ccdbab EC |
14381 | { echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 |
14382 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6; } | |
e41f3691 JDA |
14383 | if test $gcc_cv_as_nsubspa_comdat = yes; then |
14384 | ||
14385 | cat >>confdefs.h <<\_ACEOF | |
14386 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
14387 | _ACEOF | |
14388 | ||
14389 | fi | |
14390 | ||
8ada417f ZW |
14391 | # .hidden needs to be supported in both the assembler and the linker, |
14392 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
14393 | # This is irritatingly difficult to feature test for; we have to check the | |
14394 | # date string after the version number. If we've got an in-tree | |
14395 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
14396 | # to be safe. | |
14397 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
a6ccdbab EC |
14398 | { echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
14399 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6; } | |
ba479fd2 NN |
14400 | if test "${gcc_cv_as_hidden+set}" = set; then |
14401 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14402 | else |
14403 | gcc_cv_as_hidden=no | |
14404 | if test $in_tree_gas = yes; then | |
14405 | if test $in_tree_gas_is_elf = yes \ | |
14406 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
14407 | then gcc_cv_as_hidden=yes | |
14408 | fi | |
14409 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14410 | echo ' .hidden foobar |
8ada417f | 14411 | foobar:' > conftest.s |
ba479fd2 NN |
14412 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14413 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14414 | (eval $ac_try) 2>&5 | |
14415 | ac_status=$? | |
14416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14417 | (exit $ac_status); }; } | |
8ada417f ZW |
14418 | then |
14419 | gcc_cv_as_hidden=yes | |
14420 | else | |
14421 | echo "configure: failed program was" >&5 | |
14422 | cat conftest.s >&5 | |
14423 | fi | |
14424 | rm -f conftest.o conftest.s | |
14425 | fi | |
14426 | fi | |
a6ccdbab EC |
14427 | { echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
14428 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6; } | |
63cf211a | 14429 | |
ad9c4d9f | 14430 | |
a6ccdbab EC |
14431 | { echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
14432 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6; } | |
ba479fd2 NN |
14433 | if test "${gcc_cv_ld_hidden+set}" = set; then |
14434 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14435 | else |
14436 | if test $in_tree_ld = yes ; then | |
14437 | gcc_cv_ld_hidden=no | |
14438 | 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 \ | |
14439 | && test $in_tree_ld_is_elf = yes; then | |
14440 | gcc_cv_ld_hidden=yes | |
14441 | fi | |
14442 | else | |
14443 | gcc_cv_ld_hidden=yes | |
bace148a | 14444 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14445 | if echo "$ld_ver" | grep GNU > /dev/null; then |
14446 | ld_vers=`echo $ld_ver | sed -n \ | |
14447 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14448 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14449 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14450 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
14451 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a | 14452 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
e8116f40 | 14453 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'` |
8ada417f | 14454 | 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'` |
11176d2a JB |
14455 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
14456 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
14457 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
14458 | if test 0"$ld_date" -lt 20020404; then |
14459 | if test -n "$ld_date"; then | |
14460 | # If there was date string, but was earlier than 2002-04-04, fail | |
14461 | gcc_cv_ld_hidden=no | |
14462 | elif test -z "$ld_vers"; then | |
14463 | # If there was no date string nor ld version number, something is wrong | |
14464 | gcc_cv_ld_hidden=no | |
14465 | else | |
8ada417f ZW |
14466 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
14467 | if test "$ld_vers_major" -lt 2; then | |
14468 | gcc_cv_ld_hidden=no | |
14469 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
14470 | gcc_cv_ld_hidden="no" | |
14471 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
14472 | gcc_cv_ld_hidden=no | |
c72931a6 | 14473 | fi |
8ada417f | 14474 | fi |
789b7de5 | 14475 | fi |
8ada417f | 14476 | else |
28690784 | 14477 | case "${target}" in |
b0fd7d27 | 14478 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
14479 | gcc_cv_ld_hidden=yes |
14480 | ;; | |
14481 | *) | |
14482 | gcc_cv_ld_hidden=no | |
14483 | ;; | |
14484 | esac | |
8ada417f ZW |
14485 | fi |
14486 | fi | |
6d07784a | 14487 | fi |
a6ccdbab EC |
14488 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
14489 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6; } | |
8ada417f | 14490 | libgcc_visibility=no |
ad9c4d9f | 14491 | |
232b67d9 | 14492 | |
8e3940b2 | 14493 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 14494 | libgcc_visibility=yes |
ba479fd2 NN |
14495 | |
14496 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14497 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 14498 | _ACEOF |
ad9c4d9f NN |
14499 | |
14500 | fi | |
14501 | ||
8ada417f | 14502 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
a6ccdbab EC |
14503 | { echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
14504 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6; } | |
ba479fd2 NN |
14505 | if test "${gcc_cv_as_leb128+set}" = set; then |
14506 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14507 | else |
14508 | gcc_cv_as_leb128=no | |
14509 | if test $in_tree_gas = yes; then | |
14510 | if test $in_tree_gas_is_elf = yes \ | |
14511 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14512 | then gcc_cv_as_leb128=yes | |
14513 | fi | |
14514 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14515 | echo ' .data |
b7460f24 RH |
14516 | .uleb128 L2 - L1 |
14517 | L1: | |
14518 | .uleb128 1280 | |
14519 | .sleb128 -1010 | |
8ada417f | 14520 | L2:' > conftest.s |
ba479fd2 NN |
14521 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14522 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14523 | (eval $ac_try) 2>&5 | |
14524 | ac_status=$? | |
14525 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14526 | (exit $ac_status); }; } | |
8ada417f ZW |
14527 | then |
14528 | # GAS versions before 2.11 do not support uleb128, | |
14529 | # despite appearing to. | |
14530 | # ??? There exists an elf-specific test that will crash | |
14531 | # the assembler. Perhaps it's better to figure out whether | |
14532 | # arbitrary sections are supported and try the test. | |
bace148a | 14533 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14534 | if echo "$as_ver" | grep GNU > /dev/null; then |
14535 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
14536 | as_major=`echo $as_ver | sed 's/\..*//'` | |
14537 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
14538 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
14539 | then : | |
14540 | else gcc_cv_as_leb128=yes | |
14541 | fi | |
14542 | fi | |
14543 | else | |
14544 | echo "configure: failed program was" >&5 | |
14545 | cat conftest.s >&5 | |
14546 | fi | |
14547 | rm -f conftest.o conftest.s | |
14548 | fi | |
b7460f24 | 14549 | fi |
a6ccdbab EC |
14550 | { echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
14551 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6; } | |
63cf211a | 14552 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
14553 | |
14554 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 14555 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 14556 | _ACEOF |
b7460f24 RH |
14557 | |
14558 | fi | |
ad9c4d9f | 14559 | |
8ada417f ZW |
14560 | # GAS versions up to and including 2.11.0 may mis-optimize |
14561 | # .eh_frame data. | |
a6ccdbab EC |
14562 | { echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
14563 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6; } | |
ba479fd2 NN |
14564 | if test "${gcc_cv_as_eh_frame+set}" = set; then |
14565 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14566 | else |
14567 | gcc_cv_as_eh_frame=no | |
14568 | if test $in_tree_gas = yes; then | |
14569 | if test $in_tree_gas_is_elf = yes \ | |
14570 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14571 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 14572 | fi |
8ada417f | 14573 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14574 | echo ' .text |
c64688ae RH |
14575 | .LFB1: |
14576 | .4byte 0 | |
14577 | .L1: | |
14578 | .4byte 0 | |
14579 | .LFE1: | |
14580 | .section .eh_frame,"aw",@progbits | |
14581 | __FRAME_BEGIN__: | |
14582 | .4byte .LECIE1-.LSCIE1 | |
14583 | .LSCIE1: | |
14584 | .4byte 0x0 | |
14585 | .byte 0x1 | |
14586 | .ascii "z\0" | |
14587 | .byte 0x1 | |
14588 | .byte 0x78 | |
14589 | .byte 0x1a | |
14590 | .byte 0x0 | |
14591 | .byte 0x4 | |
14592 | .4byte 1 | |
14593 | .p2align 1 | |
14594 | .LECIE1: | |
14595 | .LSFDE1: | |
14596 | .4byte .LEFDE1-.LASFDE1 | |
14597 | .LASFDE1: | |
14598 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
14599 | .4byte .LFB1 | |
14600 | .4byte .LFE1-.LFB1 | |
14601 | .byte 0x4 | |
14602 | .4byte .LFE1-.LFB1 | |
14603 | .byte 0x4 | |
14604 | .4byte .L1-.LFB1 | |
8ada417f | 14605 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
14606 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14607 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14608 | (eval $ac_try) 2>&5 | |
14609 | ac_status=$? | |
14610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14611 | (exit $ac_status); }; } | |
8ada417f ZW |
14612 | then |
14613 | cat > conftest.lit <<EOF | |
c64688ae RH |
14614 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
14615 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 14616 | 0020 08000000 04080000 0044 .........D |
01efb963 | 14617 | EOF |
ba479fd2 | 14618 | cat > conftest.big <<EOF |
01efb963 AS |
14619 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
14620 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 14621 | 0020 00000008 04000000 0844 .........D |
c64688ae | 14622 | EOF |
8ada417f ZW |
14623 | # If the assembler didn't choke, and we can objdump, |
14624 | # and we got the correct data, then succeed. | |
dbc02e7f AS |
14625 | # The text in the here-document typically retains its unix-style line |
14626 | # endings, while the output of objdump will use host line endings. | |
14627 | # Therefore, use diff -b for the comparisons. | |
8ada417f ZW |
14628 | if test x$gcc_cv_objdump != x \ |
14629 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
14630 | | tail -3 > conftest.got \ | |
dbc02e7f AS |
14631 | && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ |
14632 | || diff -b conftest.big conftest.got > /dev/null 2>&1; } | |
8ada417f ZW |
14633 | then |
14634 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
14635 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
14636 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14637 | (eval $ac_try) 2>&5 | |
14638 | ac_status=$? | |
14639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14640 | (exit $ac_status); }; }; then | |
8ada417f ZW |
14641 | gcc_cv_as_eh_frame=buggy |
14642 | else | |
14643 | # Uh oh, what do we do now? | |
14644 | gcc_cv_as_eh_frame=no | |
14645 | fi | |
14646 | else | |
14647 | echo "configure: failed program was" >&5 | |
14648 | cat conftest.s >&5 | |
14649 | fi | |
14650 | rm -f conftest.o conftest.s | |
14651 | fi | |
c64688ae | 14652 | fi |
a6ccdbab EC |
14653 | { echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
14654 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6; } | |
ad9c4d9f | 14655 | |
6e3f3080 | 14656 | |
63cf211a | 14657 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
14658 | |
14659 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14660 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 14661 | _ACEOF |
ad9c4d9f NN |
14662 | |
14663 | fi | |
14664 | ||
a6ccdbab EC |
14665 | { echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14666 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; } | |
ba479fd2 NN |
14667 | if test "${gcc_cv_as_shf_merge+set}" = set; then |
14668 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14669 | else |
14670 | gcc_cv_as_shf_merge=no | |
14671 | if test $in_tree_gas = yes; then | |
14672 | if test $in_tree_gas_is_elf = yes \ | |
14673 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14674 | then gcc_cv_as_shf_merge=yes | |
14675 | fi | |
14676 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14677 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
14678 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
14679 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14680 | (eval $ac_try) 2>&5 | |
14681 | ac_status=$? | |
14682 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14683 | (exit $ac_status); }; } | |
8ada417f ZW |
14684 | then |
14685 | gcc_cv_as_shf_merge=yes | |
14686 | else | |
14687 | echo "configure: failed program was" >&5 | |
14688 | cat conftest.s >&5 | |
14689 | fi | |
14690 | rm -f conftest.o conftest.s | |
14691 | fi | |
201556f0 | 14692 | fi |
a6ccdbab EC |
14693 | { echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14694 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; } | |
8ada417f | 14695 | |
c18a5b6c | 14696 | if test $gcc_cv_as_shf_merge = no; then |
a6ccdbab EC |
14697 | { echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14698 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; } | |
c18a5b6c MM |
14699 | if test "${gcc_cv_as_shf_merge+set}" = set; then |
14700 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14701 | else | |
14702 | gcc_cv_as_shf_merge=no | |
14703 | if test $in_tree_gas = yes; then | |
14704 | if test $in_tree_gas_is_elf = yes \ | |
14705 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14706 | then gcc_cv_as_shf_merge=yes | |
14707 | fi | |
14708 | elif test x$gcc_cv_as != x; then | |
14709 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
14710 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14711 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14712 | (eval $ac_try) 2>&5 | |
14713 | ac_status=$? | |
14714 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14715 | (exit $ac_status); }; } | |
14716 | then | |
14717 | gcc_cv_as_shf_merge=yes | |
14718 | else | |
14719 | echo "configure: failed program was" >&5 | |
14720 | cat conftest.s >&5 | |
14721 | fi | |
14722 | rm -f conftest.o conftest.s | |
14723 | fi | |
14724 | fi | |
a6ccdbab EC |
14725 | { echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14726 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; } | |
c18a5b6c MM |
14727 | |
14728 | fi | |
8ad9fb33 | 14729 | |
ba479fd2 | 14730 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 14731 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14732 | _ACEOF |
201556f0 | 14733 | |
201556f0 | 14734 | |
a6ccdbab EC |
14735 | { echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14736 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; } | |
c18a5b6c MM |
14737 | if test "${gcc_cv_as_comdat_group+set}" = set; then |
14738 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14739 | else | |
14740 | gcc_cv_as_comdat_group=no | |
14741 | if test $in_tree_gas = yes; then | |
14742 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14743 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14744 | then gcc_cv_as_comdat_group=yes |
14745 | fi | |
14746 | elif test x$gcc_cv_as != x; then | |
14747 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
14748 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14749 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14750 | (eval $ac_try) 2>&5 | |
14751 | ac_status=$? | |
14752 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14753 | (exit $ac_status); }; } | |
14754 | then | |
14755 | gcc_cv_as_comdat_group=yes | |
14756 | else | |
14757 | echo "configure: failed program was" >&5 | |
14758 | cat conftest.s >&5 | |
14759 | fi | |
14760 | rm -f conftest.o conftest.s | |
14761 | fi | |
14762 | fi | |
a6ccdbab EC |
14763 | { echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 |
14764 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6; } | |
c18a5b6c MM |
14765 | |
14766 | if test $gcc_cv_as_comdat_group = yes; then | |
14767 | gcc_cv_as_comdat_group_percent=no | |
14768 | else | |
a6ccdbab EC |
14769 | { echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14770 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; } | |
c18a5b6c MM |
14771 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then |
14772 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14773 | else | |
14774 | gcc_cv_as_comdat_group_percent=no | |
14775 | if test $in_tree_gas = yes; then | |
14776 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14777 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14778 | then gcc_cv_as_comdat_group_percent=yes |
14779 | fi | |
14780 | elif test x$gcc_cv_as != x; then | |
14781 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14782 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14783 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14784 | (eval $ac_try) 2>&5 | |
14785 | ac_status=$? | |
14786 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14787 | (exit $ac_status); }; } | |
14788 | then | |
14789 | gcc_cv_as_comdat_group_percent=yes | |
14790 | else | |
14791 | echo "configure: failed program was" >&5 | |
14792 | cat conftest.s >&5 | |
14793 | fi | |
14794 | rm -f conftest.o conftest.s | |
14795 | fi | |
14796 | fi | |
a6ccdbab EC |
14797 | { echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 |
14798 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6; } | |
c18a5b6c MM |
14799 | |
14800 | fi | |
11176d2a JB |
14801 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14802 | comdat_group=yes | |
14803 | if test 0"$ld_date" -lt 20050308; then | |
14804 | if test -n "$ld_date"; then | |
14805 | # If there was date string, but was earlier than 2005-03-08, fail | |
14806 | comdat_group=no | |
14807 | elif test "$ld_vers_major" -lt 2; then | |
14808 | comdat_group=no | |
14809 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14810 | comdat_group=no | |
14811 | fi | |
14812 | fi | |
1cf0118d RO |
14813 | else |
14814 | # assume linkers other than GNU ld don't support COMDAT group | |
14815 | comdat_group=no | |
14816 | fi | |
14817 | if test $comdat_group = no; then | |
14818 | gcc_cv_as_comdat_group=no | |
14819 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 14820 | fi |
c18a5b6c MM |
14821 | |
14822 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14823 | #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 |
14824 | _ACEOF |
14825 | ||
14826 | ||
8ada417f | 14827 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14828 | conftest_s= |
14829 | tls_first_major= | |
14830 | tls_first_minor= | |
9739c90c | 14831 | tls_as_opt= |
f996902d | 14832 | case "$target" in |
6f9b006d RH |
14833 | alpha*-*-*) |
14834 | conftest_s=' | |
14835 | .section ".tdata","awT",@progbits | |
14836 | foo: .long 25 | |
14837 | .text | |
14838 | ldq $27,__tls_get_addr($29) !literal!1 | |
14839 | lda $16,foo($29) !tlsgd!1 | |
14840 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14841 | ldq $27,__tls_get_addr($29) !literal!2 | |
14842 | lda $16,foo($29) !tlsldm!2 | |
14843 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14844 | ldq $1,foo($29) !gotdtprel | |
14845 | ldah $2,foo($29) !dtprelhi | |
14846 | lda $3,foo($2) !dtprello | |
14847 | lda $4,foo($29) !dtprel | |
14848 | ldq $1,foo($29) !gottprel | |
14849 | ldah $2,foo($29) !tprelhi | |
14850 | lda $3,foo($2) !tprello | |
14851 | lda $4,foo($29) !tprel' | |
14852 | tls_first_major=2 | |
14853 | tls_first_minor=13 | |
2f3321ca | 14854 | tls_as_opt=--fatal-warnings |
6f9b006d | 14855 | ;; |
e4dd71de AH |
14856 | frv*-*-*) |
14857 | conftest_s=' | |
14858 | .section ".tdata","awT",@progbits | |
14859 | x: .long 25 | |
14860 | .text | |
14861 | call #gettlsoff(x)' | |
14862 | tls_first_major=2 | |
14863 | tls_first_minor=14 | |
14864 | ;; | |
51076f96 RC |
14865 | hppa*-*-linux*) |
14866 | conftest_s=' | |
14867 | t1: .reg %r20 | |
14868 | t2: .reg %r21 | |
14869 | gp: .reg %r19 | |
14870 | .section ".tdata","awT",@progbits | |
14871 | foo: .long 25 | |
14872 | .text | |
14873 | .align 4 | |
14874 | addil LT%foo-$tls_gdidx$,gp | |
14875 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14876 | b __tls_get_addr | |
14877 | nop | |
14878 | addil LT%foo-$tls_ldidx$,gp | |
14879 | b __tls_get_addr | |
14880 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14881 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14882 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14883 | mfctl %cr27,%t1 | |
14884 | addil LT%foo-$tls_ieoff$,gp | |
14885 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14886 | add %t1,%t2,%t3 | |
14887 | mfctl %cr27,%t1 | |
14888 | addil LR%foo-$tls_leoff$,%t1 | |
14889 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14890 | tls_first_major=2 | |
14891 | tls_first_minor=15 | |
14892 | tls_as_opt=--fatal-warnings | |
14893 | ;; | |
d3585b76 DJ |
14894 | arm*-*-*) |
14895 | conftest_s=' | |
14896 | .section ".tdata","awT",%progbits | |
14897 | foo: .long 25 | |
14898 | .text | |
14899 | .word foo(gottpoff) | |
14900 | .word foo(tpoff) | |
14901 | .word foo(tlsgd) | |
14902 | .word foo(tlsldm) | |
14903 | .word foo(tlsldo)' | |
14904 | tls_first_major=2 | |
14905 | tls_first_minor=17 | |
14906 | ;; | |
f996902d RH |
14907 | i[34567]86-*-*) |
14908 | conftest_s=' | |
14909 | .section ".tdata","awT",@progbits | |
14910 | foo: .long 25 | |
14911 | .text | |
14912 | movl %gs:0, %eax | |
14913 | leal foo@TLSGD(,%ebx,1), %eax | |
14914 | leal foo@TLSLDM(%ebx), %eax | |
14915 | leal foo@DTPOFF(%eax), %edx | |
14916 | movl foo@GOTTPOFF(%ebx), %eax | |
14917 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14918 | addl foo@GOTNTPOFF(%ebx), %eax |
14919 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14920 | movl $foo@TPOFF, %eax |
14921 | subl $foo@TPOFF, %eax | |
14922 | leal foo@NTPOFF(%ecx), %eax' | |
14923 | tls_first_major=2 | |
75d38379 | 14924 | tls_first_minor=14 |
2f3321ca | 14925 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14926 | ;; |
14927 | x86_64-*-*) | |
14928 | conftest_s=' | |
14929 | .section ".tdata","awT",@progbits | |
14930 | foo: .long 25 | |
14931 | .text | |
14932 | movq %fs:0, %rax | |
14933 | leaq foo@TLSGD(%rip), %rdi | |
14934 | leaq foo@TLSLD(%rip), %rdi | |
14935 | leaq foo@DTPOFF(%rax), %rdx | |
14936 | movq foo@GOTTPOFF(%rip), %rax | |
14937 | movq $foo@TPOFF, %rax' | |
14938 | tls_first_major=2 | |
14939 | tls_first_minor=14 | |
2f3321ca | 14940 | tls_as_opt=--fatal-warnings |
f996902d | 14941 | ;; |
7b6e506e RH |
14942 | ia64-*-*) |
14943 | conftest_s=' | |
14944 | .section ".tdata","awT",@progbits | |
14945 | foo: data8 25 | |
14946 | .text | |
14947 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14948 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14949 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14950 | addl r19 = @dtprel(foo#), gp | |
14951 | adds r21 = @dtprel(foo#), r13 | |
14952 | movl r23 = @dtprel(foo#) | |
14953 | addl r20 = @tprel(foo#), gp | |
14954 | adds r22 = @tprel(foo#), r13 | |
14955 | movl r24 = @tprel(foo#)' | |
14956 | tls_first_major=2 | |
14957 | tls_first_minor=13 | |
2f3321ca | 14958 | tls_as_opt=--fatal-warnings |
7b6e506e | 14959 | ;; |
69229b81 DJ |
14960 | mips*-*-*) |
14961 | conftest_s=' | |
14962 | .section .tdata,"awT",@progbits | |
14963 | x: | |
14964 | .word 2 | |
14965 | .text | |
14966 | addiu $4, $28, %tlsgd(x) | |
14967 | addiu $4, $28, %tlsldm(x) | |
14968 | lui $4, %dtprel_hi(x) | |
14969 | addiu $4, $4, %dtprel_lo(x) | |
14970 | lw $4, %gottprel(x)($28) | |
14971 | lui $4, %tprel_hi(x) | |
14972 | addiu $4, $4, %tprel_lo(x)' | |
14973 | tls_first_major=2 | |
14974 | tls_first_minor=16 | |
14975 | tls_as_opt='-32 --fatal-warnings' | |
14976 | ;; | |
c4501e62 JJ |
14977 | powerpc-*-*) |
14978 | conftest_s=' | |
14979 | .section ".tdata","awT",@progbits | |
14980 | .align 2 | |
14981 | ld0: .space 4 | |
14982 | ld1: .space 4 | |
14983 | x1: .space 4 | |
14984 | x2: .space 4 | |
14985 | x3: .space 4 | |
14986 | .text | |
14987 | addi 3,31,ld0@got@tlsgd | |
14988 | bl __tls_get_addr | |
14989 | addi 3,31,x1@got@tlsld | |
14990 | bl __tls_get_addr | |
14991 | addi 9,3,x1@dtprel | |
14992 | addis 9,3,x2@dtprel@ha | |
14993 | addi 9,9,x2@dtprel@l | |
14994 | lwz 9,x3@got@tprel(31) | |
14995 | add 9,9,x@tls | |
14996 | addi 9,2,x1@tprel | |
14997 | addis 9,2,x2@tprel@ha | |
14998 | addi 9,9,x2@tprel@l' | |
14999 | tls_first_major=2 | |
15000 | tls_first_minor=14 | |
2f3321ca | 15001 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
15002 | ;; |
15003 | powerpc64-*-*) | |
15004 | conftest_s=' | |
15005 | .section ".tdata","awT",@progbits | |
15006 | .align 3 | |
15007 | ld0: .space 8 | |
15008 | ld1: .space 8 | |
15009 | x1: .space 8 | |
15010 | x2: .space 8 | |
15011 | x3: .space 8 | |
15012 | .text | |
15013 | addi 3,2,ld0@got@tlsgd | |
15014 | bl .__tls_get_addr | |
15015 | nop | |
15016 | addi 3,2,ld1@toc | |
15017 | bl .__tls_get_addr | |
15018 | nop | |
15019 | addi 3,2,x1@got@tlsld | |
15020 | bl .__tls_get_addr | |
15021 | nop | |
15022 | addi 9,3,x1@dtprel | |
15023 | bl .__tls_get_addr | |
15024 | nop | |
15025 | addis 9,3,x2@dtprel@ha | |
15026 | addi 9,9,x2@dtprel@l | |
15027 | bl .__tls_get_addr | |
15028 | nop | |
15029 | ld 9,x3@got@dtprel(2) | |
15030 | add 9,9,3 | |
15031 | bl .__tls_get_addr | |
15032 | nop' | |
15033 | tls_first_major=2 | |
15034 | tls_first_minor=14 | |
2f3321ca | 15035 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 15036 | ;; |
fd3cd001 UW |
15037 | s390-*-*) |
15038 | conftest_s=' | |
15039 | .section ".tdata","awT",@progbits | |
15040 | foo: .long 25 | |
15041 | .text | |
15042 | .long foo@TLSGD | |
15043 | .long foo@TLSLDM | |
15044 | .long foo@DTPOFF | |
15045 | .long foo@NTPOFF | |
15046 | .long foo@GOTNTPOFF | |
15047 | .long foo@INDNTPOFF | |
15048 | l %r1,foo@GOTNTPOFF(%r12) | |
15049 | l %r1,0(%r1):tls_load:foo | |
15050 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
15051 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
15052 | tls_first_major=2 | |
15053 | tls_first_minor=14 | |
2f3321ca | 15054 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
15055 | ;; |
15056 | s390x-*-*) | |
15057 | conftest_s=' | |
15058 | .section ".tdata","awT",@progbits | |
15059 | foo: .long 25 | |
15060 | .text | |
15061 | .quad foo@TLSGD | |
15062 | .quad foo@TLSLDM | |
15063 | .quad foo@DTPOFF | |
15064 | .quad foo@NTPOFF | |
15065 | .quad foo@GOTNTPOFF | |
15066 | lg %r1,foo@GOTNTPOFF(%r12) | |
15067 | larl %r1,foo@INDNTPOFF | |
15068 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
15069 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
15070 | tls_first_major=2 | |
15071 | tls_first_minor=14 | |
2f3321ca | 15072 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 15073 | ;; |
9ff13962 KK |
15074 | sh-*-* | sh[34]-*-*) |
15075 | conftest_s=' | |
15076 | .section ".tdata","awT",@progbits | |
15077 | foo: .long 25 | |
15078 | .text | |
15079 | .long foo@TLSGD | |
15080 | .long foo@TLSLDM | |
15081 | .long foo@DTPOFF | |
15082 | .long foo@GOTTPOFF | |
15083 | .long foo@TPOFF' | |
15084 | tls_first_major=2 | |
15085 | tls_first_minor=13 | |
2f3321ca | 15086 | tls_as_opt=--fatal-warnings |
9ff13962 | 15087 | ;; |
5751a10b | 15088 | sparc*-*-*) |
2f3321ca | 15089 | case "$target" in |
7935dc1b EB |
15090 | sparc*-sun-solaris2.[56789]*) |
15091 | # TLS was introduced in the Solaris 9 4/04 release but | |
15092 | # we do not enable it by default on Solaris 9 either. | |
15093 | if test "x$enable_tls" = xyes ; then | |
15094 | on_solaris=yes | |
15095 | else | |
15096 | enable_tls=no; | |
15097 | fi | |
15098 | ;; | |
2f3321ca EB |
15099 | sparc*-sun-solaris2.*) |
15100 | on_solaris=yes | |
15101 | ;; | |
15102 | *) | |
15103 | on_solaris=no | |
15104 | ;; | |
15105 | esac | |
15106 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
15107 | conftest_s=' | |
15108 | .section ".tdata",#alloc,#write,#tls | |
15109 | foo: .long 25 | |
15110 | .text | |
15111 | sethi %tgd_hi22(foo), %o0 | |
15112 | add %o0, %tgd_lo10(foo), %o1 | |
15113 | add %l7, %o1, %o0, %tgd_add(foo) | |
15114 | call __tls_get_addr, %tgd_call(foo) | |
15115 | sethi %tldm_hi22(foo), %l1 | |
15116 | add %l1, %tldm_lo10(foo), %l2 | |
15117 | add %l7, %l2, %o0, %tldm_add(foo) | |
15118 | call __tls_get_addr, %tldm_call(foo) | |
15119 | sethi %tldo_hix22(foo), %l3 | |
15120 | xor %l3, %tldo_lox10(foo), %l4 | |
15121 | add %o0, %l4, %l5, %tldo_add(foo) | |
15122 | sethi %tie_hi22(foo), %o3 | |
15123 | add %o3, %tie_lo10(foo), %o3 | |
15124 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
15125 | add %g7, %o2, %o4, %tie_add(foo) | |
15126 | sethi %tle_hix22(foo), %l1 | |
15127 | xor %l1, %tle_lox10(foo), %o5 | |
15128 | ld [%g7 + %o5], %o1' | |
15129 | tls_first_major=0 | |
15130 | tls_first_minor=0 | |
15131 | else | |
15132 | conftest_s=' | |
5751a10b JJ |
15133 | .section ".tdata","awT",@progbits |
15134 | foo: .long 25 | |
15135 | .text | |
15136 | sethi %tgd_hi22(foo), %o0 | |
15137 | add %o0, %tgd_lo10(foo), %o1 | |
15138 | add %l7, %o1, %o0, %tgd_add(foo) | |
15139 | call __tls_get_addr, %tgd_call(foo) | |
15140 | sethi %tldm_hi22(foo), %l1 | |
15141 | add %l1, %tldm_lo10(foo), %l2 | |
15142 | add %l7, %l2, %o0, %tldm_add(foo) | |
15143 | call __tls_get_addr, %tldm_call(foo) | |
15144 | sethi %tldo_hix22(foo), %l3 | |
15145 | xor %l3, %tldo_lox10(foo), %l4 | |
15146 | add %o0, %l4, %l5, %tldo_add(foo) | |
15147 | sethi %tie_hi22(foo), %o3 | |
15148 | add %o3, %tie_lo10(foo), %o3 | |
15149 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
15150 | add %g7, %o2, %o4, %tie_add(foo) | |
15151 | sethi %tle_hix22(foo), %l1 | |
15152 | xor %l1, %tle_lox10(foo), %o5 | |
15153 | ld [%g7 + %o5], %o1' | |
15154 | tls_first_major=2 | |
15155 | tls_first_minor=14 | |
2f3321ca EB |
15156 | tls_as_opt="-32 --fatal-warnings" |
15157 | fi | |
5751a10b | 15158 | ;; |
f996902d | 15159 | esac |
8dea1cca DD |
15160 | set_have_as_tls=no |
15161 | if test "x$enable_tls" = xno ; then | |
15162 | : # TLS explicitly disabled. | |
15163 | elif test "x$enable_tls" = xyes ; then | |
15164 | set_have_as_tls=yes # TLS explicitly enabled. | |
15165 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
15166 | : # If we don't have a check, assume no support. |
15167 | else | |
a6ccdbab EC |
15168 | { echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
15169 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6; } | |
ba479fd2 NN |
15170 | if test "${gcc_cv_as_tls+set}" = set; then |
15171 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15172 | else |
15173 | gcc_cv_as_tls=no | |
15174 | if test $in_tree_gas = yes; then | |
15175 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
15176 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 15177 | fi |
8ada417f | 15178 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15179 | echo "$conftest_s" > conftest.s |
2f3321ca | 15180 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
15181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15182 | (eval $ac_try) 2>&5 | |
15183 | ac_status=$? | |
15184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15185 | (exit $ac_status); }; } | |
8ada417f ZW |
15186 | then |
15187 | gcc_cv_as_tls=yes | |
15188 | else | |
15189 | echo "configure: failed program was" >&5 | |
15190 | cat conftest.s >&5 | |
15191 | fi | |
15192 | rm -f conftest.o conftest.s | |
f996902d | 15193 | fi |
f996902d | 15194 | fi |
a6ccdbab EC |
15195 | { echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
15196 | echo "${ECHO_T}$gcc_cv_as_tls" >&6; } | |
63cf211a | 15197 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
15198 | set_have_as_tls=yes |
15199 | fi | |
15200 | fi | |
15201 | if test $set_have_as_tls = yes ; then | |
ba479fd2 NN |
15202 | |
15203 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 15204 | #define HAVE_AS_TLS 1 |
ba479fd2 | 15205 | _ACEOF |
f996902d | 15206 | |
8ada417f ZW |
15207 | fi |
15208 | ||
15209 | # Target-specific assembler checks. | |
f996902d | 15210 | |
a6ccdbab EC |
15211 | { echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
15212 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6; } | |
7e9d8517 L |
15213 | gcc_cv_ld_static_dynamic=no |
15214 | if test $in_tree_ld = yes ; then | |
15215 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
15216 | gcc_cv_ld_static_dynamic=yes | |
15217 | fi | |
15218 | elif test x$gcc_cv_ld != x; then | |
15219 | # Check if linker supports -Bstatic/-Bdynamic option | |
15220 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
15221 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
15222 | gcc_cv_ld_static_dynamic=yes | |
15223 | fi | |
15224 | fi | |
15225 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
15226 | ||
15227 | cat >>confdefs.h <<\_ACEOF | |
15228 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
15229 | _ACEOF | |
15230 | ||
15231 | fi | |
a6ccdbab EC |
15232 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 |
15233 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6; } | |
7e9d8517 | 15234 | |
d594623a | 15235 | if test x"$demangler_in_ld" = xyes; then |
a6ccdbab EC |
15236 | { echo "$as_me:$LINENO: checking linker --demangle support" >&5 |
15237 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6; } | |
d594623a L |
15238 | gcc_cv_ld_demangle=no |
15239 | if test $in_tree_ld = yes; then | |
15240 | 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 \ | |
15241 | gcc_cv_ld_demangle=yes | |
15242 | fi | |
15243 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
15244 | # Check if the GNU linker supports --demangle option | |
15245 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
15246 | gcc_cv_ld_demangle=yes | |
15247 | fi | |
15248 | fi | |
15249 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
15250 | ||
15251 | cat >>confdefs.h <<\_ACEOF | |
15252 | #define HAVE_LD_DEMANGLE 1 | |
15253 | _ACEOF | |
15254 | ||
15255 | fi | |
a6ccdbab EC |
15256 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 |
15257 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6; } | |
d594623a L |
15258 | fi |
15259 | ||
3a37b08e RH |
15260 | case "$target" in |
15261 | # All TARGET_ABI_OSF targets. | |
15262 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
a6ccdbab EC |
15263 | { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15264 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; } | |
ba479fd2 NN |
15265 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then |
15266 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 15267 | else |
8ada417f ZW |
15268 | gcc_cv_as_alpha_explicit_relocs=no |
15269 | if test $in_tree_gas = yes; then | |
15270 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
15271 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 15272 | fi |
8ada417f | 15273 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15274 | echo ' .set nomacro |
3a37b08e RH |
15275 | .text |
15276 | extbl $3, $2, $3 !lituse_bytoff!1 | |
15277 | ldq $2, a($29) !literal!1 | |
15278 | ldq $4, b($29) !literal!2 | |
15279 | ldq_u $3, 0($2) !lituse_base!1 | |
15280 | ldq $27, f($29) !literal!5 | |
15281 | jsr $26, ($27), f !lituse_jsr!5 | |
15282 | ldah $29, 0($26) !gpdisp!3 | |
15283 | lda $0, c($29) !gprel | |
15284 | ldah $1, d($29) !gprelhigh | |
15285 | lda $1, d($1) !gprellow | |
8ada417f | 15286 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
15287 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15288 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15289 | (eval $ac_try) 2>&5 | |
15290 | ac_status=$? | |
15291 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15292 | (exit $ac_status); }; } | |
8ada417f ZW |
15293 | then |
15294 | gcc_cv_as_alpha_explicit_relocs=yes | |
15295 | else | |
15296 | echo "configure: failed program was" >&5 | |
15297 | cat conftest.s >&5 | |
15298 | fi | |
15299 | rm -f conftest.o conftest.s | |
15300 | fi | |
cafe096b | 15301 | fi |
a6ccdbab EC |
15302 | { echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
15303 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6; } | |
63cf211a | 15304 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
15305 | |
15306 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 15307 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 15308 | _ACEOF |
3a37b08e | 15309 | |
d006f5eb | 15310 | fi |
a6ccdbab EC |
15311 | { echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 |
15312 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6; } | |
d006f5eb RH |
15313 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then |
15314 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15315 | else | |
15316 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
15317 | if test $in_tree_gas = yes; then | |
15318 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
15319 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
15320 | fi | |
15321 | elif test x$gcc_cv_as != x; then | |
15322 | echo ' .set nomacro | |
15323 | .text | |
15324 | ldq $27, a($29) !literal!1 | |
15325 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
15326 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15327 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15328 | (eval $ac_try) 2>&5 | |
15329 | ac_status=$? | |
15330 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15331 | (exit $ac_status); }; } | |
15332 | then | |
15333 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
15334 | else | |
15335 | echo "configure: failed program was" >&5 | |
15336 | cat conftest.s >&5 | |
15337 | fi | |
15338 | rm -f conftest.o conftest.s | |
15339 | fi | |
15340 | fi | |
a6ccdbab EC |
15341 | { echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 |
15342 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6; } | |
d006f5eb RH |
15343 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then |
15344 | ||
15345 | cat >>confdefs.h <<\_ACEOF | |
15346 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
15347 | _ACEOF | |
15348 | ||
86da66b5 HPN |
15349 | fi |
15350 | ;; | |
15351 | ||
15352 | cris-*-*) | |
a6ccdbab EC |
15353 | { echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 |
15354 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6; } | |
86da66b5 HPN |
15355 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then |
15356 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15357 | else | |
15358 | gcc_cv_as_cris_no_mul_bug=no | |
15359 | if test $in_tree_gas = yes; then | |
15360 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
15361 | then gcc_cv_as_cris_no_mul_bug=yes | |
15362 | fi | |
15363 | elif test x$gcc_cv_as != x; then | |
15364 | echo '.text' > conftest.s | |
15365 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
15366 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15367 | (eval $ac_try) 2>&5 | |
15368 | ac_status=$? | |
15369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15370 | (exit $ac_status); }; } | |
15371 | then | |
15372 | gcc_cv_as_cris_no_mul_bug=yes | |
15373 | else | |
15374 | echo "configure: failed program was" >&5 | |
15375 | cat conftest.s >&5 | |
15376 | fi | |
15377 | rm -f conftest.o conftest.s | |
15378 | fi | |
15379 | fi | |
a6ccdbab EC |
15380 | { echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 |
15381 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6; } | |
86da66b5 HPN |
15382 | if test $gcc_cv_as_cris_no_mul_bug = yes; then |
15383 | ||
15384 | cat >>confdefs.h <<\_ACEOF | |
15385 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
15386 | _ACEOF | |
15387 | ||
8ada417f | 15388 | fi |
3a37b08e | 15389 | ;; |
8ada417f | 15390 | |
1cb36a98 | 15391 | sparc*-*-*) |
a6ccdbab EC |
15392 | { echo "$as_me:$LINENO: checking assembler for .register" >&5 |
15393 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6; } | |
ba479fd2 NN |
15394 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then |
15395 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15396 | else |
8ada417f ZW |
15397 | gcc_cv_as_sparc_register_op=no |
15398 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15399 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
15400 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15402 | (eval $ac_try) 2>&5 | |
15403 | ac_status=$? | |
15404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15405 | (exit $ac_status); }; } | |
8ada417f ZW |
15406 | then |
15407 | gcc_cv_as_sparc_register_op=yes | |
15408 | else | |
15409 | echo "configure: failed program was" >&5 | |
15410 | cat conftest.s >&5 | |
15411 | fi | |
15412 | rm -f conftest.o conftest.s | |
15413 | fi | |
cafe096b | 15414 | fi |
a6ccdbab EC |
15415 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
15416 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6; } | |
63cf211a | 15417 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
15418 | |
15419 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15420 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 15421 | _ACEOF |
1cb36a98 | 15422 | |
8ada417f | 15423 | fi |
1cb36a98 | 15424 | |
a6ccdbab EC |
15425 | { echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
15426 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6; } | |
ba479fd2 NN |
15427 | if test "${gcc_cv_as_sparc_relax+set}" = set; then |
15428 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 15429 | else |
8ada417f ZW |
15430 | gcc_cv_as_sparc_relax=no |
15431 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15432 | echo '.text' > conftest.s |
ba479fd2 NN |
15433 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
15434 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15435 | (eval $ac_try) 2>&5 | |
15436 | ac_status=$? | |
15437 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15438 | (exit $ac_status); }; } | |
8ada417f ZW |
15439 | then |
15440 | gcc_cv_as_sparc_relax=yes | |
15441 | else | |
15442 | echo "configure: failed program was" >&5 | |
15443 | cat conftest.s >&5 | |
15444 | fi | |
15445 | rm -f conftest.o conftest.s | |
15446 | fi | |
cafe096b | 15447 | fi |
a6ccdbab EC |
15448 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
15449 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6; } | |
63cf211a | 15450 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
15451 | |
15452 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 15453 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 15454 | _ACEOF |
e95b1e6a | 15455 | |
8ada417f | 15456 | fi |
e95b1e6a | 15457 | |
a6ccdbab EC |
15458 | { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
15459 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6; } | |
ba479fd2 NN |
15460 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then |
15461 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 15462 | else |
8ada417f ZW |
15463 | gcc_cv_as_sparc_ua_pcrel=no |
15464 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15465 | echo '.text |
8ada417f ZW |
15466 | foo: |
15467 | nop | |
15468 | .data | |
15469 | .align 4 | |
15470 | .byte 0 | |
15471 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
15472 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15473 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15474 | (eval $ac_try) 2>&5 | |
15475 | ac_status=$? | |
15476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15477 | (exit $ac_status); }; } | |
8ada417f ZW |
15478 | then |
15479 | if test x$gcc_cv_ld != x \ | |
15480 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
15481 | gcc_cv_as_sparc_ua_pcrel=yes | |
15482 | fi | |
15483 | rm -f conftest | |
15484 | else | |
15485 | echo "configure: failed program was" >&5 | |
15486 | cat conftest.s >&5 | |
15487 | fi | |
15488 | rm -f conftest.o conftest.s | |
15489 | fi | |
cafe096b | 15490 | fi |
a6ccdbab EC |
15491 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
15492 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6; } | |
63cf211a | 15493 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
15494 | |
15495 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 15496 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 15497 | _ACEOF |
17e9e88c | 15498 | |
17e9e88c | 15499 | |
a6ccdbab EC |
15500 | { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
15501 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6; } | |
ba479fd2 NN |
15502 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then |
15503 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 15504 | else |
8ada417f ZW |
15505 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
15506 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15507 | echo '.data |
8ada417f ZW |
15508 | .align 4 |
15509 | .byte 0x31 | |
15510 | .uaword %r_disp32(foo) | |
15511 | .byte 0x32, 0x33, 0x34 | |
15512 | .global foo | |
15513 | .hidden foo | |
15514 | foo: | |
15515 | .skip 4' > conftest.s | |
ba479fd2 NN |
15516 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15517 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15518 | (eval $ac_try) 2>&5 | |
15519 | ac_status=$? | |
15520 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15521 | (exit $ac_status); }; } | |
8ada417f ZW |
15522 | then |
15523 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
15524 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
15525 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
15526 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
15527 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
15528 | | grep 'DISP32' > /dev/null 2>&1; then | |
15529 | : | |
15530 | else | |
15531 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 15532 | fi |
8ada417f ZW |
15533 | fi |
15534 | rm -f conftest | |
15535 | else | |
15536 | echo "configure: failed program was" >&5 | |
15537 | cat conftest.s >&5 | |
15538 | fi | |
15539 | rm -f conftest.o conftest.s | |
15540 | fi | |
cafe096b | 15541 | fi |
a6ccdbab EC |
15542 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
15543 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; } | |
63cf211a | 15544 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
15545 | |
15546 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 15547 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 15548 | _ACEOF |
cf7b8b0d | 15549 | |
8ada417f | 15550 | fi |
ba479fd2 | 15551 | |
8ada417f | 15552 | fi # unaligned pcrel relocs |
cf7b8b0d | 15553 | |
a6ccdbab EC |
15554 | { echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
15555 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6; } | |
ba479fd2 NN |
15556 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then |
15557 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15558 | else |
8ada417f ZW |
15559 | gcc_cv_as_sparc_offsetable_lo10=no |
15560 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15561 | echo '.text |
8ada417f ZW |
15562 | or %g1, %lo(ab) + 12, %g1 |
15563 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
15564 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
15565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15566 | (eval $ac_try) 2>&5 | |
15567 | ac_status=$? | |
15568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15569 | (exit $ac_status); }; } | |
8ada417f ZW |
15570 | then |
15571 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 15572 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 15573 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 15574 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
15575 | fi |
15576 | else | |
15577 | echo "configure: failed program was" >&5 | |
15578 | cat conftest.s >&5 | |
15579 | fi | |
15580 | rm -f conftest.o conftest.s | |
15581 | fi | |
cafe096b | 15582 | fi |
a6ccdbab EC |
15583 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
15584 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6; } | |
63cf211a | 15585 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
15586 | |
15587 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15588 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 15589 | _ACEOF |
1cb36a98 | 15590 | |
8ada417f | 15591 | fi |
1cb36a98 RH |
15592 | ;; |
15593 | ||
c307e6dd | 15594 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
15595 | case $target_os in |
15596 | cygwin* | pe | mingw32*) | |
15597 | # Used for DWARF 2 in PE | |
a6ccdbab EC |
15598 | { echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 |
15599 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6; } | |
d38bc601 BF |
15600 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then |
15601 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15602 | else | |
15603 | gcc_cv_as_ix86_pe_secrel32=no | |
15604 | if test $in_tree_gas = yes; then | |
15605 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
15606 | then gcc_cv_as_ix86_pe_secrel32=yes | |
15607 | fi | |
15608 | elif test x$gcc_cv_as != x; then | |
15609 | echo '.text | |
15610 | foo: nop | |
15611 | .data | |
15612 | .secrel32 foo' > conftest.s | |
15613 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15614 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15615 | (eval $ac_try) 2>&5 | |
15616 | ac_status=$? | |
15617 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15618 | (exit $ac_status); }; } | |
15619 | then | |
15620 | if test x$gcc_cv_ld != x \ | |
15621 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
15622 | gcc_cv_as_ix86_pe_secrel32=yes | |
15623 | fi | |
15624 | rm -f conftest | |
15625 | else | |
15626 | echo "configure: failed program was" >&5 | |
15627 | cat conftest.s >&5 | |
15628 | fi | |
15629 | rm -f conftest.o conftest.s | |
15630 | fi | |
15631 | fi | |
a6ccdbab EC |
15632 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 |
15633 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6; } | |
d38bc601 BF |
15634 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then |
15635 | ||
15636 | cat >>confdefs.h <<\_ACEOF | |
15637 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
15638 | _ACEOF | |
15639 | ||
15640 | fi | |
15641 | ;; | |
15642 | esac | |
15643 | ||
a6ccdbab EC |
15644 | { echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
15645 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6; } | |
ba479fd2 NN |
15646 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then |
15647 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15648 | else |
15649 | gcc_cv_as_ix86_filds_fists=no | |
15650 | if test $in_tree_gas = yes; then | |
15651 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
15652 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 15653 | fi |
8ada417f | 15654 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15655 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
15656 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15657 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15658 | (eval $ac_try) 2>&5 | |
15659 | ac_status=$? | |
15660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15661 | (exit $ac_status); }; } | |
8ada417f ZW |
15662 | then |
15663 | gcc_cv_as_ix86_filds_fists=yes | |
15664 | else | |
15665 | echo "configure: failed program was" >&5 | |
15666 | cat conftest.s >&5 | |
981d4858 | 15667 | fi |
8ada417f ZW |
15668 | rm -f conftest.o conftest.s |
15669 | fi | |
15670 | fi | |
a6ccdbab EC |
15671 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
15672 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6; } | |
63cf211a | 15673 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
15674 | |
15675 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 15676 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 15677 | _ACEOF |
ad9c4d9f | 15678 | |
f6f5dff2 RO |
15679 | fi |
15680 | ||
a6ccdbab EC |
15681 | { echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
15682 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6; } | |
ba479fd2 NN |
15683 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then |
15684 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
15685 | else |
15686 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
15687 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15688 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
15689 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15690 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15691 | (eval $ac_try) 2>&5 | |
15692 | ac_status=$? | |
15693 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15694 | (exit $ac_status); }; } | |
f6f5dff2 RO |
15695 | then |
15696 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
15697 | else | |
15698 | echo "configure: failed program was" >&5 | |
15699 | cat conftest.s >&5 | |
15700 | fi | |
15701 | rm -f conftest.o conftest.s | |
15702 | fi | |
15703 | fi | |
a6ccdbab EC |
15704 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
15705 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6; } | |
63cf211a | 15706 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
15707 | |
15708 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 15709 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 15710 | _ACEOF |
f6f5dff2 | 15711 | |
b6c03bcd RS |
15712 | fi |
15713 | ||
a6ccdbab EC |
15714 | { echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5 |
15715 | echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6; } | |
b6c03bcd RS |
15716 | if test "${gcc_cv_as_ix86_ffreep+set}" = set; then |
15717 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15718 | else | |
15719 | gcc_cv_as_ix86_ffreep=no | |
15720 | if test x$gcc_cv_as != x; then | |
15721 | echo 'ffreep %st(1)' > conftest.s | |
15722 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15724 | (eval $ac_try) 2>&5 | |
15725 | ac_status=$? | |
15726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15727 | (exit $ac_status); }; } | |
15728 | then | |
15729 | gcc_cv_as_ix86_ffreep=yes | |
15730 | else | |
15731 | echo "configure: failed program was" >&5 | |
15732 | cat conftest.s >&5 | |
15733 | fi | |
15734 | rm -f conftest.o conftest.s | |
15735 | fi | |
15736 | fi | |
a6ccdbab EC |
15737 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5 |
15738 | echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6; } | |
b6c03bcd RS |
15739 | if test $gcc_cv_as_ix86_ffreep = yes; then |
15740 | ||
15741 | cat >>confdefs.h <<\_ACEOF | |
15742 | #define HAVE_AS_IX86_FFREEP 1 | |
15743 | _ACEOF | |
15744 | ||
68b92f78 RS |
15745 | fi |
15746 | ||
a6ccdbab EC |
15747 | { echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5 |
15748 | echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6; } | |
68b92f78 RS |
15749 | if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then |
15750 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15751 | else | |
15752 | gcc_cv_as_ix86_diff_sect_delta=no | |
15753 | if test x$gcc_cv_as != x; then | |
15754 | echo '.section .rodata | |
15755 | .L1: | |
15756 | .long .L2-.L1 | |
15757 | .long .L3-.L1 | |
15758 | .text | |
15759 | .L3: nop | |
15760 | .L2: nop' > conftest.s | |
15761 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15762 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15763 | (eval $ac_try) 2>&5 | |
15764 | ac_status=$? | |
15765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15766 | (exit $ac_status); }; } | |
15767 | then | |
15768 | gcc_cv_as_ix86_diff_sect_delta=yes | |
15769 | else | |
15770 | echo "configure: failed program was" >&5 | |
15771 | cat conftest.s >&5 | |
15772 | fi | |
15773 | rm -f conftest.o conftest.s | |
15774 | fi | |
15775 | fi | |
a6ccdbab EC |
15776 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5 |
15777 | echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6; } | |
68b92f78 RS |
15778 | if test $gcc_cv_as_ix86_diff_sect_delta = yes; then |
15779 | ||
15780 | cat >>confdefs.h <<\_ACEOF | |
15781 | #define HAVE_AS_IX86_DIFF_SECT_DELTA 1 | |
15782 | _ACEOF | |
15783 | ||
ad9c4d9f NN |
15784 | fi |
15785 | ||
6f3ca281 ZW |
15786 | # This one is used unconditionally by i386.[ch]; it is to be defined |
15787 | # to 1 if the feature is present, 0 otherwise. | |
a6ccdbab EC |
15788 | { echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
15789 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6; } | |
ba479fd2 NN |
15790 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then |
15791 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15792 | else |
15793 | gcc_cv_as_ix86_gotoff_in_data=no | |
15794 | if test $in_tree_gas = yes; then | |
15795 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15796 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
15797 | fi | |
15798 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15799 | echo ' .text |
f88c65f7 RH |
15800 | .L0: |
15801 | nop | |
15802 | .data | |
8ada417f | 15803 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
15804 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15805 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15806 | (eval $ac_try) 2>&5 | |
15807 | ac_status=$? | |
15808 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15809 | (exit $ac_status); }; } | |
8ada417f ZW |
15810 | then |
15811 | gcc_cv_as_ix86_gotoff_in_data=yes | |
15812 | else | |
15813 | echo "configure: failed program was" >&5 | |
15814 | cat conftest.s >&5 | |
f88c65f7 | 15815 | fi |
8ada417f ZW |
15816 | rm -f conftest.o conftest.s |
15817 | fi | |
15818 | fi | |
a6ccdbab EC |
15819 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
15820 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6; } | |
8ada417f | 15821 | |
6f3ca281 | 15822 | |
ba479fd2 | 15823 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 15824 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 15825 | _ACEOF |
f88c65f7 | 15826 | |
1cb36a98 | 15827 | ;; |
ef1ecf87 RH |
15828 | |
15829 | ia64*-*-*) | |
a6ccdbab EC |
15830 | { echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
15831 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6; } | |
ba479fd2 NN |
15832 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then |
15833 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 15834 | else |
8ada417f ZW |
15835 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
15836 | if test $in_tree_gas = yes; then | |
15837 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15838 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 15839 | fi |
8ada417f | 15840 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15841 | echo ' .text |
ef1ecf87 RH |
15842 | addl r15 = @ltoffx(x#), gp |
15843 | ;; | |
cfa9ee99 | 15844 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
15845 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15846 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15847 | (eval $ac_try) 2>&5 | |
15848 | ac_status=$? | |
15849 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15850 | (exit $ac_status); }; } | |
8ada417f | 15851 | then |
cfa9ee99 | 15852 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
15853 | else |
15854 | echo "configure: failed program was" >&5 | |
15855 | cat conftest.s >&5 | |
2c4a9cff | 15856 | fi |
8ada417f ZW |
15857 | rm -f conftest.o conftest.s |
15858 | fi | |
15859 | fi | |
a6ccdbab EC |
15860 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
15861 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; } | |
63cf211a | 15862 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
15863 | |
15864 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 15865 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 15866 | _ACEOF |
8ada417f | 15867 | |
cfa9ee99 | 15868 | fi |
8ada417f | 15869 | |
2c4a9cff | 15870 | ;; |
8ada417f | 15871 | |
2c4a9cff | 15872 | powerpc*-*-*) |
8ada417f | 15873 | case $target in |
432218ba DE |
15874 | *-*-aix*) conftest_s=' .machine "pwr5" |
15875 | .csect .text[PR] | |
6b37db3c | 15876 | mfcr 3,128';; |
8af4d362 | 15877 | *-*-darwin*) |
a6ccdbab EC |
15878 | { echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 |
15879 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6; } | |
8af4d362 PB |
15880 | if test "${gcc_cv_as_machine_directive+set}" = set; then |
15881 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15882 | else | |
15883 | gcc_cv_as_machine_directive=no | |
15884 | if test x$gcc_cv_as != x; then | |
15885 | echo ' .machine ppc7400' > conftest.s | |
15886 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15887 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15888 | (eval $ac_try) 2>&5 | |
15889 | ac_status=$? | |
15890 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15891 | (exit $ac_status); }; } | |
15892 | then | |
15893 | gcc_cv_as_machine_directive=yes | |
15894 | else | |
15895 | echo "configure: failed program was" >&5 | |
15896 | cat conftest.s >&5 | |
15897 | fi | |
15898 | rm -f conftest.o conftest.s | |
15899 | fi | |
15900 | fi | |
a6ccdbab EC |
15901 | { echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 |
15902 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6; } | |
8af4d362 PB |
15903 | |
15904 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15905 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15906 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15907 | test x$build = x$target && exit 1 | |
15908 | fi | |
15909 | conftest_s=' .text | |
6b37db3c | 15910 | mfcr r3,128';; |
4c67db14 | 15911 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15912 | .text |
6b37db3c | 15913 | mfcr 3,128';; |
8ada417f | 15914 | esac |
8ada417f | 15915 | |
a6ccdbab EC |
15916 | { echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15917 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6; } | |
ba479fd2 NN |
15918 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then |
15919 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15920 | else |
8ada417f ZW |
15921 | gcc_cv_as_powerpc_mfcrf=no |
15922 | if test $in_tree_gas = yes; then | |
15923 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15924 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15925 | fi |
8ada417f | 15926 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15927 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15928 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15929 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15930 | (eval $ac_try) 2>&5 | |
15931 | ac_status=$? | |
15932 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15933 | (exit $ac_status); }; } | |
8ada417f ZW |
15934 | then |
15935 | gcc_cv_as_powerpc_mfcrf=yes | |
15936 | else | |
15937 | echo "configure: failed program was" >&5 | |
15938 | cat conftest.s >&5 | |
15939 | fi | |
15940 | rm -f conftest.o conftest.s | |
15941 | fi | |
2c4a9cff | 15942 | fi |
a6ccdbab EC |
15943 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15944 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6; } | |
63cf211a | 15945 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15946 | |
15947 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15948 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15949 | _ACEOF |
ef1ecf87 | 15950 | |
8ada417f | 15951 | fi |
432218ba DE |
15952 | |
15953 | case $target in | |
15954 | *-*-aix*) conftest_s=' .machine "pwr5" | |
15955 | .csect .text[PR] | |
15956 | popcntb 3,3';; | |
15957 | *) conftest_s=' .machine power5 | |
15958 | .text | |
15959 | popcntb 3,3';; | |
15960 | esac | |
15961 | ||
a6ccdbab EC |
15962 | { echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 |
15963 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6; } | |
432218ba DE |
15964 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then |
15965 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15966 | else | |
15967 | gcc_cv_as_powerpc_popcntb=no | |
15968 | if test $in_tree_gas = yes; then | |
15969 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15970 | then gcc_cv_as_powerpc_popcntb=yes | |
15971 | fi | |
15972 | elif test x$gcc_cv_as != x; then | |
15973 | echo "$conftest_s" > conftest.s | |
15974 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15975 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15976 | (eval $ac_try) 2>&5 | |
15977 | ac_status=$? | |
15978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15979 | (exit $ac_status); }; } | |
15980 | then | |
15981 | gcc_cv_as_powerpc_popcntb=yes | |
15982 | else | |
15983 | echo "configure: failed program was" >&5 | |
15984 | cat conftest.s >&5 | |
15985 | fi | |
15986 | rm -f conftest.o conftest.s | |
15987 | fi | |
15988 | fi | |
a6ccdbab EC |
15989 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 |
15990 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6; } | |
432218ba DE |
15991 | if test $gcc_cv_as_powerpc_popcntb = yes; then |
15992 | ||
15993 | cat >>confdefs.h <<\_ACEOF | |
15994 | #define HAVE_AS_POPCNTB 1 | |
15995 | _ACEOF | |
15996 | ||
9719f3b7 DE |
15997 | fi |
15998 | ||
15999 | case $target in | |
16000 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
16001 | .csect .text[PR] | |
16002 | frin 1,1';; | |
1e04bfdc | 16003 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
16004 | .text |
16005 | frin 1,1';; | |
16006 | esac | |
16007 | ||
a6ccdbab EC |
16008 | { echo "$as_me:$LINENO: checking assembler for fp round support" >&5 |
16009 | echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6; } | |
9719f3b7 DE |
16010 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then |
16011 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16012 | else | |
16013 | gcc_cv_as_powerpc_fprnd=no | |
16014 | if test $in_tree_gas = yes; then | |
16015 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
16016 | then gcc_cv_as_powerpc_fprnd=yes | |
16017 | fi | |
16018 | elif test x$gcc_cv_as != x; then | |
16019 | echo "$conftest_s" > conftest.s | |
16020 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16021 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16022 | (eval $ac_try) 2>&5 | |
16023 | ac_status=$? | |
16024 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16025 | (exit $ac_status); }; } | |
16026 | then | |
16027 | gcc_cv_as_powerpc_fprnd=yes | |
16028 | else | |
16029 | echo "configure: failed program was" >&5 | |
16030 | cat conftest.s >&5 | |
16031 | fi | |
16032 | rm -f conftest.o conftest.s | |
16033 | fi | |
16034 | fi | |
a6ccdbab EC |
16035 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 |
16036 | echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6; } | |
9719f3b7 DE |
16037 | if test $gcc_cv_as_powerpc_fprnd = yes; then |
16038 | ||
16039 | cat >>confdefs.h <<\_ACEOF | |
16040 | #define HAVE_AS_FPRND 1 | |
16041 | _ACEOF | |
16042 | ||
44cd321e PS |
16043 | fi |
16044 | ||
16045 | case $target in | |
16046 | *-*-aix*) conftest_s=' .machine "pwr6" | |
16047 | .csect .text[PR] | |
16048 | mffgpr 1,3';; | |
16049 | *) conftest_s=' .machine power6 | |
16050 | .text | |
16051 | mffgpr 1,3';; | |
16052 | esac | |
16053 | ||
a6ccdbab EC |
16054 | { echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5 |
16055 | echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6; } | |
44cd321e PS |
16056 | if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then |
16057 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16058 | else | |
16059 | gcc_cv_as_powerpc_mfpgpr=no | |
16060 | if test $in_tree_gas = yes; then | |
16061 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
16062 | then gcc_cv_as_powerpc_mfpgpr=yes | |
16063 | fi | |
16064 | elif test x$gcc_cv_as != x; then | |
16065 | echo "$conftest_s" > conftest.s | |
16066 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16067 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16068 | (eval $ac_try) 2>&5 | |
16069 | ac_status=$? | |
16070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16071 | (exit $ac_status); }; } | |
16072 | then | |
16073 | gcc_cv_as_powerpc_mfpgpr=yes | |
16074 | else | |
16075 | echo "configure: failed program was" >&5 | |
16076 | cat conftest.s >&5 | |
16077 | fi | |
16078 | rm -f conftest.o conftest.s | |
16079 | fi | |
16080 | fi | |
a6ccdbab EC |
16081 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5 |
16082 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6; } | |
44cd321e PS |
16083 | if test $gcc_cv_as_powerpc_mfpgpr = yes; then |
16084 | ||
16085 | cat >>confdefs.h <<\_ACEOF | |
16086 | #define HAVE_AS_MFPGPR 1 | |
16087 | _ACEOF | |
16088 | ||
432218ba DE |
16089 | fi |
16090 | ||
7f970b70 AM |
16091 | case $target in |
16092 | *-*-aix*) conftest_s=' .csect .text[PR] | |
16093 | LCF..0: | |
16094 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
16095 | *-*-darwin*) | |
16096 | conftest_s=' .text | |
16097 | LCF0: | |
16098 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
16099 | *) conftest_s=' .text | |
16100 | .LCF0: | |
16101 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
16102 | esac | |
16103 | ||
a6ccdbab EC |
16104 | { echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 |
16105 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6; } | |
7f970b70 AM |
16106 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then |
16107 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16108 | else | |
16109 | gcc_cv_as_powerpc_rel16=no | |
16110 | if test $in_tree_gas = yes; then | |
16111 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
16112 | then gcc_cv_as_powerpc_rel16=yes | |
16113 | fi | |
16114 | elif test x$gcc_cv_as != x; then | |
16115 | echo "$conftest_s" > conftest.s | |
16116 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
16117 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16118 | (eval $ac_try) 2>&5 | |
16119 | ac_status=$? | |
16120 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16121 | (exit $ac_status); }; } | |
16122 | then | |
16123 | gcc_cv_as_powerpc_rel16=yes | |
16124 | else | |
16125 | echo "configure: failed program was" >&5 | |
16126 | cat conftest.s >&5 | |
16127 | fi | |
16128 | rm -f conftest.o conftest.s | |
16129 | fi | |
16130 | fi | |
a6ccdbab EC |
16131 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 |
16132 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6; } | |
7f970b70 AM |
16133 | if test $gcc_cv_as_powerpc_rel16 = yes; then |
16134 | ||
16135 | cat >>confdefs.h <<\_ACEOF | |
16136 | #define HAVE_AS_REL16 1 | |
16137 | _ACEOF | |
16138 | ||
16139 | fi | |
8ada417f ZW |
16140 | ;; |
16141 | ||
16142 | mips*-*-*) | |
a6ccdbab EC |
16143 | { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
16144 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; } | |
ba479fd2 NN |
16145 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then |
16146 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16147 | else |
16148 | gcc_cv_as_mips_explicit_relocs=no | |
16149 | if test $in_tree_gas = yes; then | |
16150 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
16151 | then gcc_cv_as_mips_explicit_relocs=yes | |
16152 | fi | |
16153 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16154 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
16155 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16157 | (eval $ac_try) 2>&5 | |
16158 | ac_status=$? | |
16159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16160 | (exit $ac_status); }; } | |
8ada417f ZW |
16161 | then |
16162 | gcc_cv_as_mips_explicit_relocs=yes | |
16163 | else | |
16164 | echo "configure: failed program was" >&5 | |
16165 | cat conftest.s >&5 | |
ef1ecf87 | 16166 | fi |
8ada417f ZW |
16167 | rm -f conftest.o conftest.s |
16168 | fi | |
16169 | fi | |
a6ccdbab EC |
16170 | { echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
16171 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6; } | |
8ada417f ZW |
16172 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
16173 | if test x$target_cpu_default = x | |
16174 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
16175 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
16176 | fi | |
4551169f | 16177 | fi |
a6ccdbab EC |
16178 | { echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5 |
16179 | echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6; } | |
4551169f RS |
16180 | if test "${gcc_cv_as_mips_no_shared+set}" = set; then |
16181 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16182 | else | |
16183 | gcc_cv_as_mips_no_shared=no | |
16184 | if test $in_tree_gas = yes; then | |
16185 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` | |
16186 | then gcc_cv_as_mips_no_shared=yes | |
16187 | fi | |
16188 | elif test x$gcc_cv_as != x; then | |
16189 | echo 'nop' > conftest.s | |
16190 | if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5' | |
16191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16192 | (eval $ac_try) 2>&5 | |
16193 | ac_status=$? | |
16194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16195 | (exit $ac_status); }; } | |
16196 | then | |
16197 | gcc_cv_as_mips_no_shared=yes | |
16198 | else | |
16199 | echo "configure: failed program was" >&5 | |
16200 | cat conftest.s >&5 | |
16201 | fi | |
16202 | rm -f conftest.o conftest.s | |
16203 | fi | |
16204 | fi | |
a6ccdbab EC |
16205 | { echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5 |
16206 | echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6; } | |
4551169f RS |
16207 | if test $gcc_cv_as_mips_no_shared = yes; then |
16208 | ||
16209 | cat >>confdefs.h <<\_ACEOF | |
16210 | #define HAVE_AS_NO_SHARED 1 | |
16211 | _ACEOF | |
16212 | ||
8ada417f | 16213 | fi |
dbad5e72 SE |
16214 | ;; |
16215 | esac | |
8ada417f | 16216 | |
dbad5e72 SE |
16217 | # Mips and HP-UX need the GNU assembler. |
16218 | # Linux on IA64 might be able to use the Intel assembler. | |
16219 | ||
16220 | case "$target" in | |
16221 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
16222 | if test x$gas_flag = xyes \ |
16223 | || test x"$host" != x"$build" \ | |
16224 | || test ! -x "$gcc_cv_as" \ | |
16225 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
16226 | : | |
16227 | else | |
16228 | echo "*** This configuration requires the GNU assembler" >&2 | |
16229 | exit 1 | |
16230 | fi | |
ef1ecf87 | 16231 | ;; |
1cb36a98 | 16232 | esac |
dbad5e72 | 16233 | |
9d147085 RH |
16234 | # ??? Not all targets support dwarf2 debug_line, even within a version |
16235 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
16236 | # info to the output file. So, as supported targets are added to gas 2.11, | |
16237 | # add some instruction here to (also) show we expect this might work. | |
16238 | # ??? Once 2.11 is released, probably need to add first known working | |
16239 | # version to the per-target configury. | |
16240 | case "$target" in | |
80486e06 | 16241 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 16242 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
bdcee471 | 16243 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-*) |
9d147085 RH |
16244 | insn="nop" |
16245 | ;; | |
57116d8d | 16246 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
16247 | insn="nop 0" |
16248 | ;; | |
2853bc5a HPN |
16249 | mmix-*-*) |
16250 | insn="swym 0" | |
16251 | ;; | |
8ada417f ZW |
16252 | esac |
16253 | if test x"$insn" != x; then | |
16254 | conftest_s="\ | |
16255 | .file 1 \"conftest.s\" | |
16256 | .loc 1 3 0 | |
16257 | $insn" | |
a6ccdbab EC |
16258 | { echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
16259 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6; } | |
ba479fd2 NN |
16260 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then |
16261 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16262 | else |
16263 | gcc_cv_as_dwarf2_debug_line=no | |
16264 | if test $in_tree_gas = yes; then | |
16265 | if test $in_tree_gas_is_elf = yes \ | |
16266 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16267 | then gcc_cv_as_dwarf2_debug_line=yes | |
16268 | fi | |
16269 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16270 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
16271 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16272 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16273 | (eval $ac_try) 2>&5 | |
16274 | ac_status=$? | |
16275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16276 | (exit $ac_status); }; } | |
8ada417f | 16277 | then |
080a5bb0 EB |
16278 | if test x$gcc_cv_objdump != x \ |
16279 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
16280 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
16281 | gcc_cv_as_dwarf2_debug_line=yes |
16282 | fi | |
16283 | else | |
16284 | echo "configure: failed program was" >&5 | |
16285 | cat conftest.s >&5 | |
16286 | fi | |
16287 | rm -f conftest.o conftest.s | |
16288 | fi | |
16289 | fi | |
a6ccdbab EC |
16290 | { echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
16291 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6; } | |
ad9c4d9f | 16292 | |
ad9c4d9f | 16293 | |
8ada417f ZW |
16294 | # The .debug_line file table must be in the exact order that |
16295 | # we specified the files, since these indices are also used | |
16296 | # by DW_AT_decl_file. Approximate this test by testing if | |
16297 | # the assembler bitches if the same index is assigned twice. | |
a6ccdbab EC |
16298 | { echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
16299 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6; } | |
ba479fd2 NN |
16300 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then |
16301 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16302 | else |
16303 | gcc_cv_as_dwarf2_file_buggy=no | |
16304 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 16305 | echo ' .file 1 "foo.s" |
8ada417f | 16306 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
16307 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16308 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16309 | (eval $ac_try) 2>&5 | |
16310 | ac_status=$? | |
16311 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16312 | (exit $ac_status); }; } | |
8ada417f ZW |
16313 | then |
16314 | gcc_cv_as_dwarf2_file_buggy=yes | |
16315 | else | |
16316 | echo "configure: failed program was" >&5 | |
16317 | cat conftest.s >&5 | |
16318 | fi | |
16319 | rm -f conftest.o conftest.s | |
16320 | fi | |
ad9c4d9f | 16321 | fi |
a6ccdbab EC |
16322 | { echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
16323 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6; } | |
8ada417f ZW |
16324 | |
16325 | ||
16326 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
16327 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
16328 | |
16329 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 16330 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 16331 | _ACEOF |
9d147085 | 16332 | |
8ada417f | 16333 | fi |
ad9c4d9f | 16334 | |
a6ccdbab EC |
16335 | { echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
16336 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6; } | |
ba479fd2 NN |
16337 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then |
16338 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16339 | else |
16340 | gcc_cv_as_gdwarf2_flag=no | |
16341 | if test $in_tree_gas = yes; then | |
16342 | if test $in_tree_gas_is_elf = yes \ | |
16343 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16344 | then gcc_cv_as_gdwarf2_flag=yes | |
16345 | fi | |
16346 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16347 | echo "$insn" > conftest.s |
ba479fd2 NN |
16348 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
16349 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16350 | (eval $ac_try) 2>&5 | |
16351 | ac_status=$? | |
16352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16353 | (exit $ac_status); }; } | |
8ada417f ZW |
16354 | then |
16355 | gcc_cv_as_gdwarf2_flag=yes | |
16356 | else | |
16357 | echo "configure: failed program was" >&5 | |
16358 | cat conftest.s >&5 | |
16359 | fi | |
16360 | rm -f conftest.o conftest.s | |
16361 | fi | |
ad9c4d9f | 16362 | fi |
a6ccdbab EC |
16363 | { echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
16364 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6; } | |
63cf211a | 16365 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
16366 | |
16367 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 16368 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 16369 | _ACEOF |
5f0e9ea2 GK |
16370 | |
16371 | fi | |
ad9c4d9f | 16372 | |
a6ccdbab EC |
16373 | { echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
16374 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6; } | |
ba479fd2 NN |
16375 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then |
16376 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16377 | else |
16378 | gcc_cv_as_gstabs_flag=no | |
16379 | if test $in_tree_gas = yes; then | |
16380 | if test $in_tree_gas_is_elf = yes \ | |
16381 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16382 | then gcc_cv_as_gstabs_flag=yes | |
16383 | fi | |
16384 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16385 | echo "$insn" > conftest.s |
ba479fd2 NN |
16386 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
16387 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16388 | (eval $ac_try) 2>&5 | |
16389 | ac_status=$? | |
16390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16391 | (exit $ac_status); }; } | |
8ada417f ZW |
16392 | then |
16393 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
16394 | # and warns about it, but still exits successfully. So check for | |
16395 | # this. | |
ba479fd2 NN |
16396 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
16397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16398 | (eval $ac_try) 2>&5 | |
16399 | ac_status=$? | |
16400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16401 | (exit $ac_status); }; } | |
8ada417f ZW |
16402 | then : |
16403 | else gcc_cv_as_gstabs_flag=yes | |
16404 | fi | |
16405 | else | |
16406 | echo "configure: failed program was" >&5 | |
16407 | cat conftest.s >&5 | |
16408 | fi | |
16409 | rm -f conftest.o conftest.s | |
16410 | fi | |
ad9c4d9f | 16411 | fi |
a6ccdbab EC |
16412 | { echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
16413 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6; } | |
63cf211a | 16414 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
16415 | |
16416 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 16417 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 16418 | _ACEOF |
5f0e9ea2 GK |
16419 | |
16420 | fi | |
8ada417f | 16421 | fi |
5f0e9ea2 | 16422 | |
a6ccdbab EC |
16423 | { echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
16424 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6; } | |
96d0f4dc | 16425 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 16426 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
16427 | 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 \ |
16428 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
16429 | gcc_cv_ld_ro_rw_mix=read-write |
16430 | fi | |
16431 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
16432 | echo '.section myfoosect, "a"' > conftest1.s |
16433 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 16434 | echo '.byte 1' >> conftest2.s |
90e145da | 16435 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 16436 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
16437 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
16438 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
16439 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 16440 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 16441 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 16442 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 16443 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
16444 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
16445 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
16446 | gcc_cv_ld_ro_rw_mix=read-only | |
16447 | else | |
16448 | gcc_cv_ld_ro_rw_mix=read-write | |
16449 | fi | |
16450 | fi | |
16451 | fi | |
16452 | rm -f conftest.* conftest[123].* | |
16453 | fi | |
16454 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
16455 | |
16456 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 16457 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 16458 | _ACEOF |
96d0f4dc JJ |
16459 | |
16460 | fi | |
a6ccdbab EC |
16461 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
16462 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6; } | |
96d0f4dc | 16463 | |
a6ccdbab EC |
16464 | { echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
16465 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6; } | |
275b60d6 | 16466 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 16467 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
16468 | 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 \ |
16469 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
16470 | gcc_cv_ld_eh_frame_hdr=yes |
16471 | fi | |
16472 | elif test x$gcc_cv_ld != x; then | |
16473 | # Check if linker supports --eh-frame-hdr option | |
16474 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
16475 | gcc_cv_ld_eh_frame_hdr=yes | |
16476 | fi | |
16477 | fi | |
232b67d9 | 16478 | |
275b60d6 | 16479 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
16480 | |
16481 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 16482 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 16483 | _ACEOF |
275b60d6 JJ |
16484 | |
16485 | fi | |
a6ccdbab EC |
16486 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
16487 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6; } | |
275b60d6 | 16488 | |
a6ccdbab EC |
16489 | { echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
16490 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6; } | |
24a4dd31 JJ |
16491 | gcc_cv_ld_pie=no |
16492 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
16493 | 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 \ |
16494 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
16495 | gcc_cv_ld_pie=yes |
16496 | fi | |
16497 | elif test x$gcc_cv_ld != x; then | |
16498 | # Check if linker supports -pie option | |
16499 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
16500 | gcc_cv_ld_pie=yes | |
16501 | fi | |
16502 | fi | |
16503 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
16504 | |
16505 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 16506 | #define HAVE_LD_PIE 1 |
ba479fd2 | 16507 | _ACEOF |
24a4dd31 JJ |
16508 | |
16509 | fi | |
a6ccdbab EC |
16510 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
16511 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6; } | |
24a4dd31 | 16512 | |
a6ccdbab EC |
16513 | { echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5 |
16514 | echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6; } | |
22ba88ef EB |
16515 | gcc_cv_ld_eh_gc_sections=no |
16516 | if test $in_tree_ld = yes ; then | |
16517 | 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 \ | |
16518 | && test $in_tree_ld_is_elf = yes; then | |
16519 | gcc_cv_ld_eh_gc_sections=yes | |
16520 | fi | |
16521 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
16522 | cat > conftest.s <<EOF | |
16523 | .section .text | |
16524 | .globl _start | |
16525 | .type _start, @function | |
16526 | _start: | |
16527 | .long foo | |
16528 | .size _start, .-_start | |
16529 | .section .text.foo,"ax",@progbits | |
16530 | .type foo, @function | |
16531 | foo: | |
16532 | .long 0 | |
16533 | .size foo, .-foo | |
16534 | .section .gcc_except_table.foo,"a",@progbits | |
16535 | .L0: | |
16536 | .long 0 | |
16537 | .section .eh_frame,"a",@progbits | |
16538 | .long .L0 | |
16539 | EOF | |
16540 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
16541 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
16542 | | grep "gc-sections option ignored" > /dev/null; then | |
16543 | gcc_cv_ld_eh_gc_sections=no | |
16544 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
16545 | gcc_cv_ld_eh_gc_sections=yes | |
e9d207d9 EB |
16546 | # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections. |
16547 | if test x$gcc_cv_as_comdat_group != xyes; then | |
16548 | gcc_cv_ld_eh_gc_sections=no | |
16549 | cat > conftest.s <<EOF | |
16550 | .section .text | |
16551 | .globl _start | |
16552 | .type _start, @function | |
16553 | _start: | |
16554 | .long foo | |
16555 | .size _start, .-_start | |
16556 | .section .gnu.linkonce.t.foo,"ax",@progbits | |
16557 | .type foo, @function | |
16558 | foo: | |
16559 | .long 0 | |
16560 | .size foo, .-foo | |
16561 | .section .gcc_except_table.foo,"a",@progbits | |
16562 | .L0: | |
16563 | .long 0 | |
16564 | .section .eh_frame,"a",@progbits | |
16565 | .long .L0 | |
16566 | EOF | |
16567 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
16568 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
16569 | | grep "gc-sections option ignored" > /dev/null; then | |
16570 | gcc_cv_ld_eh_gc_sections=no | |
16571 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
16572 | gcc_cv_ld_eh_gc_sections=yes | |
16573 | fi | |
16574 | fi | |
16575 | fi | |
22ba88ef EB |
16576 | fi |
16577 | fi | |
16578 | rm -f conftest.s conftest.o conftest | |
16579 | fi | |
e9d207d9 EB |
16580 | case "$target" in |
16581 | hppa*-*-linux*) | |
16582 | # ??? This apparently exposes a binutils bug with PC-relative relocations. | |
16583 | gcc_cv_ld_eh_gc_sections=no | |
16584 | ;; | |
16585 | esac | |
22ba88ef EB |
16586 | if test x$gcc_cv_ld_eh_gc_sections = xyes; then |
16587 | ||
16588 | cat >>confdefs.h <<\_ACEOF | |
16589 | #define HAVE_LD_EH_GC_SECTIONS 1 | |
16590 | _ACEOF | |
16591 | ||
16592 | fi | |
a6ccdbab EC |
16593 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5 |
16594 | echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6; } | |
22ba88ef | 16595 | |
8bb915b6 NN |
16596 | # -------- |
16597 | # UNSORTED | |
16598 | # -------- | |
16599 | ||
a6ccdbab EC |
16600 | { echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
16601 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6; } | |
82e923f6 RS |
16602 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
16603 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16604 | else | |
16605 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
16606 | if test $in_tree_ld = yes ; then |
16607 | 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 \ | |
16608 | && test $in_tree_ld_is_elf = yes; then | |
16609 | gcc_cv_ld_as_needed=yes | |
16610 | fi | |
16611 | elif test x$gcc_cv_ld != x; then | |
16612 | # Check if linker supports --as-needed and --no-as-needed options | |
16613 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
16614 | gcc_cv_ld_as_needed=yes | |
16615 | fi | |
16616 | fi | |
82e923f6 RS |
16617 | |
16618 | fi | |
a6ccdbab EC |
16619 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 |
16620 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6; } | |
765f1bf9 AM |
16621 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
16622 | ||
16623 | cat >>confdefs.h <<\_ACEOF | |
16624 | #define HAVE_LD_AS_NEEDED 1 | |
16625 | _ACEOF | |
16626 | ||
16627 | fi | |
765f1bf9 | 16628 | |
d82bf747 AM |
16629 | case "$target:$tm_file" in |
16630 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
a6ccdbab EC |
16631 | { echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
16632 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6; } | |
85b776df AM |
16633 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then |
16634 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16635 | else | |
16636 | gcc_cv_ld_no_dot_syms=no | |
16637 | if test $in_tree_ld = yes ; then | |
16638 | 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 | |
16639 | gcc_cv_ld_no_dot_syms=yes | |
16640 | fi | |
16641 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
16642 | cat > conftest1.s <<EOF | |
16643 | .text | |
16644 | bl .foo | |
16645 | EOF | |
16646 | cat > conftest2.s <<EOF | |
16647 | .section ".opd","aw" | |
16648 | .align 3 | |
16649 | .globl foo | |
16650 | .type foo,@function | |
16651 | foo: | |
16652 | .quad .LEfoo,.TOC.@tocbase,0 | |
16653 | .text | |
16654 | .LEfoo: | |
16655 | blr | |
16656 | .size foo,.-.LEfoo | |
16657 | EOF | |
16658 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
16659 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
16660 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
16661 | gcc_cv_ld_no_dot_syms=yes | |
16662 | fi | |
16663 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
16664 | fi | |
16665 | ||
16666 | fi | |
a6ccdbab EC |
16667 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 |
16668 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6; } | |
85b776df AM |
16669 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then |
16670 | ||
16671 | cat >>confdefs.h <<\_ACEOF | |
16672 | #define HAVE_LD_NO_DOT_SYMS 1 | |
16673 | _ACEOF | |
16674 | ||
16675 | fi | |
16676 | ;; | |
16677 | esac | |
16678 | ||
a6ccdbab EC |
16679 | { echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
16680 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6; } | |
380e5ca4 MM |
16681 | if test "${gcc_cv_ld_sysroot+set}" = set; then |
16682 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16683 | else | |
16684 | gcc_cv_ld_sysroot=no | |
16685 | if test $in_tree_ld = yes ; then | |
16686 | 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 | 16687 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
16688 | fi |
16689 | elif test x$gcc_cv_ld != x; then | |
16690 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
16691 | gcc_cv_ld_sysroot=yes | |
16692 | fi | |
16693 | fi | |
16694 | fi | |
a6ccdbab EC |
16695 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 |
16696 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6; } | |
380e5ca4 MM |
16697 | if test x"$gcc_cv_ld_sysroot" = xyes; then |
16698 | ||
16699 | cat >>confdefs.h <<\_ACEOF | |
16700 | #define HAVE_LD_SYSROOT 1 | |
16701 | _ACEOF | |
16702 | ||
16703 | fi | |
16704 | ||
9fb28a67 | 16705 | if test x$with_sysroot = x && test x$host = x$target \ |
c794c06f CD |
16706 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ |
16707 | && test "$prefix" != "NONE"; then | |
ba479fd2 NN |
16708 | |
16709 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 16710 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 16711 | _ACEOF |
793e9558 PB |
16712 | |
16713 | fi | |
16714 | ||
77008252 | 16715 | # Test for stack protector support in target C library. |
a6ccdbab EC |
16716 | { echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5 |
16717 | echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6; } | |
77008252 JJ |
16718 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then |
16719 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16720 | else | |
16721 | gcc_cv_libc_provides_ssp=no | |
a6ccdbab EC |
16722 | case "$target" in |
16723 | *-*-linux*) | |
77008252 JJ |
16724 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then |
16725 | if test "x$with_sysroot" = x; then | |
16726 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
16727 | elif test "x$with_sysroot" = xyes; then | |
16728 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
16729 | else | |
16730 | glibc_header_dir="${with_sysroot}/usr/include" | |
16731 | fi | |
16732 | else | |
16733 | glibc_header_dir=/usr/include | |
16734 | fi | |
16735 | # glibc 2.4 and later provides __stack_chk_fail and | |
16736 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
16737 | if test -f $glibc_header_dir/features.h \ | |
16738 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
16739 | $glibc_header_dir/features.h > /dev/null; then | |
16740 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
16741 | $glibc_header_dir/features.h > /dev/null; then | |
16742 | gcc_cv_libc_provides_ssp=yes | |
16743 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
16744 | $glibc_header_dir/features.h > /dev/null \ | |
16745 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
16746 | $glibc_header_dir/features.h > /dev/null; then | |
16747 | gcc_cv_libc_provides_ssp=yes | |
16748 | fi | |
a6ccdbab EC |
16749 | fi |
16750 | ;; | |
16751 | *-*-darwin*) | |
16752 | { echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5 | |
16753 | echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6; } | |
16754 | if test "${ac_cv_func___stack_chk_fail+set}" = set; then | |
16755 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16756 | else | |
16757 | cat >conftest.$ac_ext <<_ACEOF | |
16758 | /* confdefs.h. */ | |
16759 | _ACEOF | |
16760 | cat confdefs.h >>conftest.$ac_ext | |
16761 | cat >>conftest.$ac_ext <<_ACEOF | |
16762 | /* end confdefs.h. */ | |
16763 | /* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail. | |
16764 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
16765 | #define __stack_chk_fail innocuous___stack_chk_fail | |
16766 | ||
16767 | /* System header to define __stub macros and hopefully few prototypes, | |
16768 | which can conflict with char __stack_chk_fail (); below. | |
16769 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
16770 | <limits.h> exists even on freestanding compilers. */ | |
16771 | ||
16772 | #ifdef __STDC__ | |
16773 | # include <limits.h> | |
16774 | #else | |
16775 | # include <assert.h> | |
16776 | #endif | |
16777 | ||
16778 | #undef __stack_chk_fail | |
16779 | ||
16780 | /* Override any GCC internal prototype to avoid an error. | |
16781 | Use char because int might match the return type of a GCC | |
16782 | builtin and then its argument prototype would still apply. */ | |
16783 | #ifdef __cplusplus | |
16784 | extern "C" | |
16785 | #endif | |
16786 | char __stack_chk_fail (); | |
16787 | /* The GNU C library defines this for functions which it implements | |
16788 | to always fail with ENOSYS. Some functions are actually named | |
16789 | something starting with __ and the normal name is an alias. */ | |
16790 | #if defined __stub___stack_chk_fail || defined __stub_____stack_chk_fail | |
16791 | choke me | |
16792 | #endif | |
16793 | ||
16794 | int | |
16795 | main () | |
16796 | { | |
16797 | return __stack_chk_fail (); | |
16798 | ; | |
16799 | return 0; | |
16800 | } | |
16801 | _ACEOF | |
16802 | rm -f conftest.$ac_objext conftest$ac_exeext | |
16803 | if { (ac_try="$ac_link" | |
16804 | case "(($ac_try" in | |
16805 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
16806 | *) ac_try_echo=$ac_try;; | |
16807 | esac | |
16808 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
16809 | (eval "$ac_link") 2>conftest.er1 | |
16810 | ac_status=$? | |
16811 | grep -v '^ *+' conftest.er1 >conftest.err | |
16812 | rm -f conftest.er1 | |
16813 | cat conftest.err >&5 | |
16814 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16815 | (exit $ac_status); } && { | |
16816 | test -z "$ac_c_werror_flag" || | |
16817 | test ! -s conftest.err | |
16818 | } && test -s conftest$ac_exeext && | |
16819 | $as_test_x conftest$ac_exeext; then | |
16820 | ac_cv_func___stack_chk_fail=yes | |
16821 | else | |
16822 | echo "$as_me: failed program was:" >&5 | |
16823 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16824 | ||
16825 | ac_cv_func___stack_chk_fail=no | |
16826 | fi | |
16827 | ||
16828 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
16829 | conftest$ac_exeext conftest.$ac_ext | |
16830 | fi | |
16831 | { echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5 | |
16832 | echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6; } | |
16833 | if test $ac_cv_func___stack_chk_fail = yes; then | |
16834 | gcc_cv_libc_provides_ssp=yes | |
16835 | else | |
16836 | echo "no __stack_chk_fail on this target" | |
77008252 | 16837 | fi |
a6ccdbab EC |
16838 | |
16839 | ;; | |
77008252 | 16840 | *) gcc_cv_libc_provides_ssp=no ;; |
a6ccdbab EC |
16841 | esac |
16842 | fi | |
16843 | { echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
16844 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6; } | |
16845 | ||
77008252 JJ |
16846 | if test x$gcc_cv_libc_provides_ssp = xyes; then |
16847 | ||
16848 | cat >>confdefs.h <<\_ACEOF | |
16849 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
16850 | _ACEOF | |
16851 | ||
16852 | fi | |
16853 | ||
ed965309 JJ |
16854 | # Check if TFmode long double should be used by default or not. |
16855 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
16856 | # and later they can use TFmode. | |
16857 | case "$target" in | |
16858 | powerpc*-*-*gnu* | \ | |
16859 | sparc*-*-linux* | \ | |
16860 | s390*-*-linux* | \ | |
16861 | alpha*-*-linux*) | |
16862 | ||
a6ccdbab | 16863 | # Check whether --with-long-double-128 was given. |
ed965309 | 16864 | if test "${with_long_double_128+set}" = set; then |
a6ccdbab | 16865 | withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128" |
ed965309 JJ |
16866 | else |
16867 | gcc_cv_target_ldbl128=no | |
16868 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
16869 | if test "x$with_sysroot" = x; then | |
16870 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
16871 | elif test "x$with_sysroot" = xyes; then | |
16872 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
16873 | else | |
16874 | glibc_header_dir="${with_sysroot}/usr/include" | |
16875 | fi | |
16876 | else | |
16877 | glibc_header_dir=/usr/include | |
16878 | fi | |
65280f6c | 16879 | grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ |
ed965309 JJ |
16880 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ |
16881 | && gcc_cv_target_ldbl128=yes | |
65280f6c | 16882 | |
a6ccdbab EC |
16883 | fi |
16884 | ||
ed965309 JJ |
16885 | ;; |
16886 | esac | |
16887 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
16888 | ||
16889 | cat >>confdefs.h <<\_ACEOF | |
16890 | #define TARGET_DEFAULT_LONG_DOUBLE_128 1 | |
16891 | _ACEOF | |
16892 | ||
16893 | fi | |
16894 | ||
81bf3d9e | 16895 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 16896 | |
a6ccdbab | 16897 | # Check whether --with-gc was given. |
81bf3d9e | 16898 | if test "${with_gc+set}" = set; then |
a6ccdbab | 16899 | withval=$with_gc; case "$withval" in |
08cee789 | 16900 | page) |
81bf3d9e | 16901 | GGC=ggc-$withval |
08cee789 DJ |
16902 | ;; |
16903 | zone) | |
16904 | GGC=ggc-$withval | |
16905 | ||
16906 | cat >>confdefs.h <<\_ACEOF | |
16907 | #define GGC_ZONE 1 | |
16908 | _ACEOF | |
16909 | ||
81bf3d9e RH |
16910 | ;; |
16911 | *) | |
ba479fd2 NN |
16912 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
16913 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
16914 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
16915 | ;; |
16916 | esac | |
16917 | else | |
005537df | 16918 | GGC=ggc-page |
a6ccdbab EC |
16919 | fi |
16920 | ||
81bf3d9e RH |
16921 | |
16922 | echo "Using $GGC for garbage collection." | |
16923 | ||
3c809ba4 | 16924 | # Use the system's zlib library. |
b8dad04b ZW |
16925 | zlibdir=-L../zlib |
16926 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 16927 | |
a6ccdbab | 16928 | # Check whether --with-system-zlib was given. |
3c809ba4 | 16929 | if test "${with_system_zlib+set}" = set; then |
a6ccdbab | 16930 | withval=$with_system_zlib; zlibdir= |
3c809ba4 AG |
16931 | zlibinc= |
16932 | ||
a6ccdbab EC |
16933 | fi |
16934 | ||
3c809ba4 AG |
16935 | |
16936 | ||
dc6746e7 | 16937 | |
b8ec3cc8 | 16938 | |
a6ccdbab EC |
16939 | { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
16940 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } | |
16941 | # Check whether --enable-maintainer-mode was given. | |
dc6746e7 | 16942 | if test "${enable_maintainer_mode+set}" = set; then |
a6ccdbab | 16943 | enableval=$enable_maintainer_mode; maintainer_mode=$enableval |
dc6746e7 PT |
16944 | else |
16945 | maintainer_mode=no | |
a6ccdbab | 16946 | fi |
63cf211a | 16947 | |
a6ccdbab EC |
16948 | |
16949 | { echo "$as_me:$LINENO: result: $maintainer_mode" >&5 | |
16950 | echo "${ECHO_T}$maintainer_mode" >&6; } | |
dc6746e7 PT |
16951 | |
16952 | if test "$maintainer_mode" = "yes"; then | |
16953 | MAINT='' | |
16954 | else | |
16955 | MAINT='#' | |
16956 | fi | |
16957 | ||
8bb915b6 NN |
16958 | # -------------- |
16959 | # Language hooks | |
16960 | # -------------- | |
16961 | ||
861bb6c1 JL |
16962 | # Make empty files to contain the specs and options for each language. |
16963 | # Then add #include lines to for a compiler that has specs and/or options. | |
16964 | ||
cc11cc9b | 16965 | subdirs= |
d7b42618 | 16966 | lang_opt_files= |
861bb6c1 | 16967 | lang_specs_files= |
3103b7db | 16968 | lang_tree_files= |
861bb6c1 JL |
16969 | # These (without "all_") are set in each config-lang.in. |
16970 | # `language' must be a single word so is spelled singularly. | |
16971 | all_languages= | |
16972 | all_boot_languages= | |
16973 | all_compilers= | |
16974 | all_stagestuff= | |
fa958513 | 16975 | all_outputs='Makefile gccbug libada-mk' |
861bb6c1 | 16976 | # List of language makefile fragments. |
2ed26f6b ZW |
16977 | all_lang_makefrags= |
16978 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 16979 | all_lang_makefiles= |
e2500fed | 16980 | # Files for gengtype |
ef69da62 | 16981 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
16982 | # Files for gengtype with language |
16983 | all_gtfiles_files_langs= | |
16984 | all_gtfiles_files_files= | |
861bb6c1 | 16985 | |
cc11cc9b PB |
16986 | # These are the languages that are set in --enable-languages, |
16987 | # and are available in the GCC tree. | |
16988 | all_selected_languages= | |
16989 | ||
861bb6c1 JL |
16990 | # Add the language fragments. |
16991 | # Languages are added via two mechanisms. Some information must be | |
16992 | # recorded in makefile variables, these are defined in config-lang.in. | |
16993 | # We accumulate them and plug them into the main Makefile. | |
16994 | # The other mechanism is a set of hooks for each of the main targets | |
16995 | # like `clean', `install', etc. | |
16996 | ||
861bb6c1 | 16997 | language_hooks="Make-hooks" |
861bb6c1 | 16998 | |
cc11cc9b | 16999 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 17000 | do |
1546bb64 PB |
17001 | test "$lang" = "${srcdir}/*/config-lang.in" && continue |
17002 | ||
cc11cc9b PB |
17003 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` |
17004 | if test "x$lang_alias" = x | |
17005 | then | |
17006 | echo "$lang doesn't set \$language." 1>&2 | |
17007 | exit 1 | |
17008 | fi | |
17009 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
17010 | subdirs="$subdirs $subdir" | |
17011 | case ",$enable_languages," in | |
17012 | *,$lang_alias,*) | |
17013 | all_selected_languages="$all_selected_languages $lang_alias" | |
17014 | if test -f $srcdir/$subdir/lang-specs.h; then | |
17015 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
17016 | fi | |
17017 | ;; | |
17018 | esac | |
17019 | ||
cc11cc9b PB |
17020 | language= |
17021 | boot_language= | |
17022 | compilers= | |
17023 | stagestuff= | |
17024 | outputs= | |
17025 | gtfiles= | |
1546bb64 | 17026 | subdir_requires= |
cc11cc9b PB |
17027 | . ${srcdir}/$subdir/config-lang.in |
17028 | if test "x$language" = x | |
17029 | then | |
17030 | echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 | |
17031 | exit 1 | |
17032 | fi | |
1546bb64 PB |
17033 | |
17034 | ok=: | |
17035 | case ",$enable_languages," in | |
17036 | *,$lang_alias,*) ;; | |
17037 | *) | |
17038 | for i in $subdir_requires; do | |
b6348cb3 | 17039 | test -f "${srcdir}/$i/config-lang.in" && continue |
1546bb64 PB |
17040 | ok=false |
17041 | break | |
17042 | done | |
17043 | ;; | |
17044 | esac | |
17045 | $ok || continue | |
17046 | ||
cc11cc9b | 17047 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" |
1546bb64 PB |
17048 | if test -f $srcdir/$subdir/lang.opt; then |
17049 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
17050 | fi | |
17051 | if test -f $srcdir/$subdir/$subdir-tree.def; then | |
17052 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
17053 | fi | |
cc11cc9b PB |
17054 | if test -f ${srcdir}/$subdir/Makefile.in |
17055 | then all_lang_makefiles="$subdir/Makefile" | |
17056 | fi | |
17057 | all_languages="$all_languages $language" | |
17058 | if test "x$boot_language" = xyes | |
17059 | then | |
17060 | all_boot_languages="$all_boot_languages $language" | |
17061 | fi | |
17062 | all_compilers="$all_compilers $compilers" | |
17063 | all_stagestuff="$all_stagestuff $stagestuff" | |
17064 | all_outputs="$all_outputs $outputs" | |
17065 | all_gtfiles="$all_gtfiles $gtfiles" | |
1546bb64 PB |
17066 | for f in $gtfiles |
17067 | do | |
17068 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " | |
17069 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
17070 | done | |
861bb6c1 JL |
17071 | done |
17072 | ||
8ac9d31f TJ |
17073 | # Pick up gtfiles for c |
17074 | gtfiles= | |
cc11cc9b | 17075 | subdir="c" |
8ac9d31f TJ |
17076 | . ${srcdir}/c-config-lang.in |
17077 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 17078 | for f in $gtfiles |
8ac9d31f | 17079 | do |
cc11cc9b | 17080 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " |
8ac9d31f | 17081 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " |
8ac9d31f TJ |
17082 | done |
17083 | ||
cbc59f01 | 17084 | check_languages= |
cc11cc9b | 17085 | for language in $all_selected_languages |
cbc59f01 | 17086 | do |
cc11cc9b | 17087 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
17088 | done |
17089 | ||
62b81e45 | 17090 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 17091 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
17092 | |
17093 | rm -f Make-hooks | |
17094 | touch Make-hooks | |
bd97af06 | 17095 | target_list="all.cross start.encap rest.encap tags \ |
b5422ad7 | 17096 | install-common install-man install-info dvi pdf html \ |
a541f69d | 17097 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 17098 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 17099 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
cc11cc9b | 17100 | |
861bb6c1 JL |
17101 | for t in $target_list |
17102 | do | |
17103 | x= | |
cc11cc9b | 17104 | for lang in $all_selected_languages |
861bb6c1 | 17105 | do |
cc11cc9b | 17106 | x="$x $lang.$t" |
861bb6c1 JL |
17107 | done |
17108 | echo "lang.$t: $x" >> Make-hooks | |
17109 | done | |
17110 | ||
8bb915b6 NN |
17111 | # -------- |
17112 | # UNSORTED | |
17113 | # -------- | |
17114 | ||
cc06d68c | 17115 | # Create .gdbinit. |
861bb6c1 | 17116 | |
cc06d68c GP |
17117 | echo "dir ." > .gdbinit |
17118 | echo "dir ${srcdir}" >> .gdbinit | |
17119 | if test x$gdb_needs_out_file_path = xyes | |
17120 | then | |
17121 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
17122 | fi | |
17123 | if test "x$subdirs" != x; then | |
17124 | for s in $subdirs | |
17125 | do | |
17126 | echo "dir ${srcdir}/$s" >> .gdbinit | |
17127 | done | |
861bb6c1 | 17128 | fi |
cc06d68c | 17129 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 17130 | |
8f8d3278 NC |
17131 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
17132 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
17133 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
17134 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
17135 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
17136 | # make and thus we'd get different behavior depending on where we built the | |
17137 | # sources. | |
5949a9fc | 17138 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 17139 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 17140 | else |
8f8d3278 NC |
17141 | # An explanation of the sed strings: |
17142 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
17143 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
17144 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 17145 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
17146 | # |
17147 | # (*) Note this pattern overwrites the first character of the string | |
17148 | # with a forward slash if one is not already present. This is not a | |
17149 | # problem because the exact names of the sub-directories concerned is | |
17150 | # unimportant, just the number of them matters. | |
17151 | # | |
17152 | # The practical upshot of these patterns is like this: | |
17153 | # | |
17154 | # prefix exec_prefix result | |
17155 | # ------ ----------- ------ | |
17156 | # /foo /foo/bar ../ | |
17157 | # /foo/ /foo/bar ../ | |
17158 | # /foo /foo/bar/ ../ | |
17159 | # /foo/ /foo/bar/ ../ | |
17160 | # /foo /foo/bar/ugg ../../ | |
17161 | # | |
4c112cda | 17162 | dollar='$$' |
caa55b1e | 17163 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
17164 | fi |
17165 | ||
17166 | ||
2ce3c6c6 | 17167 | |
2bbea3a6 RH |
17168 | # Find a directory in which to install a shared libgcc. |
17169 | ||
a6ccdbab | 17170 | # Check whether --enable-version-specific-runtime-libs was given. |
2bbea3a6 | 17171 | if test "${enable_version_specific_runtime_libs+set}" = set; then |
a6ccdbab EC |
17172 | enableval=$enable_version_specific_runtime_libs; |
17173 | fi | |
ba479fd2 | 17174 | |
2bbea3a6 RH |
17175 | |
17176 | ||
a6ccdbab | 17177 | # Check whether --with-slibdir was given. |
5b15f277 | 17178 | if test "${with_slibdir+set}" = set; then |
a6ccdbab | 17179 | withval=$with_slibdir; slibdir="$with_slibdir" |
5b15f277 RH |
17180 | else |
17181 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 17182 | slibdir='$(libsubdir)' |
5b15f277 | 17183 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
17184 | slibdir='$(build_tooldir)/lib' |
17185 | else | |
5b15f277 | 17186 | slibdir='$(libdir)' |
2bbea3a6 | 17187 | fi |
a6ccdbab EC |
17188 | fi |
17189 | ||
2bbea3a6 RH |
17190 | |
17191 | ||
1e6347d8 | 17192 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
17193 | |
17194 | ||
22482f74 | 17195 | |
a6ccdbab | 17196 | # Check whether --with-datarootdir was given. |
22482f74 | 17197 | if test "${with_datarootdir+set}" = set; then |
a6ccdbab | 17198 | withval=$with_datarootdir; datarootdir="\${prefix}/$with_datarootdir" |
22482f74 MS |
17199 | else |
17200 | datarootdir='$(prefix)/share' | |
a6ccdbab | 17201 | fi |
22482f74 MS |
17202 | |
17203 | ||
17204 | ||
a6ccdbab EC |
17205 | |
17206 | # Check whether --with-docdir was given. | |
22482f74 | 17207 | if test "${with_docdir+set}" = set; then |
a6ccdbab | 17208 | withval=$with_docdir; docdir="\${prefix}/$with_docdir" |
22482f74 MS |
17209 | else |
17210 | docdir='$(datarootdir)' | |
a6ccdbab EC |
17211 | fi |
17212 | ||
22482f74 MS |
17213 | |
17214 | ||
b8ec3cc8 | 17215 | |
a6ccdbab | 17216 | # Check whether --with-htmldir was given. |
22482f74 | 17217 | if test "${with_htmldir+set}" = set; then |
a6ccdbab | 17218 | withval=$with_htmldir; htmldir="\${prefix}/$with_htmldir" |
22482f74 MS |
17219 | else |
17220 | htmldir='$(docdir)' | |
a6ccdbab EC |
17221 | fi |
17222 | ||
22482f74 MS |
17223 | |
17224 | ||
861bb6c1 JL |
17225 | # Substitute configuration variables |
17226 | ||
17227 | ||
17228 | ||
17229 | ||
17230 | ||
17231 | ||
17232 | ||
17233 | ||
17234 | ||
17235 | ||
17236 | ||
17237 | ||
17238 | ||
17239 | ||
17240 | ||
17241 | ||
17242 | ||
17243 | ||
17244 | ||
17245 | ||
17246 | ||
17247 | ||
17248 | ||
17249 | ||
17250 | ||
17251 | ||
17252 | ||
17253 | ||
17254 | ||
17255 | ||
17256 | ||
17257 | ||
17258 | ||
17259 | ||
17260 | ||
17261 | ||
17262 | ||
17263 | ||
17264 | ||
17265 | ||
17266 | ||
17267 | ||
17268 | ||
17269 | ||
17270 | ||
17271 | ||
9b16d2c4 | 17272 | |
e9a25f70 | 17273 | |
6e26218f | 17274 | |
c8724862 | 17275 | |
e061d1ce | 17276 | |
d8bb17c8 | 17277 | |
11642c3a ZW |
17278 | |
17279 | ||
17280 | ||
17281 | ||
17282 | ||
17283 | ||
17284 | ||
3d9d2476 | 17285 | |
e2500fed | 17286 | |
51b9ff45 | 17287 | |
861bb6c1 | 17288 | |
6e3f3080 NN |
17289 | # Echo link setup. |
17290 | if test x${build} = x${host} ; then | |
17291 | if test x${host} = x${target} ; then | |
17292 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
17293 | else | |
17294 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
17295 | echo " from ${host} to ${target}." 1>&2 | |
17296 | fi | |
17297 | else | |
17298 | if test x${host} = x${target} ; then | |
17299 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
17300 | echo " for ${target}." 1>&2 | |
17301 | else | |
17302 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
17303 | echo " from ${host} to ${target}." 1>&2 | |
17304 | fi | |
17305 | fi | |
17306 | ||
6de9cd9a DN |
17307 | |
17308 | ||
17309 | ||
6e3f3080 NN |
17310 | # Configure the subdirectories |
17311 | # AC_CONFIG_SUBDIRS($subdirs) | |
17312 | ||
17313 | # Create the Makefile | |
17314 | # and configure language subdirectories | |
a6ccdbab | 17315 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
17316 | |
17317 | ||
a6ccdbab | 17318 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 17319 | |
ba479fd2 | 17320 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
17321 | # This file is a shell script that caches the results of configure |
17322 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
17323 | # scripts and configure runs, see configure's option --config-cache. |
17324 | # It is not useful on other systems. If it contains results you don't | |
17325 | # want to keep, you may remove or edit it. | |
6e3f3080 | 17326 | # |
ba479fd2 NN |
17327 | # config.status only pays attention to the cache file if you give it |
17328 | # the --recheck option to rerun configure. | |
6e3f3080 | 17329 | # |
ba479fd2 NN |
17330 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
17331 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17332 | # following values. | |
17333 | ||
17334 | _ACEOF | |
17335 | ||
6e3f3080 NN |
17336 | # The following way of writing the cache mishandles newlines in values, |
17337 | # but we know of no workaround that is simple, portable, and efficient. | |
a6ccdbab | 17338 | # So, we kill variables containing newlines. |
6e3f3080 NN |
17339 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17340 | # and sets the high bit in the cache file unless we assign to the vars. | |
a6ccdbab EC |
17341 | ( |
17342 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17343 | eval ac_val=\$$ac_var | |
17344 | case $ac_val in #( | |
17345 | *${as_nl}*) | |
17346 | case $ac_var in #( | |
17347 | *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 | |
17348 | echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; | |
17349 | esac | |
17350 | case $ac_var in #( | |
17351 | _ | IFS | as_nl) ;; #( | |
17352 | *) $as_unset $ac_var ;; | |
17353 | esac ;; | |
17354 | esac | |
17355 | done | |
17356 | ||
ba479fd2 | 17357 | (set) 2>&1 | |
a6ccdbab EC |
17358 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
17359 | *${as_nl}ac_space=\ *) | |
ba479fd2 NN |
17360 | # `set' does not quote correctly, so add quotes (double-quote |
17361 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
17362 | sed -n \ | |
86da66b5 HPN |
17363 | "s/'/'\\\\''/g; |
17364 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
a6ccdbab | 17365 | ;; #( |
ba479fd2 NN |
17366 | *) |
17367 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
a6ccdbab | 17368 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
ba479fd2 | 17369 | ;; |
a6ccdbab EC |
17370 | esac | |
17371 | sort | |
17372 | ) | | |
ba479fd2 | 17373 | sed ' |
a6ccdbab | 17374 | /^ac_cv_env_/b end |
ba479fd2 | 17375 | t clear |
a6ccdbab | 17376 | :clear |
ba479fd2 NN |
17377 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17378 | t end | |
a6ccdbab EC |
17379 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17380 | :end' >>confcache | |
17381 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17382 | if test -w "$cache_file"; then | |
17383 | test "x$cache_file" != "x/dev/null" && | |
17384 | { echo "$as_me:$LINENO: updating cache $cache_file" >&5 | |
17385 | echo "$as_me: updating cache $cache_file" >&6;} | |
ba479fd2 | 17386 | cat confcache >$cache_file |
6e3f3080 | 17387 | else |
a6ccdbab EC |
17388 | { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 |
17389 | echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
6e3f3080 NN |
17390 | fi |
17391 | fi | |
17392 | rm -f confcache | |
17393 | ||
17394 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17395 | # Let make expand exec_prefix. | |
17396 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17397 | ||
63cf211a | 17398 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 17399 | |
ba479fd2 NN |
17400 | ac_libobjs= |
17401 | ac_ltlibobjs= | |
17402 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
17403 | # 1. Remove the extension, and $U if already installed. | |
a6ccdbab EC |
17404 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
17405 | ac_i=`echo "$ac_i" | sed "$ac_script"` | |
17406 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17407 | # will be set to the directory where LIBOBJS objects are built. | |
17408 | ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17409 | ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' | |
ba479fd2 NN |
17410 | done |
17411 | LIBOBJS=$ac_libobjs | |
63cf211a | 17412 | |
ba479fd2 NN |
17413 | LTLIBOBJS=$ac_ltlibobjs |
17414 | ||
17415 | ||
17416 | ||
17417 | : ${CONFIG_STATUS=./config.status} | |
17418 | ac_clean_files_save=$ac_clean_files | |
17419 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
17420 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
17421 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17422 | cat >$CONFIG_STATUS <<_ACEOF | |
17423 | #! $SHELL | |
17424 | # Generated by $as_me. | |
6e3f3080 NN |
17425 | # Run this file to recreate the current configuration. |
17426 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 17427 | # configure, is in config.log if it exists. |
6e3f3080 | 17428 | |
ba479fd2 NN |
17429 | debug=false |
17430 | ac_cs_recheck=false | |
17431 | ac_cs_silent=false | |
17432 | SHELL=\${CONFIG_SHELL-$SHELL} | |
17433 | _ACEOF | |
17434 | ||
17435 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17436 | ## --------------------- ## | |
17437 | ## M4sh Initialization. ## | |
17438 | ## --------------------- ## | |
17439 | ||
a6ccdbab EC |
17440 | # Be more Bourne compatible |
17441 | DUALCASE=1; export DUALCASE # for MKS sh | |
ba479fd2 NN |
17442 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
17443 | emulate sh | |
17444 | NULLCMD=: | |
17445 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
17446 | # is contrary to our usage. Disable this feature. | |
17447 | alias -g '${1+"$@"}'='"$@"' | |
a6ccdbab EC |
17448 | setopt NO_GLOB_SUBST |
17449 | else | |
17450 | case `(set -o) 2>/dev/null` in | |
17451 | *posix*) set -o posix ;; | |
17452 | esac | |
17453 | ||
17454 | fi | |
17455 | ||
17456 | ||
17457 | ||
17458 | ||
17459 | # PATH needs CR | |
17460 | # Avoid depending upon Character Ranges. | |
17461 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
17462 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
17463 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
17464 | as_cr_digits='0123456789' | |
17465 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
17466 | ||
17467 | # The user is always right. | |
17468 | if test "${PATH_SEPARATOR+set}" != set; then | |
17469 | echo "#! /bin/sh" >conf$$.sh | |
17470 | echo "exit 0" >>conf$$.sh | |
17471 | chmod +x conf$$.sh | |
17472 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
17473 | PATH_SEPARATOR=';' | |
17474 | else | |
17475 | PATH_SEPARATOR=: | |
17476 | fi | |
17477 | rm -f conf$$.sh | |
ba479fd2 NN |
17478 | fi |
17479 | ||
17480 | # Support unset when possible. | |
86da66b5 | 17481 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
17482 | as_unset=unset |
17483 | else | |
17484 | as_unset=false | |
17485 | fi | |
17486 | ||
17487 | ||
a6ccdbab EC |
17488 | # IFS |
17489 | # We need space, tab and new line, in precisely that order. Quoting is | |
17490 | # there to prevent editors from complaining about space-tab. | |
17491 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17492 | # splitting by setting IFS to empty value.) | |
17493 | as_nl=' | |
17494 | ' | |
17495 | IFS=" "" $as_nl" | |
17496 | ||
17497 | # Find who we are. Look in the path if we contain no directory separator. | |
17498 | case $0 in | |
17499 | *[\\/]* ) as_myself=$0 ;; | |
17500 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17501 | for as_dir in $PATH | |
17502 | do | |
17503 | IFS=$as_save_IFS | |
17504 | test -z "$as_dir" && as_dir=. | |
17505 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17506 | done | |
17507 | IFS=$as_save_IFS | |
17508 | ||
17509 | ;; | |
17510 | esac | |
17511 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17512 | # in which case we are not to be found in the path. | |
17513 | if test "x$as_myself" = x; then | |
17514 | as_myself=$0 | |
17515 | fi | |
17516 | if test ! -f "$as_myself"; then | |
17517 | echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
17518 | { (exit 1); exit 1; } | |
17519 | fi | |
17520 | ||
17521 | # Work around bugs in pre-3.0 UWIN ksh. | |
17522 | for as_var in ENV MAIL MAILPATH | |
17523 | do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var | |
17524 | done | |
17525 | PS1='$ ' | |
17526 | PS2='> ' | |
ba479fd2 NN |
17527 | PS4='+ ' |
17528 | ||
17529 | # NLS nuisances. | |
17530 | for as_var in \ | |
17531 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
17532 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
17533 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 17534 | do |
86da66b5 | 17535 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
17536 | eval $as_var=C; export $as_var |
17537 | else | |
a6ccdbab | 17538 | ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var |
ba479fd2 | 17539 | fi |
6e3f3080 NN |
17540 | done |
17541 | ||
ba479fd2 | 17542 | # Required to use basename. |
a6ccdbab EC |
17543 | if expr a : '\(a\)' >/dev/null 2>&1 && |
17544 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
ba479fd2 NN |
17545 | as_expr=expr |
17546 | else | |
17547 | as_expr=false | |
17548 | fi | |
6e3f3080 | 17549 | |
a6ccdbab | 17550 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
ba479fd2 NN |
17551 | as_basename=basename |
17552 | else | |
17553 | as_basename=false | |
17554 | fi | |
6e3f3080 NN |
17555 | |
17556 | ||
ba479fd2 | 17557 | # Name of the executable. |
a6ccdbab | 17558 | as_me=`$as_basename -- "$0" || |
ba479fd2 NN |
17559 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
17560 | X"$0" : 'X\(//\)$' \| \ | |
a6ccdbab | 17561 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 17562 | echo X/"$0" | |
a6ccdbab EC |
17563 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
17564 | s//\1/ | |
17565 | q | |
17566 | } | |
17567 | /^X\/\(\/\/\)$/{ | |
17568 | s//\1/ | |
17569 | q | |
17570 | } | |
17571 | /^X\/\(\/\).*/{ | |
17572 | s//\1/ | |
17573 | q | |
17574 | } | |
17575 | s/.*/./; q'` | |
6e3f3080 | 17576 | |
a6ccdbab EC |
17577 | # CDPATH. |
17578 | $as_unset CDPATH | |
dd7f7a6e EC |
17579 | |
17580 | ||
ba479fd2 NN |
17581 | |
17582 | as_lineno_1=$LINENO | |
17583 | as_lineno_2=$LINENO | |
ba479fd2 | 17584 | test "x$as_lineno_1" != "x$as_lineno_2" && |
a6ccdbab | 17585 | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { |
ba479fd2 NN |
17586 | |
17587 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
17588 | # uniformly replaced by the line number. The first 'sed' inserts a | |
a6ccdbab EC |
17589 | # line-number line after each line using $LINENO; the second 'sed' |
17590 | # does the real work. The second script uses 'N' to pair each | |
17591 | # line-number line with the line containing $LINENO, and appends | |
17592 | # trailing '-' during substitution so that $LINENO is not a special | |
17593 | # case at line end. | |
ba479fd2 | 17594 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the |
a6ccdbab EC |
17595 | # scripts with optimization help from Paolo Bonzini. Blame Lee |
17596 | # E. McMahon (1931-1989) for sed's syntax. :-) | |
17597 | sed -n ' | |
17598 | p | |
17599 | /[$]LINENO/= | |
17600 | ' <$as_myself | | |
ba479fd2 | 17601 | sed ' |
a6ccdbab EC |
17602 | s/[$]LINENO.*/&-/ |
17603 | t lineno | |
17604 | b | |
17605 | :lineno | |
ba479fd2 | 17606 | N |
a6ccdbab EC |
17607 | :loop |
17608 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
ba479fd2 | 17609 | t loop |
a6ccdbab | 17610 | s/-\n.*// |
ba479fd2 | 17611 | ' >$as_me.lineno && |
a6ccdbab EC |
17612 | chmod +x "$as_me.lineno" || |
17613 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 | |
ba479fd2 NN |
17614 | { (exit 1); exit 1; }; } |
17615 | ||
17616 | # Don't try to exec as it changes $[0], causing all sort of problems | |
17617 | # (the dirname of $[0] is not the place where we might find the | |
a6ccdbab EC |
17618 | # original and so on. Autoconf is especially sensitive to this). |
17619 | . "./$as_me.lineno" | |
ba479fd2 NN |
17620 | # Exit status is that of the last command. |
17621 | exit | |
17622 | } | |
17623 | ||
17624 | ||
a6ccdbab EC |
17625 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
17626 | as_dirname=dirname | |
17627 | else | |
17628 | as_dirname=false | |
17629 | fi | |
17630 | ||
17631 | ECHO_C= ECHO_N= ECHO_T= | |
17632 | case `echo -n x` in | |
17633 | -n*) | |
17634 | case `echo 'x\c'` in | |
17635 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
17636 | *) ECHO_C='\c';; | |
17637 | esac;; | |
17638 | *) | |
17639 | ECHO_N='-n';; | |
ba479fd2 NN |
17640 | esac |
17641 | ||
a6ccdbab EC |
17642 | if expr a : '\(a\)' >/dev/null 2>&1 && |
17643 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
ba479fd2 NN |
17644 | as_expr=expr |
17645 | else | |
17646 | as_expr=false | |
17647 | fi | |
17648 | ||
17649 | rm -f conf$$ conf$$.exe conf$$.file | |
a6ccdbab EC |
17650 | if test -d conf$$.dir; then |
17651 | rm -f conf$$.dir/conf$$.file | |
17652 | else | |
17653 | rm -f conf$$.dir | |
17654 | mkdir conf$$.dir | |
17655 | fi | |
ba479fd2 NN |
17656 | echo >conf$$.file |
17657 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
a6ccdbab EC |
17658 | as_ln_s='ln -s' |
17659 | # ... but there are two gotchas: | |
17660 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
17661 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
17662 | # In both cases, we have to default to `cp -p'. | |
17663 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
ba479fd2 | 17664 | as_ln_s='cp -p' |
ba479fd2 NN |
17665 | elif ln conf$$.file conf$$ 2>/dev/null; then |
17666 | as_ln_s=ln | |
17667 | else | |
17668 | as_ln_s='cp -p' | |
17669 | fi | |
a6ccdbab EC |
17670 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
17671 | rmdir conf$$.dir 2>/dev/null | |
ba479fd2 NN |
17672 | |
17673 | if mkdir -p . 2>/dev/null; then | |
17674 | as_mkdir_p=: | |
17675 | else | |
86da66b5 | 17676 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
17677 | as_mkdir_p=false |
17678 | fi | |
17679 | ||
a6ccdbab EC |
17680 | if test -x / >/dev/null 2>&1; then |
17681 | as_test_x='test -x' | |
17682 | else | |
17683 | if ls -dL / >/dev/null 2>&1; then | |
17684 | as_ls_L_option=L | |
17685 | else | |
17686 | as_ls_L_option= | |
17687 | fi | |
17688 | as_test_x=' | |
17689 | eval sh -c '\'' | |
17690 | if test -d "$1"; then | |
17691 | test -d "$1/."; | |
17692 | else | |
17693 | case $1 in | |
17694 | -*)set "./$1";; | |
17695 | esac; | |
17696 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in | |
17697 | ???[sx]*):;;*)false;;esac;fi | |
17698 | '\'' sh | |
17699 | ' | |
17700 | fi | |
17701 | as_executable_p=$as_test_x | |
ba479fd2 NN |
17702 | |
17703 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 17704 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
17705 | |
17706 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 17707 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
17708 | |
17709 | ||
ba479fd2 NN |
17710 | exec 6>&1 |
17711 | ||
a6ccdbab | 17712 | # Save the log message, to keep $[0] and so on meaningful, and to |
ba479fd2 | 17713 | # report actual input values of CONFIG_FILES etc. instead of their |
a6ccdbab EC |
17714 | # values after options handling. |
17715 | ac_log=" | |
ba479fd2 | 17716 | This file was extended by $as_me, which was |
a6ccdbab | 17717 | generated by GNU Autoconf 2.61. Invocation command line was |
ba479fd2 NN |
17718 | |
17719 | CONFIG_FILES = $CONFIG_FILES | |
17720 | CONFIG_HEADERS = $CONFIG_HEADERS | |
17721 | CONFIG_LINKS = $CONFIG_LINKS | |
17722 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
17723 | $ $0 $@ | |
17724 | ||
a6ccdbab EC |
17725 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
17726 | " | |
17727 | ||
ba479fd2 NN |
17728 | _ACEOF |
17729 | ||
a6ccdbab | 17730 | cat >>$CONFIG_STATUS <<_ACEOF |
ba479fd2 | 17731 | # Files that config.status was made for. |
a6ccdbab EC |
17732 | config_files="$ac_config_files" |
17733 | config_headers="$ac_config_headers" | |
17734 | config_commands="$ac_config_commands" | |
dd7f7a6e | 17735 | |
a6ccdbab | 17736 | _ACEOF |
ba479fd2 NN |
17737 | |
17738 | cat >>$CONFIG_STATUS <<\_ACEOF | |
ba479fd2 NN |
17739 | ac_cs_usage="\ |
17740 | \`$as_me' instantiates files from templates according to the | |
17741 | current configuration. | |
17742 | ||
17743 | Usage: $0 [OPTIONS] [FILE]... | |
17744 | ||
17745 | -h, --help print this help, then exit | |
a6ccdbab | 17746 | -V, --version print version number and configuration settings, then exit |
ba479fd2 NN |
17747 | -q, --quiet do not print progress messages |
17748 | -d, --debug don't remove temporary files | |
17749 | --recheck update $as_me by reconfiguring in the same conditions | |
17750 | --file=FILE[:TEMPLATE] | |
86da66b5 | 17751 | instantiate the configuration file FILE |
ba479fd2 | 17752 | --header=FILE[:TEMPLATE] |
86da66b5 | 17753 | instantiate the configuration header FILE |
ba479fd2 NN |
17754 | |
17755 | Configuration files: | |
17756 | $config_files | |
17757 | ||
17758 | Configuration headers: | |
17759 | $config_headers | |
17760 | ||
17761 | Configuration commands: | |
17762 | $config_commands | |
17763 | ||
17764 | Report bugs to <bug-autoconf@gnu.org>." | |
dd7f7a6e | 17765 | |
a6ccdbab | 17766 | _ACEOF |
ba479fd2 NN |
17767 | cat >>$CONFIG_STATUS <<_ACEOF |
17768 | ac_cs_version="\\ | |
17769 | config.status | |
a6ccdbab EC |
17770 | configured by $0, generated by GNU Autoconf 2.61, |
17771 | with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
ba479fd2 | 17772 | |
a6ccdbab | 17773 | Copyright (C) 2006 Free Software Foundation, Inc. |
ba479fd2 NN |
17774 | This config.status script is free software; the Free Software Foundation |
17775 | gives unlimited permission to copy, distribute and modify it." | |
a6ccdbab EC |
17776 | |
17777 | ac_pwd='$ac_pwd' | |
17778 | srcdir='$srcdir' | |
ba479fd2 NN |
17779 | _ACEOF |
17780 | ||
17781 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17782 | # If no file are specified by the user, then we need to provide default | |
17783 | # value. By we need to know if files were specified by the user. | |
17784 | ac_need_defaults=: | |
17785 | while test $# != 0 | |
17786 | do | |
17787 | case $1 in | |
17788 | --*=*) | |
a6ccdbab EC |
17789 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
17790 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
ba479fd2 NN |
17791 | ac_shift=: |
17792 | ;; | |
a6ccdbab | 17793 | *) |
ba479fd2 NN |
17794 | ac_option=$1 |
17795 | ac_optarg=$2 | |
17796 | ac_shift=shift | |
17797 | ;; | |
ba479fd2 NN |
17798 | esac |
17799 | ||
17800 | case $ac_option in | |
17801 | # Handling of the options. | |
ba479fd2 NN |
17802 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
17803 | ac_cs_recheck=: ;; | |
a6ccdbab EC |
17804 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
17805 | echo "$ac_cs_version"; exit ;; | |
17806 | --debug | --debu | --deb | --de | --d | -d ) | |
ba479fd2 NN |
17807 | debug=: ;; |
17808 | --file | --fil | --fi | --f ) | |
17809 | $ac_shift | |
17810 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
17811 | ac_need_defaults=false;; | |
17812 | --header | --heade | --head | --hea ) | |
17813 | $ac_shift | |
17814 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
17815 | ac_need_defaults=false;; | |
a6ccdbab EC |
17816 | --he | --h) |
17817 | # Conflict between --help and --header | |
17818 | { echo "$as_me: error: ambiguous option: $1 | |
17819 | Try \`$0 --help' for more information." >&2 | |
17820 | { (exit 1); exit 1; }; };; | |
17821 | --help | --hel | -h ) | |
17822 | echo "$ac_cs_usage"; exit ;; | |
ba479fd2 NN |
17823 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
17824 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
17825 | ac_cs_silent=: ;; | |
17826 | ||
17827 | # This is an error. | |
a6ccdbab EC |
17828 | -*) { echo "$as_me: error: unrecognized option: $1 |
17829 | Try \`$0 --help' for more information." >&2 | |
ba479fd2 NN |
17830 | { (exit 1); exit 1; }; } ;; |
17831 | ||
a6ccdbab EC |
17832 | *) ac_config_targets="$ac_config_targets $1" |
17833 | ac_need_defaults=false ;; | |
ba479fd2 NN |
17834 | |
17835 | esac | |
17836 | shift | |
6e3f3080 | 17837 | done |
ba479fd2 NN |
17838 | |
17839 | ac_configure_extra_args= | |
17840 | ||
17841 | if $ac_cs_silent; then | |
17842 | exec 6>/dev/null | |
17843 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
17844 | fi |
17845 | ||
ba479fd2 NN |
17846 | _ACEOF |
17847 | cat >>$CONFIG_STATUS <<_ACEOF | |
17848 | if \$ac_cs_recheck; then | |
a6ccdbab EC |
17849 | echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 |
17850 | CONFIG_SHELL=$SHELL | |
17851 | export CONFIG_SHELL | |
17852 | exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
ba479fd2 | 17853 | fi |
861bb6c1 | 17854 | |
ba479fd2 | 17855 | _ACEOF |
a6ccdbab EC |
17856 | cat >>$CONFIG_STATUS <<\_ACEOF |
17857 | exec 5>>config.log | |
17858 | { | |
17859 | echo | |
17860 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
17861 | ## Running $as_me. ## | |
17862 | _ASBOX | |
17863 | echo "$ac_log" | |
17864 | } >&5 | |
ba479fd2 | 17865 | |
a6ccdbab | 17866 | _ACEOF |
ba479fd2 NN |
17867 | cat >>$CONFIG_STATUS <<_ACEOF |
17868 | # | |
a6ccdbab | 17869 | # INIT-COMMANDS |
ba479fd2 | 17870 | # |
ba479fd2 | 17871 | subdirs='$subdirs' |
ba479fd2 NN |
17872 | |
17873 | _ACEOF | |
17874 | ||
dd7f7a6e | 17875 | cat >>$CONFIG_STATUS <<\_ACEOF |
a6ccdbab EC |
17876 | |
17877 | # Handling of arguments. | |
ba479fd2 NN |
17878 | for ac_config_target in $ac_config_targets |
17879 | do | |
a6ccdbab EC |
17880 | case $ac_config_target in |
17881 | "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
17882 | "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
17883 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
17884 | ||
ba479fd2 NN |
17885 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 |
17886 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
17887 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 17888 | esac |
ba479fd2 NN |
17889 | done |
17890 | ||
a6ccdbab | 17891 | |
ba479fd2 NN |
17892 | # If the user did not use the arguments to specify the items to instantiate, |
17893 | # then the envvar interface is used. Set only those that are not. | |
17894 | # We use the long form for the default assignment because of an extremely | |
17895 | # bizarre bug on SunOS 4.1.3. | |
17896 | if $ac_need_defaults; then | |
17897 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
17898 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
17899 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
17900 | fi | |
17901 | ||
17902 | # Have a temporary directory for convenience. Make it in the build tree | |
a6ccdbab | 17903 | # simply because there is no reason against having it here, and in addition, |
ba479fd2 | 17904 | # creating and moving files from /tmp can sometimes cause problems. |
a6ccdbab EC |
17905 | # Hook for its removal unless debugging. |
17906 | # Note that there is a small window in which the directory will not be cleaned: | |
17907 | # after its creation but before its name has been assigned to `$tmp'. | |
ba479fd2 NN |
17908 | $debug || |
17909 | { | |
a6ccdbab EC |
17910 | tmp= |
17911 | trap 'exit_status=$? | |
17912 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
17913 | ' 0 | |
ba479fd2 NN |
17914 | trap '{ (exit 1); exit 1; }' 1 2 13 15 |
17915 | } | |
ba479fd2 | 17916 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 17917 | |
ba479fd2 | 17918 | { |
a6ccdbab | 17919 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
ba479fd2 NN |
17920 | test -n "$tmp" && test -d "$tmp" |
17921 | } || | |
17922 | { | |
a6ccdbab EC |
17923 | tmp=./conf$$-$RANDOM |
17924 | (umask 077 && mkdir "$tmp") | |
ba479fd2 NN |
17925 | } || |
17926 | { | |
17927 | echo "$me: cannot create a temporary directory in ." >&2 | |
17928 | { (exit 1); exit 1; } | |
17929 | } | |
17930 | ||
ba479fd2 | 17931 | # |
a6ccdbab | 17932 | # Set up the sed scripts for CONFIG_FILES section. |
ba479fd2 NN |
17933 | # |
17934 | ||
17935 | # No need to generate the scripts if there are no CONFIG_FILES. | |
17936 | # This happens for instance when ./config.status config.h | |
a6ccdbab EC |
17937 | if test -n "$CONFIG_FILES"; then |
17938 | ||
17939 | _ACEOF | |
17940 | ||
17941 | # Create sed commands to just substitute file output variables. | |
17942 | ||
17943 | # Remaining file output variables are in a fragment that also has non-file | |
17944 | # output varibles. | |
17945 | ||
17946 | ||
17947 | ||
17948 | ac_delim='%!_!# ' | |
17949 | for ac_last_try in false false false false false :; do | |
17950 | cat >conf$$subs.sed <<_ACEOF | |
17951 | SHELL!$SHELL$ac_delim | |
17952 | PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim | |
17953 | PACKAGE_NAME!$PACKAGE_NAME$ac_delim | |
17954 | PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim | |
17955 | PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim | |
17956 | PACKAGE_STRING!$PACKAGE_STRING$ac_delim | |
17957 | PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim | |
17958 | exec_prefix!$exec_prefix$ac_delim | |
17959 | prefix!$prefix$ac_delim | |
17960 | program_transform_name!$program_transform_name$ac_delim | |
17961 | bindir!$bindir$ac_delim | |
17962 | sbindir!$sbindir$ac_delim | |
17963 | libexecdir!$libexecdir$ac_delim | |
17964 | datarootdir!$datarootdir$ac_delim | |
17965 | datadir!$datadir$ac_delim | |
17966 | sysconfdir!$sysconfdir$ac_delim | |
17967 | sharedstatedir!$sharedstatedir$ac_delim | |
17968 | localstatedir!$localstatedir$ac_delim | |
17969 | includedir!$includedir$ac_delim | |
17970 | oldincludedir!$oldincludedir$ac_delim | |
17971 | docdir!$docdir$ac_delim | |
17972 | infodir!$infodir$ac_delim | |
17973 | htmldir!$htmldir$ac_delim | |
17974 | dvidir!$dvidir$ac_delim | |
17975 | pdfdir!$pdfdir$ac_delim | |
17976 | psdir!$psdir$ac_delim | |
17977 | libdir!$libdir$ac_delim | |
17978 | localedir!$localedir$ac_delim | |
17979 | mandir!$mandir$ac_delim | |
17980 | DEFS!$DEFS$ac_delim | |
17981 | ECHO_C!$ECHO_C$ac_delim | |
17982 | ECHO_N!$ECHO_N$ac_delim | |
17983 | ECHO_T!$ECHO_T$ac_delim | |
17984 | LIBS!$LIBS$ac_delim | |
17985 | build_alias!$build_alias$ac_delim | |
17986 | host_alias!$host_alias$ac_delim | |
17987 | target_alias!$target_alias$ac_delim | |
17988 | build!$build$ac_delim | |
17989 | build_cpu!$build_cpu$ac_delim | |
17990 | build_vendor!$build_vendor$ac_delim | |
17991 | build_os!$build_os$ac_delim | |
17992 | host!$host$ac_delim | |
17993 | host_cpu!$host_cpu$ac_delim | |
17994 | host_vendor!$host_vendor$ac_delim | |
17995 | host_os!$host_os$ac_delim | |
17996 | target!$target$ac_delim | |
17997 | target_cpu!$target_cpu$ac_delim | |
17998 | target_vendor!$target_vendor$ac_delim | |
17999 | target_os!$target_os$ac_delim | |
18000 | target_noncanonical!$target_noncanonical$ac_delim | |
18001 | build_libsubdir!$build_libsubdir$ac_delim | |
18002 | build_subdir!$build_subdir$ac_delim | |
18003 | host_subdir!$host_subdir$ac_delim | |
18004 | target_subdir!$target_subdir$ac_delim | |
18005 | GENINSRC!$GENINSRC$ac_delim | |
18006 | CC!$CC$ac_delim | |
18007 | CFLAGS!$CFLAGS$ac_delim | |
18008 | LDFLAGS!$LDFLAGS$ac_delim | |
18009 | CPPFLAGS!$CPPFLAGS$ac_delim | |
18010 | ac_ct_CC!$ac_ct_CC$ac_delim | |
18011 | EXEEXT!$EXEEXT$ac_delim | |
18012 | OBJEXT!$OBJEXT$ac_delim | |
18013 | NO_MINUS_C_MINUS_O!$NO_MINUS_C_MINUS_O$ac_delim | |
18014 | OUTPUT_OPTION!$OUTPUT_OPTION$ac_delim | |
18015 | CPP!$CPP$ac_delim | |
18016 | GREP!$GREP$ac_delim | |
18017 | EGREP!$EGREP$ac_delim | |
18018 | strict1_warn!$strict1_warn$ac_delim | |
18019 | cxx_compat_warn!$cxx_compat_warn$ac_delim | |
18020 | warn_cflags!$warn_cflags$ac_delim | |
18021 | WERROR!$WERROR$ac_delim | |
18022 | nocommon_flag!$nocommon_flag$ac_delim | |
18023 | TREEBROWSER!$TREEBROWSER$ac_delim | |
18024 | valgrind_path!$valgrind_path$ac_delim | |
18025 | valgrind_path_defines!$valgrind_path_defines$ac_delim | |
18026 | valgrind_command!$valgrind_command$ac_delim | |
18027 | coverage_flags!$coverage_flags$ac_delim | |
18028 | enable_multilib!$enable_multilib$ac_delim | |
18029 | enable_decimal_float!$enable_decimal_float$ac_delim | |
18030 | enable_shared!$enable_shared$ac_delim | |
18031 | TARGET_SYSTEM_ROOT!$TARGET_SYSTEM_ROOT$ac_delim | |
18032 | TARGET_SYSTEM_ROOT_DEFINE!$TARGET_SYSTEM_ROOT_DEFINE$ac_delim | |
18033 | CROSS_SYSTEM_HEADER_DIR!$CROSS_SYSTEM_HEADER_DIR$ac_delim | |
18034 | onestep!$onestep$ac_delim | |
18035 | SET_MAKE!$SET_MAKE$ac_delim | |
18036 | AWK!$AWK$ac_delim | |
18037 | LN_S!$LN_S$ac_delim | |
18038 | LN!$LN$ac_delim | |
18039 | RANLIB!$RANLIB$ac_delim | |
18040 | ranlib_flags!$ranlib_flags$ac_delim | |
18041 | INSTALL!$INSTALL$ac_delim | |
18042 | INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim | |
18043 | INSTALL_DATA!$INSTALL_DATA$ac_delim | |
18044 | make_compare_target!$make_compare_target$ac_delim | |
18045 | _ACEOF | |
18046 | ||
18047 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then | |
18048 | break | |
18049 | elif $ac_last_try; then | |
18050 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 | |
18051 | echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} | |
18052 | { (exit 1); exit 1; }; } | |
18053 | else | |
18054 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
b8ec3cc8 | 18055 | fi |
a6ccdbab EC |
18056 | done |
18057 | ||
18058 | ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` | |
18059 | if test -n "$ac_eof"; then | |
18060 | ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` | |
18061 | ac_eof=`expr $ac_eof + 1` | |
18062 | fi | |
18063 | ||
18064 | cat >>$CONFIG_STATUS <<_ACEOF | |
18065 | cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof | |
18066 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
18067 | /^[ ]*@language_hooks@[ ]*$/{ | |
18068 | r $language_hooks | |
18069 | d | |
18070 | } | |
18071 | _ACEOF | |
18072 | sed ' | |
18073 | s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g | |
18074 | s/^/s,@/; s/!/@,|#_!!_#|/ | |
18075 | :n | |
18076 | t n | |
18077 | s/'"$ac_delim"'$/,g/; t | |
18078 | s/$/\\/; p | |
18079 | N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n | |
18080 | ' >>$CONFIG_STATUS <conf$$subs.sed | |
18081 | rm -f conf$$subs.sed | |
18082 | cat >>$CONFIG_STATUS <<_ACEOF | |
18083 | CEOF$ac_eof | |
18084 | _ACEOF | |
18085 | ||
18086 | ||
18087 | ac_delim='%!_!# ' | |
18088 | for ac_last_try in false false false false false :; do | |
18089 | cat >conf$$subs.sed <<_ACEOF | |
18090 | have_mktemp_command!$have_mktemp_command$ac_delim | |
18091 | MAKEINFO!$MAKEINFO$ac_delim | |
18092 | BUILD_INFO!$BUILD_INFO$ac_delim | |
18093 | GENERATED_MANPAGES!$GENERATED_MANPAGES$ac_delim | |
18094 | FLEX!$FLEX$ac_delim | |
18095 | BISON!$BISON$ac_delim | |
18096 | NM!$NM$ac_delim | |
18097 | AR!$AR$ac_delim | |
18098 | stage1_cflags!$stage1_cflags$ac_delim | |
18099 | COLLECT2_LIBS!$COLLECT2_LIBS$ac_delim | |
18100 | GNAT_LIBEXC!$GNAT_LIBEXC$ac_delim | |
18101 | LDEXP_LIB!$LDEXP_LIB$ac_delim | |
18102 | TARGET_GETGROUPS_T!$TARGET_GETGROUPS_T$ac_delim | |
18103 | LIBICONV!$LIBICONV$ac_delim | |
18104 | LTLIBICONV!$LTLIBICONV$ac_delim | |
18105 | LIBICONV_DEP!$LIBICONV_DEP$ac_delim | |
18106 | manext!$manext$ac_delim | |
18107 | objext!$objext$ac_delim | |
18108 | gthread_flags!$gthread_flags$ac_delim | |
18109 | extra_modes_file!$extra_modes_file$ac_delim | |
18110 | extra_opt_files!$extra_opt_files$ac_delim | |
18111 | USE_NLS!$USE_NLS$ac_delim | |
18112 | LIBINTL!$LIBINTL$ac_delim | |
18113 | LIBINTL_DEP!$LIBINTL_DEP$ac_delim | |
18114 | INCINTL!$INCINTL$ac_delim | |
18115 | XGETTEXT!$XGETTEXT$ac_delim | |
18116 | GMSGFMT!$GMSGFMT$ac_delim | |
18117 | POSUB!$POSUB$ac_delim | |
18118 | CATALOGS!$CATALOGS$ac_delim | |
18119 | DATADIRNAME!$DATADIRNAME$ac_delim | |
18120 | INSTOBJEXT!$INSTOBJEXT$ac_delim | |
18121 | GENCAT!$GENCAT$ac_delim | |
18122 | CATOBJEXT!$CATOBJEXT$ac_delim | |
18123 | host_cc_for_libada!$host_cc_for_libada$ac_delim | |
18124 | CROSS!$CROSS$ac_delim | |
18125 | ALL!$ALL$ac_delim | |
18126 | SYSTEM_HEADER_DIR!$SYSTEM_HEADER_DIR$ac_delim | |
18127 | inhibit_libc!$inhibit_libc$ac_delim | |
18128 | CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim | |
18129 | BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim | |
18130 | STMP_FIXINC!$STMP_FIXINC$ac_delim | |
18131 | STMP_FIXPROTO!$STMP_FIXPROTO$ac_delim | |
18132 | collect2!$collect2$ac_delim | |
18133 | gcc_cv_as!$gcc_cv_as$ac_delim | |
18134 | ORIGINAL_AS_FOR_TARGET!$ORIGINAL_AS_FOR_TARGET$ac_delim | |
18135 | gcc_cv_ld!$gcc_cv_ld$ac_delim | |
18136 | ORIGINAL_LD_FOR_TARGET!$ORIGINAL_LD_FOR_TARGET$ac_delim | |
18137 | gcc_cv_nm!$gcc_cv_nm$ac_delim | |
18138 | ORIGINAL_NM_FOR_TARGET!$ORIGINAL_NM_FOR_TARGET$ac_delim | |
18139 | gcc_cv_objdump!$gcc_cv_objdump$ac_delim | |
18140 | libgcc_visibility!$libgcc_visibility$ac_delim | |
18141 | GGC!$GGC$ac_delim | |
18142 | zlibdir!$zlibdir$ac_delim | |
18143 | zlibinc!$zlibinc$ac_delim | |
18144 | MAINT!$MAINT$ac_delim | |
18145 | gcc_tooldir!$gcc_tooldir$ac_delim | |
18146 | dollar!$dollar$ac_delim | |
18147 | slibdir!$slibdir$ac_delim | |
18148 | objdir!$objdir$ac_delim | |
18149 | subdirs!$subdirs$ac_delim | |
18150 | srcdir!$srcdir$ac_delim | |
18151 | all_boot_languages!$all_boot_languages$ac_delim | |
18152 | all_compilers!$all_compilers$ac_delim | |
18153 | all_gtfiles!$all_gtfiles$ac_delim | |
18154 | all_gtfiles_files_langs!$all_gtfiles_files_langs$ac_delim | |
18155 | all_gtfiles_files_files!$all_gtfiles_files_files$ac_delim | |
18156 | all_lang_makefrags!$all_lang_makefrags$ac_delim | |
18157 | all_lang_makefiles!$all_lang_makefiles$ac_delim | |
18158 | all_languages!$all_languages$ac_delim | |
18159 | all_selected_languages!$all_selected_languages$ac_delim | |
18160 | all_stagestuff!$all_stagestuff$ac_delim | |
18161 | build_exeext!$build_exeext$ac_delim | |
18162 | build_install_headers_dir!$build_install_headers_dir$ac_delim | |
18163 | build_xm_file_list!$build_xm_file_list$ac_delim | |
18164 | build_xm_include_list!$build_xm_include_list$ac_delim | |
18165 | build_xm_defines!$build_xm_defines$ac_delim | |
18166 | check_languages!$check_languages$ac_delim | |
18167 | cc_set_by_configure!$cc_set_by_configure$ac_delim | |
18168 | quoted_cc_set_by_configure!$quoted_cc_set_by_configure$ac_delim | |
18169 | cpp_install_dir!$cpp_install_dir$ac_delim | |
18170 | xmake_file!$xmake_file$ac_delim | |
18171 | tmake_file!$tmake_file$ac_delim | |
18172 | extra_gcc_objs!$extra_gcc_objs$ac_delim | |
18173 | extra_headers_list!$extra_headers_list$ac_delim | |
18174 | extra_objs!$extra_objs$ac_delim | |
18175 | extra_parts!$extra_parts$ac_delim | |
18176 | extra_passes!$extra_passes$ac_delim | |
18177 | extra_programs!$extra_programs$ac_delim | |
18178 | float_h_file!$float_h_file$ac_delim | |
18179 | gcc_config_arguments!$gcc_config_arguments$ac_delim | |
18180 | gcc_gxx_include_dir!$gcc_gxx_include_dir$ac_delim | |
18181 | host_exeext!$host_exeext$ac_delim | |
18182 | host_xm_file_list!$host_xm_file_list$ac_delim | |
18183 | host_xm_include_list!$host_xm_include_list$ac_delim | |
18184 | host_xm_defines!$host_xm_defines$ac_delim | |
18185 | out_host_hook_obj!$out_host_hook_obj$ac_delim | |
18186 | install!$install$ac_delim | |
18187 | _ACEOF | |
18188 | ||
18189 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then | |
18190 | break | |
18191 | elif $ac_last_try; then | |
18192 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 | |
18193 | echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} | |
18194 | { (exit 1); exit 1; }; } | |
18195 | else | |
18196 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18197 | fi | |
18198 | done | |
18199 | ||
18200 | ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` | |
18201 | if test -n "$ac_eof"; then | |
18202 | ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` | |
18203 | ac_eof=`expr $ac_eof + 1` | |
18204 | fi | |
b8ec3cc8 | 18205 | |
a6ccdbab EC |
18206 | cat >>$CONFIG_STATUS <<_ACEOF |
18207 | cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof | |
18208 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
b8ec3cc8 | 18209 | _ACEOF |
a6ccdbab EC |
18210 | sed ' |
18211 | s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g | |
18212 | s/^/s,@/; s/!/@,|#_!!_#|/ | |
18213 | :n | |
18214 | t n | |
18215 | s/'"$ac_delim"'$/,g/; t | |
18216 | s/$/\\/; p | |
18217 | N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n | |
18218 | ' >>$CONFIG_STATUS <conf$$subs.sed | |
18219 | rm -f conf$$subs.sed | |
18220 | cat >>$CONFIG_STATUS <<_ACEOF | |
18221 | CEOF$ac_eof | |
18222 | _ACEOF | |
18223 | ||
18224 | ||
18225 | ac_delim='%!_!# ' | |
18226 | for ac_last_try in false false false false false :; do | |
18227 | cat >conf$$subs.sed <<_ACEOF | |
18228 | lang_opt_files!$lang_opt_files$ac_delim | |
18229 | lang_specs_files!$lang_specs_files$ac_delim | |
18230 | lang_tree_files!$lang_tree_files$ac_delim | |
18231 | local_prefix!$local_prefix$ac_delim | |
18232 | md_file!$md_file$ac_delim | |
18233 | objc_boehm_gc!$objc_boehm_gc$ac_delim | |
18234 | out_file!$out_file$ac_delim | |
18235 | out_object_file!$out_object_file$ac_delim | |
18236 | stage_prefix_set_by_configure!$stage_prefix_set_by_configure$ac_delim | |
18237 | quoted_stage_prefix_set_by_configure!$quoted_stage_prefix_set_by_configure$ac_delim | |
18238 | thread_file!$thread_file$ac_delim | |
18239 | tm_file_list!$tm_file_list$ac_delim | |
18240 | tm_include_list!$tm_include_list$ac_delim | |
18241 | tm_defines!$tm_defines$ac_delim | |
18242 | tm_p_file_list!$tm_p_file_list$ac_delim | |
18243 | tm_p_include_list!$tm_p_include_list$ac_delim | |
18244 | xm_file_list!$xm_file_list$ac_delim | |
18245 | xm_include_list!$xm_include_list$ac_delim | |
18246 | xm_defines!$xm_defines$ac_delim | |
18247 | c_target_objs!$c_target_objs$ac_delim | |
18248 | cxx_target_objs!$cxx_target_objs$ac_delim | |
18249 | target_cpu_default!$target_cpu_default$ac_delim | |
18250 | GMPLIBS!$GMPLIBS$ac_delim | |
18251 | GMPINC!$GMPINC$ac_delim | |
18252 | LIBOBJS!$LIBOBJS$ac_delim | |
18253 | LTLIBOBJS!$LTLIBOBJS$ac_delim | |
18254 | _ACEOF | |
18255 | ||
18256 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then | |
18257 | break | |
18258 | elif $ac_last_try; then | |
18259 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 | |
18260 | echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} | |
18261 | { (exit 1); exit 1; }; } | |
18262 | else | |
18263 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18264 | fi | |
18265 | done | |
18266 | ||
18267 | ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` | |
18268 | if test -n "$ac_eof"; then | |
18269 | ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` | |
18270 | ac_eof=`expr $ac_eof + 1` | |
18271 | fi | |
18272 | ||
18273 | cat >>$CONFIG_STATUS <<_ACEOF | |
18274 | cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof | |
18275 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end | |
18276 | _ACEOF | |
18277 | sed ' | |
18278 | s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g | |
18279 | s/^/s,@/; s/!/@,|#_!!_#|/ | |
18280 | :n | |
18281 | t n | |
18282 | s/'"$ac_delim"'$/,g/; t | |
18283 | s/$/\\/; p | |
18284 | N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n | |
18285 | ' >>$CONFIG_STATUS <conf$$subs.sed | |
18286 | rm -f conf$$subs.sed | |
18287 | cat >>$CONFIG_STATUS <<_ACEOF | |
18288 | :end | |
18289 | s/|#_!!_#|//g | |
18290 | CEOF$ac_eof | |
18291 | _ACEOF | |
18292 | ||
18293 | ||
18294 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
18295 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
18296 | # trailing colons and then remove the whole line if VPATH becomes empty | |
18297 | # (actually we leave an empty line to preserve line numbers). | |
18298 | if test "x$srcdir" = x.; then | |
18299 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
18300 | s/:*\$(srcdir):*/:/ | |
18301 | s/:*\${srcdir}:*/:/ | |
18302 | s/:*@srcdir@:*/:/ | |
18303 | s/^\([^=]*=[ ]*\):*/\1/ | |
18304 | s/:*$// | |
18305 | s/^[^=]*=[ ]*$// | |
18306 | }' | |
18307 | fi | |
18308 | ||
ba479fd2 | 18309 | cat >>$CONFIG_STATUS <<\_ACEOF |
a6ccdbab EC |
18310 | fi # test -n "$CONFIG_FILES" |
18311 | ||
18312 | ||
18313 | for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS | |
18314 | do | |
18315 | case $ac_tag in | |
18316 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18317 | esac | |
18318 | case $ac_mode$ac_tag in | |
18319 | :[FHL]*:*);; | |
18320 | :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 | |
18321 | echo "$as_me: error: Invalid tag $ac_tag." >&2;} | |
18322 | { (exit 1); exit 1; }; };; | |
18323 | :[FH]-) ac_tag=-:-;; | |
18324 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18325 | esac | |
18326 | ac_save_IFS=$IFS | |
18327 | IFS=: | |
18328 | set x $ac_tag | |
18329 | IFS=$ac_save_IFS | |
18330 | shift | |
18331 | ac_file=$1 | |
18332 | shift | |
18333 | ||
18334 | case $ac_mode in | |
18335 | :L) ac_source=$1;; | |
18336 | :[FH]) | |
18337 | ac_file_inputs= | |
18338 | for ac_f | |
18339 | do | |
18340 | case $ac_f in | |
18341 | -) ac_f="$tmp/stdin";; | |
18342 | *) # Look for the file first in the build tree, then in the source tree | |
18343 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18344 | # because $ac_f cannot contain `:'. | |
18345 | test -f "$ac_f" || | |
18346 | case $ac_f in | |
18347 | [\\/$]*) false;; | |
18348 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18349 | esac || | |
18350 | { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 | |
18351 | echo "$as_me: error: cannot find input file: $ac_f" >&2;} | |
18352 | { (exit 1); exit 1; }; };; | |
18353 | esac | |
18354 | ac_file_inputs="$ac_file_inputs $ac_f" | |
18355 | done | |
18356 | ||
18357 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18358 | # use $as_me), people would be surprised to read: | |
18359 | # /* config.h. Generated by config.status. */ | |
18360 | configure_input="Generated from "`IFS=: | |
18361 | echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." | |
18362 | if test x"$ac_file" != x-; then | |
18363 | configure_input="$ac_file. $configure_input" | |
18364 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
18365 | echo "$as_me: creating $ac_file" >&6;} | |
18366 | fi | |
18367 | ||
18368 | case $ac_tag in | |
18369 | *:-:* | *:-) cat >"$tmp/stdin";; | |
18370 | esac | |
18371 | ;; | |
63cf211a | 18372 | esac |
cafe096b | 18373 | |
a6ccdbab | 18374 | ac_dir=`$as_dirname -- "$ac_file" || |
ba479fd2 | 18375 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
18376 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
18377 | X"$ac_file" : 'X\(//\)$' \| \ | |
a6ccdbab | 18378 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 18379 | echo X"$ac_file" | |
a6ccdbab EC |
18380 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
18381 | s//\1/ | |
18382 | q | |
18383 | } | |
18384 | /^X\(\/\/\)[^/].*/{ | |
18385 | s//\1/ | |
18386 | q | |
18387 | } | |
18388 | /^X\(\/\/\)$/{ | |
18389 | s//\1/ | |
18390 | q | |
18391 | } | |
18392 | /^X\(\/\).*/{ | |
18393 | s//\1/ | |
18394 | q | |
18395 | } | |
18396 | s/.*/./; q'` | |
18397 | { as_dir="$ac_dir" | |
18398 | case $as_dir in #( | |
18399 | -*) as_dir=./$as_dir;; | |
18400 | esac | |
18401 | test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { | |
ba479fd2 | 18402 | as_dirs= |
a6ccdbab EC |
18403 | while :; do |
18404 | case $as_dir in #( | |
18405 | *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( | |
18406 | *) as_qdir=$as_dir;; | |
18407 | esac | |
18408 | as_dirs="'$as_qdir' $as_dirs" | |
18409 | as_dir=`$as_dirname -- "$as_dir" || | |
ba479fd2 | 18410 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
18411 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
18412 | X"$as_dir" : 'X\(//\)$' \| \ | |
a6ccdbab | 18413 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 18414 | echo X"$as_dir" | |
a6ccdbab EC |
18415 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
18416 | s//\1/ | |
18417 | q | |
18418 | } | |
18419 | /^X\(\/\/\)[^/].*/{ | |
18420 | s//\1/ | |
18421 | q | |
18422 | } | |
18423 | /^X\(\/\/\)$/{ | |
18424 | s//\1/ | |
18425 | q | |
18426 | } | |
18427 | /^X\(\/\).*/{ | |
18428 | s//\1/ | |
18429 | q | |
18430 | } | |
18431 | s/.*/./; q'` | |
18432 | test -d "$as_dir" && break | |
ba479fd2 | 18433 | done |
a6ccdbab EC |
18434 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
18435 | } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 | |
18436 | echo "$as_me: error: cannot create directory $as_dir" >&2;} | |
ba479fd2 | 18437 | { (exit 1); exit 1; }; }; } |
ba479fd2 NN |
18438 | ac_builddir=. |
18439 | ||
a6ccdbab EC |
18440 | case "$ac_dir" in |
18441 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18442 | *) | |
ba479fd2 | 18443 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
a6ccdbab EC |
18444 | # A ".." for each directory in $ac_dir_suffix. |
18445 | ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` | |
18446 | case $ac_top_builddir_sub in | |
18447 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18448 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18449 | esac ;; | |
18450 | esac | |
18451 | ac_abs_top_builddir=$ac_pwd | |
18452 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18453 | # for backward compatibility: | |
18454 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
18455 | |
18456 | case $srcdir in | |
a6ccdbab | 18457 | .) # We are building in place. |
ba479fd2 | 18458 | ac_srcdir=. |
a6ccdbab EC |
18459 | ac_top_srcdir=$ac_top_builddir_sub |
18460 | ac_abs_top_srcdir=$ac_pwd ;; | |
18461 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 18462 | ac_srcdir=$srcdir$ac_dir_suffix; |
a6ccdbab EC |
18463 | ac_top_srcdir=$srcdir |
18464 | ac_abs_top_srcdir=$srcdir ;; | |
18465 | *) # Relative name. | |
18466 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18467 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18468 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
ba479fd2 | 18469 | esac |
a6ccdbab | 18470 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
ba479fd2 NN |
18471 | |
18472 | ||
a6ccdbab EC |
18473 | case $ac_mode in |
18474 | :F) | |
18475 | # | |
18476 | # CONFIG_FILE | |
18477 | # | |
ba479fd2 | 18478 | |
a6ccdbab | 18479 | _ACEOF |
b8ec3cc8 | 18480 | |
a6ccdbab EC |
18481 | cat >>$CONFIG_STATUS <<\_ACEOF |
18482 | # If the template does not know about datarootdir, expand it. | |
18483 | # FIXME: This hack should be removed a few years after 2.60. | |
18484 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18485 | ||
18486 | case `sed -n '/datarootdir/ { | |
18487 | p | |
18488 | q | |
18489 | } | |
18490 | /@datadir@/p | |
18491 | /@docdir@/p | |
18492 | /@infodir@/p | |
18493 | /@localedir@/p | |
18494 | /@mandir@/p | |
18495 | ' $ac_file_inputs` in | |
18496 | *datarootdir*) ac_datarootdir_seen=yes;; | |
18497 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
18498 | { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
18499 | echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
ba479fd2 | 18500 | _ACEOF |
a6ccdbab EC |
18501 | cat >>$CONFIG_STATUS <<_ACEOF |
18502 | ac_datarootdir_hack=' | |
18503 | s&@datadir@&$datadir&g | |
18504 | s&@docdir@&$docdir&g | |
18505 | s&@infodir@&$infodir&g | |
18506 | s&@localedir@&$localedir&g | |
18507 | s&@mandir@&$mandir&g | |
18508 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
18509 | esac | |
18510 | _ACEOF | |
18511 | ||
18512 | # Neutralize VPATH when `$srcdir' = `.'. | |
18513 | # Shell code in configure.ac might set extrasub. | |
18514 | # FIXME: do we really want to maintain this feature? | |
ba479fd2 NN |
18515 | cat >>$CONFIG_STATUS <<_ACEOF |
18516 | sed "$ac_vpsub | |
18517 | $extrasub | |
18518 | _ACEOF | |
18519 | cat >>$CONFIG_STATUS <<\_ACEOF | |
18520 | :t | |
18521 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
a6ccdbab EC |
18522 | s&@configure_input@&$configure_input&;t t |
18523 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
18524 | s&@srcdir@&$ac_srcdir&;t t | |
18525 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
18526 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
18527 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
18528 | s&@builddir@&$ac_builddir&;t t | |
18529 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
18530 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
18531 | $ac_datarootdir_hack | |
18532 | " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out | |
18533 | ||
18534 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
18535 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
18536 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
18537 | { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18538 | which seems to be undefined. Please make sure it is defined." >&5 | |
18539 | echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18540 | which seems to be undefined. Please make sure it is defined." >&2;} | |
18541 | ||
18542 | rm -f "$tmp/stdin" | |
ba479fd2 | 18543 | case $ac_file in |
a6ccdbab EC |
18544 | -) cat "$tmp/out"; rm -f "$tmp/out";; |
18545 | *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; | |
861bb6c1 | 18546 | esac |
a6ccdbab EC |
18547 | ;; |
18548 | :H) | |
18549 | # | |
18550 | # CONFIG_HEADER | |
18551 | # | |
18552 | _ACEOF | |
18553 | ||
18554 | # Transform confdefs.h into a sed script `conftest.defines', that | |
18555 | # substitutes the proper values into config.h.in to produce config.h. | |
18556 | rm -f conftest.defines conftest.tail | |
18557 | # First, append a space to every undef/define line, to ease matching. | |
18558 | echo 's/$/ /' >conftest.defines | |
18559 | # Then, protect against being on the right side of a sed subst, or in | |
18560 | # an unquoted here document, in config.status. If some macros were | |
18561 | # called several times there might be several #defines for the same | |
18562 | # symbol, which is useless. But do not sort them, since the last | |
18563 | # AC_DEFINE must be honored. | |
18564 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18565 | # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where | |
18566 | # NAME is the cpp macro being defined, VALUE is the value it is being given. | |
18567 | # PARAMS is the parameter list in the macro definition--in most cases, it's | |
18568 | # just an empty string. | |
18569 | ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' | |
18570 | ac_dB='\\)[ (].*,\\1define\\2' | |
18571 | ac_dC=' ' | |
18572 | ac_dD=' ,' | |
18573 | ||
18574 | uniq confdefs.h | | |
18575 | sed -n ' | |
18576 | t rset | |
18577 | :rset | |
18578 | s/^[ ]*#[ ]*define[ ][ ]*// | |
18579 | t ok | |
18580 | d | |
18581 | :ok | |
18582 | s/[\\&,]/\\&/g | |
18583 | s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p | |
18584 | s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p | |
18585 | ' >>conftest.defines | |
18586 | ||
18587 | # Remove the space that was appended to ease matching. | |
18588 | # Then replace #undef with comments. This is necessary, for | |
861bb6c1 JL |
18589 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
18590 | # on some systems where configure will not decide to define it. | |
a6ccdbab EC |
18591 | # (The regexp can be short, since the line contains either #define or #undef.) |
18592 | echo 's/ $// | |
18593 | s,^[ #]*u.*,/* & */,' >>conftest.defines | |
18594 | ||
18595 | # Break up conftest.defines: | |
18596 | ac_max_sed_lines=50 | |
18597 | ||
18598 | # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" | |
18599 | # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" | |
18600 | # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" | |
18601 | # et cetera. | |
18602 | ac_in='$ac_file_inputs' | |
18603 | ac_out='"$tmp/out1"' | |
18604 | ac_nxt='"$tmp/out2"' | |
18605 | ||
18606 | while : | |
ba479fd2 | 18607 | do |
a6ccdbab EC |
18608 | # Write a here document: |
18609 | cat >>$CONFIG_STATUS <<_ACEOF | |
18610 | # First, check the format of the line: | |
18611 | cat >"\$tmp/defines.sed" <<\\CEOF | |
18612 | /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def | |
18613 | /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def | |
18614 | b | |
18615 | :def | |
18616 | _ACEOF | |
18617 | sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS | |
ba479fd2 | 18618 | echo 'CEOF |
a6ccdbab EC |
18619 | sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS |
18620 | ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in | |
18621 | sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail | |
18622 | grep . conftest.tail >/dev/null || break | |
ba479fd2 NN |
18623 | rm -f conftest.defines |
18624 | mv conftest.tail conftest.defines | |
18625 | done | |
a6ccdbab | 18626 | rm -f conftest.defines conftest.tail |
ba479fd2 | 18627 | |
a6ccdbab | 18628 | echo "ac_result=$ac_in" >>$CONFIG_STATUS |
ba479fd2 | 18629 | cat >>$CONFIG_STATUS <<\_ACEOF |
ba479fd2 | 18630 | if test x"$ac_file" != x-; then |
a6ccdbab EC |
18631 | echo "/* $configure_input */" >"$tmp/config.h" |
18632 | cat "$ac_result" >>"$tmp/config.h" | |
18633 | if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then | |
ba479fd2 NN |
18634 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 |
18635 | echo "$as_me: $ac_file is unchanged" >&6;} | |
18636 | else | |
ba479fd2 | 18637 | rm -f $ac_file |
a6ccdbab | 18638 | mv "$tmp/config.h" $ac_file |
ba479fd2 NN |
18639 | fi |
18640 | else | |
a6ccdbab EC |
18641 | echo "/* $configure_input */" |
18642 | cat "$ac_result" | |
ba479fd2 | 18643 | fi |
a6ccdbab EC |
18644 | rm -f "$tmp/out12" |
18645 | ;; | |
dd7f7a6e | 18646 | |
a6ccdbab EC |
18647 | :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 |
18648 | echo "$as_me: executing $ac_file commands" >&6;} | |
18649 | ;; | |
18650 | esac | |
dd7f7a6e EC |
18651 | |
18652 | ||
a6ccdbab EC |
18653 | case $ac_file$ac_mode in |
18654 | "default":C) | |
f1faaabd NN |
18655 | case ${CONFIG_HEADERS} in |
18656 | *auto-host.h:config.in*) | |
18657 | echo > cstamp-h ;; | |
861bb6c1 | 18658 | esac |
2ed26f6b | 18659 | # Make sure all the subdirs exist. |
3b620440 | 18660 | for d in $subdirs doc build |
2ed26f6b | 18661 | do |
2ed26f6b | 18662 | test -d $d || mkdir $d |
2ed26f6b | 18663 | done |
93cf819d BK |
18664 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
18665 | # bootstrapping and the installation procedure can still use | |
18666 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
18667 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
18668 | # This is virtually a duplicate of what happens in configure.lang; we do | |
18669 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
18670 | case "$LN_S" in |
18671 | *-s*) | |
18672 | for d in ${subdirs} ; do | |
1e6347d8 | 18673 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 18674 | cd $d |
6a1b7268 | 18675 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
18676 | do |
18677 | rm -f $t | |
35f06ae4 | 18678 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
18679 | done |
18680 | cd $STARTDIR | |
35f06ae4 PB |
18681 | done |
18682 | ;; | |
18683 | esac | |
ba479fd2 | 18684 | ;; |
a6ccdbab | 18685 | |
ba479fd2 | 18686 | esac |
a6ccdbab | 18687 | done # for ac_tag |
cafe096b | 18688 | |
ba479fd2 NN |
18689 | |
18690 | { (exit 0); exit 0; } | |
18691 | _ACEOF | |
861bb6c1 | 18692 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
18693 | ac_clean_files=$ac_clean_files_save |
18694 | ||
18695 | ||
18696 | # configure is writing to config.log, and then calls config.status. | |
18697 | # config.status does its own redirection, appending to config.log. | |
18698 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
18699 | # by configure, so config.status won't be able to write to it; its | |
18700 | # output is simply discarded. So we exec the FD to /dev/null, | |
18701 | # effectively closing config.log, so it can be properly (re)opened and | |
18702 | # appended to by config.status. When coming back to configure, we | |
18703 | # need to make the FD available again. | |
18704 | if test "$no_create" != yes; then | |
18705 | ac_cs_success=: | |
18706 | ac_config_status_args= | |
18707 | test "$silent" = yes && | |
18708 | ac_config_status_args="$ac_config_status_args --quiet" | |
18709 | exec 5>/dev/null | |
18710 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
18711 | exec 5>>config.log | |
18712 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
18713 | # would make configure fail if this is the last instruction. | |
18714 | $ac_cs_success || { (exit 1); exit 1; } | |
18715 | fi | |
861bb6c1 | 18716 |