]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
ab22c1fa | 3 | # Generated by GNU Autoconf 2.61. |
861bb6c1 | 4 | # |
ab22c1fa CF |
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 | ||
ab22c1fa CF |
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+"$@"}'='"$@"' | |
ab22c1fa CF |
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 | ||
ab22c1fa CF |
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. |
ab22c1fa CF |
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 | |
ab22c1fa | 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. | |
ab22c1fa CF |
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 | ||
ab22c1fa | 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. | |
ab22c1fa | 131 | as_me=`$as_basename -- "$0" || |
ba479fd2 NN |
132 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
133 | X"$0" : 'X\(//\)$' \| \ | |
ab22c1fa | 134 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 135 | echo X/"$0" | |
ab22c1fa CF |
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 | |
ab22c1fa CF |
150 | # CDPATH. |
151 | $as_unset CDPATH | |
a6ccdbab | 152 | |
703d89ab | 153 | |
ab22c1fa CF |
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 | |
703d89ab ZW |
159 | fi |
160 | ||
ab22c1fa CF |
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 | } | |
703d89ab | 177 | |
ab22c1fa CF |
178 | exitcode=0 |
179 | if as_func_success; then | |
180 | : | |
181 | else | |
182 | exitcode=1 | |
183 | echo as_func_success failed. | |
184 | fi | |
703d89ab | 185 | |
ab22c1fa CF |
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=. | |
ab22c1fa | 226 | case $as_dir in |
ba479fd2 | 227 | /*) |
ab22c1fa CF |
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 | ( | |
703d89ab ZW |
328 | as_lineno_1=$LINENO |
329 | as_lineno_2=$LINENO | |
330 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
ab22c1fa CF |
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 | |
ab22c1fa CF |
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 |
ab22c1fa CF |
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 ' |
ab22c1fa CF |
443 | s/[$]LINENO.*/&-/ |
444 | t lineno | |
445 | b | |
446 | :lineno | |
ba479fd2 | 447 | N |
ab22c1fa CF |
448 | :loop |
449 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
ba479fd2 | 450 | t loop |
ab22c1fa | 451 | s/-\n.*// |
ba479fd2 | 452 | ' >$as_me.lineno && |
ab22c1fa | 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 | |
ab22c1fa CF |
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 | ||
ab22c1fa CF |
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 | ||
ab22c1fa CF |
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 | |
ab22c1fa CF |
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 | |
ab22c1fa CF |
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 | |
ab22c1fa CF |
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 | ||
ab22c1fa CF |
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 | |
ab22c1fa | 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 |
ab22c1fa | 563 | ac_clean_files= |
ba479fd2 | 564 | ac_config_libobj_dir=. |
ab22c1fa | 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> | |
ab22c1fa | 583 | #ifdef HAVE_SYS_TYPES_H |
ba479fd2 NN |
584 | # include <sys/types.h> |
585 | #endif | |
ab22c1fa | 586 | #ifdef HAVE_SYS_STAT_H |
ba479fd2 NN |
587 | # include <sys/stat.h> |
588 | #endif | |
ab22c1fa | 589 | #ifdef STDC_HEADERS |
ba479fd2 NN |
590 | # include <stdlib.h> |
591 | # include <stddef.h> | |
592 | #else | |
ab22c1fa | 593 | # ifdef HAVE_STDLIB_H |
ba479fd2 NN |
594 | # include <stdlib.h> |
595 | # endif | |
596 | #endif | |
ab22c1fa CF |
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 | |
ab22c1fa | 603 | #ifdef HAVE_STRINGS_H |
ba479fd2 NN |
604 | # include <strings.h> |
605 | #endif | |
ab22c1fa | 606 | #ifdef HAVE_INTTYPES_H |
ba479fd2 | 607 | # include <inttypes.h> |
ba479fd2 | 608 | #endif |
ab22c1fa CF |
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 | ||
ab22c1fa CF |
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 | loose_warn | |
684 | cxx_compat_warn | |
685 | strict_warn | |
686 | warn_cflags | |
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_fixed_point | |
696 | enable_shared | |
697 | TARGET_SYSTEM_ROOT | |
698 | TARGET_SYSTEM_ROOT_DEFINE | |
699 | CROSS_SYSTEM_HEADER_DIR | |
700 | onestep | |
701 | SET_MAKE | |
702 | AWK | |
703 | LN_S | |
704 | LN | |
705 | RANLIB | |
706 | ranlib_flags | |
707 | INSTALL | |
708 | INSTALL_PROGRAM | |
709 | INSTALL_DATA | |
710 | make_compare_target | |
711 | have_mktemp_command | |
712 | MAKEINFO | |
713 | BUILD_INFO | |
714 | GENERATED_MANPAGES | |
715 | FLEX | |
716 | BISON | |
717 | NM | |
718 | AR | |
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_compilers | |
772 | all_gtfiles | |
773 | all_lang_makefrags | |
774 | all_lang_makefiles | |
775 | all_languages | |
776 | all_selected_languages | |
777 | build_exeext | |
778 | build_install_headers_dir | |
779 | build_xm_file_list | |
780 | build_xm_include_list | |
781 | build_xm_defines | |
782 | check_languages | |
783 | cpp_install_dir | |
784 | xmake_file | |
785 | tmake_file | |
786 | extra_gcc_objs | |
787 | extra_headers_list | |
788 | extra_objs | |
789 | extra_parts | |
790 | extra_passes | |
791 | extra_programs | |
792 | float_h_file | |
793 | gcc_config_arguments | |
794 | gcc_gxx_include_dir | |
795 | host_exeext | |
796 | host_xm_file_list | |
797 | host_xm_include_list | |
798 | host_xm_defines | |
799 | out_host_hook_obj | |
800 | install | |
801 | lang_opt_files | |
802 | lang_specs_files | |
803 | lang_tree_files | |
804 | local_prefix | |
805 | md_file | |
806 | objc_boehm_gc | |
807 | out_file | |
808 | out_object_file | |
809 | thread_file | |
810 | tm_file_list | |
811 | tm_include_list | |
812 | tm_defines | |
813 | tm_p_file_list | |
814 | tm_p_include_list | |
815 | xm_file_list | |
816 | xm_include_list | |
817 | xm_defines | |
818 | c_target_objs | |
819 | cxx_target_objs | |
820 | target_cpu_default | |
821 | GMPLIBS | |
822 | GMPINC | |
823 | LIBOBJS | |
824 | LTLIBOBJS' | |
ba479fd2 | 825 | ac_subst_files='language_hooks' |
ab22c1fa CF |
826 | ac_precious_vars='build_alias |
827 | host_alias | |
828 | target_alias | |
829 | CC | |
830 | CFLAGS | |
831 | LDFLAGS | |
832 | LIBS | |
833 | CPPFLAGS | |
834 | CPP | |
835 | GMPLIBS | |
836 | GMPINC' | |
837 | ||
861bb6c1 JL |
838 | |
839 | # Initialize some variables set by options. | |
ba479fd2 NN |
840 | ac_init_help= |
841 | ac_init_version=false | |
861bb6c1 JL |
842 | # The variables have the same names as the options, with |
843 | # dashes changed to underlines. | |
ba479fd2 | 844 | cache_file=/dev/null |
861bb6c1 | 845 | exec_prefix=NONE |
861bb6c1 | 846 | no_create= |
861bb6c1 JL |
847 | no_recursion= |
848 | prefix=NONE | |
849 | program_prefix=NONE | |
850 | program_suffix=NONE | |
851 | program_transform_name=s,x,x, | |
852 | silent= | |
853 | site= | |
854 | srcdir= | |
861bb6c1 JL |
855 | verbose= |
856 | x_includes=NONE | |
857 | x_libraries=NONE | |
ba479fd2 NN |
858 | |
859 | # Installation directory options. | |
860 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
861 | # and all the variables that are supposed to be based on exec_prefix | |
862 | # by default will actually change. | |
863 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
ab22c1fa | 864 | # (The list follows the same order as the GNU Coding Standards.) |
861bb6c1 JL |
865 | bindir='${exec_prefix}/bin' |
866 | sbindir='${exec_prefix}/sbin' | |
867 | libexecdir='${exec_prefix}/libexec' | |
ab22c1fa CF |
868 | datarootdir='${prefix}/share' |
869 | datadir='${datarootdir}' | |
861bb6c1 JL |
870 | sysconfdir='${prefix}/etc' |
871 | sharedstatedir='${prefix}/com' | |
872 | localstatedir='${prefix}/var' | |
861bb6c1 JL |
873 | includedir='${prefix}/include' |
874 | oldincludedir='/usr/include' | |
ab22c1fa CF |
875 | docdir='${datarootdir}/doc/${PACKAGE}' |
876 | infodir='${datarootdir}/info' | |
877 | htmldir='${docdir}' | |
878 | dvidir='${docdir}' | |
879 | pdfdir='${docdir}' | |
880 | psdir='${docdir}' | |
881 | libdir='${exec_prefix}/lib' | |
882 | localedir='${datarootdir}/locale' | |
883 | mandir='${datarootdir}/man' | |
861bb6c1 | 884 | |
861bb6c1 | 885 | ac_prev= |
ab22c1fa | 886 | ac_dashdash= |
861bb6c1 JL |
887 | for ac_option |
888 | do | |
861bb6c1 JL |
889 | # If the previous option needs an argument, assign it. |
890 | if test -n "$ac_prev"; then | |
ab22c1fa | 891 | eval $ac_prev=\$ac_option |
861bb6c1 JL |
892 | ac_prev= |
893 | continue | |
894 | fi | |
895 | ||
ab22c1fa CF |
896 | case $ac_option in |
897 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
898 | *) ac_optarg=yes ;; | |
899 | esac | |
861bb6c1 JL |
900 | |
901 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
902 | ||
ab22c1fa CF |
903 | case $ac_dashdash$ac_option in |
904 | --) | |
905 | ac_dashdash=yes ;; | |
861bb6c1 JL |
906 | |
907 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
908 | ac_prev=bindir ;; | |
909 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 910 | bindir=$ac_optarg ;; |
861bb6c1 JL |
911 | |
912 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 913 | ac_prev=build_alias ;; |
861bb6c1 | 914 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 915 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
916 | |
917 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
918 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
919 | ac_prev=cache_file ;; | |
920 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
921 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
922 | cache_file=$ac_optarg ;; |
923 | ||
924 | --config-cache | -C) | |
925 | cache_file=config.cache ;; | |
861bb6c1 | 926 | |
ab22c1fa | 927 | -datadir | --datadir | --datadi | --datad) |
861bb6c1 | 928 | ac_prev=datadir ;; |
ab22c1fa | 929 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
ba479fd2 | 930 | datadir=$ac_optarg ;; |
861bb6c1 | 931 | |
ab22c1fa CF |
932 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
933 | | --dataroo | --dataro | --datar) | |
934 | ac_prev=datarootdir ;; | |
935 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
936 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
937 | datarootdir=$ac_optarg ;; | |
938 | ||
861bb6c1 | 939 | -disable-* | --disable-*) |
ba479fd2 | 940 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 941 | # Reject names that are not valid shell variable names. |
ab22c1fa | 942 | expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
943 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 |
944 | { (exit 1); exit 1; }; } | |
ab22c1fa CF |
945 | ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` |
946 | eval enable_$ac_feature=no ;; | |
947 | ||
948 | -docdir | --docdir | --docdi | --doc | --do) | |
949 | ac_prev=docdir ;; | |
950 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
951 | docdir=$ac_optarg ;; | |
952 | ||
953 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
954 | ac_prev=dvidir ;; | |
955 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
956 | dvidir=$ac_optarg ;; | |
861bb6c1 JL |
957 | |
958 | -enable-* | --enable-*) | |
ba479fd2 | 959 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 960 | # Reject names that are not valid shell variable names. |
ab22c1fa | 961 | expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
962 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 |
963 | { (exit 1); exit 1; }; } | |
ab22c1fa CF |
964 | ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` |
965 | eval enable_$ac_feature=\$ac_optarg ;; | |
861bb6c1 JL |
966 | |
967 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
968 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
969 | | --exec | --exe | --ex) | |
970 | ac_prev=exec_prefix ;; | |
971 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
972 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
973 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 974 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
975 | |
976 | -gas | --gas | --ga | --g) | |
977 | # Obsolete; use --with-gas. | |
978 | with_gas=yes ;; | |
979 | ||
ba479fd2 NN |
980 | -help | --help | --hel | --he | -h) |
981 | ac_init_help=long ;; | |
982 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
983 | ac_init_help=recursive ;; | |
984 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
985 | ac_init_help=short ;; | |
861bb6c1 JL |
986 | |
987 | -host | --host | --hos | --ho) | |
ba479fd2 | 988 | ac_prev=host_alias ;; |
861bb6c1 | 989 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 990 | host_alias=$ac_optarg ;; |
861bb6c1 | 991 | |
ab22c1fa CF |
992 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
993 | ac_prev=htmldir ;; | |
994 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
995 | | --ht=*) | |
996 | htmldir=$ac_optarg ;; | |
997 | ||
861bb6c1 JL |
998 | -includedir | --includedir | --includedi | --included | --include \ |
999 | | --includ | --inclu | --incl | --inc) | |
1000 | ac_prev=includedir ;; | |
1001 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1002 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 1003 | includedir=$ac_optarg ;; |
861bb6c1 JL |
1004 | |
1005 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1006 | ac_prev=infodir ;; | |
1007 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 1008 | infodir=$ac_optarg ;; |
861bb6c1 JL |
1009 | |
1010 | -libdir | --libdir | --libdi | --libd) | |
1011 | ac_prev=libdir ;; | |
1012 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 1013 | libdir=$ac_optarg ;; |
861bb6c1 JL |
1014 | |
1015 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1016 | | --libexe | --libex | --libe) | |
1017 | ac_prev=libexecdir ;; | |
1018 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1019 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 1020 | libexecdir=$ac_optarg ;; |
861bb6c1 | 1021 | |
ab22c1fa CF |
1022 | -localedir | --localedir | --localedi | --localed | --locale) |
1023 | ac_prev=localedir ;; | |
1024 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1025 | localedir=$ac_optarg ;; | |
1026 | ||
861bb6c1 | 1027 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
ab22c1fa | 1028 | | --localstate | --localstat | --localsta | --localst | --locals) |
861bb6c1 JL |
1029 | ac_prev=localstatedir ;; |
1030 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
ab22c1fa | 1031 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
ba479fd2 | 1032 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
1033 | |
1034 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1035 | ac_prev=mandir ;; | |
1036 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 1037 | mandir=$ac_optarg ;; |
861bb6c1 JL |
1038 | |
1039 | -nfp | --nfp | --nf) | |
1040 | # Obsolete; use --without-fp. | |
1041 | with_fp=no ;; | |
1042 | ||
1043 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 1044 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
1045 | no_create=yes ;; |
1046 | ||
1047 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1048 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1049 | no_recursion=yes ;; | |
1050 | ||
1051 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1052 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1053 | | --oldin | --oldi | --old | --ol | --o) | |
1054 | ac_prev=oldincludedir ;; | |
1055 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1056 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1057 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 1058 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
1059 | |
1060 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1061 | ac_prev=prefix ;; | |
1062 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 1063 | prefix=$ac_optarg ;; |
861bb6c1 JL |
1064 | |
1065 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1066 | | --program-pre | --program-pr | --program-p) | |
1067 | ac_prev=program_prefix ;; | |
1068 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1069 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 1070 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
1071 | |
1072 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1073 | | --program-suf | --program-su | --program-s) | |
1074 | ac_prev=program_suffix ;; | |
1075 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1076 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 1077 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
1078 | |
1079 | -program-transform-name | --program-transform-name \ | |
1080 | | --program-transform-nam | --program-transform-na \ | |
1081 | | --program-transform-n | --program-transform- \ | |
1082 | | --program-transform | --program-transfor \ | |
1083 | | --program-transfo | --program-transf \ | |
1084 | | --program-trans | --program-tran \ | |
1085 | | --progr-tra | --program-tr | --program-t) | |
1086 | ac_prev=program_transform_name ;; | |
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=*) | |
ba479fd2 | 1094 | program_transform_name=$ac_optarg ;; |
861bb6c1 | 1095 | |
ab22c1fa CF |
1096 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1097 | ac_prev=pdfdir ;; | |
1098 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1099 | pdfdir=$ac_optarg ;; | |
1100 | ||
1101 | -psdir | --psdir | --psdi | --psd | --ps) | |
1102 | ac_prev=psdir ;; | |
1103 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1104 | psdir=$ac_optarg ;; | |
1105 | ||
861bb6c1 JL |
1106 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1107 | | -silent | --silent | --silen | --sile | --sil) | |
1108 | silent=yes ;; | |
1109 | ||
1110 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1111 | ac_prev=sbindir ;; | |
1112 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1113 | | --sbi=* | --sb=*) | |
ba479fd2 | 1114 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
1115 | |
1116 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1117 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1118 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1119 | | --sha | --sh) | |
1120 | ac_prev=sharedstatedir ;; | |
1121 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1122 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1123 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1124 | | --sha=* | --sh=*) | |
ba479fd2 | 1125 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
1126 | |
1127 | -site | --site | --sit) | |
1128 | ac_prev=site ;; | |
1129 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 1130 | site=$ac_optarg ;; |
861bb6c1 JL |
1131 | |
1132 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1133 | ac_prev=srcdir ;; | |
1134 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 1135 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
1136 | |
1137 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1138 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1139 | ac_prev=sysconfdir ;; | |
1140 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1141 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 1142 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
1143 | |
1144 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 1145 | ac_prev=target_alias ;; |
861bb6c1 | 1146 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 1147 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
1148 | |
1149 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1150 | verbose=yes ;; | |
1151 | ||
ba479fd2 NN |
1152 | -version | --version | --versio | --versi | --vers | -V) |
1153 | ac_init_version=: ;; | |
861bb6c1 JL |
1154 | |
1155 | -with-* | --with-*) | |
ba479fd2 | 1156 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 1157 | # Reject names that are not valid shell variable names. |
ab22c1fa | 1158 | expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
1159 | { echo "$as_me: error: invalid package name: $ac_package" >&2 |
1160 | { (exit 1); exit 1; }; } | |
ab22c1fa CF |
1161 | ac_package=`echo $ac_package | sed 's/[-.]/_/g'` |
1162 | eval with_$ac_package=\$ac_optarg ;; | |
861bb6c1 JL |
1163 | |
1164 | -without-* | --without-*) | |
ba479fd2 | 1165 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 1166 | # Reject names that are not valid shell variable names. |
ab22c1fa | 1167 | expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
1168 | { echo "$as_me: error: invalid package name: $ac_package" >&2 |
1169 | { (exit 1); exit 1; }; } | |
ab22c1fa CF |
1170 | ac_package=`echo $ac_package | sed 's/[-.]/_/g'` |
1171 | eval with_$ac_package=no ;; | |
861bb6c1 JL |
1172 | |
1173 | --x) | |
1174 | # Obsolete; use --with-x. | |
1175 | with_x=yes ;; | |
1176 | ||
1177 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1178 | | --x-incl | --x-inc | --x-in | --x-i) | |
1179 | ac_prev=x_includes ;; | |
1180 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1181 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 1182 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
1183 | |
1184 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1185 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1186 | ac_prev=x_libraries ;; | |
1187 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1188 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 1189 | x_libraries=$ac_optarg ;; |
861bb6c1 | 1190 | |
ba479fd2 NN |
1191 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
1192 | Try \`$0 --help' for more information." >&2 | |
1193 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
1194 | ;; |
1195 | ||
ba479fd2 NN |
1196 | *=*) |
1197 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1198 | # Reject names that are not valid shell variable names. | |
1199 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
1200 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
1201 | { (exit 1); exit 1; }; } | |
ab22c1fa | 1202 | eval $ac_envvar=\$ac_optarg |
ba479fd2 NN |
1203 | export $ac_envvar ;; |
1204 | ||
861bb6c1 | 1205 | *) |
ba479fd2 NN |
1206 | # FIXME: should be removed in autoconf 3.0. |
1207 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1208 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1209 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
1210 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
861bb6c1 JL |
1211 | ;; |
1212 | ||
1213 | esac | |
1214 | done | |
1215 | ||
1216 | if test -n "$ac_prev"; then | |
ba479fd2 NN |
1217 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
1218 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
1219 | { (exit 1); exit 1; }; } | |
63cf211a | 1220 | fi |
63cf211a | 1221 | |
ab22c1fa CF |
1222 | # Be sure to have absolute directory names. |
1223 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1224 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1225 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1226 | libdir localedir mandir | |
861bb6c1 | 1227 | do |
ab22c1fa | 1228 | eval ac_val=\$$ac_var |
ba479fd2 | 1229 | case $ac_val in |
ab22c1fa CF |
1230 | [\\/$]* | ?:[\\/]* ) continue;; |
1231 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
a3bba767 | 1232 | esac |
ab22c1fa CF |
1233 | { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 |
1234 | { (exit 1); exit 1; }; } | |
a3bba767 JJ |
1235 | done |
1236 | ||
1237 | # There might be people who depend on the old broken behavior: `$host' | |
1238 | # used to hold the argument of --host etc. | |
1239 | # FIXME: To remove some day. | |
1240 | build=$build_alias | |
1241 | host=$host_alias | |
ba479fd2 NN |
1242 | target=$target_alias |
1243 | ||
1244 | # FIXME: To remove some day. | |
1245 | if test "x$host_alias" != x; then | |
1246 | if test "x$build_alias" = x; then | |
1247 | cross_compiling=maybe | |
1248 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
1249 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
1250 | elif test "x$build_alias" != "x$host_alias"; then | |
1251 | cross_compiling=yes | |
1252 | fi | |
1253 | fi | |
6e3f3080 | 1254 | |
ba479fd2 NN |
1255 | ac_tool_prefix= |
1256 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1257 | ||
1258 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 1259 | |
861bb6c1 | 1260 | |
ab22c1fa CF |
1261 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1262 | ac_ls_di=`ls -di .` && | |
1263 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1264 | { echo "$as_me: error: Working directory cannot be determined" >&2 | |
1265 | { (exit 1); exit 1; }; } | |
1266 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1267 | { echo "$as_me: error: pwd does not report name of working directory" >&2 | |
1268 | { (exit 1); exit 1; }; } | |
1269 | ||
1270 | ||
861bb6c1 JL |
1271 | # Find the source files, if location was not specified. |
1272 | if test -z "$srcdir"; then | |
1273 | ac_srcdir_defaulted=yes | |
ab22c1fa CF |
1274 | # Try the directory containing this script, then the parent directory. |
1275 | ac_confdir=`$as_dirname -- "$0" || | |
ba479fd2 | 1276 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
1277 | X"$0" : 'X\(//\)[^/]' \| \ |
1278 | X"$0" : 'X\(//\)$' \| \ | |
ab22c1fa | 1279 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 1280 | echo X"$0" | |
ab22c1fa CF |
1281 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
1282 | s//\1/ | |
1283 | q | |
1284 | } | |
1285 | /^X\(\/\/\)[^/].*/{ | |
1286 | s//\1/ | |
1287 | q | |
1288 | } | |
1289 | /^X\(\/\/\)$/{ | |
1290 | s//\1/ | |
1291 | q | |
1292 | } | |
1293 | /^X\(\/\).*/{ | |
1294 | s//\1/ | |
1295 | q | |
1296 | } | |
1297 | s/.*/./; q'` | |
861bb6c1 | 1298 | srcdir=$ac_confdir |
ab22c1fa | 1299 | if test ! -r "$srcdir/$ac_unique_file"; then |
861bb6c1 JL |
1300 | srcdir=.. |
1301 | fi | |
1302 | else | |
1303 | ac_srcdir_defaulted=no | |
1304 | fi | |
ab22c1fa CF |
1305 | if test ! -r "$srcdir/$ac_unique_file"; then |
1306 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1307 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 | |
ba479fd2 | 1308 | { (exit 1); exit 1; }; } |
dd7f7a6e | 1309 | fi |
ab22c1fa CF |
1310 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" |
1311 | ac_abs_confdir=`( | |
1312 | cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 | |
dd7f7a6e | 1313 | { (exit 1); exit 1; }; } |
ab22c1fa CF |
1314 | pwd)` |
1315 | # When building in place, set srcdir=. | |
1316 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1317 | srcdir=. | |
1318 | fi | |
1319 | # Remove unnecessary trailing slashes from srcdir. | |
1320 | # Double slashes in file names in object file debugging info | |
1321 | # mess up M-x gdb in Emacs. | |
1322 | case $srcdir in | |
1323 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1324 | esac | |
1325 | for ac_var in $ac_precious_vars; do | |
1326 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1327 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1328 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1329 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1330 | done | |
63cf211a | 1331 | |
ba479fd2 NN |
1332 | # |
1333 | # Report the --help message. | |
1334 | # | |
1335 | if test "$ac_init_help" = "long"; then | |
1336 | # Omit some internal or obsolete options to make the list less imposing. | |
1337 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1338 | cat <<_ACEOF | |
1339 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 1340 | |
ba479fd2 | 1341 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 1342 | |
ba479fd2 NN |
1343 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
1344 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 1345 | |
ba479fd2 | 1346 | Defaults for the options are specified in brackets. |
861bb6c1 | 1347 | |
ba479fd2 NN |
1348 | Configuration: |
1349 | -h, --help display this help and exit | |
1350 | --help=short display options specific to this package | |
1351 | --help=recursive display the short help of all the included packages | |
1352 | -V, --version display version information and exit | |
1353 | -q, --quiet, --silent do not print \`checking...' messages | |
1354 | --cache-file=FILE cache test results in FILE [disabled] | |
1355 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1356 | -n, --no-create do not create output files | |
1357 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1358 | ||
ba479fd2 NN |
1359 | Installation directories: |
1360 | --prefix=PREFIX install architecture-independent files in PREFIX | |
86da66b5 | 1361 | [$ac_default_prefix] |
ba479fd2 | 1362 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
86da66b5 | 1363 | [PREFIX] |
861bb6c1 | 1364 | |
ba479fd2 NN |
1365 | By default, \`make install' will install all the files in |
1366 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1367 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1368 | for instance \`--prefix=\$HOME'. | |
13c22933 | 1369 | |
ba479fd2 | 1370 | For better control, use the options below. |
13c22933 | 1371 | |
ba479fd2 NN |
1372 | Fine tuning of the installation directories: |
1373 | --bindir=DIR user executables [EPREFIX/bin] | |
1374 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1375 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
ba479fd2 NN |
1376 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
1377 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1378 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1379 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1380 | --includedir=DIR C header files [PREFIX/include] | |
1381 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
ab22c1fa CF |
1382 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
1383 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1384 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1385 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1386 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1387 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1388 | --htmldir=DIR html documentation [DOCDIR] | |
1389 | --dvidir=DIR dvi documentation [DOCDIR] | |
1390 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1391 | --psdir=DIR ps documentation [DOCDIR] | |
ba479fd2 | 1392 | _ACEOF |
13c22933 | 1393 | |
ba479fd2 | 1394 | cat <<\_ACEOF |
13c22933 | 1395 | |
ba479fd2 NN |
1396 | Program names: |
1397 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1398 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1399 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 1400 | |
ba479fd2 NN |
1401 | System types: |
1402 | --build=BUILD configure for building on BUILD [guessed] | |
1403 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1404 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1405 | _ACEOF | |
13c22933 JJ |
1406 | fi |
1407 | ||
ba479fd2 | 1408 | if test -n "$ac_init_help"; then |
13c22933 | 1409 | |
ba479fd2 | 1410 | cat <<\_ACEOF |
13c22933 | 1411 | |
ba479fd2 NN |
1412 | Optional Features: |
1413 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1414 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
1415 | --enable-generated-files-in-srcdir |
1416 | put copies of generated files in source dir | |
1417 | intended for creating source tarballs for users | |
1418 | without texinfo bison or flex. | |
3bbd5a19 | 1419 | --enable-werror-always enable -Werror despite compiler version |
ba479fd2 NN |
1420 | --enable-checking=LIST |
1421 | enable expensive run-time checks. With LIST, | |
1422 | enable only specific categories of checks. | |
cdce5c16 | 1423 | Categories are: yes,no,all,none,release. |
3089f8b5 | 1424 | Flags are: assert,df,fold,gc,gcac,misc, |
7e98624c | 1425 | rtlflag,rtl,runtime,tree,valgrind,types. |
74ee1642 | 1426 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 1427 | --enable-coverage=LEVEL |
fb38008e | 1428 | enable compiler's code coverage collection. |
ba479fd2 NN |
1429 | Use to measure compiler performance and locate |
1430 | unused parts of the compiler. With LEVEL, specify | |
1431 | optimization. Values are opt, noopt, | |
1432 | default is noopt | |
1433 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
1434 | --enable-multilib enable library support for multiple ABIs | |
1435 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
79b87c74 MM |
1436 | --enable-decimal-float={no,yes,bid,dpd} |
1437 | enable decimal float extension to C. Selecting 'bid' | |
1438 | or 'dpd' choses which decimal floating point format | |
1439 | to use | |
ab22c1fa | 1440 | --enable-fixed-point enable fixed-point arithmetic extension to C |
ba479fd2 NN |
1441 | --enable-threads enable thread usage for target GCC |
1442 | --enable-threads=LIB use LIB thread package for target GCC | |
8dea1cca DD |
1443 | --enable-tls enable or disable generation of tls code |
1444 | overriding the assembler check for tls support | |
ba479fd2 NN |
1445 | --enable-objc-gc enable the use of Boehm's garbage collector with |
1446 | the GNU Objective-C runtime | |
1447 | --disable-shared don't provide a shared libgcc | |
1448 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 1449 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 1450 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
1451 | --enable-initfini-array use .init_array/.fini_array sections |
1452 | --enable-sjlj-exceptions | |
1453 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 1454 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ba479fd2 NN |
1455 | --disable-win32-registry |
1456 | disable lookup of installation paths in the | |
1457 | Registry on Windows hosts | |
1458 | --enable-win32-registry enable registry lookup (default) | |
1459 | --enable-win32-registry=KEY | |
1460 | use KEY instead of GCC version as the last portion | |
1461 | of the registry key | |
1462 | --enable-maintainer-mode | |
1463 | enable make rules and dependencies not useful | |
1464 | (and sometimes confusing) to the casual installer | |
1465 | --enable-version-specific-runtime-libs | |
1466 | specify that runtime libraries should be | |
1467 | installed in a compiler-specific directory | |
093e61a6 | 1468 | |
ba479fd2 NN |
1469 | Optional Packages: |
1470 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1471 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1546bb64 | 1472 | --with-build-libsubdir=DIR Directory where to find libraries for build system |
ba479fd2 NN |
1473 | --with-local-prefix=DIR specifies directory to put local include |
1474 | --with-gxx-include-dir=DIR | |
1475 | specifies directory to put g++ header files | |
1476 | --with-cpp-install-dir=DIR | |
1477 | install the user visible C preprocessor in DIR | |
1478 | (relative to PREFIX) as well as PREFIX/bin | |
1479 | --with-gnu-ld arrange to work with GNU ld. | |
1480 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 1481 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
1482 | --with-gnu-as arrange to work with GNU as |
1483 | --with-as arrange to use the specified as (full pathname) | |
1484 | --with-stabs arrange to use stabs instead of host debug format | |
1485 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
1486 | --with-build-sysroot=sysroot |
1487 | use sysroot as the system root during the build | |
ba479fd2 | 1488 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
dfb77e37 KC |
1489 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1490 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1491 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 1492 | --with-system-libunwind use installed libunwind |
ed965309 | 1493 | --with-long-double-128 Use 128-bit long double by default. |
59415997 | 1494 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
1495 | with the compiler |
1496 | --with-system-zlib use installed libz | |
22482f74 MS |
1497 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] |
1498 | --with-datarootdir=DIR Use DIR as the data root [PREFIX/share] | |
1499 | --with-docdir=DIR Install documentation in DIR [DATAROOTDIR] | |
1500 | --with-htmldir=DIR html documentation in in DIR [DOCDIR] | |
13c22933 | 1501 | |
ba479fd2 NN |
1502 | Some influential environment variables: |
1503 | CC C compiler command | |
1504 | CFLAGS C compiler flags | |
1505 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1506 | nonstandard directory <lib dir> | |
ab22c1fa CF |
1507 | LIBS libraries to pass to the linker, e.g. -l<library> |
1508 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1509 | you have headers in a nonstandard directory <include dir> | |
ba479fd2 | 1510 | CPP C preprocessor |
6de9cd9a DN |
1511 | GMPLIBS How to link GMP |
1512 | GMPINC How to find GMP include files | |
13c22933 | 1513 | |
ba479fd2 NN |
1514 | Use these variables to override the choices made by `configure' or to help |
1515 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 1516 | |
ba479fd2 | 1517 | _ACEOF |
ab22c1fa | 1518 | ac_status=$? |
ba479fd2 | 1519 | fi |
6e3f3080 | 1520 | |
ba479fd2 NN |
1521 | if test "$ac_init_help" = "recursive"; then |
1522 | # If there are subdirs, report their specific --help. | |
ba479fd2 | 1523 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
ab22c1fa | 1524 | test -d "$ac_dir" || continue |
ba479fd2 NN |
1525 | ac_builddir=. |
1526 | ||
ab22c1fa CF |
1527 | case "$ac_dir" in |
1528 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1529 | *) | |
ba479fd2 | 1530 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
ab22c1fa CF |
1531 | # A ".." for each directory in $ac_dir_suffix. |
1532 | ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` | |
1533 | case $ac_top_builddir_sub in | |
1534 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1535 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1536 | esac ;; | |
1537 | esac | |
1538 | ac_abs_top_builddir=$ac_pwd | |
1539 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1540 | # for backward compatibility: | |
1541 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
1542 | |
1543 | case $srcdir in | |
ab22c1fa | 1544 | .) # We are building in place. |
ba479fd2 | 1545 | ac_srcdir=. |
ab22c1fa CF |
1546 | ac_top_srcdir=$ac_top_builddir_sub |
1547 | ac_abs_top_srcdir=$ac_pwd ;; | |
1548 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 1549 | ac_srcdir=$srcdir$ac_dir_suffix; |
ab22c1fa CF |
1550 | ac_top_srcdir=$srcdir |
1551 | ac_abs_top_srcdir=$srcdir ;; | |
1552 | *) # Relative name. | |
1553 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1554 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1555 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
86da66b5 | 1556 | esac |
ab22c1fa CF |
1557 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1558 | ||
1559 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1560 | # Check for guested configure. | |
1561 | if test -f "$ac_srcdir/configure.gnu"; then | |
1562 | echo && | |
1563 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1564 | elif test -f "$ac_srcdir/configure"; then | |
1565 | echo && | |
1566 | $SHELL "$ac_srcdir/configure" --help=recursive | |
ba479fd2 NN |
1567 | else |
1568 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
ab22c1fa CF |
1569 | fi || ac_status=$? |
1570 | cd "$ac_pwd" || { ac_status=$?; break; } | |
ba479fd2 NN |
1571 | done |
1572 | fi | |
1573 | ||
ab22c1fa | 1574 | test -n "$ac_init_help" && exit $ac_status |
ba479fd2 NN |
1575 | if $ac_init_version; then |
1576 | cat <<\_ACEOF | |
ab22c1fa CF |
1577 | configure |
1578 | generated by GNU Autoconf 2.61 | |
ba479fd2 | 1579 | |
ab22c1fa CF |
1580 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
1581 | 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | |
ba479fd2 NN |
1582 | This configure script is free software; the Free Software Foundation |
1583 | gives unlimited permission to copy, distribute and modify it. | |
1584 | _ACEOF | |
ab22c1fa | 1585 | exit |
ba479fd2 | 1586 | fi |
ab22c1fa | 1587 | cat >config.log <<_ACEOF |
ba479fd2 NN |
1588 | This file contains any messages produced by compilers while |
1589 | running configure, to aid debugging if configure makes a mistake. | |
1590 | ||
1591 | It was created by $as_me, which was | |
ab22c1fa | 1592 | generated by GNU Autoconf 2.61. Invocation command line was |
ba479fd2 NN |
1593 | |
1594 | $ $0 $@ | |
1595 | ||
1596 | _ACEOF | |
ab22c1fa | 1597 | exec 5>>config.log |
ba479fd2 NN |
1598 | { |
1599 | cat <<_ASUNAME | |
1600 | ## --------- ## | |
1601 | ## Platform. ## | |
1602 | ## --------- ## | |
1603 | ||
1604 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1605 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1606 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1607 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1608 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1609 | ||
1610 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1611 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1612 | ||
1613 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1614 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1615 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
ab22c1fa | 1616 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` |
ba479fd2 NN |
1617 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
1618 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1619 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1620 | ||
1621 | _ASUNAME | |
1622 | ||
1623 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1624 | for as_dir in $PATH | |
1625 | do | |
1626 | IFS=$as_save_IFS | |
1627 | test -z "$as_dir" && as_dir=. | |
1628 | echo "PATH: $as_dir" | |
1629 | done | |
ab22c1fa | 1630 | IFS=$as_save_IFS |
ba479fd2 NN |
1631 | |
1632 | } >&5 | |
1633 | ||
1634 | cat >&5 <<_ACEOF | |
1635 | ||
1636 | ||
1637 | ## ----------- ## | |
1638 | ## Core tests. ## | |
1639 | ## ----------- ## | |
1640 | ||
1641 | _ACEOF | |
1642 | ||
1643 | ||
1644 | # Keep a trace of the command line. | |
1645 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1646 | # Strip out --silent because we don't want to record it for future runs. | |
1647 | # Also quote any args containing shell meta-characters. | |
1648 | # Make two passes to allow for proper duplicate-argument suppression. | |
1649 | ac_configure_args= | |
1650 | ac_configure_args0= | |
1651 | ac_configure_args1= | |
ba479fd2 NN |
1652 | ac_must_keep_next=false |
1653 | for ac_pass in 1 2 | |
1654 | do | |
1655 | for ac_arg | |
1656 | do | |
1657 | case $ac_arg in | |
1658 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1659 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1660 | | -silent | --silent | --silen | --sile | --sil) | |
1661 | continue ;; | |
ab22c1fa | 1662 | *\'*) |
ba479fd2 NN |
1663 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
1664 | esac | |
1665 | case $ac_pass in | |
1666 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1667 | 2) | |
1668 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1669 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1670 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1671 | else |
86da66b5 HPN |
1672 | case $ac_arg in |
1673 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1674 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1675 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1676 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1677 | case "$ac_configure_args0 " in | |
1678 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1679 | esac | |
1680 | ;; | |
1681 | -* ) ac_must_keep_next=true ;; | |
1682 | esac | |
ba479fd2 | 1683 | fi |
ab22c1fa | 1684 | ac_configure_args="$ac_configure_args '$ac_arg'" |
ba479fd2 NN |
1685 | ;; |
1686 | esac | |
1687 | done | |
1688 | done | |
1689 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1690 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1691 | ||
1692 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1693 | # config.log. We remove comments because anyway the quotes in there | |
1694 | # would cause problems or look ugly. | |
ab22c1fa CF |
1695 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
1696 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
ba479fd2 NN |
1697 | trap 'exit_status=$? |
1698 | # Save into config.log some information that might help in debugging. | |
1699 | { | |
1700 | echo | |
1701 | ||
1702 | cat <<\_ASBOX | |
1703 | ## ---------------- ## | |
1704 | ## Cache variables. ## | |
1705 | ## ---------------- ## | |
1706 | _ASBOX | |
1707 | echo | |
1708 | # The following way of writing the cache mishandles newlines in values, | |
ab22c1fa CF |
1709 | ( |
1710 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
1711 | eval ac_val=\$$ac_var | |
1712 | case $ac_val in #( | |
1713 | *${as_nl}*) | |
1714 | case $ac_var in #( | |
1715 | *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 | |
1716 | echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; | |
1717 | esac | |
1718 | case $ac_var in #( | |
1719 | _ | IFS | as_nl) ;; #( | |
1720 | *) $as_unset $ac_var ;; | |
1721 | esac ;; | |
1722 | esac | |
1723 | done | |
ba479fd2 | 1724 | (set) 2>&1 | |
ab22c1fa CF |
1725 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
1726 | *${as_nl}ac_space=\ *) | |
ba479fd2 | 1727 | sed -n \ |
ab22c1fa CF |
1728 | "s/'\''/'\''\\\\'\'''\''/g; |
1729 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
1730 | ;; #( | |
ba479fd2 | 1731 | *) |
ab22c1fa | 1732 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
ba479fd2 | 1733 | ;; |
ab22c1fa CF |
1734 | esac | |
1735 | sort | |
1736 | ) | |
ba479fd2 NN |
1737 | echo |
1738 | ||
1739 | cat <<\_ASBOX | |
1740 | ## ----------------- ## | |
1741 | ## Output variables. ## | |
1742 | ## ----------------- ## | |
1743 | _ASBOX | |
1744 | echo | |
1745 | for ac_var in $ac_subst_vars | |
1746 | do | |
ab22c1fa CF |
1747 | eval ac_val=\$$ac_var |
1748 | case $ac_val in | |
1749 | *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
1750 | esac | |
1751 | echo "$ac_var='\''$ac_val'\''" | |
ba479fd2 NN |
1752 | done | sort |
1753 | echo | |
1754 | ||
1755 | if test -n "$ac_subst_files"; then | |
1756 | cat <<\_ASBOX | |
ab22c1fa CF |
1757 | ## ------------------- ## |
1758 | ## File substitutions. ## | |
1759 | ## ------------------- ## | |
ba479fd2 NN |
1760 | _ASBOX |
1761 | echo | |
1762 | for ac_var in $ac_subst_files | |
1763 | do | |
ab22c1fa CF |
1764 | eval ac_val=\$$ac_var |
1765 | case $ac_val in | |
1766 | *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
1767 | esac | |
1768 | echo "$ac_var='\''$ac_val'\''" | |
ba479fd2 NN |
1769 | done | sort |
1770 | echo | |
1771 | fi | |
1772 | ||
1773 | if test -s confdefs.h; then | |
1774 | cat <<\_ASBOX | |
1775 | ## ----------- ## | |
1776 | ## confdefs.h. ## | |
1777 | ## ----------- ## | |
1778 | _ASBOX | |
1779 | echo | |
ab22c1fa | 1780 | cat confdefs.h |
ba479fd2 NN |
1781 | echo |
1782 | fi | |
1783 | test "$ac_signal" != 0 && | |
1784 | echo "$as_me: caught signal $ac_signal" | |
1785 | echo "$as_me: exit $exit_status" | |
1786 | } >&5 | |
ab22c1fa CF |
1787 | rm -f core *.core core.conftest.* && |
1788 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
ba479fd2 | 1789 | exit $exit_status |
ab22c1fa | 1790 | ' 0 |
ba479fd2 NN |
1791 | for ac_signal in 1 2 13 15; do |
1792 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1793 | done | |
1794 | ac_signal=0 | |
1795 | ||
1796 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
ab22c1fa | 1797 | rm -f -r conftest* confdefs.h |
ba479fd2 NN |
1798 | |
1799 | # Predefined preprocessor variables. | |
1800 | ||
1801 | cat >>confdefs.h <<_ACEOF | |
1802 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1803 | _ACEOF | |
1804 | ||
1805 | ||
1806 | cat >>confdefs.h <<_ACEOF | |
1807 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1808 | _ACEOF | |
1809 | ||
1810 | ||
1811 | cat >>confdefs.h <<_ACEOF | |
1812 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1813 | _ACEOF | |
1814 | ||
1815 | ||
1816 | cat >>confdefs.h <<_ACEOF | |
1817 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1818 | _ACEOF | |
1819 | ||
1820 | ||
1821 | cat >>confdefs.h <<_ACEOF | |
1822 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1823 | _ACEOF | |
1824 | ||
1825 | ||
1826 | # Let the site file select an alternate cache file if it wants to. | |
1827 | # Prefer explicitly selected file to automatically selected ones. | |
ab22c1fa CF |
1828 | if test -n "$CONFIG_SITE"; then |
1829 | set x "$CONFIG_SITE" | |
1830 | elif test "x$prefix" != xNONE; then | |
1831 | set x "$prefix/share/config.site" "$prefix/etc/config.site" | |
1832 | else | |
1833 | set x "$ac_default_prefix/share/config.site" \ | |
1834 | "$ac_default_prefix/etc/config.site" | |
ba479fd2 | 1835 | fi |
ab22c1fa CF |
1836 | shift |
1837 | for ac_site_file | |
1838 | do | |
ba479fd2 NN |
1839 | if test -r "$ac_site_file"; then |
1840 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1841 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1842 | sed 's/^/| /' "$ac_site_file" >&5 | |
1843 | . "$ac_site_file" | |
1844 | fi | |
1845 | done | |
1846 | ||
1847 | if test -r "$cache_file"; then | |
1848 | # Some versions of bash will fail to source /dev/null (special | |
1849 | # files actually), so we avoid doing that. | |
1850 | if test -f "$cache_file"; then | |
1851 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1852 | echo "$as_me: loading cache $cache_file" >&6;} | |
1853 | case $cache_file in | |
ab22c1fa CF |
1854 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
1855 | *) . "./$cache_file";; | |
ba479fd2 NN |
1856 | esac |
1857 | fi | |
1858 | else | |
1859 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1860 | echo "$as_me: creating cache $cache_file" >&6;} | |
1861 | >$cache_file | |
1862 | fi | |
1863 | ||
1864 | # Check that the precious variables saved in the cache have kept the same | |
1865 | # value. | |
1866 | ac_cache_corrupted=false | |
ab22c1fa | 1867 | for ac_var in $ac_precious_vars; do |
ba479fd2 NN |
1868 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1869 | eval ac_new_set=\$ac_env_${ac_var}_set | |
ab22c1fa CF |
1870 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
1871 | eval ac_new_val=\$ac_env_${ac_var}_value | |
ba479fd2 NN |
1872 | case $ac_old_set,$ac_new_set in |
1873 | set,) | |
1874 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1875 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1876 | ac_cache_corrupted=: ;; | |
1877 | ,set) | |
1878 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1879 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1880 | ac_cache_corrupted=: ;; | |
1881 | ,);; | |
1882 | *) | |
1883 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1884 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1885 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1886 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1887 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1888 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1889 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1890 | ac_cache_corrupted=: |
ba479fd2 NN |
1891 | fi;; |
1892 | esac | |
1893 | # Pass precious variables to config.status. | |
1894 | if test "$ac_new_set" = set; then | |
1895 | case $ac_new_val in | |
ab22c1fa | 1896 | *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
ba479fd2 NN |
1897 | *) ac_arg=$ac_var=$ac_new_val ;; |
1898 | esac | |
1899 | case " $ac_configure_args " in | |
1900 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1901 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1902 | esac | |
1903 | fi | |
1904 | done | |
1905 | if $ac_cache_corrupted; then | |
1906 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1907 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1908 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1909 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1910 | { (exit 1); exit 1; }; } | |
1911 | fi | |
1912 | ||
ba479fd2 NN |
1913 | |
1914 | ||
1915 | ||
1916 | ||
1917 | ||
1918 | ||
1919 | ||
1920 | ||
1921 | ||
1922 | ||
1923 | ||
1924 | ||
1925 | ||
1926 | ||
1927 | ||
1928 | ||
ab22c1fa CF |
1929 | ac_ext=c |
1930 | ac_cpp='$CPP $CPPFLAGS' | |
1931 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1932 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1933 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
ba479fd2 NN |
1934 | |
1935 | ||
914c5af7 | 1936 | |
ab22c1fa | 1937 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
ba479fd2 NN |
1938 | |
1939 | ||
9f18db39 PB |
1940 | gcc_version=`cat $srcdir/BASE-VER` |
1941 | ||
ba479fd2 NN |
1942 | # Determine the host, build, and target systems |
1943 | ac_aux_dir= | |
ab22c1fa CF |
1944 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do |
1945 | if test -f "$ac_dir/install-sh"; then | |
ba479fd2 NN |
1946 | ac_aux_dir=$ac_dir |
1947 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1948 | break | |
ab22c1fa | 1949 | elif test -f "$ac_dir/install.sh"; then |
ba479fd2 NN |
1950 | ac_aux_dir=$ac_dir |
1951 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1952 | break | |
ab22c1fa | 1953 | elif test -f "$ac_dir/shtool"; then |
ba479fd2 NN |
1954 | ac_aux_dir=$ac_dir |
1955 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1956 | break | |
1957 | fi | |
1958 | done | |
1959 | if test -z "$ac_aux_dir"; then | |
ab22c1fa CF |
1960 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 |
1961 | echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} | |
ba479fd2 NN |
1962 | { (exit 1); exit 1; }; } |
1963 | fi | |
ab22c1fa CF |
1964 | |
1965 | # These three variables are undocumented and unsupported, | |
1966 | # and are intended to be withdrawn in a future Autoconf release. | |
1967 | # They can cause serious problems if a builder's source tree is in a directory | |
1968 | # whose full name contains unusual characters. | |
1969 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
1970 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
1971 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
1972 | ||
ba479fd2 NN |
1973 | |
1974 | # Make sure we can run config.sub. | |
ab22c1fa CF |
1975 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
1976 | { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 | |
1977 | echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} | |
ba479fd2 NN |
1978 | { (exit 1); exit 1; }; } |
1979 | ||
ab22c1fa CF |
1980 | { echo "$as_me:$LINENO: checking build system type" >&5 |
1981 | echo $ECHO_N "checking build system type... $ECHO_C" >&6; } | |
ba479fd2 NN |
1982 | if test "${ac_cv_build+set}" = set; then |
1983 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1984 | else | |
ab22c1fa CF |
1985 | ac_build_alias=$build_alias |
1986 | test "x$ac_build_alias" = x && | |
1987 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
1988 | test "x$ac_build_alias" = x && | |
ba479fd2 NN |
1989 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 |
1990 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1991 | { (exit 1); exit 1; }; } | |
ab22c1fa CF |
1992 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
1993 | { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 | |
1994 | echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} | |
ba479fd2 NN |
1995 | { (exit 1); exit 1; }; } |
1996 | ||
1997 | fi | |
ab22c1fa CF |
1998 | { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 |
1999 | echo "${ECHO_T}$ac_cv_build" >&6; } | |
2000 | case $ac_cv_build in | |
2001 | *-*-*) ;; | |
2002 | *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 | |
2003 | echo "$as_me: error: invalid value of canonical build" >&2;} | |
2004 | { (exit 1); exit 1; }; };; | |
2005 | esac | |
ba479fd2 | 2006 | build=$ac_cv_build |
ab22c1fa CF |
2007 | ac_save_IFS=$IFS; IFS='-' |
2008 | set x $ac_cv_build | |
2009 | shift | |
2010 | build_cpu=$1 | |
2011 | build_vendor=$2 | |
2012 | shift; shift | |
2013 | # Remember, the first character of IFS is used to create $*, | |
2014 | # except with old shells: | |
2015 | build_os=$* | |
2016 | IFS=$ac_save_IFS | |
2017 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
2018 | ||
2019 | ||
2020 | { echo "$as_me:$LINENO: checking host system type" >&5 | |
2021 | echo $ECHO_N "checking host system type... $ECHO_C" >&6; } | |
ba479fd2 NN |
2022 | if test "${ac_cv_host+set}" = set; then |
2023 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2024 | else | |
ab22c1fa CF |
2025 | if test "x$host_alias" = x; then |
2026 | ac_cv_host=$ac_cv_build | |
2027 | else | |
2028 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2029 | { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 | |
2030 | echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} | |
ba479fd2 | 2031 | { (exit 1); exit 1; }; } |
ab22c1fa | 2032 | fi |
ba479fd2 NN |
2033 | |
2034 | fi | |
ab22c1fa CF |
2035 | { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 |
2036 | echo "${ECHO_T}$ac_cv_host" >&6; } | |
2037 | case $ac_cv_host in | |
2038 | *-*-*) ;; | |
2039 | *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 | |
2040 | echo "$as_me: error: invalid value of canonical host" >&2;} | |
2041 | { (exit 1); exit 1; }; };; | |
2042 | esac | |
ba479fd2 | 2043 | host=$ac_cv_host |
ab22c1fa CF |
2044 | ac_save_IFS=$IFS; IFS='-' |
2045 | set x $ac_cv_host | |
2046 | shift | |
2047 | host_cpu=$1 | |
2048 | host_vendor=$2 | |
2049 | shift; shift | |
2050 | # Remember, the first character of IFS is used to create $*, | |
2051 | # except with old shells: | |
2052 | host_os=$* | |
2053 | IFS=$ac_save_IFS | |
2054 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
2055 | ||
2056 | ||
2057 | { echo "$as_me:$LINENO: checking target system type" >&5 | |
2058 | echo $ECHO_N "checking target system type... $ECHO_C" >&6; } | |
ba479fd2 NN |
2059 | if test "${ac_cv_target+set}" = set; then |
2060 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2061 | else | |
ab22c1fa CF |
2062 | if test "x$target_alias" = x; then |
2063 | ac_cv_target=$ac_cv_host | |
2064 | else | |
2065 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
2066 | { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 | |
2067 | echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} | |
ba479fd2 | 2068 | { (exit 1); exit 1; }; } |
ab22c1fa | 2069 | fi |
ba479fd2 NN |
2070 | |
2071 | fi | |
ab22c1fa CF |
2072 | { echo "$as_me:$LINENO: result: $ac_cv_target" >&5 |
2073 | echo "${ECHO_T}$ac_cv_target" >&6; } | |
2074 | case $ac_cv_target in | |
2075 | *-*-*) ;; | |
2076 | *) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 | |
2077 | echo "$as_me: error: invalid value of canonical target" >&2;} | |
2078 | { (exit 1); exit 1; }; };; | |
2079 | esac | |
ba479fd2 | 2080 | target=$ac_cv_target |
ab22c1fa CF |
2081 | ac_save_IFS=$IFS; IFS='-' |
2082 | set x $ac_cv_target | |
2083 | shift | |
2084 | target_cpu=$1 | |
2085 | target_vendor=$2 | |
2086 | shift; shift | |
2087 | # Remember, the first character of IFS is used to create $*, | |
2088 | # except with old shells: | |
2089 | target_os=$* | |
2090 | IFS=$ac_save_IFS | |
2091 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
ba479fd2 NN |
2092 | |
2093 | ||
2094 | # The aliases save the names the user supplied, while $host etc. | |
2095 | # will get canonicalized. | |
2096 | test -n "$target_alias" && | |
2097 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
2098 | NONENONEs,x,x, && | |
2099 | program_prefix=${target_alias}- | |
2100 | ||
2101 | # Determine the noncanonical target name, for directory use. | |
18fc9bd4 RG |
2102 | case ${build_alias} in |
2103 | "") build_noncanonical=${build} ;; | |
2104 | *) build_noncanonical=${build_alias} ;; | |
2105 | esac | |
2106 | ||
2107 | case ${host_alias} in | |
2108 | "") host_noncanonical=${build_noncanonical} ;; | |
2109 | *) host_noncanonical=${host_alias} ;; | |
2110 | esac | |
2111 | ||
2112 | case ${target_alias} in | |
2113 | "") target_noncanonical=${host_noncanonical} ;; | |
2114 | *) target_noncanonical=${target_alias} ;; | |
2115 | esac | |
2116 | ||
2117 | ||
2118 | ||
8f1529e6 L |
2119 | |
2120 | # Determine the target- and build-specific subdirectories | |
57255173 PB |
2121 | |
2122 | # post-stage1 host modules use a different CC_FOR_BUILD so, in order to | |
2123 | # have matching libraries, they should use host libraries: Makefile.tpl | |
2124 | # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). | |
2125 | # However, they still use the build modules, because the corresponding | |
2126 | # host modules (e.g. bison) are only built for the host when bootstrap | |
2127 | # finishes. So: | |
2128 | # - build_subdir is where we find build modules, and never changes. | |
2129 | # - build_libsubdir is where we find build libraries, and can be overridden. | |
2130 | ||
2131 | # Prefix 'build-' so this never conflicts with target_subdir. | |
18fc9bd4 | 2132 | build_subdir="build-${build_noncanonical}" |
1546bb64 | 2133 | |
ab22c1fa | 2134 | # Check whether --with-build-libsubdir was given. |
1546bb64 | 2135 | if test "${with_build_libsubdir+set}" = set; then |
ab22c1fa | 2136 | withval=$with_build_libsubdir; build_libsubdir="$withval" |
1546bb64 PB |
2137 | else |
2138 | build_libsubdir="$build_subdir" | |
ab22c1fa CF |
2139 | fi |
2140 | ||
18fc9bd4 RG |
2141 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
2142 | if ( test $srcdir = . && test -d gcc ) \ | |
2143 | || test -d $srcdir/../host-${host_noncanonical}; then | |
2144 | host_subdir="host-${host_noncanonical}" | |
2145 | else | |
2146 | host_subdir=. | |
2147 | fi | |
2148 | # No prefix. | |
2149 | target_subdir=${target_noncanonical} | |
2150 | ||
73458fb7 | 2151 | |
093e61a6 | 2152 | # Set program_transform_name |
13c22933 | 2153 | test "$program_prefix" != NONE && |
ab22c1fa | 2154 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
13c22933 JJ |
2155 | # Use a double $ so make ignores it. |
2156 | test "$program_suffix" != NONE && | |
ab22c1fa | 2157 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
ba479fd2 NN |
2158 | # Double any \ or $. echo might interpret backslashes. |
2159 | # By default was `s,x,x', remove it if useless. | |
2160 | cat <<\_ACEOF >conftest.sed | |
2161 | s/[\\$]/&&/g;s/;s,x,x,$// | |
2162 | _ACEOF | |
2163 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
ab22c1fa | 2164 | rm -f conftest.sed |
13c22933 JJ |
2165 | |
2166 | ||
34a86c2b NN |
2167 | # Check for bogus environment variables. |
2168 | # Test if LIBRARY_PATH contains the notation for the current directory | |
2169 | # since this would lead to problems installing/building glibc. | |
2170 | # LIBRARY_PATH contains the current directory if one of the following | |
2171 | # is true: | |
2172 | # - one of the terminals (":" and ";") is the first or last sign | |
2173 | # - two terminals occur directly after each other | |
2174 | # - the path contains an element with a dot in it | |
ab22c1fa CF |
2175 | { echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
2176 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6; } | |
34a86c2b NN |
2177 | case ${LIBRARY_PATH} in |
2178 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
2179 | library_path_setting="contains current directory" | |
2180 | ;; | |
2181 | *) | |
2182 | library_path_setting="ok" | |
2183 | ;; | |
2184 | esac | |
ab22c1fa CF |
2185 | { echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
2186 | echo "${ECHO_T}$library_path_setting" >&6; } | |
34a86c2b | 2187 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 2188 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
2189 | *** LIBRARY_PATH shouldn't contain the current directory when |
2190 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
2191 | *** and run configure again." >&5 |
2192 | echo "$as_me: error: | |
2193 | *** LIBRARY_PATH shouldn't contain the current directory when | |
2194 | *** building gcc. Please change the environment variable | |
2195 | *** and run configure again." >&2;} | |
2196 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
2197 | fi |
2198 | ||
34a86c2b NN |
2199 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
2200 | # since this would lead to problems installing/building glibc. | |
2201 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
2202 | # is true: | |
2203 | # - one of the terminals (":" and ";") is the first or last sign | |
2204 | # - two terminals occur directly after each other | |
2205 | # - the path contains an element with a dot in it | |
ab22c1fa CF |
2206 | { echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
2207 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6; } | |
34a86c2b NN |
2208 | case ${GCC_EXEC_PREFIX} in |
2209 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
2210 | gcc_exec_prefix_setting="contains current directory" | |
2211 | ;; | |
2212 | *) | |
2213 | gcc_exec_prefix_setting="ok" | |
2214 | ;; | |
2215 | esac | |
ab22c1fa CF |
2216 | { echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
2217 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6; } | |
34a86c2b | 2218 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
2219 | { { echo "$as_me:$LINENO: error: |
2220 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
2221 | *** building gcc. Please change the environment variable | |
2222 | *** and run configure again." >&5 | |
2223 | echo "$as_me: error: | |
cafe096b EC |
2224 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
2225 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
2226 | *** and run configure again." >&2;} |
2227 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2228 | fi |
2229 | ||
2230 | # ----------- | |
2231 | # Directories | |
2232 | # ----------- | |
2233 | ||
2234 | # Specify the local prefix | |
2235 | local_prefix= | |
ba479fd2 | 2236 | |
ab22c1fa | 2237 | # Check whether --with-local-prefix was given. |
34a86c2b | 2238 | if test "${with_local_prefix+set}" = set; then |
ab22c1fa | 2239 | withval=$with_local_prefix; case "${withval}" in |
ba479fd2 NN |
2240 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
2241 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
2242 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
2243 | no) ;; |
2244 | *) local_prefix=$with_local_prefix ;; | |
2245 | esac | |
ab22c1fa CF |
2246 | fi |
2247 | ||
34a86c2b NN |
2248 | |
2249 | # Default local prefix if it is empty | |
2250 | if test x$local_prefix = x; then | |
2251 | local_prefix=/usr/local | |
2252 | fi | |
2253 | ||
2254 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
2255 | # passed in by the toplevel make and thus we'd get different behavior | |
2256 | # depending on where we built the sources. | |
2257 | gcc_gxx_include_dir= | |
2258 | # Specify the g++ header file directory | |
ba479fd2 | 2259 | |
ab22c1fa | 2260 | # Check whether --with-gxx-include-dir was given. |
34a86c2b | 2261 | if test "${with_gxx_include_dir+set}" = set; then |
ab22c1fa | 2262 | withval=$with_gxx_include_dir; case "${withval}" in |
ba479fd2 NN |
2263 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
2264 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
2265 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
2266 | no) ;; |
2267 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
2268 | esac | |
ab22c1fa CF |
2269 | fi |
2270 | ||
34a86c2b | 2271 | |
0f57bf40 | 2272 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. |
34a86c2b NN |
2273 | if test x${gcc_gxx_include_dir} = x; then |
2274 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
2275 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
2276 | else | |
0f57bf40 MM |
2277 | libstdcxx_incdir='include/c++/$(version)' |
2278 | if test x$host != x$target; then | |
2279 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
2280 | fi | |
15c723f3 | 2281 | gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" |
34a86c2b NN |
2282 | fi |
2283 | fi | |
2284 | ||
ba479fd2 | 2285 | |
ab22c1fa | 2286 | # Check whether --with-cpp_install_dir was given. |
34a86c2b | 2287 | if test "${with_cpp_install_dir+set}" = set; then |
ab22c1fa | 2288 | withval=$with_cpp_install_dir; if test x$withval = xyes; then |
ba479fd2 NN |
2289 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
2290 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
2291 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2292 | elif test x$withval != xno; then |
2293 | cpp_install_dir=$withval | |
2294 | fi | |
ab22c1fa CF |
2295 | fi |
2296 | ||
34a86c2b | 2297 | |
51b9ff45 | 2298 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 2299 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 2300 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 2301 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
2302 | # just that. |
2303 | ||
ab22c1fa CF |
2304 | { echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
2305 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6; } | |
2306 | # Check whether --enable-generated-files-in-srcdir was given. | |
51b9ff45 | 2307 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
ab22c1fa | 2308 | enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval |
51b9ff45 | 2309 | else |
03787dfd | 2310 | generated_files_in_srcdir=no |
ab22c1fa | 2311 | fi |
703d89ab | 2312 | |
ab22c1fa CF |
2313 | |
2314 | { echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 | |
2315 | echo "${ECHO_T}$generated_files_in_srcdir" >&6; } | |
03787dfd KC |
2316 | |
2317 | if test "$generated_files_in_srcdir" = "yes"; then | |
2318 | GENINSRC='' | |
03787dfd KC |
2319 | else |
2320 | GENINSRC='#' | |
03787dfd KC |
2321 | fi |
2322 | ||
2323 | ||
34a86c2b NN |
2324 | # ------------------- |
2325 | # Find default linker | |
2326 | # ------------------- | |
2327 | ||
2328 | # With GNU ld | |
ba479fd2 | 2329 | |
ab22c1fa | 2330 | # Check whether --with-gnu-ld was given. |
34a86c2b | 2331 | if test "${with_gnu_ld+set}" = set; then |
ab22c1fa | 2332 | withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld" |
34a86c2b NN |
2333 | else |
2334 | gnu_ld_flag=no | |
ab22c1fa CF |
2335 | fi |
2336 | ||
6e3f3080 | 2337 | |
63cf211a | 2338 | # With pre-defined ld |
ba479fd2 | 2339 | |
ab22c1fa | 2340 | # Check whether --with-ld was given. |
34a86c2b | 2341 | if test "${with_ld+set}" = set; then |
ab22c1fa CF |
2342 | withval=$with_ld; DEFAULT_LINKER="$with_ld" |
2343 | fi | |
2344 | ||
34a86c2b NN |
2345 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
2346 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
2347 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
2348 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
2349 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2350 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
2351 | gnu_ld_flag=yes | |
2352 | fi | |
ba479fd2 NN |
2353 | |
2354 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 2355 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 2356 | _ACEOF |
34a86c2b NN |
2357 | |
2358 | fi | |
2359 | ||
2091ff66 NF |
2360 | gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi` |
2361 | ||
2362 | cat >>confdefs.h <<_ACEOF | |
2363 | #define HAVE_GNU_LD $gnu_ld | |
2364 | _ACEOF | |
2365 | ||
2366 | ||
ab22c1fa CF |
2367 | { echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
2368 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6; } | |
34a86c2b NN |
2369 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
2370 | if test x"$gnu_ld_flag" = x"no"; then | |
ab22c1fa CF |
2371 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
2372 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6; } | |
34a86c2b | 2373 | else |
ab22c1fa CF |
2374 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
2375 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6; } | |
34a86c2b NN |
2376 | fi |
2377 | else | |
ab22c1fa CF |
2378 | { echo "$as_me:$LINENO: result: no" >&5 |
2379 | echo "${ECHO_T}no" >&6; } | |
34a86c2b NN |
2380 | fi |
2381 | ||
d594623a L |
2382 | # With demangler in GNU ld |
2383 | ||
ab22c1fa | 2384 | # Check whether --with-demangler-in-ld was given. |
d594623a | 2385 | if test "${with_demangler_in_ld+set}" = set; then |
ab22c1fa | 2386 | withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld" |
d594623a L |
2387 | else |
2388 | demangler_in_ld=no | |
ab22c1fa CF |
2389 | fi |
2390 | ||
d594623a | 2391 | |
34a86c2b NN |
2392 | # ---------------------- |
2393 | # Find default assembler | |
2394 | # ---------------------- | |
2395 | ||
2396 | # With GNU as | |
ba479fd2 | 2397 | |
ab22c1fa | 2398 | # Check whether --with-gnu-as was given. |
34a86c2b | 2399 | if test "${with_gnu_as+set}" = set; then |
ab22c1fa | 2400 | withval=$with_gnu_as; gas_flag="$with_gnu_as" |
34a86c2b NN |
2401 | else |
2402 | gas_flag=no | |
ab22c1fa | 2403 | fi |
a6ccdbab | 2404 | |
703d89ab | 2405 | |
ab22c1fa CF |
2406 | |
2407 | # Check whether --with-as was given. | |
34a86c2b | 2408 | if test "${with_as+set}" = set; then |
ab22c1fa CF |
2409 | withval=$with_as; DEFAULT_ASSEMBLER="$with_as" |
2410 | fi | |
2411 | ||
34a86c2b NN |
2412 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
2413 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
2414 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
2415 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
2416 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
2417 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
2418 | gas_flag=yes | |
2419 | fi | |
ba479fd2 NN |
2420 | |
2421 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 2422 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 2423 | _ACEOF |
34a86c2b NN |
2424 | |
2425 | fi | |
2426 | ||
dc60b775 CD |
2427 | gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi` |
2428 | ||
2429 | cat >>confdefs.h <<_ACEOF | |
2430 | #define HAVE_GNU_AS $gnu_as | |
2431 | _ACEOF | |
2432 | ||
2433 | ||
ab22c1fa CF |
2434 | { echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
2435 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6; } | |
34a86c2b NN |
2436 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
2437 | if test x"$gas_flag" = x"no"; then | |
ab22c1fa CF |
2438 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
2439 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6; } | |
34a86c2b | 2440 | else |
ab22c1fa CF |
2441 | { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
2442 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; } | |
34a86c2b NN |
2443 | fi |
2444 | else | |
ab22c1fa CF |
2445 | { echo "$as_me:$LINENO: result: no" >&5 |
2446 | echo "${ECHO_T}no" >&6; } | |
34a86c2b NN |
2447 | fi |
2448 | ||
2449 | # --------------- | |
2450 | # Find C compiler | |
2451 | # --------------- | |
2452 | ||
426ca3ca RO |
2453 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
2454 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
2455 | # file, even when creating an executable, so an execution test fails. | |
2456 | # Remove possible default executable files to avoid this. | |
2457 | # | |
2458 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
2459 | # Autoconf includes it. | |
2460 | rm -f a.out a.exe b.out | |
2461 | ||
34a86c2b | 2462 | # Find the native compiler |
ba479fd2 NN |
2463 | ac_ext=c |
2464 | ac_cpp='$CPP $CPPFLAGS' | |
2465 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2466 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2467 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2468 | if test -n "$ac_tool_prefix"; then | |
2469 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2470 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
ab22c1fa CF |
2471 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2472 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2473 | if test "${ac_cv_prog_CC+set}" = set; then |
2474 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2475 | else | |
2476 | if test -n "$CC"; then | |
2477 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2478 | else | |
2479 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2480 | for as_dir in $PATH | |
2481 | do | |
2482 | IFS=$as_save_IFS | |
2483 | test -z "$as_dir" && as_dir=. | |
2484 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 2485 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2486 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
2487 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2488 | break 2 | |
2489 | fi | |
2490 | done | |
2491 | done | |
ab22c1fa | 2492 | IFS=$as_save_IFS |
ba479fd2 NN |
2493 | |
2494 | fi | |
2495 | fi | |
2496 | CC=$ac_cv_prog_CC | |
2497 | if test -n "$CC"; then | |
ab22c1fa CF |
2498 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2499 | echo "${ECHO_T}$CC" >&6; } | |
ba479fd2 | 2500 | else |
ab22c1fa CF |
2501 | { echo "$as_me:$LINENO: result: no" >&5 |
2502 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
2503 | fi |
2504 | ||
ab22c1fa | 2505 | |
ba479fd2 NN |
2506 | fi |
2507 | if test -z "$ac_cv_prog_CC"; then | |
2508 | ac_ct_CC=$CC | |
2509 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 2510 | set dummy gcc; ac_word=$2 |
ab22c1fa CF |
2511 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2512 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2513 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
2514 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2515 | else | |
2516 | if test -n "$ac_ct_CC"; then | |
2517 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2518 | else | |
2519 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2520 | for as_dir in $PATH | |
2521 | do | |
2522 | IFS=$as_save_IFS | |
2523 | test -z "$as_dir" && as_dir=. | |
2524 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 2525 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2526 | ac_cv_prog_ac_ct_CC="gcc" |
2527 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2528 | break 2 | |
2529 | fi | |
2530 | done | |
2531 | done | |
ab22c1fa | 2532 | IFS=$as_save_IFS |
ba479fd2 NN |
2533 | |
2534 | fi | |
2535 | fi | |
2536 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2537 | if test -n "$ac_ct_CC"; then | |
ab22c1fa CF |
2538 | { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
2539 | echo "${ECHO_T}$ac_ct_CC" >&6; } | |
ba479fd2 | 2540 | else |
ab22c1fa CF |
2541 | { echo "$as_me:$LINENO: result: no" >&5 |
2542 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
2543 | fi |
2544 | ||
ab22c1fa CF |
2545 | if test "x$ac_ct_CC" = x; then |
2546 | CC="" | |
2547 | else | |
2548 | case $cross_compiling:$ac_tool_warned in | |
2549 | yes:) | |
2550 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools | |
2551 | whose name does not start with the host triplet. If you think this | |
2552 | configuration is useful to you, please write to autoconf@gnu.org." >&5 | |
2553 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools | |
2554 | whose name does not start with the host triplet. If you think this | |
2555 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} | |
2556 | ac_tool_warned=yes ;; | |
2557 | esac | |
2558 | CC=$ac_ct_CC | |
2559 | fi | |
ba479fd2 NN |
2560 | else |
2561 | CC="$ac_cv_prog_CC" | |
2562 | fi | |
2563 | ||
2564 | if test -z "$CC"; then | |
ab22c1fa CF |
2565 | if test -n "$ac_tool_prefix"; then |
2566 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
ba479fd2 | 2567 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
ab22c1fa CF |
2568 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2569 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2570 | if test "${ac_cv_prog_CC+set}" = set; then |
2571 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
2572 | else |
2573 | if test -n "$CC"; then | |
2574 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2575 | else | |
ba479fd2 NN |
2576 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2577 | for as_dir in $PATH | |
2578 | do | |
2579 | IFS=$as_save_IFS | |
2580 | test -z "$as_dir" && as_dir=. | |
2581 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 2582 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2583 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
2584 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2585 | break 2 | |
2586 | fi | |
2587 | done | |
2588 | done | |
ab22c1fa | 2589 | IFS=$as_save_IFS |
ba479fd2 | 2590 | |
cd9e5e7c MK |
2591 | fi |
2592 | fi | |
ba479fd2 | 2593 | CC=$ac_cv_prog_CC |
cd9e5e7c | 2594 | if test -n "$CC"; then |
ab22c1fa CF |
2595 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2596 | echo "${ECHO_T}$CC" >&6; } | |
a3bba767 | 2597 | else |
ab22c1fa CF |
2598 | { echo "$as_me:$LINENO: result: no" >&5 |
2599 | echo "${ECHO_T}no" >&6; } | |
a3bba767 JJ |
2600 | fi |
2601 | ||
a3bba767 | 2602 | |
ab22c1fa | 2603 | fi |
ba479fd2 | 2604 | fi |
6e3f3080 NN |
2605 | if test -z "$CC"; then |
2606 | # Extract the first word of "cc", so it can be a program name with args. | |
2607 | set dummy cc; ac_word=$2 | |
ab22c1fa CF |
2608 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2609 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2610 | if test "${ac_cv_prog_CC+set}" = set; then |
2611 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2612 | else |
2613 | if test -n "$CC"; then | |
2614 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2615 | else | |
2616 | ac_prog_rejected=no | |
ba479fd2 NN |
2617 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2618 | for as_dir in $PATH | |
2619 | do | |
2620 | IFS=$as_save_IFS | |
2621 | test -z "$as_dir" && as_dir=. | |
2622 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 2623 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2624 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
2625 | ac_prog_rejected=yes | |
2626 | continue | |
2627 | fi | |
2628 | ac_cv_prog_CC="cc" | |
2629 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2630 | break 2 | |
2631 | fi | |
2632 | done | |
2633 | done | |
ab22c1fa | 2634 | IFS=$as_save_IFS |
ba479fd2 | 2635 | |
6e3f3080 NN |
2636 | if test $ac_prog_rejected = yes; then |
2637 | # We found a bogon in the path, so make sure we never use it. | |
2638 | set dummy $ac_cv_prog_CC | |
2639 | shift | |
ba479fd2 | 2640 | if test $# != 0; then |
6e3f3080 NN |
2641 | # We chose a different compiler from the bogus one. |
2642 | # However, it has the same basename, so the bogon will be chosen | |
2643 | # first if we set CC to just the basename; use the full file name. | |
2644 | shift | |
ba479fd2 | 2645 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2646 | fi |
6e3f3080 NN |
2647 | fi |
2648 | fi | |
2649 | fi | |
ba479fd2 | 2650 | CC=$ac_cv_prog_CC |
6e3f3080 | 2651 | if test -n "$CC"; then |
ab22c1fa CF |
2652 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2653 | echo "${ECHO_T}$CC" >&6; } | |
e9a25f70 | 2654 | else |
ab22c1fa CF |
2655 | { echo "$as_me:$LINENO: result: no" >&5 |
2656 | echo "${ECHO_T}no" >&6; } | |
e9a25f70 | 2657 | fi |
6e3f3080 | 2658 | |
ab22c1fa | 2659 | |
ba479fd2 NN |
2660 | fi |
2661 | if test -z "$CC"; then | |
2662 | if test -n "$ac_tool_prefix"; then | |
ab22c1fa | 2663 | for ac_prog in cl.exe |
ba479fd2 NN |
2664 | do |
2665 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2666 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
ab22c1fa CF |
2667 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2668 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2669 | if test "${ac_cv_prog_CC+set}" = set; then |
2670 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2671 | else |
6e3f3080 NN |
2672 | if test -n "$CC"; then |
2673 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2674 | else | |
ba479fd2 NN |
2675 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2676 | for as_dir in $PATH | |
2677 | do | |
2678 | IFS=$as_save_IFS | |
2679 | test -z "$as_dir" && as_dir=. | |
2680 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 2681 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2682 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
2683 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2684 | break 2 | |
2685 | fi | |
2686 | done | |
2687 | done | |
ab22c1fa | 2688 | IFS=$as_save_IFS |
ba479fd2 | 2689 | |
093e61a6 | 2690 | fi |
6e3f3080 | 2691 | fi |
ba479fd2 | 2692 | CC=$ac_cv_prog_CC |
6e3f3080 | 2693 | if test -n "$CC"; then |
ab22c1fa CF |
2694 | { echo "$as_me:$LINENO: result: $CC" >&5 |
2695 | echo "${ECHO_T}$CC" >&6; } | |
6e3f3080 | 2696 | else |
ab22c1fa CF |
2697 | { echo "$as_me:$LINENO: result: no" >&5 |
2698 | echo "${ECHO_T}no" >&6; } | |
093e61a6 | 2699 | fi |
cafe096b | 2700 | |
ab22c1fa | 2701 | |
ba479fd2 NN |
2702 | test -n "$CC" && break |
2703 | done | |
2704 | fi | |
2705 | if test -z "$CC"; then | |
2706 | ac_ct_CC=$CC | |
ab22c1fa | 2707 | for ac_prog in cl.exe |
ba479fd2 NN |
2708 | do |
2709 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2710 | set dummy $ac_prog; ac_word=$2 | |
ab22c1fa CF |
2711 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2712 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
2713 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
2714 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2715 | else | |
2716 | if test -n "$ac_ct_CC"; then | |
2717 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2718 | else | |
2719 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2720 | for as_dir in $PATH | |
2721 | do | |
2722 | IFS=$as_save_IFS | |
2723 | test -z "$as_dir" && as_dir=. | |
2724 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 2725 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
2726 | ac_cv_prog_ac_ct_CC="$ac_prog" |
2727 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2728 | break 2 | |
2729 | fi | |
2730 | done | |
2731 | done | |
ab22c1fa | 2732 | IFS=$as_save_IFS |
6e3f3080 | 2733 | |
ba479fd2 NN |
2734 | fi |
2735 | fi | |
2736 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2737 | if test -n "$ac_ct_CC"; then | |
ab22c1fa CF |
2738 | { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
2739 | echo "${ECHO_T}$ac_ct_CC" >&6; } | |
ba479fd2 | 2740 | else |
ab22c1fa CF |
2741 | { echo "$as_me:$LINENO: result: no" >&5 |
2742 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 | 2743 | fi |
6e3f3080 | 2744 | |
ab22c1fa | 2745 | |
ba479fd2 NN |
2746 | test -n "$ac_ct_CC" && break |
2747 | done | |
63cf211a | 2748 | |
ab22c1fa CF |
2749 | if test "x$ac_ct_CC" = x; then |
2750 | CC="" | |
2751 | else | |
2752 | case $cross_compiling:$ac_tool_warned in | |
2753 | yes:) | |
2754 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools | |
2755 | whose name does not start with the host triplet. If you think this | |
2756 | configuration is useful to you, please write to autoconf@gnu.org." >&5 | |
2757 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools | |
2758 | whose name does not start with the host triplet. If you think this | |
2759 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} | |
2760 | ac_tool_warned=yes ;; | |
2761 | esac | |
2762 | CC=$ac_ct_CC | |
2763 | fi | |
ba479fd2 NN |
2764 | fi |
2765 | ||
2766 | fi | |
2767 | ||
2768 | ||
2769 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2770 | See \`config.log' for more details." >&5 | |
2771 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2772 | See \`config.log' for more details." >&2;} | |
2773 | { (exit 1); exit 1; }; } | |
2774 | ||
2775 | # Provide some information about the compiler. | |
ab22c1fa | 2776 | echo "$as_me:$LINENO: checking for C compiler version" >&5 |
ba479fd2 | 2777 | ac_compiler=`set X $ac_compile; echo $2` |
ab22c1fa CF |
2778 | { (ac_try="$ac_compiler --version >&5" |
2779 | case "(($ac_try" in | |
2780 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2781 | *) ac_try_echo=$ac_try;; | |
2782 | esac | |
2783 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2784 | (eval "$ac_compiler --version >&5") 2>&5 | |
ba479fd2 NN |
2785 | ac_status=$? |
2786 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2787 | (exit $ac_status); } | |
ab22c1fa CF |
2788 | { (ac_try="$ac_compiler -v >&5" |
2789 | case "(($ac_try" in | |
2790 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2791 | *) ac_try_echo=$ac_try;; | |
2792 | esac | |
2793 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2794 | (eval "$ac_compiler -v >&5") 2>&5 | |
ba479fd2 NN |
2795 | ac_status=$? |
2796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2797 | (exit $ac_status); } | |
ab22c1fa CF |
2798 | { (ac_try="$ac_compiler -V >&5" |
2799 | case "(($ac_try" in | |
2800 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2801 | *) ac_try_echo=$ac_try;; | |
2802 | esac | |
2803 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2804 | (eval "$ac_compiler -V >&5") 2>&5 | |
ba479fd2 NN |
2805 | ac_status=$? |
2806 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2807 | (exit $ac_status); } | |
2808 | ||
2809 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2810 | /* confdefs.h. */ |
2811 | _ACEOF | |
2812 | cat confdefs.h >>conftest.$ac_ext | |
2813 | cat >>conftest.$ac_ext <<_ACEOF | |
2814 | /* end confdefs.h. */ | |
2815 | ||
2816 | int | |
2817 | main () | |
2818 | { | |
63cf211a | 2819 | |
ba479fd2 NN |
2820 | ; |
2821 | return 0; | |
2822 | } | |
2823 | _ACEOF | |
2824 | ac_clean_files_save=$ac_clean_files | |
2825 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2826 | # Try to create an executable without -o first, disregard a.out. | |
2827 | # It will help us diagnose broken compilers, and finding out an intuition | |
2828 | # of exeext. | |
ab22c1fa CF |
2829 | { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2830 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } | |
ba479fd2 | 2831 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
ab22c1fa CF |
2832 | # |
2833 | # List of possible output files, starting from the most likely. | |
2834 | # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) | |
2835 | # only as a last resort. b.out is created by i960 compilers. | |
2836 | ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' | |
2837 | # | |
2838 | # The IRIX 6 linker writes into existing files which may not be | |
2839 | # executable, retaining their permissions. Remove them first so a | |
2840 | # subsequent execution test works. | |
2841 | ac_rmfiles= | |
2842 | for ac_file in $ac_files | |
2843 | do | |
2844 | case $ac_file in | |
2845 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; | |
2846 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
2847 | esac | |
2848 | done | |
2849 | rm -f $ac_rmfiles | |
2850 | ||
2851 | if { (ac_try="$ac_link_default" | |
2852 | case "(($ac_try" in | |
2853 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2854 | *) ac_try_echo=$ac_try;; | |
2855 | esac | |
2856 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2857 | (eval "$ac_link_default") 2>&5 | |
ba479fd2 NN |
2858 | ac_status=$? |
2859 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2860 | (exit $ac_status); }; then | |
ab22c1fa CF |
2861 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. |
2862 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
2863 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
2864 | # so that the user can short-circuit this test for compilers unknown to | |
2865 | # Autoconf. | |
2866 | for ac_file in $ac_files '' | |
ba479fd2 NN |
2867 | do |
2868 | test -f "$ac_file" || continue | |
2869 | case $ac_file in | |
ab22c1fa | 2870 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) |
86da66b5 | 2871 | ;; |
ba479fd2 | 2872 | [ab].out ) |
86da66b5 HPN |
2873 | # We found the default executable, but exeext='' is most |
2874 | # certainly right. | |
2875 | break;; | |
ba479fd2 | 2876 | *.* ) |
ab22c1fa CF |
2877 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
2878 | then :; else | |
2879 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
2880 | fi | |
2881 | # We set ac_cv_exeext here because the later test for it is not | |
2882 | # safe: cross compilers may not add the suffix if given an `-o' | |
2883 | # argument, so we may need to know it at that point already. | |
2884 | # Even if this section looks crufty: it has the advantage of | |
2885 | # actually working. | |
86da66b5 | 2886 | break;; |
ba479fd2 | 2887 | * ) |
86da66b5 | 2888 | break;; |
ba479fd2 NN |
2889 | esac |
2890 | done | |
ab22c1fa CF |
2891 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
2892 | ||
ba479fd2 | 2893 | else |
ab22c1fa CF |
2894 | ac_file='' |
2895 | fi | |
2896 | ||
2897 | { echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2898 | echo "${ECHO_T}$ac_file" >&6; } | |
2899 | if test -z "$ac_file"; then | |
ba479fd2 NN |
2900 | echo "$as_me: failed program was:" >&5 |
2901 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2902 | ||
2903 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2904 | See \`config.log' for more details." >&5 | |
2905 | echo "$as_me: error: C compiler cannot create executables | |
2906 | See \`config.log' for more details." >&2;} | |
2907 | { (exit 77); exit 77; }; } | |
2908 | fi | |
2909 | ||
2910 | ac_exeext=$ac_cv_exeext | |
ba479fd2 | 2911 | |
ab22c1fa | 2912 | # Check that the compiler produces executables we can run. If not, either |
ba479fd2 | 2913 | # the compiler is broken, or we cross compile. |
ab22c1fa CF |
2914 | { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 |
2915 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } | |
ba479fd2 NN |
2916 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 |
2917 | # If not cross compiling, check that we can run a simple program. | |
2918 | if test "$cross_compiling" != yes; then | |
2919 | if { ac_try='./$ac_file' | |
ab22c1fa CF |
2920 | { (case "(($ac_try" in |
2921 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2922 | *) ac_try_echo=$ac_try;; | |
2923 | esac | |
2924 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2925 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
2926 | ac_status=$? |
2927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2928 | (exit $ac_status); }; }; then | |
2929 | cross_compiling=no | |
6e3f3080 | 2930 | else |
ba479fd2 NN |
2931 | if test "$cross_compiling" = maybe; then |
2932 | cross_compiling=yes | |
2933 | else | |
2934 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2935 | If you meant to cross compile, use \`--host'. | |
2936 | See \`config.log' for more details." >&5 | |
2937 | echo "$as_me: error: cannot run C compiled programs. | |
2938 | If you meant to cross compile, use \`--host'. | |
2939 | See \`config.log' for more details." >&2;} | |
2940 | { (exit 1); exit 1; }; } | |
2941 | fi | |
6e3f3080 NN |
2942 | fi |
2943 | fi | |
ab22c1fa CF |
2944 | { echo "$as_me:$LINENO: result: yes" >&5 |
2945 | echo "${ECHO_T}yes" >&6; } | |
ba479fd2 NN |
2946 | |
2947 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2948 | ac_clean_files=$ac_clean_files_save | |
ab22c1fa | 2949 | # Check that the compiler produces executables we can run. If not, either |
ba479fd2 | 2950 | # the compiler is broken, or we cross compile. |
ab22c1fa CF |
2951 | { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 |
2952 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } | |
2953 | { echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2954 | echo "${ECHO_T}$cross_compiling" >&6; } | |
2955 | ||
2956 | { echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2957 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } | |
2958 | if { (ac_try="$ac_link" | |
2959 | case "(($ac_try" in | |
2960 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2961 | *) ac_try_echo=$ac_try;; | |
2962 | esac | |
2963 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
2964 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
2965 | ac_status=$? |
2966 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2967 | (exit $ac_status); }; then | |
2968 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2969 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2970 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2971 | # `rm'. | |
2972 | for ac_file in conftest.exe conftest conftest.*; do | |
2973 | test -f "$ac_file" || continue | |
2974 | case $ac_file in | |
ab22c1fa | 2975 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; |
ba479fd2 | 2976 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
86da66b5 | 2977 | break;; |
ba479fd2 NN |
2978 | * ) break;; |
2979 | esac | |
2980 | done | |
e9a25f70 | 2981 | else |
ba479fd2 NN |
2982 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2983 | See \`config.log' for more details." >&5 | |
2984 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2985 | See \`config.log' for more details." >&2;} | |
2986 | { (exit 1); exit 1; }; } | |
2987 | fi | |
2988 | ||
2989 | rm -f conftest$ac_cv_exeext | |
ab22c1fa CF |
2990 | { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 |
2991 | echo "${ECHO_T}$ac_cv_exeext" >&6; } | |
ba479fd2 NN |
2992 | |
2993 | rm -f conftest.$ac_ext | |
2994 | EXEEXT=$ac_cv_exeext | |
2995 | ac_exeext=$EXEEXT | |
ab22c1fa CF |
2996 | { echo "$as_me:$LINENO: checking for suffix of object files" >&5 |
2997 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } | |
ba479fd2 NN |
2998 | if test "${ac_cv_objext+set}" = set; then |
2999 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3000 | else | |
3001 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3002 | /* confdefs.h. */ |
3003 | _ACEOF | |
3004 | cat confdefs.h >>conftest.$ac_ext | |
3005 | cat >>conftest.$ac_ext <<_ACEOF | |
3006 | /* end confdefs.h. */ | |
3007 | ||
3008 | int | |
3009 | main () | |
3010 | { | |
6e3f3080 | 3011 | |
ba479fd2 NN |
3012 | ; |
3013 | return 0; | |
3014 | } | |
3015 | _ACEOF | |
3016 | rm -f conftest.o conftest.obj | |
ab22c1fa CF |
3017 | if { (ac_try="$ac_compile" |
3018 | case "(($ac_try" in | |
3019 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3020 | *) ac_try_echo=$ac_try;; | |
3021 | esac | |
3022 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3023 | (eval "$ac_compile") 2>&5 | |
ba479fd2 NN |
3024 | ac_status=$? |
3025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3026 | (exit $ac_status); }; then | |
ab22c1fa CF |
3027 | for ac_file in conftest.o conftest.obj conftest.*; do |
3028 | test -f "$ac_file" || continue; | |
ba479fd2 | 3029 | case $ac_file in |
ab22c1fa | 3030 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; |
ba479fd2 NN |
3031 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3032 | break;; | |
3033 | esac | |
3034 | done | |
63cf211a | 3035 | else |
ba479fd2 NN |
3036 | echo "$as_me: failed program was:" >&5 |
3037 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3038 | ||
3039 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
3040 | See \`config.log' for more details." >&5 | |
3041 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
3042 | See \`config.log' for more details." >&2;} | |
3043 | { (exit 1); exit 1; }; } | |
3044 | fi | |
3045 | ||
3046 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
3047 | fi | |
ab22c1fa CF |
3048 | { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 |
3049 | echo "${ECHO_T}$ac_cv_objext" >&6; } | |
ba479fd2 NN |
3050 | OBJEXT=$ac_cv_objext |
3051 | ac_objext=$OBJEXT | |
ab22c1fa CF |
3052 | { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 |
3053 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } | |
ba479fd2 NN |
3054 | if test "${ac_cv_c_compiler_gnu+set}" = set; then |
3055 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3056 | else | |
3057 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3058 | /* confdefs.h. */ |
3059 | _ACEOF | |
3060 | cat confdefs.h >>conftest.$ac_ext | |
3061 | cat >>conftest.$ac_ext <<_ACEOF | |
3062 | /* end confdefs.h. */ | |
3063 | ||
3064 | int | |
3065 | main () | |
3066 | { | |
3067 | #ifndef __GNUC__ | |
3068 | choke me | |
3069 | #endif | |
6e3f3080 | 3070 | |
ba479fd2 NN |
3071 | ; |
3072 | return 0; | |
3073 | } | |
3074 | _ACEOF | |
3075 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
3076 | if { (ac_try="$ac_compile" |
3077 | case "(($ac_try" in | |
3078 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3079 | *) ac_try_echo=$ac_try;; | |
3080 | esac | |
3081 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3082 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3083 | ac_status=$? |
86da66b5 HPN |
3084 | grep -v '^ *+' conftest.er1 >conftest.err |
3085 | rm -f conftest.er1 | |
3086 | cat conftest.err >&5 | |
ba479fd2 | 3087 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
3088 | (exit $ac_status); } && { |
3089 | test -z "$ac_c_werror_flag" || | |
3090 | test ! -s conftest.err | |
3091 | } && test -s conftest.$ac_objext; then | |
ba479fd2 NN |
3092 | ac_compiler_gnu=yes |
3093 | else | |
3094 | echo "$as_me: failed program was:" >&5 | |
3095 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3096 | ||
ab22c1fa | 3097 | ac_compiler_gnu=no |
ba479fd2 | 3098 | fi |
ab22c1fa CF |
3099 | |
3100 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
ba479fd2 NN |
3101 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3102 | ||
3103 | fi | |
ab22c1fa CF |
3104 | { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 |
3105 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } | |
ba479fd2 NN |
3106 | GCC=`test $ac_compiler_gnu = yes && echo yes` |
3107 | ac_test_CFLAGS=${CFLAGS+set} | |
3108 | ac_save_CFLAGS=$CFLAGS | |
ab22c1fa CF |
3109 | { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 |
3110 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } | |
ba479fd2 NN |
3111 | if test "${ac_cv_prog_cc_g+set}" = set; then |
3112 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3113 | else | |
ab22c1fa CF |
3114 | ac_save_c_werror_flag=$ac_c_werror_flag |
3115 | ac_c_werror_flag=yes | |
3116 | ac_cv_prog_cc_g=no | |
3117 | CFLAGS="-g" | |
3118 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3119 | /* confdefs.h. */ |
3120 | _ACEOF | |
3121 | cat confdefs.h >>conftest.$ac_ext | |
3122 | cat >>conftest.$ac_ext <<_ACEOF | |
3123 | /* end confdefs.h. */ | |
3124 | ||
3125 | int | |
3126 | main () | |
3127 | { | |
3128 | ||
3129 | ; | |
3130 | return 0; | |
3131 | } | |
3132 | _ACEOF | |
3133 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
3134 | if { (ac_try="$ac_compile" |
3135 | case "(($ac_try" in | |
3136 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3137 | *) ac_try_echo=$ac_try;; | |
3138 | esac | |
3139 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3140 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3141 | ac_status=$? |
86da66b5 HPN |
3142 | grep -v '^ *+' conftest.er1 >conftest.err |
3143 | rm -f conftest.er1 | |
3144 | cat conftest.err >&5 | |
ba479fd2 | 3145 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
3146 | (exit $ac_status); } && { |
3147 | test -z "$ac_c_werror_flag" || | |
3148 | test ! -s conftest.err | |
3149 | } && test -s conftest.$ac_objext; then | |
3150 | ac_cv_prog_cc_g=yes | |
3151 | else | |
3152 | echo "$as_me: failed program was:" >&5 | |
3153 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3154 | ||
3155 | CFLAGS="" | |
3156 | cat >conftest.$ac_ext <<_ACEOF | |
3157 | /* confdefs.h. */ | |
3158 | _ACEOF | |
3159 | cat confdefs.h >>conftest.$ac_ext | |
3160 | cat >>conftest.$ac_ext <<_ACEOF | |
3161 | /* end confdefs.h. */ | |
3162 | ||
3163 | int | |
3164 | main () | |
3165 | { | |
3166 | ||
3167 | ; | |
3168 | return 0; | |
3169 | } | |
3170 | _ACEOF | |
3171 | rm -f conftest.$ac_objext | |
3172 | if { (ac_try="$ac_compile" | |
3173 | case "(($ac_try" in | |
3174 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3175 | *) ac_try_echo=$ac_try;; | |
3176 | esac | |
3177 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3178 | (eval "$ac_compile") 2>conftest.er1 | |
a3bba767 | 3179 | ac_status=$? |
ab22c1fa CF |
3180 | grep -v '^ *+' conftest.er1 >conftest.err |
3181 | rm -f conftest.er1 | |
3182 | cat conftest.err >&5 | |
a3bba767 | 3183 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
3184 | (exit $ac_status); } && { |
3185 | test -z "$ac_c_werror_flag" || | |
3186 | test ! -s conftest.err | |
3187 | } && test -s conftest.$ac_objext; then | |
3188 | : | |
3189 | else | |
3190 | echo "$as_me: failed program was:" >&5 | |
3191 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3192 | ||
3193 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3194 | CFLAGS="-g" | |
3195 | cat >conftest.$ac_ext <<_ACEOF | |
3196 | /* confdefs.h. */ | |
3197 | _ACEOF | |
3198 | cat confdefs.h >>conftest.$ac_ext | |
3199 | cat >>conftest.$ac_ext <<_ACEOF | |
3200 | /* end confdefs.h. */ | |
3201 | ||
3202 | int | |
3203 | main () | |
3204 | { | |
3205 | ||
3206 | ; | |
3207 | return 0; | |
3208 | } | |
3209 | _ACEOF | |
3210 | rm -f conftest.$ac_objext | |
3211 | if { (ac_try="$ac_compile" | |
3212 | case "(($ac_try" in | |
3213 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3214 | *) ac_try_echo=$ac_try;; | |
3215 | esac | |
3216 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3217 | (eval "$ac_compile") 2>conftest.er1 | |
a3bba767 | 3218 | ac_status=$? |
ab22c1fa CF |
3219 | grep -v '^ *+' conftest.er1 >conftest.err |
3220 | rm -f conftest.er1 | |
3221 | cat conftest.err >&5 | |
a3bba767 | 3222 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
3223 | (exit $ac_status); } && { |
3224 | test -z "$ac_c_werror_flag" || | |
3225 | test ! -s conftest.err | |
3226 | } && test -s conftest.$ac_objext; then | |
703d89ab ZW |
3227 | ac_cv_prog_cc_g=yes |
3228 | else | |
3229 | echo "$as_me: failed program was:" >&5 | |
3230 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3231 | ||
ab22c1fa CF |
3232 | |
3233 | fi | |
3234 | ||
3235 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3236 | fi | |
3237 | ||
3238 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a3bba767 | 3239 | fi |
ab22c1fa CF |
3240 | |
3241 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3242 | ac_c_werror_flag=$ac_save_c_werror_flag | |
a3bba767 | 3243 | fi |
ab22c1fa CF |
3244 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 |
3245 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } | |
a3bba767 JJ |
3246 | if test "$ac_test_CFLAGS" = set; then |
3247 | CFLAGS=$ac_save_CFLAGS | |
3248 | elif test $ac_cv_prog_cc_g = yes; then | |
3249 | if test "$GCC" = yes; then | |
3250 | CFLAGS="-g -O2" | |
3251 | else | |
3252 | CFLAGS="-g" | |
3253 | fi | |
3254 | else | |
3255 | if test "$GCC" = yes; then | |
3256 | CFLAGS="-O2" | |
3257 | else | |
3258 | CFLAGS= | |
3259 | fi | |
3260 | fi | |
ab22c1fa CF |
3261 | { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 |
3262 | echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } | |
3263 | if test "${ac_cv_prog_cc_c89+set}" = set; then | |
a3bba767 JJ |
3264 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3265 | else | |
ab22c1fa | 3266 | ac_cv_prog_cc_c89=no |
a3bba767 JJ |
3267 | ac_save_CC=$CC |
3268 | cat >conftest.$ac_ext <<_ACEOF | |
703d89ab ZW |
3269 | /* confdefs.h. */ |
3270 | _ACEOF | |
3271 | cat confdefs.h >>conftest.$ac_ext | |
3272 | cat >>conftest.$ac_ext <<_ACEOF | |
3273 | /* end confdefs.h. */ | |
a3bba767 JJ |
3274 | #include <stdarg.h> |
3275 | #include <stdio.h> | |
3276 | #include <sys/types.h> | |
3277 | #include <sys/stat.h> | |
3278 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3279 | struct buf { int x; }; | |
3280 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3281 | static char *e (p, i) | |
3282 | char **p; | |
3283 | int i; | |
703d89ab | 3284 | { |
a3bba767 | 3285 | return p[i]; |
703d89ab | 3286 | } |
a3bba767 JJ |
3287 | static char *f (char * (*g) (char **, int), char **p, ...) |
3288 | { | |
3289 | char *s; | |
3290 | va_list v; | |
3291 | va_start (v,p); | |
3292 | s = g (p, va_arg (v,int)); | |
3293 | va_end (v); | |
3294 | return s; | |
3295 | } | |
3296 | ||
3297 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3298 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3299 | These don't provoke an error unfortunately, instead are silently treated | |
ab22c1fa | 3300 | as 'x'. The following induces an error, until -std is added to get |
a3bba767 JJ |
3301 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3302 | array size at least. It's necessary to write '\x00'==0 to get something | |
ab22c1fa | 3303 | that's true only with -std. */ |
a3bba767 JJ |
3304 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3305 | ||
ab22c1fa CF |
3306 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3307 | inside strings and character constants. */ | |
3308 | #define FOO(x) 'x' | |
3309 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3310 | ||
a3bba767 JJ |
3311 | int test (int i, double x); |
3312 | struct s1 {int (*f) (int a);}; | |
3313 | struct s2 {int (*f) (double a);}; | |
3314 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3315 | int argc; | |
3316 | char **argv; | |
3317 | int | |
3318 | main () | |
3319 | { | |
3320 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3321 | ; | |
3322 | return 0; | |
3323 | } | |
3324 | _ACEOF | |
ab22c1fa CF |
3325 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3326 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
a3bba767 JJ |
3327 | do |
3328 | CC="$ac_save_CC $ac_arg" | |
3329 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
3330 | if { (ac_try="$ac_compile" |
3331 | case "(($ac_try" in | |
3332 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3333 | *) ac_try_echo=$ac_try;; | |
3334 | esac | |
3335 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3336 | (eval "$ac_compile") 2>conftest.er1 | |
a3bba767 | 3337 | ac_status=$? |
703d89ab ZW |
3338 | grep -v '^ *+' conftest.er1 >conftest.err |
3339 | rm -f conftest.er1 | |
3340 | cat conftest.err >&5 | |
8b1f719a | 3341 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
3342 | (exit $ac_status); } && { |
3343 | test -z "$ac_c_werror_flag" || | |
3344 | test ! -s conftest.err | |
3345 | } && test -s conftest.$ac_objext; then | |
3346 | ac_cv_prog_cc_c89=$ac_arg | |
703d89ab ZW |
3347 | else |
3348 | echo "$as_me: failed program was:" >&5 | |
3349 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3350 | ||
ab22c1fa | 3351 | |
a3bba767 | 3352 | fi |
ab22c1fa CF |
3353 | |
3354 | rm -f core conftest.err conftest.$ac_objext | |
3355 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
a3bba767 | 3356 | done |
ab22c1fa | 3357 | rm -f conftest.$ac_ext |
a3bba767 JJ |
3358 | CC=$ac_save_CC |
3359 | ||
3360 | fi | |
ab22c1fa CF |
3361 | # AC_CACHE_VAL |
3362 | case "x$ac_cv_prog_cc_c89" in | |
3363 | x) | |
3364 | { echo "$as_me:$LINENO: result: none needed" >&5 | |
3365 | echo "${ECHO_T}none needed" >&6; } ;; | |
3366 | xno) | |
3367 | { echo "$as_me:$LINENO: result: unsupported" >&5 | |
3368 | echo "${ECHO_T}unsupported" >&6; } ;; | |
a3bba767 | 3369 | *) |
ab22c1fa CF |
3370 | CC="$CC $ac_cv_prog_cc_c89" |
3371 | { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 | |
3372 | echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; | |
a3bba767 JJ |
3373 | esac |
3374 | ||
ba479fd2 | 3375 | |
ba479fd2 NN |
3376 | ac_ext=c |
3377 | ac_cpp='$CPP $CPPFLAGS' | |
3378 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3379 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3380 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3381 | ||
3382 | if test "x$CC" != xcc; then | |
ab22c1fa CF |
3383 | { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 |
3384 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } | |
ba479fd2 | 3385 | else |
ab22c1fa CF |
3386 | { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 |
3387 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } | |
ba479fd2 NN |
3388 | fi |
3389 | set dummy $CC; ac_cc=`echo $2 | | |
3390 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
ab22c1fa | 3391 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then |
ba479fd2 NN |
3392 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3393 | else | |
3394 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3395 | /* confdefs.h. */ |
3396 | _ACEOF | |
3397 | cat confdefs.h >>conftest.$ac_ext | |
3398 | cat >>conftest.$ac_ext <<_ACEOF | |
3399 | /* end confdefs.h. */ | |
3400 | ||
3401 | int | |
3402 | main () | |
3403 | { | |
3404 | ||
3405 | ; | |
3406 | return 0; | |
3407 | } | |
3408 | _ACEOF | |
3ec83fc2 RH |
3409 | # Make sure it works both with $CC and with simple cc. |
3410 | # We do the test twice because some compilers refuse to overwrite an | |
3411 | # existing .o file with -o, though they will create one. | |
ab22c1fa CF |
3412 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' |
3413 | rm -f conftest2.* | |
3414 | if { (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); } && | |
ab22c1fa CF |
3423 | test -f conftest2.$ac_objext && { (case "(($ac_try" in |
3424 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3425 | *) ac_try_echo=$ac_try;; | |
3426 | esac | |
3427 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3428 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3429 | ac_status=$? |
3430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3431 | (exit $ac_status); }; | |
3ec83fc2 RH |
3432 | then |
3433 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
3434 | if test "x$CC" != xcc; then | |
3435 | # Test first that cc exists at all. | |
ba479fd2 | 3436 | if { ac_try='cc -c conftest.$ac_ext >&5' |
ab22c1fa CF |
3437 | { (case "(($ac_try" in |
3438 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3439 | *) ac_try_echo=$ac_try;; | |
3440 | esac | |
3441 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3442 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3443 | ac_status=$? |
3444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3445 | (exit $ac_status); }; }; then | |
ab22c1fa CF |
3446 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' |
3447 | rm -f conftest2.* | |
3448 | if { (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); } && | |
ab22c1fa CF |
3457 | test -f conftest2.$ac_objext && { (case "(($ac_try" in |
3458 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3459 | *) ac_try_echo=$ac_try;; | |
3460 | esac | |
3461 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3462 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
3463 | ac_status=$? |
3464 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3465 | (exit $ac_status); }; | |
3ec83fc2 | 3466 | then |
86da66b5 HPN |
3467 | # cc works too. |
3468 | : | |
3ec83fc2 | 3469 | else |
86da66b5 HPN |
3470 | # cc exists but doesn't like -o. |
3471 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
3472 | fi |
3473 | fi | |
3474 | fi | |
3475 | else | |
3476 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3477 | fi | |
ab22c1fa | 3478 | rm -f core conftest* |
3ec83fc2 RH |
3479 | |
3480 | fi | |
ab22c1fa CF |
3481 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then |
3482 | { echo "$as_me:$LINENO: result: yes" >&5 | |
3483 | echo "${ECHO_T}yes" >&6; } | |
3ec83fc2 | 3484 | else |
ab22c1fa CF |
3485 | { echo "$as_me:$LINENO: result: no" >&5 |
3486 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
3487 | |
3488 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 3489 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 3490 | _ACEOF |
3ec83fc2 RH |
3491 | |
3492 | fi | |
3493 | ||
3b620440 KC |
3494 | # expand $ac_aux_dir to an absolute path |
3495 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
3496 | ||
3497 | # FIXME: we rely on the cache variable name because | |
3498 | # there is no other way. | |
3499 | set dummy $CC | |
3500 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
3501 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
3502 | # Losing compiler, so override with the script. | |
3503 | # FIXME: It is wrong to rewrite CC. | |
3504 | # But if we don't then we get into trouble of one sort or another. | |
3505 | # A longer-term fix would be to have automake use am__CC in this case, | |
3506 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
3507 | CC="$am_aux_dir/compile $CC" | |
3508 | fi | |
3509 | ||
414d23ae HPN |
3510 | # autoconf is lame and doesn't give us any substitution variable for this. |
3511 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
3512 | NO_MINUS_C_MINUS_O=yes | |
3513 | else | |
3514 | OUTPUT_OPTION='-o $@' | |
3515 | fi | |
3516 | ||
3517 | ||
3518 | ||
ec6c7392 PB |
3519 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer |
3520 | # optimizations to be activated explicitly by the toplevel. | |
3521 | case "$CC" in | |
3522 | */prev-gcc/xgcc*) ;; | |
3523 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
3524 | esac | |
3525 | ||
3526 | ||
73458fb7 NN |
3527 | # ------------------------- |
3528 | # Check C compiler features | |
3529 | # ------------------------- | |
3530 | ||
ba479fd2 NN |
3531 | ac_ext=c |
3532 | ac_cpp='$CPP $CPPFLAGS' | |
3533 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3534 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3535 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
ab22c1fa CF |
3536 | { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 |
3537 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } | |
84c041a1 ZW |
3538 | # On Suns, sometimes $CPP names a directory. |
3539 | if test -n "$CPP" && test -d "$CPP"; then | |
3540 | CPP= | |
3541 | fi | |
3542 | if test -z "$CPP"; then | |
ba479fd2 NN |
3543 | if test "${ac_cv_prog_CPP+set}" = set; then |
3544 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3545 | else | |
3546 | # Double quotes because CPP needs to be expanded | |
3547 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3548 | do | |
3549 | ac_preproc_ok=false | |
3550 | for ac_c_preproc_warn_flag in '' yes | |
3551 | do | |
3552 | # Use a header file that comes with gcc, so configuring glibc | |
3553 | # with a fresh cross-compiler works. | |
3554 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3555 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 3556 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
3557 | # not just through cpp. "Syntax error" is here to catch this case. |
3558 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3559 | /* confdefs.h. */ |
3560 | _ACEOF | |
3561 | cat confdefs.h >>conftest.$ac_ext | |
3562 | cat >>conftest.$ac_ext <<_ACEOF | |
3563 | /* end confdefs.h. */ | |
3564 | #ifdef __STDC__ | |
3565 | # include <limits.h> | |
3566 | #else | |
3567 | # include <assert.h> | |
3568 | #endif | |
86da66b5 | 3569 | Syntax error |
ba479fd2 | 3570 | _ACEOF |
ab22c1fa CF |
3571 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3572 | case "(($ac_try" in | |
3573 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3574 | *) ac_try_echo=$ac_try;; | |
3575 | esac | |
3576 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3577 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3578 | ac_status=$? |
3579 | grep -v '^ *+' conftest.er1 >conftest.err | |
3580 | rm -f conftest.er1 | |
3581 | cat conftest.err >&5 | |
3582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
3583 | (exit $ac_status); } >/dev/null && { |
3584 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3585 | test ! -s conftest.err | |
3586 | }; then | |
093e61a6 | 3587 | : |
cafe096b | 3588 | else |
ba479fd2 NN |
3589 | echo "$as_me: failed program was:" >&5 |
3590 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3591 | ||
3592 | # Broken: fails on valid input. | |
3593 | continue | |
3594 | fi | |
ab22c1fa | 3595 | |
ba479fd2 NN |
3596 | rm -f conftest.err conftest.$ac_ext |
3597 | ||
ab22c1fa | 3598 | # OK, works on sane cases. Now check whether nonexistent headers |
ba479fd2 NN |
3599 | # can be detected and how. |
3600 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3601 | /* confdefs.h. */ |
3602 | _ACEOF | |
3603 | cat confdefs.h >>conftest.$ac_ext | |
3604 | cat >>conftest.$ac_ext <<_ACEOF | |
3605 | /* end confdefs.h. */ | |
3606 | #include <ac_nonexistent.h> | |
3607 | _ACEOF | |
ab22c1fa CF |
3608 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3609 | case "(($ac_try" in | |
3610 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3611 | *) ac_try_echo=$ac_try;; | |
3612 | esac | |
3613 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3614 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3615 | ac_status=$? |
3616 | grep -v '^ *+' conftest.er1 >conftest.err | |
3617 | rm -f conftest.er1 | |
3618 | cat conftest.err >&5 | |
3619 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
3620 | (exit $ac_status); } >/dev/null && { |
3621 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3622 | test ! -s conftest.err | |
3623 | }; then | |
ba479fd2 NN |
3624 | # Broken: success on invalid input. |
3625 | continue | |
3626 | else | |
3627 | echo "$as_me: failed program was:" >&5 | |
3628 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3629 | ||
3630 | # Passes both tests. | |
3631 | ac_preproc_ok=: | |
3632 | break | |
3633 | fi | |
ab22c1fa | 3634 | |
ba479fd2 NN |
3635 | rm -f conftest.err conftest.$ac_ext |
3636 | ||
3637 | done | |
3638 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3639 | rm -f conftest.err conftest.$ac_ext | |
3640 | if $ac_preproc_ok; then | |
3641 | break | |
3642 | fi | |
3643 | ||
3644 | done | |
3645 | ac_cv_prog_CPP=$CPP | |
3646 | ||
3647 | fi | |
3648 | CPP=$ac_cv_prog_CPP | |
3649 | else | |
3650 | ac_cv_prog_CPP=$CPP | |
3651 | fi | |
ab22c1fa CF |
3652 | { echo "$as_me:$LINENO: result: $CPP" >&5 |
3653 | echo "${ECHO_T}$CPP" >&6; } | |
ba479fd2 NN |
3654 | ac_preproc_ok=false |
3655 | for ac_c_preproc_warn_flag in '' yes | |
3656 | do | |
3657 | # Use a header file that comes with gcc, so configuring glibc | |
3658 | # with a fresh cross-compiler works. | |
3659 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3660 | # <limits.h> exists even on freestanding compilers. | |
3661 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3662 | # not just through cpp. "Syntax error" is here to catch this case. | |
3663 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3664 | /* confdefs.h. */ |
3665 | _ACEOF | |
3666 | cat confdefs.h >>conftest.$ac_ext | |
3667 | cat >>conftest.$ac_ext <<_ACEOF | |
3668 | /* end confdefs.h. */ | |
3669 | #ifdef __STDC__ | |
3670 | # include <limits.h> | |
3671 | #else | |
3672 | # include <assert.h> | |
3673 | #endif | |
86da66b5 | 3674 | Syntax error |
ba479fd2 | 3675 | _ACEOF |
ab22c1fa CF |
3676 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3677 | case "(($ac_try" in | |
3678 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3679 | *) ac_try_echo=$ac_try;; | |
3680 | esac | |
3681 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3682 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3683 | ac_status=$? |
3684 | grep -v '^ *+' conftest.er1 >conftest.err | |
3685 | rm -f conftest.er1 | |
3686 | cat conftest.err >&5 | |
3687 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
3688 | (exit $ac_status); } >/dev/null && { |
3689 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3690 | test ! -s conftest.err | |
3691 | }; then | |
6e3f3080 | 3692 | : |
414d23ae | 3693 | else |
ba479fd2 NN |
3694 | echo "$as_me: failed program was:" >&5 |
3695 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3696 | ||
3697 | # Broken: fails on valid input. | |
3698 | continue | |
3699 | fi | |
ab22c1fa | 3700 | |
ba479fd2 NN |
3701 | rm -f conftest.err conftest.$ac_ext |
3702 | ||
ab22c1fa | 3703 | # OK, works on sane cases. Now check whether nonexistent headers |
ba479fd2 NN |
3704 | # can be detected and how. |
3705 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3706 | /* confdefs.h. */ |
3707 | _ACEOF | |
3708 | cat confdefs.h >>conftest.$ac_ext | |
3709 | cat >>conftest.$ac_ext <<_ACEOF | |
3710 | /* end confdefs.h. */ | |
3711 | #include <ac_nonexistent.h> | |
3712 | _ACEOF | |
ab22c1fa CF |
3713 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
3714 | case "(($ac_try" in | |
3715 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3716 | *) ac_try_echo=$ac_try;; | |
3717 | esac | |
3718 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3719 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
3720 | ac_status=$? |
3721 | grep -v '^ *+' conftest.er1 >conftest.err | |
3722 | rm -f conftest.er1 | |
3723 | cat conftest.err >&5 | |
3724 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
3725 | (exit $ac_status); } >/dev/null && { |
3726 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
3727 | test ! -s conftest.err | |
3728 | }; then | |
ba479fd2 NN |
3729 | # Broken: success on invalid input. |
3730 | continue | |
3731 | else | |
3732 | echo "$as_me: failed program was:" >&5 | |
3733 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3734 | ||
3735 | # Passes both tests. | |
3736 | ac_preproc_ok=: | |
3737 | break | |
63cf211a | 3738 | fi |
ab22c1fa | 3739 | |
ba479fd2 NN |
3740 | rm -f conftest.err conftest.$ac_ext |
3741 | ||
3742 | done | |
3743 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3744 | rm -f conftest.err conftest.$ac_ext | |
3745 | if $ac_preproc_ok; then | |
3746 | : | |
6e3f3080 | 3747 | else |
ba479fd2 NN |
3748 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3749 | See \`config.log' for more details." >&5 | |
3750 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3751 | See \`config.log' for more details." >&2;} | |
3752 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3753 | fi |
3754 | ||
ba479fd2 NN |
3755 | ac_ext=c |
3756 | ac_cpp='$CPP $CPPFLAGS' | |
3757 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3758 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3759 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3760 | ||
b5472e1d | 3761 | |
ab22c1fa CF |
3762 | { echo "$as_me:$LINENO: checking for inline" >&5 |
3763 | echo $ECHO_N "checking for inline... $ECHO_C" >&6; } | |
ba479fd2 NN |
3764 | if test "${ac_cv_c_inline+set}" = set; then |
3765 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3766 | else |
3767 | ac_cv_c_inline=no | |
3768 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3769 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3770 | /* confdefs.h. */ |
3771 | _ACEOF | |
3772 | cat confdefs.h >>conftest.$ac_ext | |
3773 | cat >>conftest.$ac_ext <<_ACEOF | |
3774 | /* end confdefs.h. */ | |
3775 | #ifndef __cplusplus | |
3776 | typedef int foo_t; | |
3777 | static $ac_kw foo_t static_foo () {return 0; } | |
3778 | $ac_kw foo_t foo () {return 0; } | |
3779 | #endif | |
414d23ae | 3780 | |
ba479fd2 NN |
3781 | _ACEOF |
3782 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
3783 | if { (ac_try="$ac_compile" |
3784 | case "(($ac_try" in | |
3785 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3786 | *) ac_try_echo=$ac_try;; | |
3787 | esac | |
3788 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
3789 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 3790 | ac_status=$? |
86da66b5 HPN |
3791 | grep -v '^ *+' conftest.er1 >conftest.err |
3792 | rm -f conftest.er1 | |
3793 | cat conftest.err >&5 | |
ba479fd2 | 3794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
3795 | (exit $ac_status); } && { |
3796 | test -z "$ac_c_werror_flag" || | |
3797 | test ! -s conftest.err | |
3798 | } && test -s conftest.$ac_objext; then | |
3799 | ac_cv_c_inline=$ac_kw | |
414d23ae | 3800 | else |
ba479fd2 NN |
3801 | echo "$as_me: failed program was:" >&5 |
3802 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3803 | ||
ab22c1fa | 3804 | |
414d23ae | 3805 | fi |
ab22c1fa CF |
3806 | |
3807 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3808 | test "$ac_cv_c_inline" != no && break | |
414d23ae HPN |
3809 | done |
3810 | ||
3811 | fi | |
ab22c1fa CF |
3812 | { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3813 | echo "${ECHO_T}$ac_cv_c_inline" >&6; } | |
86da66b5 HPN |
3814 | |
3815 | ||
ba479fd2 | 3816 | case $ac_cv_c_inline in |
414d23ae | 3817 | inline | yes) ;; |
86da66b5 HPN |
3818 | *) |
3819 | case $ac_cv_c_inline in | |
3820 | no) ac_val=;; | |
3821 | *) ac_val=$ac_cv_c_inline;; | |
3822 | esac | |
3823 | cat >>confdefs.h <<_ACEOF | |
3824 | #ifndef __cplusplus | |
3825 | #define inline $ac_val | |
3826 | #endif | |
ba479fd2 | 3827 | _ACEOF |
86da66b5 | 3828 | ;; |
414d23ae HPN |
3829 | esac |
3830 | ||
414d23ae | 3831 | |
414d23ae | 3832 | # sizeof(char) is 1 by definition. |
bf3b7cd3 | 3833 | |
ab22c1fa CF |
3834 | { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 |
3835 | echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } | |
3836 | if test "${ac_cv_path_GREP+set}" = set; then | |
3837 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3838 | else | |
3839 | # Extract the first word of "grep ggrep" to use in msg output | |
3840 | if test -z "$GREP"; then | |
3841 | set dummy grep ggrep; ac_prog_name=$2 | |
3842 | if test "${ac_cv_path_GREP+set}" = set; then | |
3843 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3844 | else | |
3845 | ac_path_GREP_found=false | |
3846 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3847 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3848 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3849 | do | |
3850 | IFS=$as_save_IFS | |
3851 | test -z "$as_dir" && as_dir=. | |
3852 | for ac_prog in grep ggrep; do | |
3853 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3854 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3855 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3856 | # Check for GNU ac_path_GREP and select it if it is found. | |
3857 | # Check for GNU $ac_path_GREP | |
3858 | case `"$ac_path_GREP" --version 2>&1` in | |
3859 | *GNU*) | |
3860 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3861 | *) | |
3862 | ac_count=0 | |
3863 | echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" | |
3864 | while : | |
3865 | do | |
3866 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3867 | mv "conftest.tmp" "conftest.in" | |
3868 | cp "conftest.in" "conftest.nl" | |
3869 | echo 'GREP' >> "conftest.nl" | |
3870 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3871 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3872 | ac_count=`expr $ac_count + 1` | |
3873 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3874 | # Best one so far, save it but keep looking for a better one | |
3875 | ac_cv_path_GREP="$ac_path_GREP" | |
3876 | ac_path_GREP_max=$ac_count | |
3877 | fi | |
3878 | # 10*(2^10) chars as input seems more than enough | |
3879 | test $ac_count -gt 10 && break | |
3880 | done | |
3881 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3882 | esac | |
3883 | ||
3884 | ||
3885 | $ac_path_GREP_found && break 3 | |
3886 | done | |
3887 | done | |
3888 | ||
3889 | done | |
3890 | IFS=$as_save_IFS | |
3891 | ||
3892 | ||
3893 | fi | |
3894 | ||
3895 | GREP="$ac_cv_path_GREP" | |
3896 | if test -z "$GREP"; then | |
3897 | { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 | |
3898 | echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} | |
3899 | { (exit 1); exit 1; }; } | |
3900 | fi | |
3901 | ||
3902 | else | |
3903 | ac_cv_path_GREP=$GREP | |
3904 | fi | |
3905 | ||
3906 | ||
3907 | fi | |
3908 | { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 | |
3909 | echo "${ECHO_T}$ac_cv_path_GREP" >&6; } | |
3910 | GREP="$ac_cv_path_GREP" | |
3911 | ||
3912 | ||
3913 | { echo "$as_me:$LINENO: checking for egrep" >&5 | |
3914 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } | |
3915 | if test "${ac_cv_path_EGREP+set}" = set; then | |
3916 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3917 | else | |
3918 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
3919 | then ac_cv_path_EGREP="$GREP -E" | |
3920 | else | |
3921 | # Extract the first word of "egrep" to use in msg output | |
3922 | if test -z "$EGREP"; then | |
3923 | set dummy egrep; ac_prog_name=$2 | |
3924 | if test "${ac_cv_path_EGREP+set}" = set; then | |
703d89ab ZW |
3925 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3926 | else | |
ab22c1fa CF |
3927 | ac_path_EGREP_found=false |
3928 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3929 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3930 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3931 | do | |
3932 | IFS=$as_save_IFS | |
3933 | test -z "$as_dir" && as_dir=. | |
3934 | for ac_prog in egrep; do | |
3935 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3936 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3937 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3938 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3939 | # Check for GNU $ac_path_EGREP | |
3940 | case `"$ac_path_EGREP" --version 2>&1` in | |
3941 | *GNU*) | |
3942 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3943 | *) | |
3944 | ac_count=0 | |
3945 | echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" | |
3946 | while : | |
3947 | do | |
3948 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3949 | mv "conftest.tmp" "conftest.in" | |
3950 | cp "conftest.in" "conftest.nl" | |
3951 | echo 'EGREP' >> "conftest.nl" | |
3952 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3953 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3954 | ac_count=`expr $ac_count + 1` | |
3955 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3956 | # Best one so far, save it but keep looking for a better one | |
3957 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3958 | ac_path_EGREP_max=$ac_count | |
703d89ab | 3959 | fi |
ab22c1fa CF |
3960 | # 10*(2^10) chars as input seems more than enough |
3961 | test $ac_count -gt 10 && break | |
3962 | done | |
3963 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3964 | esac | |
3965 | ||
3966 | ||
3967 | $ac_path_EGREP_found && break 3 | |
3968 | done | |
3969 | done | |
3970 | ||
3971 | done | |
3972 | IFS=$as_save_IFS | |
3973 | ||
3974 | ||
3975 | fi | |
3976 | ||
3977 | EGREP="$ac_cv_path_EGREP" | |
3978 | if test -z "$EGREP"; then | |
3979 | { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 | |
3980 | echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} | |
3981 | { (exit 1); exit 1; }; } | |
3982 | fi | |
3983 | ||
3984 | else | |
3985 | ac_cv_path_EGREP=$EGREP | |
3986 | fi | |
3987 | ||
3988 | ||
3989 | fi | |
a3bba767 | 3990 | fi |
ab22c1fa CF |
3991 | { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 |
3992 | echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } | |
3993 | EGREP="$ac_cv_path_EGREP" | |
703d89ab ZW |
3994 | |
3995 | ||
ab22c1fa CF |
3996 | { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
3997 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
3998 | if test "${ac_cv_header_stdc+set}" = set; then |
3999 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4000 | else | |
4001 | cat >conftest.$ac_ext <<_ACEOF | |
4002 | /* confdefs.h. */ | |
4003 | _ACEOF | |
4004 | cat confdefs.h >>conftest.$ac_ext | |
4005 | cat >>conftest.$ac_ext <<_ACEOF | |
4006 | /* end confdefs.h. */ | |
4007 | #include <stdlib.h> | |
4008 | #include <stdarg.h> | |
4009 | #include <string.h> | |
4010 | #include <float.h> | |
4011 | ||
4012 | int | |
4013 | main () | |
4014 | { | |
4015 | ||
4016 | ; | |
4017 | return 0; | |
4018 | } | |
4019 | _ACEOF | |
4020 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4021 | if { (ac_try="$ac_compile" |
4022 | case "(($ac_try" in | |
4023 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4024 | *) ac_try_echo=$ac_try;; | |
4025 | esac | |
4026 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4027 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4028 | ac_status=$? |
4029 | grep -v '^ *+' conftest.er1 >conftest.err | |
4030 | rm -f conftest.er1 | |
4031 | cat conftest.err >&5 | |
4032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4033 | (exit $ac_status); } && { |
4034 | test -z "$ac_c_werror_flag" || | |
4035 | test ! -s conftest.err | |
4036 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4037 | ac_cv_header_stdc=yes |
4038 | else | |
4039 | echo "$as_me: failed program was:" >&5 | |
4040 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4041 | ||
ab22c1fa | 4042 | ac_cv_header_stdc=no |
bf3b7cd3 | 4043 | fi |
ab22c1fa CF |
4044 | |
4045 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4046 | |
4047 | if test $ac_cv_header_stdc = yes; then | |
4048 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4049 | cat >conftest.$ac_ext <<_ACEOF | |
4050 | /* confdefs.h. */ | |
4051 | _ACEOF | |
4052 | cat confdefs.h >>conftest.$ac_ext | |
4053 | cat >>conftest.$ac_ext <<_ACEOF | |
4054 | /* end confdefs.h. */ | |
4055 | #include <string.h> | |
4056 | ||
4057 | _ACEOF | |
4058 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4059 | $EGREP "memchr" >/dev/null 2>&1; then | |
4060 | : | |
4061 | else | |
4062 | ac_cv_header_stdc=no | |
4063 | fi | |
4064 | rm -f conftest* | |
4065 | ||
4066 | fi | |
4067 | ||
4068 | if test $ac_cv_header_stdc = yes; then | |
4069 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4070 | cat >conftest.$ac_ext <<_ACEOF | |
4071 | /* confdefs.h. */ | |
4072 | _ACEOF | |
4073 | cat confdefs.h >>conftest.$ac_ext | |
4074 | cat >>conftest.$ac_ext <<_ACEOF | |
4075 | /* end confdefs.h. */ | |
4076 | #include <stdlib.h> | |
4077 | ||
4078 | _ACEOF | |
4079 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4080 | $EGREP "free" >/dev/null 2>&1; then | |
4081 | : | |
4082 | else | |
4083 | ac_cv_header_stdc=no | |
4084 | fi | |
4085 | rm -f conftest* | |
4086 | ||
4087 | fi | |
4088 | ||
4089 | if test $ac_cv_header_stdc = yes; then | |
4090 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4091 | if test "$cross_compiling" = yes; then | |
4092 | : | |
4093 | else | |
4094 | cat >conftest.$ac_ext <<_ACEOF | |
4095 | /* confdefs.h. */ | |
4096 | _ACEOF | |
4097 | cat confdefs.h >>conftest.$ac_ext | |
4098 | cat >>conftest.$ac_ext <<_ACEOF | |
4099 | /* end confdefs.h. */ | |
4100 | #include <ctype.h> | |
ab22c1fa | 4101 | #include <stdlib.h> |
bf3b7cd3 JD |
4102 | #if ((' ' & 0x0FF) == 0x020) |
4103 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4104 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4105 | #else | |
4106 | # define ISLOWER(c) \ | |
4107 | (('a' <= (c) && (c) <= 'i') \ | |
4108 | || ('j' <= (c) && (c) <= 'r') \ | |
4109 | || ('s' <= (c) && (c) <= 'z')) | |
4110 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4111 | #endif | |
4112 | ||
4113 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4114 | int | |
4115 | main () | |
4116 | { | |
4117 | int i; | |
4118 | for (i = 0; i < 256; i++) | |
4119 | if (XOR (islower (i), ISLOWER (i)) | |
4120 | || toupper (i) != TOUPPER (i)) | |
ab22c1fa CF |
4121 | return 2; |
4122 | return 0; | |
bf3b7cd3 JD |
4123 | } |
4124 | _ACEOF | |
4125 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
4126 | if { (ac_try="$ac_link" |
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_link") 2>&5 | |
bf3b7cd3 JD |
4133 | ac_status=$? |
4134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4135 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
4136 | { (case "(($ac_try" in |
4137 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4138 | *) ac_try_echo=$ac_try;; | |
4139 | esac | |
4140 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4141 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
4142 | ac_status=$? |
4143 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4144 | (exit $ac_status); }; }; then | |
4145 | : | |
4146 | else | |
4147 | echo "$as_me: program exited with status $ac_status" >&5 | |
4148 | echo "$as_me: failed program was:" >&5 | |
4149 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4150 | ||
4151 | ( exit $ac_status ) | |
4152 | ac_cv_header_stdc=no | |
4153 | fi | |
ab22c1fa | 4154 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4155 | fi |
ab22c1fa CF |
4156 | |
4157 | ||
703d89ab | 4158 | fi |
ab22c1fa CF |
4159 | fi |
4160 | { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
4161 | echo "${ECHO_T}$ac_cv_header_stdc" >&6; } | |
bf3b7cd3 JD |
4162 | if test $ac_cv_header_stdc = yes; then |
4163 | ||
4164 | cat >>confdefs.h <<\_ACEOF | |
4165 | #define STDC_HEADERS 1 | |
4166 | _ACEOF | |
4167 | ||
4168 | fi | |
4169 | ||
4170 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
4171 | ||
4172 | ||
4173 | ||
4174 | ||
4175 | ||
4176 | ||
4177 | ||
4178 | ||
4179 | ||
4180 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4181 | inttypes.h stdint.h unistd.h | |
4182 | do | |
4183 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ab22c1fa CF |
4184 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
4185 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } | |
4186 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then | |
bf3b7cd3 JD |
4187 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
4188 | else | |
4189 | cat >conftest.$ac_ext <<_ACEOF | |
4190 | /* confdefs.h. */ | |
4191 | _ACEOF | |
4192 | cat confdefs.h >>conftest.$ac_ext | |
4193 | cat >>conftest.$ac_ext <<_ACEOF | |
4194 | /* end confdefs.h. */ | |
4195 | $ac_includes_default | |
4196 | ||
4197 | #include <$ac_header> | |
4198 | _ACEOF | |
4199 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4200 | if { (ac_try="$ac_compile" |
4201 | case "(($ac_try" in | |
4202 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4203 | *) ac_try_echo=$ac_try;; | |
4204 | esac | |
4205 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4206 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4207 | ac_status=$? |
4208 | grep -v '^ *+' conftest.er1 >conftest.err | |
4209 | rm -f conftest.er1 | |
4210 | cat conftest.err >&5 | |
4211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4212 | (exit $ac_status); } && { |
4213 | test -z "$ac_c_werror_flag" || | |
4214 | test ! -s conftest.err | |
4215 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4216 | eval "$as_ac_Header=yes" |
4217 | else | |
4218 | echo "$as_me: failed program was:" >&5 | |
4219 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4220 | ||
ab22c1fa | 4221 | eval "$as_ac_Header=no" |
bf3b7cd3 | 4222 | fi |
ab22c1fa CF |
4223 | |
4224 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4225 | fi |
ab22c1fa CF |
4226 | ac_res=`eval echo '${'$as_ac_Header'}'` |
4227 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
4228 | echo "${ECHO_T}$ac_res" >&6; } | |
bf3b7cd3 JD |
4229 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
4230 | cat >>confdefs.h <<_ACEOF | |
4231 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4232 | _ACEOF | |
4233 | ||
4234 | fi | |
4235 | ||
4236 | done | |
4237 | ||
4238 | ||
ab22c1fa CF |
4239 | { echo "$as_me:$LINENO: checking for void *" >&5 |
4240 | echo $ECHO_N "checking for void *... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
4241 | if test "${ac_cv_type_void_p+set}" = set; then |
4242 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4243 | else | |
4244 | cat >conftest.$ac_ext <<_ACEOF | |
4245 | /* confdefs.h. */ | |
4246 | _ACEOF | |
4247 | cat confdefs.h >>conftest.$ac_ext | |
4248 | cat >>conftest.$ac_ext <<_ACEOF | |
4249 | /* end confdefs.h. */ | |
4250 | $ac_includes_default | |
ab22c1fa | 4251 | typedef void * ac__type_new_; |
bf3b7cd3 JD |
4252 | int |
4253 | main () | |
4254 | { | |
ab22c1fa | 4255 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 4256 | return 0; |
ab22c1fa | 4257 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
4258 | return 0; |
4259 | ; | |
4260 | return 0; | |
4261 | } | |
4262 | _ACEOF | |
4263 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4264 | if { (ac_try="$ac_compile" |
4265 | case "(($ac_try" in | |
4266 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4267 | *) ac_try_echo=$ac_try;; | |
4268 | esac | |
4269 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4270 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4271 | ac_status=$? |
4272 | grep -v '^ *+' conftest.er1 >conftest.err | |
4273 | rm -f conftest.er1 | |
4274 | cat conftest.err >&5 | |
4275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4276 | (exit $ac_status); } && { |
4277 | test -z "$ac_c_werror_flag" || | |
4278 | test ! -s conftest.err | |
4279 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4280 | ac_cv_type_void_p=yes |
4281 | else | |
4282 | echo "$as_me: failed program was:" >&5 | |
4283 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4284 | ||
ab22c1fa | 4285 | ac_cv_type_void_p=no |
bf3b7cd3 | 4286 | fi |
ab22c1fa CF |
4287 | |
4288 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4289 | fi |
ab22c1fa CF |
4290 | { echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 |
4291 | echo "${ECHO_T}$ac_cv_type_void_p" >&6; } | |
bf3b7cd3 | 4292 | |
ab22c1fa CF |
4293 | # The cast to long int works around a bug in the HP C Compiler |
4294 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4295 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4296 | # This bug is HP SR number 8606223364. | |
4297 | { echo "$as_me:$LINENO: checking size of void *" >&5 | |
4298 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } | |
ba479fd2 NN |
4299 | if test "${ac_cv_sizeof_void_p+set}" = set; then |
4300 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 4301 | else |
bf3b7cd3 JD |
4302 | if test "$cross_compiling" = yes; then |
4303 | # Depending upon the size, compute the lo and hi bounds. | |
4304 | cat >conftest.$ac_ext <<_ACEOF | |
4305 | /* confdefs.h. */ | |
4306 | _ACEOF | |
4307 | cat confdefs.h >>conftest.$ac_ext | |
4308 | cat >>conftest.$ac_ext <<_ACEOF | |
4309 | /* end confdefs.h. */ | |
4310 | $ac_includes_default | |
ab22c1fa | 4311 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4312 | int |
4313 | main () | |
4314 | { | |
ab22c1fa | 4315 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
4316 | test_array [0] = 0 |
4317 | ||
4318 | ; | |
4319 | return 0; | |
4320 | } | |
4321 | _ACEOF | |
4322 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4323 | if { (ac_try="$ac_compile" |
4324 | case "(($ac_try" in | |
4325 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4326 | *) ac_try_echo=$ac_try;; | |
4327 | esac | |
4328 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4329 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4330 | ac_status=$? |
4331 | grep -v '^ *+' conftest.er1 >conftest.err | |
4332 | rm -f conftest.er1 | |
4333 | cat conftest.err >&5 | |
4334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4335 | (exit $ac_status); } && { |
4336 | test -z "$ac_c_werror_flag" || | |
4337 | test ! -s conftest.err | |
4338 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4339 | ac_lo=0 ac_mid=0 |
4340 | while :; do | |
4341 | cat >conftest.$ac_ext <<_ACEOF | |
4342 | /* confdefs.h. */ | |
4343 | _ACEOF | |
4344 | cat confdefs.h >>conftest.$ac_ext | |
4345 | cat >>conftest.$ac_ext <<_ACEOF | |
4346 | /* end confdefs.h. */ | |
4347 | $ac_includes_default | |
ab22c1fa | 4348 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4349 | int |
4350 | main () | |
4351 | { | |
ab22c1fa | 4352 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4353 | test_array [0] = 0 |
4354 | ||
4355 | ; | |
4356 | return 0; | |
4357 | } | |
4358 | _ACEOF | |
4359 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4360 | if { (ac_try="$ac_compile" |
4361 | case "(($ac_try" in | |
4362 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4363 | *) ac_try_echo=$ac_try;; | |
4364 | esac | |
4365 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4366 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4367 | ac_status=$? |
4368 | grep -v '^ *+' conftest.er1 >conftest.err | |
4369 | rm -f conftest.er1 | |
4370 | cat conftest.err >&5 | |
4371 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4372 | (exit $ac_status); } && { |
4373 | test -z "$ac_c_werror_flag" || | |
4374 | test ! -s conftest.err | |
4375 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4376 | ac_hi=$ac_mid; break |
4377 | else | |
4378 | echo "$as_me: failed program was:" >&5 | |
4379 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4380 | ||
ab22c1fa CF |
4381 | ac_lo=`expr $ac_mid + 1` |
4382 | if test $ac_lo -le $ac_mid; then | |
4383 | ac_lo= ac_hi= | |
4384 | break | |
4385 | fi | |
4386 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 4387 | fi |
ab22c1fa CF |
4388 | |
4389 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4390 | done |
4391 | else | |
4392 | echo "$as_me: failed program was:" >&5 | |
4393 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4394 | ||
ab22c1fa | 4395 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
4396 | /* confdefs.h. */ |
4397 | _ACEOF | |
4398 | cat confdefs.h >>conftest.$ac_ext | |
4399 | cat >>conftest.$ac_ext <<_ACEOF | |
4400 | /* end confdefs.h. */ | |
4401 | $ac_includes_default | |
ab22c1fa | 4402 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4403 | int |
4404 | main () | |
4405 | { | |
ab22c1fa | 4406 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
4407 | test_array [0] = 0 |
4408 | ||
4409 | ; | |
4410 | return 0; | |
4411 | } | |
4412 | _ACEOF | |
4413 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4414 | if { (ac_try="$ac_compile" |
4415 | case "(($ac_try" in | |
4416 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4417 | *) ac_try_echo=$ac_try;; | |
4418 | esac | |
4419 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4420 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4421 | ac_status=$? |
4422 | grep -v '^ *+' conftest.er1 >conftest.err | |
4423 | rm -f conftest.er1 | |
4424 | cat conftest.err >&5 | |
4425 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4426 | (exit $ac_status); } && { |
4427 | test -z "$ac_c_werror_flag" || | |
4428 | test ! -s conftest.err | |
4429 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4430 | ac_hi=-1 ac_mid=-1 |
4431 | while :; do | |
4432 | cat >conftest.$ac_ext <<_ACEOF | |
4433 | /* confdefs.h. */ | |
4434 | _ACEOF | |
4435 | cat confdefs.h >>conftest.$ac_ext | |
4436 | cat >>conftest.$ac_ext <<_ACEOF | |
4437 | /* end confdefs.h. */ | |
4438 | $ac_includes_default | |
ab22c1fa | 4439 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4440 | int |
4441 | main () | |
4442 | { | |
ab22c1fa | 4443 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
4444 | test_array [0] = 0 |
4445 | ||
4446 | ; | |
4447 | return 0; | |
4448 | } | |
4449 | _ACEOF | |
4450 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4451 | if { (ac_try="$ac_compile" |
4452 | case "(($ac_try" in | |
4453 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4454 | *) ac_try_echo=$ac_try;; | |
4455 | esac | |
4456 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4457 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4458 | ac_status=$? |
4459 | grep -v '^ *+' conftest.er1 >conftest.err | |
4460 | rm -f conftest.er1 | |
4461 | cat conftest.err >&5 | |
4462 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4463 | (exit $ac_status); } && { |
4464 | test -z "$ac_c_werror_flag" || | |
4465 | test ! -s conftest.err | |
4466 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4467 | ac_lo=$ac_mid; break |
4468 | else | |
4469 | echo "$as_me: failed program was:" >&5 | |
4470 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4471 | ||
ab22c1fa CF |
4472 | ac_hi=`expr '(' $ac_mid ')' - 1` |
4473 | if test $ac_mid -le $ac_hi; then | |
4474 | ac_lo= ac_hi= | |
4475 | break | |
4476 | fi | |
4477 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 4478 | fi |
ab22c1fa CF |
4479 | |
4480 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4481 | done |
4482 | else | |
4483 | echo "$as_me: failed program was:" >&5 | |
4484 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4485 | ||
ab22c1fa | 4486 | ac_lo= ac_hi= |
bf3b7cd3 | 4487 | fi |
ab22c1fa CF |
4488 | |
4489 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4490 | fi |
ab22c1fa CF |
4491 | |
4492 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4493 | # Binary search between lo and hi bounds. |
4494 | while test "x$ac_lo" != "x$ac_hi"; do | |
4495 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4496 | cat >conftest.$ac_ext <<_ACEOF | |
4497 | /* confdefs.h. */ | |
4498 | _ACEOF | |
4499 | cat confdefs.h >>conftest.$ac_ext | |
4500 | cat >>conftest.$ac_ext <<_ACEOF | |
4501 | /* end confdefs.h. */ | |
4502 | $ac_includes_default | |
ab22c1fa | 4503 | typedef void * ac__type_sizeof_; |
bf3b7cd3 JD |
4504 | int |
4505 | main () | |
4506 | { | |
ab22c1fa | 4507 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4508 | test_array [0] = 0 |
4509 | ||
4510 | ; | |
4511 | return 0; | |
4512 | } | |
4513 | _ACEOF | |
4514 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4515 | if { (ac_try="$ac_compile" |
4516 | case "(($ac_try" in | |
4517 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4518 | *) ac_try_echo=$ac_try;; | |
4519 | esac | |
4520 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4521 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4522 | ac_status=$? |
4523 | grep -v '^ *+' conftest.er1 >conftest.err | |
4524 | rm -f conftest.er1 | |
4525 | cat conftest.err >&5 | |
4526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4527 | (exit $ac_status); } && { |
4528 | test -z "$ac_c_werror_flag" || | |
4529 | test ! -s conftest.err | |
4530 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4531 | ac_hi=$ac_mid |
4532 | else | |
4533 | echo "$as_me: failed program was:" >&5 | |
4534 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4535 | ||
ab22c1fa | 4536 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 4537 | fi |
ab22c1fa CF |
4538 | |
4539 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4540 | done |
4541 | case $ac_lo in | |
4542 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
ab22c1fa CF |
4543 | '') if test "$ac_cv_type_void_p" = yes; then |
4544 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) | |
bf3b7cd3 | 4545 | See \`config.log' for more details." >&5 |
ab22c1fa | 4546 | echo "$as_me: error: cannot compute sizeof (void *) |
bf3b7cd3 | 4547 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
4548 | { (exit 77); exit 77; }; } |
4549 | else | |
4550 | ac_cv_sizeof_void_p=0 | |
4551 | fi ;; | |
bf3b7cd3 | 4552 | esac |
bf3b7cd3 JD |
4553 | else |
4554 | cat >conftest.$ac_ext <<_ACEOF | |
4555 | /* confdefs.h. */ | |
4556 | _ACEOF | |
4557 | cat confdefs.h >>conftest.$ac_ext | |
4558 | cat >>conftest.$ac_ext <<_ACEOF | |
4559 | /* end confdefs.h. */ | |
4560 | $ac_includes_default | |
ab22c1fa CF |
4561 | typedef void * ac__type_sizeof_; |
4562 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
4563 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
4564 | #include <stdio.h> |
4565 | #include <stdlib.h> | |
4566 | int | |
4567 | main () | |
4568 | { | |
4569 | ||
4570 | FILE *f = fopen ("conftest.val", "w"); | |
4571 | if (! f) | |
ab22c1fa CF |
4572 | return 1; |
4573 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 4574 | { |
ab22c1fa CF |
4575 | long int i = longval (); |
4576 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4577 | return 1; | |
bf3b7cd3 JD |
4578 | fprintf (f, "%ld\n", i); |
4579 | } | |
4580 | else | |
4581 | { | |
ab22c1fa CF |
4582 | unsigned long int i = ulongval (); |
4583 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4584 | return 1; | |
bf3b7cd3 JD |
4585 | fprintf (f, "%lu\n", i); |
4586 | } | |
ab22c1fa | 4587 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
4588 | |
4589 | ; | |
4590 | return 0; | |
4591 | } | |
4592 | _ACEOF | |
4593 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
4594 | if { (ac_try="$ac_link" |
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_link") 2>&5 | |
bf3b7cd3 JD |
4601 | ac_status=$? |
4602 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4603 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
4604 | { (case "(($ac_try" in |
4605 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4606 | *) ac_try_echo=$ac_try;; | |
4607 | esac | |
4608 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4609 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
4610 | ac_status=$? |
4611 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4612 | (exit $ac_status); }; }; then | |
4613 | ac_cv_sizeof_void_p=`cat conftest.val` | |
4614 | else | |
4615 | echo "$as_me: program exited with status $ac_status" >&5 | |
4616 | echo "$as_me: failed program was:" >&5 | |
4617 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4618 | ||
4619 | ( exit $ac_status ) | |
ab22c1fa CF |
4620 | if test "$ac_cv_type_void_p" = yes; then |
4621 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) | |
bf3b7cd3 | 4622 | See \`config.log' for more details." >&5 |
ab22c1fa | 4623 | echo "$as_me: error: cannot compute sizeof (void *) |
bf3b7cd3 | 4624 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
4625 | { (exit 77); exit 77; }; } |
4626 | else | |
4627 | ac_cv_sizeof_void_p=0 | |
4628 | fi | |
bf3b7cd3 | 4629 | fi |
ab22c1fa | 4630 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4631 | fi |
4632 | rm -f conftest.val | |
bf3b7cd3 | 4633 | fi |
ab22c1fa CF |
4634 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 |
4635 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } | |
4636 | ||
4637 | ||
4638 | ||
bf3b7cd3 JD |
4639 | cat >>confdefs.h <<_ACEOF |
4640 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
4641 | _ACEOF | |
4642 | ||
4643 | ||
ab22c1fa CF |
4644 | { echo "$as_me:$LINENO: checking for short" >&5 |
4645 | echo $ECHO_N "checking for short... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
4646 | if test "${ac_cv_type_short+set}" = set; then |
4647 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4648 | else | |
4649 | cat >conftest.$ac_ext <<_ACEOF | |
4650 | /* confdefs.h. */ | |
4651 | _ACEOF | |
4652 | cat confdefs.h >>conftest.$ac_ext | |
4653 | cat >>conftest.$ac_ext <<_ACEOF | |
4654 | /* end confdefs.h. */ | |
4655 | $ac_includes_default | |
ab22c1fa | 4656 | typedef short ac__type_new_; |
bf3b7cd3 JD |
4657 | int |
4658 | main () | |
4659 | { | |
ab22c1fa | 4660 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 4661 | return 0; |
ab22c1fa | 4662 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
4663 | return 0; |
4664 | ; | |
4665 | return 0; | |
4666 | } | |
4667 | _ACEOF | |
4668 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4669 | if { (ac_try="$ac_compile" |
4670 | case "(($ac_try" in | |
4671 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4672 | *) ac_try_echo=$ac_try;; | |
4673 | esac | |
4674 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4675 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4676 | ac_status=$? |
4677 | grep -v '^ *+' conftest.er1 >conftest.err | |
4678 | rm -f conftest.er1 | |
4679 | cat conftest.err >&5 | |
4680 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4681 | (exit $ac_status); } && { |
4682 | test -z "$ac_c_werror_flag" || | |
4683 | test ! -s conftest.err | |
4684 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4685 | ac_cv_type_short=yes |
4686 | else | |
4687 | echo "$as_me: failed program was:" >&5 | |
4688 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4689 | ||
ab22c1fa | 4690 | ac_cv_type_short=no |
bf3b7cd3 | 4691 | fi |
ab22c1fa CF |
4692 | |
4693 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4694 | fi |
ab22c1fa CF |
4695 | { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 |
4696 | echo "${ECHO_T}$ac_cv_type_short" >&6; } | |
bf3b7cd3 | 4697 | |
ab22c1fa CF |
4698 | # The cast to long int works around a bug in the HP C Compiler |
4699 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4700 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4701 | # This bug is HP SR number 8606223364. | |
4702 | { echo "$as_me:$LINENO: checking size of short" >&5 | |
4703 | echo $ECHO_N "checking size of short... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
4704 | if test "${ac_cv_sizeof_short+set}" = set; then |
4705 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4706 | else | |
bf3b7cd3 JD |
4707 | if test "$cross_compiling" = yes; then |
4708 | # Depending upon the size, compute the lo and hi bounds. | |
4709 | cat >conftest.$ac_ext <<_ACEOF | |
4710 | /* confdefs.h. */ | |
4711 | _ACEOF | |
4712 | cat confdefs.h >>conftest.$ac_ext | |
4713 | cat >>conftest.$ac_ext <<_ACEOF | |
4714 | /* end confdefs.h. */ | |
4715 | $ac_includes_default | |
ab22c1fa | 4716 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4717 | int |
4718 | main () | |
4719 | { | |
ab22c1fa | 4720 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
4721 | test_array [0] = 0 |
4722 | ||
4723 | ; | |
4724 | return 0; | |
4725 | } | |
4726 | _ACEOF | |
4727 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4728 | if { (ac_try="$ac_compile" |
4729 | case "(($ac_try" in | |
4730 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4731 | *) ac_try_echo=$ac_try;; | |
4732 | esac | |
4733 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4734 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4735 | ac_status=$? |
4736 | grep -v '^ *+' conftest.er1 >conftest.err | |
4737 | rm -f conftest.er1 | |
4738 | cat conftest.err >&5 | |
4739 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4740 | (exit $ac_status); } && { |
4741 | test -z "$ac_c_werror_flag" || | |
4742 | test ! -s conftest.err | |
4743 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4744 | ac_lo=0 ac_mid=0 |
4745 | while :; do | |
4746 | cat >conftest.$ac_ext <<_ACEOF | |
4747 | /* confdefs.h. */ | |
4748 | _ACEOF | |
4749 | cat confdefs.h >>conftest.$ac_ext | |
4750 | cat >>conftest.$ac_ext <<_ACEOF | |
4751 | /* end confdefs.h. */ | |
4752 | $ac_includes_default | |
ab22c1fa | 4753 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4754 | int |
4755 | main () | |
4756 | { | |
ab22c1fa | 4757 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4758 | test_array [0] = 0 |
4759 | ||
4760 | ; | |
4761 | return 0; | |
4762 | } | |
4763 | _ACEOF | |
4764 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4765 | if { (ac_try="$ac_compile" |
4766 | case "(($ac_try" in | |
4767 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4768 | *) ac_try_echo=$ac_try;; | |
4769 | esac | |
4770 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4771 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4772 | ac_status=$? |
4773 | grep -v '^ *+' conftest.er1 >conftest.err | |
4774 | rm -f conftest.er1 | |
4775 | cat conftest.err >&5 | |
4776 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4777 | (exit $ac_status); } && { |
4778 | test -z "$ac_c_werror_flag" || | |
4779 | test ! -s conftest.err | |
4780 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4781 | ac_hi=$ac_mid; break |
4782 | else | |
4783 | echo "$as_me: failed program was:" >&5 | |
4784 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4785 | ||
ab22c1fa CF |
4786 | ac_lo=`expr $ac_mid + 1` |
4787 | if test $ac_lo -le $ac_mid; then | |
4788 | ac_lo= ac_hi= | |
4789 | break | |
4790 | fi | |
4791 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 4792 | fi |
ab22c1fa CF |
4793 | |
4794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4795 | done |
4796 | else | |
4797 | echo "$as_me: failed program was:" >&5 | |
4798 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4799 | ||
ab22c1fa | 4800 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
4801 | /* confdefs.h. */ |
4802 | _ACEOF | |
4803 | cat confdefs.h >>conftest.$ac_ext | |
4804 | cat >>conftest.$ac_ext <<_ACEOF | |
4805 | /* end confdefs.h. */ | |
4806 | $ac_includes_default | |
ab22c1fa | 4807 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4808 | int |
4809 | main () | |
4810 | { | |
ab22c1fa | 4811 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
4812 | test_array [0] = 0 |
4813 | ||
4814 | ; | |
4815 | return 0; | |
4816 | } | |
4817 | _ACEOF | |
4818 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4819 | if { (ac_try="$ac_compile" |
4820 | case "(($ac_try" in | |
4821 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4822 | *) ac_try_echo=$ac_try;; | |
4823 | esac | |
4824 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4825 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4826 | ac_status=$? |
4827 | grep -v '^ *+' conftest.er1 >conftest.err | |
4828 | rm -f conftest.er1 | |
4829 | cat conftest.err >&5 | |
4830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4831 | (exit $ac_status); } && { |
4832 | test -z "$ac_c_werror_flag" || | |
4833 | test ! -s conftest.err | |
4834 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4835 | ac_hi=-1 ac_mid=-1 |
4836 | while :; do | |
4837 | cat >conftest.$ac_ext <<_ACEOF | |
4838 | /* confdefs.h. */ | |
4839 | _ACEOF | |
4840 | cat confdefs.h >>conftest.$ac_ext | |
4841 | cat >>conftest.$ac_ext <<_ACEOF | |
4842 | /* end confdefs.h. */ | |
4843 | $ac_includes_default | |
ab22c1fa | 4844 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4845 | int |
4846 | main () | |
4847 | { | |
ab22c1fa | 4848 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
4849 | test_array [0] = 0 |
4850 | ||
4851 | ; | |
4852 | return 0; | |
4853 | } | |
4854 | _ACEOF | |
4855 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4856 | if { (ac_try="$ac_compile" |
4857 | case "(($ac_try" in | |
4858 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4859 | *) ac_try_echo=$ac_try;; | |
4860 | esac | |
4861 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4862 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4863 | ac_status=$? |
4864 | grep -v '^ *+' conftest.er1 >conftest.err | |
4865 | rm -f conftest.er1 | |
4866 | cat conftest.err >&5 | |
4867 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4868 | (exit $ac_status); } && { |
4869 | test -z "$ac_c_werror_flag" || | |
4870 | test ! -s conftest.err | |
4871 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4872 | ac_lo=$ac_mid; break |
4873 | else | |
4874 | echo "$as_me: failed program was:" >&5 | |
4875 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4876 | ||
ab22c1fa CF |
4877 | ac_hi=`expr '(' $ac_mid ')' - 1` |
4878 | if test $ac_mid -le $ac_hi; then | |
4879 | ac_lo= ac_hi= | |
4880 | break | |
4881 | fi | |
4882 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 4883 | fi |
ab22c1fa CF |
4884 | |
4885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4886 | done |
4887 | else | |
4888 | echo "$as_me: failed program was:" >&5 | |
4889 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4890 | ||
ab22c1fa | 4891 | ac_lo= ac_hi= |
bf3b7cd3 | 4892 | fi |
ab22c1fa CF |
4893 | |
4894 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 4895 | fi |
ab22c1fa CF |
4896 | |
4897 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4898 | # Binary search between lo and hi bounds. |
4899 | while test "x$ac_lo" != "x$ac_hi"; do | |
4900 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4901 | cat >conftest.$ac_ext <<_ACEOF | |
4902 | /* confdefs.h. */ | |
4903 | _ACEOF | |
4904 | cat confdefs.h >>conftest.$ac_ext | |
4905 | cat >>conftest.$ac_ext <<_ACEOF | |
4906 | /* end confdefs.h. */ | |
4907 | $ac_includes_default | |
ab22c1fa | 4908 | typedef short ac__type_sizeof_; |
bf3b7cd3 JD |
4909 | int |
4910 | main () | |
4911 | { | |
ab22c1fa | 4912 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
4913 | test_array [0] = 0 |
4914 | ||
4915 | ; | |
4916 | return 0; | |
4917 | } | |
4918 | _ACEOF | |
4919 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
4920 | if { (ac_try="$ac_compile" |
4921 | case "(($ac_try" in | |
4922 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4923 | *) ac_try_echo=$ac_try;; | |
4924 | esac | |
4925 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
4926 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
4927 | ac_status=$? |
4928 | grep -v '^ *+' conftest.er1 >conftest.err | |
4929 | rm -f conftest.er1 | |
4930 | cat conftest.err >&5 | |
4931 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
4932 | (exit $ac_status); } && { |
4933 | test -z "$ac_c_werror_flag" || | |
4934 | test ! -s conftest.err | |
4935 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
4936 | ac_hi=$ac_mid |
4937 | else | |
4938 | echo "$as_me: failed program was:" >&5 | |
4939 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4940 | ||
ab22c1fa | 4941 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 4942 | fi |
ab22c1fa CF |
4943 | |
4944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4945 | done |
4946 | case $ac_lo in | |
4947 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
ab22c1fa CF |
4948 | '') if test "$ac_cv_type_short" = yes; then |
4949 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) | |
bf3b7cd3 | 4950 | See \`config.log' for more details." >&5 |
ab22c1fa | 4951 | echo "$as_me: error: cannot compute sizeof (short) |
bf3b7cd3 | 4952 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
4953 | { (exit 77); exit 77; }; } |
4954 | else | |
4955 | ac_cv_sizeof_short=0 | |
4956 | fi ;; | |
bf3b7cd3 | 4957 | esac |
8b1f719a PB |
4958 | else |
4959 | cat >conftest.$ac_ext <<_ACEOF | |
bf3b7cd3 JD |
4960 | /* confdefs.h. */ |
4961 | _ACEOF | |
4962 | cat confdefs.h >>conftest.$ac_ext | |
4963 | cat >>conftest.$ac_ext <<_ACEOF | |
4964 | /* end confdefs.h. */ | |
4965 | $ac_includes_default | |
ab22c1fa CF |
4966 | typedef short ac__type_sizeof_; |
4967 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
4968 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
4969 | #include <stdio.h> |
4970 | #include <stdlib.h> | |
4971 | int | |
4972 | main () | |
4973 | { | |
4974 | ||
4975 | FILE *f = fopen ("conftest.val", "w"); | |
4976 | if (! f) | |
ab22c1fa CF |
4977 | return 1; |
4978 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 4979 | { |
ab22c1fa CF |
4980 | long int i = longval (); |
4981 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4982 | return 1; | |
bf3b7cd3 JD |
4983 | fprintf (f, "%ld\n", i); |
4984 | } | |
4985 | else | |
4986 | { | |
ab22c1fa CF |
4987 | unsigned long int i = ulongval (); |
4988 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
4989 | return 1; | |
bf3b7cd3 JD |
4990 | fprintf (f, "%lu\n", i); |
4991 | } | |
ab22c1fa | 4992 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
4993 | |
4994 | ; | |
4995 | return 0; | |
4996 | } | |
4997 | _ACEOF | |
4998 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
4999 | if { (ac_try="$ac_link" |
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_link") 2>&5 | |
bf3b7cd3 JD |
5006 | ac_status=$? |
5007 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5008 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
5009 | { (case "(($ac_try" in |
5010 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5011 | *) ac_try_echo=$ac_try;; | |
5012 | esac | |
5013 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5014 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
5015 | ac_status=$? |
5016 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5017 | (exit $ac_status); }; }; then | |
5018 | ac_cv_sizeof_short=`cat conftest.val` | |
5019 | else | |
5020 | echo "$as_me: program exited with status $ac_status" >&5 | |
5021 | echo "$as_me: failed program was:" >&5 | |
5022 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5023 | ||
5024 | ( exit $ac_status ) | |
ab22c1fa CF |
5025 | if test "$ac_cv_type_short" = yes; then |
5026 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) | |
bf3b7cd3 | 5027 | See \`config.log' for more details." >&5 |
ab22c1fa | 5028 | echo "$as_me: error: cannot compute sizeof (short) |
bf3b7cd3 | 5029 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
5030 | { (exit 77); exit 77; }; } |
5031 | else | |
5032 | ac_cv_sizeof_short=0 | |
5033 | fi | |
bf3b7cd3 | 5034 | fi |
ab22c1fa | 5035 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5036 | fi |
5037 | rm -f conftest.val | |
bf3b7cd3 | 5038 | fi |
ab22c1fa CF |
5039 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 |
5040 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } | |
5041 | ||
5042 | ||
5043 | ||
bf3b7cd3 JD |
5044 | cat >>confdefs.h <<_ACEOF |
5045 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
5046 | _ACEOF | |
5047 | ||
5048 | ||
ab22c1fa CF |
5049 | { echo "$as_me:$LINENO: checking for int" >&5 |
5050 | echo $ECHO_N "checking for int... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5051 | if test "${ac_cv_type_int+set}" = set; then |
5052 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5053 | else | |
5054 | cat >conftest.$ac_ext <<_ACEOF | |
5055 | /* confdefs.h. */ | |
5056 | _ACEOF | |
5057 | cat confdefs.h >>conftest.$ac_ext | |
5058 | cat >>conftest.$ac_ext <<_ACEOF | |
5059 | /* end confdefs.h. */ | |
5060 | $ac_includes_default | |
ab22c1fa | 5061 | typedef int ac__type_new_; |
bf3b7cd3 JD |
5062 | int |
5063 | main () | |
5064 | { | |
ab22c1fa | 5065 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 5066 | return 0; |
ab22c1fa | 5067 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
5068 | return 0; |
5069 | ; | |
5070 | return 0; | |
5071 | } | |
5072 | _ACEOF | |
5073 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5074 | if { (ac_try="$ac_compile" |
5075 | case "(($ac_try" in | |
5076 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5077 | *) ac_try_echo=$ac_try;; | |
5078 | esac | |
5079 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5080 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5081 | ac_status=$? |
5082 | grep -v '^ *+' conftest.er1 >conftest.err | |
5083 | rm -f conftest.er1 | |
5084 | cat conftest.err >&5 | |
5085 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5086 | (exit $ac_status); } && { |
5087 | test -z "$ac_c_werror_flag" || | |
5088 | test ! -s conftest.err | |
5089 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5090 | ac_cv_type_int=yes |
5091 | else | |
5092 | echo "$as_me: failed program was:" >&5 | |
5093 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5094 | ||
ab22c1fa | 5095 | ac_cv_type_int=no |
bf3b7cd3 | 5096 | fi |
ab22c1fa CF |
5097 | |
5098 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5099 | fi |
ab22c1fa CF |
5100 | { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 |
5101 | echo "${ECHO_T}$ac_cv_type_int" >&6; } | |
bf3b7cd3 | 5102 | |
ab22c1fa CF |
5103 | # The cast to long int works around a bug in the HP C Compiler |
5104 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5105 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5106 | # This bug is HP SR number 8606223364. | |
5107 | { echo "$as_me:$LINENO: checking size of int" >&5 | |
5108 | echo $ECHO_N "checking size of int... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5109 | if test "${ac_cv_sizeof_int+set}" = set; then |
5110 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5111 | else | |
bf3b7cd3 JD |
5112 | if test "$cross_compiling" = yes; then |
5113 | # Depending upon the size, compute the lo and hi bounds. | |
5114 | cat >conftest.$ac_ext <<_ACEOF | |
5115 | /* confdefs.h. */ | |
5116 | _ACEOF | |
5117 | cat confdefs.h >>conftest.$ac_ext | |
5118 | cat >>conftest.$ac_ext <<_ACEOF | |
5119 | /* end confdefs.h. */ | |
5120 | $ac_includes_default | |
ab22c1fa | 5121 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5122 | int |
5123 | main () | |
5124 | { | |
ab22c1fa | 5125 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
5126 | test_array [0] = 0 |
5127 | ||
5128 | ; | |
5129 | return 0; | |
5130 | } | |
5131 | _ACEOF | |
5132 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5133 | if { (ac_try="$ac_compile" |
5134 | case "(($ac_try" in | |
5135 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5136 | *) ac_try_echo=$ac_try;; | |
5137 | esac | |
5138 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5139 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5140 | ac_status=$? |
5141 | grep -v '^ *+' conftest.er1 >conftest.err | |
5142 | rm -f conftest.er1 | |
5143 | cat conftest.err >&5 | |
5144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5145 | (exit $ac_status); } && { |
5146 | test -z "$ac_c_werror_flag" || | |
5147 | test ! -s conftest.err | |
5148 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5149 | ac_lo=0 ac_mid=0 |
5150 | while :; do | |
5151 | cat >conftest.$ac_ext <<_ACEOF | |
5152 | /* confdefs.h. */ | |
5153 | _ACEOF | |
5154 | cat confdefs.h >>conftest.$ac_ext | |
5155 | cat >>conftest.$ac_ext <<_ACEOF | |
5156 | /* end confdefs.h. */ | |
5157 | $ac_includes_default | |
ab22c1fa | 5158 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5159 | int |
5160 | main () | |
5161 | { | |
ab22c1fa | 5162 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5163 | test_array [0] = 0 |
5164 | ||
5165 | ; | |
5166 | return 0; | |
5167 | } | |
5168 | _ACEOF | |
5169 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5170 | if { (ac_try="$ac_compile" |
5171 | case "(($ac_try" in | |
5172 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5173 | *) ac_try_echo=$ac_try;; | |
5174 | esac | |
5175 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5176 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5177 | ac_status=$? |
5178 | grep -v '^ *+' conftest.er1 >conftest.err | |
5179 | rm -f conftest.er1 | |
5180 | cat conftest.err >&5 | |
5181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5182 | (exit $ac_status); } && { |
5183 | test -z "$ac_c_werror_flag" || | |
5184 | test ! -s conftest.err | |
5185 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5186 | ac_hi=$ac_mid; break |
5187 | else | |
5188 | echo "$as_me: failed program was:" >&5 | |
5189 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5190 | ||
ab22c1fa CF |
5191 | ac_lo=`expr $ac_mid + 1` |
5192 | if test $ac_lo -le $ac_mid; then | |
5193 | ac_lo= ac_hi= | |
5194 | break | |
5195 | fi | |
5196 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 5197 | fi |
ab22c1fa CF |
5198 | |
5199 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5200 | done |
5201 | else | |
5202 | echo "$as_me: failed program was:" >&5 | |
5203 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5204 | ||
ab22c1fa | 5205 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
5206 | /* confdefs.h. */ |
5207 | _ACEOF | |
5208 | cat confdefs.h >>conftest.$ac_ext | |
5209 | cat >>conftest.$ac_ext <<_ACEOF | |
5210 | /* end confdefs.h. */ | |
5211 | $ac_includes_default | |
ab22c1fa | 5212 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5213 | int |
5214 | main () | |
5215 | { | |
ab22c1fa | 5216 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
5217 | test_array [0] = 0 |
5218 | ||
5219 | ; | |
5220 | return 0; | |
5221 | } | |
5222 | _ACEOF | |
5223 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5224 | if { (ac_try="$ac_compile" |
5225 | case "(($ac_try" in | |
5226 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5227 | *) ac_try_echo=$ac_try;; | |
5228 | esac | |
5229 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5230 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5231 | ac_status=$? |
5232 | grep -v '^ *+' conftest.er1 >conftest.err | |
5233 | rm -f conftest.er1 | |
5234 | cat conftest.err >&5 | |
5235 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5236 | (exit $ac_status); } && { |
5237 | test -z "$ac_c_werror_flag" || | |
5238 | test ! -s conftest.err | |
5239 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5240 | ac_hi=-1 ac_mid=-1 |
5241 | while :; do | |
5242 | cat >conftest.$ac_ext <<_ACEOF | |
5243 | /* confdefs.h. */ | |
5244 | _ACEOF | |
5245 | cat confdefs.h >>conftest.$ac_ext | |
5246 | cat >>conftest.$ac_ext <<_ACEOF | |
5247 | /* end confdefs.h. */ | |
5248 | $ac_includes_default | |
ab22c1fa | 5249 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5250 | int |
5251 | main () | |
5252 | { | |
ab22c1fa | 5253 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
5254 | test_array [0] = 0 |
5255 | ||
5256 | ; | |
5257 | return 0; | |
5258 | } | |
5259 | _ACEOF | |
5260 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5261 | if { (ac_try="$ac_compile" |
5262 | case "(($ac_try" in | |
5263 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5264 | *) ac_try_echo=$ac_try;; | |
5265 | esac | |
5266 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5267 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5268 | ac_status=$? |
5269 | grep -v '^ *+' conftest.er1 >conftest.err | |
5270 | rm -f conftest.er1 | |
5271 | cat conftest.err >&5 | |
5272 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5273 | (exit $ac_status); } && { |
5274 | test -z "$ac_c_werror_flag" || | |
5275 | test ! -s conftest.err | |
5276 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5277 | ac_lo=$ac_mid; break |
5278 | else | |
5279 | echo "$as_me: failed program was:" >&5 | |
5280 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5281 | ||
ab22c1fa CF |
5282 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5283 | if test $ac_mid -le $ac_hi; then | |
5284 | ac_lo= ac_hi= | |
5285 | break | |
5286 | fi | |
5287 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 5288 | fi |
ab22c1fa CF |
5289 | |
5290 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5291 | done |
5292 | else | |
5293 | echo "$as_me: failed program was:" >&5 | |
5294 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5295 | ||
ab22c1fa | 5296 | ac_lo= ac_hi= |
bf3b7cd3 | 5297 | fi |
ab22c1fa CF |
5298 | |
5299 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5300 | fi |
ab22c1fa CF |
5301 | |
5302 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5303 | # Binary search between lo and hi bounds. |
5304 | while test "x$ac_lo" != "x$ac_hi"; do | |
5305 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5306 | cat >conftest.$ac_ext <<_ACEOF | |
5307 | /* confdefs.h. */ | |
5308 | _ACEOF | |
5309 | cat confdefs.h >>conftest.$ac_ext | |
5310 | cat >>conftest.$ac_ext <<_ACEOF | |
5311 | /* end confdefs.h. */ | |
5312 | $ac_includes_default | |
ab22c1fa | 5313 | typedef int ac__type_sizeof_; |
bf3b7cd3 JD |
5314 | int |
5315 | main () | |
5316 | { | |
ab22c1fa | 5317 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5318 | test_array [0] = 0 |
5319 | ||
5320 | ; | |
5321 | return 0; | |
5322 | } | |
5323 | _ACEOF | |
5324 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5325 | if { (ac_try="$ac_compile" |
5326 | case "(($ac_try" in | |
5327 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5328 | *) ac_try_echo=$ac_try;; | |
5329 | esac | |
5330 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5331 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5332 | ac_status=$? |
5333 | grep -v '^ *+' conftest.er1 >conftest.err | |
5334 | rm -f conftest.er1 | |
5335 | cat conftest.err >&5 | |
5336 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5337 | (exit $ac_status); } && { |
5338 | test -z "$ac_c_werror_flag" || | |
5339 | test ! -s conftest.err | |
5340 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5341 | ac_hi=$ac_mid |
5342 | else | |
5343 | echo "$as_me: failed program was:" >&5 | |
5344 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5345 | ||
ab22c1fa | 5346 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 5347 | fi |
ab22c1fa CF |
5348 | |
5349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5350 | done |
5351 | case $ac_lo in | |
5352 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
ab22c1fa CF |
5353 | '') if test "$ac_cv_type_int" = yes; then |
5354 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) | |
bf3b7cd3 | 5355 | See \`config.log' for more details." >&5 |
ab22c1fa | 5356 | echo "$as_me: error: cannot compute sizeof (int) |
bf3b7cd3 | 5357 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
5358 | { (exit 77); exit 77; }; } |
5359 | else | |
5360 | ac_cv_sizeof_int=0 | |
5361 | fi ;; | |
bf3b7cd3 | 5362 | esac |
bf3b7cd3 JD |
5363 | else |
5364 | cat >conftest.$ac_ext <<_ACEOF | |
5365 | /* confdefs.h. */ | |
5366 | _ACEOF | |
5367 | cat confdefs.h >>conftest.$ac_ext | |
5368 | cat >>conftest.$ac_ext <<_ACEOF | |
5369 | /* end confdefs.h. */ | |
5370 | $ac_includes_default | |
ab22c1fa CF |
5371 | typedef int ac__type_sizeof_; |
5372 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
5373 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
5374 | #include <stdio.h> |
5375 | #include <stdlib.h> | |
5376 | int | |
5377 | main () | |
5378 | { | |
5379 | ||
5380 | FILE *f = fopen ("conftest.val", "w"); | |
5381 | if (! f) | |
ab22c1fa CF |
5382 | return 1; |
5383 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 5384 | { |
ab22c1fa CF |
5385 | long int i = longval (); |
5386 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5387 | return 1; | |
bf3b7cd3 JD |
5388 | fprintf (f, "%ld\n", i); |
5389 | } | |
5390 | else | |
5391 | { | |
ab22c1fa CF |
5392 | unsigned long int i = ulongval (); |
5393 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5394 | return 1; | |
bf3b7cd3 JD |
5395 | fprintf (f, "%lu\n", i); |
5396 | } | |
ab22c1fa | 5397 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
5398 | |
5399 | ; | |
5400 | return 0; | |
5401 | } | |
5402 | _ACEOF | |
5403 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
5404 | if { (ac_try="$ac_link" |
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_link") 2>&5 | |
bf3b7cd3 JD |
5411 | ac_status=$? |
5412 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5413 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
5414 | { (case "(($ac_try" in |
5415 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5416 | *) ac_try_echo=$ac_try;; | |
5417 | esac | |
5418 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5419 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
5420 | ac_status=$? |
5421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5422 | (exit $ac_status); }; }; then | |
5423 | ac_cv_sizeof_int=`cat conftest.val` | |
5424 | else | |
5425 | echo "$as_me: program exited with status $ac_status" >&5 | |
5426 | echo "$as_me: failed program was:" >&5 | |
5427 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5428 | ||
5429 | ( exit $ac_status ) | |
ab22c1fa CF |
5430 | if test "$ac_cv_type_int" = yes; then |
5431 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) | |
bf3b7cd3 | 5432 | See \`config.log' for more details." >&5 |
ab22c1fa | 5433 | echo "$as_me: error: cannot compute sizeof (int) |
bf3b7cd3 | 5434 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
5435 | { (exit 77); exit 77; }; } |
5436 | else | |
5437 | ac_cv_sizeof_int=0 | |
5438 | fi | |
bf3b7cd3 | 5439 | fi |
ab22c1fa | 5440 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5441 | fi |
5442 | rm -f conftest.val | |
bf3b7cd3 | 5443 | fi |
ab22c1fa CF |
5444 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 |
5445 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } | |
5446 | ||
5447 | ||
5448 | ||
bf3b7cd3 JD |
5449 | cat >>confdefs.h <<_ACEOF |
5450 | #define SIZEOF_INT $ac_cv_sizeof_int | |
5451 | _ACEOF | |
5452 | ||
5453 | ||
ab22c1fa CF |
5454 | { echo "$as_me:$LINENO: checking for long" >&5 |
5455 | echo $ECHO_N "checking for long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5456 | if test "${ac_cv_type_long+set}" = set; then |
5457 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5458 | else | |
5459 | cat >conftest.$ac_ext <<_ACEOF | |
5460 | /* confdefs.h. */ | |
5461 | _ACEOF | |
5462 | cat confdefs.h >>conftest.$ac_ext | |
5463 | cat >>conftest.$ac_ext <<_ACEOF | |
5464 | /* end confdefs.h. */ | |
5465 | $ac_includes_default | |
ab22c1fa | 5466 | typedef long ac__type_new_; |
bf3b7cd3 JD |
5467 | int |
5468 | main () | |
5469 | { | |
ab22c1fa | 5470 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 5471 | return 0; |
ab22c1fa | 5472 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
5473 | return 0; |
5474 | ; | |
5475 | return 0; | |
5476 | } | |
5477 | _ACEOF | |
5478 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5479 | if { (ac_try="$ac_compile" |
5480 | case "(($ac_try" in | |
5481 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5482 | *) ac_try_echo=$ac_try;; | |
5483 | esac | |
5484 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5485 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5486 | ac_status=$? |
5487 | grep -v '^ *+' conftest.er1 >conftest.err | |
5488 | rm -f conftest.er1 | |
5489 | cat conftest.err >&5 | |
5490 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5491 | (exit $ac_status); } && { |
5492 | test -z "$ac_c_werror_flag" || | |
5493 | test ! -s conftest.err | |
5494 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5495 | ac_cv_type_long=yes |
5496 | else | |
5497 | echo "$as_me: failed program was:" >&5 | |
5498 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5499 | ||
ab22c1fa | 5500 | ac_cv_type_long=no |
bf3b7cd3 | 5501 | fi |
ab22c1fa CF |
5502 | |
5503 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5504 | fi |
ab22c1fa CF |
5505 | { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 |
5506 | echo "${ECHO_T}$ac_cv_type_long" >&6; } | |
bf3b7cd3 | 5507 | |
ab22c1fa CF |
5508 | # The cast to long int works around a bug in the HP C Compiler |
5509 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5510 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5511 | # This bug is HP SR number 8606223364. | |
5512 | { echo "$as_me:$LINENO: checking size of long" >&5 | |
5513 | echo $ECHO_N "checking size of long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5514 | if test "${ac_cv_sizeof_long+set}" = set; then |
5515 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5516 | else | |
bf3b7cd3 JD |
5517 | if test "$cross_compiling" = yes; then |
5518 | # Depending upon the size, compute the lo and hi bounds. | |
5519 | cat >conftest.$ac_ext <<_ACEOF | |
5520 | /* confdefs.h. */ | |
5521 | _ACEOF | |
5522 | cat confdefs.h >>conftest.$ac_ext | |
5523 | cat >>conftest.$ac_ext <<_ACEOF | |
5524 | /* end confdefs.h. */ | |
5525 | $ac_includes_default | |
ab22c1fa | 5526 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5527 | int |
5528 | main () | |
5529 | { | |
ab22c1fa | 5530 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
5531 | test_array [0] = 0 |
5532 | ||
5533 | ; | |
5534 | return 0; | |
5535 | } | |
5536 | _ACEOF | |
5537 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5538 | if { (ac_try="$ac_compile" |
5539 | case "(($ac_try" in | |
5540 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5541 | *) ac_try_echo=$ac_try;; | |
5542 | esac | |
5543 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5544 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5545 | ac_status=$? |
5546 | grep -v '^ *+' conftest.er1 >conftest.err | |
5547 | rm -f conftest.er1 | |
5548 | cat conftest.err >&5 | |
5549 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5550 | (exit $ac_status); } && { |
5551 | test -z "$ac_c_werror_flag" || | |
5552 | test ! -s conftest.err | |
5553 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5554 | ac_lo=0 ac_mid=0 |
5555 | while :; do | |
5556 | cat >conftest.$ac_ext <<_ACEOF | |
5557 | /* confdefs.h. */ | |
5558 | _ACEOF | |
5559 | cat confdefs.h >>conftest.$ac_ext | |
5560 | cat >>conftest.$ac_ext <<_ACEOF | |
5561 | /* end confdefs.h. */ | |
5562 | $ac_includes_default | |
ab22c1fa | 5563 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5564 | int |
5565 | main () | |
5566 | { | |
ab22c1fa | 5567 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5568 | test_array [0] = 0 |
5569 | ||
5570 | ; | |
5571 | return 0; | |
5572 | } | |
5573 | _ACEOF | |
5574 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5575 | if { (ac_try="$ac_compile" |
5576 | case "(($ac_try" in | |
5577 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5578 | *) ac_try_echo=$ac_try;; | |
5579 | esac | |
5580 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5581 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5582 | ac_status=$? |
5583 | grep -v '^ *+' conftest.er1 >conftest.err | |
5584 | rm -f conftest.er1 | |
5585 | cat conftest.err >&5 | |
5586 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5587 | (exit $ac_status); } && { |
5588 | test -z "$ac_c_werror_flag" || | |
5589 | test ! -s conftest.err | |
5590 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5591 | ac_hi=$ac_mid; break |
5592 | else | |
5593 | echo "$as_me: failed program was:" >&5 | |
5594 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5595 | ||
ab22c1fa CF |
5596 | ac_lo=`expr $ac_mid + 1` |
5597 | if test $ac_lo -le $ac_mid; then | |
5598 | ac_lo= ac_hi= | |
5599 | break | |
5600 | fi | |
5601 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 5602 | fi |
ab22c1fa CF |
5603 | |
5604 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5605 | done |
5606 | else | |
5607 | echo "$as_me: failed program was:" >&5 | |
5608 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5609 | ||
ab22c1fa | 5610 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
5611 | /* confdefs.h. */ |
5612 | _ACEOF | |
5613 | cat confdefs.h >>conftest.$ac_ext | |
5614 | cat >>conftest.$ac_ext <<_ACEOF | |
5615 | /* end confdefs.h. */ | |
5616 | $ac_includes_default | |
ab22c1fa | 5617 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5618 | int |
5619 | main () | |
5620 | { | |
ab22c1fa | 5621 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
5622 | test_array [0] = 0 |
5623 | ||
5624 | ; | |
5625 | return 0; | |
5626 | } | |
5627 | _ACEOF | |
5628 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5629 | if { (ac_try="$ac_compile" |
5630 | case "(($ac_try" in | |
5631 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5632 | *) ac_try_echo=$ac_try;; | |
5633 | esac | |
5634 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5635 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5636 | ac_status=$? |
5637 | grep -v '^ *+' conftest.er1 >conftest.err | |
5638 | rm -f conftest.er1 | |
5639 | cat conftest.err >&5 | |
5640 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5641 | (exit $ac_status); } && { |
5642 | test -z "$ac_c_werror_flag" || | |
5643 | test ! -s conftest.err | |
5644 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5645 | ac_hi=-1 ac_mid=-1 |
5646 | while :; do | |
5647 | cat >conftest.$ac_ext <<_ACEOF | |
5648 | /* confdefs.h. */ | |
5649 | _ACEOF | |
5650 | cat confdefs.h >>conftest.$ac_ext | |
5651 | cat >>conftest.$ac_ext <<_ACEOF | |
5652 | /* end confdefs.h. */ | |
5653 | $ac_includes_default | |
ab22c1fa | 5654 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5655 | int |
5656 | main () | |
5657 | { | |
ab22c1fa | 5658 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
5659 | test_array [0] = 0 |
5660 | ||
5661 | ; | |
5662 | return 0; | |
5663 | } | |
5664 | _ACEOF | |
5665 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5666 | if { (ac_try="$ac_compile" |
5667 | case "(($ac_try" in | |
5668 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5669 | *) ac_try_echo=$ac_try;; | |
5670 | esac | |
5671 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5672 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5673 | ac_status=$? |
5674 | grep -v '^ *+' conftest.er1 >conftest.err | |
5675 | rm -f conftest.er1 | |
5676 | cat conftest.err >&5 | |
5677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5678 | (exit $ac_status); } && { |
5679 | test -z "$ac_c_werror_flag" || | |
5680 | test ! -s conftest.err | |
5681 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5682 | ac_lo=$ac_mid; break |
5683 | else | |
5684 | echo "$as_me: failed program was:" >&5 | |
5685 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5686 | ||
ab22c1fa CF |
5687 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5688 | if test $ac_mid -le $ac_hi; then | |
5689 | ac_lo= ac_hi= | |
5690 | break | |
5691 | fi | |
5692 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 5693 | fi |
ab22c1fa CF |
5694 | |
5695 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5696 | done |
5697 | else | |
5698 | echo "$as_me: failed program was:" >&5 | |
5699 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5700 | ||
ab22c1fa | 5701 | ac_lo= ac_hi= |
bf3b7cd3 | 5702 | fi |
ab22c1fa CF |
5703 | |
5704 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5705 | fi |
ab22c1fa CF |
5706 | |
5707 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5708 | # Binary search between lo and hi bounds. |
5709 | while test "x$ac_lo" != "x$ac_hi"; do | |
5710 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5711 | cat >conftest.$ac_ext <<_ACEOF | |
5712 | /* confdefs.h. */ | |
5713 | _ACEOF | |
5714 | cat confdefs.h >>conftest.$ac_ext | |
5715 | cat >>conftest.$ac_ext <<_ACEOF | |
5716 | /* end confdefs.h. */ | |
5717 | $ac_includes_default | |
ab22c1fa | 5718 | typedef long ac__type_sizeof_; |
bf3b7cd3 JD |
5719 | int |
5720 | main () | |
5721 | { | |
ab22c1fa | 5722 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
5723 | test_array [0] = 0 |
5724 | ||
5725 | ; | |
5726 | return 0; | |
5727 | } | |
5728 | _ACEOF | |
5729 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5730 | if { (ac_try="$ac_compile" |
5731 | case "(($ac_try" in | |
5732 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5733 | *) ac_try_echo=$ac_try;; | |
5734 | esac | |
5735 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5736 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5737 | ac_status=$? |
5738 | grep -v '^ *+' conftest.er1 >conftest.err | |
5739 | rm -f conftest.er1 | |
5740 | cat conftest.err >&5 | |
5741 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5742 | (exit $ac_status); } && { |
5743 | test -z "$ac_c_werror_flag" || | |
5744 | test ! -s conftest.err | |
5745 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
5746 | ac_hi=$ac_mid |
5747 | else | |
5748 | echo "$as_me: failed program was:" >&5 | |
5749 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5750 | ||
ab22c1fa | 5751 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 5752 | fi |
ab22c1fa CF |
5753 | |
5754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5755 | done |
5756 | case $ac_lo in | |
5757 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
ab22c1fa CF |
5758 | '') if test "$ac_cv_type_long" = yes; then |
5759 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) | |
bf3b7cd3 | 5760 | See \`config.log' for more details." >&5 |
ab22c1fa | 5761 | echo "$as_me: error: cannot compute sizeof (long) |
bf3b7cd3 | 5762 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
5763 | { (exit 77); exit 77; }; } |
5764 | else | |
5765 | ac_cv_sizeof_long=0 | |
5766 | fi ;; | |
bf3b7cd3 | 5767 | esac |
bf3b7cd3 JD |
5768 | else |
5769 | cat >conftest.$ac_ext <<_ACEOF | |
5770 | /* confdefs.h. */ | |
5771 | _ACEOF | |
5772 | cat confdefs.h >>conftest.$ac_ext | |
5773 | cat >>conftest.$ac_ext <<_ACEOF | |
5774 | /* end confdefs.h. */ | |
5775 | $ac_includes_default | |
ab22c1fa CF |
5776 | typedef long ac__type_sizeof_; |
5777 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
5778 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
5779 | #include <stdio.h> |
5780 | #include <stdlib.h> | |
5781 | int | |
5782 | main () | |
5783 | { | |
5784 | ||
5785 | FILE *f = fopen ("conftest.val", "w"); | |
5786 | if (! f) | |
ab22c1fa CF |
5787 | return 1; |
5788 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 5789 | { |
ab22c1fa CF |
5790 | long int i = longval (); |
5791 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5792 | return 1; | |
bf3b7cd3 JD |
5793 | fprintf (f, "%ld\n", i); |
5794 | } | |
5795 | else | |
5796 | { | |
ab22c1fa CF |
5797 | unsigned long int i = ulongval (); |
5798 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
5799 | return 1; | |
bf3b7cd3 JD |
5800 | fprintf (f, "%lu\n", i); |
5801 | } | |
ab22c1fa | 5802 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
5803 | |
5804 | ; | |
5805 | return 0; | |
5806 | } | |
5807 | _ACEOF | |
5808 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
5809 | if { (ac_try="$ac_link" |
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_link") 2>&5 | |
bf3b7cd3 JD |
5816 | ac_status=$? |
5817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5818 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
5819 | { (case "(($ac_try" in |
5820 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5821 | *) ac_try_echo=$ac_try;; | |
5822 | esac | |
5823 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5824 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
5825 | ac_status=$? |
5826 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5827 | (exit $ac_status); }; }; then | |
5828 | ac_cv_sizeof_long=`cat conftest.val` | |
5829 | else | |
5830 | echo "$as_me: program exited with status $ac_status" >&5 | |
5831 | echo "$as_me: failed program was:" >&5 | |
5832 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5833 | ||
5834 | ( exit $ac_status ) | |
ab22c1fa CF |
5835 | if test "$ac_cv_type_long" = yes; then |
5836 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) | |
bf3b7cd3 | 5837 | See \`config.log' for more details." >&5 |
ab22c1fa | 5838 | echo "$as_me: error: cannot compute sizeof (long) |
bf3b7cd3 | 5839 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
5840 | { (exit 77); exit 77; }; } |
5841 | else | |
5842 | ac_cv_sizeof_long=0 | |
5843 | fi | |
bf3b7cd3 | 5844 | fi |
ab22c1fa | 5845 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5846 | fi |
5847 | rm -f conftest.val | |
bf3b7cd3 | 5848 | fi |
ab22c1fa CF |
5849 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 |
5850 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } | |
5851 | ||
5852 | ||
5853 | ||
bf3b7cd3 JD |
5854 | cat >>confdefs.h <<_ACEOF |
5855 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5856 | _ACEOF | |
5857 | ||
5858 | ||
ab22c1fa CF |
5859 | { echo "$as_me:$LINENO: checking for long long" >&5 |
5860 | echo $ECHO_N "checking for long long... $ECHO_C" >&6; } | |
5ec1c5e6 KC |
5861 | if test "${ac_cv_type_long_long+set}" = set; then |
5862 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5863 | else | |
5864 | cat >conftest.$ac_ext <<_ACEOF | |
5865 | /* confdefs.h. */ | |
5866 | _ACEOF | |
5867 | cat confdefs.h >>conftest.$ac_ext | |
5868 | cat >>conftest.$ac_ext <<_ACEOF | |
5869 | /* end confdefs.h. */ | |
5870 | $ac_includes_default | |
ab22c1fa | 5871 | typedef long long ac__type_new_; |
5ec1c5e6 KC |
5872 | int |
5873 | main () | |
5874 | { | |
ab22c1fa | 5875 | if ((ac__type_new_ *) 0) |
5ec1c5e6 | 5876 | return 0; |
ab22c1fa | 5877 | if (sizeof (ac__type_new_)) |
5ec1c5e6 KC |
5878 | return 0; |
5879 | ; | |
5880 | return 0; | |
5881 | } | |
5882 | _ACEOF | |
5883 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5884 | if { (ac_try="$ac_compile" |
5885 | case "(($ac_try" in | |
5886 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5887 | *) ac_try_echo=$ac_try;; | |
5888 | esac | |
5889 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5890 | (eval "$ac_compile") 2>conftest.er1 | |
5ec1c5e6 KC |
5891 | ac_status=$? |
5892 | grep -v '^ *+' conftest.er1 >conftest.err | |
5893 | rm -f conftest.er1 | |
5894 | cat conftest.err >&5 | |
5895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5896 | (exit $ac_status); } && { |
5897 | test -z "$ac_c_werror_flag" || | |
5898 | test ! -s conftest.err | |
5899 | } && test -s conftest.$ac_objext; then | |
5ec1c5e6 KC |
5900 | ac_cv_type_long_long=yes |
5901 | else | |
5902 | echo "$as_me: failed program was:" >&5 | |
5903 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5904 | ||
ab22c1fa | 5905 | ac_cv_type_long_long=no |
5ec1c5e6 | 5906 | fi |
ab22c1fa CF |
5907 | |
5908 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ec1c5e6 | 5909 | fi |
ab22c1fa CF |
5910 | { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 |
5911 | echo "${ECHO_T}$ac_cv_type_long_long" >&6; } | |
5ec1c5e6 KC |
5912 | if test $ac_cv_type_long_long = yes; then |
5913 | ||
5914 | cat >>confdefs.h <<_ACEOF | |
5915 | #define HAVE_LONG_LONG 1 | |
5916 | _ACEOF | |
5917 | ||
ab22c1fa CF |
5918 | { echo "$as_me:$LINENO: checking for long long" >&5 |
5919 | echo $ECHO_N "checking for long long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5920 | if test "${ac_cv_type_long_long+set}" = set; then |
5921 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5922 | else | |
5923 | cat >conftest.$ac_ext <<_ACEOF | |
5924 | /* confdefs.h. */ | |
5925 | _ACEOF | |
5926 | cat confdefs.h >>conftest.$ac_ext | |
5927 | cat >>conftest.$ac_ext <<_ACEOF | |
5928 | /* end confdefs.h. */ | |
5929 | $ac_includes_default | |
ab22c1fa | 5930 | typedef long long ac__type_new_; |
bf3b7cd3 JD |
5931 | int |
5932 | main () | |
5933 | { | |
ab22c1fa | 5934 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 5935 | return 0; |
ab22c1fa | 5936 | if (sizeof (ac__type_new_)) |
bf3b7cd3 JD |
5937 | return 0; |
5938 | ; | |
5939 | return 0; | |
5940 | } | |
5941 | _ACEOF | |
5942 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
5943 | if { (ac_try="$ac_compile" |
5944 | case "(($ac_try" in | |
5945 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5946 | *) ac_try_echo=$ac_try;; | |
5947 | esac | |
5948 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
5949 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
5950 | ac_status=$? |
5951 | grep -v '^ *+' conftest.er1 >conftest.err | |
5952 | rm -f conftest.er1 | |
5953 | cat conftest.err >&5 | |
5954 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
5955 | (exit $ac_status); } && { |
5956 | test -z "$ac_c_werror_flag" || | |
5957 | test ! -s conftest.err | |
5958 | } && test -s conftest.$ac_objext; then | |
a3bba767 JJ |
5959 | ac_cv_type_long_long=yes |
5960 | else | |
bf3b7cd3 JD |
5961 | echo "$as_me: failed program was:" >&5 |
5962 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5963 | ||
ab22c1fa | 5964 | ac_cv_type_long_long=no |
bf3b7cd3 | 5965 | fi |
ab22c1fa CF |
5966 | |
5967 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 5968 | fi |
ab22c1fa CF |
5969 | { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 |
5970 | echo "${ECHO_T}$ac_cv_type_long_long" >&6; } | |
bf3b7cd3 | 5971 | |
ab22c1fa CF |
5972 | # The cast to long int works around a bug in the HP C Compiler |
5973 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5974 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5975 | # This bug is HP SR number 8606223364. | |
5976 | { echo "$as_me:$LINENO: checking size of long long" >&5 | |
5977 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
5978 | if test "${ac_cv_sizeof_long_long+set}" = set; then |
5979 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5980 | else | |
bf3b7cd3 JD |
5981 | if test "$cross_compiling" = yes; then |
5982 | # Depending upon the size, compute the lo and hi bounds. | |
5983 | cat >conftest.$ac_ext <<_ACEOF | |
5984 | /* confdefs.h. */ | |
5985 | _ACEOF | |
5986 | cat confdefs.h >>conftest.$ac_ext | |
5987 | cat >>conftest.$ac_ext <<_ACEOF | |
5988 | /* end confdefs.h. */ | |
5989 | $ac_includes_default | |
ab22c1fa | 5990 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
5991 | int |
5992 | main () | |
5993 | { | |
ab22c1fa | 5994 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
5995 | test_array [0] = 0 |
5996 | ||
5997 | ; | |
5998 | return 0; | |
5999 | } | |
6000 | _ACEOF | |
6001 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6002 | if { (ac_try="$ac_compile" |
6003 | case "(($ac_try" in | |
6004 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6005 | *) ac_try_echo=$ac_try;; | |
6006 | esac | |
6007 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6008 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6009 | ac_status=$? |
6010 | grep -v '^ *+' conftest.er1 >conftest.err | |
6011 | rm -f conftest.er1 | |
6012 | cat conftest.err >&5 | |
6013 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6014 | (exit $ac_status); } && { |
6015 | test -z "$ac_c_werror_flag" || | |
6016 | test ! -s conftest.err | |
6017 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6018 | ac_lo=0 ac_mid=0 |
6019 | while :; do | |
6020 | cat >conftest.$ac_ext <<_ACEOF | |
6021 | /* confdefs.h. */ | |
6022 | _ACEOF | |
6023 | cat confdefs.h >>conftest.$ac_ext | |
6024 | cat >>conftest.$ac_ext <<_ACEOF | |
6025 | /* end confdefs.h. */ | |
6026 | $ac_includes_default | |
ab22c1fa | 6027 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6028 | int |
6029 | main () | |
6030 | { | |
ab22c1fa | 6031 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6032 | test_array [0] = 0 |
6033 | ||
6034 | ; | |
6035 | return 0; | |
6036 | } | |
6037 | _ACEOF | |
6038 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6039 | if { (ac_try="$ac_compile" |
6040 | case "(($ac_try" in | |
6041 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6042 | *) ac_try_echo=$ac_try;; | |
6043 | esac | |
6044 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6045 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6046 | ac_status=$? |
6047 | grep -v '^ *+' conftest.er1 >conftest.err | |
6048 | rm -f conftest.er1 | |
6049 | cat conftest.err >&5 | |
6050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6051 | (exit $ac_status); } && { |
6052 | test -z "$ac_c_werror_flag" || | |
6053 | test ! -s conftest.err | |
6054 | } && test -s conftest.$ac_objext; then | |
8b1f719a | 6055 | ac_hi=$ac_mid; break |
bf3b7cd3 JD |
6056 | else |
6057 | echo "$as_me: failed program was:" >&5 | |
6058 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6059 | ||
ab22c1fa CF |
6060 | ac_lo=`expr $ac_mid + 1` |
6061 | if test $ac_lo -le $ac_mid; then | |
6062 | ac_lo= ac_hi= | |
6063 | break | |
6064 | fi | |
6065 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
8b1f719a | 6066 | fi |
ab22c1fa CF |
6067 | |
6068 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8b1f719a PB |
6069 | done |
6070 | else | |
6071 | echo "$as_me: failed program was:" >&5 | |
6072 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6073 | ||
ab22c1fa | 6074 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
6075 | /* confdefs.h. */ |
6076 | _ACEOF | |
6077 | cat confdefs.h >>conftest.$ac_ext | |
6078 | cat >>conftest.$ac_ext <<_ACEOF | |
6079 | /* end confdefs.h. */ | |
6080 | $ac_includes_default | |
ab22c1fa | 6081 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6082 | int |
6083 | main () | |
6084 | { | |
ab22c1fa | 6085 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
6086 | test_array [0] = 0 |
6087 | ||
6088 | ; | |
6089 | return 0; | |
6090 | } | |
6091 | _ACEOF | |
6092 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6093 | if { (ac_try="$ac_compile" |
6094 | case "(($ac_try" in | |
6095 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6096 | *) ac_try_echo=$ac_try;; | |
6097 | esac | |
6098 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6099 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6100 | ac_status=$? |
6101 | grep -v '^ *+' conftest.er1 >conftest.err | |
6102 | rm -f conftest.er1 | |
6103 | cat conftest.err >&5 | |
6104 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6105 | (exit $ac_status); } && { |
6106 | test -z "$ac_c_werror_flag" || | |
6107 | test ! -s conftest.err | |
6108 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6109 | ac_hi=-1 ac_mid=-1 |
6110 | while :; do | |
6111 | cat >conftest.$ac_ext <<_ACEOF | |
6112 | /* confdefs.h. */ | |
6113 | _ACEOF | |
6114 | cat confdefs.h >>conftest.$ac_ext | |
6115 | cat >>conftest.$ac_ext <<_ACEOF | |
6116 | /* end confdefs.h. */ | |
6117 | $ac_includes_default | |
ab22c1fa | 6118 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6119 | int |
6120 | main () | |
6121 | { | |
ab22c1fa | 6122 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
6123 | test_array [0] = 0 |
6124 | ||
6125 | ; | |
6126 | return 0; | |
6127 | } | |
6128 | _ACEOF | |
6129 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6130 | if { (ac_try="$ac_compile" |
6131 | case "(($ac_try" in | |
6132 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6133 | *) ac_try_echo=$ac_try;; | |
6134 | esac | |
6135 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6136 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6137 | ac_status=$? |
6138 | grep -v '^ *+' conftest.er1 >conftest.err | |
6139 | rm -f conftest.er1 | |
6140 | cat conftest.err >&5 | |
6141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6142 | (exit $ac_status); } && { |
6143 | test -z "$ac_c_werror_flag" || | |
6144 | test ! -s conftest.err | |
6145 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6146 | ac_lo=$ac_mid; break |
6147 | else | |
6148 | echo "$as_me: failed program was:" >&5 | |
6149 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6150 | ||
ab22c1fa CF |
6151 | ac_hi=`expr '(' $ac_mid ')' - 1` |
6152 | if test $ac_mid -le $ac_hi; then | |
6153 | ac_lo= ac_hi= | |
6154 | break | |
6155 | fi | |
6156 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 6157 | fi |
ab22c1fa CF |
6158 | |
6159 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6160 | done |
6161 | else | |
6162 | echo "$as_me: failed program was:" >&5 | |
6163 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6164 | ||
ab22c1fa | 6165 | ac_lo= ac_hi= |
bf3b7cd3 | 6166 | fi |
ab22c1fa CF |
6167 | |
6168 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 6169 | fi |
ab22c1fa CF |
6170 | |
6171 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6172 | # Binary search between lo and hi bounds. |
6173 | while test "x$ac_lo" != "x$ac_hi"; do | |
6174 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
6175 | cat >conftest.$ac_ext <<_ACEOF | |
6176 | /* confdefs.h. */ | |
6177 | _ACEOF | |
6178 | cat confdefs.h >>conftest.$ac_ext | |
6179 | cat >>conftest.$ac_ext <<_ACEOF | |
6180 | /* end confdefs.h. */ | |
6181 | $ac_includes_default | |
ab22c1fa | 6182 | typedef long long ac__type_sizeof_; |
bf3b7cd3 JD |
6183 | int |
6184 | main () | |
6185 | { | |
ab22c1fa | 6186 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6187 | test_array [0] = 0 |
6188 | ||
6189 | ; | |
6190 | return 0; | |
6191 | } | |
6192 | _ACEOF | |
6193 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6194 | if { (ac_try="$ac_compile" |
6195 | case "(($ac_try" in | |
6196 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6197 | *) ac_try_echo=$ac_try;; | |
6198 | esac | |
6199 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6200 | (eval "$ac_compile") 2>conftest.er1 | |
bf3b7cd3 JD |
6201 | ac_status=$? |
6202 | grep -v '^ *+' conftest.er1 >conftest.err | |
6203 | rm -f conftest.er1 | |
6204 | cat conftest.err >&5 | |
6205 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6206 | (exit $ac_status); } && { |
6207 | test -z "$ac_c_werror_flag" || | |
6208 | test ! -s conftest.err | |
6209 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6210 | ac_hi=$ac_mid |
6211 | else | |
6212 | echo "$as_me: failed program was:" >&5 | |
6213 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6214 | ||
ab22c1fa | 6215 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 6216 | fi |
ab22c1fa CF |
6217 | |
6218 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6219 | done |
6220 | case $ac_lo in | |
6221 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
ab22c1fa CF |
6222 | '') if test "$ac_cv_type_long_long" = yes; then |
6223 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) | |
bf3b7cd3 | 6224 | See \`config.log' for more details." >&5 |
ab22c1fa | 6225 | echo "$as_me: error: cannot compute sizeof (long long) |
bf3b7cd3 | 6226 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
6227 | { (exit 77); exit 77; }; } |
6228 | else | |
6229 | ac_cv_sizeof_long_long=0 | |
6230 | fi ;; | |
bf3b7cd3 | 6231 | esac |
bf3b7cd3 JD |
6232 | else |
6233 | cat >conftest.$ac_ext <<_ACEOF | |
6234 | /* confdefs.h. */ | |
6235 | _ACEOF | |
6236 | cat confdefs.h >>conftest.$ac_ext | |
6237 | cat >>conftest.$ac_ext <<_ACEOF | |
6238 | /* end confdefs.h. */ | |
6239 | $ac_includes_default | |
ab22c1fa CF |
6240 | typedef long long ac__type_sizeof_; |
6241 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
6242 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
6243 | #include <stdio.h> |
6244 | #include <stdlib.h> | |
6245 | int | |
6246 | main () | |
6247 | { | |
6248 | ||
6249 | FILE *f = fopen ("conftest.val", "w"); | |
6250 | if (! f) | |
ab22c1fa CF |
6251 | return 1; |
6252 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 6253 | { |
ab22c1fa CF |
6254 | long int i = longval (); |
6255 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6256 | return 1; | |
bf3b7cd3 JD |
6257 | fprintf (f, "%ld\n", i); |
6258 | } | |
6259 | else | |
6260 | { | |
ab22c1fa CF |
6261 | unsigned long int i = ulongval (); |
6262 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6263 | return 1; | |
bf3b7cd3 JD |
6264 | fprintf (f, "%lu\n", i); |
6265 | } | |
ab22c1fa | 6266 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
6267 | |
6268 | ; | |
6269 | return 0; | |
6270 | } | |
6271 | _ACEOF | |
6272 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
6273 | if { (ac_try="$ac_link" |
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_link") 2>&5 | |
bf3b7cd3 JD |
6280 | ac_status=$? |
6281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6282 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
6283 | { (case "(($ac_try" in |
6284 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6285 | *) ac_try_echo=$ac_try;; | |
6286 | esac | |
6287 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6288 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
6289 | ac_status=$? |
6290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6291 | (exit $ac_status); }; }; then | |
6292 | ac_cv_sizeof_long_long=`cat conftest.val` | |
6293 | else | |
6294 | echo "$as_me: program exited with status $ac_status" >&5 | |
6295 | echo "$as_me: failed program was:" >&5 | |
6296 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6297 | ||
6298 | ( exit $ac_status ) | |
ab22c1fa CF |
6299 | if test "$ac_cv_type_long_long" = yes; then |
6300 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) | |
bf3b7cd3 | 6301 | See \`config.log' for more details." >&5 |
ab22c1fa | 6302 | echo "$as_me: error: cannot compute sizeof (long long) |
bf3b7cd3 | 6303 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
6304 | { (exit 77); exit 77; }; } |
6305 | else | |
6306 | ac_cv_sizeof_long_long=0 | |
6307 | fi | |
bf3b7cd3 | 6308 | fi |
ab22c1fa | 6309 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
6310 | fi |
6311 | rm -f conftest.val | |
a3bba767 | 6312 | fi |
ab22c1fa CF |
6313 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 |
6314 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } | |
6315 | ||
6316 | ||
6317 | ||
bf3b7cd3 JD |
6318 | cat >>confdefs.h <<_ACEOF |
6319 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
6320 | _ACEOF | |
6321 | ||
6322 | ||
6323 | fi | |
5ec1c5e6 | 6324 | |
ab22c1fa CF |
6325 | { echo "$as_me:$LINENO: checking for __int64" >&5 |
6326 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6; } | |
5ec1c5e6 KC |
6327 | if test "${ac_cv_type___int64+set}" = set; then |
6328 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6329 | else | |
6330 | cat >conftest.$ac_ext <<_ACEOF | |
6331 | /* confdefs.h. */ | |
6332 | _ACEOF | |
6333 | cat confdefs.h >>conftest.$ac_ext | |
6334 | cat >>conftest.$ac_ext <<_ACEOF | |
6335 | /* end confdefs.h. */ | |
6336 | $ac_includes_default | |
ab22c1fa | 6337 | typedef __int64 ac__type_new_; |
5ec1c5e6 KC |
6338 | int |
6339 | main () | |
6340 | { | |
ab22c1fa | 6341 | if ((ac__type_new_ *) 0) |
5ec1c5e6 | 6342 | return 0; |
ab22c1fa | 6343 | if (sizeof (ac__type_new_)) |
5ec1c5e6 KC |
6344 | return 0; |
6345 | ; | |
6346 | return 0; | |
6347 | } | |
6348 | _ACEOF | |
6349 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6350 | if { (ac_try="$ac_compile" |
6351 | case "(($ac_try" in | |
6352 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6353 | *) ac_try_echo=$ac_try;; | |
6354 | esac | |
6355 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6356 | (eval "$ac_compile") 2>conftest.er1 | |
5ec1c5e6 KC |
6357 | ac_status=$? |
6358 | grep -v '^ *+' conftest.er1 >conftest.err | |
6359 | rm -f conftest.er1 | |
6360 | cat conftest.err >&5 | |
6361 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6362 | (exit $ac_status); } && { |
6363 | test -z "$ac_c_werror_flag" || | |
6364 | test ! -s conftest.err | |
6365 | } && test -s conftest.$ac_objext; then | |
5ec1c5e6 KC |
6366 | ac_cv_type___int64=yes |
6367 | else | |
6368 | echo "$as_me: failed program was:" >&5 | |
6369 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6370 | ||
ab22c1fa | 6371 | ac_cv_type___int64=no |
5ec1c5e6 | 6372 | fi |
ab22c1fa CF |
6373 | |
6374 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ec1c5e6 | 6375 | fi |
ab22c1fa CF |
6376 | { echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
6377 | echo "${ECHO_T}$ac_cv_type___int64" >&6; } | |
5ec1c5e6 KC |
6378 | if test $ac_cv_type___int64 = yes; then |
6379 | ||
6380 | cat >>confdefs.h <<_ACEOF | |
6381 | #define HAVE___INT64 1 | |
6382 | _ACEOF | |
6383 | ||
ab22c1fa CF |
6384 | { echo "$as_me:$LINENO: checking for __int64" >&5 |
6385 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6; } | |
bf3b7cd3 JD |
6386 | if test "${ac_cv_type___int64+set}" = set; then |
6387 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6388 | else | |
ba479fd2 | 6389 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6390 | /* confdefs.h. */ |
6391 | _ACEOF | |
6392 | cat confdefs.h >>conftest.$ac_ext | |
6393 | cat >>conftest.$ac_ext <<_ACEOF | |
6394 | /* end confdefs.h. */ | |
bf3b7cd3 | 6395 | $ac_includes_default |
ab22c1fa | 6396 | typedef __int64 ac__type_new_; |
ba479fd2 NN |
6397 | int |
6398 | main () | |
6399 | { | |
ab22c1fa | 6400 | if ((ac__type_new_ *) 0) |
bf3b7cd3 | 6401 | return 0; |
ab22c1fa | 6402 | if (sizeof (ac__type_new_)) |
bf3b7cd3 | 6403 | return 0; |
ba479fd2 NN |
6404 | ; |
6405 | return 0; | |
6406 | } | |
6407 | _ACEOF | |
6408 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6409 | if { (ac_try="$ac_compile" |
6410 | case "(($ac_try" in | |
6411 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6412 | *) ac_try_echo=$ac_try;; | |
6413 | esac | |
6414 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6415 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6416 | ac_status=$? |
86da66b5 HPN |
6417 | grep -v '^ *+' conftest.er1 >conftest.err |
6418 | rm -f conftest.er1 | |
6419 | cat conftest.err >&5 | |
ba479fd2 | 6420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
6421 | (exit $ac_status); } && { |
6422 | test -z "$ac_c_werror_flag" || | |
6423 | test ! -s conftest.err | |
6424 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6425 | ac_cv_type___int64=yes |
75b6f3fd | 6426 | else |
ba479fd2 NN |
6427 | echo "$as_me: failed program was:" >&5 |
6428 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6429 | ||
ab22c1fa | 6430 | ac_cv_type___int64=no |
75b6f3fd | 6431 | fi |
ab22c1fa CF |
6432 | |
6433 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
75b6f3fd | 6434 | fi |
ab22c1fa CF |
6435 | { echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
6436 | echo "${ECHO_T}$ac_cv_type___int64" >&6; } | |
75b6f3fd | 6437 | |
ab22c1fa CF |
6438 | # The cast to long int works around a bug in the HP C Compiler |
6439 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6440 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6441 | # This bug is HP SR number 8606223364. | |
6442 | { echo "$as_me:$LINENO: checking size of __int64" >&5 | |
6443 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6; } | |
bf3b7cd3 | 6444 | if test "${ac_cv_sizeof___int64+set}" = set; then |
ba479fd2 | 6445 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 6446 | else |
bf3b7cd3 JD |
6447 | if test "$cross_compiling" = yes; then |
6448 | # Depending upon the size, compute the lo and hi bounds. | |
6449 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6450 | /* confdefs.h. */ |
6451 | _ACEOF | |
6452 | cat confdefs.h >>conftest.$ac_ext | |
6453 | cat >>conftest.$ac_ext <<_ACEOF | |
6454 | /* end confdefs.h. */ | |
bf3b7cd3 | 6455 | $ac_includes_default |
ab22c1fa | 6456 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6457 | int |
6458 | main () | |
6459 | { | |
ab22c1fa | 6460 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; |
bf3b7cd3 JD |
6461 | test_array [0] = 0 |
6462 | ||
ba479fd2 NN |
6463 | ; |
6464 | return 0; | |
6465 | } | |
6466 | _ACEOF | |
6467 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6468 | if { (ac_try="$ac_compile" |
6469 | case "(($ac_try" in | |
6470 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6471 | *) ac_try_echo=$ac_try;; | |
6472 | esac | |
6473 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6474 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6475 | ac_status=$? |
86da66b5 HPN |
6476 | grep -v '^ *+' conftest.er1 >conftest.err |
6477 | rm -f conftest.er1 | |
6478 | cat conftest.err >&5 | |
ba479fd2 | 6479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
6480 | (exit $ac_status); } && { |
6481 | test -z "$ac_c_werror_flag" || | |
6482 | test ! -s conftest.err | |
6483 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6484 | ac_lo=0 ac_mid=0 |
6485 | while :; do | |
6486 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6487 | /* confdefs.h. */ |
6488 | _ACEOF | |
6489 | cat confdefs.h >>conftest.$ac_ext | |
6490 | cat >>conftest.$ac_ext <<_ACEOF | |
6491 | /* end confdefs.h. */ | |
bf3b7cd3 | 6492 | $ac_includes_default |
ab22c1fa | 6493 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6494 | int |
6495 | main () | |
6496 | { | |
ab22c1fa | 6497 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6498 | test_array [0] = 0 |
6499 | ||
ba479fd2 NN |
6500 | ; |
6501 | return 0; | |
6502 | } | |
6503 | _ACEOF | |
6504 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6505 | if { (ac_try="$ac_compile" |
6506 | case "(($ac_try" in | |
6507 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6508 | *) ac_try_echo=$ac_try;; | |
6509 | esac | |
6510 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6511 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6512 | ac_status=$? |
86da66b5 HPN |
6513 | grep -v '^ *+' conftest.er1 >conftest.err |
6514 | rm -f conftest.er1 | |
6515 | cat conftest.err >&5 | |
ba479fd2 | 6516 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
6517 | (exit $ac_status); } && { |
6518 | test -z "$ac_c_werror_flag" || | |
6519 | test ! -s conftest.err | |
6520 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6521 | ac_hi=$ac_mid; break |
75e93faa | 6522 | else |
ba479fd2 NN |
6523 | echo "$as_me: failed program was:" >&5 |
6524 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6525 | ||
ab22c1fa CF |
6526 | ac_lo=`expr $ac_mid + 1` |
6527 | if test $ac_lo -le $ac_mid; then | |
6528 | ac_lo= ac_hi= | |
6529 | break | |
6530 | fi | |
6531 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 6532 | fi |
ab22c1fa CF |
6533 | |
6534 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 | 6535 | done |
75e93faa | 6536 | else |
bf3b7cd3 JD |
6537 | echo "$as_me: failed program was:" >&5 |
6538 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6539 | ||
ab22c1fa | 6540 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6541 | /* confdefs.h. */ |
6542 | _ACEOF | |
6543 | cat confdefs.h >>conftest.$ac_ext | |
6544 | cat >>conftest.$ac_ext <<_ACEOF | |
6545 | /* end confdefs.h. */ | |
bf3b7cd3 | 6546 | $ac_includes_default |
ab22c1fa | 6547 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6548 | int |
6549 | main () | |
6550 | { | |
ab22c1fa | 6551 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; |
bf3b7cd3 JD |
6552 | test_array [0] = 0 |
6553 | ||
ba479fd2 NN |
6554 | ; |
6555 | return 0; | |
6556 | } | |
6557 | _ACEOF | |
6558 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6559 | if { (ac_try="$ac_compile" |
6560 | case "(($ac_try" in | |
6561 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6562 | *) ac_try_echo=$ac_try;; | |
6563 | esac | |
6564 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6565 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6566 | ac_status=$? |
86da66b5 HPN |
6567 | grep -v '^ *+' conftest.er1 >conftest.err |
6568 | rm -f conftest.er1 | |
6569 | cat conftest.err >&5 | |
ba479fd2 | 6570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
6571 | (exit $ac_status); } && { |
6572 | test -z "$ac_c_werror_flag" || | |
6573 | test ! -s conftest.err | |
6574 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 JD |
6575 | ac_hi=-1 ac_mid=-1 |
6576 | while :; do | |
6577 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6578 | /* confdefs.h. */ |
6579 | _ACEOF | |
6580 | cat confdefs.h >>conftest.$ac_ext | |
6581 | cat >>conftest.$ac_ext <<_ACEOF | |
6582 | /* end confdefs.h. */ | |
bf3b7cd3 | 6583 | $ac_includes_default |
ab22c1fa | 6584 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6585 | int |
6586 | main () | |
6587 | { | |
ab22c1fa | 6588 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; |
bf3b7cd3 JD |
6589 | test_array [0] = 0 |
6590 | ||
ba479fd2 NN |
6591 | ; |
6592 | return 0; | |
6593 | } | |
6594 | _ACEOF | |
6595 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6596 | if { (ac_try="$ac_compile" |
6597 | case "(($ac_try" in | |
6598 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6599 | *) ac_try_echo=$ac_try;; | |
6600 | esac | |
6601 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6602 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6603 | ac_status=$? |
86da66b5 HPN |
6604 | grep -v '^ *+' conftest.er1 >conftest.err |
6605 | rm -f conftest.er1 | |
6606 | cat conftest.err >&5 | |
ba479fd2 | 6607 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
6608 | (exit $ac_status); } && { |
6609 | test -z "$ac_c_werror_flag" || | |
6610 | test ! -s conftest.err | |
6611 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6612 | ac_lo=$ac_mid; break |
04cabffc | 6613 | else |
ba479fd2 NN |
6614 | echo "$as_me: failed program was:" >&5 |
6615 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6616 | ||
ab22c1fa CF |
6617 | ac_hi=`expr '(' $ac_mid ')' - 1` |
6618 | if test $ac_mid -le $ac_hi; then | |
6619 | ac_lo= ac_hi= | |
6620 | break | |
6621 | fi | |
6622 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 6623 | fi |
ab22c1fa CF |
6624 | |
6625 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6626 | done |
6627 | else | |
6628 | echo "$as_me: failed program was:" >&5 | |
6629 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 6630 | |
ab22c1fa | 6631 | ac_lo= ac_hi= |
414d23ae | 6632 | fi |
ab22c1fa CF |
6633 | |
6634 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
414d23ae | 6635 | fi |
ab22c1fa CF |
6636 | |
6637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6638 | # Binary search between lo and hi bounds. |
6639 | while test "x$ac_lo" != "x$ac_hi"; do | |
6640 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 6641 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6642 | /* confdefs.h. */ |
6643 | _ACEOF | |
6644 | cat confdefs.h >>conftest.$ac_ext | |
6645 | cat >>conftest.$ac_ext <<_ACEOF | |
6646 | /* end confdefs.h. */ | |
bf3b7cd3 | 6647 | $ac_includes_default |
ab22c1fa | 6648 | typedef __int64 ac__type_sizeof_; |
ba479fd2 NN |
6649 | int |
6650 | main () | |
6651 | { | |
ab22c1fa | 6652 | static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; |
bf3b7cd3 JD |
6653 | test_array [0] = 0 |
6654 | ||
ba479fd2 NN |
6655 | ; |
6656 | return 0; | |
6657 | } | |
6658 | _ACEOF | |
6659 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6660 | if { (ac_try="$ac_compile" |
6661 | case "(($ac_try" in | |
6662 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6663 | *) ac_try_echo=$ac_try;; | |
6664 | esac | |
6665 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6666 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 6667 | ac_status=$? |
86da66b5 HPN |
6668 | grep -v '^ *+' conftest.er1 >conftest.err |
6669 | rm -f conftest.er1 | |
6670 | cat conftest.err >&5 | |
ba479fd2 | 6671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
6672 | (exit $ac_status); } && { |
6673 | test -z "$ac_c_werror_flag" || | |
6674 | test ! -s conftest.err | |
6675 | } && test -s conftest.$ac_objext; then | |
bf3b7cd3 | 6676 | ac_hi=$ac_mid |
75e93faa | 6677 | else |
ba479fd2 NN |
6678 | echo "$as_me: failed program was:" >&5 |
6679 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6680 | ||
ab22c1fa | 6681 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 6682 | fi |
ab22c1fa CF |
6683 | |
6684 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
414d23ae | 6685 | done |
bf3b7cd3 JD |
6686 | case $ac_lo in |
6687 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
ab22c1fa CF |
6688 | '') if test "$ac_cv_type___int64" = yes; then |
6689 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) | |
bf3b7cd3 | 6690 | See \`config.log' for more details." >&5 |
ab22c1fa | 6691 | echo "$as_me: error: cannot compute sizeof (__int64) |
bf3b7cd3 | 6692 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
6693 | { (exit 77); exit 77; }; } |
6694 | else | |
6695 | ac_cv_sizeof___int64=0 | |
6696 | fi ;; | |
bf3b7cd3 | 6697 | esac |
bf3b7cd3 JD |
6698 | else |
6699 | cat >conftest.$ac_ext <<_ACEOF | |
6700 | /* confdefs.h. */ | |
6701 | _ACEOF | |
6702 | cat confdefs.h >>conftest.$ac_ext | |
6703 | cat >>conftest.$ac_ext <<_ACEOF | |
6704 | /* end confdefs.h. */ | |
6705 | $ac_includes_default | |
ab22c1fa CF |
6706 | typedef __int64 ac__type_sizeof_; |
6707 | static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
6708 | static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } | |
bf3b7cd3 JD |
6709 | #include <stdio.h> |
6710 | #include <stdlib.h> | |
6711 | int | |
6712 | main () | |
6713 | { | |
414d23ae | 6714 | |
bf3b7cd3 JD |
6715 | FILE *f = fopen ("conftest.val", "w"); |
6716 | if (! f) | |
ab22c1fa CF |
6717 | return 1; |
6718 | if (((long int) (sizeof (ac__type_sizeof_))) < 0) | |
bf3b7cd3 | 6719 | { |
ab22c1fa CF |
6720 | long int i = longval (); |
6721 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6722 | return 1; | |
bf3b7cd3 JD |
6723 | fprintf (f, "%ld\n", i); |
6724 | } | |
6725 | else | |
6726 | { | |
ab22c1fa CF |
6727 | unsigned long int i = ulongval (); |
6728 | if (i != ((long int) (sizeof (ac__type_sizeof_)))) | |
6729 | return 1; | |
bf3b7cd3 JD |
6730 | fprintf (f, "%lu\n", i); |
6731 | } | |
ab22c1fa | 6732 | return ferror (f) || fclose (f) != 0; |
bf3b7cd3 JD |
6733 | |
6734 | ; | |
6735 | return 0; | |
6736 | } | |
6737 | _ACEOF | |
6738 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
6739 | if { (ac_try="$ac_link" |
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_link") 2>&5 | |
bf3b7cd3 JD |
6746 | ac_status=$? |
6747 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6748 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
6749 | { (case "(($ac_try" in |
6750 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6751 | *) ac_try_echo=$ac_try;; | |
6752 | esac | |
6753 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6754 | (eval "$ac_try") 2>&5 | |
bf3b7cd3 JD |
6755 | ac_status=$? |
6756 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6757 | (exit $ac_status); }; }; then | |
6758 | ac_cv_sizeof___int64=`cat conftest.val` | |
6759 | else | |
6760 | echo "$as_me: program exited with status $ac_status" >&5 | |
6761 | echo "$as_me: failed program was:" >&5 | |
6762 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6763 | |
bf3b7cd3 | 6764 | ( exit $ac_status ) |
ab22c1fa CF |
6765 | if test "$ac_cv_type___int64" = yes; then |
6766 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) | |
bf3b7cd3 | 6767 | See \`config.log' for more details." >&5 |
ab22c1fa | 6768 | echo "$as_me: error: cannot compute sizeof (__int64) |
bf3b7cd3 | 6769 | See \`config.log' for more details." >&2;} |
ab22c1fa CF |
6770 | { (exit 77); exit 77; }; } |
6771 | else | |
6772 | ac_cv_sizeof___int64=0 | |
6773 | fi | |
bf3b7cd3 | 6774 | fi |
ab22c1fa | 6775 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
6776 | fi |
6777 | rm -f conftest.val | |
bf3b7cd3 | 6778 | fi |
ab22c1fa CF |
6779 | { echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
6780 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6; } | |
6781 | ||
6782 | ||
6783 | ||
ba479fd2 | 6784 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6785 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6786 | _ACEOF |
414d23ae | 6787 | |
cafe096b | 6788 | |
414d23ae HPN |
6789 | fi |
6790 | ||
5ec1c5e6 | 6791 | |
34a86c2b NN |
6792 | # --------------------- |
6793 | # Warnings and checking | |
6794 | # --------------------- | |
6795 | ||
b5472e1d NN |
6796 | # Check $CC warning features (if it's GCC). |
6797 | # We want to use -pedantic, but we don't want warnings about | |
6798 | # * 'long long' | |
6799 | # * variadic macros | |
89a42ac8 | 6800 | # * overlong strings |
b5472e1d NN |
6801 | # So, we only use -pedantic if we can disable those warnings. |
6802 | ||
3bbd5a19 PB |
6803 | loose_warn= |
6804 | save_CFLAGS="$CFLAGS" | |
6805 | for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ | |
6806 | -Wmissing-prototypes; do | |
6807 | as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
6808 | ||
ab22c1fa CF |
6809 | { echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 |
6810 | echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6; } | |
6811 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then | |
b5472e1d NN |
6812 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
6813 | else | |
3bbd5a19 PB |
6814 | CFLAGS="$option" |
6815 | cat >conftest.$ac_ext <<_ACEOF | |
b5472e1d NN |
6816 | /* confdefs.h. */ |
6817 | _ACEOF | |
6818 | cat confdefs.h >>conftest.$ac_ext | |
6819 | cat >>conftest.$ac_ext <<_ACEOF | |
6820 | /* end confdefs.h. */ | |
6821 | ||
3bbd5a19 PB |
6822 | int |
6823 | main () | |
6824 | { | |
6825 | ||
6826 | ; | |
6827 | return 0; | |
6828 | } | |
b5472e1d NN |
6829 | _ACEOF |
6830 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6831 | if { (ac_try="$ac_compile" |
6832 | case "(($ac_try" in | |
6833 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6834 | *) ac_try_echo=$ac_try;; | |
6835 | esac | |
6836 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6837 | (eval "$ac_compile") 2>conftest.er1 | |
b5472e1d NN |
6838 | ac_status=$? |
6839 | grep -v '^ *+' conftest.er1 >conftest.err | |
6840 | rm -f conftest.er1 | |
6841 | cat conftest.err >&5 | |
6842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6843 | (exit $ac_status); } && { |
6844 | test -z "$ac_c_werror_flag" || | |
6845 | test ! -s conftest.err | |
6846 | } && test -s conftest.$ac_objext; then | |
3bbd5a19 | 6847 | eval "$as_acx_Woption=yes" |
b5472e1d NN |
6848 | else |
6849 | echo "$as_me: failed program was:" >&5 | |
6850 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6851 | ||
ab22c1fa | 6852 | eval "$as_acx_Woption=no" |
b5472e1d | 6853 | fi |
ab22c1fa CF |
6854 | |
6855 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b5472e1d NN |
6856 | |
6857 | fi | |
ab22c1fa CF |
6858 | ac_res=`eval echo '${'$as_acx_Woption'}'` |
6859 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
6860 | echo "${ECHO_T}$ac_res" >&6; } | |
3bbd5a19 PB |
6861 | if test `eval echo '${'$as_acx_Woption'}'` = yes; then |
6862 | loose_warn="$loose_warn${loose_warn:+ }$option" | |
6863 | fi | |
6864 | ||
6865 | done | |
6866 | CFLAGS="$save_CFLAGS" | |
6867 | ||
6868 | cxx_compat_warn= | |
6869 | save_CFLAGS="$CFLAGS" | |
6870 | for option in -Wc++-compat; do | |
6871 | as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
b5472e1d | 6872 | |
ab22c1fa CF |
6873 | { echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 |
6874 | echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6; } | |
6875 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then | |
b5472e1d NN |
6876 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
6877 | else | |
3bbd5a19 PB |
6878 | CFLAGS="$option" |
6879 | cat >conftest.$ac_ext <<_ACEOF | |
b5472e1d NN |
6880 | /* confdefs.h. */ |
6881 | _ACEOF | |
6882 | cat confdefs.h >>conftest.$ac_ext | |
6883 | cat >>conftest.$ac_ext <<_ACEOF | |
6884 | /* end confdefs.h. */ | |
6885 | ||
3bbd5a19 PB |
6886 | int |
6887 | main () | |
6888 | { | |
6889 | ||
6890 | ; | |
6891 | return 0; | |
6892 | } | |
b5472e1d NN |
6893 | _ACEOF |
6894 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6895 | if { (ac_try="$ac_compile" |
6896 | case "(($ac_try" in | |
6897 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6898 | *) ac_try_echo=$ac_try;; | |
6899 | esac | |
6900 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6901 | (eval "$ac_compile") 2>conftest.er1 | |
b5472e1d NN |
6902 | ac_status=$? |
6903 | grep -v '^ *+' conftest.er1 >conftest.err | |
6904 | rm -f conftest.er1 | |
6905 | cat conftest.err >&5 | |
6906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6907 | (exit $ac_status); } && { |
6908 | test -z "$ac_c_werror_flag" || | |
6909 | test ! -s conftest.err | |
6910 | } && test -s conftest.$ac_objext; then | |
3bbd5a19 | 6911 | eval "$as_acx_Woption=yes" |
b5472e1d NN |
6912 | else |
6913 | echo "$as_me: failed program was:" >&5 | |
6914 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6915 | ||
ab22c1fa | 6916 | eval "$as_acx_Woption=no" |
b5472e1d | 6917 | fi |
ab22c1fa CF |
6918 | |
6919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b5472e1d NN |
6920 | |
6921 | fi | |
ab22c1fa CF |
6922 | ac_res=`eval echo '${'$as_acx_Woption'}'` |
6923 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
6924 | echo "${ECHO_T}$ac_res" >&6; } | |
3bbd5a19 PB |
6925 | if test `eval echo '${'$as_acx_Woption'}'` = yes; then |
6926 | cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option" | |
6927 | fi | |
6928 | ||
6929 | done | |
6930 | CFLAGS="$save_CFLAGS" | |
b5472e1d | 6931 | |
3bbd5a19 PB |
6932 | strict_warn= |
6933 | save_CFLAGS="$CFLAGS" | |
6934 | for option in -Wold-style-definition \ | |
6935 | -Wmissing-format-attribute; do | |
6936 | as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
6937 | ||
ab22c1fa CF |
6938 | { echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 |
6939 | echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6; } | |
6940 | if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then | |
89a42ac8 ZW |
6941 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
6942 | else | |
3bbd5a19 PB |
6943 | CFLAGS="$option" |
6944 | cat >conftest.$ac_ext <<_ACEOF | |
89a42ac8 ZW |
6945 | /* confdefs.h. */ |
6946 | _ACEOF | |
6947 | cat confdefs.h >>conftest.$ac_ext | |
6948 | cat >>conftest.$ac_ext <<_ACEOF | |
6949 | /* end confdefs.h. */ | |
6950 | ||
3bbd5a19 PB |
6951 | int |
6952 | main () | |
6953 | { | |
6954 | ||
6955 | ; | |
6956 | return 0; | |
6957 | } | |
89a42ac8 ZW |
6958 | _ACEOF |
6959 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
6960 | if { (ac_try="$ac_compile" |
6961 | case "(($ac_try" in | |
6962 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
6963 | *) ac_try_echo=$ac_try;; | |
6964 | esac | |
6965 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
6966 | (eval "$ac_compile") 2>conftest.er1 | |
89a42ac8 ZW |
6967 | ac_status=$? |
6968 | grep -v '^ *+' conftest.er1 >conftest.err | |
6969 | rm -f conftest.er1 | |
6970 | cat conftest.err >&5 | |
6971 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
6972 | (exit $ac_status); } && { |
6973 | test -z "$ac_c_werror_flag" || | |
6974 | test ! -s conftest.err | |
6975 | } && test -s conftest.$ac_objext; then | |
3bbd5a19 | 6976 | eval "$as_acx_Woption=yes" |
89a42ac8 ZW |
6977 | else |
6978 | echo "$as_me: failed program was:" >&5 | |
6979 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6980 | ||
ab22c1fa | 6981 | eval "$as_acx_Woption=no" |
89a42ac8 | 6982 | fi |
ab22c1fa CF |
6983 | |
6984 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
89a42ac8 ZW |
6985 | |
6986 | fi | |
ab22c1fa CF |
6987 | ac_res=`eval echo '${'$as_acx_Woption'}'` |
6988 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
6989 | echo "${ECHO_T}$ac_res" >&6; } | |
3bbd5a19 PB |
6990 | if test `eval echo '${'$as_acx_Woption'}'` = yes; then |
6991 | strict_warn="$strict_warn${strict_warn:+ }$option" | |
34a86c2b NN |
6992 | fi |
6993 | ||
3bbd5a19 PB |
6994 | done |
6995 | CFLAGS="$save_CFLAGS" | |
6996 | ||
6997 | if test "$GCC" = yes; then | |
ab22c1fa | 6998 | { echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \ |
3bbd5a19 PB |
6999 | -Wno-overlength-strings" >&5 |
7000 | echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \ | |
ab22c1fa | 7001 | -Wno-overlength-strings... $ECHO_C" >&6; } |
3bbd5a19 | 7002 | if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then |
643d3bd2 NN |
7003 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
7004 | else | |
7005 | save_CFLAGS="$CFLAGS" | |
3bbd5a19 PB |
7006 | CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \ |
7007 | -Wno-overlength-strings" | |
7008 | cat >conftest.$ac_ext <<_ACEOF | |
643d3bd2 NN |
7009 | /* confdefs.h. */ |
7010 | _ACEOF | |
7011 | cat confdefs.h >>conftest.$ac_ext | |
7012 | cat >>conftest.$ac_ext <<_ACEOF | |
7013 | /* end confdefs.h. */ | |
7014 | ||
3bbd5a19 PB |
7015 | int |
7016 | main () | |
7017 | { | |
7018 | ||
7019 | ; | |
7020 | return 0; | |
7021 | } | |
643d3bd2 NN |
7022 | _ACEOF |
7023 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
7024 | if { (ac_try="$ac_compile" |
7025 | case "(($ac_try" in | |
7026 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7027 | *) ac_try_echo=$ac_try;; | |
7028 | esac | |
7029 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7030 | (eval "$ac_compile") 2>conftest.er1 | |
643d3bd2 NN |
7031 | ac_status=$? |
7032 | grep -v '^ *+' conftest.er1 >conftest.err | |
7033 | rm -f conftest.er1 | |
7034 | cat conftest.err >&5 | |
7035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
7036 | (exit $ac_status); } && { |
7037 | test -z "$ac_c_werror_flag" || | |
7038 | test ! -s conftest.err | |
7039 | } && test -s conftest.$ac_objext; then | |
3bbd5a19 | 7040 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes |
643d3bd2 NN |
7041 | else |
7042 | echo "$as_me: failed program was:" >&5 | |
7043 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7044 | ||
ab22c1fa | 7045 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no |
643d3bd2 | 7046 | fi |
ab22c1fa CF |
7047 | |
7048 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3bbd5a19 | 7049 | CFLAGS="$save_CFLAGS" |
643d3bd2 | 7050 | fi |
ab22c1fa CF |
7051 | { echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5 |
7052 | echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6; } | |
3bbd5a19 PB |
7053 | if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then |
7054 | strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \ | |
7055 | -Wno-overlength-strings" | |
643d3bd2 NN |
7056 | fi |
7057 | ||
ac0f3f39 | 7058 | |
ac0f3f39 | 7059 | fi |
ac0f3f39 | 7060 | |
ac0f3f39 | 7061 | |
ab22c1fa | 7062 | # Check whether --enable-werror-always was given. |
09a9c095 | 7063 | if test "${enable_werror_always+set}" = set; then |
ab22c1fa | 7064 | enableval=$enable_werror_always; |
09a9c095 NN |
7065 | else |
7066 | enable_werror_always=no | |
ab22c1fa CF |
7067 | fi |
7068 | ||
3bbd5a19 PB |
7069 | if test $enable_werror_always = yes; then |
7070 | strict_warn="$strict_warn${strict_warn:+ }-Werror" | |
373477bb | 7071 | fi |
373477bb | 7072 | |
373477bb GDR |
7073 | |
7074 | ||
7075 | ||
3bbd5a19 PB |
7076 | # The above macros do nothing if the compiler is not GCC. However, the |
7077 | # Makefile has more goo to add other flags, so this variabl is used to | |
7078 | # enables warnings only for GCC. | |
414d23ae HPN |
7079 | warn_cflags= |
7080 | if test "x$GCC" = "xyes"; then | |
7081 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
7082 | fi | |
7083 | ||
7084 | ||
8b1f719a | 7085 | # Enable expensive internal checks |
a1286ef5 ZW |
7086 | is_release= |
7087 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
7088 | is_release=yes | |
7089 | fi | |
a6ccdbab | 7090 | |
ab22c1fa | 7091 | # Check whether --enable-checking was given. |
414d23ae | 7092 | if test "${enable_checking+set}" = set; then |
ab22c1fa | 7093 | enableval=$enable_checking; ac_checking_flags="${enableval}" |
e1bbfc5c NS |
7094 | else |
7095 | ||
7096 | # Determine the default checks. | |
7097 | if test x$is_release = x ; then | |
7098 | ac_checking_flags=yes | |
7099 | else | |
7100 | ac_checking_flags=release | |
7101 | fi | |
ab22c1fa CF |
7102 | fi |
7103 | ||
e1bbfc5c | 7104 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
04c3028a | 7105 | for check in release $ac_checking_flags |
e1bbfc5c NS |
7106 | do |
7107 | case $check in | |
cdce5c16 | 7108 | # these set all the flags to specific states |
0d475361 | 7109 | yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ; |
cdce5c16 NS |
7110 | ac_fold_checking= ; ac_gc_checking=1 ; |
7111 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 7112 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
7e98624c RG |
7113 | ac_tree_checking=1 ; ac_valgrind_checking= ; |
7114 | ac_types_checking= ;; | |
3089f8b5 | 7115 | no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ; |
cdce5c16 NS |
7116 | ac_fold_checking= ; ac_gc_checking= ; |
7117 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 7118 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
7e98624c RG |
7119 | ac_tree_checking= ; ac_valgrind_checking= ; |
7120 | ac_types_checking= ;; | |
3089f8b5 | 7121 | all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ; |
cdce5c16 NS |
7122 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
7123 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
7124 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
7e98624c RG |
7125 | ac_tree_checking=1 ; ac_valgrind_checking= ; |
7126 | ac_types_checking=1 ;; | |
3089f8b5 | 7127 | release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ; |
cdce5c16 NS |
7128 | ac_fold_checking= ; ac_gc_checking= ; |
7129 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
7130 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
7e98624c RG |
7131 | ac_tree_checking= ; ac_valgrind_checking= ; |
7132 | ac_types_checking= ;; | |
cdce5c16 | 7133 | # these enable particular checks |
e1bbfc5c | 7134 | assert) ac_assert_checking=1 ;; |
3089f8b5 | 7135 | df) ac_df_checking=1 ;; |
e1bbfc5c NS |
7136 | fold) ac_fold_checking=1 ;; |
7137 | gc) ac_gc_checking=1 ;; | |
7138 | gcac) ac_gc_always_collect=1 ;; | |
7139 | misc) ac_checking=1 ;; | |
e1bbfc5c | 7140 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 7141 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 7142 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 7143 | tree) ac_tree_checking=1 ;; |
7e98624c | 7144 | types) ac_types_checking=1 ;; |
cdce5c16 | 7145 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 7146 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
7147 | echo "$as_me: error: unknown check category $check" >&2;} |
7148 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
7149 | esac |
7150 | done | |
7151 | IFS="$ac_save_IFS" | |
06c37c96 | 7152 | |
ba479fd2 NN |
7153 | nocommon_flag="" |
7154 | if test x$ac_checking != x ; then | |
7155 | ||
7156 | cat >>confdefs.h <<\_ACEOF | |
7157 | #define ENABLE_CHECKING 1 | |
7158 | _ACEOF | |
7159 | ||
7160 | nocommon_flag=-fno-common | |
7161 | fi | |
3bbd5a19 | 7162 | |
3089f8b5 PB |
7163 | if test x$ac_df_checking != x ; then |
7164 | ||
7165 | cat >>confdefs.h <<\_ACEOF | |
7166 | #define ENABLE_DF_CHECKING 1 | |
7167 | _ACEOF | |
7168 | ||
7169 | fi | |
06c37c96 NS |
7170 | if test x$ac_assert_checking != x ; then |
7171 | ||
7172 | cat >>confdefs.h <<\_ACEOF | |
7173 | #define ENABLE_ASSERT_CHECKING 1 | |
7174 | _ACEOF | |
7175 | ||
b53ef395 | 7176 | fi |
232b67d9 | 7177 | |
b53ef395 NS |
7178 | if test x$ac_runtime_checking != x ; then |
7179 | ||
7180 | cat >>confdefs.h <<\_ACEOF | |
7181 | #define ENABLE_RUNTIME_CHECKING 1 | |
7182 | _ACEOF | |
7183 | ||
06c37c96 | 7184 | fi |
ba479fd2 NN |
7185 | if test x$ac_tree_checking != x ; then |
7186 | ||
7187 | cat >>confdefs.h <<\_ACEOF | |
7188 | #define ENABLE_TREE_CHECKING 1 | |
7189 | _ACEOF | |
7190 | ||
13f05fd0 | 7191 | TREEBROWSER=tree-browser.o |
ba479fd2 | 7192 | fi |
7e98624c RG |
7193 | if test x$ac_types_checking != x ; then |
7194 | ||
7195 | cat >>confdefs.h <<\_ACEOF | |
7196 | #define ENABLE_TYPES_CHECKING 1 | |
7197 | _ACEOF | |
7198 | ||
7199 | fi | |
13f05fd0 | 7200 | |
ba479fd2 NN |
7201 | if test x$ac_rtl_checking != x ; then |
7202 | ||
7203 | cat >>confdefs.h <<\_ACEOF | |
7204 | #define ENABLE_RTL_CHECKING 1 | |
7205 | _ACEOF | |
7206 | ||
7207 | fi | |
7208 | if test x$ac_rtlflag_checking != x ; then | |
7209 | ||
7210 | cat >>confdefs.h <<\_ACEOF | |
7211 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
7212 | _ACEOF | |
7213 | ||
7214 | fi | |
7215 | if test x$ac_gc_checking != x ; then | |
7216 | ||
7217 | cat >>confdefs.h <<\_ACEOF | |
7218 | #define ENABLE_GC_CHECKING 1 | |
7219 | _ACEOF | |
7220 | ||
7221 | fi | |
7222 | if test x$ac_gc_always_collect != x ; then | |
7223 | ||
7224 | cat >>confdefs.h <<\_ACEOF | |
7225 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
7226 | _ACEOF | |
7227 | ||
7228 | fi | |
7229 | if test x$ac_fold_checking != x ; then | |
7230 | ||
7231 | cat >>confdefs.h <<\_ACEOF | |
7232 | #define ENABLE_FOLD_CHECKING 1 | |
7233 | _ACEOF | |
7234 | ||
7235 | fi | |
7236 | valgrind_path_defines= | |
7237 | valgrind_command= | |
7238 | ||
ba479fd2 | 7239 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
ab22c1fa CF |
7240 | { echo "$as_me:$LINENO: checking for valgrind.h" >&5 |
7241 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
7242 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
7243 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7244 | fi | |
ab22c1fa CF |
7245 | { echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
7246 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; } | |
ba479fd2 NN |
7247 | else |
7248 | # Is the header compilable? | |
ab22c1fa CF |
7249 | { echo "$as_me:$LINENO: checking valgrind.h usability" >&5 |
7250 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6; } | |
ba479fd2 | 7251 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7252 | /* confdefs.h. */ |
7253 | _ACEOF | |
7254 | cat confdefs.h >>conftest.$ac_ext | |
7255 | cat >>conftest.$ac_ext <<_ACEOF | |
7256 | /* end confdefs.h. */ | |
7257 | $ac_includes_default | |
63cf211a | 7258 | #include <valgrind.h> |
ba479fd2 NN |
7259 | _ACEOF |
7260 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
7261 | if { (ac_try="$ac_compile" |
7262 | case "(($ac_try" in | |
7263 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7264 | *) ac_try_echo=$ac_try;; | |
7265 | esac | |
7266 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7267 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 7268 | ac_status=$? |
86da66b5 HPN |
7269 | grep -v '^ *+' conftest.er1 >conftest.err |
7270 | rm -f conftest.er1 | |
7271 | cat conftest.err >&5 | |
ba479fd2 | 7272 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
7273 | (exit $ac_status); } && { |
7274 | test -z "$ac_c_werror_flag" || | |
7275 | test ! -s conftest.err | |
7276 | } && test -s conftest.$ac_objext; then | |
ba479fd2 NN |
7277 | ac_header_compiler=yes |
7278 | else | |
7279 | echo "$as_me: failed program was:" >&5 | |
7280 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7281 | ||
ab22c1fa | 7282 | ac_header_compiler=no |
ba479fd2 | 7283 | fi |
ab22c1fa CF |
7284 | |
7285 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7286 | { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
7287 | echo "${ECHO_T}$ac_header_compiler" >&6; } | |
ba479fd2 NN |
7288 | |
7289 | # Is the header present? | |
ab22c1fa CF |
7290 | { echo "$as_me:$LINENO: checking valgrind.h presence" >&5 |
7291 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6; } | |
ba479fd2 | 7292 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7293 | /* confdefs.h. */ |
7294 | _ACEOF | |
7295 | cat confdefs.h >>conftest.$ac_ext | |
7296 | cat >>conftest.$ac_ext <<_ACEOF | |
7297 | /* end confdefs.h. */ | |
7298 | #include <valgrind.h> | |
7299 | _ACEOF | |
ab22c1fa CF |
7300 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
7301 | case "(($ac_try" in | |
7302 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7303 | *) ac_try_echo=$ac_try;; | |
7304 | esac | |
7305 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7306 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
7307 | ac_status=$? |
7308 | grep -v '^ *+' conftest.er1 >conftest.err | |
7309 | rm -f conftest.er1 | |
7310 | cat conftest.err >&5 | |
7311 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
7312 | (exit $ac_status); } >/dev/null && { |
7313 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
7314 | test ! -s conftest.err | |
7315 | }; then | |
ba479fd2 NN |
7316 | ac_header_preproc=yes |
7317 | else | |
7318 | echo "$as_me: failed program was:" >&5 | |
7319 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7320 | ||
7321 | ac_header_preproc=no | |
7322 | fi | |
ab22c1fa | 7323 | |
ba479fd2 | 7324 | rm -f conftest.err conftest.$ac_ext |
ab22c1fa CF |
7325 | { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
7326 | echo "${ECHO_T}$ac_header_preproc" >&6; } | |
ba479fd2 NN |
7327 | |
7328 | # So? What about this header? | |
86da66b5 HPN |
7329 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
7330 | yes:no: ) | |
ba479fd2 NN |
7331 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
7332 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
7333 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
7334 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
7335 | ac_header_preproc=yes | |
ba479fd2 | 7336 | ;; |
86da66b5 | 7337 | no:yes:* ) |
ba479fd2 NN |
7338 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
7339 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
7340 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
7341 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
7342 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
7343 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
7344 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
7345 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
7346 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
7347 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
7348 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
7349 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ab22c1fa | 7350 | |
ba479fd2 NN |
7351 | ;; |
7352 | esac | |
ab22c1fa CF |
7353 | { echo "$as_me:$LINENO: checking for valgrind.h" >&5 |
7354 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
7355 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
7356 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7357 | else | |
7358 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 7359 | fi |
ab22c1fa CF |
7360 | { echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
7361 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; } | |
ba479fd2 | 7362 | |
6e3f3080 | 7363 | fi |
ba479fd2 | 7364 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
7365 | have_valgrind_h=yes |
7366 | else | |
ba479fd2 | 7367 | have_valgrind_h=no |
6938ec6c NN |
7368 | fi |
7369 | ||
7370 | ||
ba479fd2 | 7371 | |
cdce5c16 | 7372 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
7373 | # It is certainly possible that there's valgrind but no valgrind.h. |
7374 | # GCC relies on making annotations so we must have both. | |
ab22c1fa CF |
7375 | { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
7376 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6; } | |
ba479fd2 | 7377 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7378 | /* confdefs.h. */ |
7379 | _ACEOF | |
7380 | cat confdefs.h >>conftest.$ac_ext | |
7381 | cat >>conftest.$ac_ext <<_ACEOF | |
7382 | /* end confdefs.h. */ | |
a207b594 | 7383 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
7384 | #ifndef VALGRIND_DISCARD |
7385 | #error VALGRIND_DISCARD not defined | |
7386 | #endif | |
ba479fd2 | 7387 | _ACEOF |
ab22c1fa CF |
7388 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
7389 | case "(($ac_try" in | |
7390 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7391 | *) ac_try_echo=$ac_try;; | |
7392 | esac | |
7393 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7394 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
7395 | ac_status=$? |
7396 | grep -v '^ *+' conftest.er1 >conftest.err | |
7397 | rm -f conftest.er1 | |
7398 | cat conftest.err >&5 | |
7399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
7400 | (exit $ac_status); } >/dev/null && { |
7401 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
7402 | test ! -s conftest.err | |
7403 | }; then | |
a207b594 HPN |
7404 | gcc_cv_header_valgrind_memcheck_h=yes |
7405 | else | |
ba479fd2 NN |
7406 | echo "$as_me: failed program was:" >&5 |
7407 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7408 | ||
a207b594 HPN |
7409 | gcc_cv_header_valgrind_memcheck_h=no |
7410 | fi | |
ab22c1fa | 7411 | |
ba479fd2 | 7412 | rm -f conftest.err conftest.$ac_ext |
ab22c1fa CF |
7413 | { echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 |
7414 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6; } | |
7415 | { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
7416 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6; } | |
ba479fd2 | 7417 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7418 | /* confdefs.h. */ |
7419 | _ACEOF | |
7420 | cat confdefs.h >>conftest.$ac_ext | |
7421 | cat >>conftest.$ac_ext <<_ACEOF | |
7422 | /* end confdefs.h. */ | |
a207b594 HPN |
7423 | #include <memcheck.h> |
7424 | #ifndef VALGRIND_DISCARD | |
7425 | #error VALGRIND_DISCARD not defined | |
7426 | #endif | |
ba479fd2 | 7427 | _ACEOF |
ab22c1fa CF |
7428 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
7429 | case "(($ac_try" in | |
7430 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7431 | *) ac_try_echo=$ac_try;; | |
7432 | esac | |
7433 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
7434 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
7435 | ac_status=$? |
7436 | grep -v '^ *+' conftest.er1 >conftest.err | |
7437 | rm -f conftest.er1 | |
7438 | cat conftest.err >&5 | |
7439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
7440 | (exit $ac_status); } >/dev/null && { |
7441 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
7442 | test ! -s conftest.err | |
7443 | }; then | |
14011ca4 AJ |
7444 | gcc_cv_header_memcheck_h=yes |
7445 | else | |
ba479fd2 NN |
7446 | echo "$as_me: failed program was:" >&5 |
7447 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7448 | ||
cafe096b EC |
7449 | gcc_cv_header_memcheck_h=no |
7450 | fi | |
ab22c1fa | 7451 | |
ba479fd2 | 7452 | rm -f conftest.err conftest.$ac_ext |
ab22c1fa CF |
7453 | { echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 |
7454 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6; } | |
ba479fd2 | 7455 | |
56694dd9 ZW |
7456 | # Prepare PATH_SEPARATOR. |
7457 | # The user is always right. | |
7458 | if test "${PATH_SEPARATOR+set}" != set; then | |
7459 | echo "#! /bin/sh" >conf$$.sh | |
7460 | echo "exit 0" >>conf$$.sh | |
7461 | chmod +x conf$$.sh | |
7462 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7463 | PATH_SEPARATOR=';' | |
7464 | else | |
7465 | PATH_SEPARATOR=: | |
7466 | fi | |
7467 | rm -f conf$$.sh | |
7468 | fi | |
7469 | ||
7470 | # Find out how to test for executable files. Don't use a zero-byte file, | |
7471 | # as systems may use methods other than mode bits to determine executability. | |
7472 | cat >conf$$.file <<_ASEOF | |
7473 | #! /bin/sh | |
7474 | exit 0 | |
7475 | _ASEOF | |
7476 | chmod +x conf$$.file | |
7477 | if test -x conf$$.file >/dev/null 2>&1; then | |
7478 | ac_executable_p="test -x" | |
7479 | else | |
7480 | ac_executable_p="test -f" | |
7481 | fi | |
7482 | rm -f conf$$.file | |
7483 | ||
7484 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 7485 | set dummy valgrind; ac_word=$2 |
ab22c1fa CF |
7486 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7487 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
7488 | if test "${ac_cv_path_valgrind_path+set}" = set; then |
7489 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
7490 | else |
7491 | case "$valgrind_path" in | |
56694dd9 ZW |
7492 | [\\/]* | ?:[\\/]*) |
7493 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
7494 | ;; | |
414d23ae | 7495 | *) |
56694dd9 ZW |
7496 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
7497 | for ac_dir in $PATH; do | |
7498 | IFS="$ac_save_IFS" | |
7499 | test -z "$ac_dir" && ac_dir=. | |
7500 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7501 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
7502 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
7503 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
7504 | break 2 | |
7505 | fi | |
7506 | fi | |
7507 | done | |
7508 | done | |
7509 | IFS="$ac_save_IFS" | |
7510 | ;; | |
414d23ae | 7511 | esac |
75e93faa | 7512 | fi |
414d23ae HPN |
7513 | valgrind_path="$ac_cv_path_valgrind_path" |
7514 | if test -n "$valgrind_path"; then | |
ab22c1fa CF |
7515 | { echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
7516 | echo "${ECHO_T}$valgrind_path" >&6; } | |
414d23ae | 7517 | else |
ab22c1fa CF |
7518 | { echo "$as_me:$LINENO: result: no" >&5 |
7519 | echo "${ECHO_T}no" >&6; } | |
414d23ae HPN |
7520 | fi |
7521 | ||
a207b594 HPN |
7522 | if test "x$valgrind_path" = "x" \ |
7523 | || (test $have_valgrind_h = no \ | |
7524 | && test $gcc_cv_header_memcheck_h = no \ | |
7525 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
7526 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
7527 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
7528 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
7529 | fi |
7530 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
7531 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
7532 | |
7533 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 7534 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 7535 | _ACEOF |
75e93faa | 7536 | |
a207b594 | 7537 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
7538 | |
7539 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 7540 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 7541 | _ACEOF |
a207b594 HPN |
7542 | |
7543 | fi | |
14011ca4 | 7544 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
7545 | |
7546 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 7547 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 7548 | _ACEOF |
14011ca4 AJ |
7549 | |
7550 | fi | |
414d23ae | 7551 | fi |
75e93faa | 7552 | |
75e93faa ZW |
7553 | |
7554 | ||
ab22c1fa | 7555 | # Check whether --enable-mapped-location was given. |
74ee1642 | 7556 | if test "${enable_mapped_location+set}" = set; then |
ab22c1fa | 7557 | enableval=$enable_mapped_location; |
74ee1642 PB |
7558 | else |
7559 | enable_mapped_location=no | |
ab22c1fa CF |
7560 | fi |
7561 | ||
74ee1642 PB |
7562 | |
7563 | if test "$enable_mapped_location" = yes ; then | |
7564 | ||
7565 | cat >>confdefs.h <<\_ACEOF | |
7566 | #define USE_MAPPED_LOCATION 1 | |
7567 | _ACEOF | |
7568 | ||
7569 | fi | |
7570 | ||
414d23ae | 7571 | # Enable code coverage collection |
ab22c1fa | 7572 | # Check whether --enable-coverage was given. |
414d23ae | 7573 | if test "${enable_coverage+set}" = set; then |
ab22c1fa | 7574 | enableval=$enable_coverage; case "${enableval}" in |
6dd297da NN |
7575 | yes|noopt) |
7576 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
7577 | ;; | |
7578 | opt) | |
7579 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
7580 | ;; | |
7581 | no) | |
7582 | # a.k.a. --disable-coverage | |
7583 | coverage_flags="" | |
7584 | ;; | |
7585 | *) | |
7586 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
7587 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
7588 | { (exit 1); exit 1; }; } | |
6dd297da | 7589 | ;; |
414d23ae | 7590 | esac |
75e93faa | 7591 | else |
414d23ae | 7592 | coverage_flags="" |
ab22c1fa | 7593 | fi |
dd7f7a6e | 7594 | |
8b1f719a | 7595 | |
a3bba767 | 7596 | |
ab22c1fa CF |
7597 | # Check whether --enable-gather-detailed-mem-stats was given. |
7598 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
7599 | enableval=$enable_gather_detailed_mem_stats; | |
439a7e54 DN |
7600 | else |
7601 | enable_gather_detailed_mem_stats=no | |
ab22c1fa CF |
7602 | fi |
7603 | ||
439a7e54 | 7604 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
7605 | |
7606 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 7607 | #define GATHER_STATISTICS 1 |
ba479fd2 | 7608 | _ACEOF |
439a7e54 DN |
7609 | |
7610 | fi | |
7611 | ||
73458fb7 NN |
7612 | # ------------------------------- |
7613 | # Miscenalleous configure options | |
7614 | # ------------------------------- | |
34a86c2b NN |
7615 | |
7616 | # With stabs | |
ba479fd2 | 7617 | |
ab22c1fa | 7618 | # Check whether --with-stabs was given. |
34a86c2b | 7619 | if test "${with_stabs+set}" = set; then |
ab22c1fa | 7620 | withval=$with_stabs; stabs="$with_stabs" |
34a86c2b NN |
7621 | else |
7622 | stabs=no | |
ab22c1fa CF |
7623 | fi |
7624 | ||
cafe096b | 7625 | |
34a86c2b | 7626 | # Determine whether or not multilibs are enabled. |
ab22c1fa | 7627 | # Check whether --enable-multilib was given. |
34a86c2b | 7628 | if test "${enable_multilib+set}" = set; then |
ab22c1fa | 7629 | enableval=$enable_multilib; |
34a86c2b NN |
7630 | else |
7631 | enable_multilib=yes | |
ab22c1fa CF |
7632 | fi |
7633 | ||
75e93faa | 7634 | |
34a86c2b | 7635 | |
414d23ae | 7636 | # Enable __cxa_atexit for C++. |
ab22c1fa | 7637 | # Check whether --enable-__cxa_atexit was given. |
414d23ae | 7638 | if test "${enable___cxa_atexit+set}" = set; then |
ab22c1fa CF |
7639 | enableval=$enable___cxa_atexit; |
7640 | fi | |
75e93faa ZW |
7641 | |
7642 | ||
486aa804 | 7643 | # Enable C extension for decimal float if target supports it. |
ab22c1fa | 7644 | # Check whether --enable-decimal-float was given. |
486aa804 | 7645 | if test "${enable_decimal_float+set}" = set; then |
ab22c1fa | 7646 | enableval=$enable_decimal_float; |
79b87c74 MM |
7647 | case $enable_decimal_float in |
7648 | yes | no | bid | dpd) ;; | |
7649 | *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float. | |
7650 | Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5 | |
7651 | echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float. | |
7652 | Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;} | |
7653 | { (exit 1); exit 1; }; } ;; | |
7654 | esac | |
7655 | ||
7656 | else | |
7657 | ||
7658 | case $target in | |
7659 | powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*) | |
a4a9df5f | 7660 | enable_decimal_float=yes |
486aa804 BE |
7661 | ;; |
7662 | *) | |
7663 | { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 | |
7664 | echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
7665 | enable_decimal_float=no | |
7666 | ;; | |
79b87c74 | 7667 | esac |
486aa804 | 7668 | |
ab22c1fa CF |
7669 | fi |
7670 | ||
486aa804 | 7671 | |
79b87c74 MM |
7672 | dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi` |
7673 | ||
7674 | cat >>confdefs.h <<_ACEOF | |
7675 | #define ENABLE_DECIMAL_FLOAT $dfp | |
7676 | _ACEOF | |
7677 | ||
7678 | ||
7679 | # x86's use BID format instead of DPD | |
7680 | case x$enable_decimal_float in | |
7681 | xyes) | |
7682 | case $target in | |
7683 | i?86*-*-linux* | x86_64*-*-linux*) | |
7684 | enable_decimal_float=bid | |
7685 | ;; | |
7686 | *) | |
7687 | enable_decimal_float=dpd | |
7688 | ;; | |
7689 | esac | |
7690 | ;; | |
7691 | xno) | |
7692 | # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper | |
7693 | # dependency on libdecnumber. | |
7694 | enable_decimal_float=dpd | |
7695 | ;; | |
7696 | esac | |
486aa804 BE |
7697 | |
7698 | ||
79b87c74 | 7699 | bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi` |
486aa804 BE |
7700 | |
7701 | cat >>confdefs.h <<_ACEOF | |
79b87c74 | 7702 | #define ENABLE_DECIMAL_BID_FORMAT $bid |
486aa804 BE |
7703 | _ACEOF |
7704 | ||
7705 | ||
ab22c1fa CF |
7706 | # Enable C extension for fixed-point arithmetic. |
7707 | # Check whether --enable-fixed-point was given. | |
7708 | if test "${enable_fixed_point+set}" = set; then | |
7709 | enableval=$enable_fixed_point; | |
7710 | ||
7711 | else | |
7712 | ||
7713 | case $target in | |
7714 | mips*-*-*) | |
7715 | enable_fixed_point=yes | |
7716 | ;; | |
7717 | *) | |
7718 | { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5 | |
7719 | echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;} | |
7720 | enable_fixed_point=no | |
7721 | ;; | |
7722 | esac | |
7723 | ||
7724 | fi | |
7725 | ||
7726 | ||
7727 | ||
7728 | fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi` | |
7729 | ||
7730 | cat >>confdefs.h <<_ACEOF | |
7731 | #define ENABLE_FIXED_POINT $fixedpoint | |
7732 | _ACEOF | |
7733 | ||
7734 | ||
414d23ae HPN |
7735 | # Enable threads |
7736 | # Pass with no value to take the default | |
7737 | # Pass with a value to specify a thread package | |
ab22c1fa | 7738 | # Check whether --enable-threads was given. |
414d23ae | 7739 | if test "${enable_threads+set}" = set; then |
ab22c1fa | 7740 | enableval=$enable_threads; |
414d23ae HPN |
7741 | else |
7742 | enable_threads='' | |
ab22c1fa | 7743 | fi |
8b1f719a | 7744 | |
a3bba767 | 7745 | |
ab22c1fa CF |
7746 | # Check whether --enable-tls was given. |
7747 | if test "${enable_tls+set}" = set; then | |
7748 | enableval=$enable_tls; | |
8dea1cca DD |
7749 | case $enable_tls in |
7750 | yes | no) ;; | |
7751 | *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. | |
7752 | Valid choices are 'yes' and 'no'." >&5 | |
7753 | echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. | |
7754 | Valid choices are 'yes' and 'no'." >&2;} | |
7755 | { (exit 1); exit 1; }; } ;; | |
7756 | esac | |
7757 | ||
7758 | else | |
7759 | enable_tls='' | |
ab22c1fa | 7760 | fi |
703d89ab | 7761 | |
ab22c1fa CF |
7762 | |
7763 | # Check whether --enable-objc-gc was given. | |
414d23ae | 7764 | if test "${enable_objc_gc+set}" = set; then |
ab22c1fa | 7765 | enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then |
414d23ae HPN |
7766 | objc_boehm_gc='' |
7767 | else | |
7768 | objc_boehm_gc=1 | |
7769 | fi | |
7770 | else | |
7771 | objc_boehm_gc='' | |
ab22c1fa CF |
7772 | fi |
7773 | ||
75e93faa | 7774 | |
a6ccdbab | 7775 | |
ab22c1fa | 7776 | # Check whether --with-dwarf2 was given. |
414d23ae | 7777 | if test "${with_dwarf2+set}" = set; then |
ab22c1fa | 7778 | withval=$with_dwarf2; dwarf2="$with_dwarf2" |
75e93faa | 7779 | else |
414d23ae | 7780 | dwarf2=no |
ab22c1fa | 7781 | fi |
8b1f719a | 7782 | |
a3bba767 | 7783 | |
ab22c1fa CF |
7784 | # Check whether --enable-shared was given. |
7785 | if test "${enable_shared+set}" = set; then | |
7786 | enableval=$enable_shared; | |
414d23ae HPN |
7787 | case $enable_shared in |
7788 | yes | no) ;; | |
7789 | *) | |
7790 | enable_shared=no | |
7791 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
7792 | for pkg in $enableval; do | |
7793 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
7794 | enable_shared=yes | |
7795 | fi | |
7796 | done | |
7797 | IFS="$ac_save_ifs" | |
7798 | ;; | |
7799 | esac | |
7800 | ||
75e93faa | 7801 | else |
414d23ae | 7802 | enable_shared=yes |
ab22c1fa | 7803 | fi |
75e93faa | 7804 | |
b8ec3cc8 | 7805 | |
703d89ab | 7806 | |
ab22c1fa CF |
7807 | |
7808 | # Check whether --with-build-sysroot was given. | |
160633c6 | 7809 | if test "${with_build_sysroot+set}" = set; then |
ab22c1fa CF |
7810 | withval=$with_build_sysroot; |
7811 | fi | |
160633c6 | 7812 | |
160633c6 MM |
7813 | |
7814 | ||
ab22c1fa | 7815 | # Check whether --with-sysroot was given. |
4977bab6 | 7816 | if test "${with_sysroot+set}" = set; then |
ab22c1fa | 7817 | withval=$with_sysroot; |
4977bab6 | 7818 | case ${with_sysroot} in |
caa55b1e | 7819 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
7820 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
7821 | esac | |
ba479fd2 | 7822 | |
4977bab6 | 7823 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
14da6073 | 7824 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' |
4977bab6 | 7825 | |
748670c2 RS |
7826 | if test "x$prefix" = xNONE; then |
7827 | test_prefix=/usr/local | |
7828 | else | |
7829 | test_prefix=$prefix | |
7830 | fi | |
047d636f | 7831 | if test "x$exec_prefix" = xNONE; then |
748670c2 | 7832 | test_exec_prefix=$test_prefix |
047d636f | 7833 | else |
748670c2 | 7834 | test_exec_prefix=$exec_prefix |
047d636f DJ |
7835 | fi |
7836 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 | 7837 | "${test_prefix}"|"${test_prefix}/"*|\ |
748670c2 RS |
7838 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
7839 | '${prefix}'|'${prefix}/'*|\ | |
91710e62 | 7840 | '${exec_prefix}'|'${exec_prefix}/'*) |
047d636f DJ |
7841 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
7842 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
7843 | ;; | |
7844 | esac | |
7845 | ||
4977bab6 | 7846 | else |
ba479fd2 | 7847 | |
4977bab6 | 7848 | TARGET_SYSTEM_ROOT= |
db720d9a | 7849 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
7850 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
7851 | ||
ab22c1fa CF |
7852 | fi |
7853 | ||
4977bab6 ZW |
7854 | |
7855 | ||
7856 | ||
7857 | ||
d1bd0ded | 7858 | # Build with intermodule optimisations |
ab22c1fa | 7859 | # Check whether --enable-intermodule was given. |
d1bd0ded | 7860 | if test "${enable_intermodule+set}" = set; then |
ab22c1fa | 7861 | enableval=$enable_intermodule; case ${enable_intermodule} in |
0c46c5c7 KC |
7862 | yes) onestep="-onestep";; |
7863 | *) onestep="";; | |
d1bd0ded | 7864 | esac |
0c46c5c7 KC |
7865 | else |
7866 | onestep="" | |
ab22c1fa CF |
7867 | fi |
7868 | ||
d1bd0ded GK |
7869 | |
7870 | ||
f3c9f174 NN |
7871 | # Sanity check enable_languages in case someone does not run the toplevel |
7872 | # configure # script. | |
ab22c1fa | 7873 | # Check whether --enable-languages was given. |
f3c9f174 | 7874 | if test "${enable_languages+set}" = set; then |
ab22c1fa | 7875 | enableval=$enable_languages; case ,${enable_languages}, in |
f3c9f174 NN |
7876 | ,,|,yes,) |
7877 | # go safe -- we cannot be much sure without the toplevel | |
7878 | # configure's | |
7879 | # analysis of which target libs are present and usable | |
7880 | enable_languages=c | |
7881 | ;; | |
7882 | *,all,*) | |
7883 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7884 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7885 | { (exit 1); exit 1; }; } | |
7886 | ;; | |
7887 | *,c,*) | |
7888 | ;; | |
7889 | *) | |
7890 | enable_languages=c,${enable_languages} | |
7891 | ;; | |
7892 | esac | |
7893 | else | |
7894 | enable_languages=c | |
ab22c1fa CF |
7895 | fi |
7896 | ||
f3c9f174 | 7897 | |
9288b845 CD |
7898 | # Used by documentation targets |
7899 | ||
7900 | ||
7901 | ||
f3c9f174 | 7902 | |
73458fb7 NN |
7903 | # ------------------------- |
7904 | # Checks for other programs | |
7905 | # ------------------------- | |
5b67ad6f | 7906 | |
ab22c1fa CF |
7907 | { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7908 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } | |
7909 | set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
7910 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 | 7911 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
e9a25f70 | 7912 | else |
ba479fd2 | 7913 | cat >conftest.make <<\_ACEOF |
ab22c1fa | 7914 | SHELL = /bin/sh |
e9a25f70 | 7915 | all: |
ab22c1fa | 7916 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
ba479fd2 | 7917 | _ACEOF |
e9a25f70 | 7918 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ab22c1fa CF |
7919 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
7920 | *@@@%%%=?*=@@@%%%*) | |
7921 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
7922 | *) | |
7923 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
7924 | esac | |
ba479fd2 | 7925 | rm -f conftest.make |
e9a25f70 | 7926 | fi |
ab22c1fa CF |
7927 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
7928 | { echo "$as_me:$LINENO: result: yes" >&5 | |
7929 | echo "${ECHO_T}yes" >&6; } | |
e9a25f70 JL |
7930 | SET_MAKE= |
7931 | else | |
ab22c1fa CF |
7932 | { echo "$as_me:$LINENO: result: no" >&5 |
7933 | echo "${ECHO_T}no" >&6; } | |
e9a25f70 JL |
7934 | SET_MAKE="MAKE=${MAKE-make}" |
7935 | fi | |
7936 | ||
7937 | ||
861bb6c1 | 7938 | # Find some useful tools |
ba479fd2 | 7939 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7940 | do |
ba479fd2 | 7941 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7942 | set dummy $ac_prog; ac_word=$2 |
ab22c1fa CF |
7943 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7944 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
7945 | if test "${ac_cv_prog_AWK+set}" = set; then |
7946 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7947 | else |
7948 | if test -n "$AWK"; then | |
7949 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7950 | else | |
ba479fd2 NN |
7951 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7952 | for as_dir in $PATH | |
7953 | do | |
7954 | IFS=$as_save_IFS | |
7955 | test -z "$as_dir" && as_dir=. | |
7956 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 7957 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
7958 | ac_cv_prog_AWK="$ac_prog" |
7959 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7960 | break 2 | |
7961 | fi | |
7962 | done | |
7963 | done | |
ab22c1fa | 7964 | IFS=$as_save_IFS |
ba479fd2 | 7965 | |
861bb6c1 JL |
7966 | fi |
7967 | fi | |
ba479fd2 | 7968 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7969 | if test -n "$AWK"; then |
ab22c1fa CF |
7970 | { echo "$as_me:$LINENO: result: $AWK" >&5 |
7971 | echo "${ECHO_T}$AWK" >&6; } | |
861bb6c1 | 7972 | else |
ab22c1fa CF |
7973 | { echo "$as_me:$LINENO: result: no" >&5 |
7974 | echo "${ECHO_T}no" >&6; } | |
861bb6c1 JL |
7975 | fi |
7976 | ||
ab22c1fa | 7977 | |
ba479fd2 | 7978 | test -n "$AWK" && break |
861bb6c1 JL |
7979 | done |
7980 | ||
776dc15d | 7981 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7982 | # Bail out if it's missing. |
7983 | case ${AWK} in | |
ba479fd2 NN |
7984 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7985 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7986 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7987 | esac |
7988 | ||
ab22c1fa CF |
7989 | { echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7990 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } | |
ba479fd2 NN |
7991 | if test "${gcc_cv_prog_LN_S+set}" = set; then |
7992 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7993 | else |
7994 | rm -f conftestdata_t | |
7995 | echo >conftestdata_f | |
7996 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7997 | then | |
7998 | gcc_cv_prog_LN_S="ln -s" | |
7999 | else | |
8000 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
8001 | then | |
8002 | gcc_cv_prog_LN_S=ln | |
8003 | else | |
35f06ae4 PB |
8004 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
8005 | then | |
06c3418c | 8006 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
8007 | else |
8008 | gcc_cv_prog_LN_S=cp | |
8009 | fi | |
0a4b6309 RL |
8010 | fi |
8011 | fi | |
8012 | rm -f conftestdata_f conftestdata_t | |
8013 | ||
8014 | fi | |
8015 | LN_S="$gcc_cv_prog_LN_S" | |
8016 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ab22c1fa CF |
8017 | { echo "$as_me:$LINENO: result: yes" >&5 |
8018 | echo "${ECHO_T}yes" >&6; } | |
0a4b6309 RL |
8019 | else |
8020 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ab22c1fa CF |
8021 | { echo "$as_me:$LINENO: result: no, using ln" >&5 |
8022 | echo "${ECHO_T}no, using ln" >&6; } | |
0a4b6309 | 8023 | else |
ab22c1fa CF |
8024 | { echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
8025 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; } | |
0a4b6309 RL |
8026 | fi |
8027 | fi | |
8028 | ||
ab22c1fa CF |
8029 | { echo "$as_me:$LINENO: checking whether ln works" >&5 |
8030 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6; } | |
18fc9bd4 RG |
8031 | if test "${acx_cv_prog_LN+set}" = set; then |
8032 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8033 | else | |
8034 | rm -f conftestdata_t | |
8035 | echo >conftestdata_f | |
8036 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
8037 | then | |
8038 | acx_cv_prog_LN=ln | |
8039 | else | |
8040 | acx_cv_prog_LN=no | |
8041 | fi | |
8042 | rm -f conftestdata_f conftestdata_t | |
8043 | ||
8044 | fi | |
8045 | if test $acx_cv_prog_LN = no; then | |
8046 | LN="$LN_S" | |
ab22c1fa CF |
8047 | { echo "$as_me:$LINENO: result: no, using $LN" >&5 |
8048 | echo "${ECHO_T}no, using $LN" >&6; } | |
18fc9bd4 RG |
8049 | else |
8050 | LN="$acx_cv_prog_LN" | |
ab22c1fa CF |
8051 | { echo "$as_me:$LINENO: result: yes" >&5 |
8052 | echo "${ECHO_T}yes" >&6; } | |
18fc9bd4 RG |
8053 | fi |
8054 | ||
ba479fd2 NN |
8055 | if test -n "$ac_tool_prefix"; then |
8056 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
8057 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
ab22c1fa CF |
8058 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8059 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8060 | if test "${ac_cv_prog_RANLIB+set}" = set; then |
8061 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
8062 | else |
8063 | if test -n "$RANLIB"; then | |
8064 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
8065 | else | |
ba479fd2 NN |
8066 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8067 | for as_dir in $PATH | |
8068 | do | |
8069 | IFS=$as_save_IFS | |
8070 | test -z "$as_dir" && as_dir=. | |
8071 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8072 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8073 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
8074 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8075 | break 2 | |
8076 | fi | |
8077 | done | |
8078 | done | |
ab22c1fa | 8079 | IFS=$as_save_IFS |
ba479fd2 | 8080 | |
6e3f3080 NN |
8081 | fi |
8082 | fi | |
ba479fd2 | 8083 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 8084 | if test -n "$RANLIB"; then |
ab22c1fa CF |
8085 | { echo "$as_me:$LINENO: result: $RANLIB" >&5 |
8086 | echo "${ECHO_T}$RANLIB" >&6; } | |
ba479fd2 | 8087 | else |
ab22c1fa CF |
8088 | { echo "$as_me:$LINENO: result: no" >&5 |
8089 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
8090 | fi |
8091 | ||
ab22c1fa | 8092 | |
ba479fd2 NN |
8093 | fi |
8094 | if test -z "$ac_cv_prog_RANLIB"; then | |
8095 | ac_ct_RANLIB=$RANLIB | |
8096 | # Extract the first word of "ranlib", so it can be a program name with args. | |
8097 | set dummy ranlib; ac_word=$2 | |
ab22c1fa CF |
8098 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8099 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8100 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then |
8101 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8102 | else | |
8103 | if test -n "$ac_ct_RANLIB"; then | |
8104 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
8105 | else | |
8106 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8107 | for as_dir in $PATH | |
8108 | do | |
8109 | IFS=$as_save_IFS | |
8110 | test -z "$as_dir" && as_dir=. | |
8111 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8112 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8113 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
8114 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8115 | break 2 | |
8116 | fi | |
8117 | done | |
8118 | done | |
ab22c1fa | 8119 | IFS=$as_save_IFS |
ba479fd2 | 8120 | |
ba479fd2 NN |
8121 | fi |
8122 | fi | |
8123 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
8124 | if test -n "$ac_ct_RANLIB"; then | |
ab22c1fa CF |
8125 | { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 |
8126 | echo "${ECHO_T}$ac_ct_RANLIB" >&6; } | |
6e3f3080 | 8127 | else |
ab22c1fa CF |
8128 | { echo "$as_me:$LINENO: result: no" >&5 |
8129 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 NN |
8130 | fi |
8131 | ||
ab22c1fa CF |
8132 | if test "x$ac_ct_RANLIB" = x; then |
8133 | RANLIB=":" | |
8134 | else | |
8135 | case $cross_compiling:$ac_tool_warned in | |
8136 | yes:) | |
8137 | { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools | |
8138 | whose name does not start with the host triplet. If you think this | |
8139 | configuration is useful to you, please write to autoconf@gnu.org." >&5 | |
8140 | echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools | |
8141 | whose name does not start with the host triplet. If you think this | |
8142 | configuration is useful to you, please write to autoconf@gnu.org." >&2;} | |
8143 | ac_tool_warned=yes ;; | |
8144 | esac | |
8145 | RANLIB=$ac_ct_RANLIB | |
8146 | fi | |
ba479fd2 NN |
8147 | else |
8148 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
8149 | fi |
8150 | ||
343a6100 MM |
8151 | case "${host}" in |
8152 | *-*-darwin*) | |
8153 | # By default, the Darwin ranlib will not treat common symbols as | |
8154 | # definitions when building the archive table of contents. Other | |
8155 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
8156 | # it behave similarly. | |
8157 | ranlib_flags="-c" | |
8158 | ;; | |
8159 | *) | |
8160 | ranlib_flags="" | |
8161 | esac | |
8162 | ||
8163 | ||
0a4b6309 RL |
8164 | # Find a good install program. We prefer a C program (faster), |
8165 | # so one script is as good as another. But avoid the broken or | |
8166 | # incompatible versions: | |
8167 | # SysV /etc/install, /usr/sbin/install | |
8168 | # SunOS /usr/etc/install | |
8169 | # IRIX /sbin/install | |
8170 | # AIX /bin/install | |
8171 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
8172 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
8173 | # ./install, which can be erroneously created by make from ./install.sh. | |
ab22c1fa CF |
8174 | { echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
8175 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6; } | |
0a4b6309 | 8176 | if test -z "$INSTALL"; then |
ba479fd2 NN |
8177 | if test "${ac_cv_path_install+set}" = set; then |
8178 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
8179 | else |
8180 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
8181 | for ac_dir in $PATH; do | |
8182 | # Account for people who put trailing slashes in PATH elements. | |
8183 | case "$ac_dir/" in | |
8184 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
8185 | *) | |
8186 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
8187 | for ac_prog in ginstall scoinst install; do | |
8188 | if test -f $ac_dir/$ac_prog; then | |
8189 | if test $ac_prog = install && | |
8190 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
8191 | # AIX install. It has an incompatible calling convention. | |
8192 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
8193 | : | |
8194 | else | |
8195 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
8196 | break 2 | |
8197 | fi | |
8198 | fi | |
8199 | done | |
8200 | ;; | |
8201 | esac | |
8202 | done | |
8203 | IFS="$ac_save_IFS" | |
8204 | ||
8205 | fi | |
8206 | if test "${ac_cv_path_install+set}" = set; then | |
8207 | INSTALL="$ac_cv_path_install" | |
8208 | else | |
8209 | # As a last resort, use the slow shell script. We don't cache a | |
8210 | # path for INSTALL within a source directory, because that will | |
8211 | # break other packages using the cache if that directory is | |
8212 | # removed, or if the path is relative. | |
8213 | INSTALL="$ac_install_sh" | |
8214 | fi | |
8215 | fi | |
ab22c1fa CF |
8216 | { echo "$as_me:$LINENO: result: $INSTALL" >&5 |
8217 | echo "${ECHO_T}$INSTALL" >&6; } | |
0a4b6309 RL |
8218 | |
8219 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
8220 | # It thinks the first close brace ends the variable substitution. | |
8221 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
8222 | ||
8223 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
8224 | ||
861bb6c1 | 8225 | |
3a000df0 | 8226 | # See if cmp has --ignore-initial. |
ab22c1fa CF |
8227 | { echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
8228 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6; } | |
ba479fd2 NN |
8229 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then |
8230 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
8231 | else |
8232 | echo abfoo >t1 | |
8233 | echo cdfoo >t2 | |
269a7343 | 8234 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
8235 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
8236 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 8237 | : |
3a000df0 KC |
8238 | else |
8239 | gcc_cv_prog_cmp_skip=gnucompare | |
8240 | fi | |
269a7343 KG |
8241 | fi |
8242 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
8243 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
8244 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
8245 | : | |
8246 | else | |
8247 | gcc_cv_prog_cmp_skip=fastcompare | |
8248 | fi | |
8249 | fi | |
3a000df0 KC |
8250 | fi |
8251 | rm t1 t2 | |
8252 | ||
8253 | fi | |
ab22c1fa CF |
8254 | { echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
8255 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6; } | |
3a000df0 KC |
8256 | make_compare_target=$gcc_cv_prog_cmp_skip |
8257 | ||
8258 | ||
8259 | ||
73458fb7 NN |
8260 | # See if we have the mktemp command. |
8261 | # Extract the first word of "mktemp", so it can be a program name with args. | |
8262 | set dummy mktemp; ac_word=$2 | |
ab22c1fa CF |
8263 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8264 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8265 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then |
8266 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8267 | else |
8268 | if test -n "$have_mktemp_command"; then | |
8269 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
8270 | else | |
ba479fd2 NN |
8271 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8272 | for as_dir in $PATH | |
8273 | do | |
8274 | IFS=$as_save_IFS | |
8275 | test -z "$as_dir" && as_dir=. | |
8276 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8277 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8278 | ac_cv_prog_have_mktemp_command="yes" |
8279 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8280 | break 2 | |
8281 | fi | |
8282 | done | |
8283 | done | |
ab22c1fa | 8284 | IFS=$as_save_IFS |
ba479fd2 | 8285 | |
73458fb7 NN |
8286 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
8287 | fi | |
8288 | fi | |
ba479fd2 | 8289 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 8290 | if test -n "$have_mktemp_command"; then |
ab22c1fa CF |
8291 | { echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
8292 | echo "${ECHO_T}$have_mktemp_command" >&6; } | |
73458fb7 | 8293 | else |
ab22c1fa CF |
8294 | { echo "$as_me:$LINENO: result: no" >&5 |
8295 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8296 | fi |
8297 | ||
8298 | ||
ab22c1fa | 8299 | |
7c27e184 PB |
8300 | # See if makeinfo has been installed and is modern enough |
8301 | # that we can use it. | |
9f18db39 | 8302 | |
3bbd5a19 | 8303 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 8304 | set dummy makeinfo; ac_word=$2 |
ab22c1fa CF |
8305 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8306 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8307 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then |
8308 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8309 | else |
8310 | if test -n "$MAKEINFO"; then | |
8311 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
8312 | else | |
ba479fd2 NN |
8313 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8314 | for as_dir in $PATH | |
8315 | do | |
8316 | IFS=$as_save_IFS | |
8317 | test -z "$as_dir" && as_dir=. | |
8318 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8319 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
ba479fd2 NN |
8320 | ac_cv_prog_MAKEINFO="makeinfo" |
8321 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8322 | break 2 | |
8323 | fi | |
8324 | done | |
8325 | done | |
ab22c1fa | 8326 | IFS=$as_save_IFS |
ba479fd2 | 8327 | |
73458fb7 NN |
8328 | fi |
8329 | fi | |
ba479fd2 | 8330 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 8331 | if test -n "$MAKEINFO"; then |
ab22c1fa CF |
8332 | { echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
8333 | echo "${ECHO_T}$MAKEINFO" >&6; } | |
73458fb7 | 8334 | else |
ab22c1fa CF |
8335 | { echo "$as_me:$LINENO: result: no" >&5 |
8336 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8337 | fi |
8338 | ||
ab22c1fa | 8339 | |
3bbd5a19 PB |
8340 | if test -n "$MAKEINFO"; then |
8341 | # Found it, now check the version. | |
ab22c1fa CF |
8342 | { echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
8343 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6; } | |
ba479fd2 NN |
8344 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then |
8345 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 | 8346 | else |
3bbd5a19 PB |
8347 | ac_prog_version=`eval $MAKEINFO --version 2>&1 | |
8348 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
8349 | ||
8350 | case $ac_prog_version in | |
8351 | '') gcc_cv_prog_makeinfo_modern=no;; | |
8352 | 4.[4-9]*) gcc_cv_prog_makeinfo_modern=yes;; | |
8353 | *) gcc_cv_prog_makeinfo_modern=no;; | |
8354 | esac | |
73458fb7 NN |
8355 | |
8356 | fi | |
ab22c1fa CF |
8357 | { echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
8358 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6; } | |
3bbd5a19 PB |
8359 | else |
8360 | gcc_cv_prog_makeinfo_modern=no | |
8361 | fi | |
8362 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
8363 | MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo" | |
8364 | fi | |
73458fb7 | 8365 | |
73458fb7 | 8366 | if test $gcc_cv_prog_makeinfo_modern = no; then |
ba479fd2 NN |
8367 | { echo "$as_me:$LINENO: WARNING: |
8368 | *** Makeinfo is missing or too old. | |
8369 | *** Info documentation will not be built." >&5 | |
8370 | echo "$as_me: WARNING: | |
cafe096b | 8371 | *** Makeinfo is missing or too old. |
ba479fd2 | 8372 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
8373 | BUILD_INFO= |
8374 | else | |
ba479fd2 | 8375 | BUILD_INFO=info |
73458fb7 NN |
8376 | fi |
8377 | ||
7c27e184 | 8378 | |
73458fb7 | 8379 | # Is pod2man recent enough to regenerate manpages? |
ab22c1fa CF |
8380 | { echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
8381 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6; } | |
73458fb7 | 8382 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ab22c1fa CF |
8383 | { echo "$as_me:$LINENO: result: yes" >&5 |
8384 | echo "${ECHO_T}yes" >&6; } | |
ba479fd2 | 8385 | GENERATED_MANPAGES=generated-manpages |
73458fb7 | 8386 | else |
ab22c1fa CF |
8387 | { echo "$as_me:$LINENO: result: no" >&5 |
8388 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8389 | GENERATED_MANPAGES= |
8390 | fi | |
8391 | ||
7c27e184 | 8392 | |
3bbd5a19 PB |
8393 | MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing" |
8394 | ||
73458fb7 | 8395 | # How about lex? |
7c27e184 PB |
8396 | for ac_prog in flex |
8397 | do | |
8398 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8399 | set dummy $ac_prog; ac_word=$2 | |
ab22c1fa CF |
8400 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8401 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8402 | if test "${ac_cv_prog_FLEX+set}" = set; then |
8403 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8404 | else |
8405 | if test -n "$FLEX"; then | |
8406 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
8407 | else | |
ba479fd2 NN |
8408 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8409 | for as_dir in $PATH | |
8410 | do | |
8411 | IFS=$as_save_IFS | |
8412 | test -z "$as_dir" && as_dir=. | |
8413 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8414 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
7c27e184 | 8415 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
8416 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
8417 | break 2 | |
8418 | fi | |
8419 | done | |
8420 | done | |
ab22c1fa | 8421 | IFS=$as_save_IFS |
ba479fd2 | 8422 | |
73458fb7 NN |
8423 | fi |
8424 | fi | |
ba479fd2 | 8425 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 8426 | if test -n "$FLEX"; then |
ab22c1fa CF |
8427 | { echo "$as_me:$LINENO: result: $FLEX" >&5 |
8428 | echo "${ECHO_T}$FLEX" >&6; } | |
73458fb7 | 8429 | else |
ab22c1fa CF |
8430 | { echo "$as_me:$LINENO: result: no" >&5 |
8431 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8432 | fi |
8433 | ||
ab22c1fa | 8434 | |
7c27e184 PB |
8435 | test -n "$FLEX" && break |
8436 | done | |
8437 | test -n "$FLEX" || FLEX="$MISSING flex" | |
8438 | ||
73458fb7 NN |
8439 | |
8440 | # Bison? | |
7c27e184 PB |
8441 | for ac_prog in bison |
8442 | do | |
8443 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8444 | set dummy $ac_prog; ac_word=$2 | |
ab22c1fa CF |
8445 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8446 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
ba479fd2 NN |
8447 | if test "${ac_cv_prog_BISON+set}" = set; then |
8448 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
8449 | else |
8450 | if test -n "$BISON"; then | |
8451 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
8452 | else | |
ba479fd2 NN |
8453 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8454 | for as_dir in $PATH | |
8455 | do | |
8456 | IFS=$as_save_IFS | |
8457 | test -z "$as_dir" && as_dir=. | |
8458 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8459 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
7c27e184 | 8460 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
8461 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
8462 | break 2 | |
8463 | fi | |
8464 | done | |
8465 | done | |
ab22c1fa | 8466 | IFS=$as_save_IFS |
ba479fd2 | 8467 | |
73458fb7 NN |
8468 | fi |
8469 | fi | |
ba479fd2 | 8470 | BISON=$ac_cv_prog_BISON |
73458fb7 | 8471 | if test -n "$BISON"; then |
ab22c1fa CF |
8472 | { echo "$as_me:$LINENO: result: $BISON" >&5 |
8473 | echo "${ECHO_T}$BISON" >&6; } | |
73458fb7 | 8474 | else |
ab22c1fa CF |
8475 | { echo "$as_me:$LINENO: result: no" >&5 |
8476 | echo "${ECHO_T}no" >&6; } | |
73458fb7 NN |
8477 | fi |
8478 | ||
ab22c1fa | 8479 | |
7c27e184 PB |
8480 | test -n "$BISON" && break |
8481 | done | |
8482 | test -n "$BISON" || BISON="$MISSING bison" | |
8483 | ||
8484 | ||
8485 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
8486 | # check for build == host before using them. | |
73458fb7 | 8487 | |
f6a874ac | 8488 | # NM |
414adbdd GK |
8489 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
8490 | && test -d ../binutils ; then | |
f6a874ac JW |
8491 | NM='$(objdir)/../binutils/nm-new' |
8492 | else | |
8493 | # Extract the first word of "nm", so it can be a program name with args. | |
8494 | set dummy nm; ac_word=$2 | |
ab22c1fa CF |
8495 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8496 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
f6a874ac JW |
8497 | if test "${ac_cv_prog_NM+set}" = set; then |
8498 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8499 | else | |
8500 | if test -n "$NM"; then | |
8501 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
8502 | else | |
8503 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8504 | for as_dir in $PATH | |
8505 | do | |
8506 | IFS=$as_save_IFS | |
8507 | test -z "$as_dir" && as_dir=. | |
8508 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8509 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
f6a874ac JW |
8510 | ac_cv_prog_NM="nm" |
8511 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8512 | break 2 | |
8513 | fi | |
8514 | done | |
8515 | done | |
ab22c1fa | 8516 | IFS=$as_save_IFS |
f6a874ac JW |
8517 | |
8518 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
8519 | fi | |
8520 | fi | |
8521 | NM=$ac_cv_prog_NM | |
8522 | if test -n "$NM"; then | |
ab22c1fa CF |
8523 | { echo "$as_me:$LINENO: result: $NM" >&5 |
8524 | echo "${ECHO_T}$NM" >&6; } | |
f6a874ac | 8525 | else |
ab22c1fa CF |
8526 | { echo "$as_me:$LINENO: result: no" >&5 |
8527 | echo "${ECHO_T}no" >&6; } | |
f6a874ac JW |
8528 | fi |
8529 | ||
ab22c1fa | 8530 | |
f6a874ac JW |
8531 | fi |
8532 | ||
8533 | # AR | |
414adbdd GK |
8534 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
8535 | && test -d ../binutils ; then | |
f6a874ac JW |
8536 | AR='$(objdir)/../binutils/ar' |
8537 | else | |
8538 | # Extract the first word of "ar", so it can be a program name with args. | |
8539 | set dummy ar; ac_word=$2 | |
ab22c1fa CF |
8540 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8541 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
f6a874ac JW |
8542 | if test "${ac_cv_prog_AR+set}" = set; then |
8543 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8544 | else | |
8545 | if test -n "$AR"; then | |
8546 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
8547 | else | |
8548 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8549 | for as_dir in $PATH | |
8550 | do | |
8551 | IFS=$as_save_IFS | |
8552 | test -z "$as_dir" && as_dir=. | |
8553 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 8554 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
f6a874ac JW |
8555 | ac_cv_prog_AR="ar" |
8556 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8557 | break 2 | |
8558 | fi | |
8559 | done | |
8560 | done | |
ab22c1fa | 8561 | IFS=$as_save_IFS |
f6a874ac JW |
8562 | |
8563 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
8564 | fi | |
8565 | fi | |
8566 | AR=$ac_cv_prog_AR | |
8567 | if test -n "$AR"; then | |
ab22c1fa CF |
8568 | { echo "$as_me:$LINENO: result: $AR" >&5 |
8569 | echo "${ECHO_T}$AR" >&6; } | |
f6a874ac | 8570 | else |
ab22c1fa CF |
8571 | { echo "$as_me:$LINENO: result: no" >&5 |
8572 | echo "${ECHO_T}no" >&6; } | |
f6a874ac JW |
8573 | fi |
8574 | ||
ab22c1fa | 8575 | |
f6a874ac JW |
8576 | fi |
8577 | ||
8578 | ||
73458fb7 NN |
8579 | # -------------------- |
8580 | # Checks for C headers | |
8581 | # -------------------- | |
8582 | ||
ab22c1fa CF |
8583 | { echo "$as_me:$LINENO: checking for GNU C library" >&5 |
8584 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6; } | |
ba479fd2 NN |
8585 | if test "${gcc_cv_glibc+set}" = set; then |
8586 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8587 | else | |
8588 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8589 | /* confdefs.h. */ |
8590 | _ACEOF | |
8591 | cat confdefs.h >>conftest.$ac_ext | |
8592 | cat >>conftest.$ac_ext <<_ACEOF | |
8593 | /* end confdefs.h. */ | |
73458fb7 | 8594 | #include <features.h> |
ba479fd2 NN |
8595 | int |
8596 | main () | |
8597 | { | |
73458fb7 NN |
8598 | |
8599 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
8600 | #error Not a GNU C library system | |
8601 | #endif | |
ba479fd2 NN |
8602 | ; |
8603 | return 0; | |
8604 | } | |
8605 | _ACEOF | |
8606 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
8607 | if { (ac_try="$ac_compile" |
8608 | case "(($ac_try" in | |
8609 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8610 | *) ac_try_echo=$ac_try;; | |
8611 | esac | |
8612 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8613 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8614 | ac_status=$? |
86da66b5 HPN |
8615 | grep -v '^ *+' conftest.er1 >conftest.err |
8616 | rm -f conftest.er1 | |
8617 | cat conftest.err >&5 | |
ba479fd2 | 8618 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
8619 | (exit $ac_status); } && { |
8620 | test -z "$ac_c_werror_flag" || | |
8621 | test ! -s conftest.err | |
8622 | } && test -s conftest.$ac_objext; then | |
73458fb7 NN |
8623 | gcc_cv_glibc=yes |
8624 | else | |
ba479fd2 NN |
8625 | echo "$as_me: failed program was:" >&5 |
8626 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8627 | ||
ab22c1fa | 8628 | gcc_cv_glibc=no |
73458fb7 | 8629 | fi |
ab22c1fa CF |
8630 | |
8631 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
73458fb7 NN |
8632 | fi |
8633 | ||
ab22c1fa CF |
8634 | { echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
8635 | echo "${ECHO_T}$gcc_cv_glibc" >&6; } | |
73458fb7 | 8636 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
8637 | |
8638 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 8639 | #define _GNU_SOURCE 1 |
ba479fd2 | 8640 | _ACEOF |
73458fb7 NN |
8641 | |
8642 | fi | |
8643 | ||
ca9bc441 NN |
8644 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
8645 | # works later. *sigh* This needs to come before all header checks. | |
18fc9bd4 | 8646 | |
ca9bc441 NN |
8647 | ac_c_preproc_warn_flag=yes |
8648 | ||
ab22c1fa CF |
8649 | { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
8650 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } | |
ba479fd2 NN |
8651 | if test "${ac_cv_header_stdc+set}" = set; then |
8652 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8653 | else |
ba479fd2 | 8654 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8655 | /* confdefs.h. */ |
8656 | _ACEOF | |
8657 | cat confdefs.h >>conftest.$ac_ext | |
8658 | cat >>conftest.$ac_ext <<_ACEOF | |
8659 | /* end confdefs.h. */ | |
956d6950 JL |
8660 | #include <stdlib.h> |
8661 | #include <stdarg.h> | |
8662 | #include <string.h> | |
8663 | #include <float.h> | |
ba479fd2 NN |
8664 | |
8665 | int | |
8666 | main () | |
8667 | { | |
8668 | ||
8669 | ; | |
8670 | return 0; | |
8671 | } | |
8672 | _ACEOF | |
8673 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
8674 | if { (ac_try="$ac_compile" |
8675 | case "(($ac_try" in | |
8676 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8677 | *) ac_try_echo=$ac_try;; | |
8678 | esac | |
8679 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8680 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8681 | ac_status=$? |
86da66b5 HPN |
8682 | grep -v '^ *+' conftest.er1 >conftest.err |
8683 | rm -f conftest.er1 | |
8684 | cat conftest.err >&5 | |
ba479fd2 | 8685 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
8686 | (exit $ac_status); } && { |
8687 | test -z "$ac_c_werror_flag" || | |
8688 | test ! -s conftest.err | |
8689 | } && test -s conftest.$ac_objext; then | |
956d6950 JL |
8690 | ac_cv_header_stdc=yes |
8691 | else | |
ba479fd2 NN |
8692 | echo "$as_me: failed program was:" >&5 |
8693 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8694 | ||
ab22c1fa | 8695 | ac_cv_header_stdc=no |
956d6950 | 8696 | fi |
ab22c1fa CF |
8697 | |
8698 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
956d6950 JL |
8699 | |
8700 | if test $ac_cv_header_stdc = yes; then | |
8701 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 8702 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8703 | /* confdefs.h. */ |
8704 | _ACEOF | |
8705 | cat confdefs.h >>conftest.$ac_ext | |
8706 | cat >>conftest.$ac_ext <<_ACEOF | |
8707 | /* end confdefs.h. */ | |
956d6950 | 8708 | #include <string.h> |
ba479fd2 NN |
8709 | |
8710 | _ACEOF | |
956d6950 | 8711 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8712 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
8713 | : |
8714 | else | |
956d6950 JL |
8715 | ac_cv_header_stdc=no |
8716 | fi | |
8717 | rm -f conftest* | |
8718 | ||
8719 | fi | |
8720 | ||
8721 | if test $ac_cv_header_stdc = yes; then | |
8722 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 8723 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8724 | /* confdefs.h. */ |
8725 | _ACEOF | |
8726 | cat confdefs.h >>conftest.$ac_ext | |
8727 | cat >>conftest.$ac_ext <<_ACEOF | |
8728 | /* end confdefs.h. */ | |
956d6950 | 8729 | #include <stdlib.h> |
ba479fd2 NN |
8730 | |
8731 | _ACEOF | |
956d6950 | 8732 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8733 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
8734 | : |
8735 | else | |
956d6950 JL |
8736 | ac_cv_header_stdc=no |
8737 | fi | |
8738 | rm -f conftest* | |
8739 | ||
8740 | fi | |
8741 | ||
8742 | if test $ac_cv_header_stdc = yes; then | |
8743 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 8744 | if test "$cross_compiling" = yes; then |
956d6950 JL |
8745 | : |
8746 | else | |
ba479fd2 | 8747 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8748 | /* confdefs.h. */ |
8749 | _ACEOF | |
8750 | cat confdefs.h >>conftest.$ac_ext | |
8751 | cat >>conftest.$ac_ext <<_ACEOF | |
8752 | /* end confdefs.h. */ | |
956d6950 | 8753 | #include <ctype.h> |
ab22c1fa | 8754 | #include <stdlib.h> |
ba479fd2 NN |
8755 | #if ((' ' & 0x0FF) == 0x020) |
8756 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8757 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8758 | #else | |
8759 | # define ISLOWER(c) \ | |
86da66b5 HPN |
8760 | (('a' <= (c) && (c) <= 'i') \ |
8761 | || ('j' <= (c) && (c) <= 'r') \ | |
8762 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
8763 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
8764 | #endif | |
63cf211a | 8765 | |
ba479fd2 NN |
8766 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
8767 | int | |
8768 | main () | |
8769 | { | |
8770 | int i; | |
8771 | for (i = 0; i < 256; i++) | |
8772 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 8773 | || toupper (i) != TOUPPER (i)) |
ab22c1fa CF |
8774 | return 2; |
8775 | return 0; | |
ba479fd2 NN |
8776 | } |
8777 | _ACEOF | |
8778 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
8779 | if { (ac_try="$ac_link" |
8780 | case "(($ac_try" in | |
8781 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8782 | *) ac_try_echo=$ac_try;; | |
8783 | esac | |
8784 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8785 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
8786 | ac_status=$? |
8787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8788 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
8789 | { (case "(($ac_try" in |
8790 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8791 | *) ac_try_echo=$ac_try;; | |
8792 | esac | |
8793 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8794 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
8795 | ac_status=$? |
8796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8797 | (exit $ac_status); }; }; then | |
956d6950 JL |
8798 | : |
8799 | else | |
ba479fd2 NN |
8800 | echo "$as_me: program exited with status $ac_status" >&5 |
8801 | echo "$as_me: failed program was:" >&5 | |
8802 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8803 | ||
8804 | ( exit $ac_status ) | |
8805 | ac_cv_header_stdc=no | |
956d6950 | 8806 | fi |
ab22c1fa | 8807 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8808 | fi |
ab22c1fa CF |
8809 | |
8810 | ||
956d6950 JL |
8811 | fi |
8812 | fi | |
ab22c1fa CF |
8813 | { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
8814 | echo "${ECHO_T}$ac_cv_header_stdc" >&6; } | |
63cf211a | 8815 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
8816 | |
8817 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8818 | #define STDC_HEADERS 1 |
ba479fd2 | 8819 | _ACEOF |
956d6950 JL |
8820 | |
8821 | fi | |
8822 | ||
ab22c1fa CF |
8823 | { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
8824 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } | |
ba479fd2 NN |
8825 | if test "${ac_cv_header_time+set}" = set; then |
8826 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8827 | else |
ba479fd2 | 8828 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8829 | /* confdefs.h. */ |
8830 | _ACEOF | |
8831 | cat confdefs.h >>conftest.$ac_ext | |
8832 | cat >>conftest.$ac_ext <<_ACEOF | |
8833 | /* end confdefs.h. */ | |
956d6950 JL |
8834 | #include <sys/types.h> |
8835 | #include <sys/time.h> | |
8836 | #include <time.h> | |
ba479fd2 NN |
8837 | |
8838 | int | |
8839 | main () | |
8840 | { | |
8841 | if ((struct tm *) 0) | |
8842 | return 0; | |
8843 | ; | |
8844 | return 0; | |
8845 | } | |
8846 | _ACEOF | |
8847 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
8848 | if { (ac_try="$ac_compile" |
8849 | case "(($ac_try" in | |
8850 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8851 | *) ac_try_echo=$ac_try;; | |
8852 | esac | |
8853 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8854 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8855 | ac_status=$? |
86da66b5 HPN |
8856 | grep -v '^ *+' conftest.er1 >conftest.err |
8857 | rm -f conftest.er1 | |
8858 | cat conftest.err >&5 | |
ba479fd2 | 8859 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
8860 | (exit $ac_status); } && { |
8861 | test -z "$ac_c_werror_flag" || | |
8862 | test ! -s conftest.err | |
8863 | } && test -s conftest.$ac_objext; then | |
956d6950 JL |
8864 | ac_cv_header_time=yes |
8865 | else | |
ba479fd2 NN |
8866 | echo "$as_me: failed program was:" >&5 |
8867 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8868 | ||
ab22c1fa | 8869 | ac_cv_header_time=no |
956d6950 | 8870 | fi |
ab22c1fa CF |
8871 | |
8872 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
956d6950 | 8873 | fi |
ab22c1fa CF |
8874 | { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
8875 | echo "${ECHO_T}$ac_cv_header_time" >&6; } | |
63cf211a | 8876 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
8877 | |
8878 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8879 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 8880 | _ACEOF |
956d6950 JL |
8881 | |
8882 | fi | |
8883 | ||
ab22c1fa CF |
8884 | { echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8885 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6; } | |
18fc9bd4 RG |
8886 | if test "${gcc_cv_header_string+set}" = set; then |
8887 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8888 | else | |
8889 | cat >conftest.$ac_ext <<_ACEOF | |
8890 | /* confdefs.h. */ | |
8891 | _ACEOF | |
8892 | cat confdefs.h >>conftest.$ac_ext | |
8893 | cat >>conftest.$ac_ext <<_ACEOF | |
8894 | /* end confdefs.h. */ | |
8895 | #include <string.h> | |
8896 | #include <strings.h> | |
8897 | int | |
8898 | main () | |
8899 | { | |
8900 | ||
8901 | ; | |
8902 | return 0; | |
8903 | } | |
8904 | _ACEOF | |
8905 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
8906 | if { (ac_try="$ac_compile" |
8907 | case "(($ac_try" in | |
8908 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8909 | *) ac_try_echo=$ac_try;; | |
8910 | esac | |
8911 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8912 | (eval "$ac_compile") 2>conftest.er1 | |
18fc9bd4 RG |
8913 | ac_status=$? |
8914 | grep -v '^ *+' conftest.er1 >conftest.err | |
8915 | rm -f conftest.er1 | |
8916 | cat conftest.err >&5 | |
8917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
8918 | (exit $ac_status); } && { |
8919 | test -z "$ac_c_werror_flag" || | |
8920 | test ! -s conftest.err | |
8921 | } && test -s conftest.$ac_objext; then | |
18fc9bd4 RG |
8922 | gcc_cv_header_string=yes |
8923 | else | |
8924 | echo "$as_me: failed program was:" >&5 | |
8925 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8926 | ||
ab22c1fa | 8927 | gcc_cv_header_string=no |
18fc9bd4 | 8928 | fi |
ab22c1fa CF |
8929 | |
8930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18fc9bd4 | 8931 | fi |
ab22c1fa CF |
8932 | { echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 |
8933 | echo "${ECHO_T}$gcc_cv_header_string" >&6; } | |
18fc9bd4 RG |
8934 | if test $gcc_cv_header_string = yes; then |
8935 | ||
8936 | cat >>confdefs.h <<\_ACEOF | |
8937 | #define STRING_WITH_STRINGS 1 | |
8938 | _ACEOF | |
8939 | ||
8940 | fi | |
8941 | ||
ab22c1fa CF |
8942 | { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8943 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } | |
ba479fd2 NN |
8944 | if test "${ac_cv_header_sys_wait_h+set}" = set; then |
8945 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8946 | else |
ba479fd2 | 8947 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8948 | /* confdefs.h. */ |
8949 | _ACEOF | |
8950 | cat confdefs.h >>conftest.$ac_ext | |
8951 | cat >>conftest.$ac_ext <<_ACEOF | |
8952 | /* end confdefs.h. */ | |
e9831ca0 KG |
8953 | #include <sys/types.h> |
8954 | #include <sys/wait.h> | |
8955 | #ifndef WEXITSTATUS | |
ab22c1fa | 8956 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) |
e9831ca0 KG |
8957 | #endif |
8958 | #ifndef WIFEXITED | |
ba479fd2 | 8959 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8960 | #endif |
ba479fd2 NN |
8961 | |
8962 | int | |
8963 | main () | |
8964 | { | |
8965 | int s; | |
8966 | wait (&s); | |
8967 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8968 | ; | |
8969 | return 0; | |
8970 | } | |
8971 | _ACEOF | |
8972 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
8973 | if { (ac_try="$ac_compile" |
8974 | case "(($ac_try" in | |
8975 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
8976 | *) ac_try_echo=$ac_try;; | |
8977 | esac | |
8978 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
8979 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 8980 | ac_status=$? |
86da66b5 HPN |
8981 | grep -v '^ *+' conftest.er1 >conftest.err |
8982 | rm -f conftest.er1 | |
8983 | cat conftest.err >&5 | |
ba479fd2 | 8984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
8985 | (exit $ac_status); } && { |
8986 | test -z "$ac_c_werror_flag" || | |
8987 | test ! -s conftest.err | |
8988 | } && test -s conftest.$ac_objext; then | |
e9831ca0 KG |
8989 | ac_cv_header_sys_wait_h=yes |
8990 | else | |
ba479fd2 NN |
8991 | echo "$as_me: failed program was:" >&5 |
8992 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8993 | ||
ab22c1fa | 8994 | ac_cv_header_sys_wait_h=no |
e9831ca0 | 8995 | fi |
ab22c1fa CF |
8996 | |
8997 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
e9831ca0 | 8998 | fi |
ab22c1fa CF |
8999 | { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
9000 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } | |
63cf211a | 9001 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
9002 | |
9003 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 9004 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 9005 | _ACEOF |
6e3f3080 | 9006 | |
63cf211a | 9007 | fi |
6e3f3080 | 9008 | |
ba479fd2 NN |
9009 | |
9010 | ||
9011 | ||
9012 | ||
9013 | ||
9014 | ||
9015 | ||
9016 | ||
9017 | ||
9018 | ||
9019 | ||
9020 | ||
9021 | ||
9022 | ||
9023 | ||
9024 | ||
9025 | ||
9026 | ||
9027 | ||
9028 | ||
9029 | ||
dfb77e37 KC |
9030 | |
9031 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 9032 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 9033 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 9034 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 9035 | do |
ba479fd2 | 9036 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ab22c1fa CF |
9037 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
9038 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } | |
9039 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 | 9040 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
ba479fd2 | 9041 | else |
18fc9bd4 | 9042 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9043 | /* confdefs.h. */ |
9044 | _ACEOF | |
9045 | cat confdefs.h >>conftest.$ac_ext | |
9046 | cat >>conftest.$ac_ext <<_ACEOF | |
9047 | /* end confdefs.h. */ | |
9048 | #include <$ac_header> | |
9049 | _ACEOF | |
ab22c1fa CF |
9050 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
9051 | case "(($ac_try" in | |
9052 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9053 | *) ac_try_echo=$ac_try;; | |
9054 | esac | |
9055 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9056 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
9057 | ac_status=$? |
9058 | grep -v '^ *+' conftest.er1 >conftest.err | |
9059 | rm -f conftest.er1 | |
9060 | cat conftest.err >&5 | |
9061 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
9062 | (exit $ac_status); } >/dev/null && { |
9063 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
9064 | test ! -s conftest.err | |
9065 | }; then | |
18fc9bd4 | 9066 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
9067 | else |
9068 | echo "$as_me: failed program was:" >&5 | |
9069 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9070 | ||
18fc9bd4 | 9071 | eval "$as_ac_Header=no" |
ba479fd2 | 9072 | fi |
ab22c1fa | 9073 | |
ba479fd2 | 9074 | rm -f conftest.err conftest.$ac_ext |
6e3f3080 | 9075 | fi |
ab22c1fa CF |
9076 | ac_res=`eval echo '${'$as_ac_Header'}'` |
9077 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
9078 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
9079 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
9080 | cat >>confdefs.h <<_ACEOF | |
9081 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9082 | _ACEOF | |
9083 | ||
956d6950 JL |
9084 | fi |
9085 | done | |
9086 | ||
9087 | ||
f24af81b | 9088 | # Check for thread headers. |
ab22c1fa CF |
9089 | { echo "$as_me:$LINENO: checking for thread.h" >&5 |
9090 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
9091 | if test "${ac_cv_header_thread_h+set}" = set; then |
9092 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 9093 | else |
18fc9bd4 | 9094 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9095 | /* confdefs.h. */ |
9096 | _ACEOF | |
9097 | cat confdefs.h >>conftest.$ac_ext | |
9098 | cat >>conftest.$ac_ext <<_ACEOF | |
9099 | /* end confdefs.h. */ | |
9100 | #include <thread.h> | |
9101 | _ACEOF | |
ab22c1fa CF |
9102 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
9103 | case "(($ac_try" in | |
9104 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9105 | *) ac_try_echo=$ac_try;; | |
9106 | esac | |
9107 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9108 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
9109 | ac_status=$? |
9110 | grep -v '^ *+' conftest.er1 >conftest.err | |
9111 | rm -f conftest.er1 | |
9112 | cat conftest.err >&5 | |
9113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
9114 | (exit $ac_status); } >/dev/null && { |
9115 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
9116 | test ! -s conftest.err | |
9117 | }; then | |
18fc9bd4 | 9118 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
9119 | else |
9120 | echo "$as_me: failed program was:" >&5 | |
9121 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9122 | ||
18fc9bd4 | 9123 | ac_cv_header_thread_h=no |
ba479fd2 | 9124 | fi |
ab22c1fa | 9125 | |
ba479fd2 | 9126 | rm -f conftest.err conftest.$ac_ext |
6e3f3080 | 9127 | fi |
ab22c1fa CF |
9128 | { echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
9129 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6; } | |
ba479fd2 | 9130 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
9131 | have_thread_h=yes |
9132 | else | |
ba479fd2 | 9133 | have_thread_h= |
f24af81b TT |
9134 | fi |
9135 | ||
ab22c1fa CF |
9136 | { echo "$as_me:$LINENO: checking for pthread.h" >&5 |
9137 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
9138 | if test "${ac_cv_header_pthread_h+set}" = set; then |
9139 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 9140 | else |
18fc9bd4 | 9141 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9142 | /* confdefs.h. */ |
9143 | _ACEOF | |
9144 | cat confdefs.h >>conftest.$ac_ext | |
9145 | cat >>conftest.$ac_ext <<_ACEOF | |
9146 | /* end confdefs.h. */ | |
9147 | #include <pthread.h> | |
9148 | _ACEOF | |
ab22c1fa CF |
9149 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
9150 | case "(($ac_try" in | |
9151 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9152 | *) ac_try_echo=$ac_try;; | |
9153 | esac | |
9154 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9155 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
9156 | ac_status=$? |
9157 | grep -v '^ *+' conftest.er1 >conftest.err | |
9158 | rm -f conftest.er1 | |
9159 | cat conftest.err >&5 | |
9160 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
9161 | (exit $ac_status); } >/dev/null && { |
9162 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
9163 | test ! -s conftest.err | |
9164 | }; then | |
18fc9bd4 | 9165 | ac_cv_header_pthread_h=yes |
ba479fd2 | 9166 | else |
18fc9bd4 RG |
9167 | echo "$as_me: failed program was:" >&5 |
9168 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9169 | ||
9170 | ac_cv_header_pthread_h=no | |
9171 | fi | |
ab22c1fa | 9172 | |
18fc9bd4 | 9173 | rm -f conftest.err conftest.$ac_ext |
6e3f3080 | 9174 | fi |
ab22c1fa CF |
9175 | { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
9176 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } | |
ba479fd2 | 9177 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
9178 | have_pthread_h=yes |
9179 | else | |
ba479fd2 | 9180 | have_pthread_h= |
f24af81b TT |
9181 | fi |
9182 | ||
9183 | ||
84c041a1 | 9184 | # These tests can't be done till we know if we have limits.h. |
ab22c1fa CF |
9185 | { echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
9186 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6; } | |
ba479fd2 NN |
9187 | if test "${gcc_cv_decl_char_bit+set}" = set; then |
9188 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9189 | else | |
9190 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9191 | /* confdefs.h. */ |
9192 | _ACEOF | |
9193 | cat confdefs.h >>conftest.$ac_ext | |
9194 | cat >>conftest.$ac_ext <<_ACEOF | |
9195 | /* end confdefs.h. */ | |
75e93faa ZW |
9196 | #ifdef HAVE_LIMITS_H |
9197 | #include <limits.h> | |
9198 | #endif | |
9199 | #ifdef CHAR_BIT | |
9200 | found | |
9201 | #endif | |
ba479fd2 | 9202 | _ACEOF |
75e93faa | 9203 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9204 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
9205 | gcc_cv_decl_char_bit=yes |
9206 | else | |
75e93faa ZW |
9207 | gcc_cv_decl_char_bit=no |
9208 | fi | |
9209 | rm -f conftest* | |
9210 | ||
9211 | ||
9212 | fi | |
ab22c1fa CF |
9213 | { echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
9214 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6; } | |
75e93faa | 9215 | if test $gcc_cv_decl_char_bit = no; then |
ab22c1fa CF |
9216 | { echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
9217 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6; } | |
ba479fd2 NN |
9218 | if test "${gcc_cv_c_nbby+set}" = set; then |
9219 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
9220 | else |
9221 | i=8 | |
9222 | gcc_cv_c_nbby= | |
9223 | while test $i -lt 65; do | |
ba479fd2 | 9224 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9225 | /* confdefs.h. */ |
9226 | _ACEOF | |
9227 | cat confdefs.h >>conftest.$ac_ext | |
9228 | cat >>conftest.$ac_ext <<_ACEOF | |
9229 | /* end confdefs.h. */ | |
9230 | ||
9231 | int | |
9232 | main () | |
9233 | { | |
4e70264f ZW |
9234 | switch(0) { |
9235 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
9236 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
9237 | ; } | |
ba479fd2 NN |
9238 | ; |
9239 | return 0; | |
9240 | } | |
9241 | _ACEOF | |
9242 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
9243 | if { (ac_try="$ac_compile" |
9244 | case "(($ac_try" in | |
9245 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9246 | *) ac_try_echo=$ac_try;; | |
9247 | esac | |
9248 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9249 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 9250 | ac_status=$? |
86da66b5 HPN |
9251 | grep -v '^ *+' conftest.er1 >conftest.err |
9252 | rm -f conftest.er1 | |
9253 | cat conftest.err >&5 | |
ba479fd2 | 9254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
9255 | (exit $ac_status); } && { |
9256 | test -z "$ac_c_werror_flag" || | |
9257 | test ! -s conftest.err | |
9258 | } && test -s conftest.$ac_objext; then | |
4e70264f | 9259 | gcc_cv_c_nbby=$i; break |
75e93faa | 9260 | else |
ba479fd2 NN |
9261 | echo "$as_me: failed program was:" >&5 |
9262 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9263 | ||
ab22c1fa | 9264 | |
75e93faa | 9265 | fi |
ab22c1fa CF |
9266 | |
9267 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
75e93faa ZW |
9268 | i=`expr $i + 1` |
9269 | done | |
9270 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
9271 | ||
9272 | fi | |
ab22c1fa CF |
9273 | { echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
9274 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6; } | |
75e93faa | 9275 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
9276 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
9277 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
9278 | { (exit 1); exit 1; }; } | |
75e93faa | 9279 | else |
ba479fd2 NN |
9280 | |
9281 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 9282 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 9283 | _ACEOF |
75e93faa ZW |
9284 | |
9285 | fi | |
9286 | fi | |
ab22c1fa CF |
9287 | { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
9288 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } | |
ba479fd2 NN |
9289 | if test "${ac_cv_c_bigendian+set}" = set; then |
9290 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 9291 | else |
9791c75c | 9292 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 9293 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9294 | /* confdefs.h. */ |
9295 | _ACEOF | |
9296 | cat confdefs.h >>conftest.$ac_ext | |
9297 | cat >>conftest.$ac_ext <<_ACEOF | |
9298 | /* end confdefs.h. */ | |
4977bab6 ZW |
9299 | #include <sys/types.h> |
9300 | #include <sys/param.h> | |
9791c75c | 9301 | |
ba479fd2 NN |
9302 | int |
9303 | main () | |
9304 | { | |
ab22c1fa CF |
9305 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ |
9306 | && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) | |
4977bab6 | 9307 | bogus endian macros |
84c041a1 | 9308 | #endif |
9791c75c | 9309 | |
ba479fd2 NN |
9310 | ; |
9311 | return 0; | |
9312 | } | |
9313 | _ACEOF | |
9314 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
9315 | if { (ac_try="$ac_compile" |
9316 | case "(($ac_try" in | |
9317 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9318 | *) ac_try_echo=$ac_try;; | |
9319 | esac | |
9320 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9321 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 9322 | ac_status=$? |
86da66b5 HPN |
9323 | grep -v '^ *+' conftest.er1 >conftest.err |
9324 | rm -f conftest.er1 | |
9325 | cat conftest.err >&5 | |
ba479fd2 | 9326 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
9327 | (exit $ac_status); } && { |
9328 | test -z "$ac_c_werror_flag" || | |
9329 | test ! -s conftest.err | |
9330 | } && test -s conftest.$ac_objext; then | |
4977bab6 | 9331 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 9332 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9333 | /* confdefs.h. */ |
9334 | _ACEOF | |
9335 | cat confdefs.h >>conftest.$ac_ext | |
9336 | cat >>conftest.$ac_ext <<_ACEOF | |
9337 | /* end confdefs.h. */ | |
4977bab6 ZW |
9338 | #include <sys/types.h> |
9339 | #include <sys/param.h> | |
9791c75c | 9340 | |
ba479fd2 NN |
9341 | int |
9342 | main () | |
9343 | { | |
4977bab6 ZW |
9344 | #if BYTE_ORDER != BIG_ENDIAN |
9345 | not big endian | |
84c041a1 | 9346 | #endif |
9791c75c | 9347 | |
ba479fd2 NN |
9348 | ; |
9349 | return 0; | |
9350 | } | |
9351 | _ACEOF | |
9352 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
9353 | if { (ac_try="$ac_compile" |
9354 | case "(($ac_try" in | |
9355 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9356 | *) ac_try_echo=$ac_try;; | |
9357 | esac | |
9358 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9359 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 9360 | ac_status=$? |
86da66b5 HPN |
9361 | grep -v '^ *+' conftest.er1 >conftest.err |
9362 | rm -f conftest.er1 | |
9363 | cat conftest.err >&5 | |
ba479fd2 | 9364 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
9365 | (exit $ac_status); } && { |
9366 | test -z "$ac_c_werror_flag" || | |
9367 | test ! -s conftest.err | |
9368 | } && test -s conftest.$ac_objext; then | |
4977bab6 ZW |
9369 | ac_cv_c_bigendian=yes |
9370 | else | |
ba479fd2 NN |
9371 | echo "$as_me: failed program was:" >&5 |
9372 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9373 | ||
ab22c1fa | 9374 | ac_cv_c_bigendian=no |
4977bab6 | 9375 | fi |
ab22c1fa CF |
9376 | |
9377 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4977bab6 | 9378 | else |
ba479fd2 NN |
9379 | echo "$as_me: failed program was:" >&5 |
9380 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9381 | ||
ab22c1fa | 9382 | # It does not; compile a test program. |
9791c75c KC |
9383 | if test "$cross_compiling" = yes; then |
9384 | # try to guess the endianness by grepping values into an object file | |
9385 | ac_cv_c_bigendian=unknown | |
9386 | cat >conftest.$ac_ext <<_ACEOF | |
9387 | /* confdefs.h. */ | |
9388 | _ACEOF | |
9389 | cat confdefs.h >>conftest.$ac_ext | |
9390 | cat >>conftest.$ac_ext <<_ACEOF | |
9391 | /* end confdefs.h. */ | |
ab22c1fa CF |
9392 | short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
9393 | short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9791c75c | 9394 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } |
ab22c1fa CF |
9395 | short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; |
9396 | short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9791c75c KC |
9397 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } |
9398 | int | |
9399 | main () | |
9400 | { | |
9401 | _ascii (); _ebcdic (); | |
9402 | ; | |
9403 | return 0; | |
9404 | } | |
9405 | _ACEOF | |
9406 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
9407 | if { (ac_try="$ac_compile" |
9408 | case "(($ac_try" in | |
9409 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9410 | *) ac_try_echo=$ac_try;; | |
9411 | esac | |
9412 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9413 | (eval "$ac_compile") 2>conftest.er1 | |
9791c75c KC |
9414 | ac_status=$? |
9415 | grep -v '^ *+' conftest.er1 >conftest.err | |
9416 | rm -f conftest.er1 | |
9417 | cat conftest.err >&5 | |
9418 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
9419 | (exit $ac_status); } && { |
9420 | test -z "$ac_c_werror_flag" || | |
9421 | test ! -s conftest.err | |
9422 | } && test -s conftest.$ac_objext; then | |
8b1f719a PB |
9423 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then |
9424 | ac_cv_c_bigendian=yes | |
9425 | fi | |
9791c75c KC |
9426 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then |
9427 | if test "$ac_cv_c_bigendian" = unknown; then | |
9428 | ac_cv_c_bigendian=no | |
9429 | else | |
9430 | # finding both strings is unlikely to happen, but who knows? | |
9431 | ac_cv_c_bigendian=unknown | |
9432 | fi | |
9433 | fi | |
9434 | else | |
9435 | echo "$as_me: failed program was:" >&5 | |
9436 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9437 | ||
ab22c1fa | 9438 | |
4977bab6 | 9439 | fi |
ab22c1fa CF |
9440 | |
9441 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
ba479fd2 NN |
9442 | else |
9443 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9444 | /* confdefs.h. */ |
9445 | _ACEOF | |
9446 | cat confdefs.h >>conftest.$ac_ext | |
9447 | cat >>conftest.$ac_ext <<_ACEOF | |
9448 | /* end confdefs.h. */ | |
ab22c1fa | 9449 | $ac_includes_default |
9791c75c KC |
9450 | int |
9451 | main () | |
9452 | { | |
ab22c1fa | 9453 | |
4977bab6 ZW |
9454 | /* Are we little or big endian? From Harbison&Steele. */ |
9455 | union | |
9456 | { | |
ab22c1fa CF |
9457 | long int l; |
9458 | char c[sizeof (long int)]; | |
4977bab6 ZW |
9459 | } u; |
9460 | u.l = 1; | |
ab22c1fa CF |
9461 | return u.c[sizeof (long int) - 1] == 1; |
9462 | ||
9463 | ; | |
9464 | return 0; | |
4977bab6 | 9465 | } |
ba479fd2 NN |
9466 | _ACEOF |
9467 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
9468 | if { (ac_try="$ac_link" |
9469 | case "(($ac_try" in | |
9470 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9471 | *) ac_try_echo=$ac_try;; | |
9472 | esac | |
9473 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9474 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
9475 | ac_status=$? |
9476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9477 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
9478 | { (case "(($ac_try" in |
9479 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9480 | *) ac_try_echo=$ac_try;; | |
9481 | esac | |
9482 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9483 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
9484 | ac_status=$? |
9485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9486 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
9487 | ac_cv_c_bigendian=no |
9488 | else | |
ba479fd2 NN |
9489 | echo "$as_me: program exited with status $ac_status" >&5 |
9490 | echo "$as_me: failed program was:" >&5 | |
9491 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9492 | ||
9493 | ( exit $ac_status ) | |
9494 | ac_cv_c_bigendian=yes | |
4977bab6 | 9495 | fi |
ab22c1fa | 9496 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 9497 | fi |
ab22c1fa CF |
9498 | |
9499 | ||
4977bab6 | 9500 | fi |
ab22c1fa CF |
9501 | |
9502 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4977bab6 | 9503 | fi |
ab22c1fa CF |
9504 | { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
9505 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } | |
9791c75c KC |
9506 | case $ac_cv_c_bigendian in |
9507 | yes) | |
ba479fd2 NN |
9508 | |
9509 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 9510 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 9511 | _ACEOF |
9791c75c KC |
9512 | ;; |
9513 | no) | |
9514 | ;; | |
9515 | *) | |
9516 | { { echo "$as_me:$LINENO: error: unknown endianness | |
9517 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
9518 | echo "$as_me: error: unknown endianness | |
9519 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
9520 | { (exit 1); exit 1; }; } ;; | |
9521 | esac | |
84c041a1 | 9522 | |
75e93faa | 9523 | |
73458fb7 NN |
9524 | # -------- |
9525 | # UNSORTED | |
9526 | # -------- | |
1e608388 | 9527 | |
1e608388 | 9528 | |
4e70264f ZW |
9529 | # These libraries may be used by collect2. |
9530 | # We may need a special search path to get them linked. | |
ab22c1fa CF |
9531 | { echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
9532 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6; } | |
ba479fd2 NN |
9533 | if test "${gcc_cv_collect2_libs+set}" = set; then |
9534 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
9535 | else |
9536 | save_LIBS="$LIBS" | |
7f2749d4 | 9537 | for libs in '' -lld -lmld \ |
4e70264f ZW |
9538 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
9539 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
9540 | do | |
9541 | LIBS="$libs" | |
ba479fd2 | 9542 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9543 | /* confdefs.h. */ |
9544 | _ACEOF | |
9545 | cat confdefs.h >>conftest.$ac_ext | |
9546 | cat >>conftest.$ac_ext <<_ACEOF | |
9547 | /* end confdefs.h. */ | |
9548 | ||
ab22c1fa CF |
9549 | /* Override any GCC internal prototype to avoid an error. |
9550 | Use char because int might match the return type of a GCC | |
9551 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
9552 | #ifdef __cplusplus |
9553 | extern "C" | |
9554 | #endif | |
ba479fd2 NN |
9555 | char ldopen (); |
9556 | int | |
9557 | main () | |
9558 | { | |
ab22c1fa | 9559 | return ldopen (); |
ba479fd2 NN |
9560 | ; |
9561 | return 0; | |
9562 | } | |
9563 | _ACEOF | |
9564 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
9565 | if { (ac_try="$ac_link" |
9566 | case "(($ac_try" in | |
9567 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9568 | *) ac_try_echo=$ac_try;; | |
9569 | esac | |
9570 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9571 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 9572 | ac_status=$? |
86da66b5 HPN |
9573 | grep -v '^ *+' conftest.er1 >conftest.err |
9574 | rm -f conftest.er1 | |
9575 | cat conftest.err >&5 | |
ba479fd2 | 9576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
9577 | (exit $ac_status); } && { |
9578 | test -z "$ac_c_werror_flag" || | |
9579 | test ! -s conftest.err | |
9580 | } && test -s conftest$ac_exeext && | |
9581 | $as_test_x conftest$ac_exeext; then | |
4e70264f ZW |
9582 | gcc_cv_collect2_libs="$libs"; break |
9583 | else | |
ba479fd2 NN |
9584 | echo "$as_me: failed program was:" >&5 |
9585 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9586 | ||
ab22c1fa | 9587 | |
4e70264f | 9588 | fi |
ab22c1fa CF |
9589 | |
9590 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 9591 | conftest$ac_exeext conftest.$ac_ext |
4e70264f ZW |
9592 | done |
9593 | LIBS="$save_LIBS" | |
9594 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
9595 | fi | |
ab22c1fa CF |
9596 | { echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
9597 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6; } | |
4e70264f ZW |
9598 | case $gcc_cv_collect2_libs in |
9599 | "none required") ;; | |
9600 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
9601 | esac | |
9602 | ||
9603 | ||
7f2749d4 RK |
9604 | # When building Ada code on Alpha, we need exc_resume which is usually in |
9605 | # -lexc. So test for it. | |
9606 | save_LIBS="$LIBS" | |
9607 | LIBS= | |
ab22c1fa CF |
9608 | { echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
9609 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6; } | |
ba479fd2 NN |
9610 | if test "${ac_cv_search_exc_resume+set}" = set; then |
9611 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9612 | else | |
9613 | ac_func_search_save_LIBS=$LIBS | |
ba479fd2 | 9614 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9615 | /* confdefs.h. */ |
9616 | _ACEOF | |
9617 | cat confdefs.h >>conftest.$ac_ext | |
9618 | cat >>conftest.$ac_ext <<_ACEOF | |
9619 | /* end confdefs.h. */ | |
7f2749d4 | 9620 | |
ab22c1fa CF |
9621 | /* Override any GCC internal prototype to avoid an error. |
9622 | Use char because int might match the return type of a GCC | |
9623 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
9624 | #ifdef __cplusplus |
9625 | extern "C" | |
9626 | #endif | |
ba479fd2 NN |
9627 | char exc_resume (); |
9628 | int | |
9629 | main () | |
9630 | { | |
ab22c1fa | 9631 | return exc_resume (); |
ba479fd2 NN |
9632 | ; |
9633 | return 0; | |
9634 | } | |
9635 | _ACEOF | |
ab22c1fa CF |
9636 | for ac_lib in '' exc; do |
9637 | if test -z "$ac_lib"; then | |
9638 | ac_res="none required" | |
9639 | else | |
9640 | ac_res=-l$ac_lib | |
9641 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9642 | fi | |
9643 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9644 | if { (ac_try="$ac_link" | |
9645 | case "(($ac_try" in | |
9646 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9647 | *) ac_try_echo=$ac_try;; | |
9648 | esac | |
9649 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9650 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 9651 | ac_status=$? |
86da66b5 HPN |
9652 | grep -v '^ *+' conftest.er1 >conftest.err |
9653 | rm -f conftest.er1 | |
9654 | cat conftest.err >&5 | |
ba479fd2 | 9655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
9656 | (exit $ac_status); } && { |
9657 | test -z "$ac_c_werror_flag" || | |
9658 | test ! -s conftest.err | |
9659 | } && test -s conftest$ac_exeext && | |
9660 | $as_test_x conftest$ac_exeext; then | |
9661 | ac_cv_search_exc_resume=$ac_res | |
7f2749d4 | 9662 | else |
ba479fd2 NN |
9663 | echo "$as_me: failed program was:" >&5 |
9664 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9665 | ||
8b1f719a | 9666 | |
ab22c1fa | 9667 | fi |
a3bba767 | 9668 | |
ab22c1fa CF |
9669 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
9670 | conftest$ac_exeext | |
9671 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
9672 | break | |
a3bba767 | 9673 | fi |
ab22c1fa CF |
9674 | done |
9675 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
9676 | : | |
9677 | else | |
9678 | ac_cv_search_exc_resume=no | |
b8ec3cc8 | 9679 | fi |
ab22c1fa | 9680 | rm conftest.$ac_ext |
b8ec3cc8 EC |
9681 | LIBS=$ac_func_search_save_LIBS |
9682 | fi | |
ab22c1fa CF |
9683 | { echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 |
9684 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6; } | |
9685 | ac_res=$ac_cv_search_exc_resume | |
9686 | if test "$ac_res" != no; then | |
9687 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b8ec3cc8 EC |
9688 | |
9689 | fi | |
9690 | ||
dd7f7a6e | 9691 | GNAT_LIBEXC="$LIBS" |
b8ec3cc8 EC |
9692 | LIBS="$save_LIBS" |
9693 | ||
9694 | ||
dd7f7a6e EC |
9695 | # Some systems put ldexp and frexp in libm instead of libc; assume |
9696 | # they're both in the same place. jcf-dump needs them. | |
9697 | save_LIBS="$LIBS" | |
9698 | LIBS= | |
ab22c1fa CF |
9699 | { echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
9700 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6; } | |
dd7f7a6e | 9701 | if test "${ac_cv_search_ldexp+set}" = set; then |
b8ec3cc8 EC |
9702 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9703 | else | |
dd7f7a6e | 9704 | ac_func_search_save_LIBS=$LIBS |
dd7f7a6e | 9705 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9706 | /* confdefs.h. */ |
9707 | _ACEOF | |
9708 | cat confdefs.h >>conftest.$ac_ext | |
9709 | cat >>conftest.$ac_ext <<_ACEOF | |
9710 | /* end confdefs.h. */ | |
dd7f7a6e | 9711 | |
ab22c1fa CF |
9712 | /* Override any GCC internal prototype to avoid an error. |
9713 | Use char because int might match the return type of a GCC | |
9714 | builtin and then its argument prototype would still apply. */ | |
dd7f7a6e EC |
9715 | #ifdef __cplusplus |
9716 | extern "C" | |
9717 | #endif | |
dd7f7a6e | 9718 | char ldexp (); |
ba479fd2 NN |
9719 | int |
9720 | main () | |
9721 | { | |
ab22c1fa | 9722 | return ldexp (); |
ba479fd2 NN |
9723 | ; |
9724 | return 0; | |
9725 | } | |
9726 | _ACEOF | |
ab22c1fa CF |
9727 | for ac_lib in '' m; do |
9728 | if test -z "$ac_lib"; then | |
9729 | ac_res="none required" | |
9730 | else | |
9731 | ac_res=-l$ac_lib | |
9732 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9733 | fi | |
9734 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9735 | if { (ac_try="$ac_link" | |
9736 | case "(($ac_try" in | |
9737 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9738 | *) ac_try_echo=$ac_try;; | |
9739 | esac | |
9740 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9741 | (eval "$ac_link") 2>conftest.er1 | |
dd7f7a6e EC |
9742 | ac_status=$? |
9743 | grep -v '^ *+' conftest.er1 >conftest.err | |
9744 | rm -f conftest.er1 | |
9745 | cat conftest.err >&5 | |
9746 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
9747 | (exit $ac_status); } && { |
9748 | test -z "$ac_c_werror_flag" || | |
9749 | test ! -s conftest.err | |
9750 | } && test -s conftest$ac_exeext && | |
9751 | $as_test_x conftest$ac_exeext; then | |
9752 | ac_cv_search_ldexp=$ac_res | |
dd7f7a6e EC |
9753 | else |
9754 | echo "$as_me: failed program was:" >&5 | |
9755 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9756 | ||
8b1f719a | 9757 | |
ab22c1fa | 9758 | fi |
a3bba767 | 9759 | |
ab22c1fa CF |
9760 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
9761 | conftest$ac_exeext | |
9762 | if test "${ac_cv_search_ldexp+set}" = set; then | |
9763 | break | |
a3bba767 | 9764 | fi |
ab22c1fa CF |
9765 | done |
9766 | if test "${ac_cv_search_ldexp+set}" = set; then | |
9767 | : | |
9768 | else | |
9769 | ac_cv_search_ldexp=no | |
dd7f7a6e | 9770 | fi |
ab22c1fa | 9771 | rm conftest.$ac_ext |
dd7f7a6e EC |
9772 | LIBS=$ac_func_search_save_LIBS |
9773 | fi | |
ab22c1fa CF |
9774 | { echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 |
9775 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6; } | |
9776 | ac_res=$ac_cv_search_ldexp | |
9777 | if test "$ac_res" != no; then | |
9778 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
9779 | |
9780 | fi | |
9781 | ||
9782 | LDEXP_LIB="$LIBS" | |
9783 | LIBS="$save_LIBS" | |
9784 | ||
9785 | ||
9786 | # Use <inttypes.h> only if it exists, | |
9787 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ab22c1fa CF |
9788 | { echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9789 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; } | |
dd7f7a6e EC |
9790 | if test "${gcc_cv_header_inttypes_h+set}" = set; then |
9791 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9792 | else | |
9793 | cat >conftest.$ac_ext <<_ACEOF | |
9794 | /* confdefs.h. */ | |
9795 | _ACEOF | |
9796 | cat confdefs.h >>conftest.$ac_ext | |
9797 | cat >>conftest.$ac_ext <<_ACEOF | |
9798 | /* end confdefs.h. */ | |
9799 | #include <sys/types.h> | |
9800 | #include <inttypes.h> | |
9801 | int | |
9802 | main () | |
9803 | { | |
9804 | intmax_t i = -1; | |
9805 | ; | |
9806 | return 0; | |
9807 | } | |
9808 | _ACEOF | |
9809 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
9810 | if { (ac_try="$ac_compile" |
9811 | case "(($ac_try" in | |
9812 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9813 | *) ac_try_echo=$ac_try;; | |
9814 | esac | |
9815 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9816 | (eval "$ac_compile") 2>conftest.er1 | |
dd7f7a6e EC |
9817 | ac_status=$? |
9818 | grep -v '^ *+' conftest.er1 >conftest.err | |
9819 | rm -f conftest.er1 | |
9820 | cat conftest.err >&5 | |
9821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
9822 | (exit $ac_status); } && { |
9823 | test -z "$ac_c_werror_flag" || | |
9824 | test ! -s conftest.err | |
9825 | } && test -s conftest.$ac_objext; then | |
dd7f7a6e EC |
9826 | gcc_cv_header_inttypes_h=yes |
9827 | else | |
9828 | echo "$as_me: failed program was:" >&5 | |
9829 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9830 | ||
ab22c1fa | 9831 | gcc_cv_header_inttypes_h=no |
dd7f7a6e | 9832 | fi |
ab22c1fa CF |
9833 | |
9834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
dd7f7a6e EC |
9835 | fi |
9836 | ||
ab22c1fa CF |
9837 | { echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9838 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6; } | |
dd7f7a6e EC |
9839 | if test $gcc_cv_header_inttypes_h = yes; then |
9840 | ||
9841 | cat >>confdefs.h <<\_ACEOF | |
9842 | #define HAVE_INTTYPES_H 1 | |
9843 | _ACEOF | |
9844 | ||
0056a9b5 | 9845 | fi |
956d6950 | 9846 | |
c149cc37 | 9847 | |
ba479fd2 NN |
9848 | |
9849 | ||
9850 | ||
9851 | ||
9852 | ||
9853 | ||
9854 | ||
9855 | ||
9856 | ||
9857 | ||
9858 | ||
9859 | ||
9860 | ||
9861 | ||
9862 | ||
9863 | ||
0d667716 KG |
9864 | |
9865 | ||
9866 | ||
9867 | ||
9868 | ||
9869 | ||
9870 | ||
9871 | ||
9872 | ||
9873 | ||
9874 | ||
9875 | ||
ba479fd2 NN |
9876 | |
9877 | ||
9878 | ||
9879 | ||
9880 | ||
9881 | ||
9882 | ||
9883 | ||
52a6edcc | 9884 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9885 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9886 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9887 | 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 | 9888 | do |
ba479fd2 | 9889 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
ab22c1fa CF |
9890 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 |
9891 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } | |
9892 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
9893 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9894 | else | |
9895 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9896 | /* confdefs.h. */ |
9897 | _ACEOF | |
9898 | cat confdefs.h >>conftest.$ac_ext | |
9899 | cat >>conftest.$ac_ext <<_ACEOF | |
9900 | /* end confdefs.h. */ | |
86da66b5 HPN |
9901 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9902 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9903 | #define $ac_func innocuous_$ac_func | |
9904 | ||
956d6950 | 9905 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9906 | which can conflict with char $ac_func (); below. |
9907 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9908 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9909 | |
ba479fd2 NN |
9910 | #ifdef __STDC__ |
9911 | # include <limits.h> | |
9912 | #else | |
9913 | # include <assert.h> | |
9914 | #endif | |
86da66b5 HPN |
9915 | |
9916 | #undef $ac_func | |
9917 | ||
ab22c1fa CF |
9918 | /* Override any GCC internal prototype to avoid an error. |
9919 | Use char because int might match the return type of a GCC | |
9920 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
9921 | #ifdef __cplusplus |
9922 | extern "C" | |
ba479fd2 | 9923 | #endif |
ba479fd2 | 9924 | char $ac_func (); |
956d6950 JL |
9925 | /* The GNU C library defines this for functions which it implements |
9926 | to always fail with ENOSYS. Some functions are actually named | |
9927 | something starting with __ and the normal name is an alias. */ | |
ab22c1fa | 9928 | #if defined __stub_$ac_func || defined __stub___$ac_func |
956d6950 | 9929 | choke me |
956d6950 JL |
9930 | #endif |
9931 | ||
ba479fd2 NN |
9932 | int |
9933 | main () | |
9934 | { | |
ab22c1fa | 9935 | return $ac_func (); |
ba479fd2 NN |
9936 | ; |
9937 | return 0; | |
9938 | } | |
9939 | _ACEOF | |
9940 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
9941 | if { (ac_try="$ac_link" |
9942 | case "(($ac_try" in | |
9943 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
9944 | *) ac_try_echo=$ac_try;; | |
9945 | esac | |
9946 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
9947 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 9948 | ac_status=$? |
86da66b5 HPN |
9949 | grep -v '^ *+' conftest.er1 >conftest.err |
9950 | rm -f conftest.er1 | |
9951 | cat conftest.err >&5 | |
ba479fd2 | 9952 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
9953 | (exit $ac_status); } && { |
9954 | test -z "$ac_c_werror_flag" || | |
9955 | test ! -s conftest.err | |
9956 | } && test -s conftest$ac_exeext && | |
9957 | $as_test_x conftest$ac_exeext; then | |
ba479fd2 NN |
9958 | eval "$as_ac_var=yes" |
9959 | else | |
9960 | echo "$as_me: failed program was:" >&5 | |
9961 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9962 | ||
ab22c1fa | 9963 | eval "$as_ac_var=no" |
ba479fd2 | 9964 | fi |
ab22c1fa CF |
9965 | |
9966 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 9967 | conftest$ac_exeext conftest.$ac_ext |
ba479fd2 | 9968 | fi |
ab22c1fa CF |
9969 | ac_res=`eval echo '${'$as_ac_var'}'` |
9970 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
9971 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
9972 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
9973 | cat >>confdefs.h <<_ACEOF | |
9974 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9975 | _ACEOF | |
956d6950 | 9976 | |
956d6950 JL |
9977 | fi |
9978 | done | |
9979 | ||
6885fc87 | 9980 | |
39f6c4c8 | 9981 | if test x$ac_cv_func_mbstowcs = xyes; then |
ab22c1fa CF |
9982 | { echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9983 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6; } | |
ba479fd2 NN |
9984 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then |
9985 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9986 | else |
9987 | if test "$cross_compiling" = yes; then | |
9988 | gcc_cv_func_mbstowcs_works=yes | |
9989 | else | |
ba479fd2 | 9990 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9991 | /* confdefs.h. */ |
9992 | _ACEOF | |
9993 | cat confdefs.h >>conftest.$ac_ext | |
9994 | cat >>conftest.$ac_ext <<_ACEOF | |
9995 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9996 | #include <stdlib.h> |
9997 | int main() | |
9998 | { | |
9999 | mbstowcs(0, "", 0); | |
10000 | return 0; | |
10001 | } | |
ba479fd2 NN |
10002 | _ACEOF |
10003 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
10004 | if { (ac_try="$ac_link" |
10005 | case "(($ac_try" in | |
10006 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10007 | *) ac_try_echo=$ac_try;; | |
10008 | esac | |
10009 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10010 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10011 | ac_status=$? |
10012 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10013 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
10014 | { (case "(($ac_try" in |
10015 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10016 | *) ac_try_echo=$ac_try;; | |
10017 | esac | |
10018 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10019 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10020 | ac_status=$? |
10021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10022 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
10023 | gcc_cv_func_mbstowcs_works=yes |
10024 | else | |
ba479fd2 NN |
10025 | echo "$as_me: program exited with status $ac_status" >&5 |
10026 | echo "$as_me: failed program was:" >&5 | |
10027 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10028 | ||
10029 | ( exit $ac_status ) | |
10030 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 10031 | fi |
ab22c1fa | 10032 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 10033 | fi |
ab22c1fa CF |
10034 | |
10035 | ||
39f6c4c8 | 10036 | fi |
ab22c1fa CF |
10037 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
10038 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6; } | |
63cf211a | 10039 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
10040 | |
10041 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 10042 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 10043 | _ACEOF |
39f6c4c8 KW |
10044 | |
10045 | fi | |
10046 | fi | |
10047 | ||
ab22c1fa CF |
10048 | { echo "$as_me:$LINENO: checking for ssize_t" >&5 |
10049 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } | |
ba479fd2 NN |
10050 | if test "${ac_cv_type_ssize_t+set}" = set; then |
10051 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 10052 | else |
ba479fd2 | 10053 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10054 | /* confdefs.h. */ |
10055 | _ACEOF | |
10056 | cat confdefs.h >>conftest.$ac_ext | |
10057 | cat >>conftest.$ac_ext <<_ACEOF | |
10058 | /* end confdefs.h. */ | |
8b4fc07a | 10059 | $ac_includes_default |
ab22c1fa | 10060 | typedef ssize_t ac__type_new_; |
8b4fc07a NN |
10061 | int |
10062 | main () | |
10063 | { | |
ab22c1fa | 10064 | if ((ac__type_new_ *) 0) |
8b4fc07a | 10065 | return 0; |
ab22c1fa | 10066 | if (sizeof (ac__type_new_)) |
8b4fc07a NN |
10067 | return 0; |
10068 | ; | |
10069 | return 0; | |
10070 | } | |
ba479fd2 | 10071 | _ACEOF |
8b4fc07a | 10072 | rm -f conftest.$ac_objext |
ab22c1fa CF |
10073 | if { (ac_try="$ac_compile" |
10074 | case "(($ac_try" in | |
10075 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10076 | *) ac_try_echo=$ac_try;; | |
10077 | esac | |
10078 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10079 | (eval "$ac_compile") 2>conftest.er1 | |
8b4fc07a | 10080 | ac_status=$? |
86da66b5 HPN |
10081 | grep -v '^ *+' conftest.er1 >conftest.err |
10082 | rm -f conftest.er1 | |
10083 | cat conftest.err >&5 | |
8b4fc07a | 10084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
10085 | (exit $ac_status); } && { |
10086 | test -z "$ac_c_werror_flag" || | |
10087 | test ! -s conftest.err | |
10088 | } && test -s conftest.$ac_objext; then | |
cb65112a | 10089 | ac_cv_type_ssize_t=yes |
f12bc141 | 10090 | else |
8b4fc07a NN |
10091 | echo "$as_me: failed program was:" >&5 |
10092 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10093 | |
ab22c1fa | 10094 | ac_cv_type_ssize_t=no |
8b4fc07a | 10095 | fi |
ab22c1fa CF |
10096 | |
10097 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
63cf211a | 10098 | fi |
ab22c1fa CF |
10099 | { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
10100 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } | |
8b4fc07a NN |
10101 | if test $ac_cv_type_ssize_t = yes; then |
10102 | : | |
10103 | else | |
ba479fd2 | 10104 | |
8b4fc07a | 10105 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 10106 | #define ssize_t int |
ba479fd2 | 10107 | _ACEOF |
f12bc141 ZW |
10108 | |
10109 | fi | |
10110 | ||
0b9d02c6 | 10111 | |
e256b8b6 DA |
10112 | # Try to determine the array type of the second argument of getgroups |
10113 | # for the target system (int or gid_t). | |
ab22c1fa CF |
10114 | { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
10115 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } | |
ba479fd2 NN |
10116 | if test "${ac_cv_type_uid_t+set}" = set; then |
10117 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10118 | else | |
10119 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10120 | /* confdefs.h. */ |
10121 | _ACEOF | |
10122 | cat confdefs.h >>conftest.$ac_ext | |
10123 | cat >>conftest.$ac_ext <<_ACEOF | |
10124 | /* end confdefs.h. */ | |
e256b8b6 | 10125 | #include <sys/types.h> |
ba479fd2 NN |
10126 | |
10127 | _ACEOF | |
e256b8b6 | 10128 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 10129 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
10130 | ac_cv_type_uid_t=yes |
10131 | else | |
e256b8b6 DA |
10132 | ac_cv_type_uid_t=no |
10133 | fi | |
10134 | rm -f conftest* | |
10135 | ||
10136 | fi | |
ab22c1fa CF |
10137 | { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
10138 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } | |
63cf211a | 10139 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
10140 | |
10141 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 10142 | #define uid_t int |
ba479fd2 | 10143 | _ACEOF |
cafe096b | 10144 | |
ba479fd2 NN |
10145 | |
10146 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 10147 | #define gid_t int |
ba479fd2 | 10148 | _ACEOF |
e256b8b6 DA |
10149 | |
10150 | fi | |
10151 | ||
ab22c1fa CF |
10152 | { echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
10153 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } | |
ba479fd2 NN |
10154 | if test "${ac_cv_type_getgroups+set}" = set; then |
10155 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
10156 | else |
10157 | if test "$cross_compiling" = yes; then | |
10158 | ac_cv_type_getgroups=cross | |
10159 | else | |
ba479fd2 | 10160 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10161 | /* confdefs.h. */ |
10162 | _ACEOF | |
10163 | cat confdefs.h >>conftest.$ac_ext | |
10164 | cat >>conftest.$ac_ext <<_ACEOF | |
10165 | /* end confdefs.h. */ | |
e256b8b6 | 10166 | /* Thanks to Mike Rendell for this test. */ |
ab22c1fa | 10167 | $ac_includes_default |
e256b8b6 DA |
10168 | #define NGID 256 |
10169 | #undef MAX | |
10170 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
10171 | |
10172 | int | |
10173 | main () | |
e256b8b6 DA |
10174 | { |
10175 | gid_t gidset[NGID]; | |
10176 | int i, n; | |
ab22c1fa | 10177 | union { gid_t gval; long int lval; } val; |
e256b8b6 DA |
10178 | |
10179 | val.lval = -1; | |
10180 | for (i = 0; i < NGID; i++) | |
10181 | gidset[i] = val.gval; | |
10182 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 10183 | gidset); |
e256b8b6 | 10184 | /* Exit non-zero if getgroups seems to require an array of ints. This |
ab22c1fa CF |
10185 | happens when gid_t is short int but getgroups modifies an array |
10186 | of ints. */ | |
10187 | return n > 0 && gidset[n] != val.gval; | |
63cf211a | 10188 | } |
ba479fd2 NN |
10189 | _ACEOF |
10190 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
10191 | if { (ac_try="$ac_link" |
10192 | case "(($ac_try" in | |
10193 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10194 | *) ac_try_echo=$ac_try;; | |
10195 | esac | |
10196 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10197 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10198 | ac_status=$? |
10199 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10200 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
10201 | { (case "(($ac_try" in |
10202 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10203 | *) ac_try_echo=$ac_try;; | |
10204 | esac | |
10205 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10206 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10207 | ac_status=$? |
10208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10209 | (exit $ac_status); }; }; then | |
10210 | ac_cv_type_getgroups=gid_t | |
63cf211a | 10211 | else |
ba479fd2 NN |
10212 | echo "$as_me: program exited with status $ac_status" >&5 |
10213 | echo "$as_me: failed program was:" >&5 | |
10214 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10215 | ||
10216 | ( exit $ac_status ) | |
10217 | ac_cv_type_getgroups=int | |
e256b8b6 | 10218 | fi |
ab22c1fa | 10219 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 10220 | fi |
ab22c1fa CF |
10221 | |
10222 | ||
e256b8b6 | 10223 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 10224 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10225 | /* confdefs.h. */ |
10226 | _ACEOF | |
10227 | cat confdefs.h >>conftest.$ac_ext | |
10228 | cat >>conftest.$ac_ext <<_ACEOF | |
10229 | /* end confdefs.h. */ | |
e256b8b6 | 10230 | #include <unistd.h> |
ba479fd2 NN |
10231 | |
10232 | _ACEOF | |
e256b8b6 | 10233 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 10234 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
10235 | ac_cv_type_getgroups=gid_t |
10236 | else | |
e256b8b6 DA |
10237 | ac_cv_type_getgroups=int |
10238 | fi | |
10239 | rm -f conftest* | |
10240 | ||
10241 | fi | |
10242 | fi | |
ab22c1fa CF |
10243 | { echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
10244 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } | |
e256b8b6 | 10245 | |
ba479fd2 | 10246 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 10247 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 10248 | _ACEOF |
e256b8b6 DA |
10249 | |
10250 | ||
10251 | if test "${target}" = "${build}"; then | |
10252 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
10253 | else | |
10254 | case "${target}" in | |
10255 | # This condition may need some tweaking. It should include all | |
10256 | # targets where the array type of the second argument of getgroups | |
10257 | # is int and the type of gid_t is not equivalent to int. | |
10258 | *-*-sunos* | *-*-ultrix*) | |
10259 | TARGET_GETGROUPS_T=int | |
10260 | ;; | |
10261 | *) | |
10262 | TARGET_GETGROUPS_T=gid_t | |
10263 | ;; | |
10264 | esac | |
10265 | fi | |
10266 | ||
10267 | ||
3b0727a0 | 10268 | |
ab22c1fa CF |
10269 | { echo "$as_me:$LINENO: checking for sys/mman.h" >&5 |
10270 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; } | |
3b0727a0 MR |
10271 | if test "${ac_cv_header_sys_mman_h+set}" = set; then |
10272 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 10273 | else |
18fc9bd4 | 10274 | cat >conftest.$ac_ext <<_ACEOF |
3b0727a0 MR |
10275 | /* confdefs.h. */ |
10276 | _ACEOF | |
10277 | cat confdefs.h >>conftest.$ac_ext | |
10278 | cat >>conftest.$ac_ext <<_ACEOF | |
10279 | /* end confdefs.h. */ | |
10280 | #include <sys/mman.h> | |
10281 | _ACEOF | |
ab22c1fa CF |
10282 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
10283 | case "(($ac_try" in | |
10284 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10285 | *) ac_try_echo=$ac_try;; | |
10286 | esac | |
10287 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10288 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
3b0727a0 MR |
10289 | ac_status=$? |
10290 | grep -v '^ *+' conftest.er1 >conftest.err | |
10291 | rm -f conftest.er1 | |
10292 | cat conftest.err >&5 | |
10293 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
10294 | (exit $ac_status); } >/dev/null && { |
10295 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
10296 | test ! -s conftest.err | |
10297 | }; then | |
18fc9bd4 | 10298 | ac_cv_header_sys_mman_h=yes |
3b0727a0 MR |
10299 | else |
10300 | echo "$as_me: failed program was:" >&5 | |
10301 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10302 | ||
18fc9bd4 | 10303 | ac_cv_header_sys_mman_h=no |
3b0727a0 | 10304 | fi |
ab22c1fa | 10305 | |
3b0727a0 MR |
10306 | rm -f conftest.err conftest.$ac_ext |
10307 | fi | |
ab22c1fa CF |
10308 | { echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 |
10309 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6; } | |
3b0727a0 MR |
10310 | if test $ac_cv_header_sys_mman_h = yes; then |
10311 | gcc_header_sys_mman_h=yes | |
10312 | else | |
10313 | gcc_header_sys_mman_h=no | |
10314 | fi | |
10315 | ||
ab22c1fa CF |
10316 | { echo "$as_me:$LINENO: checking for mmap" >&5 |
10317 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6; } | |
3b0727a0 MR |
10318 | if test "${ac_cv_func_mmap+set}" = set; then |
10319 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10320 | else | |
10321 | cat >conftest.$ac_ext <<_ACEOF | |
10322 | /* confdefs.h. */ | |
10323 | _ACEOF | |
10324 | cat confdefs.h >>conftest.$ac_ext | |
10325 | cat >>conftest.$ac_ext <<_ACEOF | |
10326 | /* end confdefs.h. */ | |
10327 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
10328 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10329 | #define mmap innocuous_mmap | |
10330 | ||
10331 | /* System header to define __stub macros and hopefully few prototypes, | |
10332 | which can conflict with char mmap (); below. | |
10333 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10334 | <limits.h> exists even on freestanding compilers. */ | |
10335 | ||
10336 | #ifdef __STDC__ | |
10337 | # include <limits.h> | |
10338 | #else | |
10339 | # include <assert.h> | |
10340 | #endif | |
10341 | ||
10342 | #undef mmap | |
10343 | ||
ab22c1fa CF |
10344 | /* Override any GCC internal prototype to avoid an error. |
10345 | Use char because int might match the return type of a GCC | |
10346 | builtin and then its argument prototype would still apply. */ | |
3b0727a0 MR |
10347 | #ifdef __cplusplus |
10348 | extern "C" | |
3b0727a0 | 10349 | #endif |
3b0727a0 MR |
10350 | char mmap (); |
10351 | /* The GNU C library defines this for functions which it implements | |
10352 | to always fail with ENOSYS. Some functions are actually named | |
10353 | something starting with __ and the normal name is an alias. */ | |
ab22c1fa | 10354 | #if defined __stub_mmap || defined __stub___mmap |
3b0727a0 | 10355 | choke me |
3b0727a0 MR |
10356 | #endif |
10357 | ||
10358 | int | |
10359 | main () | |
10360 | { | |
ab22c1fa | 10361 | return mmap (); |
3b0727a0 MR |
10362 | ; |
10363 | return 0; | |
10364 | } | |
10365 | _ACEOF | |
10366 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
10367 | if { (ac_try="$ac_link" |
10368 | case "(($ac_try" in | |
10369 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10370 | *) ac_try_echo=$ac_try;; | |
10371 | esac | |
10372 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10373 | (eval "$ac_link") 2>conftest.er1 | |
3b0727a0 MR |
10374 | ac_status=$? |
10375 | grep -v '^ *+' conftest.er1 >conftest.err | |
10376 | rm -f conftest.er1 | |
10377 | cat conftest.err >&5 | |
10378 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
10379 | (exit $ac_status); } && { |
10380 | test -z "$ac_c_werror_flag" || | |
10381 | test ! -s conftest.err | |
10382 | } && test -s conftest$ac_exeext && | |
10383 | $as_test_x conftest$ac_exeext; then | |
8b1f719a PB |
10384 | ac_cv_func_mmap=yes |
10385 | else | |
10386 | echo "$as_me: failed program was:" >&5 | |
10387 | sed 's/^/| /' conftest.$ac_ext >&5 | |
a6ccdbab | 10388 | |
ab22c1fa | 10389 | ac_cv_func_mmap=no |
8b1f719a | 10390 | fi |
ab22c1fa CF |
10391 | |
10392 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
3b0727a0 MR |
10393 | conftest$ac_exeext conftest.$ac_ext |
10394 | fi | |
ab22c1fa CF |
10395 | { echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 |
10396 | echo "${ECHO_T}$ac_cv_func_mmap" >&6; } | |
3b0727a0 MR |
10397 | if test $ac_cv_func_mmap = yes; then |
10398 | gcc_func_mmap=yes | |
10399 | else | |
10400 | gcc_func_mmap=no | |
10401 | fi | |
10402 | ||
10403 | if test "$gcc_header_sys_mman_h" != yes \ | |
10404 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
10405 | gcc_cv_func_mmap_file=no |
10406 | gcc_cv_func_mmap_dev_zero=no | |
10407 | gcc_cv_func_mmap_anon=no | |
10408 | else | |
ab22c1fa CF |
10409 | { echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
10410 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6; } | |
ba479fd2 NN |
10411 | if test "${gcc_cv_func_mmap_file+set}" = set; then |
10412 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 10413 | else |
ba479fd2 | 10414 | # Add a system to this blacklist if |
1072ec3f ZW |
10415 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
10416 | # memory area containing the same data that you'd get if you applied | |
10417 | # read() to the same fd. The only system known to have a problem here | |
10418 | # is VMS, where text files have record structure. | |
10419 | case "$host_os" in | |
ba479fd2 | 10420 | vms* | ultrix*) |
1072ec3f ZW |
10421 | gcc_cv_func_mmap_file=no ;; |
10422 | *) | |
10423 | gcc_cv_func_mmap_file=yes;; | |
10424 | esac | |
10425 | fi | |
ab22c1fa CF |
10426 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
10427 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6; } | |
10428 | { echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
10429 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6; } | |
ba479fd2 NN |
10430 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then |
10431 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
10432 | else |
10433 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
10434 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
10435 | # zeroed pages with both the following properties: | |
10436 | # 1. If you map N consecutive pages in with one call, and then | |
10437 | # unmap any subset of those pages, the pages that were not | |
10438 | # explicitly unmapped remain accessible. | |
10439 | # 2. If you map two adjacent blocks of memory and then unmap them | |
10440 | # both at once, they must both go away. | |
10441 | # Systems known to be in this category are Windows (all variants), | |
10442 | # VMS, and Darwin. | |
10443 | case "$host_os" in | |
2ce240d3 | 10444 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
10445 | gcc_cv_func_mmap_dev_zero=no ;; |
10446 | *) | |
10447 | gcc_cv_func_mmap_dev_zero=yes;; | |
10448 | esac | |
10449 | fi | |
ab22c1fa CF |
10450 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
10451 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6; } | |
1072ec3f ZW |
10452 | |
10453 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ab22c1fa CF |
10454 | { echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
10455 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6; } | |
ba479fd2 NN |
10456 | if test "${gcc_cv_decl_map_anon+set}" = set; then |
10457 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10458 | else | |
10459 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10460 | /* confdefs.h. */ |
10461 | _ACEOF | |
10462 | cat confdefs.h >>conftest.$ac_ext | |
10463 | cat >>conftest.$ac_ext <<_ACEOF | |
10464 | /* end confdefs.h. */ | |
1072ec3f ZW |
10465 | #include <sys/types.h> |
10466 | #include <sys/mman.h> | |
10467 | #include <unistd.h> | |
10468 | ||
10469 | #ifndef MAP_ANONYMOUS | |
10470 | #define MAP_ANONYMOUS MAP_ANON | |
10471 | #endif | |
10472 | ||
ba479fd2 NN |
10473 | int |
10474 | main () | |
10475 | { | |
1072ec3f | 10476 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
10477 | ; |
10478 | return 0; | |
10479 | } | |
10480 | _ACEOF | |
10481 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
10482 | if { (ac_try="$ac_compile" |
10483 | case "(($ac_try" in | |
10484 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10485 | *) ac_try_echo=$ac_try;; | |
10486 | esac | |
10487 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10488 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 10489 | ac_status=$? |
86da66b5 HPN |
10490 | grep -v '^ *+' conftest.er1 >conftest.err |
10491 | rm -f conftest.er1 | |
10492 | cat conftest.err >&5 | |
ba479fd2 | 10493 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
10494 | (exit $ac_status); } && { |
10495 | test -z "$ac_c_werror_flag" || | |
10496 | test ! -s conftest.err | |
10497 | } && test -s conftest.$ac_objext; then | |
1072ec3f ZW |
10498 | gcc_cv_decl_map_anon=yes |
10499 | else | |
ba479fd2 NN |
10500 | echo "$as_me: failed program was:" >&5 |
10501 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10502 | ||
ab22c1fa | 10503 | gcc_cv_decl_map_anon=no |
1072ec3f | 10504 | fi |
ab22c1fa CF |
10505 | |
10506 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1072ec3f | 10507 | fi |
ab22c1fa CF |
10508 | { echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
10509 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6; } | |
1072ec3f ZW |
10510 | |
10511 | if test $gcc_cv_decl_map_anon = no; then | |
10512 | gcc_cv_func_mmap_anon=no | |
10513 | else | |
ab22c1fa CF |
10514 | { echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
10515 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6; } | |
ba479fd2 NN |
10516 | if test "${gcc_cv_func_mmap_anon+set}" = set; then |
10517 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
10518 | else |
10519 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
10520 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
10521 | # doesn't give anonymous zeroed pages with the same properties listed | |
10522 | # above for use of /dev/zero. | |
10523 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
10524 | case "$host_os" in | |
10525 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
10526 | gcc_cv_func_mmap_anon=no ;; | |
10527 | *) | |
10528 | gcc_cv_func_mmap_anon=yes;; | |
10529 | esac | |
10530 | fi | |
ab22c1fa CF |
10531 | { echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
10532 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6; } | |
1072ec3f ZW |
10533 | fi |
10534 | fi | |
10535 | ||
10536 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
10537 | |
10538 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10539 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 10540 | _ACEOF |
1072ec3f ZW |
10541 | |
10542 | fi | |
10543 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
10544 | |
10545 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10546 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 10547 | _ACEOF |
1072ec3f ZW |
10548 | |
10549 | fi | |
10550 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
10551 | |
10552 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10553 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 10554 | _ACEOF |
1072ec3f ZW |
10555 | |
10556 | fi | |
10557 | ||
b27d2bd5 MK |
10558 | |
10559 | case "${host}" in | |
ee262b6f | 10560 | *-*-*vms*) |
ba479fd2 | 10561 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
10562 | # won't work, and it isn't easily adaptable. It makes more sense to |
10563 | # just force it. | |
10564 | ac_cv_func_vfork_works=yes | |
10565 | ;; | |
b27d2bd5 | 10566 | esac |
ab22c1fa CF |
10567 | { echo "$as_me:$LINENO: checking for pid_t" >&5 |
10568 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } | |
ba479fd2 NN |
10569 | if test "${ac_cv_type_pid_t+set}" = set; then |
10570 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10571 | else | |
10572 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10573 | /* confdefs.h. */ |
10574 | _ACEOF | |
10575 | cat confdefs.h >>conftest.$ac_ext | |
10576 | cat >>conftest.$ac_ext <<_ACEOF | |
10577 | /* end confdefs.h. */ | |
10578 | $ac_includes_default | |
ab22c1fa | 10579 | typedef pid_t ac__type_new_; |
ba479fd2 NN |
10580 | int |
10581 | main () | |
10582 | { | |
ab22c1fa | 10583 | if ((ac__type_new_ *) 0) |
ba479fd2 | 10584 | return 0; |
ab22c1fa | 10585 | if (sizeof (ac__type_new_)) |
ba479fd2 NN |
10586 | return 0; |
10587 | ; | |
10588 | return 0; | |
10589 | } | |
10590 | _ACEOF | |
10591 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
10592 | if { (ac_try="$ac_compile" |
10593 | case "(($ac_try" in | |
10594 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10595 | *) ac_try_echo=$ac_try;; | |
10596 | esac | |
10597 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10598 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 10599 | ac_status=$? |
86da66b5 HPN |
10600 | grep -v '^ *+' conftest.er1 >conftest.err |
10601 | rm -f conftest.er1 | |
10602 | cat conftest.err >&5 | |
ba479fd2 | 10603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
10604 | (exit $ac_status); } && { |
10605 | test -z "$ac_c_werror_flag" || | |
10606 | test ! -s conftest.err | |
10607 | } && test -s conftest.$ac_objext; then | |
cb65112a | 10608 | ac_cv_type_pid_t=yes |
c375c43b | 10609 | else |
ba479fd2 NN |
10610 | echo "$as_me: failed program was:" >&5 |
10611 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10612 | |
ab22c1fa | 10613 | ac_cv_type_pid_t=no |
ba479fd2 | 10614 | fi |
ab22c1fa CF |
10615 | |
10616 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
63cf211a | 10617 | fi |
ab22c1fa CF |
10618 | { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
10619 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } | |
ba479fd2 NN |
10620 | if test $ac_cv_type_pid_t = yes; then |
10621 | : | |
10622 | else | |
10623 | ||
10624 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 10625 | #define pid_t int |
ba479fd2 | 10626 | _ACEOF |
c375c43b KG |
10627 | |
10628 | fi | |
10629 | ||
ba479fd2 | 10630 | |
ab22c1fa | 10631 | for ac_header in vfork.h |
ba479fd2 NN |
10632 | do |
10633 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ab22c1fa CF |
10634 | { echo "$as_me:$LINENO: checking for $ac_header" >&5 |
10635 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } | |
10636 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 | 10637 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
0f57bf40 | 10638 | else |
18fc9bd4 | 10639 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10640 | /* confdefs.h. */ |
10641 | _ACEOF | |
10642 | cat confdefs.h >>conftest.$ac_ext | |
10643 | cat >>conftest.$ac_ext <<_ACEOF | |
10644 | /* end confdefs.h. */ | |
10645 | #include <$ac_header> | |
10646 | _ACEOF | |
ab22c1fa CF |
10647 | if { (ac_try="$ac_cpp conftest.$ac_ext" |
10648 | case "(($ac_try" in | |
10649 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10650 | *) ac_try_echo=$ac_try;; | |
10651 | esac | |
10652 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10653 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 | |
ba479fd2 NN |
10654 | ac_status=$? |
10655 | grep -v '^ *+' conftest.er1 >conftest.err | |
10656 | rm -f conftest.er1 | |
10657 | cat conftest.err >&5 | |
10658 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
10659 | (exit $ac_status); } >/dev/null && { |
10660 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
10661 | test ! -s conftest.err | |
10662 | }; then | |
18fc9bd4 | 10663 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
10664 | else |
10665 | echo "$as_me: failed program was:" >&5 | |
10666 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10667 | ||
18fc9bd4 | 10668 | eval "$as_ac_Header=no" |
ba479fd2 | 10669 | fi |
ab22c1fa | 10670 | |
ba479fd2 | 10671 | rm -f conftest.err conftest.$ac_ext |
c375c43b | 10672 | fi |
ab22c1fa CF |
10673 | ac_res=`eval echo '${'$as_ac_Header'}'` |
10674 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
10675 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
10676 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
10677 | cat >>confdefs.h <<_ACEOF | |
10678 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10679 | _ACEOF | |
6e3f3080 NN |
10680 | |
10681 | fi | |
ba479fd2 NN |
10682 | done |
10683 | ||
10684 | ||
10685 | ||
10686 | for ac_func in fork vfork | |
10687 | do | |
10688 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
ab22c1fa CF |
10689 | { echo "$as_me:$LINENO: checking for $ac_func" >&5 |
10690 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } | |
10691 | if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
10692 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
10693 | else | |
10694 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10695 | /* confdefs.h. */ |
10696 | _ACEOF | |
10697 | cat confdefs.h >>conftest.$ac_ext | |
10698 | cat >>conftest.$ac_ext <<_ACEOF | |
10699 | /* end confdefs.h. */ | |
86da66b5 HPN |
10700 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
10701 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10702 | #define $ac_func innocuous_$ac_func | |
10703 | ||
c375c43b | 10704 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
10705 | which can conflict with char $ac_func (); below. |
10706 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10707 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 10708 | |
ba479fd2 NN |
10709 | #ifdef __STDC__ |
10710 | # include <limits.h> | |
10711 | #else | |
10712 | # include <assert.h> | |
10713 | #endif | |
86da66b5 HPN |
10714 | |
10715 | #undef $ac_func | |
10716 | ||
ab22c1fa CF |
10717 | /* Override any GCC internal prototype to avoid an error. |
10718 | Use char because int might match the return type of a GCC | |
10719 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
10720 | #ifdef __cplusplus |
10721 | extern "C" | |
ba479fd2 | 10722 | #endif |
ba479fd2 | 10723 | char $ac_func (); |
c375c43b KG |
10724 | /* The GNU C library defines this for functions which it implements |
10725 | to always fail with ENOSYS. Some functions are actually named | |
10726 | something starting with __ and the normal name is an alias. */ | |
ab22c1fa | 10727 | #if defined __stub_$ac_func || defined __stub___$ac_func |
c375c43b | 10728 | choke me |
c375c43b KG |
10729 | #endif |
10730 | ||
ba479fd2 NN |
10731 | int |
10732 | main () | |
10733 | { | |
ab22c1fa | 10734 | return $ac_func (); |
ba479fd2 NN |
10735 | ; |
10736 | return 0; | |
10737 | } | |
10738 | _ACEOF | |
10739 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
10740 | if { (ac_try="$ac_link" |
10741 | case "(($ac_try" in | |
10742 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10743 | *) ac_try_echo=$ac_try;; | |
10744 | esac | |
10745 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10746 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 10747 | ac_status=$? |
86da66b5 HPN |
10748 | grep -v '^ *+' conftest.er1 >conftest.err |
10749 | rm -f conftest.er1 | |
10750 | cat conftest.err >&5 | |
ba479fd2 | 10751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
10752 | (exit $ac_status); } && { |
10753 | test -z "$ac_c_werror_flag" || | |
10754 | test ! -s conftest.err | |
10755 | } && test -s conftest$ac_exeext && | |
10756 | $as_test_x conftest$ac_exeext; then | |
ba479fd2 NN |
10757 | eval "$as_ac_var=yes" |
10758 | else | |
10759 | echo "$as_me: failed program was:" >&5 | |
10760 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10761 | ||
ab22c1fa | 10762 | eval "$as_ac_var=no" |
ba479fd2 | 10763 | fi |
ab22c1fa CF |
10764 | |
10765 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 10766 | conftest$ac_exeext conftest.$ac_ext |
ba479fd2 | 10767 | fi |
ab22c1fa CF |
10768 | ac_res=`eval echo '${'$as_ac_var'}'` |
10769 | { echo "$as_me:$LINENO: result: $ac_res" >&5 | |
10770 | echo "${ECHO_T}$ac_res" >&6; } | |
ba479fd2 NN |
10771 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
10772 | cat >>confdefs.h <<_ACEOF | |
10773 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10774 | _ACEOF | |
10775 | ||
c375c43b | 10776 | fi |
ba479fd2 | 10777 | done |
c375c43b | 10778 | |
ba479fd2 | 10779 | if test "x$ac_cv_func_fork" = xyes; then |
ab22c1fa CF |
10780 | { echo "$as_me:$LINENO: checking for working fork" >&5 |
10781 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } | |
ba479fd2 NN |
10782 | if test "${ac_cv_func_fork_works+set}" = set; then |
10783 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10784 | else |
ba479fd2 NN |
10785 | if test "$cross_compiling" = yes; then |
10786 | ac_cv_func_fork_works=cross | |
10787 | else | |
10788 | cat >conftest.$ac_ext <<_ACEOF | |
ab22c1fa CF |
10789 | /* confdefs.h. */ |
10790 | _ACEOF | |
10791 | cat confdefs.h >>conftest.$ac_ext | |
10792 | cat >>conftest.$ac_ext <<_ACEOF | |
10793 | /* end confdefs.h. */ | |
10794 | $ac_includes_default | |
10795 | int | |
10796 | main () | |
10797 | { | |
10798 | ||
10799 | /* By Ruediger Kuhlmann. */ | |
10800 | return fork () < 0; | |
10801 | ||
10802 | ; | |
10803 | return 0; | |
10804 | } | |
ba479fd2 NN |
10805 | _ACEOF |
10806 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
10807 | if { (ac_try="$ac_link" |
10808 | case "(($ac_try" in | |
10809 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10810 | *) ac_try_echo=$ac_try;; | |
10811 | esac | |
10812 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10813 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10814 | ac_status=$? |
10815 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10816 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
10817 | { (case "(($ac_try" in |
10818 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10819 | *) ac_try_echo=$ac_try;; | |
10820 | esac | |
10821 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10822 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10823 | ac_status=$? |
10824 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10825 | (exit $ac_status); }; }; then | |
10826 | ac_cv_func_fork_works=yes | |
10827 | else | |
10828 | echo "$as_me: program exited with status $ac_status" >&5 | |
10829 | echo "$as_me: failed program was:" >&5 | |
10830 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10831 | ||
10832 | ( exit $ac_status ) | |
10833 | ac_cv_func_fork_works=no | |
10834 | fi | |
ab22c1fa | 10835 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 10836 | fi |
ab22c1fa CF |
10837 | |
10838 | ||
ba479fd2 | 10839 | fi |
ab22c1fa CF |
10840 | { echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 |
10841 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } | |
ba479fd2 NN |
10842 | |
10843 | else | |
10844 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10845 | fi | |
10846 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10847 | case $host in | |
10848 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10849 | # Override, as these systems have only a dummy fork() stub | |
10850 | ac_cv_func_fork_works=no | |
10851 | ;; | |
10852 | *) | |
10853 | ac_cv_func_fork_works=yes | |
10854 | ;; | |
10855 | esac | |
10856 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10857 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10858 | fi |
c375c43b | 10859 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 | 10860 | if test "x$ac_cv_func_vfork" = xyes; then |
ab22c1fa CF |
10861 | { echo "$as_me:$LINENO: checking for working vfork" >&5 |
10862 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } | |
ba479fd2 NN |
10863 | if test "${ac_cv_func_vfork_works+set}" = set; then |
10864 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10865 | else |
ba479fd2 NN |
10866 | if test "$cross_compiling" = yes; then |
10867 | ac_cv_func_vfork_works=cross | |
10868 | else | |
10869 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10870 | /* confdefs.h. */ |
10871 | _ACEOF | |
10872 | cat confdefs.h >>conftest.$ac_ext | |
10873 | cat >>conftest.$ac_ext <<_ACEOF | |
10874 | /* end confdefs.h. */ | |
c375c43b | 10875 | /* Thanks to Paul Eggert for this test. */ |
ab22c1fa | 10876 | $ac_includes_default |
ba479fd2 | 10877 | #include <sys/wait.h> |
ab22c1fa | 10878 | #ifdef HAVE_VFORK_H |
ba479fd2 | 10879 | # include <vfork.h> |
c375c43b KG |
10880 | #endif |
10881 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10882 | argument registers are propagated back to the parent. The compiler |
10883 | is told about this with #include <vfork.h>, but some compilers | |
10884 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10885 | static variable whose address is put into a register that is | |
10886 | clobbered by the vfork. */ | |
10887 | static void | |
c375c43b KG |
10888 | #ifdef __cplusplus |
10889 | sparc_address_test (int arg) | |
ba479fd2 | 10890 | # else |
c375c43b KG |
10891 | sparc_address_test (arg) int arg; |
10892 | #endif | |
10893 | { | |
10894 | static pid_t child; | |
10895 | if (!child) { | |
10896 | child = vfork (); | |
10897 | if (child < 0) { | |
10898 | perror ("vfork"); | |
10899 | _exit(2); | |
10900 | } | |
10901 | if (!child) { | |
10902 | arg = getpid(); | |
10903 | write(-1, "", 0); | |
10904 | _exit (arg); | |
10905 | } | |
10906 | } | |
10907 | } | |
ba479fd2 NN |
10908 | |
10909 | int | |
10910 | main () | |
10911 | { | |
c375c43b KG |
10912 | pid_t parent = getpid (); |
10913 | pid_t child; | |
10914 | ||
ba479fd2 | 10915 | sparc_address_test (0); |
c375c43b KG |
10916 | |
10917 | child = vfork (); | |
10918 | ||
10919 | if (child == 0) { | |
ba479fd2 NN |
10920 | /* Here is another test for sparc vfork register problems. This |
10921 | test uses lots of local variables, at least as many local | |
10922 | variables as main has allocated so far including compiler | |
10923 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10924 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10925 | reuse the register of parent for one of the local variables, | |
10926 | since it will think that parent can't possibly be used any more | |
10927 | in this routine. Assigning to the local variable will thus | |
10928 | munge parent in the parent process. */ | |
c375c43b KG |
10929 | pid_t |
10930 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10931 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10932 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10933 | use the same hardware register for all 8 local variables. */ | |
10934 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10935 | || p != p5 || p != p6 || p != p7) | |
10936 | _exit(1); | |
10937 | ||
ba479fd2 NN |
10938 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10939 | from child file descriptors. If the child closes a descriptor | |
10940 | before it execs or exits, this munges the parent's descriptor | |
10941 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10942 | _exit(close(fileno(stdout)) != 0); |
10943 | } else { | |
10944 | int status; | |
10945 | struct stat st; | |
10946 | ||
10947 | while (wait(&status) != child) | |
10948 | ; | |
ab22c1fa | 10949 | return ( |
c375c43b KG |
10950 | /* Was there some problem with vforking? */ |
10951 | child < 0 | |
10952 | ||
10953 | /* Did the child fail? (This shouldn't happen.) */ | |
10954 | || status | |
10955 | ||
10956 | /* Did the vfork/compiler bug occur? */ | |
10957 | || parent != getpid() | |
10958 | ||
10959 | /* Did the file descriptor bug occur? */ | |
10960 | || fstat(fileno(stdout), &st) != 0 | |
10961 | ); | |
10962 | } | |
10963 | } | |
ba479fd2 NN |
10964 | _ACEOF |
10965 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
10966 | if { (ac_try="$ac_link" |
10967 | case "(($ac_try" in | |
10968 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10969 | *) ac_try_echo=$ac_try;; | |
10970 | esac | |
10971 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10972 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
10973 | ac_status=$? |
10974 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10975 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
10976 | { (case "(($ac_try" in |
10977 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
10978 | *) ac_try_echo=$ac_try;; | |
10979 | esac | |
10980 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
10981 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
10982 | ac_status=$? |
10983 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10984 | (exit $ac_status); }; }; then | |
c375c43b KG |
10985 | ac_cv_func_vfork_works=yes |
10986 | else | |
ba479fd2 NN |
10987 | echo "$as_me: program exited with status $ac_status" >&5 |
10988 | echo "$as_me: failed program was:" >&5 | |
10989 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10990 | ||
10991 | ( exit $ac_status ) | |
10992 | ac_cv_func_vfork_works=no | |
cafe096b | 10993 | fi |
ab22c1fa | 10994 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10995 | fi |
ab22c1fa CF |
10996 | |
10997 | ||
ba479fd2 | 10998 | fi |
ab22c1fa CF |
10999 | { echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 |
11000 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } | |
c375c43b | 11001 | |
ba479fd2 NN |
11002 | fi; |
11003 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 11004 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
11005 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
11006 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
11007 | fi |
11008 | ||
ba479fd2 NN |
11009 | if test "x$ac_cv_func_vfork_works" = xyes; then |
11010 | ||
11011 | cat >>confdefs.h <<\_ACEOF | |
11012 | #define HAVE_WORKING_VFORK 1 | |
11013 | _ACEOF | |
11014 | ||
11015 | else | |
11016 | ||
11017 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 11018 | #define vfork fork |
ba479fd2 | 11019 | _ACEOF |
c375c43b KG |
11020 | |
11021 | fi | |
ba479fd2 NN |
11022 | if test "x$ac_cv_func_fork_works" = xyes; then |
11023 | ||
11024 | cat >>confdefs.h <<\_ACEOF | |
11025 | #define HAVE_WORKING_FORK 1 | |
11026 | _ACEOF | |
11027 | ||
11028 | fi | |
11029 | ||
c375c43b | 11030 | |
81bf3d9e | 11031 | |
dfb77e37 KC |
11032 | if test "X$prefix" = "XNONE"; then |
11033 | acl_final_prefix="$ac_default_prefix" | |
11034 | else | |
11035 | acl_final_prefix="$prefix" | |
11036 | fi | |
11037 | if test "X$exec_prefix" = "XNONE"; then | |
11038 | acl_final_exec_prefix='${prefix}' | |
11039 | else | |
11040 | acl_final_exec_prefix="$exec_prefix" | |
11041 | fi | |
11042 | acl_save_prefix="$prefix" | |
11043 | prefix="$acl_final_prefix" | |
11044 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
11045 | prefix="$acl_save_prefix" | |
f91abfce TT |
11046 | |
11047 | ||
ab22c1fa | 11048 | # Check whether --with-gnu-ld was given. |
dfb77e37 | 11049 | if test "${with_gnu_ld+set}" = set; then |
ab22c1fa | 11050 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes |
ba479fd2 | 11051 | else |
dfb77e37 | 11052 | with_gnu_ld=no |
ab22c1fa CF |
11053 | fi |
11054 | ||
dfb77e37 KC |
11055 | # Prepare PATH_SEPARATOR. |
11056 | # The user is always right. | |
11057 | if test "${PATH_SEPARATOR+set}" != set; then | |
11058 | echo "#! /bin/sh" >conf$$.sh | |
11059 | echo "exit 0" >>conf$$.sh | |
11060 | chmod +x conf$$.sh | |
11061 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
11062 | PATH_SEPARATOR=';' | |
ba479fd2 | 11063 | else |
dfb77e37 | 11064 | PATH_SEPARATOR=: |
ba479fd2 | 11065 | fi |
dfb77e37 KC |
11066 | rm -f conf$$.sh |
11067 | fi | |
11068 | ac_prog=ld | |
11069 | if test "$GCC" = yes; then | |
11070 | # Check if gcc -print-prog-name=ld gives a path. | |
ab22c1fa CF |
11071 | { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 |
11072 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } | |
dfb77e37 KC |
11073 | case $host in |
11074 | *-*-mingw*) | |
11075 | # gcc leaves a trailing carriage return which upsets mingw | |
11076 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
11077 | *) | |
11078 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
11079 | esac | |
11080 | case $ac_prog in | |
11081 | # Accept absolute paths. | |
11082 | [\\/]* | [A-Za-z]:[\\/]*) | |
11083 | re_direlt='/[^/][^/]*/\.\./' | |
11084 | # Canonicalize the path of ld | |
11085 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
11086 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
11087 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
11088 | done | |
11089 | test -z "$LD" && LD="$ac_prog" | |
11090 | ;; | |
11091 | "") | |
11092 | # If it fails, then pretend we aren't using GCC. | |
11093 | ac_prog=ld | |
11094 | ;; | |
11095 | *) | |
11096 | # If it is relative, then search for the first ld in PATH. | |
11097 | with_gnu_ld=unknown | |
11098 | ;; | |
11099 | esac | |
11100 | elif test "$with_gnu_ld" = yes; then | |
ab22c1fa CF |
11101 | { echo "$as_me:$LINENO: checking for GNU ld" >&5 |
11102 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } | |
ba479fd2 | 11103 | else |
ab22c1fa CF |
11104 | { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
11105 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } | |
ba479fd2 | 11106 | fi |
dfb77e37 KC |
11107 | if test "${acl_cv_path_LD+set}" = set; then |
11108 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 11109 | else |
dfb77e37 KC |
11110 | if test -z "$LD"; then |
11111 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
11112 | for ac_dir in $PATH; do | |
11113 | test -z "$ac_dir" && ac_dir=. | |
11114 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
11115 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
11116 | # Check to see if the program is GNU ld. I'd rather use --version, | |
11117 | # but apparently some GNU ld's only accept -v. | |
11118 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
11119 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
11120 | test "$with_gnu_ld" != no && break | |
11121 | else | |
11122 | test "$with_gnu_ld" != yes && break | |
11123 | fi | |
dfb77e37 KC |
11124 | fi |
11125 | done | |
11126 | IFS="$ac_save_ifs" | |
11127 | else | |
11128 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
11129 | fi | |
11130 | fi | |
ba479fd2 | 11131 | |
dfb77e37 KC |
11132 | LD="$acl_cv_path_LD" |
11133 | if test -n "$LD"; then | |
ab22c1fa CF |
11134 | { echo "$as_me:$LINENO: result: $LD" >&5 |
11135 | echo "${ECHO_T}$LD" >&6; } | |
dfb77e37 | 11136 | else |
ab22c1fa CF |
11137 | { echo "$as_me:$LINENO: result: no" >&5 |
11138 | echo "${ECHO_T}no" >&6; } | |
ba479fd2 | 11139 | fi |
dfb77e37 KC |
11140 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
11141 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
11142 | { (exit 1); exit 1; }; } | |
ab22c1fa CF |
11143 | { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 |
11144 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } | |
dfb77e37 KC |
11145 | if test "${acl_cv_prog_gnu_ld+set}" = set; then |
11146 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11147 | else | |
11148 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
11149 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
11150 | acl_cv_prog_gnu_ld=yes | |
11151 | else | |
11152 | acl_cv_prog_gnu_ld=no | |
11153 | fi | |
dfb77e37 | 11154 | fi |
ab22c1fa CF |
11155 | { echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 |
11156 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } | |
dfb77e37 KC |
11157 | with_gnu_ld=$acl_cv_prog_gnu_ld |
11158 | ||
11159 | ||
11160 | ||
ab22c1fa CF |
11161 | { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 |
11162 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } | |
dfb77e37 KC |
11163 | if test "${acl_cv_rpath+set}" = set; then |
11164 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11165 | else | |
11166 | ||
11167 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
11168 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
11169 | . ./conftest.sh | |
11170 | rm -f ./conftest.sh | |
11171 | acl_cv_rpath=done | |
ba479fd2 | 11172 | |
eb158727 | 11173 | fi |
ab22c1fa CF |
11174 | { echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
11175 | echo "${ECHO_T}$acl_cv_rpath" >&6; } | |
dfb77e37 KC |
11176 | wl="$acl_cv_wl" |
11177 | libext="$acl_cv_libext" | |
11178 | shlibext="$acl_cv_shlibext" | |
11179 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
11180 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
11181 | hardcode_direct="$acl_cv_hardcode_direct" | |
11182 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
ab22c1fa | 11183 | # Check whether --enable-rpath was given. |
dfb77e37 | 11184 | if test "${enable_rpath+set}" = set; then |
ab22c1fa | 11185 | enableval=$enable_rpath; : |
dfb77e37 KC |
11186 | else |
11187 | enable_rpath=yes | |
ab22c1fa CF |
11188 | fi |
11189 | ||
8b1f719a | 11190 | |
a6ccdbab | 11191 | |
dfb77e37 KC |
11192 | |
11193 | ||
11194 | ||
11195 | ||
11196 | ||
b639c3c2 JJ |
11197 | use_additional=yes |
11198 | ||
11199 | acl_save_prefix="$prefix" | |
11200 | prefix="$acl_final_prefix" | |
11201 | acl_save_exec_prefix="$exec_prefix" | |
11202 | exec_prefix="$acl_final_exec_prefix" | |
11203 | ||
11204 | eval additional_includedir=\"$includedir\" | |
11205 | eval additional_libdir=\"$libdir\" | |
11206 | ||
11207 | exec_prefix="$acl_save_exec_prefix" | |
11208 | prefix="$acl_save_prefix" | |
dfb77e37 KC |
11209 | |
11210 | ||
ab22c1fa | 11211 | # Check whether --with-libiconv-prefix was given. |
8b1f719a | 11212 | if test "${with_libiconv_prefix+set}" = set; then |
ab22c1fa | 11213 | withval=$with_libiconv_prefix; |
8b1f719a | 11214 | if test "X$withval" = "Xno"; then |
b639c3c2 | 11215 | use_additional=no |
8b1f719a PB |
11216 | else |
11217 | if test "X$withval" = "X"; then | |
dfb77e37 KC |
11218 | |
11219 | acl_save_prefix="$prefix" | |
11220 | prefix="$acl_final_prefix" | |
11221 | acl_save_exec_prefix="$exec_prefix" | |
11222 | exec_prefix="$acl_final_exec_prefix" | |
11223 | ||
b639c3c2 JJ |
11224 | eval additional_includedir=\"$includedir\" |
11225 | eval additional_libdir=\"$libdir\" | |
dfb77e37 KC |
11226 | |
11227 | exec_prefix="$acl_save_exec_prefix" | |
11228 | prefix="$acl_save_prefix" | |
11229 | ||
8b1f719a | 11230 | else |
b639c3c2 JJ |
11231 | additional_includedir="$withval/include" |
11232 | additional_libdir="$withval/lib" | |
8b1f719a PB |
11233 | fi |
11234 | fi | |
11235 | ||
ab22c1fa CF |
11236 | fi |
11237 | ||
dfb77e37 KC |
11238 | LIBICONV= |
11239 | LTLIBICONV= | |
11240 | INCICONV= | |
11241 | rpathdirs= | |
11242 | ltrpathdirs= | |
11243 | names_already_handled= | |
11244 | names_next_round='iconv ' | |
11245 | while test -n "$names_next_round"; do | |
11246 | names_this_round="$names_next_round" | |
11247 | names_next_round= | |
11248 | for name in $names_this_round; do | |
11249 | already_handled= | |
11250 | for n in $names_already_handled; do | |
11251 | if test "$n" = "$name"; then | |
11252 | already_handled=yes | |
11253 | break | |
11254 | fi | |
11255 | done | |
11256 | if test -z "$already_handled"; then | |
11257 | names_already_handled="$names_already_handled $name" | |
11258 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
11259 | eval value=\"\$HAVE_LIB$uppername\" | |
11260 | if test -n "$value"; then | |
11261 | if test "$value" = yes; then | |
11262 | eval value=\"\$LIB$uppername\" | |
11263 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
11264 | eval value=\"\$LTLIB$uppername\" | |
11265 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
11266 | else | |
11267 | : | |
11268 | fi | |
11269 | else | |
11270 | found_dir= | |
11271 | found_la= | |
11272 | found_so= | |
11273 | found_a= | |
b639c3c2 JJ |
11274 | if test $use_additional = yes; then |
11275 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
11276 | found_dir="$additional_libdir" | |
11277 | found_so="$additional_libdir/lib$name.$shlibext" | |
11278 | if test -f "$additional_libdir/lib$name.la"; then | |
11279 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
11280 | fi |
11281 | else | |
b639c3c2 JJ |
11282 | if test -f "$additional_libdir/lib$name.$libext"; then |
11283 | found_dir="$additional_libdir" | |
11284 | found_a="$additional_libdir/lib$name.$libext" | |
11285 | if test -f "$additional_libdir/lib$name.la"; then | |
11286 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
11287 | fi |
11288 | fi | |
11289 | fi | |
11290 | fi | |
11291 | if test "X$found_dir" = "X"; then | |
11292 | for x in $LDFLAGS $LTLIBICONV; do | |
11293 | ||
11294 | acl_save_prefix="$prefix" | |
11295 | prefix="$acl_final_prefix" | |
11296 | acl_save_exec_prefix="$exec_prefix" | |
11297 | exec_prefix="$acl_final_exec_prefix" | |
11298 | eval x=\"$x\" | |
11299 | exec_prefix="$acl_save_exec_prefix" | |
11300 | prefix="$acl_save_prefix" | |
11301 | ||
11302 | case "$x" in | |
11303 | -L*) | |
11304 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
11305 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
11306 | found_dir="$dir" | |
11307 | found_so="$dir/lib$name.$shlibext" | |
11308 | if test -f "$dir/lib$name.la"; then | |
11309 | found_la="$dir/lib$name.la" | |
11310 | fi | |
11311 | else | |
11312 | if test -f "$dir/lib$name.$libext"; then | |
11313 | found_dir="$dir" | |
11314 | found_a="$dir/lib$name.$libext" | |
11315 | if test -f "$dir/lib$name.la"; then | |
11316 | found_la="$dir/lib$name.la" | |
11317 | fi | |
11318 | fi | |
11319 | fi | |
11320 | ;; | |
11321 | esac | |
11322 | if test "X$found_dir" != "X"; then | |
11323 | break | |
11324 | fi | |
11325 | done | |
11326 | fi | |
11327 | if test "X$found_dir" != "X"; then | |
11328 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
11329 | if test "X$found_so" != "X"; then | |
11330 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
11331 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11332 | else | |
11333 | haveit= | |
11334 | for x in $ltrpathdirs; do | |
11335 | if test "X$x" = "X$found_dir"; then | |
11336 | haveit=yes | |
11337 | break | |
11338 | fi | |
11339 | done | |
11340 | if test -z "$haveit"; then | |
11341 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11342 | fi | |
11343 | if test "$hardcode_direct" = yes; then | |
11344 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11345 | else | |
11346 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11347 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11348 | haveit= | |
11349 | for x in $rpathdirs; do | |
11350 | if test "X$x" = "X$found_dir"; then | |
11351 | haveit=yes | |
11352 | break | |
11353 | fi | |
11354 | done | |
11355 | if test -z "$haveit"; then | |
11356 | rpathdirs="$rpathdirs $found_dir" | |
11357 | fi | |
11358 | else | |
11359 | haveit= | |
11360 | for x in $LDFLAGS $LIBICONV; do | |
11361 | ||
11362 | acl_save_prefix="$prefix" | |
11363 | prefix="$acl_final_prefix" | |
11364 | acl_save_exec_prefix="$exec_prefix" | |
11365 | exec_prefix="$acl_final_exec_prefix" | |
11366 | eval x=\"$x\" | |
11367 | exec_prefix="$acl_save_exec_prefix" | |
11368 | prefix="$acl_save_prefix" | |
11369 | ||
11370 | if test "X$x" = "X-L$found_dir"; then | |
11371 | haveit=yes | |
11372 | break | |
11373 | fi | |
11374 | done | |
11375 | if test -z "$haveit"; then | |
11376 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
11377 | fi | |
11378 | if test "$hardcode_minus_L" != no; then | |
11379 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
11380 | else | |
11381 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
11382 | fi | |
11383 | fi | |
11384 | fi | |
11385 | fi | |
11386 | else | |
11387 | if test "X$found_a" != "X"; then | |
11388 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
11389 | else | |
11390 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
11391 | fi | |
11392 | fi | |
11393 | additional_includedir= | |
11394 | case "$found_dir" in | |
11395 | */lib | */lib/) | |
11396 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11397 | additional_includedir="$basedir/include" | |
11398 | ;; | |
11399 | esac | |
11400 | if test "X$additional_includedir" != "X"; then | |
11401 | if test "X$additional_includedir" != "X/usr/include"; then | |
11402 | haveit= | |
11403 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11404 | if test -n "$GCC"; then | |
11405 | case $host_os in | |
18fc9bd4 | 11406 | linux*) haveit=yes;; |
dfb77e37 KC |
11407 | esac |
11408 | fi | |
11409 | fi | |
11410 | if test -z "$haveit"; then | |
11411 | for x in $CPPFLAGS $INCICONV; do | |
11412 | ||
11413 | acl_save_prefix="$prefix" | |
11414 | prefix="$acl_final_prefix" | |
11415 | acl_save_exec_prefix="$exec_prefix" | |
11416 | exec_prefix="$acl_final_exec_prefix" | |
11417 | eval x=\"$x\" | |
11418 | exec_prefix="$acl_save_exec_prefix" | |
11419 | prefix="$acl_save_prefix" | |
11420 | ||
11421 | if test "X$x" = "X-I$additional_includedir"; then | |
11422 | haveit=yes | |
11423 | break | |
11424 | fi | |
11425 | done | |
11426 | if test -z "$haveit"; then | |
11427 | if test -d "$additional_includedir"; then | |
11428 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
11429 | fi | |
11430 | fi | |
11431 | fi | |
11432 | fi | |
11433 | fi | |
11434 | if test -n "$found_la"; then | |
11435 | save_libdir="$libdir" | |
11436 | case "$found_la" in | |
11437 | */* | *\\*) . "$found_la" ;; | |
11438 | *) . "./$found_la" ;; | |
11439 | esac | |
11440 | libdir="$save_libdir" | |
11441 | for dep in $dependency_libs; do | |
11442 | case "$dep" in | |
11443 | -L*) | |
11444 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11445 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11446 | haveit= | |
11447 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11448 | if test -n "$GCC"; then | |
11449 | case $host_os in | |
18fc9bd4 | 11450 | linux*) haveit=yes;; |
dfb77e37 KC |
11451 | esac |
11452 | fi | |
11453 | fi | |
11454 | if test -z "$haveit"; then | |
11455 | haveit= | |
11456 | for x in $LDFLAGS $LIBICONV; do | |
11457 | ||
11458 | acl_save_prefix="$prefix" | |
11459 | prefix="$acl_final_prefix" | |
11460 | acl_save_exec_prefix="$exec_prefix" | |
11461 | exec_prefix="$acl_final_exec_prefix" | |
11462 | eval x=\"$x\" | |
11463 | exec_prefix="$acl_save_exec_prefix" | |
11464 | prefix="$acl_save_prefix" | |
11465 | ||
11466 | if test "X$x" = "X-L$additional_libdir"; then | |
11467 | haveit=yes | |
11468 | break | |
11469 | fi | |
11470 | done | |
11471 | if test -z "$haveit"; then | |
11472 | if test -d "$additional_libdir"; then | |
11473 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
11474 | fi | |
11475 | fi | |
11476 | haveit= | |
11477 | for x in $LDFLAGS $LTLIBICONV; do | |
11478 | ||
11479 | acl_save_prefix="$prefix" | |
11480 | prefix="$acl_final_prefix" | |
11481 | acl_save_exec_prefix="$exec_prefix" | |
11482 | exec_prefix="$acl_final_exec_prefix" | |
11483 | eval x=\"$x\" | |
11484 | exec_prefix="$acl_save_exec_prefix" | |
11485 | prefix="$acl_save_prefix" | |
11486 | ||
11487 | if test "X$x" = "X-L$additional_libdir"; then | |
11488 | haveit=yes | |
11489 | break | |
11490 | fi | |
11491 | done | |
11492 | if test -z "$haveit"; then | |
11493 | if test -d "$additional_libdir"; then | |
11494 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
11495 | fi | |
11496 | fi | |
11497 | fi | |
11498 | fi | |
11499 | ;; | |
11500 | -R*) | |
11501 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
11502 | if test "$enable_rpath" != no; then | |
11503 | haveit= | |
11504 | for x in $rpathdirs; do | |
11505 | if test "X$x" = "X$dir"; then | |
11506 | haveit=yes | |
11507 | break | |
11508 | fi | |
11509 | done | |
11510 | if test -z "$haveit"; then | |
11511 | rpathdirs="$rpathdirs $dir" | |
11512 | fi | |
11513 | haveit= | |
11514 | for x in $ltrpathdirs; do | |
11515 | if test "X$x" = "X$dir"; then | |
11516 | haveit=yes | |
11517 | break | |
11518 | fi | |
11519 | done | |
11520 | if test -z "$haveit"; then | |
11521 | ltrpathdirs="$ltrpathdirs $dir" | |
11522 | fi | |
11523 | fi | |
11524 | ;; | |
11525 | -l*) | |
11526 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
11527 | ;; | |
11528 | *.la) | |
11529 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
11530 | ;; | |
11531 | *) | |
11532 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
11533 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
11534 | ;; | |
11535 | esac | |
11536 | done | |
11537 | fi | |
11538 | else | |
11539 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
11540 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
11541 | fi | |
11542 | fi | |
11543 | fi | |
11544 | done | |
11545 | done | |
11546 | if test "X$rpathdirs" != "X"; then | |
11547 | if test -n "$hardcode_libdir_separator"; then | |
11548 | alldirs= | |
11549 | for found_dir in $rpathdirs; do | |
11550 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11551 | done | |
11552 | acl_save_libdir="$libdir" | |
11553 | libdir="$alldirs" | |
11554 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11555 | libdir="$acl_save_libdir" | |
11556 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
11557 | else | |
11558 | for found_dir in $rpathdirs; do | |
11559 | acl_save_libdir="$libdir" | |
11560 | libdir="$found_dir" | |
11561 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11562 | libdir="$acl_save_libdir" | |
11563 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
11564 | done | |
11565 | fi | |
11566 | fi | |
11567 | if test "X$ltrpathdirs" != "X"; then | |
11568 | for found_dir in $ltrpathdirs; do | |
11569 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
11570 | done | |
11571 | fi | |
11572 | ||
11573 | ||
11574 | ||
11575 | ||
11576 | ||
11577 | ||
11578 | ||
11579 | am_save_CPPFLAGS="$CPPFLAGS" | |
11580 | ||
11581 | for element in $INCICONV; do | |
11582 | haveit= | |
11583 | for x in $CPPFLAGS; do | |
11584 | ||
11585 | acl_save_prefix="$prefix" | |
11586 | prefix="$acl_final_prefix" | |
11587 | acl_save_exec_prefix="$exec_prefix" | |
11588 | exec_prefix="$acl_final_exec_prefix" | |
11589 | eval x=\"$x\" | |
11590 | exec_prefix="$acl_save_exec_prefix" | |
11591 | prefix="$acl_save_prefix" | |
11592 | ||
11593 | if test "X$x" = "X$element"; then | |
11594 | haveit=yes | |
11595 | break | |
11596 | fi | |
11597 | done | |
11598 | if test -z "$haveit"; then | |
11599 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11600 | fi | |
11601 | done | |
eb158727 ZW |
11602 | |
11603 | ||
ab22c1fa CF |
11604 | { echo "$as_me:$LINENO: checking for iconv" >&5 |
11605 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } | |
ba479fd2 NN |
11606 | if test "${am_cv_func_iconv+set}" = set; then |
11607 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11608 | else |
ba479fd2 | 11609 | |
f91abfce TT |
11610 | am_cv_func_iconv="no, consider installing GNU libiconv" |
11611 | am_cv_lib_iconv=no | |
ba479fd2 | 11612 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11613 | /* confdefs.h. */ |
11614 | _ACEOF | |
11615 | cat confdefs.h >>conftest.$ac_ext | |
11616 | cat >>conftest.$ac_ext <<_ACEOF | |
11617 | /* end confdefs.h. */ | |
f91abfce TT |
11618 | #include <stdlib.h> |
11619 | #include <iconv.h> | |
ba479fd2 NN |
11620 | int |
11621 | main () | |
11622 | { | |
f91abfce TT |
11623 | iconv_t cd = iconv_open("",""); |
11624 | iconv(cd,NULL,NULL,NULL,NULL); | |
11625 | iconv_close(cd); | |
ba479fd2 NN |
11626 | ; |
11627 | return 0; | |
11628 | } | |
11629 | _ACEOF | |
11630 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
11631 | if { (ac_try="$ac_link" |
11632 | case "(($ac_try" in | |
11633 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11634 | *) ac_try_echo=$ac_try;; | |
11635 | esac | |
11636 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11637 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 11638 | ac_status=$? |
86da66b5 HPN |
11639 | grep -v '^ *+' conftest.er1 >conftest.err |
11640 | rm -f conftest.er1 | |
11641 | cat conftest.err >&5 | |
ba479fd2 | 11642 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
11643 | (exit $ac_status); } && { |
11644 | test -z "$ac_c_werror_flag" || | |
11645 | test ! -s conftest.err | |
11646 | } && test -s conftest$ac_exeext && | |
11647 | $as_test_x conftest$ac_exeext; then | |
f91abfce TT |
11648 | am_cv_func_iconv=yes |
11649 | else | |
ba479fd2 NN |
11650 | echo "$as_me: failed program was:" >&5 |
11651 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11652 | ||
ab22c1fa | 11653 | |
f91abfce | 11654 | fi |
ab22c1fa CF |
11655 | |
11656 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 11657 | conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
11658 | if test "$am_cv_func_iconv" != yes; then |
11659 | am_save_LIBS="$LIBS" | |
dfb77e37 | 11660 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 11661 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11662 | /* confdefs.h. */ |
11663 | _ACEOF | |
11664 | cat confdefs.h >>conftest.$ac_ext | |
11665 | cat >>conftest.$ac_ext <<_ACEOF | |
11666 | /* end confdefs.h. */ | |
f91abfce TT |
11667 | #include <stdlib.h> |
11668 | #include <iconv.h> | |
ba479fd2 NN |
11669 | int |
11670 | main () | |
11671 | { | |
f91abfce TT |
11672 | iconv_t cd = iconv_open("",""); |
11673 | iconv(cd,NULL,NULL,NULL,NULL); | |
11674 | iconv_close(cd); | |
ba479fd2 NN |
11675 | ; |
11676 | return 0; | |
11677 | } | |
11678 | _ACEOF | |
11679 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
11680 | if { (ac_try="$ac_link" |
11681 | case "(($ac_try" in | |
11682 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11683 | *) ac_try_echo=$ac_try;; | |
11684 | esac | |
11685 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11686 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 11687 | ac_status=$? |
86da66b5 HPN |
11688 | grep -v '^ *+' conftest.er1 >conftest.err |
11689 | rm -f conftest.er1 | |
11690 | cat conftest.err >&5 | |
ba479fd2 | 11691 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
11692 | (exit $ac_status); } && { |
11693 | test -z "$ac_c_werror_flag" || | |
11694 | test ! -s conftest.err | |
11695 | } && test -s conftest$ac_exeext && | |
11696 | $as_test_x conftest$ac_exeext; then | |
f91abfce TT |
11697 | am_cv_lib_iconv=yes |
11698 | am_cv_func_iconv=yes | |
11699 | else | |
ba479fd2 NN |
11700 | echo "$as_me: failed program was:" >&5 |
11701 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11702 | ||
ab22c1fa | 11703 | |
f91abfce | 11704 | fi |
ab22c1fa CF |
11705 | |
11706 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 11707 | conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
11708 | LIBS="$am_save_LIBS" |
11709 | fi | |
6e3f3080 | 11710 | |
ba479fd2 | 11711 | fi |
ab22c1fa CF |
11712 | { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 |
11713 | echo "${ECHO_T}$am_cv_func_iconv" >&6; } | |
63cf211a | 11714 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
11715 | |
11716 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 11717 | #define HAVE_ICONV 1 |
ba479fd2 | 11718 | _ACEOF |
f91abfce | 11719 | |
dfb77e37 KC |
11720 | fi |
11721 | if test "$am_cv_lib_iconv" = yes; then | |
ab22c1fa CF |
11722 | { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 |
11723 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } | |
11724 | { echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
11725 | echo "${ECHO_T}$LIBICONV" >&6; } | |
dfb77e37 KC |
11726 | else |
11727 | CPPFLAGS="$am_save_CPPFLAGS" | |
11728 | LIBICONV= | |
11729 | LTLIBICONV= | |
11730 | fi | |
11731 | ||
11732 | ||
11733 | ||
11734 | if test "$am_cv_func_iconv" = yes; then | |
ab22c1fa CF |
11735 | { echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
11736 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } | |
ba479fd2 NN |
11737 | if test "${am_cv_proto_iconv+set}" = set; then |
11738 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11739 | else |
ba479fd2 NN |
11740 | |
11741 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11742 | /* confdefs.h. */ |
11743 | _ACEOF | |
11744 | cat confdefs.h >>conftest.$ac_ext | |
11745 | cat >>conftest.$ac_ext <<_ACEOF | |
11746 | /* end confdefs.h. */ | |
f91abfce TT |
11747 | |
11748 | #include <stdlib.h> | |
11749 | #include <iconv.h> | |
11750 | extern | |
11751 | #ifdef __cplusplus | |
11752 | "C" | |
11753 | #endif | |
11754 | #if defined(__STDC__) || defined(__cplusplus) | |
11755 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11756 | #else | |
11757 | size_t iconv(); | |
11758 | #endif | |
11759 | ||
ba479fd2 NN |
11760 | int |
11761 | main () | |
11762 | { | |
f91abfce | 11763 | |
ba479fd2 NN |
11764 | ; |
11765 | return 0; | |
11766 | } | |
11767 | _ACEOF | |
11768 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
11769 | if { (ac_try="$ac_compile" |
11770 | case "(($ac_try" in | |
11771 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11772 | *) ac_try_echo=$ac_try;; | |
11773 | esac | |
11774 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11775 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 11776 | ac_status=$? |
86da66b5 HPN |
11777 | grep -v '^ *+' conftest.er1 >conftest.err |
11778 | rm -f conftest.er1 | |
11779 | cat conftest.err >&5 | |
ba479fd2 | 11780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
11781 | (exit $ac_status); } && { |
11782 | test -z "$ac_c_werror_flag" || | |
11783 | test ! -s conftest.err | |
11784 | } && test -s conftest.$ac_objext; then | |
f91abfce TT |
11785 | am_cv_proto_iconv_arg1="" |
11786 | else | |
ba479fd2 NN |
11787 | echo "$as_me: failed program was:" >&5 |
11788 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11789 | ||
ab22c1fa | 11790 | am_cv_proto_iconv_arg1="const" |
f91abfce | 11791 | fi |
ab22c1fa CF |
11792 | |
11793 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
f91abfce TT |
11794 | 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);" |
11795 | fi | |
11796 | ||
11797 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ab22c1fa | 11798 | { echo "$as_me:$LINENO: result: ${ac_t:- |
ba479fd2 NN |
11799 | }$am_cv_proto_iconv" >&5 |
11800 | echo "${ECHO_T}${ac_t:- | |
ab22c1fa | 11801 | }$am_cv_proto_iconv" >&6; } |
ba479fd2 NN |
11802 | |
11803 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11804 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11805 | _ACEOF |
f91abfce TT |
11806 | |
11807 | fi | |
f91abfce | 11808 | |
56694dd9 ZW |
11809 | # Until we have in-tree GNU iconv: |
11810 | LIBICONV_DEP= | |
11811 | ||
11812 | ||
18fc9bd4 | 11813 | |
ab22c1fa CF |
11814 | { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
11815 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } | |
18fc9bd4 RG |
11816 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then |
11817 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11818 | else | |
11819 | cat >conftest.$ac_ext <<_ACEOF | |
11820 | /* confdefs.h. */ | |
11821 | _ACEOF | |
11822 | cat confdefs.h >>conftest.$ac_ext | |
11823 | cat >>conftest.$ac_ext <<_ACEOF | |
11824 | /* end confdefs.h. */ | |
11825 | #include <locale.h> | |
11826 | int | |
11827 | main () | |
11828 | { | |
11829 | return LC_MESSAGES | |
11830 | ; | |
11831 | return 0; | |
11832 | } | |
11833 | _ACEOF | |
11834 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
11835 | if { (ac_try="$ac_link" |
11836 | case "(($ac_try" in | |
11837 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11838 | *) ac_try_echo=$ac_try;; | |
11839 | esac | |
11840 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11841 | (eval "$ac_link") 2>conftest.er1 | |
18fc9bd4 RG |
11842 | ac_status=$? |
11843 | grep -v '^ *+' conftest.er1 >conftest.err | |
11844 | rm -f conftest.er1 | |
11845 | cat conftest.err >&5 | |
11846 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
11847 | (exit $ac_status); } && { |
11848 | test -z "$ac_c_werror_flag" || | |
11849 | test ! -s conftest.err | |
11850 | } && test -s conftest$ac_exeext && | |
11851 | $as_test_x conftest$ac_exeext; then | |
18fc9bd4 RG |
11852 | am_cv_val_LC_MESSAGES=yes |
11853 | else | |
11854 | echo "$as_me: failed program was:" >&5 | |
11855 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11856 | ||
ab22c1fa | 11857 | am_cv_val_LC_MESSAGES=no |
18fc9bd4 | 11858 | fi |
ab22c1fa CF |
11859 | |
11860 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
18fc9bd4 RG |
11861 | conftest$ac_exeext conftest.$ac_ext |
11862 | fi | |
ab22c1fa CF |
11863 | { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
11864 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; } | |
18fc9bd4 RG |
11865 | if test $am_cv_val_LC_MESSAGES = yes; then |
11866 | ||
11867 | cat >>confdefs.h <<\_ACEOF | |
11868 | #define HAVE_LC_MESSAGES 1 | |
11869 | _ACEOF | |
11870 | ||
11871 | fi | |
11872 | ||
f91abfce | 11873 | |
a03ea89b | 11874 | |
ab22c1fa CF |
11875 | { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 |
11876 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } | |
a03ea89b BM |
11877 | if test "${am_cv_langinfo_codeset+set}" = set; then |
11878 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11879 | else | |
11880 | cat >conftest.$ac_ext <<_ACEOF | |
11881 | /* confdefs.h. */ | |
11882 | _ACEOF | |
11883 | cat confdefs.h >>conftest.$ac_ext | |
11884 | cat >>conftest.$ac_ext <<_ACEOF | |
11885 | /* end confdefs.h. */ | |
11886 | #include <langinfo.h> | |
11887 | int | |
11888 | main () | |
11889 | { | |
11890 | char* cs = nl_langinfo(CODESET); | |
11891 | ; | |
11892 | return 0; | |
11893 | } | |
11894 | _ACEOF | |
11895 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
11896 | if { (ac_try="$ac_link" |
11897 | case "(($ac_try" in | |
11898 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
11899 | *) ac_try_echo=$ac_try;; | |
11900 | esac | |
11901 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
11902 | (eval "$ac_link") 2>conftest.er1 | |
a03ea89b BM |
11903 | ac_status=$? |
11904 | grep -v '^ *+' conftest.er1 >conftest.err | |
11905 | rm -f conftest.er1 | |
11906 | cat conftest.err >&5 | |
11907 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
11908 | (exit $ac_status); } && { |
11909 | test -z "$ac_c_werror_flag" || | |
11910 | test ! -s conftest.err | |
11911 | } && test -s conftest$ac_exeext && | |
11912 | $as_test_x conftest$ac_exeext; then | |
a03ea89b BM |
11913 | am_cv_langinfo_codeset=yes |
11914 | else | |
11915 | echo "$as_me: failed program was:" >&5 | |
11916 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11917 | ||
ab22c1fa | 11918 | am_cv_langinfo_codeset=no |
a03ea89b | 11919 | fi |
ab22c1fa CF |
11920 | |
11921 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
a03ea89b BM |
11922 | conftest$ac_exeext conftest.$ac_ext |
11923 | ||
11924 | fi | |
ab22c1fa CF |
11925 | { echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 |
11926 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } | |
a03ea89b BM |
11927 | if test $am_cv_langinfo_codeset = yes; then |
11928 | ||
11929 | cat >>confdefs.h <<\_ACEOF | |
11930 | #define HAVE_LANGINFO_CODESET 1 | |
11931 | _ACEOF | |
11932 | ||
11933 | fi | |
11934 | ||
11935 | ||
86cf1cbd KG |
11936 | # We will need to find libiberty.h and ansidecl.h |
11937 | saved_CFLAGS="$CFLAGS" | |
11938 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11939 | |
11940 | ||
11941 | ||
11942 | ||
11943 | ||
11944 | ||
11945 | ||
11946 | ||
11947 | ||
11948 | ||
11949 | ||
11950 | ||
11951 | ||
11952 | ||
11953 | ||
11954 | ||
11955 | ||
11956 | ||
11957 | ||
11958 | ||
11959 | ||
6a257778 | 11960 | |
ad6717df PB |
11961 | |
11962 | ||
0d667716 KG |
11963 | |
11964 | ||
11965 | ||
11966 | ||
11967 | ||
11968 | ||
11969 | ||
11970 | ||
11971 | ||
11972 | ||
367e8319 | 11973 | |
0d667716 KG |
11974 | |
11975 | ||
7391b66c | 11976 | |
ed5b9f96 GK |
11977 | |
11978 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11979 | strsignal strstr strverscmp \ | |
11980 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11981 | 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 | 11982 | do |
ad6717df | 11983 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ab22c1fa CF |
11984 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11985 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
11986 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
11987 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11988 | else | |
11989 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11990 | /* confdefs.h. */ |
11991 | _ACEOF | |
11992 | cat confdefs.h >>conftest.$ac_ext | |
11993 | cat >>conftest.$ac_ext <<_ACEOF | |
11994 | /* end confdefs.h. */ | |
7afe8c41 KG |
11995 | #undef $ac_tr_decl |
11996 | #define $ac_tr_decl 1 | |
ba479fd2 | 11997 | |
d02af173 | 11998 | #include "ansidecl.h" |
86cf1cbd | 11999 | #include "system.h" |
f31e826b | 12000 | |
ba479fd2 NN |
12001 | int |
12002 | main () | |
12003 | { | |
86cf1cbd KG |
12004 | #ifndef $ac_func |
12005 | char *(*pfn) = (char *(*)) $ac_func ; | |
12006 | #endif | |
ba479fd2 NN |
12007 | ; |
12008 | return 0; | |
12009 | } | |
12010 | _ACEOF | |
12011 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12012 | if { (ac_try="$ac_compile" |
12013 | case "(($ac_try" in | |
12014 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12015 | *) ac_try_echo=$ac_try;; | |
12016 | esac | |
12017 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12018 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12019 | ac_status=$? |
86da66b5 HPN |
12020 | grep -v '^ *+' conftest.er1 >conftest.err |
12021 | rm -f conftest.er1 | |
12022 | cat conftest.err >&5 | |
ba479fd2 | 12023 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12024 | (exit $ac_status); } && { |
12025 | test -z "$ac_c_werror_flag" || | |
12026 | test ! -s conftest.err | |
12027 | } && test -s conftest.$ac_objext; then | |
f31e826b | 12028 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 12029 | else |
ba479fd2 NN |
12030 | echo "$as_me: failed program was:" >&5 |
12031 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12032 | ||
ab22c1fa | 12033 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 12034 | fi |
ab22c1fa CF |
12035 | |
12036 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
81bf3d9e RH |
12037 | fi |
12038 | ||
f31e826b | 12039 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ab22c1fa CF |
12040 | { echo "$as_me:$LINENO: result: yes" >&5 |
12041 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 12042 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12043 | _ACEOF |
12044 | ||
81bf3d9e | 12045 | else |
ab22c1fa CF |
12046 | { echo "$as_me:$LINENO: result: no" >&5 |
12047 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 12048 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12049 | _ACEOF |
12050 | ||
81bf3d9e RH |
12051 | fi |
12052 | ||
12053 | done | |
ba479fd2 | 12054 | |
ba479fd2 | 12055 | |
ba479fd2 | 12056 | |
81bf3d9e | 12057 | |
81bf3d9e RH |
12058 | |
12059 | for ac_func in getrlimit setrlimit getrusage | |
12060 | do | |
ad6717df | 12061 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ab22c1fa CF |
12062 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12063 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12064 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
12065 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12066 | else | |
12067 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12068 | /* confdefs.h. */ |
12069 | _ACEOF | |
12070 | cat confdefs.h >>conftest.$ac_ext | |
12071 | cat >>conftest.$ac_ext <<_ACEOF | |
12072 | /* end confdefs.h. */ | |
7afe8c41 KG |
12073 | #undef $ac_tr_decl |
12074 | #define $ac_tr_decl 1 | |
ba479fd2 | 12075 | |
d02af173 | 12076 | #include "ansidecl.h" |
86cf1cbd | 12077 | #include "system.h" |
81bf3d9e RH |
12078 | #ifdef HAVE_SYS_RESOURCE_H |
12079 | #include <sys/resource.h> | |
12080 | #endif | |
12081 | ||
f31e826b | 12082 | |
ba479fd2 NN |
12083 | int |
12084 | main () | |
12085 | { | |
86cf1cbd KG |
12086 | #ifndef $ac_func |
12087 | char *(*pfn) = (char *(*)) $ac_func ; | |
12088 | #endif | |
ba479fd2 NN |
12089 | ; |
12090 | return 0; | |
12091 | } | |
12092 | _ACEOF | |
12093 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12094 | if { (ac_try="$ac_compile" |
12095 | case "(($ac_try" in | |
12096 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12097 | *) ac_try_echo=$ac_try;; | |
12098 | esac | |
12099 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12100 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12101 | ac_status=$? |
86da66b5 HPN |
12102 | grep -v '^ *+' conftest.er1 >conftest.err |
12103 | rm -f conftest.er1 | |
12104 | cat conftest.err >&5 | |
ba479fd2 | 12105 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12106 | (exit $ac_status); } && { |
12107 | test -z "$ac_c_werror_flag" || | |
12108 | test ! -s conftest.err | |
12109 | } && test -s conftest.$ac_objext; then | |
f31e826b | 12110 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 12111 | else |
ba479fd2 NN |
12112 | echo "$as_me: failed program was:" >&5 |
12113 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12114 | ||
ab22c1fa | 12115 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 12116 | fi |
ab22c1fa CF |
12117 | |
12118 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
81bf3d9e RH |
12119 | fi |
12120 | ||
f31e826b | 12121 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ab22c1fa CF |
12122 | { echo "$as_me:$LINENO: result: yes" >&5 |
12123 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 12124 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12125 | _ACEOF |
12126 | ||
81bf3d9e | 12127 | else |
ab22c1fa CF |
12128 | { echo "$as_me:$LINENO: result: no" >&5 |
12129 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 12130 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12131 | _ACEOF |
12132 | ||
81bf3d9e RH |
12133 | fi |
12134 | ||
12135 | done | |
86cf1cbd | 12136 | |
81bf3d9e | 12137 | |
ba479fd2 | 12138 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12139 | /* confdefs.h. */ |
12140 | _ACEOF | |
12141 | cat confdefs.h >>conftest.$ac_ext | |
12142 | cat >>conftest.$ac_ext <<_ACEOF | |
12143 | /* end confdefs.h. */ | |
b2522d2b HPN |
12144 | |
12145 | #include "ansidecl.h" | |
12146 | #include "system.h" | |
12147 | #ifdef HAVE_SYS_RESOURCE_H | |
12148 | #include <sys/resource.h> | |
12149 | #endif | |
12150 | ||
ba479fd2 NN |
12151 | int |
12152 | main () | |
12153 | { | |
b2522d2b | 12154 | rlim_t l = 0; |
ba479fd2 NN |
12155 | ; |
12156 | return 0; | |
12157 | } | |
12158 | _ACEOF | |
12159 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12160 | if { (ac_try="$ac_compile" |
12161 | case "(($ac_try" in | |
12162 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12163 | *) ac_try_echo=$ac_try;; | |
12164 | esac | |
12165 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12166 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12167 | ac_status=$? |
86da66b5 HPN |
12168 | grep -v '^ *+' conftest.er1 >conftest.err |
12169 | rm -f conftest.er1 | |
12170 | cat conftest.err >&5 | |
ba479fd2 | 12171 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12172 | (exit $ac_status); } && { |
12173 | test -z "$ac_c_werror_flag" || | |
12174 | test ! -s conftest.err | |
12175 | } && test -s conftest.$ac_objext; then | |
b2522d2b HPN |
12176 | : |
12177 | else | |
ba479fd2 NN |
12178 | echo "$as_me: failed program was:" >&5 |
12179 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12180 | ||
12181 | ||
12182 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 12183 | #define rlim_t long |
ba479fd2 | 12184 | _ACEOF |
b2522d2b HPN |
12185 | |
12186 | fi | |
ab22c1fa CF |
12187 | |
12188 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b2522d2b | 12189 | |
2102b2fe RS |
12190 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
12191 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
12192 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
12193 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 12194 | |
351df804 | 12195 | for ac_func in ldgetname |
c1800ec8 | 12196 | do |
ad6717df | 12197 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ab22c1fa CF |
12198 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12199 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12200 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
12201 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12202 | else | |
12203 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12204 | /* confdefs.h. */ |
12205 | _ACEOF | |
12206 | cat confdefs.h >>conftest.$ac_ext | |
12207 | cat >>conftest.$ac_ext <<_ACEOF | |
12208 | /* end confdefs.h. */ | |
c1800ec8 ZW |
12209 | #undef $ac_tr_decl |
12210 | #define $ac_tr_decl 1 | |
ba479fd2 | 12211 | |
351df804 KG |
12212 | #include "ansidecl.h" |
12213 | #include "system.h" | |
12214 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
12215 | #undef FREAD |
12216 | #undef FWRITE | |
351df804 KG |
12217 | #include <ldfcn.h> |
12218 | #endif | |
12219 | ||
12220 | ||
ba479fd2 NN |
12221 | int |
12222 | main () | |
12223 | { | |
351df804 KG |
12224 | #ifndef $ac_func |
12225 | char *(*pfn) = (char *(*)) $ac_func ; | |
12226 | #endif | |
ba479fd2 NN |
12227 | ; |
12228 | return 0; | |
12229 | } | |
12230 | _ACEOF | |
12231 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12232 | if { (ac_try="$ac_compile" |
12233 | case "(($ac_try" in | |
12234 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12235 | *) ac_try_echo=$ac_try;; | |
12236 | esac | |
12237 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12238 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12239 | ac_status=$? |
86da66b5 HPN |
12240 | grep -v '^ *+' conftest.er1 >conftest.err |
12241 | rm -f conftest.er1 | |
12242 | cat conftest.err >&5 | |
ba479fd2 | 12243 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12244 | (exit $ac_status); } && { |
12245 | test -z "$ac_c_werror_flag" || | |
12246 | test ! -s conftest.err | |
12247 | } && test -s conftest.$ac_objext; then | |
351df804 KG |
12248 | eval "gcc_cv_have_decl_$ac_func=yes" |
12249 | else | |
ba479fd2 NN |
12250 | echo "$as_me: failed program was:" >&5 |
12251 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12252 | ||
ab22c1fa | 12253 | eval "gcc_cv_have_decl_$ac_func=no" |
351df804 | 12254 | fi |
ab22c1fa CF |
12255 | |
12256 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
351df804 KG |
12257 | fi |
12258 | ||
12259 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ab22c1fa CF |
12260 | { echo "$as_me:$LINENO: result: yes" >&5 |
12261 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 12262 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12263 | _ACEOF |
12264 | ||
351df804 | 12265 | else |
ab22c1fa CF |
12266 | { echo "$as_me:$LINENO: result: no" >&5 |
12267 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
351df804 | 12268 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12269 | _ACEOF |
12270 | ||
351df804 KG |
12271 | fi |
12272 | ||
12273 | done | |
ba479fd2 | 12274 | |
351df804 KG |
12275 | |
12276 | ||
12277 | for ac_func in times | |
12278 | do | |
ad6717df | 12279 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ab22c1fa CF |
12280 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12281 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12282 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
ba479fd2 NN |
12283 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12284 | else | |
12285 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12286 | /* confdefs.h. */ |
12287 | _ACEOF | |
12288 | cat confdefs.h >>conftest.$ac_ext | |
12289 | cat >>conftest.$ac_ext <<_ACEOF | |
12290 | /* end confdefs.h. */ | |
351df804 KG |
12291 | #undef $ac_tr_decl |
12292 | #define $ac_tr_decl 1 | |
ba479fd2 | 12293 | |
c1800ec8 ZW |
12294 | #include "ansidecl.h" |
12295 | #include "system.h" | |
12296 | #ifdef HAVE_SYS_TIMES_H | |
12297 | #include <sys/times.h> | |
12298 | #endif | |
12299 | ||
12300 | ||
ba479fd2 NN |
12301 | int |
12302 | main () | |
12303 | { | |
c1800ec8 ZW |
12304 | #ifndef $ac_func |
12305 | char *(*pfn) = (char *(*)) $ac_func ; | |
12306 | #endif | |
ba479fd2 NN |
12307 | ; |
12308 | return 0; | |
12309 | } | |
12310 | _ACEOF | |
12311 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12312 | if { (ac_try="$ac_compile" |
12313 | case "(($ac_try" in | |
12314 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12315 | *) ac_try_echo=$ac_try;; | |
12316 | esac | |
12317 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12318 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12319 | ac_status=$? |
86da66b5 HPN |
12320 | grep -v '^ *+' conftest.er1 >conftest.err |
12321 | rm -f conftest.er1 | |
12322 | cat conftest.err >&5 | |
ba479fd2 | 12323 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12324 | (exit $ac_status); } && { |
12325 | test -z "$ac_c_werror_flag" || | |
12326 | test ! -s conftest.err | |
12327 | } && test -s conftest.$ac_objext; then | |
a3bba767 JJ |
12328 | eval "gcc_cv_have_decl_$ac_func=yes" |
12329 | else | |
12330 | echo "$as_me: failed program was:" >&5 | |
12331 | sed 's/^/| /' conftest.$ac_ext >&5 | |
703d89ab | 12332 | |
ab22c1fa | 12333 | eval "gcc_cv_have_decl_$ac_func=no" |
a3bba767 | 12334 | fi |
ab22c1fa CF |
12335 | |
12336 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c1800ec8 ZW |
12337 | fi |
12338 | ||
12339 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ab22c1fa CF |
12340 | { echo "$as_me:$LINENO: result: yes" >&5 |
12341 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 12342 | #define $ac_tr_decl 1 |
ba479fd2 NN |
12343 | _ACEOF |
12344 | ||
c1800ec8 | 12345 | else |
ab22c1fa CF |
12346 | { echo "$as_me:$LINENO: result: no" >&5 |
12347 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 12348 | #define $ac_tr_decl 0 |
ba479fd2 NN |
12349 | _ACEOF |
12350 | ||
c1800ec8 ZW |
12351 | fi |
12352 | ||
12353 | done | |
c1800ec8 ZW |
12354 | |
12355 | ||
4f6d8cc8 GK |
12356 | |
12357 | for ac_func in sigaltstack | |
12358 | do | |
12359 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` | |
ab22c1fa CF |
12360 | { echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
12361 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } | |
12362 | if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then | |
4f6d8cc8 GK |
12363 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12364 | else | |
12365 | cat >conftest.$ac_ext <<_ACEOF | |
12366 | /* confdefs.h. */ | |
12367 | _ACEOF | |
12368 | cat confdefs.h >>conftest.$ac_ext | |
12369 | cat >>conftest.$ac_ext <<_ACEOF | |
12370 | /* end confdefs.h. */ | |
12371 | #undef $ac_tr_decl | |
12372 | #define $ac_tr_decl 1 | |
12373 | ||
12374 | #include "ansidecl.h" | |
12375 | #include "system.h" | |
12376 | #include <signal.h> | |
12377 | ||
12378 | ||
12379 | int | |
12380 | main () | |
12381 | { | |
12382 | #ifndef $ac_func | |
12383 | char *(*pfn) = (char *(*)) $ac_func ; | |
12384 | #endif | |
12385 | ; | |
12386 | return 0; | |
12387 | } | |
12388 | _ACEOF | |
12389 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12390 | if { (ac_try="$ac_compile" |
12391 | case "(($ac_try" in | |
12392 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12393 | *) ac_try_echo=$ac_try;; | |
12394 | esac | |
12395 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12396 | (eval "$ac_compile") 2>conftest.er1 | |
4f6d8cc8 GK |
12397 | ac_status=$? |
12398 | grep -v '^ *+' conftest.er1 >conftest.err | |
12399 | rm -f conftest.er1 | |
12400 | cat conftest.err >&5 | |
12401 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
12402 | (exit $ac_status); } && { |
12403 | test -z "$ac_c_werror_flag" || | |
12404 | test ! -s conftest.err | |
12405 | } && test -s conftest.$ac_objext; then | |
8b1f719a PB |
12406 | eval "gcc_cv_have_decl_$ac_func=yes" |
12407 | else | |
12408 | echo "$as_me: failed program was:" >&5 | |
12409 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4f6d8cc8 | 12410 | |
ab22c1fa | 12411 | eval "gcc_cv_have_decl_$ac_func=no" |
4f6d8cc8 | 12412 | fi |
ab22c1fa CF |
12413 | |
12414 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4f6d8cc8 GK |
12415 | fi |
12416 | ||
12417 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ab22c1fa CF |
12418 | { echo "$as_me:$LINENO: result: yes" >&5 |
12419 | echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
12420 | #define $ac_tr_decl 1 |
12421 | _ACEOF | |
12422 | ||
12423 | else | |
ab22c1fa CF |
12424 | { echo "$as_me:$LINENO: result: no" >&5 |
12425 | echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
12426 | #define $ac_tr_decl 0 |
12427 | _ACEOF | |
12428 | ||
12429 | fi | |
12430 | ||
12431 | done | |
12432 | ||
12433 | ||
c1800ec8 | 12434 | # More time-related stuff. |
ab22c1fa CF |
12435 | { echo "$as_me:$LINENO: checking for struct tms" >&5 |
12436 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6; } | |
ba479fd2 NN |
12437 | if test "${ac_cv_struct_tms+set}" = set; then |
12438 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12439 | else | |
12440 | ||
12441 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12442 | /* confdefs.h. */ |
12443 | _ACEOF | |
12444 | cat confdefs.h >>conftest.$ac_ext | |
12445 | cat >>conftest.$ac_ext <<_ACEOF | |
12446 | /* end confdefs.h. */ | |
c1800ec8 ZW |
12447 | |
12448 | #include "ansidecl.h" | |
12449 | #include "system.h" | |
12450 | #ifdef HAVE_SYS_TIMES_H | |
12451 | #include <sys/times.h> | |
12452 | #endif | |
12453 | ||
ba479fd2 NN |
12454 | int |
12455 | main () | |
12456 | { | |
c1800ec8 | 12457 | struct tms tms; |
ba479fd2 NN |
12458 | ; |
12459 | return 0; | |
12460 | } | |
12461 | _ACEOF | |
12462 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12463 | if { (ac_try="$ac_compile" |
12464 | case "(($ac_try" in | |
12465 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12466 | *) ac_try_echo=$ac_try;; | |
12467 | esac | |
12468 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12469 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12470 | ac_status=$? |
86da66b5 HPN |
12471 | grep -v '^ *+' conftest.er1 >conftest.err |
12472 | rm -f conftest.er1 | |
12473 | cat conftest.err >&5 | |
ba479fd2 | 12474 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12475 | (exit $ac_status); } && { |
12476 | test -z "$ac_c_werror_flag" || | |
12477 | test ! -s conftest.err | |
12478 | } && test -s conftest.$ac_objext; then | |
c1800ec8 ZW |
12479 | ac_cv_struct_tms=yes |
12480 | else | |
ba479fd2 NN |
12481 | echo "$as_me: failed program was:" >&5 |
12482 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12483 | ||
ab22c1fa | 12484 | ac_cv_struct_tms=no |
c1800ec8 | 12485 | fi |
ab22c1fa CF |
12486 | |
12487 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c1800ec8 | 12488 | fi |
ab22c1fa CF |
12489 | { echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
12490 | echo "${ECHO_T}$ac_cv_struct_tms" >&6; } | |
63cf211a | 12491 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
12492 | |
12493 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 12494 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 12495 | _ACEOF |
c1800ec8 ZW |
12496 | |
12497 | fi | |
12498 | ||
12499 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
12500 | # revisit after autoconf 2.50. | |
ab22c1fa CF |
12501 | { echo "$as_me:$LINENO: checking for clock_t" >&5 |
12502 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; } | |
ba479fd2 NN |
12503 | if test "${gcc_cv_type_clock_t+set}" = set; then |
12504 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12505 | else | |
12506 | ||
12507 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12508 | /* confdefs.h. */ |
12509 | _ACEOF | |
12510 | cat confdefs.h >>conftest.$ac_ext | |
12511 | cat >>conftest.$ac_ext <<_ACEOF | |
12512 | /* end confdefs.h. */ | |
c1800ec8 ZW |
12513 | |
12514 | #include "ansidecl.h" | |
12515 | #include "system.h" | |
12516 | ||
ba479fd2 NN |
12517 | int |
12518 | main () | |
12519 | { | |
c1800ec8 | 12520 | clock_t x; |
ba479fd2 NN |
12521 | ; |
12522 | return 0; | |
12523 | } | |
12524 | _ACEOF | |
12525 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12526 | if { (ac_try="$ac_compile" |
12527 | case "(($ac_try" in | |
12528 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12529 | *) ac_try_echo=$ac_try;; | |
12530 | esac | |
12531 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12532 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12533 | ac_status=$? |
86da66b5 HPN |
12534 | grep -v '^ *+' conftest.er1 >conftest.err |
12535 | rm -f conftest.er1 | |
12536 | cat conftest.err >&5 | |
ba479fd2 | 12537 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12538 | (exit $ac_status); } && { |
12539 | test -z "$ac_c_werror_flag" || | |
12540 | test ! -s conftest.err | |
12541 | } && test -s conftest.$ac_objext; then | |
c1800ec8 ZW |
12542 | gcc_cv_type_clock_t=yes |
12543 | else | |
ba479fd2 NN |
12544 | echo "$as_me: failed program was:" >&5 |
12545 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12546 | ||
ab22c1fa | 12547 | gcc_cv_type_clock_t=no |
c1800ec8 | 12548 | fi |
ab22c1fa CF |
12549 | |
12550 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c1800ec8 | 12551 | fi |
ab22c1fa CF |
12552 | { echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
12553 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6; } | |
63cf211a | 12554 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
12555 | |
12556 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 12557 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 12558 | _ACEOF |
c1800ec8 ZW |
12559 | |
12560 | fi | |
12561 | ||
eb70d86d AS |
12562 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
12563 | CFLAGS="$saved_CFLAGS" | |
12564 | ||
ab22c1fa | 12565 | # Check whether --enable-initfini-array was given. |
07cf4226 | 12566 | if test "${enable_initfini_array+set}" = set; then |
ab22c1fa | 12567 | enableval=$enable_initfini_array; |
07cf4226 | 12568 | else |
ba479fd2 | 12569 | |
ab22c1fa CF |
12570 | { echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 |
12571 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6; } | |
ba479fd2 NN |
12572 | if test "${gcc_cv_initfini_array+set}" = set; then |
12573 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 12574 | else |
eb70d86d | 12575 | if test "$cross_compiling" = yes; then |
918c4fe4 | 12576 | gcc_cv_initfini_array=no |
eb70d86d | 12577 | else |
ba479fd2 | 12578 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12579 | /* confdefs.h. */ |
12580 | _ACEOF | |
12581 | cat confdefs.h >>conftest.$ac_ext | |
12582 | cat >>conftest.$ac_ext <<_ACEOF | |
12583 | /* end confdefs.h. */ | |
eb70d86d | 12584 | |
07cf4226 DM |
12585 | static int x = -1; |
12586 | int main (void) { return x; } | |
12587 | int foo (void) { x = 0; } | |
12588 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
12589 | _ACEOF |
12590 | rm -f conftest$ac_exeext | |
ab22c1fa CF |
12591 | if { (ac_try="$ac_link" |
12592 | case "(($ac_try" in | |
12593 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12594 | *) ac_try_echo=$ac_try;; | |
12595 | esac | |
12596 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12597 | (eval "$ac_link") 2>&5 | |
ba479fd2 NN |
12598 | ac_status=$? |
12599 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12600 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
ab22c1fa CF |
12601 | { (case "(($ac_try" in |
12602 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12603 | *) ac_try_echo=$ac_try;; | |
12604 | esac | |
12605 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12606 | (eval "$ac_try") 2>&5 | |
ba479fd2 NN |
12607 | ac_status=$? |
12608 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12609 | (exit $ac_status); }; }; then | |
918c4fe4 | 12610 | gcc_cv_initfini_array=yes |
eb70d86d | 12611 | else |
ba479fd2 NN |
12612 | echo "$as_me: program exited with status $ac_status" >&5 |
12613 | echo "$as_me: failed program was:" >&5 | |
12614 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12615 | ||
12616 | ( exit $ac_status ) | |
12617 | gcc_cv_initfini_array=no | |
eb70d86d | 12618 | fi |
ab22c1fa | 12619 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 12620 | fi |
ab22c1fa CF |
12621 | |
12622 | ||
07cf4226 | 12623 | fi |
ab22c1fa CF |
12624 | { echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
12625 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6; } | |
eb70d86d | 12626 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 12627 | |
ab22c1fa CF |
12628 | fi |
12629 | ||
63cf211a | 12630 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
12631 | |
12632 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 12633 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 12634 | _ACEOF |
07cf4226 | 12635 | |
eb70d86d | 12636 | fi |
81bf3d9e | 12637 | |
ba479fd2 | 12638 | # mkdir takes a single argument on some systems. |
ab22c1fa CF |
12639 | { echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 |
12640 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6; } | |
ba479fd2 NN |
12641 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then |
12642 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 12643 | else |
ba479fd2 | 12644 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12645 | /* confdefs.h. */ |
12646 | _ACEOF | |
12647 | cat confdefs.h >>conftest.$ac_ext | |
12648 | cat >>conftest.$ac_ext <<_ACEOF | |
12649 | /* end confdefs.h. */ | |
75923b2f MK |
12650 | |
12651 | #include <sys/types.h> | |
12652 | #ifdef HAVE_SYS_STAT_H | |
12653 | # include <sys/stat.h> | |
12654 | #endif | |
12655 | #ifdef HAVE_UNISTD_H | |
12656 | # include <unistd.h> | |
12657 | #endif | |
12658 | #ifdef HAVE_DIRECT_H | |
12659 | # include <direct.h> | |
12660 | #endif | |
ba479fd2 NN |
12661 | int |
12662 | main () | |
12663 | { | |
75923b2f | 12664 | mkdir ("foo", 0); |
ba479fd2 NN |
12665 | ; |
12666 | return 0; | |
12667 | } | |
12668 | _ACEOF | |
12669 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12670 | if { (ac_try="$ac_compile" |
12671 | case "(($ac_try" in | |
12672 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12673 | *) ac_try_echo=$ac_try;; | |
12674 | esac | |
12675 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12676 | (eval "$ac_compile") 2>conftest.er1 | |
ba479fd2 | 12677 | ac_status=$? |
86da66b5 HPN |
12678 | grep -v '^ *+' conftest.er1 >conftest.err |
12679 | rm -f conftest.er1 | |
12680 | cat conftest.err >&5 | |
ba479fd2 | 12681 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
12682 | (exit $ac_status); } && { |
12683 | test -z "$ac_c_werror_flag" || | |
12684 | test ! -s conftest.err | |
12685 | } && test -s conftest.$ac_objext; then | |
75923b2f MK |
12686 | gcc_cv_mkdir_takes_one_arg=no |
12687 | else | |
ba479fd2 NN |
12688 | echo "$as_me: failed program was:" >&5 |
12689 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12690 | ||
ab22c1fa | 12691 | gcc_cv_mkdir_takes_one_arg=yes |
75923b2f | 12692 | fi |
ab22c1fa CF |
12693 | |
12694 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
75923b2f | 12695 | fi |
ab22c1fa CF |
12696 | { echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
12697 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6; } | |
63cf211a | 12698 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
12699 | |
12700 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 12701 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 12702 | _ACEOF |
75923b2f MK |
12703 | |
12704 | fi | |
12705 | ||
12706 | ||
861bb6c1 JL |
12707 | # File extensions |
12708 | manext='.1' | |
12709 | objext='.o' | |
12710 | ||
12711 | ||
12712 | ||
4977bab6 | 12713 | # With Setjmp/Longjmp based exception handling. |
ab22c1fa | 12714 | # Check whether --enable-sjlj-exceptions was given. |
4977bab6 | 12715 | if test "${enable_sjlj_exceptions+set}" = set; then |
ab22c1fa | 12716 | enableval=$enable_sjlj_exceptions; sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` |
63cf211a | 12717 | |
ba479fd2 NN |
12718 | cat >>confdefs.h <<_ACEOF |
12719 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
12720 | _ACEOF | |
4977bab6 | 12721 | |
ab22c1fa CF |
12722 | fi |
12723 | ||
4977bab6 | 12724 | |
443728bb L |
12725 | # For platforms with the unwind ABI which includes an unwind library, |
12726 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 12727 | |
ab22c1fa | 12728 | # Check whether --with-system-libunwind was given. |
443728bb | 12729 | if test "${with_system_libunwind+set}" = set; then |
ab22c1fa CF |
12730 | withval=$with_system_libunwind; |
12731 | fi | |
4977bab6 | 12732 | |
4977bab6 | 12733 | |
e64f5acf SE |
12734 | # config.gcc also contains tests of with_system_libunwind. |
12735 | if test x$with_system_libunwind = xyes; then | |
12736 | ||
12737 | cat >>confdefs.h <<\_ACEOF | |
12738 | #define HAVE_GETIPINFO 1 | |
12739 | _ACEOF | |
12740 | ||
12741 | fi | |
12742 | ||
34a86c2b NN |
12743 | # -------------------------------------------------------- |
12744 | # Build, host, and target specific configuration fragments | |
12745 | # -------------------------------------------------------- | |
12746 | ||
5b28c537 NN |
12747 | # Collect build-machine-specific information. |
12748 | . ${srcdir}/config.build | |
12749 | ||
a89ea0df NN |
12750 | # Collect host-machine-specific information. |
12751 | . ${srcdir}/config.host | |
12752 | ||
ef69da62 | 12753 | target_gtfiles= |
a89ea0df NN |
12754 | |
12755 | # Collect target-machine-specific information. | |
8ad9fb33 | 12756 | . ${srcdir}/config.gcc |
861bb6c1 JL |
12757 | |
12758 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 12759 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
12760 | |
12761 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 12762 | if test x"$tm_file" = x |
861bb6c1 JL |
12763 | then tm_file=$cpu_type/$cpu_type.h; fi |
12764 | ||
6b2adea9 | 12765 | if test x"$extra_headers" = x |
861bb6c1 JL |
12766 | then extra_headers=; fi |
12767 | ||
75bffa71 | 12768 | if test x$md_file = x |
e98e406f | 12769 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 12770 | |
75bffa71 | 12771 | if test x$out_file = x |
861bb6c1 JL |
12772 | then out_file=$cpu_type/$cpu_type.c; fi |
12773 | ||
75bffa71 | 12774 | if test x"$tmake_file" = x |
861bb6c1 JL |
12775 | then tmake_file=$cpu_type/t-$cpu_type |
12776 | fi | |
12777 | ||
90e6a802 | 12778 | if test x"$dwarf2" = xyes |
756ee602 | 12779 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
12780 | fi |
12781 | ||
861bb6c1 | 12782 | # Say what files are being used for the output code and MD file. |
11642c3a | 12783 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
12784 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
12785 | ||
11642c3a | 12786 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
12787 | # about them and drop them. |
12788 | ||
11642c3a ZW |
12789 | bx= |
12790 | for x in $build_xm_file; do | |
12791 | if test -f $srcdir/config/$x | |
12792 | then bx="$bx $x" | |
ba479fd2 NN |
12793 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12794 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12795 | fi |
12796 | done | |
12797 | build_xm_file="$bx" | |
12798 | ||
12799 | hx= | |
12800 | for x in $host_xm_file; do | |
12801 | if test -f $srcdir/config/$x | |
12802 | then hx="$hx $x" | |
ba479fd2 NN |
12803 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12804 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12805 | fi |
12806 | done | |
12807 | host_xm_file="$hx" | |
12808 | ||
12809 | tx= | |
12810 | for x in $xm_file; do | |
12811 | if test -f $srcdir/config/$x | |
12812 | then tx="$tx $x" | |
ba479fd2 NN |
12813 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12814 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12815 | fi |
12816 | done | |
12817 | xm_file="$tx" | |
12818 | ||
861bb6c1 JL |
12819 | count=a |
12820 | for f in $tm_file; do | |
12821 | count=${count}x | |
12822 | done | |
75bffa71 | 12823 | if test $count = ax; then |
861bb6c1 JL |
12824 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12825 | else | |
12826 | echo "Using the following target machine macro files:" | |
12827 | for f in $tm_file; do | |
12828 | echo " $srcdir/config/$f" | |
12829 | done | |
12830 | fi | |
12831 | ||
4977bab6 | 12832 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12833 | |
12834 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12835 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12836 | _ACEOF |
4977bab6 ZW |
12837 | |
12838 | fi | |
12839 | ||
99fa8911 AP |
12840 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12841 | ||
12842 | cat >>confdefs.h <<\_ACEOF | |
12843 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12844 | _ACEOF | |
12845 | ||
12846 | fi | |
12847 | ||
861bb6c1 JL |
12848 | count=a |
12849 | for f in $host_xm_file; do | |
12850 | count=${count}x | |
12851 | done | |
11642c3a ZW |
12852 | if test $count = a; then |
12853 | : | |
12854 | elif test $count = ax; then | |
861bb6c1 JL |
12855 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12856 | else | |
12857 | echo "Using the following host machine macro files:" | |
12858 | for f in $host_xm_file; do | |
12859 | echo " $srcdir/config/$f" | |
12860 | done | |
12861 | fi | |
476d9098 | 12862 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12863 | |
75bffa71 | 12864 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12865 | count=a |
12866 | for f in $build_xm_file; do | |
12867 | count=${count}x | |
12868 | done | |
11642c3a ZW |
12869 | if test $count = a; then |
12870 | : | |
12871 | elif test $count = ax; then | |
861bb6c1 JL |
12872 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12873 | else | |
12874 | echo "Using the following build machine macro files:" | |
12875 | for f in $build_xm_file; do | |
12876 | echo " $srcdir/config/$f" | |
12877 | done | |
12878 | fi | |
12879 | fi | |
12880 | ||
4f6d8cc8 | 12881 | case ${host} in |
b8ec3cc8 | 12882 | powerpc*-*-darwin*) |
ab22c1fa CF |
12883 | { echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 |
12884 | echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6; } | |
4f6d8cc8 GK |
12885 | if test "${gcc_cv_mcontext_underscores+set}" = set; then |
12886 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12887 | else | |
12888 | cat >conftest.$ac_ext <<_ACEOF | |
12889 | ||
ba7da42a | 12890 | #include <sys/cdefs.h> |
de4fb767 | 12891 | #include <sys/signal.h> |
4f6d8cc8 GK |
12892 | #include <ucontext.h> |
12893 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
12894 | ||
12895 | _ACEOF | |
12896 | rm -f conftest.$ac_objext | |
ab22c1fa CF |
12897 | if { (ac_try="$ac_compile" |
12898 | case "(($ac_try" in | |
12899 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
12900 | *) ac_try_echo=$ac_try;; | |
12901 | esac | |
12902 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
12903 | (eval "$ac_compile") 2>conftest.er1 | |
4f6d8cc8 GK |
12904 | ac_status=$? |
12905 | grep -v '^ *+' conftest.er1 >conftest.err | |
12906 | rm -f conftest.er1 | |
12907 | cat conftest.err >&5 | |
12908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
12909 | (exit $ac_status); } && { |
12910 | test -z "$ac_c_werror_flag" || | |
12911 | test ! -s conftest.err | |
12912 | } && test -s conftest.$ac_objext; then | |
4f6d8cc8 GK |
12913 | gcc_cv_mcontext_underscores=no |
12914 | else | |
12915 | echo "$as_me: failed program was:" >&5 | |
12916 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12917 | ||
ab22c1fa | 12918 | gcc_cv_mcontext_underscores=yes |
4f6d8cc8 | 12919 | fi |
ab22c1fa CF |
12920 | |
12921 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4f6d8cc8 | 12922 | fi |
ab22c1fa CF |
12923 | { echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 |
12924 | echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6; } | |
4f6d8cc8 GK |
12925 | if test $gcc_cv_mcontext_underscores = yes; then |
12926 | ||
12927 | cat >>confdefs.h <<\_ACEOF | |
12928 | #define HAS_MCONTEXT_T_UNDERSCORES | |
12929 | _ACEOF | |
12930 | ||
12931 | fi | |
12932 | ;; | |
12933 | esac | |
12934 | ||
8bb915b6 NN |
12935 | # --------- |
12936 | # Threading | |
12937 | # --------- | |
12938 | ||
c2e494a8 | 12939 | # Check if a valid thread package |
615be2cf | 12940 | case ${enable_threads} in |
c2e494a8 NN |
12941 | "" | no) |
12942 | # No threads | |
12943 | target_thread_file='single' | |
12944 | ;; | |
12945 | yes) | |
12946 | # default | |
12947 | target_thread_file='single' | |
12948 | ;; | |
18167442 | 12949 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12950 | single | solaris | vxworks | win32 ) |
615be2cf | 12951 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12952 | ;; |
12953 | *) | |
615be2cf | 12954 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12955 | exit 1 |
12956 | ;; | |
12957 | esac | |
12958 | ||
12959 | if test x${thread_file} = x; then | |
12960 | # No thread file set by target-specific clauses in config.gcc, | |
12961 | # so use file chosen by default logic above | |
12962 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12963 | fi |
12964 | ||
8bb915b6 NN |
12965 | # Make gthr-default.h if we have a thread file. |
12966 | gthread_flags= | |
12967 | if test $thread_file != single; then | |
12968 | rm -f gthr-default.h | |
12969 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12970 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12971 | fi | |
12972 | ||
12973 | ||
12974 | # -------- | |
12975 | # UNSORTED | |
12976 | # -------- | |
12977 | ||
18fbf599 | 12978 | use_cxa_atexit=no |
2121a768 JT |
12979 | if test x$enable___cxa_atexit = xyes || \ |
12980 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 | 12981 | if test x$host = x$target; then |
97388150 DS |
12982 | case $host in |
12983 | # mingw32 doesn't have __cxa_atexit but uses atexit registration | |
12984 | # keyed to flag_use_cxa_atexit | |
12985 | *-*-mingw32*) | |
12986 | use_cxa_atexit=yes | |
12987 | ;; | |
12988 | *) | |
ab22c1fa CF |
12989 | { echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 |
12990 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6; } | |
354b7da5 DH |
12991 | if test "${ac_cv_func___cxa_atexit+set}" = set; then |
12992 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12993 | else | |
12994 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12995 | /* confdefs.h. */ |
12996 | _ACEOF | |
12997 | cat confdefs.h >>conftest.$ac_ext | |
12998 | cat >>conftest.$ac_ext <<_ACEOF | |
12999 | /* end confdefs.h. */ | |
86da66b5 HPN |
13000 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
13001 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
13002 | #define __cxa_atexit innocuous___cxa_atexit | |
13003 | ||
354b7da5 DH |
13004 | /* System header to define __stub macros and hopefully few prototypes, |
13005 | which can conflict with char __cxa_atexit (); below. | |
13006 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
13007 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 13008 | |
354b7da5 DH |
13009 | #ifdef __STDC__ |
13010 | # include <limits.h> | |
13011 | #else | |
13012 | # include <assert.h> | |
13013 | #endif | |
86da66b5 HPN |
13014 | |
13015 | #undef __cxa_atexit | |
13016 | ||
ab22c1fa CF |
13017 | /* Override any GCC internal prototype to avoid an error. |
13018 | Use char because int might match the return type of a GCC | |
13019 | builtin and then its argument prototype would still apply. */ | |
354b7da5 DH |
13020 | #ifdef __cplusplus |
13021 | extern "C" | |
354b7da5 | 13022 | #endif |
354b7da5 DH |
13023 | char __cxa_atexit (); |
13024 | /* The GNU C library defines this for functions which it implements | |
13025 | to always fail with ENOSYS. Some functions are actually named | |
13026 | something starting with __ and the normal name is an alias. */ | |
ab22c1fa | 13027 | #if defined __stub___cxa_atexit || defined __stub_____cxa_atexit |
354b7da5 | 13028 | choke me |
354b7da5 DH |
13029 | #endif |
13030 | ||
13031 | int | |
13032 | main () | |
13033 | { | |
ab22c1fa | 13034 | return __cxa_atexit (); |
354b7da5 DH |
13035 | ; |
13036 | return 0; | |
13037 | } | |
13038 | _ACEOF | |
13039 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
13040 | if { (ac_try="$ac_link" |
13041 | case "(($ac_try" in | |
13042 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
13043 | *) ac_try_echo=$ac_try;; | |
13044 | esac | |
13045 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
13046 | (eval "$ac_link") 2>conftest.er1 | |
354b7da5 | 13047 | ac_status=$? |
86da66b5 HPN |
13048 | grep -v '^ *+' conftest.er1 >conftest.err |
13049 | rm -f conftest.er1 | |
13050 | cat conftest.err >&5 | |
354b7da5 | 13051 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
13052 | (exit $ac_status); } && { |
13053 | test -z "$ac_c_werror_flag" || | |
13054 | test ! -s conftest.err | |
13055 | } && test -s conftest$ac_exeext && | |
13056 | $as_test_x conftest$ac_exeext; then | |
354b7da5 DH |
13057 | ac_cv_func___cxa_atexit=yes |
13058 | else | |
13059 | echo "$as_me: failed program was:" >&5 | |
13060 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13061 | ||
ab22c1fa | 13062 | ac_cv_func___cxa_atexit=no |
354b7da5 | 13063 | fi |
ab22c1fa CF |
13064 | |
13065 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
86da66b5 | 13066 | conftest$ac_exeext conftest.$ac_ext |
354b7da5 | 13067 | fi |
ab22c1fa CF |
13068 | { echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 |
13069 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6; } | |
354b7da5 | 13070 | if test $ac_cv_func___cxa_atexit = yes; then |
18fbf599 PB |
13071 | use_cxa_atexit=yes |
13072 | else | |
13073 | echo "__cxa_atexit can't be enabled on this target" | |
13074 | fi | |
13075 | ||
5f60e48f | 13076 | ;; |
97388150 | 13077 | esac |
18fbf599 PB |
13078 | else |
13079 | # We can't check for __cxa_atexit when building a cross, so assume | |
13080 | # it is available | |
13081 | use_cxa_atexit=yes | |
13082 | fi | |
13083 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
13084 | |
13085 | cat >>confdefs.h <<\_ACEOF | |
c7b5e395 | 13086 | #define DEFAULT_USE_CXA_ATEXIT 2 |
ba479fd2 | 13087 | _ACEOF |
2121a768 | 13088 | |
18fbf599 | 13089 | fi |
2121a768 JT |
13090 | fi |
13091 | ||
e64f5acf SE |
13092 | use_getipinfo=yes |
13093 | if test x$with_system_libunwind = xyes; then | |
13094 | if test x$host = x$target; then | |
ab22c1fa CF |
13095 | { echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5 |
13096 | echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6; } | |
e64f5acf SE |
13097 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then |
13098 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13099 | else | |
13100 | ac_func_search_save_LIBS=$LIBS | |
e64f5acf SE |
13101 | cat >conftest.$ac_ext <<_ACEOF |
13102 | /* confdefs.h. */ | |
13103 | _ACEOF | |
13104 | cat confdefs.h >>conftest.$ac_ext | |
13105 | cat >>conftest.$ac_ext <<_ACEOF | |
13106 | /* end confdefs.h. */ | |
13107 | ||
ab22c1fa CF |
13108 | /* Override any GCC internal prototype to avoid an error. |
13109 | Use char because int might match the return type of a GCC | |
13110 | builtin and then its argument prototype would still apply. */ | |
e64f5acf SE |
13111 | #ifdef __cplusplus |
13112 | extern "C" | |
13113 | #endif | |
e64f5acf SE |
13114 | char _Unwind_GetIPInfo (); |
13115 | int | |
13116 | main () | |
13117 | { | |
ab22c1fa | 13118 | return _Unwind_GetIPInfo (); |
e64f5acf SE |
13119 | ; |
13120 | return 0; | |
13121 | } | |
13122 | _ACEOF | |
ab22c1fa CF |
13123 | for ac_lib in '' unwind; do |
13124 | if test -z "$ac_lib"; then | |
13125 | ac_res="none required" | |
13126 | else | |
13127 | ac_res=-l$ac_lib | |
13128 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13129 | fi | |
13130 | rm -f conftest.$ac_objext conftest$ac_exeext | |
13131 | if { (ac_try="$ac_link" | |
13132 | case "(($ac_try" in | |
13133 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
13134 | *) ac_try_echo=$ac_try;; | |
13135 | esac | |
13136 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
13137 | (eval "$ac_link") 2>conftest.er1 | |
e64f5acf SE |
13138 | ac_status=$? |
13139 | grep -v '^ *+' conftest.er1 >conftest.err | |
13140 | rm -f conftest.er1 | |
13141 | cat conftest.err >&5 | |
13142 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
13143 | (exit $ac_status); } && { |
13144 | test -z "$ac_c_werror_flag" || | |
13145 | test ! -s conftest.err | |
13146 | } && test -s conftest$ac_exeext && | |
13147 | $as_test_x conftest$ac_exeext; then | |
13148 | ac_cv_search__Unwind_GetIPInfo=$ac_res | |
e64f5acf SE |
13149 | else |
13150 | echo "$as_me: failed program was:" >&5 | |
13151 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13152 | ||
8b1f719a | 13153 | |
ab22c1fa | 13154 | fi |
a3bba767 | 13155 | |
ab22c1fa CF |
13156 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
13157 | conftest$ac_exeext | |
13158 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then | |
13159 | break | |
a3bba767 | 13160 | fi |
ab22c1fa CF |
13161 | done |
13162 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then | |
13163 | : | |
13164 | else | |
13165 | ac_cv_search__Unwind_GetIPInfo=no | |
a6ccdbab | 13166 | fi |
ab22c1fa | 13167 | rm conftest.$ac_ext |
a6ccdbab EC |
13168 | LIBS=$ac_func_search_save_LIBS |
13169 | fi | |
ab22c1fa CF |
13170 | { echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5 |
13171 | echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6; } | |
13172 | ac_res=$ac_cv_search__Unwind_GetIPInfo | |
13173 | if test "$ac_res" != no; then | |
13174 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
a6ccdbab EC |
13175 | |
13176 | else | |
13177 | use_getipinfo=no | |
13178 | fi | |
13179 | ||
13180 | fi | |
13181 | fi | |
13182 | ||
13183 | if test x$use_getipinfo = xyes; then | |
13184 | ||
13185 | cat >>confdefs.h <<\_ACEOF | |
13186 | #define HAVE_GETIPINFO 1 | |
e64f5acf SE |
13187 | _ACEOF |
13188 | ||
13189 | else | |
13190 | echo "The system unwind library does not support _Unwind_GetIPInfo." | |
13191 | fi | |
13192 | ||
a5381466 | 13193 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
13194 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
13195 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
13196 | |
13197 | ||
13198 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 13199 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 13200 | _ACEOF |
a5381466 ZW |
13201 | |
13202 | fi | |
13203 | ||
75685792 RS |
13204 | # Convert extra_options into a form suitable for Makefile use. |
13205 | extra_opt_files= | |
13206 | for f in $extra_options; do | |
13207 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
13208 | done | |
13209 | ||
13210 | ||
b7cb92ad | 13211 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 13212 | # the first file included by config.h. |
4977bab6 | 13213 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 13214 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 13215 | # work to find out the build config parameters. |
75bffa71 | 13216 | if test x$host = x$build |
db81d74a | 13217 | then |
eaf4e618 | 13218 | build_auto=auto-host.h |
b7cb92ad JL |
13219 | else |
13220 | # We create a subdir, then run autoconf in the subdir. | |
13221 | # To prevent recursion we set host and build for the new | |
13222 | # invocation of configure to the build for this invocation | |
ba479fd2 | 13223 | # of configure. |
b7cb92ad JL |
13224 | tempdir=build.$$ |
13225 | rm -rf $tempdir | |
13226 | mkdir $tempdir | |
13227 | cd $tempdir | |
13228 | case ${srcdir} in | |
255b8a49 | 13229 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
13230 | *) realsrcdir=../${srcdir};; |
13231 | esac | |
d920e825 L |
13232 | saved_CFLAGS="${CFLAGS}" |
13233 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
13234 | ${realsrcdir}/configure \ | |
33e70558 | 13235 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 13236 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 13237 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
13238 | |
13239 | # We just finished tests for the build machine, so rename | |
13240 | # the file auto-build.h in the gcc directory. | |
13241 | mv auto-host.h ../auto-build.h | |
13242 | cd .. | |
13243 | rm -rf $tempdir | |
eaf4e618 | 13244 | build_auto=auto-build.h |
db81d74a RH |
13245 | fi |
13246 | ||
06f0b04c | 13247 | |
eaf4e618 | 13248 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
13249 | tm_p_file="${tm_p_file} tm-preds.h" |
13250 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
13251 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 13252 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 13253 | # put this back in temporarily. |
232b67d9 | 13254 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 13255 | |
34a86c2b NN |
13256 | # -------- |
13257 | # UNSORTED | |
13258 | # -------- | |
13259 | ||
cc1e60ea | 13260 | # Compile in configure arguments. |
8105825d | 13261 | if test -f configargs.h ; then |
cc1e60ea | 13262 | # Being re-configured. |
022dae81 | 13263 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
13264 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
13265 | else | |
13266 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
13267 | fi | |
eeae7b41 DJ |
13268 | |
13269 | # Double all backslashes and backslash all quotes to turn | |
13270 | # gcc_config_arguments into a C string. | |
13271 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
13272 | $gcc_config_arguments | |
13273 | EOF | |
13274 | gcc_config_arguments_str=`cat conftest.out` | |
13275 | rm -f conftest.out | |
13276 | ||
cc1e60ea JM |
13277 | cat > configargs.h <<EOF |
13278 | /* Generated automatically. */ | |
eeae7b41 | 13279 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 13280 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
13281 | |
13282 | static const struct { | |
13283 | const char *name, *value; | |
13284 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
13285 | EOF |
13286 | ||
ab87f8c8 | 13287 | # Internationalization |
18fc9bd4 RG |
13288 | # If we haven't got the data from the intl directory, |
13289 | # assume NLS is disabled. | |
13290 | USE_NLS=no | |
13291 | LIBINTL= | |
13292 | LIBINTL_DEP= | |
13293 | INCINTL= | |
13294 | XGETTEXT= | |
13295 | GMSGFMT= | |
13296 | POSUB= | |
13297 | ||
13298 | if test -f ../intl/config.intl; then | |
13299 | . ../intl/config.intl | |
13300 | fi | |
ab22c1fa CF |
13301 | { echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
13302 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; } | |
18fc9bd4 | 13303 | if test x"$USE_NLS" != xyes; then |
ab22c1fa CF |
13304 | { echo "$as_me:$LINENO: result: no" >&5 |
13305 | echo "${ECHO_T}no" >&6; } | |
18fc9bd4 | 13306 | else |
ab22c1fa CF |
13307 | { echo "$as_me:$LINENO: result: yes" >&5 |
13308 | echo "${ECHO_T}yes" >&6; } | |
18fc9bd4 RG |
13309 | |
13310 | cat >>confdefs.h <<\_ACEOF | |
13311 | #define ENABLE_NLS 1 | |
13312 | _ACEOF | |
13313 | ||
13314 | ||
ab22c1fa CF |
13315 | { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
13316 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } | |
18fc9bd4 RG |
13317 | # Look for .po and .gmo files in the source directory. |
13318 | CATALOGS= | |
13319 | XLINGUAS= | |
13320 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
13321 | # If there aren't any .gmo files the shell will give us the | |
13322 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
13323 | # weeded out. | |
13324 | case "$cat" in *\**) | |
13325 | continue;; | |
13326 | esac | |
13327 | # The quadruple backslash is collapsed to a double backslash | |
13328 | # by the backticks, then collapsed again by the double quotes, | |
13329 | # leaving us with one backslash in the sed expression (right | |
13330 | # before the dot that mustn't act as a wildcard). | |
13331 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
13332 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
13333 | # The user is allowed to set LINGUAS to a list of languages to | |
13334 | # install catalogs for. If it's empty that means "all of them." | |
13335 | if test "x$LINGUAS" = x; then | |
13336 | CATALOGS="$CATALOGS $cat" | |
13337 | XLINGUAS="$XLINGUAS $lang" | |
13338 | else | |
13339 | case "$LINGUAS" in *$lang*) | |
13340 | CATALOGS="$CATALOGS $cat" | |
13341 | XLINGUAS="$XLINGUAS $lang" | |
13342 | ;; | |
13343 | esac | |
13344 | fi | |
13345 | done | |
13346 | LINGUAS="$XLINGUAS" | |
ab22c1fa CF |
13347 | { echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
13348 | echo "${ECHO_T}$LINGUAS" >&6; } | |
18fc9bd4 RG |
13349 | |
13350 | ||
13351 | DATADIRNAME=share | |
13352 | ||
13353 | INSTOBJEXT=.mo | |
13354 | ||
13355 | GENCAT=gencat | |
13356 | ||
13357 | CATOBJEXT=.gmo | |
13358 | ||
13359 | fi | |
861bb6c1 | 13360 | |
56694dd9 ZW |
13361 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
13362 | # -liconv on the link line twice. | |
13363 | case "$LIBINTL" in *$LIBICONV*) | |
13364 | LIBICONV= ;; | |
13365 | esac | |
dc6746e7 | 13366 | |
ab22c1fa | 13367 | # Check whether --enable-secureplt was given. |
7f970b70 | 13368 | if test "${enable_secureplt+set}" = set; then |
ab22c1fa CF |
13369 | enableval=$enable_secureplt; |
13370 | fi | |
7f970b70 | 13371 | |
7f970b70 | 13372 | |
56694dd9 | 13373 | # Windows32 Registry support for specifying GCC installation paths. |
ab22c1fa | 13374 | # Check whether --enable-win32-registry was given. |
56694dd9 | 13375 | if test "${enable_win32_registry+set}" = set; then |
ab22c1fa CF |
13376 | enableval=$enable_win32_registry; |
13377 | fi | |
dc6746e7 | 13378 | |
ba479fd2 | 13379 | |
a1286ef5 ZW |
13380 | case $host_os in |
13381 | win32 | pe | cygwin* | mingw32* | uwin*) | |
13382 | if test "x$enable_win32_registry" != xno; then | |
ab22c1fa CF |
13383 | { echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 |
13384 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6; } | |
ba479fd2 NN |
13385 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then |
13386 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13387 | else | |
13388 | ac_func_search_save_LIBS=$LIBS | |
ba479fd2 | 13389 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
13390 | /* confdefs.h. */ |
13391 | _ACEOF | |
13392 | cat confdefs.h >>conftest.$ac_ext | |
13393 | cat >>conftest.$ac_ext <<_ACEOF | |
13394 | /* end confdefs.h. */ | |
861bb6c1 | 13395 | |
ab22c1fa CF |
13396 | /* Override any GCC internal prototype to avoid an error. |
13397 | Use char because int might match the return type of a GCC | |
13398 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
13399 | #ifdef __cplusplus |
13400 | extern "C" | |
13401 | #endif | |
ba479fd2 NN |
13402 | char RegOpenKeyExA (); |
13403 | int | |
13404 | main () | |
13405 | { | |
ab22c1fa | 13406 | return RegOpenKeyExA (); |
ba479fd2 NN |
13407 | ; |
13408 | return 0; | |
13409 | } | |
13410 | _ACEOF | |
ab22c1fa CF |
13411 | for ac_lib in '' advapi32; do |
13412 | if test -z "$ac_lib"; then | |
13413 | ac_res="none required" | |
13414 | else | |
13415 | ac_res=-l$ac_lib | |
13416 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13417 | fi | |
13418 | rm -f conftest.$ac_objext conftest$ac_exeext | |
13419 | if { (ac_try="$ac_link" | |
13420 | case "(($ac_try" in | |
13421 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
13422 | *) ac_try_echo=$ac_try;; | |
13423 | esac | |
13424 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
13425 | (eval "$ac_link") 2>conftest.er1 | |
ba479fd2 | 13426 | ac_status=$? |
86da66b5 HPN |
13427 | grep -v '^ *+' conftest.er1 >conftest.err |
13428 | rm -f conftest.er1 | |
13429 | cat conftest.err >&5 | |
ba479fd2 | 13430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
ab22c1fa CF |
13431 | (exit $ac_status); } && { |
13432 | test -z "$ac_c_werror_flag" || | |
13433 | test ! -s conftest.err | |
13434 | } && test -s conftest$ac_exeext && | |
13435 | $as_test_x conftest$ac_exeext; then | |
13436 | ac_cv_search_RegOpenKeyExA=$ac_res | |
ab87f8c8 | 13437 | else |
ba479fd2 NN |
13438 | echo "$as_me: failed program was:" >&5 |
13439 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13440 | ||
8b1f719a | 13441 | |
ab22c1fa | 13442 | fi |
a3bba767 | 13443 | |
ab22c1fa CF |
13444 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
13445 | conftest$ac_exeext | |
13446 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
13447 | break | |
a3bba767 | 13448 | fi |
ab22c1fa CF |
13449 | done |
13450 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
13451 | : | |
13452 | else | |
13453 | ac_cv_search_RegOpenKeyExA=no | |
dd7f7a6e | 13454 | fi |
ab22c1fa | 13455 | rm conftest.$ac_ext |
dd7f7a6e EC |
13456 | LIBS=$ac_func_search_save_LIBS |
13457 | fi | |
ab22c1fa CF |
13458 | { echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 |
13459 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6; } | |
13460 | ac_res=$ac_cv_search_RegOpenKeyExA | |
13461 | if test "$ac_res" != no; then | |
13462 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
dd7f7a6e EC |
13463 | |
13464 | else | |
13465 | enable_win32_registry=no | |
13466 | fi | |
13467 | ||
13468 | fi | |
13469 | ||
13470 | if test "x$enable_win32_registry" != xno; then | |
13471 | ||
13472 | cat >>confdefs.h <<\_ACEOF | |
13473 | #define ENABLE_WIN32_REGISTRY 1 | |
13474 | _ACEOF | |
13475 | ||
13476 | ||
13477 | if test "x$enable_win32_registry" != xyes \ | |
13478 | && test "x$enable_win32_registry" != x; then | |
13479 | ||
13480 | cat >>confdefs.h <<_ACEOF | |
13481 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" | |
13482 | _ACEOF | |
13483 | ||
13484 | fi | |
13485 | fi | |
13486 | ;; | |
13487 | esac | |
ab87f8c8 | 13488 | |
56694dd9 ZW |
13489 | # Get an absolute path to the GCC top-level source directory |
13490 | holddir=`${PWDCMD-pwd}` | |
13491 | cd $srcdir | |
13492 | topdir=`${PWDCMD-pwd}` | |
13493 | cd $holddir | |
ab87f8c8 | 13494 | |
56694dd9 | 13495 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 13496 | xmake_file= |
c406e779 | 13497 | for f in ${host_xmake_file} |
56694dd9 ZW |
13498 | do |
13499 | if test -f ${srcdir}/config/$f | |
13500 | then | |
2ed26f6b | 13501 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
13502 | fi |
13503 | done | |
093e61a6 | 13504 | |
56694dd9 | 13505 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 13506 | tmake_file_= |
c406e779 | 13507 | for f in ${tmake_file} |
56694dd9 ZW |
13508 | do |
13509 | if test -f ${srcdir}/config/$f | |
13510 | then | |
2ed26f6b | 13511 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
13512 | fi |
13513 | done | |
2ed26f6b | 13514 | tmake_file="${tmake_file_}" |
71a94577 | 13515 | |
5395b47b NN |
13516 | # This is a terrible hack which will go away some day. |
13517 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
13518 | |
13519 | ||
ab87f8c8 JL |
13520 | out_object_file=`basename $out_file .c`.o |
13521 | ||
75685792 RS |
13522 | tm_file_list="options.h" |
13523 | tm_include_list="options.h" | |
ab87f8c8 | 13524 | for f in $tm_file; do |
64ccbc99 | 13525 | case $f in |
3ca43df7 RS |
13526 | ./* ) |
13527 | f=`echo $f | sed 's/^..//'` | |
13528 | tm_file_list="${tm_file_list} $f" | |
13529 | tm_include_list="${tm_include_list} $f" | |
13530 | ;; | |
d02af173 | 13531 | defaults.h ) |
e22340b0 ZW |
13532 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
13533 | tm_include_list="${tm_include_list} $f" | |
13534 | ;; | |
13535 | * ) | |
13536 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
13537 | tm_include_list="${tm_include_list} config/$f" | |
13538 | ;; | |
64ccbc99 | 13539 | esac |
ab87f8c8 JL |
13540 | done |
13541 | ||
11642c3a | 13542 | tm_p_file_list= |
e22340b0 | 13543 | tm_p_include_list= |
11642c3a | 13544 | for f in $tm_p_file; do |
4977bab6 ZW |
13545 | case $f in |
13546 | tm-preds.h ) | |
e22340b0 ZW |
13547 | tm_p_file_list="${tm_p_file_list} $f" |
13548 | tm_p_include_list="${tm_p_include_list} $f" | |
13549 | ;; | |
13550 | * ) | |
13551 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
13552 | tm_p_include_list="${tm_p_include_list} config/$f" | |
13553 | esac | |
13554 | done | |
13555 | ||
13556 | xm_file_list= | |
13557 | xm_include_list= | |
13558 | for f in $xm_file; do | |
13559 | case $f in | |
13560 | ansidecl.h ) | |
13561 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
13562 | xm_include_list="${xm_include_list} $f" | |
13563 | ;; | |
13564 | auto-host.h ) | |
13565 | xm_file_list="${xm_file_list} $f" | |
13566 | xm_include_list="${xm_include_list} $f" | |
13567 | ;; | |
13568 | * ) | |
13569 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
13570 | xm_include_list="${xm_include_list} config/$f" | |
13571 | ;; | |
4977bab6 | 13572 | esac |
11642c3a ZW |
13573 | done |
13574 | ||
ab87f8c8 | 13575 | host_xm_file_list= |
e22340b0 | 13576 | host_xm_include_list= |
ab87f8c8 | 13577 | for f in $host_xm_file; do |
64ccbc99 | 13578 | case $f in |
d02af173 | 13579 | ansidecl.h ) |
e22340b0 ZW |
13580 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
13581 | host_xm_include_list="${host_xm_include_list} $f" | |
13582 | ;; | |
e2500fed | 13583 | auto-host.h ) |
e22340b0 ZW |
13584 | host_xm_file_list="${host_xm_file_list} $f" |
13585 | host_xm_include_list="${host_xm_include_list} $f" | |
13586 | ;; | |
13587 | * ) | |
13588 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
13589 | host_xm_include_list="${host_xm_include_list} config/$f" | |
13590 | ;; | |
64ccbc99 | 13591 | esac |
ab87f8c8 JL |
13592 | done |
13593 | ||
13594 | build_xm_file_list= | |
13595 | for f in $build_xm_file; do | |
64ccbc99 | 13596 | case $f in |
d02af173 | 13597 | ansidecl.h ) |
e22340b0 ZW |
13598 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
13599 | build_xm_include_list="${build_xm_include_list} $f" | |
13600 | ;; | |
e2500fed | 13601 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
13602 | build_xm_file_list="${build_xm_file_list} $f" |
13603 | build_xm_include_list="${build_xm_include_list} $f" | |
13604 | ;; | |
13605 | * ) | |
13606 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
13607 | build_xm_include_list="${build_xm_include_list} config/$f" | |
13608 | ;; | |
64ccbc99 | 13609 | esac |
ab87f8c8 JL |
13610 | done |
13611 | ||
2989d30c GK |
13612 | # Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a |
13613 | # cross-compiler which does not use the native headers and libraries. | |
a078a589 | 13614 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. |
ba479fd2 NN |
13615 | CROSS= |
13616 | ALL=all.internal | |
13617 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
13618 | |
13619 | if test "x$with_build_sysroot" != x; then | |
14da6073 | 13620 | build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' |
b28250ab MM |
13621 | else |
13622 | # This value is used, even on a native system, because | |
13623 | # CROSS_SYSTEM_HEADER_DIR is just | |
13624 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
13625 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
13626 | fi | |
13627 | ||
ab87f8c8 JL |
13628 | if test x$host != x$target |
13629 | then | |
2989d30c | 13630 | CROSS="-DCROSS_DIRECTORY_STRUCTURE" |
a078a589 | 13631 | ALL=all.cross |
160633c6 | 13632 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 13633 | case "$host","$target" in |
3a7e8b87 GK |
13634 | # Darwin crosses can use the host system's libraries and headers, |
13635 | # because of the fat library support. Of course, it must be the | |
13636 | # same version of Darwin on both sides. Allow the user to | |
13637 | # just say --target=foo-darwin without a version number to mean | |
13638 | # "the version on this system". | |
13639 | *-*-darwin*,*-*-darwin*) | |
13640 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
13641 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
13642 | if test $hostos = $targetos -o $targetos = darwin ; then | |
13643 | CROSS= | |
13644 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
13645 | with_headers=yes | |
13646 | fi | |
13647 | ;; | |
13648 | ||
343f59d9 AM |
13649 | i?86-*-*,x86_64-*-* \ |
13650 | | powerpc*-*-*,powerpc64*-*-*) | |
13651 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
13652 | esac | |
7a615b25 | 13653 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 13654 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
13655 | fi |
13656 | ||
b39d221a EC |
13657 | # If this is a cross-compiler that does not |
13658 | # have its own set of headers then define | |
13659 | # inhibit_libc | |
13660 | ||
dc06db20 R |
13661 | # If this is using newlib, without having the headers available now, |
13662 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
13663 | # This prevents libgcc2 from containing any code which requires libc |
13664 | # support. | |
160633c6 | 13665 | inhibit_libc=false |
dc06db20 R |
13666 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
13667 | test x$with_newlib = xyes ; } && | |
e50084fa | 13668 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 13669 | inhibit_libc=true |
b39d221a EC |
13670 | fi |
13671 | ||
13672 | ||
a078a589 ZW |
13673 | # When building gcc with a cross-compiler, we need to adjust things so |
13674 | # that the generator programs are still built with the native compiler. | |
13675 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
13676 | |
13677 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
13678 | CC_FOR_BUILD='$(CC)' |
13679 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 13680 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
13681 | |
13682 | # Possibly disable fixproto, on a per-target basis. | |
13683 | case ${use_fixproto} in | |
13684 | no) | |
13685 | STMP_FIXPROTO= | |
13686 | ;; | |
13687 | yes) | |
13688 | STMP_FIXPROTO=stmp-fixproto | |
13689 | ;; | |
13690 | esac | |
13691 | ||
a078a589 | 13692 | |
83599948 NS |
13693 | # And these apply if build != host, or we are generating coverage data |
13694 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 13695 | then |
b11e4747 | 13696 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 13697 | |
7a615b25 | 13698 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 13699 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
13700 | STMP_FIXPROTO=stmp-install-fixproto |
13701 | fi | |
7a615b25 | 13702 | fi |
ab87f8c8 JL |
13703 | fi |
13704 | ||
13705 | # Expand extra_headers to include complete path. | |
13706 | # This substitutes for lots of t-* files. | |
13707 | extra_headers_list= | |
b1ef58c8 NN |
13708 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
13709 | for file in ${extra_headers} ; do | |
13710 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
13711 | done | |
ab87f8c8 | 13712 | |
1617e5ee GK |
13713 | # If use_gcc_tgmath is set, append ginclude/tgmath.h. |
13714 | if test x"$use_gcc_tgmath" = xyes | |
13715 | then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h" | |
13716 | fi | |
13717 | ||
c38f02df ILT |
13718 | # Define collect2 in Makefile. |
13719 | case $host_can_use_collect2 in | |
13720 | no) collect2= ;; | |
13721 | *) collect2='collect2$(exeext)' ;; | |
13722 | esac | |
13723 | ||
13724 | ||
ab87f8c8 | 13725 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
13726 | case $use_collect2 in |
13727 | no) use_collect2= ;; | |
13728 | "") ;; | |
ba479fd2 | 13729 | *) |
34a86c2b NN |
13730 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
13731 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
13732 | case $host_can_use_collect2 in |
13733 | no) | |
13734 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
13735 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
13736 | { (exit 1); exit 1; }; } | |
13737 | ;; | |
13738 | esac | |
34a86c2b NN |
13739 | ;; |
13740 | esac | |
ab87f8c8 | 13741 | |
8bb915b6 NN |
13742 | # --------------------------- |
13743 | # Assembler & linker features | |
13744 | # --------------------------- | |
13745 | ||
d869a8c4 NN |
13746 | # Identify the assembler which will work hand-in-glove with the newly |
13747 | # built GCC, so that we can examine its features. This is the assembler | |
13748 | # which will be driven by the driver program. | |
13749 | # | |
13750 | # If build != host, and we aren't building gas in-tree, we identify a | |
13751 | # build->target assembler and hope that it will have the same features | |
13752 | # as the host->target assembler we'll be using. | |
981d4858 JM |
13753 | gcc_cv_gas_major_version= |
13754 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 13755 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
e8b05380 PB |
13756 | |
13757 | if test "${gcc_cv_as+set}" = set; then | |
13758 | : | |
13759 | else | |
13760 | ||
ab87f8c8 JL |
13761 | if test -x "$DEFAULT_ASSEMBLER"; then |
13762 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 13763 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
13764 | && test -f ../gas/Makefile \ |
13765 | && test x$build = x$host; then | |
e8b05380 PB |
13766 | gcc_cv_as=../gas/as-new$build_exeext |
13767 | elif test -x as$build_exeext; then | |
13768 | # Build using assembler in the current directory. | |
13769 | gcc_cv_as=./as$build_exeext | |
13770 | elif test -x $AS_FOR_TARGET; then | |
13771 | gcc_cv_as="$AS_FOR_TARGET" | |
13772 | else | |
13773 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
13774 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
ab22c1fa CF |
13775 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13776 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 PB |
13777 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then |
13778 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13779 | else | |
13780 | case $gcc_cv_as in | |
13781 | [\\/]* | ?:[\\/]*) | |
13782 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13783 | ;; | |
13784 | *) | |
13785 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13786 | for as_dir in $PATH | |
13787 | do | |
13788 | IFS=$as_save_IFS | |
13789 | test -z "$as_dir" && as_dir=. | |
13790 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 13791 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 PB |
13792 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" |
13793 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13794 | break 2 | |
13795 | fi | |
13796 | done | |
13797 | done | |
ab22c1fa | 13798 | IFS=$as_save_IFS |
e8b05380 PB |
13799 | |
13800 | ;; | |
13801 | esac | |
13802 | fi | |
13803 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
e8b05380 | 13804 | if test -n "$gcc_cv_as"; then |
ab22c1fa CF |
13805 | { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13806 | echo "${ECHO_T}$gcc_cv_as" >&6; } | |
e8b05380 | 13807 | else |
ab22c1fa CF |
13808 | { echo "$as_me:$LINENO: result: no" >&5 |
13809 | echo "${ECHO_T}no" >&6; } | |
e8b05380 PB |
13810 | fi |
13811 | ||
ab22c1fa | 13812 | |
e8b05380 PB |
13813 | fi |
13814 | fi | |
13815 | ||
13816 | ||
13817 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as | |
13818 | ||
be0fe523 PB |
13819 | case "$ORIGINAL_AS_FOR_TARGET" in |
13820 | ./as | ./as$build_exeext) ;; | |
ab22c1fa | 13821 | *) ac_config_files="$ac_config_files as:exec-tool.in" |
be0fe523 PB |
13822 | ;; |
13823 | esac | |
e8b05380 | 13824 | |
ab22c1fa CF |
13825 | { echo "$as_me:$LINENO: checking what assembler to use" >&5 |
13826 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6; } | |
e8b05380 | 13827 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then |
08d105fa AO |
13828 | # Single tree build which includes gas. We want to prefer it |
13829 | # over whatever linker top-level may have detected, since | |
13830 | # we'll use what we're building after installation anyway. | |
ab22c1fa CF |
13831 | { echo "$as_me:$LINENO: result: newly built gas" >&5 |
13832 | echo "${ECHO_T}newly built gas" >&6; } | |
ad9c4d9f NN |
13833 | in_tree_gas=yes |
13834 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13835 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
13836 | $gcc_cv_as_gas_srcdir/configure \ | |
13837 | $gcc_cv_as_gas_srcdir/configure.in \ | |
13838 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 13839 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
13840 | if test x$gcc_cv_gas_version != x; then |
13841 | break | |
13842 | fi | |
13843 | done | |
13844 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
13845 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13846 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
13847 | case $gcc_cv_gas_patch_version in |
13848 | "") gcc_cv_gas_patch_version="0" ;; | |
13849 | esac | |
8ada417f ZW |
13850 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
13851 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
13852 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 13853 | |
5408ac6c HPN |
13854 | in_tree_gas_is_elf=no |
13855 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
13856 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
13857 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
13858 | then | |
13859 | in_tree_gas_is_elf=yes | |
13860 | fi | |
e8b05380 | 13861 | else |
ab22c1fa CF |
13862 | { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13863 | echo "${ECHO_T}$gcc_cv_as" >&6; } | |
e8b05380 | 13864 | in_tree_gas=no |
981d4858 | 13865 | fi |
9e423e6d | 13866 | |
e8b05380 PB |
13867 | # Identify the linker which will work hand-in-glove with the newly |
13868 | # built GCC, so that we can examine its features. This is the linker | |
13869 | # which will be driven by the driver program. | |
9f18db39 | 13870 | # |
e8b05380 PB |
13871 | # If build != host, and we aren't building gas in-tree, we identify a |
13872 | # build->target linker and hope that it will have the same features | |
13873 | # as the host->target linker we'll be using. | |
13874 | gcc_cv_gld_major_version= | |
13875 | gcc_cv_gld_minor_version= | |
13876 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13877 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9f18db39 | 13878 | |
e8b05380 PB |
13879 | if test "${gcc_cv_ld+set}" = set; then |
13880 | : | |
9f18db39 | 13881 | else |
9f18db39 | 13882 | |
e8b05380 PB |
13883 | if test -x "$DEFAULT_LINKER"; then |
13884 | gcc_cv_ld="$DEFAULT_LINKER" | |
13885 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
13886 | && test -f ../ld/Makefile \ | |
13887 | && test x$build = x$host; then | |
13888 | gcc_cv_ld=../ld/ld-new$build_exeext | |
13889 | elif test -x collect-ld$build_exeext; then | |
13890 | # Build using linker in the current directory. | |
13891 | gcc_cv_ld=./collect-ld$build_exeext | |
13892 | elif test -x $LD_FOR_TARGET; then | |
13893 | gcc_cv_ld="$LD_FOR_TARGET" | |
13894 | else | |
13895 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
13896 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
ab22c1fa CF |
13897 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13898 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 | 13899 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then |
d739199a DJ |
13900 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13901 | else | |
e8b05380 | 13902 | case $gcc_cv_ld in |
d739199a | 13903 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13904 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
13905 | ;; |
13906 | *) | |
13907 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13908 | for as_dir in $PATH | |
13909 | do | |
13910 | IFS=$as_save_IFS | |
13911 | test -z "$as_dir" && as_dir=. | |
13912 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 13913 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 | 13914 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13915 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13916 | break 2 | |
13917 | fi | |
13918 | done | |
13919 | done | |
ab22c1fa | 13920 | IFS=$as_save_IFS |
d739199a DJ |
13921 | |
13922 | ;; | |
13923 | esac | |
13924 | fi | |
e8b05380 | 13925 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
e8b05380 | 13926 | if test -n "$gcc_cv_ld"; then |
ab22c1fa CF |
13927 | { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13928 | echo "${ECHO_T}$gcc_cv_ld" >&6; } | |
d739199a | 13929 | else |
ab22c1fa CF |
13930 | { echo "$as_me:$LINENO: result: no" >&5 |
13931 | echo "${ECHO_T}no" >&6; } | |
d739199a DJ |
13932 | fi |
13933 | ||
ab22c1fa | 13934 | |
d739199a | 13935 | fi |
e8b05380 PB |
13936 | fi |
13937 | ||
13938 | ||
13939 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld | |
13940 | ||
be0fe523 PB |
13941 | case "$ORIGINAL_LD_FOR_TARGET" in |
13942 | ./collect-ld | ./collect-ld$build_exeext) ;; | |
ab22c1fa | 13943 | *) ac_config_files="$ac_config_files collect-ld:exec-tool.in" |
be0fe523 PB |
13944 | ;; |
13945 | esac | |
e8b05380 | 13946 | |
ab22c1fa CF |
13947 | { echo "$as_me:$LINENO: checking what linker to use" >&5 |
13948 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6; } | |
e8b05380 PB |
13949 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then |
13950 | # Single tree build which includes ld. We want to prefer it | |
13951 | # over whatever linker top-level may have detected, since | |
13952 | # we'll use what we're building after installation anyway. | |
ab22c1fa CF |
13953 | { echo "$as_me:$LINENO: result: newly built ld" >&5 |
13954 | echo "${ECHO_T}newly built ld" >&6; } | |
e8b05380 PB |
13955 | in_tree_ld=yes |
13956 | in_tree_ld_is_elf=no | |
13957 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
13958 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
13959 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
13960 | in_tree_ld_is_elf=yes | |
13961 | fi | |
13962 | 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 | |
13963 | do | |
13964 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
13965 | if test x$gcc_cv_gld_version != x; then | |
13966 | break | |
13967 | fi | |
13968 | done | |
13969 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13970 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13971 | else | |
ab22c1fa CF |
13972 | { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13973 | echo "${ECHO_T}$gcc_cv_ld" >&6; } | |
e8b05380 PB |
13974 | in_tree_ld=no |
13975 | fi | |
13976 | ||
13977 | # Figure out what nm we will be using. | |
13978 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
13979 | if test "${gcc_cv_nm+set}" = set; then | |
13980 | : | |
13981 | else | |
13982 | ||
13983 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13984 | && test -f ../binutils/Makefile \ |
13985 | && test x$build = x$host; then | |
e8b05380 PB |
13986 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13987 | elif test -x nm$build_exeext; then | |
13988 | gcc_cv_nm=./nm$build_exeext | |
13989 | elif test -x $NM_FOR_TARGET; then | |
13990 | gcc_cv_nm="$NM_FOR_TARGET" | |
13991 | else | |
13992 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13993 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
ab22c1fa CF |
13994 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13995 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 | 13996 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then |
d739199a DJ |
13997 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13998 | else | |
e8b05380 | 13999 | case $gcc_cv_nm in |
d739199a | 14000 | [\\/]* | ?:[\\/]*) |
e8b05380 | 14001 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
14002 | ;; |
14003 | *) | |
14004 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14005 | for as_dir in $PATH | |
14006 | do | |
14007 | IFS=$as_save_IFS | |
14008 | test -z "$as_dir" && as_dir=. | |
14009 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 14010 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 | 14011 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
14012 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
14013 | break 2 | |
14014 | fi | |
14015 | done | |
14016 | done | |
ab22c1fa | 14017 | IFS=$as_save_IFS |
d739199a DJ |
14018 | |
14019 | ;; | |
14020 | esac | |
14021 | fi | |
e8b05380 | 14022 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
e8b05380 | 14023 | if test -n "$gcc_cv_nm"; then |
ab22c1fa CF |
14024 | { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 |
14025 | echo "${ECHO_T}$gcc_cv_nm" >&6; } | |
d739199a | 14026 | else |
ab22c1fa CF |
14027 | { echo "$as_me:$LINENO: result: no" >&5 |
14028 | echo "${ECHO_T}no" >&6; } | |
d739199a DJ |
14029 | fi |
14030 | ||
ab22c1fa | 14031 | |
d739199a | 14032 | fi |
e8b05380 | 14033 | fi |
d739199a | 14034 | |
e8b05380 | 14035 | |
ab22c1fa CF |
14036 | { echo "$as_me:$LINENO: checking what nm to use" >&5 |
14037 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6; } | |
e8b05380 PB |
14038 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then |
14039 | # Single tree build which includes binutils. | |
ab22c1fa CF |
14040 | { echo "$as_me:$LINENO: result: newly built nm" >&5 |
14041 | echo "${ECHO_T}newly built nm" >&6; } | |
e8b05380 PB |
14042 | in_tree_nm=yes |
14043 | else | |
ab22c1fa CF |
14044 | { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 |
14045 | echo "${ECHO_T}$gcc_cv_nm" >&6; } | |
e8b05380 PB |
14046 | in_tree_nm=no |
14047 | fi | |
14048 | ||
14049 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
14050 | ||
be0fe523 PB |
14051 | case "$ORIGINAL_NM_FOR_TARGET" in |
14052 | ./nm | ./nm$build_exeext) ;; | |
ab22c1fa | 14053 | *) ac_config_files="$ac_config_files nm:exec-tool.in" |
be0fe523 PB |
14054 | ;; |
14055 | esac | |
14056 | ||
e8b05380 PB |
14057 | |
14058 | # Figure out what objdump we will be using. | |
14059 | if test "${gcc_cv_objdump+set}" = set; then | |
14060 | : | |
14061 | else | |
14062 | ||
14063 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
14064 | && test -f ../binutils/Makefile \ |
14065 | && test x$build = x$host; then | |
e8b05380 PB |
14066 | # Single tree build which includes binutils. |
14067 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
14068 | elif test -x objdump$build_exeext; then | |
14069 | gcc_cv_objdump=./objdump$build_exeext | |
14070 | elif test -x $OBJDUMP_FOR_TARGET; then | |
14071 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
14072 | else | |
14073 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
14074 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
ab22c1fa CF |
14075 | { echo "$as_me:$LINENO: checking for $ac_word" >&5 |
14076 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } | |
e8b05380 | 14077 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then |
9f18db39 PB |
14078 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
14079 | else | |
e8b05380 | 14080 | case $gcc_cv_objdump in |
9f18db39 | 14081 | [\\/]* | ?:[\\/]*) |
e8b05380 | 14082 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
14083 | ;; |
14084 | *) | |
14085 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 14086 | for as_dir in $PATH |
9f18db39 PB |
14087 | do |
14088 | IFS=$as_save_IFS | |
14089 | test -z "$as_dir" && as_dir=. | |
14090 | for ac_exec_ext in '' $ac_executable_extensions; do | |
ab22c1fa | 14091 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
e8b05380 | 14092 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
9f18db39 PB |
14093 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
14094 | break 2 | |
14095 | fi | |
14096 | done | |
14097 | done | |
ab22c1fa | 14098 | IFS=$as_save_IFS |
779243f7 | 14099 | |
9f18db39 PB |
14100 | ;; |
14101 | esac | |
14102 | fi | |
e8b05380 | 14103 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
e8b05380 | 14104 | if test -n "$gcc_cv_objdump"; then |
ab22c1fa CF |
14105 | { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 |
14106 | echo "${ECHO_T}$gcc_cv_objdump" >&6; } | |
9f18db39 | 14107 | else |
ab22c1fa CF |
14108 | { echo "$as_me:$LINENO: result: no" >&5 |
14109 | echo "${ECHO_T}no" >&6; } | |
9f18db39 PB |
14110 | fi |
14111 | ||
ab22c1fa | 14112 | |
e8b05380 PB |
14113 | fi |
14114 | fi | |
9f18db39 | 14115 | |
e8b05380 | 14116 | |
ab22c1fa CF |
14117 | { echo "$as_me:$LINENO: checking what objdump to use" >&5 |
14118 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6; } | |
e8b05380 PB |
14119 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then |
14120 | # Single tree build which includes binutils. | |
ab22c1fa CF |
14121 | { echo "$as_me:$LINENO: result: newly built objdump" >&5 |
14122 | echo "${ECHO_T}newly built objdump" >&6; } | |
e8b05380 | 14123 | elif test x$gcc_cv_objdump = x; then |
ab22c1fa CF |
14124 | { echo "$as_me:$LINENO: result: not found" >&5 |
14125 | echo "${ECHO_T}not found" >&6; } | |
e8b05380 | 14126 | else |
ab22c1fa CF |
14127 | { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 |
14128 | echo "${ECHO_T}$gcc_cv_objdump" >&6; } | |
a2eafc76 | 14129 | fi |
3cae5780 | 14130 | |
981d4858 | 14131 | # Figure out what assembler alignment features are present. |
ab22c1fa CF |
14132 | { echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
14133 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6; } | |
ba479fd2 NN |
14134 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then |
14135 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14136 | else |
14137 | gcc_cv_as_balign_and_p2align=no | |
14138 | if test $in_tree_gas = yes; then | |
14139 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
14140 | then gcc_cv_as_balign_and_p2align=yes | |
14141 | fi | |
14142 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14143 | echo '.balign 4 |
8ada417f | 14144 | .p2align 2' > conftest.s |
ba479fd2 NN |
14145 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14146 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14147 | (eval $ac_try) 2>&5 | |
14148 | ac_status=$? | |
14149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14150 | (exit $ac_status); }; } | |
8ada417f ZW |
14151 | then |
14152 | gcc_cv_as_balign_and_p2align=yes | |
14153 | else | |
14154 | echo "configure: failed program was" >&5 | |
14155 | cat conftest.s >&5 | |
14156 | fi | |
14157 | rm -f conftest.o conftest.s | |
14158 | fi | |
14159 | fi | |
ab22c1fa CF |
14160 | { echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
14161 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6; } | |
63cf211a | 14162 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
14163 | |
14164 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 14165 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 14166 | _ACEOF |
981d4858 | 14167 | |
ad9c4d9f NN |
14168 | fi |
14169 | ||
ab22c1fa CF |
14170 | { echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
14171 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6; } | |
ba479fd2 NN |
14172 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then |
14173 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14174 | else |
14175 | gcc_cv_as_max_skip_p2align=no | |
14176 | if test $in_tree_gas = yes; then | |
14177 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
14178 | then gcc_cv_as_max_skip_p2align=yes | |
14179 | fi | |
14180 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14181 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
14182 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14183 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14184 | (eval $ac_try) 2>&5 | |
14185 | ac_status=$? | |
14186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14187 | (exit $ac_status); }; } | |
8ada417f ZW |
14188 | then |
14189 | gcc_cv_as_max_skip_p2align=yes | |
14190 | else | |
14191 | echo "configure: failed program was" >&5 | |
14192 | cat conftest.s >&5 | |
14193 | fi | |
14194 | rm -f conftest.o conftest.s | |
14195 | fi | |
ad9c4d9f | 14196 | fi |
ab22c1fa CF |
14197 | { echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
14198 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6; } | |
63cf211a | 14199 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
14200 | |
14201 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 14202 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 14203 | _ACEOF |
9e423e6d | 14204 | |
9e423e6d | 14205 | fi |
ad9c4d9f | 14206 | |
ab22c1fa CF |
14207 | { echo "$as_me:$LINENO: checking assembler for .literal16" >&5 |
14208 | echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6; } | |
5708d18d MS |
14209 | if test "${gcc_cv_as_literal16+set}" = set; then |
14210 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14211 | else | |
14212 | gcc_cv_as_literal16=no | |
14213 | if test $in_tree_gas = yes; then | |
14214 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
14215 | then gcc_cv_as_literal16=yes | |
14216 | fi | |
14217 | elif test x$gcc_cv_as != x; then | |
14218 | echo '.literal16' > conftest.s | |
14219 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14220 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14221 | (eval $ac_try) 2>&5 | |
14222 | ac_status=$? | |
14223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14224 | (exit $ac_status); }; } | |
14225 | then | |
14226 | gcc_cv_as_literal16=yes | |
14227 | else | |
14228 | echo "configure: failed program was" >&5 | |
14229 | cat conftest.s >&5 | |
14230 | fi | |
14231 | rm -f conftest.o conftest.s | |
14232 | fi | |
14233 | fi | |
ab22c1fa CF |
14234 | { echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5 |
14235 | echo "${ECHO_T}$gcc_cv_as_literal16" >&6; } | |
5708d18d MS |
14236 | if test $gcc_cv_as_literal16 = yes; then |
14237 | ||
14238 | cat >>confdefs.h <<\_ACEOF | |
14239 | #define HAVE_GAS_LITERAL16 1 | |
14240 | _ACEOF | |
14241 | ||
14242 | fi | |
14243 | ||
ab22c1fa CF |
14244 | { echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
14245 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6; } | |
ba479fd2 NN |
14246 | if test "${gcc_cv_as_subsection_m1+set}" = set; then |
14247 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14248 | else |
14249 | gcc_cv_as_subsection_m1=no | |
14250 | if test $in_tree_gas = yes; then | |
14251 | if test $in_tree_gas_is_elf = yes \ | |
14252 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14253 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 14254 | fi |
8ada417f | 14255 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14256 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
14257 | .subsection -1 |
14258 | conftest_label2: .word 0 | |
8ada417f | 14259 | .previous' > conftest.s |
ba479fd2 NN |
14260 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14261 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14262 | (eval $ac_try) 2>&5 | |
14263 | ac_status=$? | |
14264 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14265 | (exit $ac_status); }; } | |
8ada417f ZW |
14266 | then |
14267 | if test x$gcc_cv_nm != x; then | |
14268 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
14269 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
14270 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
14271 | then : | |
14272 | else gcc_cv_as_subsection_m1=yes | |
14273 | fi | |
14274 | rm -f conftest.nm1 conftest.nm2 | |
14275 | fi | |
14276 | else | |
14277 | echo "configure: failed program was" >&5 | |
14278 | cat conftest.s >&5 | |
14279 | fi | |
14280 | rm -f conftest.o conftest.s | |
14281 | fi | |
981d4858 | 14282 | fi |
ab22c1fa CF |
14283 | { echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
14284 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6; } | |
63cf211a | 14285 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
14286 | |
14287 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 14288 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 14289 | _ACEOF |
981d4858 | 14290 | |
d1accaa3 | 14291 | fi |
ad9c4d9f | 14292 | |
ab22c1fa CF |
14293 | { echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
14294 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6; } | |
ba479fd2 NN |
14295 | if test "${gcc_cv_as_weak+set}" = set; then |
14296 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14297 | else |
14298 | gcc_cv_as_weak=no | |
14299 | if test $in_tree_gas = yes; then | |
14300 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
14301 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 14302 | fi |
8ada417f | 14303 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14304 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
14305 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14306 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14307 | (eval $ac_try) 2>&5 | |
14308 | ac_status=$? | |
14309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14310 | (exit $ac_status); }; } | |
8ada417f ZW |
14311 | then |
14312 | gcc_cv_as_weak=yes | |
14313 | else | |
14314 | echo "configure: failed program was" >&5 | |
14315 | cat conftest.s >&5 | |
14316 | fi | |
14317 | rm -f conftest.o conftest.s | |
14318 | fi | |
981d4858 | 14319 | fi |
ab22c1fa CF |
14320 | { echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
14321 | echo "${ECHO_T}$gcc_cv_as_weak" >&6; } | |
63cf211a | 14322 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
14323 | |
14324 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 14325 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 14326 | _ACEOF |
981d4858 | 14327 | |
12822146 | 14328 | fi |
ad9c4d9f | 14329 | |
ab22c1fa CF |
14330 | { echo "$as_me:$LINENO: checking assembler for .weakref" >&5 |
14331 | echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6; } | |
a0203ca7 AO |
14332 | if test "${gcc_cv_as_weakref+set}" = set; then |
14333 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14334 | else | |
14335 | gcc_cv_as_weakref=no | |
14336 | if test $in_tree_gas = yes; then | |
14337 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
14338 | then gcc_cv_as_weakref=yes | |
14339 | fi | |
14340 | elif test x$gcc_cv_as != x; then | |
14341 | echo ' .weakref foobar, barfnot' > conftest.s | |
14342 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14343 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14344 | (eval $ac_try) 2>&5 | |
14345 | ac_status=$? | |
14346 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14347 | (exit $ac_status); }; } | |
14348 | then | |
14349 | gcc_cv_as_weakref=yes | |
14350 | else | |
14351 | echo "configure: failed program was" >&5 | |
14352 | cat conftest.s >&5 | |
14353 | fi | |
14354 | rm -f conftest.o conftest.s | |
14355 | fi | |
14356 | fi | |
ab22c1fa CF |
14357 | { echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 |
14358 | echo "${ECHO_T}$gcc_cv_as_weakref" >&6; } | |
a0203ca7 AO |
14359 | if test $gcc_cv_as_weakref = yes; then |
14360 | ||
14361 | cat >>confdefs.h <<\_ACEOF | |
14362 | #define HAVE_GAS_WEAKREF 1 | |
14363 | _ACEOF | |
14364 | ||
14365 | fi | |
14366 | ||
ab22c1fa CF |
14367 | { echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
14368 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6; } | |
e41f3691 JDA |
14369 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then |
14370 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14371 | else | |
14372 | gcc_cv_as_nsubspa_comdat=no | |
14373 | if test $in_tree_gas = yes; then | |
14374 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14375 | then gcc_cv_as_nsubspa_comdat=yes | |
14376 | fi | |
14377 | elif test x$gcc_cv_as != x; then | |
14378 | echo ' .SPACE $TEXT$ | |
14379 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
14380 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14381 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14382 | (eval $ac_try) 2>&5 | |
14383 | ac_status=$? | |
14384 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14385 | (exit $ac_status); }; } | |
14386 | then | |
14387 | gcc_cv_as_nsubspa_comdat=yes | |
14388 | else | |
14389 | echo "configure: failed program was" >&5 | |
14390 | cat conftest.s >&5 | |
14391 | fi | |
14392 | rm -f conftest.o conftest.s | |
14393 | fi | |
14394 | fi | |
ab22c1fa CF |
14395 | { echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 |
14396 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6; } | |
e41f3691 JDA |
14397 | if test $gcc_cv_as_nsubspa_comdat = yes; then |
14398 | ||
14399 | cat >>confdefs.h <<\_ACEOF | |
14400 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
14401 | _ACEOF | |
14402 | ||
14403 | fi | |
14404 | ||
8ada417f ZW |
14405 | # .hidden needs to be supported in both the assembler and the linker, |
14406 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
14407 | # This is irritatingly difficult to feature test for; we have to check the | |
14408 | # date string after the version number. If we've got an in-tree | |
14409 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
14410 | # to be safe. | |
14411 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ab22c1fa CF |
14412 | { echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
14413 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6; } | |
ba479fd2 NN |
14414 | if test "${gcc_cv_as_hidden+set}" = set; then |
14415 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14416 | else |
14417 | gcc_cv_as_hidden=no | |
14418 | if test $in_tree_gas = yes; then | |
14419 | if test $in_tree_gas_is_elf = yes \ | |
14420 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
14421 | then gcc_cv_as_hidden=yes | |
14422 | fi | |
14423 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14424 | echo ' .hidden foobar |
8ada417f | 14425 | foobar:' > conftest.s |
ba479fd2 NN |
14426 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14427 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14428 | (eval $ac_try) 2>&5 | |
14429 | ac_status=$? | |
14430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14431 | (exit $ac_status); }; } | |
8ada417f ZW |
14432 | then |
14433 | gcc_cv_as_hidden=yes | |
14434 | else | |
14435 | echo "configure: failed program was" >&5 | |
14436 | cat conftest.s >&5 | |
14437 | fi | |
14438 | rm -f conftest.o conftest.s | |
14439 | fi | |
14440 | fi | |
ab22c1fa CF |
14441 | { echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
14442 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6; } | |
63cf211a | 14443 | |
ad9c4d9f | 14444 | |
ab22c1fa CF |
14445 | { echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
14446 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6; } | |
ba479fd2 NN |
14447 | if test "${gcc_cv_ld_hidden+set}" = set; then |
14448 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14449 | else |
14450 | if test $in_tree_ld = yes ; then | |
14451 | gcc_cv_ld_hidden=no | |
14452 | 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 \ | |
14453 | && test $in_tree_ld_is_elf = yes; then | |
14454 | gcc_cv_ld_hidden=yes | |
14455 | fi | |
14456 | else | |
14457 | gcc_cv_ld_hidden=yes | |
bace148a | 14458 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14459 | if echo "$ld_ver" | grep GNU > /dev/null; then |
14460 | ld_vers=`echo $ld_ver | sed -n \ | |
14461 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14462 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14463 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14464 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
14465 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a | 14466 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
e8116f40 | 14467 | -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 | 14468 | 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 |
14469 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
14470 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
14471 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
14472 | if test 0"$ld_date" -lt 20020404; then |
14473 | if test -n "$ld_date"; then | |
14474 | # If there was date string, but was earlier than 2002-04-04, fail | |
14475 | gcc_cv_ld_hidden=no | |
14476 | elif test -z "$ld_vers"; then | |
14477 | # If there was no date string nor ld version number, something is wrong | |
14478 | gcc_cv_ld_hidden=no | |
14479 | else | |
8ada417f ZW |
14480 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
14481 | if test "$ld_vers_major" -lt 2; then | |
14482 | gcc_cv_ld_hidden=no | |
14483 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
14484 | gcc_cv_ld_hidden="no" | |
14485 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
14486 | gcc_cv_ld_hidden=no | |
c72931a6 | 14487 | fi |
8ada417f | 14488 | fi |
789b7de5 | 14489 | fi |
8ada417f | 14490 | else |
28690784 | 14491 | case "${target}" in |
b0fd7d27 | 14492 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
14493 | gcc_cv_ld_hidden=yes |
14494 | ;; | |
14495 | *) | |
14496 | gcc_cv_ld_hidden=no | |
14497 | ;; | |
14498 | esac | |
8ada417f ZW |
14499 | fi |
14500 | fi | |
6d07784a | 14501 | fi |
ab22c1fa CF |
14502 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
14503 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6; } | |
8ada417f | 14504 | libgcc_visibility=no |
ad9c4d9f | 14505 | |
232b67d9 | 14506 | |
8e3940b2 | 14507 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 14508 | libgcc_visibility=yes |
ba479fd2 NN |
14509 | |
14510 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14511 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 14512 | _ACEOF |
ad9c4d9f NN |
14513 | |
14514 | fi | |
14515 | ||
8ada417f | 14516 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ab22c1fa CF |
14517 | { echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
14518 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6; } | |
ba479fd2 NN |
14519 | if test "${gcc_cv_as_leb128+set}" = set; then |
14520 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14521 | else |
14522 | gcc_cv_as_leb128=no | |
14523 | if test $in_tree_gas = yes; then | |
14524 | if test $in_tree_gas_is_elf = yes \ | |
14525 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14526 | then gcc_cv_as_leb128=yes | |
14527 | fi | |
14528 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14529 | echo ' .data |
b7460f24 RH |
14530 | .uleb128 L2 - L1 |
14531 | L1: | |
14532 | .uleb128 1280 | |
14533 | .sleb128 -1010 | |
8ada417f | 14534 | L2:' > conftest.s |
ba479fd2 NN |
14535 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14536 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14537 | (eval $ac_try) 2>&5 | |
14538 | ac_status=$? | |
14539 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14540 | (exit $ac_status); }; } | |
8ada417f ZW |
14541 | then |
14542 | # GAS versions before 2.11 do not support uleb128, | |
14543 | # despite appearing to. | |
14544 | # ??? There exists an elf-specific test that will crash | |
14545 | # the assembler. Perhaps it's better to figure out whether | |
14546 | # arbitrary sections are supported and try the test. | |
bace148a | 14547 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14548 | if echo "$as_ver" | grep GNU > /dev/null; then |
14549 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
14550 | as_major=`echo $as_ver | sed 's/\..*//'` | |
14551 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
14552 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
14553 | then : | |
14554 | else gcc_cv_as_leb128=yes | |
14555 | fi | |
14556 | fi | |
14557 | else | |
14558 | echo "configure: failed program was" >&5 | |
14559 | cat conftest.s >&5 | |
14560 | fi | |
14561 | rm -f conftest.o conftest.s | |
14562 | fi | |
b7460f24 | 14563 | fi |
ab22c1fa CF |
14564 | { echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
14565 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6; } | |
63cf211a | 14566 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
14567 | |
14568 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 14569 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 14570 | _ACEOF |
b7460f24 RH |
14571 | |
14572 | fi | |
ad9c4d9f | 14573 | |
8ada417f ZW |
14574 | # GAS versions up to and including 2.11.0 may mis-optimize |
14575 | # .eh_frame data. | |
ab22c1fa CF |
14576 | { echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
14577 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6; } | |
ba479fd2 NN |
14578 | if test "${gcc_cv_as_eh_frame+set}" = set; then |
14579 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14580 | else |
14581 | gcc_cv_as_eh_frame=no | |
14582 | if test $in_tree_gas = yes; then | |
14583 | if test $in_tree_gas_is_elf = yes \ | |
14584 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14585 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 14586 | fi |
8ada417f | 14587 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14588 | echo ' .text |
c64688ae RH |
14589 | .LFB1: |
14590 | .4byte 0 | |
14591 | .L1: | |
14592 | .4byte 0 | |
14593 | .LFE1: | |
14594 | .section .eh_frame,"aw",@progbits | |
14595 | __FRAME_BEGIN__: | |
14596 | .4byte .LECIE1-.LSCIE1 | |
14597 | .LSCIE1: | |
14598 | .4byte 0x0 | |
14599 | .byte 0x1 | |
14600 | .ascii "z\0" | |
14601 | .byte 0x1 | |
14602 | .byte 0x78 | |
14603 | .byte 0x1a | |
14604 | .byte 0x0 | |
14605 | .byte 0x4 | |
14606 | .4byte 1 | |
14607 | .p2align 1 | |
14608 | .LECIE1: | |
14609 | .LSFDE1: | |
14610 | .4byte .LEFDE1-.LASFDE1 | |
14611 | .LASFDE1: | |
14612 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
14613 | .4byte .LFB1 | |
14614 | .4byte .LFE1-.LFB1 | |
14615 | .byte 0x4 | |
14616 | .4byte .LFE1-.LFB1 | |
14617 | .byte 0x4 | |
14618 | .4byte .L1-.LFB1 | |
8ada417f | 14619 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
14620 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14621 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14622 | (eval $ac_try) 2>&5 | |
14623 | ac_status=$? | |
14624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14625 | (exit $ac_status); }; } | |
8ada417f ZW |
14626 | then |
14627 | cat > conftest.lit <<EOF | |
c64688ae RH |
14628 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
14629 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 14630 | 0020 08000000 04080000 0044 .........D |
01efb963 | 14631 | EOF |
ba479fd2 | 14632 | cat > conftest.big <<EOF |
01efb963 AS |
14633 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
14634 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 14635 | 0020 00000008 04000000 0844 .........D |
c64688ae | 14636 | EOF |
8ada417f ZW |
14637 | # If the assembler didn't choke, and we can objdump, |
14638 | # and we got the correct data, then succeed. | |
dbc02e7f AS |
14639 | # The text in the here-document typically retains its unix-style line |
14640 | # endings, while the output of objdump will use host line endings. | |
14641 | # Therefore, use diff -b for the comparisons. | |
8ada417f ZW |
14642 | if test x$gcc_cv_objdump != x \ |
14643 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
14644 | | tail -3 > conftest.got \ | |
dbc02e7f AS |
14645 | && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ |
14646 | || diff -b conftest.big conftest.got > /dev/null 2>&1; } | |
8ada417f ZW |
14647 | then |
14648 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
14649 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
14650 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14651 | (eval $ac_try) 2>&5 | |
14652 | ac_status=$? | |
14653 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14654 | (exit $ac_status); }; }; then | |
8ada417f ZW |
14655 | gcc_cv_as_eh_frame=buggy |
14656 | else | |
14657 | # Uh oh, what do we do now? | |
14658 | gcc_cv_as_eh_frame=no | |
14659 | fi | |
14660 | else | |
14661 | echo "configure: failed program was" >&5 | |
14662 | cat conftest.s >&5 | |
14663 | fi | |
14664 | rm -f conftest.o conftest.s | |
14665 | fi | |
c64688ae | 14666 | fi |
ab22c1fa CF |
14667 | { echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
14668 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6; } | |
ad9c4d9f | 14669 | |
6e3f3080 | 14670 | |
63cf211a | 14671 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
14672 | |
14673 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14674 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 14675 | _ACEOF |
ad9c4d9f NN |
14676 | |
14677 | fi | |
14678 | ||
ab22c1fa CF |
14679 | { echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14680 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; } | |
ba479fd2 NN |
14681 | if test "${gcc_cv_as_shf_merge+set}" = set; then |
14682 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14683 | else |
14684 | gcc_cv_as_shf_merge=no | |
14685 | if test $in_tree_gas = yes; then | |
14686 | if test $in_tree_gas_is_elf = yes \ | |
14687 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14688 | then gcc_cv_as_shf_merge=yes | |
14689 | fi | |
14690 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14691 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
14692 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
14693 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14694 | (eval $ac_try) 2>&5 | |
14695 | ac_status=$? | |
14696 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14697 | (exit $ac_status); }; } | |
8ada417f ZW |
14698 | then |
14699 | gcc_cv_as_shf_merge=yes | |
14700 | else | |
14701 | echo "configure: failed program was" >&5 | |
14702 | cat conftest.s >&5 | |
14703 | fi | |
14704 | rm -f conftest.o conftest.s | |
14705 | fi | |
201556f0 | 14706 | fi |
ab22c1fa CF |
14707 | { echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14708 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; } | |
8ada417f | 14709 | |
c18a5b6c | 14710 | if test $gcc_cv_as_shf_merge = no; then |
ab22c1fa CF |
14711 | { echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14712 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; } | |
c18a5b6c MM |
14713 | if test "${gcc_cv_as_shf_merge+set}" = set; then |
14714 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14715 | else | |
14716 | gcc_cv_as_shf_merge=no | |
14717 | if test $in_tree_gas = yes; then | |
14718 | if test $in_tree_gas_is_elf = yes \ | |
14719 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14720 | then gcc_cv_as_shf_merge=yes | |
14721 | fi | |
14722 | elif test x$gcc_cv_as != x; then | |
14723 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
14724 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14725 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14726 | (eval $ac_try) 2>&5 | |
14727 | ac_status=$? | |
14728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14729 | (exit $ac_status); }; } | |
14730 | then | |
14731 | gcc_cv_as_shf_merge=yes | |
14732 | else | |
14733 | echo "configure: failed program was" >&5 | |
14734 | cat conftest.s >&5 | |
14735 | fi | |
14736 | rm -f conftest.o conftest.s | |
14737 | fi | |
14738 | fi | |
ab22c1fa CF |
14739 | { echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14740 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; } | |
c18a5b6c MM |
14741 | |
14742 | fi | |
8ad9fb33 | 14743 | |
ba479fd2 | 14744 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 14745 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14746 | _ACEOF |
201556f0 | 14747 | |
201556f0 | 14748 | |
ab22c1fa CF |
14749 | { echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14750 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; } | |
c18a5b6c MM |
14751 | if test "${gcc_cv_as_comdat_group+set}" = set; then |
14752 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14753 | else | |
14754 | gcc_cv_as_comdat_group=no | |
14755 | if test $in_tree_gas = yes; then | |
14756 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14757 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14758 | then gcc_cv_as_comdat_group=yes |
14759 | fi | |
14760 | elif test x$gcc_cv_as != x; then | |
14761 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
14762 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14763 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14764 | (eval $ac_try) 2>&5 | |
14765 | ac_status=$? | |
14766 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14767 | (exit $ac_status); }; } | |
14768 | then | |
14769 | gcc_cv_as_comdat_group=yes | |
14770 | else | |
14771 | echo "configure: failed program was" >&5 | |
14772 | cat conftest.s >&5 | |
14773 | fi | |
14774 | rm -f conftest.o conftest.s | |
14775 | fi | |
14776 | fi | |
ab22c1fa CF |
14777 | { echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 |
14778 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6; } | |
c18a5b6c MM |
14779 | |
14780 | if test $gcc_cv_as_comdat_group = yes; then | |
14781 | gcc_cv_as_comdat_group_percent=no | |
14782 | else | |
ab22c1fa CF |
14783 | { echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14784 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; } | |
c18a5b6c MM |
14785 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then |
14786 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14787 | else | |
14788 | gcc_cv_as_comdat_group_percent=no | |
14789 | if test $in_tree_gas = yes; then | |
14790 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14791 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14792 | then gcc_cv_as_comdat_group_percent=yes |
14793 | fi | |
14794 | elif test x$gcc_cv_as != x; then | |
14795 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14796 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14797 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14798 | (eval $ac_try) 2>&5 | |
14799 | ac_status=$? | |
14800 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14801 | (exit $ac_status); }; } | |
14802 | then | |
14803 | gcc_cv_as_comdat_group_percent=yes | |
14804 | else | |
14805 | echo "configure: failed program was" >&5 | |
14806 | cat conftest.s >&5 | |
14807 | fi | |
14808 | rm -f conftest.o conftest.s | |
14809 | fi | |
14810 | fi | |
ab22c1fa CF |
14811 | { echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 |
14812 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6; } | |
c18a5b6c MM |
14813 | |
14814 | fi | |
11176d2a JB |
14815 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14816 | comdat_group=yes | |
14817 | if test 0"$ld_date" -lt 20050308; then | |
14818 | if test -n "$ld_date"; then | |
14819 | # If there was date string, but was earlier than 2005-03-08, fail | |
14820 | comdat_group=no | |
14821 | elif test "$ld_vers_major" -lt 2; then | |
14822 | comdat_group=no | |
14823 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14824 | comdat_group=no | |
14825 | fi | |
14826 | fi | |
1cf0118d RO |
14827 | else |
14828 | # assume linkers other than GNU ld don't support COMDAT group | |
14829 | comdat_group=no | |
14830 | fi | |
14831 | if test $comdat_group = no; then | |
14832 | gcc_cv_as_comdat_group=no | |
14833 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 14834 | fi |
c18a5b6c MM |
14835 | |
14836 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14837 | #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 |
14838 | _ACEOF |
14839 | ||
14840 | ||
8ada417f | 14841 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14842 | conftest_s= |
14843 | tls_first_major= | |
14844 | tls_first_minor= | |
9739c90c | 14845 | tls_as_opt= |
f996902d | 14846 | case "$target" in |
6f9b006d RH |
14847 | alpha*-*-*) |
14848 | conftest_s=' | |
14849 | .section ".tdata","awT",@progbits | |
14850 | foo: .long 25 | |
14851 | .text | |
14852 | ldq $27,__tls_get_addr($29) !literal!1 | |
14853 | lda $16,foo($29) !tlsgd!1 | |
14854 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14855 | ldq $27,__tls_get_addr($29) !literal!2 | |
14856 | lda $16,foo($29) !tlsldm!2 | |
14857 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14858 | ldq $1,foo($29) !gotdtprel | |
14859 | ldah $2,foo($29) !dtprelhi | |
14860 | lda $3,foo($2) !dtprello | |
14861 | lda $4,foo($29) !dtprel | |
14862 | ldq $1,foo($29) !gottprel | |
14863 | ldah $2,foo($29) !tprelhi | |
14864 | lda $3,foo($2) !tprello | |
14865 | lda $4,foo($29) !tprel' | |
14866 | tls_first_major=2 | |
14867 | tls_first_minor=13 | |
2f3321ca | 14868 | tls_as_opt=--fatal-warnings |
6f9b006d | 14869 | ;; |
e4dd71de AH |
14870 | frv*-*-*) |
14871 | conftest_s=' | |
14872 | .section ".tdata","awT",@progbits | |
14873 | x: .long 25 | |
14874 | .text | |
14875 | call #gettlsoff(x)' | |
14876 | tls_first_major=2 | |
14877 | tls_first_minor=14 | |
14878 | ;; | |
51076f96 RC |
14879 | hppa*-*-linux*) |
14880 | conftest_s=' | |
14881 | t1: .reg %r20 | |
14882 | t2: .reg %r21 | |
14883 | gp: .reg %r19 | |
14884 | .section ".tdata","awT",@progbits | |
14885 | foo: .long 25 | |
14886 | .text | |
14887 | .align 4 | |
14888 | addil LT%foo-$tls_gdidx$,gp | |
14889 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14890 | b __tls_get_addr | |
14891 | nop | |
14892 | addil LT%foo-$tls_ldidx$,gp | |
14893 | b __tls_get_addr | |
14894 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14895 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14896 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14897 | mfctl %cr27,%t1 | |
14898 | addil LT%foo-$tls_ieoff$,gp | |
14899 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14900 | add %t1,%t2,%t3 | |
14901 | mfctl %cr27,%t1 | |
14902 | addil LR%foo-$tls_leoff$,%t1 | |
14903 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14904 | tls_first_major=2 | |
14905 | tls_first_minor=15 | |
14906 | tls_as_opt=--fatal-warnings | |
14907 | ;; | |
d3585b76 DJ |
14908 | arm*-*-*) |
14909 | conftest_s=' | |
14910 | .section ".tdata","awT",%progbits | |
14911 | foo: .long 25 | |
14912 | .text | |
14913 | .word foo(gottpoff) | |
14914 | .word foo(tpoff) | |
14915 | .word foo(tlsgd) | |
14916 | .word foo(tlsldm) | |
14917 | .word foo(tlsldo)' | |
14918 | tls_first_major=2 | |
14919 | tls_first_minor=17 | |
14920 | ;; | |
f996902d RH |
14921 | i[34567]86-*-*) |
14922 | conftest_s=' | |
14923 | .section ".tdata","awT",@progbits | |
14924 | foo: .long 25 | |
14925 | .text | |
14926 | movl %gs:0, %eax | |
14927 | leal foo@TLSGD(,%ebx,1), %eax | |
14928 | leal foo@TLSLDM(%ebx), %eax | |
14929 | leal foo@DTPOFF(%eax), %edx | |
14930 | movl foo@GOTTPOFF(%ebx), %eax | |
14931 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14932 | addl foo@GOTNTPOFF(%ebx), %eax |
14933 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14934 | movl $foo@TPOFF, %eax |
14935 | subl $foo@TPOFF, %eax | |
14936 | leal foo@NTPOFF(%ecx), %eax' | |
14937 | tls_first_major=2 | |
75d38379 | 14938 | tls_first_minor=14 |
2f3321ca | 14939 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14940 | ;; |
14941 | x86_64-*-*) | |
14942 | conftest_s=' | |
14943 | .section ".tdata","awT",@progbits | |
14944 | foo: .long 25 | |
14945 | .text | |
14946 | movq %fs:0, %rax | |
14947 | leaq foo@TLSGD(%rip), %rdi | |
14948 | leaq foo@TLSLD(%rip), %rdi | |
14949 | leaq foo@DTPOFF(%rax), %rdx | |
14950 | movq foo@GOTTPOFF(%rip), %rax | |
14951 | movq $foo@TPOFF, %rax' | |
14952 | tls_first_major=2 | |
14953 | tls_first_minor=14 | |
2f3321ca | 14954 | tls_as_opt=--fatal-warnings |
f996902d | 14955 | ;; |
7b6e506e RH |
14956 | ia64-*-*) |
14957 | conftest_s=' | |
14958 | .section ".tdata","awT",@progbits | |
14959 | foo: data8 25 | |
14960 | .text | |
14961 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14962 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14963 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14964 | addl r19 = @dtprel(foo#), gp | |
14965 | adds r21 = @dtprel(foo#), r13 | |
14966 | movl r23 = @dtprel(foo#) | |
14967 | addl r20 = @tprel(foo#), gp | |
14968 | adds r22 = @tprel(foo#), r13 | |
14969 | movl r24 = @tprel(foo#)' | |
14970 | tls_first_major=2 | |
14971 | tls_first_minor=13 | |
2f3321ca | 14972 | tls_as_opt=--fatal-warnings |
7b6e506e | 14973 | ;; |
69229b81 DJ |
14974 | mips*-*-*) |
14975 | conftest_s=' | |
14976 | .section .tdata,"awT",@progbits | |
14977 | x: | |
14978 | .word 2 | |
14979 | .text | |
14980 | addiu $4, $28, %tlsgd(x) | |
14981 | addiu $4, $28, %tlsldm(x) | |
14982 | lui $4, %dtprel_hi(x) | |
14983 | addiu $4, $4, %dtprel_lo(x) | |
14984 | lw $4, %gottprel(x)($28) | |
14985 | lui $4, %tprel_hi(x) | |
14986 | addiu $4, $4, %tprel_lo(x)' | |
14987 | tls_first_major=2 | |
14988 | tls_first_minor=16 | |
14989 | tls_as_opt='-32 --fatal-warnings' | |
14990 | ;; | |
c4501e62 JJ |
14991 | powerpc-*-*) |
14992 | conftest_s=' | |
14993 | .section ".tdata","awT",@progbits | |
14994 | .align 2 | |
14995 | ld0: .space 4 | |
14996 | ld1: .space 4 | |
14997 | x1: .space 4 | |
14998 | x2: .space 4 | |
14999 | x3: .space 4 | |
15000 | .text | |
15001 | addi 3,31,ld0@got@tlsgd | |
15002 | bl __tls_get_addr | |
15003 | addi 3,31,x1@got@tlsld | |
15004 | bl __tls_get_addr | |
15005 | addi 9,3,x1@dtprel | |
15006 | addis 9,3,x2@dtprel@ha | |
15007 | addi 9,9,x2@dtprel@l | |
15008 | lwz 9,x3@got@tprel(31) | |
15009 | add 9,9,x@tls | |
15010 | addi 9,2,x1@tprel | |
15011 | addis 9,2,x2@tprel@ha | |
15012 | addi 9,9,x2@tprel@l' | |
15013 | tls_first_major=2 | |
15014 | tls_first_minor=14 | |
2f3321ca | 15015 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
15016 | ;; |
15017 | powerpc64-*-*) | |
15018 | conftest_s=' | |
15019 | .section ".tdata","awT",@progbits | |
15020 | .align 3 | |
15021 | ld0: .space 8 | |
15022 | ld1: .space 8 | |
15023 | x1: .space 8 | |
15024 | x2: .space 8 | |
15025 | x3: .space 8 | |
15026 | .text | |
15027 | addi 3,2,ld0@got@tlsgd | |
15028 | bl .__tls_get_addr | |
15029 | nop | |
15030 | addi 3,2,ld1@toc | |
15031 | bl .__tls_get_addr | |
15032 | nop | |
15033 | addi 3,2,x1@got@tlsld | |
15034 | bl .__tls_get_addr | |
15035 | nop | |
15036 | addi 9,3,x1@dtprel | |
15037 | bl .__tls_get_addr | |
15038 | nop | |
15039 | addis 9,3,x2@dtprel@ha | |
15040 | addi 9,9,x2@dtprel@l | |
15041 | bl .__tls_get_addr | |
15042 | nop | |
15043 | ld 9,x3@got@dtprel(2) | |
15044 | add 9,9,3 | |
15045 | bl .__tls_get_addr | |
15046 | nop' | |
15047 | tls_first_major=2 | |
15048 | tls_first_minor=14 | |
2f3321ca | 15049 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 15050 | ;; |
fd3cd001 UW |
15051 | s390-*-*) |
15052 | conftest_s=' | |
15053 | .section ".tdata","awT",@progbits | |
15054 | foo: .long 25 | |
15055 | .text | |
15056 | .long foo@TLSGD | |
15057 | .long foo@TLSLDM | |
15058 | .long foo@DTPOFF | |
15059 | .long foo@NTPOFF | |
15060 | .long foo@GOTNTPOFF | |
15061 | .long foo@INDNTPOFF | |
15062 | l %r1,foo@GOTNTPOFF(%r12) | |
15063 | l %r1,0(%r1):tls_load:foo | |
15064 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
15065 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
15066 | tls_first_major=2 | |
15067 | tls_first_minor=14 | |
2f3321ca | 15068 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
15069 | ;; |
15070 | s390x-*-*) | |
15071 | conftest_s=' | |
15072 | .section ".tdata","awT",@progbits | |
15073 | foo: .long 25 | |
15074 | .text | |
15075 | .quad foo@TLSGD | |
15076 | .quad foo@TLSLDM | |
15077 | .quad foo@DTPOFF | |
15078 | .quad foo@NTPOFF | |
15079 | .quad foo@GOTNTPOFF | |
15080 | lg %r1,foo@GOTNTPOFF(%r12) | |
15081 | larl %r1,foo@INDNTPOFF | |
15082 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
15083 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
15084 | tls_first_major=2 | |
15085 | tls_first_minor=14 | |
2f3321ca | 15086 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 15087 | ;; |
9ff13962 KK |
15088 | sh-*-* | sh[34]-*-*) |
15089 | conftest_s=' | |
15090 | .section ".tdata","awT",@progbits | |
15091 | foo: .long 25 | |
15092 | .text | |
15093 | .long foo@TLSGD | |
15094 | .long foo@TLSLDM | |
15095 | .long foo@DTPOFF | |
15096 | .long foo@GOTTPOFF | |
15097 | .long foo@TPOFF' | |
15098 | tls_first_major=2 | |
15099 | tls_first_minor=13 | |
2f3321ca | 15100 | tls_as_opt=--fatal-warnings |
9ff13962 | 15101 | ;; |
5751a10b | 15102 | sparc*-*-*) |
2f3321ca | 15103 | case "$target" in |
7935dc1b EB |
15104 | sparc*-sun-solaris2.[56789]*) |
15105 | # TLS was introduced in the Solaris 9 4/04 release but | |
15106 | # we do not enable it by default on Solaris 9 either. | |
15107 | if test "x$enable_tls" = xyes ; then | |
15108 | on_solaris=yes | |
15109 | else | |
15110 | enable_tls=no; | |
15111 | fi | |
15112 | ;; | |
2f3321ca EB |
15113 | sparc*-sun-solaris2.*) |
15114 | on_solaris=yes | |
15115 | ;; | |
15116 | *) | |
15117 | on_solaris=no | |
15118 | ;; | |
15119 | esac | |
15120 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
15121 | conftest_s=' | |
15122 | .section ".tdata",#alloc,#write,#tls | |
15123 | foo: .long 25 | |
15124 | .text | |
15125 | sethi %tgd_hi22(foo), %o0 | |
15126 | add %o0, %tgd_lo10(foo), %o1 | |
15127 | add %l7, %o1, %o0, %tgd_add(foo) | |
15128 | call __tls_get_addr, %tgd_call(foo) | |
15129 | sethi %tldm_hi22(foo), %l1 | |
15130 | add %l1, %tldm_lo10(foo), %l2 | |
15131 | add %l7, %l2, %o0, %tldm_add(foo) | |
15132 | call __tls_get_addr, %tldm_call(foo) | |
15133 | sethi %tldo_hix22(foo), %l3 | |
15134 | xor %l3, %tldo_lox10(foo), %l4 | |
15135 | add %o0, %l4, %l5, %tldo_add(foo) | |
15136 | sethi %tie_hi22(foo), %o3 | |
15137 | add %o3, %tie_lo10(foo), %o3 | |
15138 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
15139 | add %g7, %o2, %o4, %tie_add(foo) | |
15140 | sethi %tle_hix22(foo), %l1 | |
15141 | xor %l1, %tle_lox10(foo), %o5 | |
15142 | ld [%g7 + %o5], %o1' | |
15143 | tls_first_major=0 | |
15144 | tls_first_minor=0 | |
15145 | else | |
15146 | conftest_s=' | |
5751a10b JJ |
15147 | .section ".tdata","awT",@progbits |
15148 | foo: .long 25 | |
15149 | .text | |
15150 | sethi %tgd_hi22(foo), %o0 | |
15151 | add %o0, %tgd_lo10(foo), %o1 | |
15152 | add %l7, %o1, %o0, %tgd_add(foo) | |
15153 | call __tls_get_addr, %tgd_call(foo) | |
15154 | sethi %tldm_hi22(foo), %l1 | |
15155 | add %l1, %tldm_lo10(foo), %l2 | |
15156 | add %l7, %l2, %o0, %tldm_add(foo) | |
15157 | call __tls_get_addr, %tldm_call(foo) | |
15158 | sethi %tldo_hix22(foo), %l3 | |
15159 | xor %l3, %tldo_lox10(foo), %l4 | |
15160 | add %o0, %l4, %l5, %tldo_add(foo) | |
15161 | sethi %tie_hi22(foo), %o3 | |
15162 | add %o3, %tie_lo10(foo), %o3 | |
15163 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
15164 | add %g7, %o2, %o4, %tie_add(foo) | |
15165 | sethi %tle_hix22(foo), %l1 | |
15166 | xor %l1, %tle_lox10(foo), %o5 | |
15167 | ld [%g7 + %o5], %o1' | |
15168 | tls_first_major=2 | |
15169 | tls_first_minor=14 | |
2f3321ca EB |
15170 | tls_as_opt="-32 --fatal-warnings" |
15171 | fi | |
5751a10b | 15172 | ;; |
f996902d | 15173 | esac |
8dea1cca DD |
15174 | set_have_as_tls=no |
15175 | if test "x$enable_tls" = xno ; then | |
15176 | : # TLS explicitly disabled. | |
15177 | elif test "x$enable_tls" = xyes ; then | |
15178 | set_have_as_tls=yes # TLS explicitly enabled. | |
15179 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
15180 | : # If we don't have a check, assume no support. |
15181 | else | |
ab22c1fa CF |
15182 | { echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
15183 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6; } | |
ba479fd2 NN |
15184 | if test "${gcc_cv_as_tls+set}" = set; then |
15185 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15186 | else |
15187 | gcc_cv_as_tls=no | |
15188 | if test $in_tree_gas = yes; then | |
15189 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
15190 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 15191 | fi |
8ada417f | 15192 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15193 | echo "$conftest_s" > conftest.s |
2f3321ca | 15194 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
15195 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15196 | (eval $ac_try) 2>&5 | |
15197 | ac_status=$? | |
15198 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15199 | (exit $ac_status); }; } | |
8ada417f ZW |
15200 | then |
15201 | gcc_cv_as_tls=yes | |
15202 | else | |
15203 | echo "configure: failed program was" >&5 | |
15204 | cat conftest.s >&5 | |
15205 | fi | |
15206 | rm -f conftest.o conftest.s | |
f996902d | 15207 | fi |
f996902d | 15208 | fi |
ab22c1fa CF |
15209 | { echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
15210 | echo "${ECHO_T}$gcc_cv_as_tls" >&6; } | |
63cf211a | 15211 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
15212 | set_have_as_tls=yes |
15213 | fi | |
15214 | fi | |
15215 | if test $set_have_as_tls = yes ; then | |
ba479fd2 NN |
15216 | |
15217 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 15218 | #define HAVE_AS_TLS 1 |
ba479fd2 | 15219 | _ACEOF |
f996902d | 15220 | |
8ada417f ZW |
15221 | fi |
15222 | ||
15223 | # Target-specific assembler checks. | |
f996902d | 15224 | |
ab22c1fa CF |
15225 | { echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
15226 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6; } | |
7e9d8517 L |
15227 | gcc_cv_ld_static_dynamic=no |
15228 | if test $in_tree_ld = yes ; then | |
15229 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
15230 | gcc_cv_ld_static_dynamic=yes | |
15231 | fi | |
15232 | elif test x$gcc_cv_ld != x; then | |
15233 | # Check if linker supports -Bstatic/-Bdynamic option | |
15234 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
15235 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
15236 | gcc_cv_ld_static_dynamic=yes | |
15237 | fi | |
15238 | fi | |
15239 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
15240 | ||
15241 | cat >>confdefs.h <<\_ACEOF | |
15242 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
15243 | _ACEOF | |
15244 | ||
15245 | fi | |
ab22c1fa CF |
15246 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 |
15247 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6; } | |
7e9d8517 | 15248 | |
d594623a | 15249 | if test x"$demangler_in_ld" = xyes; then |
ab22c1fa CF |
15250 | { echo "$as_me:$LINENO: checking linker --demangle support" >&5 |
15251 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6; } | |
d594623a L |
15252 | gcc_cv_ld_demangle=no |
15253 | if test $in_tree_ld = yes; then | |
15254 | 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 \ | |
15255 | gcc_cv_ld_demangle=yes | |
15256 | fi | |
15257 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
15258 | # Check if the GNU linker supports --demangle option | |
15259 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
15260 | gcc_cv_ld_demangle=yes | |
15261 | fi | |
15262 | fi | |
15263 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
15264 | ||
15265 | cat >>confdefs.h <<\_ACEOF | |
15266 | #define HAVE_LD_DEMANGLE 1 | |
15267 | _ACEOF | |
15268 | ||
15269 | fi | |
ab22c1fa CF |
15270 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 |
15271 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6; } | |
d594623a L |
15272 | fi |
15273 | ||
3a37b08e RH |
15274 | case "$target" in |
15275 | # All TARGET_ABI_OSF targets. | |
15276 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ab22c1fa CF |
15277 | { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15278 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; } | |
ba479fd2 NN |
15279 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then |
15280 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 15281 | else |
8ada417f ZW |
15282 | gcc_cv_as_alpha_explicit_relocs=no |
15283 | if test $in_tree_gas = yes; then | |
15284 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
15285 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 15286 | fi |
8ada417f | 15287 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15288 | echo ' .set nomacro |
3a37b08e RH |
15289 | .text |
15290 | extbl $3, $2, $3 !lituse_bytoff!1 | |
15291 | ldq $2, a($29) !literal!1 | |
15292 | ldq $4, b($29) !literal!2 | |
15293 | ldq_u $3, 0($2) !lituse_base!1 | |
15294 | ldq $27, f($29) !literal!5 | |
15295 | jsr $26, ($27), f !lituse_jsr!5 | |
15296 | ldah $29, 0($26) !gpdisp!3 | |
15297 | lda $0, c($29) !gprel | |
15298 | ldah $1, d($29) !gprelhigh | |
15299 | lda $1, d($1) !gprellow | |
8ada417f | 15300 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
15301 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15302 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15303 | (eval $ac_try) 2>&5 | |
15304 | ac_status=$? | |
15305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15306 | (exit $ac_status); }; } | |
8ada417f ZW |
15307 | then |
15308 | gcc_cv_as_alpha_explicit_relocs=yes | |
15309 | else | |
15310 | echo "configure: failed program was" >&5 | |
15311 | cat conftest.s >&5 | |
15312 | fi | |
15313 | rm -f conftest.o conftest.s | |
15314 | fi | |
cafe096b | 15315 | fi |
ab22c1fa CF |
15316 | { echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
15317 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6; } | |
63cf211a | 15318 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
15319 | |
15320 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 15321 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 15322 | _ACEOF |
3a37b08e | 15323 | |
d006f5eb | 15324 | fi |
ab22c1fa CF |
15325 | { echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 |
15326 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6; } | |
d006f5eb RH |
15327 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then |
15328 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15329 | else | |
15330 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
15331 | if test $in_tree_gas = yes; then | |
15332 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
15333 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
15334 | fi | |
15335 | elif test x$gcc_cv_as != x; then | |
15336 | echo ' .set nomacro | |
15337 | .text | |
15338 | ldq $27, a($29) !literal!1 | |
15339 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
15340 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15341 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15342 | (eval $ac_try) 2>&5 | |
15343 | ac_status=$? | |
15344 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15345 | (exit $ac_status); }; } | |
15346 | then | |
15347 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
15348 | else | |
15349 | echo "configure: failed program was" >&5 | |
15350 | cat conftest.s >&5 | |
15351 | fi | |
15352 | rm -f conftest.o conftest.s | |
15353 | fi | |
15354 | fi | |
ab22c1fa CF |
15355 | { echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 |
15356 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6; } | |
d006f5eb RH |
15357 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then |
15358 | ||
15359 | cat >>confdefs.h <<\_ACEOF | |
15360 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
15361 | _ACEOF | |
15362 | ||
86da66b5 HPN |
15363 | fi |
15364 | ;; | |
15365 | ||
15366 | cris-*-*) | |
ab22c1fa CF |
15367 | { echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 |
15368 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6; } | |
86da66b5 HPN |
15369 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then |
15370 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15371 | else | |
15372 | gcc_cv_as_cris_no_mul_bug=no | |
15373 | if test $in_tree_gas = yes; then | |
15374 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
15375 | then gcc_cv_as_cris_no_mul_bug=yes | |
15376 | fi | |
15377 | elif test x$gcc_cv_as != x; then | |
15378 | echo '.text' > conftest.s | |
15379 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
15380 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15381 | (eval $ac_try) 2>&5 | |
15382 | ac_status=$? | |
15383 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15384 | (exit $ac_status); }; } | |
15385 | then | |
15386 | gcc_cv_as_cris_no_mul_bug=yes | |
15387 | else | |
15388 | echo "configure: failed program was" >&5 | |
15389 | cat conftest.s >&5 | |
15390 | fi | |
15391 | rm -f conftest.o conftest.s | |
15392 | fi | |
15393 | fi | |
ab22c1fa CF |
15394 | { echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 |
15395 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6; } | |
86da66b5 HPN |
15396 | if test $gcc_cv_as_cris_no_mul_bug = yes; then |
15397 | ||
15398 | cat >>confdefs.h <<\_ACEOF | |
15399 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
15400 | _ACEOF | |
15401 | ||
8ada417f | 15402 | fi |
3a37b08e | 15403 | ;; |
8ada417f | 15404 | |
1cb36a98 | 15405 | sparc*-*-*) |
ab22c1fa CF |
15406 | { echo "$as_me:$LINENO: checking assembler for .register" >&5 |
15407 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6; } | |
ba479fd2 NN |
15408 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then |
15409 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15410 | else |
8ada417f ZW |
15411 | gcc_cv_as_sparc_register_op=no |
15412 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15413 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
15414 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15415 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15416 | (eval $ac_try) 2>&5 | |
15417 | ac_status=$? | |
15418 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15419 | (exit $ac_status); }; } | |
8ada417f ZW |
15420 | then |
15421 | gcc_cv_as_sparc_register_op=yes | |
15422 | else | |
15423 | echo "configure: failed program was" >&5 | |
15424 | cat conftest.s >&5 | |
15425 | fi | |
15426 | rm -f conftest.o conftest.s | |
15427 | fi | |
cafe096b | 15428 | fi |
ab22c1fa CF |
15429 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
15430 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6; } | |
63cf211a | 15431 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
15432 | |
15433 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15434 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 15435 | _ACEOF |
1cb36a98 | 15436 | |
8ada417f | 15437 | fi |
1cb36a98 | 15438 | |
ab22c1fa CF |
15439 | { echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
15440 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6; } | |
ba479fd2 NN |
15441 | if test "${gcc_cv_as_sparc_relax+set}" = set; then |
15442 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 15443 | else |
8ada417f ZW |
15444 | gcc_cv_as_sparc_relax=no |
15445 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15446 | echo '.text' > conftest.s |
ba479fd2 NN |
15447 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
15448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15449 | (eval $ac_try) 2>&5 | |
15450 | ac_status=$? | |
15451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15452 | (exit $ac_status); }; } | |
8ada417f ZW |
15453 | then |
15454 | gcc_cv_as_sparc_relax=yes | |
15455 | else | |
15456 | echo "configure: failed program was" >&5 | |
15457 | cat conftest.s >&5 | |
15458 | fi | |
15459 | rm -f conftest.o conftest.s | |
15460 | fi | |
cafe096b | 15461 | fi |
ab22c1fa CF |
15462 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
15463 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6; } | |
63cf211a | 15464 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
15465 | |
15466 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 15467 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 15468 | _ACEOF |
e95b1e6a | 15469 | |
8ada417f | 15470 | fi |
e95b1e6a | 15471 | |
ab22c1fa CF |
15472 | { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
15473 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6; } | |
ba479fd2 NN |
15474 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then |
15475 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 15476 | else |
8ada417f ZW |
15477 | gcc_cv_as_sparc_ua_pcrel=no |
15478 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15479 | echo '.text |
8ada417f ZW |
15480 | foo: |
15481 | nop | |
15482 | .data | |
15483 | .align 4 | |
15484 | .byte 0 | |
15485 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
15486 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15487 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15488 | (eval $ac_try) 2>&5 | |
15489 | ac_status=$? | |
15490 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15491 | (exit $ac_status); }; } | |
8ada417f ZW |
15492 | then |
15493 | if test x$gcc_cv_ld != x \ | |
15494 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
15495 | gcc_cv_as_sparc_ua_pcrel=yes | |
15496 | fi | |
15497 | rm -f conftest | |
15498 | else | |
15499 | echo "configure: failed program was" >&5 | |
15500 | cat conftest.s >&5 | |
15501 | fi | |
15502 | rm -f conftest.o conftest.s | |
15503 | fi | |
cafe096b | 15504 | fi |
ab22c1fa CF |
15505 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
15506 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6; } | |
63cf211a | 15507 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
15508 | |
15509 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 15510 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 15511 | _ACEOF |
17e9e88c | 15512 | |
17e9e88c | 15513 | |
ab22c1fa CF |
15514 | { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
15515 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6; } | |
ba479fd2 NN |
15516 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then |
15517 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 15518 | else |
8ada417f ZW |
15519 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
15520 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15521 | echo '.data |
8ada417f ZW |
15522 | .align 4 |
15523 | .byte 0x31 | |
15524 | .uaword %r_disp32(foo) | |
15525 | .byte 0x32, 0x33, 0x34 | |
15526 | .global foo | |
15527 | .hidden foo | |
15528 | foo: | |
15529 | .skip 4' > conftest.s | |
ba479fd2 NN |
15530 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15531 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15532 | (eval $ac_try) 2>&5 | |
15533 | ac_status=$? | |
15534 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15535 | (exit $ac_status); }; } | |
8ada417f ZW |
15536 | then |
15537 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
15538 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
15539 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
15540 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
15541 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
15542 | | grep 'DISP32' > /dev/null 2>&1; then | |
15543 | : | |
15544 | else | |
15545 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 15546 | fi |
8ada417f ZW |
15547 | fi |
15548 | rm -f conftest | |
15549 | else | |
15550 | echo "configure: failed program was" >&5 | |
15551 | cat conftest.s >&5 | |
15552 | fi | |
15553 | rm -f conftest.o conftest.s | |
15554 | fi | |
cafe096b | 15555 | fi |
ab22c1fa CF |
15556 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
15557 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; } | |
63cf211a | 15558 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
15559 | |
15560 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 15561 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 15562 | _ACEOF |
cf7b8b0d | 15563 | |
8ada417f | 15564 | fi |
ba479fd2 | 15565 | |
8ada417f | 15566 | fi # unaligned pcrel relocs |
cf7b8b0d | 15567 | |
ab22c1fa CF |
15568 | { echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
15569 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6; } | |
ba479fd2 NN |
15570 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then |
15571 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15572 | else |
8ada417f ZW |
15573 | gcc_cv_as_sparc_offsetable_lo10=no |
15574 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15575 | echo '.text |
8ada417f ZW |
15576 | or %g1, %lo(ab) + 12, %g1 |
15577 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
15578 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
15579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15580 | (eval $ac_try) 2>&5 | |
15581 | ac_status=$? | |
15582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15583 | (exit $ac_status); }; } | |
8ada417f ZW |
15584 | then |
15585 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 15586 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 15587 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 15588 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
15589 | fi |
15590 | else | |
15591 | echo "configure: failed program was" >&5 | |
15592 | cat conftest.s >&5 | |
15593 | fi | |
15594 | rm -f conftest.o conftest.s | |
15595 | fi | |
cafe096b | 15596 | fi |
ab22c1fa CF |
15597 | { echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
15598 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6; } | |
63cf211a | 15599 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
15600 | |
15601 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15602 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 15603 | _ACEOF |
1cb36a98 | 15604 | |
8ada417f | 15605 | fi |
1cb36a98 RH |
15606 | ;; |
15607 | ||
c307e6dd | 15608 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
15609 | case $target_os in |
15610 | cygwin* | pe | mingw32*) | |
15611 | # Used for DWARF 2 in PE | |
ab22c1fa CF |
15612 | { echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 |
15613 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6; } | |
d38bc601 BF |
15614 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then |
15615 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15616 | else | |
15617 | gcc_cv_as_ix86_pe_secrel32=no | |
15618 | if test $in_tree_gas = yes; then | |
15619 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
15620 | then gcc_cv_as_ix86_pe_secrel32=yes | |
15621 | fi | |
15622 | elif test x$gcc_cv_as != x; then | |
15623 | echo '.text | |
15624 | foo: nop | |
15625 | .data | |
15626 | .secrel32 foo' > conftest.s | |
15627 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15628 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15629 | (eval $ac_try) 2>&5 | |
15630 | ac_status=$? | |
15631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15632 | (exit $ac_status); }; } | |
15633 | then | |
15634 | if test x$gcc_cv_ld != x \ | |
15635 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
15636 | gcc_cv_as_ix86_pe_secrel32=yes | |
15637 | fi | |
15638 | rm -f conftest | |
15639 | else | |
15640 | echo "configure: failed program was" >&5 | |
15641 | cat conftest.s >&5 | |
15642 | fi | |
15643 | rm -f conftest.o conftest.s | |
15644 | fi | |
15645 | fi | |
ab22c1fa CF |
15646 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 |
15647 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6; } | |
d38bc601 BF |
15648 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then |
15649 | ||
15650 | cat >>confdefs.h <<\_ACEOF | |
15651 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
15652 | _ACEOF | |
15653 | ||
15654 | fi | |
15655 | ;; | |
15656 | esac | |
15657 | ||
ab22c1fa CF |
15658 | { echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
15659 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6; } | |
ba479fd2 NN |
15660 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then |
15661 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15662 | else |
15663 | gcc_cv_as_ix86_filds_fists=no | |
15664 | if test $in_tree_gas = yes; then | |
15665 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
15666 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 15667 | fi |
8ada417f | 15668 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15669 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
15670 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15671 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15672 | (eval $ac_try) 2>&5 | |
15673 | ac_status=$? | |
15674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15675 | (exit $ac_status); }; } | |
8ada417f ZW |
15676 | then |
15677 | gcc_cv_as_ix86_filds_fists=yes | |
15678 | else | |
15679 | echo "configure: failed program was" >&5 | |
15680 | cat conftest.s >&5 | |
981d4858 | 15681 | fi |
8ada417f ZW |
15682 | rm -f conftest.o conftest.s |
15683 | fi | |
15684 | fi | |
ab22c1fa CF |
15685 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
15686 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6; } | |
63cf211a | 15687 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
15688 | |
15689 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 15690 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 15691 | _ACEOF |
ad9c4d9f | 15692 | |
f6f5dff2 RO |
15693 | fi |
15694 | ||
ab22c1fa CF |
15695 | { echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
15696 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6; } | |
ba479fd2 NN |
15697 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then |
15698 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
15699 | else |
15700 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
15701 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15702 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
15703 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15705 | (eval $ac_try) 2>&5 | |
15706 | ac_status=$? | |
15707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15708 | (exit $ac_status); }; } | |
f6f5dff2 RO |
15709 | then |
15710 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
15711 | else | |
15712 | echo "configure: failed program was" >&5 | |
15713 | cat conftest.s >&5 | |
15714 | fi | |
15715 | rm -f conftest.o conftest.s | |
15716 | fi | |
15717 | fi | |
ab22c1fa CF |
15718 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
15719 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6; } | |
63cf211a | 15720 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
15721 | |
15722 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 15723 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 15724 | _ACEOF |
f6f5dff2 | 15725 | |
b6c03bcd RS |
15726 | fi |
15727 | ||
ab22c1fa CF |
15728 | { echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5 |
15729 | echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6; } | |
b6c03bcd RS |
15730 | if test "${gcc_cv_as_ix86_ffreep+set}" = set; then |
15731 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15732 | else | |
15733 | gcc_cv_as_ix86_ffreep=no | |
15734 | if test x$gcc_cv_as != x; then | |
15735 | echo 'ffreep %st(1)' > conftest.s | |
15736 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15737 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15738 | (eval $ac_try) 2>&5 | |
15739 | ac_status=$? | |
15740 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15741 | (exit $ac_status); }; } | |
15742 | then | |
15743 | gcc_cv_as_ix86_ffreep=yes | |
15744 | else | |
15745 | echo "configure: failed program was" >&5 | |
15746 | cat conftest.s >&5 | |
15747 | fi | |
15748 | rm -f conftest.o conftest.s | |
15749 | fi | |
15750 | fi | |
ab22c1fa CF |
15751 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5 |
15752 | echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6; } | |
b6c03bcd RS |
15753 | if test $gcc_cv_as_ix86_ffreep = yes; then |
15754 | ||
15755 | cat >>confdefs.h <<\_ACEOF | |
15756 | #define HAVE_AS_IX86_FFREEP 1 | |
15757 | _ACEOF | |
15758 | ||
38ca3765 UB |
15759 | fi |
15760 | ||
ab22c1fa CF |
15761 | { echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5 |
15762 | echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6; } | |
38ca3765 UB |
15763 | if test "${gcc_cv_as_ix86_sahf+set}" = set; then |
15764 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15765 | else | |
15766 | gcc_cv_as_ix86_sahf=no | |
15767 | if test x$gcc_cv_as != x; then | |
15768 | echo 'sahf' > conftest.s | |
15769 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15770 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15771 | (eval $ac_try) 2>&5 | |
15772 | ac_status=$? | |
15773 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15774 | (exit $ac_status); }; } | |
15775 | then | |
15776 | gcc_cv_as_ix86_sahf=yes | |
15777 | else | |
15778 | echo "configure: failed program was" >&5 | |
15779 | cat conftest.s >&5 | |
15780 | fi | |
15781 | rm -f conftest.o conftest.s | |
15782 | fi | |
15783 | fi | |
ab22c1fa CF |
15784 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5 |
15785 | echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6; } | |
38ca3765 UB |
15786 | if test $gcc_cv_as_ix86_sahf = yes; then |
15787 | ||
15788 | cat >>confdefs.h <<\_ACEOF | |
15789 | #define HAVE_AS_IX86_SAHF 1 | |
15790 | _ACEOF | |
15791 | ||
68b92f78 RS |
15792 | fi |
15793 | ||
ab22c1fa CF |
15794 | { echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5 |
15795 | echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6; } | |
68b92f78 RS |
15796 | if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then |
15797 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15798 | else | |
15799 | gcc_cv_as_ix86_diff_sect_delta=no | |
15800 | if test x$gcc_cv_as != x; then | |
15801 | echo '.section .rodata | |
15802 | .L1: | |
15803 | .long .L2-.L1 | |
15804 | .long .L3-.L1 | |
15805 | .text | |
15806 | .L3: nop | |
15807 | .L2: nop' > conftest.s | |
15808 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15809 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15810 | (eval $ac_try) 2>&5 | |
15811 | ac_status=$? | |
15812 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15813 | (exit $ac_status); }; } | |
15814 | then | |
15815 | gcc_cv_as_ix86_diff_sect_delta=yes | |
15816 | else | |
15817 | echo "configure: failed program was" >&5 | |
15818 | cat conftest.s >&5 | |
15819 | fi | |
15820 | rm -f conftest.o conftest.s | |
15821 | fi | |
15822 | fi | |
ab22c1fa CF |
15823 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5 |
15824 | echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6; } | |
68b92f78 RS |
15825 | if test $gcc_cv_as_ix86_diff_sect_delta = yes; then |
15826 | ||
15827 | cat >>confdefs.h <<\_ACEOF | |
15828 | #define HAVE_AS_IX86_DIFF_SECT_DELTA 1 | |
15829 | _ACEOF | |
15830 | ||
ad9c4d9f NN |
15831 | fi |
15832 | ||
6f3ca281 ZW |
15833 | # This one is used unconditionally by i386.[ch]; it is to be defined |
15834 | # to 1 if the feature is present, 0 otherwise. | |
ab22c1fa CF |
15835 | { echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
15836 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6; } | |
ba479fd2 NN |
15837 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then |
15838 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15839 | else |
15840 | gcc_cv_as_ix86_gotoff_in_data=no | |
15841 | if test $in_tree_gas = yes; then | |
15842 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15843 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
15844 | fi | |
15845 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15846 | echo ' .text |
f88c65f7 RH |
15847 | .L0: |
15848 | nop | |
15849 | .data | |
8ada417f | 15850 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
15851 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15852 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15853 | (eval $ac_try) 2>&5 | |
15854 | ac_status=$? | |
15855 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15856 | (exit $ac_status); }; } | |
8ada417f ZW |
15857 | then |
15858 | gcc_cv_as_ix86_gotoff_in_data=yes | |
15859 | else | |
15860 | echo "configure: failed program was" >&5 | |
15861 | cat conftest.s >&5 | |
f88c65f7 | 15862 | fi |
8ada417f ZW |
15863 | rm -f conftest.o conftest.s |
15864 | fi | |
15865 | fi | |
ab22c1fa CF |
15866 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
15867 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6; } | |
8ada417f | 15868 | |
6f3ca281 | 15869 | |
ba479fd2 | 15870 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 15871 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 15872 | _ACEOF |
f88c65f7 | 15873 | |
1cb36a98 | 15874 | ;; |
ef1ecf87 RH |
15875 | |
15876 | ia64*-*-*) | |
ab22c1fa CF |
15877 | { echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
15878 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6; } | |
ba479fd2 NN |
15879 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then |
15880 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 15881 | else |
8ada417f ZW |
15882 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
15883 | if test $in_tree_gas = yes; then | |
15884 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15885 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 15886 | fi |
8ada417f | 15887 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15888 | echo ' .text |
ef1ecf87 RH |
15889 | addl r15 = @ltoffx(x#), gp |
15890 | ;; | |
cfa9ee99 | 15891 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
15892 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15893 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15894 | (eval $ac_try) 2>&5 | |
15895 | ac_status=$? | |
15896 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15897 | (exit $ac_status); }; } | |
8ada417f | 15898 | then |
cfa9ee99 | 15899 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
15900 | else |
15901 | echo "configure: failed program was" >&5 | |
15902 | cat conftest.s >&5 | |
2c4a9cff | 15903 | fi |
8ada417f ZW |
15904 | rm -f conftest.o conftest.s |
15905 | fi | |
15906 | fi | |
ab22c1fa CF |
15907 | { echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
15908 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; } | |
63cf211a | 15909 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
15910 | |
15911 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 15912 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 15913 | _ACEOF |
8ada417f | 15914 | |
cfa9ee99 | 15915 | fi |
8ada417f | 15916 | |
2c4a9cff | 15917 | ;; |
8ada417f | 15918 | |
2c4a9cff | 15919 | powerpc*-*-*) |
8ada417f | 15920 | case $target in |
432218ba DE |
15921 | *-*-aix*) conftest_s=' .machine "pwr5" |
15922 | .csect .text[PR] | |
6b37db3c | 15923 | mfcr 3,128';; |
8af4d362 | 15924 | *-*-darwin*) |
ab22c1fa CF |
15925 | { echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 |
15926 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6; } | |
8af4d362 PB |
15927 | if test "${gcc_cv_as_machine_directive+set}" = set; then |
15928 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15929 | else | |
15930 | gcc_cv_as_machine_directive=no | |
15931 | if test x$gcc_cv_as != x; then | |
15932 | echo ' .machine ppc7400' > conftest.s | |
15933 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15934 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15935 | (eval $ac_try) 2>&5 | |
15936 | ac_status=$? | |
15937 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15938 | (exit $ac_status); }; } | |
15939 | then | |
15940 | gcc_cv_as_machine_directive=yes | |
15941 | else | |
15942 | echo "configure: failed program was" >&5 | |
15943 | cat conftest.s >&5 | |
15944 | fi | |
15945 | rm -f conftest.o conftest.s | |
15946 | fi | |
15947 | fi | |
ab22c1fa CF |
15948 | { echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 |
15949 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6; } | |
8af4d362 PB |
15950 | |
15951 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15952 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15953 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15954 | test x$build = x$target && exit 1 | |
15955 | fi | |
15956 | conftest_s=' .text | |
6b37db3c | 15957 | mfcr r3,128';; |
4c67db14 | 15958 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15959 | .text |
6b37db3c | 15960 | mfcr 3,128';; |
8ada417f | 15961 | esac |
8ada417f | 15962 | |
ab22c1fa CF |
15963 | { echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15964 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6; } | |
ba479fd2 NN |
15965 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then |
15966 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15967 | else |
8ada417f ZW |
15968 | gcc_cv_as_powerpc_mfcrf=no |
15969 | if test $in_tree_gas = yes; then | |
15970 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15971 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15972 | fi |
8ada417f | 15973 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15974 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15975 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15976 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15977 | (eval $ac_try) 2>&5 | |
15978 | ac_status=$? | |
15979 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15980 | (exit $ac_status); }; } | |
8ada417f ZW |
15981 | then |
15982 | gcc_cv_as_powerpc_mfcrf=yes | |
15983 | else | |
15984 | echo "configure: failed program was" >&5 | |
15985 | cat conftest.s >&5 | |
15986 | fi | |
15987 | rm -f conftest.o conftest.s | |
15988 | fi | |
2c4a9cff | 15989 | fi |
ab22c1fa CF |
15990 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15991 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6; } | |
63cf211a | 15992 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15993 | |
15994 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15995 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15996 | _ACEOF |
ef1ecf87 | 15997 | |
8ada417f | 15998 | fi |
432218ba DE |
15999 | |
16000 | case $target in | |
16001 | *-*-aix*) conftest_s=' .machine "pwr5" | |
16002 | .csect .text[PR] | |
16003 | popcntb 3,3';; | |
16004 | *) conftest_s=' .machine power5 | |
16005 | .text | |
16006 | popcntb 3,3';; | |
16007 | esac | |
16008 | ||
ab22c1fa CF |
16009 | { echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 |
16010 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6; } | |
432218ba DE |
16011 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then |
16012 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16013 | else | |
16014 | gcc_cv_as_powerpc_popcntb=no | |
16015 | if test $in_tree_gas = yes; then | |
16016 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
16017 | then gcc_cv_as_powerpc_popcntb=yes | |
16018 | fi | |
16019 | elif test x$gcc_cv_as != x; then | |
16020 | echo "$conftest_s" > conftest.s | |
16021 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16022 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16023 | (eval $ac_try) 2>&5 | |
16024 | ac_status=$? | |
16025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16026 | (exit $ac_status); }; } | |
16027 | then | |
16028 | gcc_cv_as_powerpc_popcntb=yes | |
16029 | else | |
16030 | echo "configure: failed program was" >&5 | |
16031 | cat conftest.s >&5 | |
16032 | fi | |
16033 | rm -f conftest.o conftest.s | |
16034 | fi | |
16035 | fi | |
ab22c1fa CF |
16036 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 |
16037 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6; } | |
432218ba DE |
16038 | if test $gcc_cv_as_powerpc_popcntb = yes; then |
16039 | ||
16040 | cat >>confdefs.h <<\_ACEOF | |
16041 | #define HAVE_AS_POPCNTB 1 | |
16042 | _ACEOF | |
16043 | ||
9719f3b7 DE |
16044 | fi |
16045 | ||
16046 | case $target in | |
16047 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
16048 | .csect .text[PR] | |
16049 | frin 1,1';; | |
1e04bfdc | 16050 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
16051 | .text |
16052 | frin 1,1';; | |
16053 | esac | |
16054 | ||
ab22c1fa CF |
16055 | { echo "$as_me:$LINENO: checking assembler for fp round support" >&5 |
16056 | echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6; } | |
9719f3b7 DE |
16057 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then |
16058 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16059 | else | |
16060 | gcc_cv_as_powerpc_fprnd=no | |
16061 | if test $in_tree_gas = yes; then | |
16062 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
16063 | then gcc_cv_as_powerpc_fprnd=yes | |
16064 | fi | |
16065 | elif test x$gcc_cv_as != x; then | |
16066 | echo "$conftest_s" > conftest.s | |
16067 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16068 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16069 | (eval $ac_try) 2>&5 | |
16070 | ac_status=$? | |
16071 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16072 | (exit $ac_status); }; } | |
16073 | then | |
16074 | gcc_cv_as_powerpc_fprnd=yes | |
16075 | else | |
16076 | echo "configure: failed program was" >&5 | |
16077 | cat conftest.s >&5 | |
16078 | fi | |
16079 | rm -f conftest.o conftest.s | |
16080 | fi | |
16081 | fi | |
ab22c1fa CF |
16082 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 |
16083 | echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6; } | |
9719f3b7 DE |
16084 | if test $gcc_cv_as_powerpc_fprnd = yes; then |
16085 | ||
16086 | cat >>confdefs.h <<\_ACEOF | |
16087 | #define HAVE_AS_FPRND 1 | |
16088 | _ACEOF | |
16089 | ||
44cd321e PS |
16090 | fi |
16091 | ||
16092 | case $target in | |
16093 | *-*-aix*) conftest_s=' .machine "pwr6" | |
16094 | .csect .text[PR] | |
16095 | mffgpr 1,3';; | |
16096 | *) conftest_s=' .machine power6 | |
16097 | .text | |
16098 | mffgpr 1,3';; | |
16099 | esac | |
16100 | ||
ab22c1fa CF |
16101 | { echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5 |
16102 | echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6; } | |
44cd321e PS |
16103 | if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then |
16104 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16105 | else | |
16106 | gcc_cv_as_powerpc_mfpgpr=no | |
16107 | if test $in_tree_gas = yes; then | |
16108 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
16109 | then gcc_cv_as_powerpc_mfpgpr=yes | |
16110 | fi | |
16111 | elif test x$gcc_cv_as != x; then | |
16112 | echo "$conftest_s" > conftest.s | |
16113 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16114 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16115 | (eval $ac_try) 2>&5 | |
16116 | ac_status=$? | |
16117 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16118 | (exit $ac_status); }; } | |
16119 | then | |
16120 | gcc_cv_as_powerpc_mfpgpr=yes | |
16121 | else | |
16122 | echo "configure: failed program was" >&5 | |
16123 | cat conftest.s >&5 | |
16124 | fi | |
16125 | rm -f conftest.o conftest.s | |
16126 | fi | |
16127 | fi | |
ab22c1fa CF |
16128 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5 |
16129 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6; } | |
44cd321e PS |
16130 | if test $gcc_cv_as_powerpc_mfpgpr = yes; then |
16131 | ||
16132 | cat >>confdefs.h <<\_ACEOF | |
16133 | #define HAVE_AS_MFPGPR 1 | |
16134 | _ACEOF | |
16135 | ||
432218ba DE |
16136 | fi |
16137 | ||
7f970b70 AM |
16138 | case $target in |
16139 | *-*-aix*) conftest_s=' .csect .text[PR] | |
16140 | LCF..0: | |
16141 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
16142 | *-*-darwin*) | |
16143 | conftest_s=' .text | |
16144 | LCF0: | |
16145 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
16146 | *) conftest_s=' .text | |
16147 | .LCF0: | |
16148 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
16149 | esac | |
16150 | ||
ab22c1fa CF |
16151 | { echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 |
16152 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6; } | |
695d8830 AS |
16153 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then |
16154 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16155 | else | |
16156 | gcc_cv_as_powerpc_rel16=no | |
16157 | if test $in_tree_gas = yes; then | |
16158 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
16159 | then gcc_cv_as_powerpc_rel16=yes | |
16160 | fi | |
16161 | elif test x$gcc_cv_as != x; then | |
16162 | echo "$conftest_s" > conftest.s | |
16163 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
16164 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16165 | (eval $ac_try) 2>&5 | |
16166 | ac_status=$? | |
16167 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16168 | (exit $ac_status); }; } | |
16169 | then | |
16170 | gcc_cv_as_powerpc_rel16=yes | |
16171 | else | |
16172 | echo "configure: failed program was" >&5 | |
16173 | cat conftest.s >&5 | |
16174 | fi | |
16175 | rm -f conftest.o conftest.s | |
16176 | fi | |
16177 | fi | |
ab22c1fa CF |
16178 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 |
16179 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6; } | |
695d8830 AS |
16180 | if test $gcc_cv_as_powerpc_rel16 = yes; then |
16181 | ||
16182 | cat >>confdefs.h <<\_ACEOF | |
16183 | #define HAVE_AS_REL16 1 | |
16184 | _ACEOF | |
16185 | ||
16186 | fi | |
16187 | ||
b639c3c2 JJ |
16188 | case $target in |
16189 | *-*-aix*) conftest_s=' .machine "pwr6" | |
16190 | .csect .text[PR] | |
16191 | cmpb 3,4,5';; | |
16192 | *) conftest_s=' .machine power6 | |
16193 | .text | |
16194 | cmpb 3,4,5';; | |
16195 | esac | |
16196 | ||
ab22c1fa CF |
16197 | { echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5 |
16198 | echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6; } | |
b639c3c2 JJ |
16199 | if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then |
16200 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16201 | else | |
16202 | gcc_cv_as_powerpc_cmpb=no | |
16203 | if test $in_tree_gas = yes; then | |
16204 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
16205 | then gcc_cv_as_powerpc_cmpb=yes | |
16206 | fi | |
16207 | elif test x$gcc_cv_as != x; then | |
16208 | echo "$conftest_s" > conftest.s | |
16209 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
16210 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16211 | (eval $ac_try) 2>&5 | |
16212 | ac_status=$? | |
16213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16214 | (exit $ac_status); }; } | |
16215 | then | |
16216 | gcc_cv_as_powerpc_cmpb=yes | |
16217 | else | |
16218 | echo "configure: failed program was" >&5 | |
16219 | cat conftest.s >&5 | |
16220 | fi | |
16221 | rm -f conftest.o conftest.s | |
16222 | fi | |
16223 | fi | |
ab22c1fa CF |
16224 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5 |
16225 | echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6; } | |
b639c3c2 JJ |
16226 | if test $gcc_cv_as_powerpc_cmpb = yes; then |
16227 | ||
16228 | cat >>confdefs.h <<\_ACEOF | |
16229 | #define HAVE_AS_CMPB 1 | |
16230 | _ACEOF | |
16231 | ||
16232 | fi | |
16233 | ||
16234 | case $target in | |
16235 | *-*-aix*) conftest_s=' .machine "pwr6" | |
16236 | .csect .text[PR] | |
0d74c0ee | 16237 | dadd 1,2,3';; |
b639c3c2 JJ |
16238 | *) conftest_s=' .machine power6 |
16239 | .text | |
0d74c0ee | 16240 | dadd 1,2,3';; |
b639c3c2 JJ |
16241 | esac |
16242 | ||
ab22c1fa CF |
16243 | { echo "$as_me:$LINENO: checking assembler for decimal float support" >&5 |
16244 | echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6; } | |
b639c3c2 JJ |
16245 | if test "${gcc_cv_as_powerpc_dfp+set}" = set; then |
16246 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16247 | else | |
16248 | gcc_cv_as_powerpc_dfp=no | |
16249 | if test $in_tree_gas = yes; then | |
16250 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
16251 | then gcc_cv_as_powerpc_dfp=yes | |
16252 | fi | |
16253 | elif test x$gcc_cv_as != x; then | |
16254 | echo "$conftest_s" > conftest.s | |
16255 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
16256 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16257 | (eval $ac_try) 2>&5 | |
16258 | ac_status=$? | |
16259 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16260 | (exit $ac_status); }; } | |
16261 | then | |
16262 | gcc_cv_as_powerpc_dfp=yes | |
16263 | else | |
16264 | echo "configure: failed program was" >&5 | |
16265 | cat conftest.s >&5 | |
16266 | fi | |
16267 | rm -f conftest.o conftest.s | |
16268 | fi | |
16269 | fi | |
ab22c1fa CF |
16270 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5 |
16271 | echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6; } | |
b639c3c2 JJ |
16272 | if test $gcc_cv_as_powerpc_dfp = yes; then |
16273 | ||
16274 | cat >>confdefs.h <<\_ACEOF | |
16275 | #define HAVE_AS_DFP 1 | |
16276 | _ACEOF | |
16277 | ||
e51917ae JM |
16278 | fi |
16279 | ||
ab22c1fa CF |
16280 | { echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5 |
16281 | echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6; } | |
e51917ae JM |
16282 | if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then |
16283 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16284 | else | |
16285 | gcc_cv_as_powerpc_gnu_attribute=no | |
16286 | if test $in_tree_gas = yes; then | |
16287 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
16288 | then gcc_cv_as_powerpc_gnu_attribute=yes | |
16289 | fi | |
16290 | elif test x$gcc_cv_as != x; then | |
16291 | echo '.gnu_attribute 4,1' > conftest.s | |
16292 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16293 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16294 | (eval $ac_try) 2>&5 | |
16295 | ac_status=$? | |
16296 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16297 | (exit $ac_status); }; } | |
16298 | then | |
16299 | gcc_cv_as_powerpc_gnu_attribute=yes | |
16300 | else | |
16301 | echo "configure: failed program was" >&5 | |
16302 | cat conftest.s >&5 | |
16303 | fi | |
16304 | rm -f conftest.o conftest.s | |
16305 | fi | |
16306 | fi | |
ab22c1fa CF |
16307 | { echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5 |
16308 | echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6; } | |
e51917ae JM |
16309 | if test $gcc_cv_as_powerpc_gnu_attribute = yes; then |
16310 | ||
16311 | cat >>confdefs.h <<\_ACEOF | |
16312 | #define HAVE_AS_GNU_ATTRIBUTE 1 | |
16313 | _ACEOF | |
16314 | ||
7f970b70 | 16315 | fi |
8ada417f ZW |
16316 | ;; |
16317 | ||
16318 | mips*-*-*) | |
ab22c1fa CF |
16319 | { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
16320 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; } | |
ba479fd2 NN |
16321 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then |
16322 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16323 | else |
16324 | gcc_cv_as_mips_explicit_relocs=no | |
16325 | if test $in_tree_gas = yes; then | |
16326 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
16327 | then gcc_cv_as_mips_explicit_relocs=yes | |
16328 | fi | |
16329 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16330 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
16331 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16332 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16333 | (eval $ac_try) 2>&5 | |
16334 | ac_status=$? | |
16335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16336 | (exit $ac_status); }; } | |
8ada417f ZW |
16337 | then |
16338 | gcc_cv_as_mips_explicit_relocs=yes | |
16339 | else | |
16340 | echo "configure: failed program was" >&5 | |
16341 | cat conftest.s >&5 | |
ef1ecf87 | 16342 | fi |
8ada417f ZW |
16343 | rm -f conftest.o conftest.s |
16344 | fi | |
16345 | fi | |
ab22c1fa CF |
16346 | { echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
16347 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6; } | |
8ada417f ZW |
16348 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
16349 | if test x$target_cpu_default = x | |
16350 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
16351 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
16352 | fi | |
4551169f | 16353 | fi |
ab22c1fa CF |
16354 | { echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5 |
16355 | echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6; } | |
4551169f RS |
16356 | if test "${gcc_cv_as_mips_no_shared+set}" = set; then |
16357 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16358 | else | |
16359 | gcc_cv_as_mips_no_shared=no | |
16360 | if test $in_tree_gas = yes; then | |
16361 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` | |
16362 | then gcc_cv_as_mips_no_shared=yes | |
16363 | fi | |
16364 | elif test x$gcc_cv_as != x; then | |
16365 | echo 'nop' > conftest.s | |
16366 | if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5' | |
16367 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16368 | (eval $ac_try) 2>&5 | |
16369 | ac_status=$? | |
16370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16371 | (exit $ac_status); }; } | |
16372 | then | |
16373 | gcc_cv_as_mips_no_shared=yes | |
16374 | else | |
16375 | echo "configure: failed program was" >&5 | |
16376 | cat conftest.s >&5 | |
16377 | fi | |
16378 | rm -f conftest.o conftest.s | |
16379 | fi | |
16380 | fi | |
ab22c1fa CF |
16381 | { echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5 |
16382 | echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6; } | |
4551169f RS |
16383 | if test $gcc_cv_as_mips_no_shared = yes; then |
16384 | ||
16385 | cat >>confdefs.h <<\_ACEOF | |
16386 | #define HAVE_AS_NO_SHARED 1 | |
16387 | _ACEOF | |
16388 | ||
dcb957d9 JM |
16389 | fi |
16390 | ||
ab22c1fa CF |
16391 | { echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5 |
16392 | echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6; } | |
dcb957d9 JM |
16393 | if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then |
16394 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16395 | else | |
16396 | gcc_cv_as_mips_gnu_attribute=no | |
16397 | if test $in_tree_gas = yes; then | |
16398 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
16399 | then gcc_cv_as_mips_gnu_attribute=yes | |
16400 | fi | |
16401 | elif test x$gcc_cv_as != x; then | |
16402 | echo '.gnu_attribute 4,1' > conftest.s | |
16403 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16404 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16405 | (eval $ac_try) 2>&5 | |
16406 | ac_status=$? | |
16407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16408 | (exit $ac_status); }; } | |
16409 | then | |
16410 | gcc_cv_as_mips_gnu_attribute=yes | |
16411 | else | |
16412 | echo "configure: failed program was" >&5 | |
16413 | cat conftest.s >&5 | |
16414 | fi | |
16415 | rm -f conftest.o conftest.s | |
16416 | fi | |
16417 | fi | |
ab22c1fa CF |
16418 | { echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5 |
16419 | echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6; } | |
dcb957d9 JM |
16420 | if test $gcc_cv_as_mips_gnu_attribute = yes; then |
16421 | ||
16422 | cat >>confdefs.h <<\_ACEOF | |
16423 | #define HAVE_AS_GNU_ATTRIBUTE 1 | |
16424 | _ACEOF | |
16425 | ||
a44380d2 JM |
16426 | fi |
16427 | ||
ab22c1fa CF |
16428 | { echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5 |
16429 | echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6; } | |
a44380d2 JM |
16430 | if test "${gcc_cv_as_mips_dtprelword+set}" = set; then |
16431 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16432 | else | |
16433 | gcc_cv_as_mips_dtprelword=no | |
16434 | if test $in_tree_gas = yes; then | |
16435 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
16436 | then gcc_cv_as_mips_dtprelword=yes | |
16437 | fi | |
16438 | elif test x$gcc_cv_as != x; then | |
16439 | echo '.section .tdata,"awT",@progbits | |
16440 | x: | |
16441 | .word 2 | |
16442 | .text | |
16443 | .dtprelword x+0x8000' > conftest.s | |
16444 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16445 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16446 | (eval $ac_try) 2>&5 | |
16447 | ac_status=$? | |
16448 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16449 | (exit $ac_status); }; } | |
16450 | then | |
16451 | gcc_cv_as_mips_dtprelword=yes | |
16452 | else | |
16453 | echo "configure: failed program was" >&5 | |
16454 | cat conftest.s >&5 | |
16455 | fi | |
16456 | rm -f conftest.o conftest.s | |
16457 | fi | |
16458 | fi | |
ab22c1fa CF |
16459 | { echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5 |
16460 | echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6; } | |
a44380d2 JM |
16461 | if test $gcc_cv_as_mips_dtprelword = yes; then |
16462 | ||
16463 | cat >>confdefs.h <<\_ACEOF | |
16464 | #define HAVE_AS_DTPRELWORD 1 | |
16465 | _ACEOF | |
16466 | ||
8ada417f | 16467 | fi |
dbad5e72 SE |
16468 | ;; |
16469 | esac | |
8ada417f | 16470 | |
dbad5e72 SE |
16471 | # Mips and HP-UX need the GNU assembler. |
16472 | # Linux on IA64 might be able to use the Intel assembler. | |
16473 | ||
16474 | case "$target" in | |
16475 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
16476 | if test x$gas_flag = xyes \ |
16477 | || test x"$host" != x"$build" \ | |
16478 | || test ! -x "$gcc_cv_as" \ | |
16479 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
16480 | : | |
16481 | else | |
16482 | echo "*** This configuration requires the GNU assembler" >&2 | |
16483 | exit 1 | |
16484 | fi | |
ef1ecf87 | 16485 | ;; |
1cb36a98 | 16486 | esac |
dbad5e72 | 16487 | |
9d147085 RH |
16488 | # ??? Not all targets support dwarf2 debug_line, even within a version |
16489 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
16490 | # info to the output file. So, as supported targets are added to gas 2.11, | |
16491 | # add some instruction here to (also) show we expect this might work. | |
16492 | # ??? Once 2.11 is released, probably need to add first known working | |
16493 | # version to the per-target configury. | |
16494 | case "$target" in | |
80486e06 | 16495 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 16496 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
714f737f | 16497 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*) |
9d147085 RH |
16498 | insn="nop" |
16499 | ;; | |
57116d8d | 16500 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
16501 | insn="nop 0" |
16502 | ;; | |
2853bc5a HPN |
16503 | mmix-*-*) |
16504 | insn="swym 0" | |
16505 | ;; | |
8ada417f ZW |
16506 | esac |
16507 | if test x"$insn" != x; then | |
16508 | conftest_s="\ | |
16509 | .file 1 \"conftest.s\" | |
16510 | .loc 1 3 0 | |
16511 | $insn" | |
ab22c1fa CF |
16512 | { echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
16513 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6; } | |
ba479fd2 NN |
16514 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then |
16515 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16516 | else |
16517 | gcc_cv_as_dwarf2_debug_line=no | |
16518 | if test $in_tree_gas = yes; then | |
16519 | if test $in_tree_gas_is_elf = yes \ | |
16520 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16521 | then gcc_cv_as_dwarf2_debug_line=yes | |
16522 | fi | |
16523 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16524 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
16525 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16526 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16527 | (eval $ac_try) 2>&5 | |
16528 | ac_status=$? | |
16529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16530 | (exit $ac_status); }; } | |
8ada417f | 16531 | then |
080a5bb0 EB |
16532 | if test x$gcc_cv_objdump != x \ |
16533 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
16534 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
16535 | gcc_cv_as_dwarf2_debug_line=yes |
16536 | fi | |
16537 | else | |
16538 | echo "configure: failed program was" >&5 | |
16539 | cat conftest.s >&5 | |
16540 | fi | |
16541 | rm -f conftest.o conftest.s | |
16542 | fi | |
16543 | fi | |
ab22c1fa CF |
16544 | { echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
16545 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6; } | |
ad9c4d9f | 16546 | |
ad9c4d9f | 16547 | |
8ada417f ZW |
16548 | # The .debug_line file table must be in the exact order that |
16549 | # we specified the files, since these indices are also used | |
16550 | # by DW_AT_decl_file. Approximate this test by testing if | |
16551 | # the assembler bitches if the same index is assigned twice. | |
ab22c1fa CF |
16552 | { echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
16553 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6; } | |
ba479fd2 NN |
16554 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then |
16555 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16556 | else |
16557 | gcc_cv_as_dwarf2_file_buggy=no | |
16558 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 16559 | echo ' .file 1 "foo.s" |
8ada417f | 16560 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
16561 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16562 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16563 | (eval $ac_try) 2>&5 | |
16564 | ac_status=$? | |
16565 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16566 | (exit $ac_status); }; } | |
8ada417f ZW |
16567 | then |
16568 | gcc_cv_as_dwarf2_file_buggy=yes | |
16569 | else | |
16570 | echo "configure: failed program was" >&5 | |
16571 | cat conftest.s >&5 | |
16572 | fi | |
16573 | rm -f conftest.o conftest.s | |
16574 | fi | |
ad9c4d9f | 16575 | fi |
ab22c1fa CF |
16576 | { echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
16577 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6; } | |
8ada417f ZW |
16578 | |
16579 | ||
16580 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
16581 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
16582 | |
16583 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 16584 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 16585 | _ACEOF |
9d147085 | 16586 | |
8ada417f | 16587 | fi |
ad9c4d9f | 16588 | |
ab22c1fa CF |
16589 | { echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
16590 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6; } | |
ba479fd2 NN |
16591 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then |
16592 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16593 | else |
16594 | gcc_cv_as_gdwarf2_flag=no | |
16595 | if test $in_tree_gas = yes; then | |
16596 | if test $in_tree_gas_is_elf = yes \ | |
16597 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16598 | then gcc_cv_as_gdwarf2_flag=yes | |
16599 | fi | |
16600 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16601 | echo "$insn" > conftest.s |
ba479fd2 NN |
16602 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
16603 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16604 | (eval $ac_try) 2>&5 | |
16605 | ac_status=$? | |
16606 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16607 | (exit $ac_status); }; } | |
8ada417f ZW |
16608 | then |
16609 | gcc_cv_as_gdwarf2_flag=yes | |
16610 | else | |
16611 | echo "configure: failed program was" >&5 | |
16612 | cat conftest.s >&5 | |
16613 | fi | |
16614 | rm -f conftest.o conftest.s | |
16615 | fi | |
ad9c4d9f | 16616 | fi |
ab22c1fa CF |
16617 | { echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
16618 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6; } | |
63cf211a | 16619 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
16620 | |
16621 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 16622 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 16623 | _ACEOF |
5f0e9ea2 GK |
16624 | |
16625 | fi | |
ad9c4d9f | 16626 | |
ab22c1fa CF |
16627 | { echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
16628 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6; } | |
ba479fd2 NN |
16629 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then |
16630 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16631 | else |
16632 | gcc_cv_as_gstabs_flag=no | |
16633 | if test $in_tree_gas = yes; then | |
16634 | if test $in_tree_gas_is_elf = yes \ | |
16635 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16636 | then gcc_cv_as_gstabs_flag=yes | |
16637 | fi | |
16638 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16639 | echo "$insn" > conftest.s |
ba479fd2 NN |
16640 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
16641 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16642 | (eval $ac_try) 2>&5 | |
16643 | ac_status=$? | |
16644 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16645 | (exit $ac_status); }; } | |
8ada417f ZW |
16646 | then |
16647 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
16648 | # and warns about it, but still exits successfully. So check for | |
16649 | # this. | |
ba479fd2 NN |
16650 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
16651 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16652 | (eval $ac_try) 2>&5 | |
16653 | ac_status=$? | |
16654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16655 | (exit $ac_status); }; } | |
8ada417f ZW |
16656 | then : |
16657 | else gcc_cv_as_gstabs_flag=yes | |
16658 | fi | |
16659 | else | |
16660 | echo "configure: failed program was" >&5 | |
16661 | cat conftest.s >&5 | |
16662 | fi | |
16663 | rm -f conftest.o conftest.s | |
16664 | fi | |
ad9c4d9f | 16665 | fi |
ab22c1fa CF |
16666 | { echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
16667 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6; } | |
63cf211a | 16668 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
16669 | |
16670 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 16671 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 16672 | _ACEOF |
5f0e9ea2 | 16673 | |
c8aea42c PB |
16674 | fi |
16675 | ||
ab22c1fa CF |
16676 | { echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5 |
16677 | echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6; } | |
c8aea42c PB |
16678 | if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then |
16679 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16680 | else | |
16681 | gcc_cv_as_debug_prefix_map_flag=no | |
16682 | if test $in_tree_gas = yes; then | |
16683 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 0` | |
16684 | then gcc_cv_as_debug_prefix_map_flag=yes | |
16685 | fi | |
16686 | elif test x$gcc_cv_as != x; then | |
16687 | echo "$insn" > conftest.s | |
16688 | if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5' | |
16689 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16690 | (eval $ac_try) 2>&5 | |
16691 | ac_status=$? | |
16692 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16693 | (exit $ac_status); }; } | |
16694 | then | |
16695 | gcc_cv_as_debug_prefix_map_flag=yes | |
16696 | else | |
16697 | echo "configure: failed program was" >&5 | |
16698 | cat conftest.s >&5 | |
16699 | fi | |
16700 | rm -f conftest.o conftest.s | |
16701 | fi | |
16702 | fi | |
ab22c1fa CF |
16703 | { echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5 |
16704 | echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6; } | |
c8aea42c PB |
16705 | if test $gcc_cv_as_debug_prefix_map_flag = yes; then |
16706 | ||
16707 | cat >>confdefs.h <<\_ACEOF | |
16708 | #define HAVE_AS_DEBUG_PREFIX_MAP 1 | |
16709 | _ACEOF | |
16710 | ||
5f0e9ea2 | 16711 | fi |
8ada417f | 16712 | fi |
5f0e9ea2 | 16713 | |
ab22c1fa CF |
16714 | { echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5 |
16715 | echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6; } | |
03943c05 AO |
16716 | if test "${gcc_cv_as_line_zero+set}" = set; then |
16717 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16718 | else | |
16719 | gcc_cv_as_line_zero=no | |
16720 | if test $in_tree_gas = yes; then | |
cf0eb7a1 AO |
16721 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91` |
16722 | then gcc_cv_as_line_zero=yes | |
03943c05 AO |
16723 | fi |
16724 | elif test "x$gcc_cv_as" != x; then | |
16725 | { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s | |
16726 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out' | |
16727 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16728 | (eval $ac_try) 2>&5 | |
16729 | ac_status=$? | |
16730 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16731 | (exit $ac_status); }; } && | |
16732 | test "x`cat conftest.out`" = x | |
16733 | then | |
16734 | gcc_cv_as_line_zero=yes | |
16735 | else | |
16736 | echo "configure: failed program was" >&5 | |
16737 | cat conftest.s >&5 | |
16738 | echo "configure: error output was" >&5 | |
16739 | cat conftest.out >&5 | |
16740 | fi | |
16741 | rm -f conftest.o conftest.s conftest.out | |
16742 | fi | |
16743 | fi | |
ab22c1fa CF |
16744 | { echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5 |
16745 | echo "${ECHO_T}$gcc_cv_as_line_zero" >&6; } | |
03943c05 AO |
16746 | if test "x$gcc_cv_as_line_zero" = xyes; then |
16747 | ||
16748 | cat >>confdefs.h <<\_ACEOF | |
16749 | #define HAVE_AS_LINE_ZERO 1 | |
16750 | _ACEOF | |
16751 | ||
16752 | fi | |
16753 | ||
ab22c1fa CF |
16754 | { echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
16755 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6; } | |
96d0f4dc | 16756 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 16757 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
16758 | 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 \ |
16759 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
16760 | gcc_cv_ld_ro_rw_mix=read-write |
16761 | fi | |
16762 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
16763 | echo '.section myfoosect, "a"' > conftest1.s |
16764 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 16765 | echo '.byte 1' >> conftest2.s |
90e145da | 16766 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 16767 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
16768 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
16769 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
16770 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 16771 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 16772 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 16773 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 16774 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
16775 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
16776 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
16777 | gcc_cv_ld_ro_rw_mix=read-only | |
16778 | else | |
16779 | gcc_cv_ld_ro_rw_mix=read-write | |
16780 | fi | |
16781 | fi | |
16782 | fi | |
16783 | rm -f conftest.* conftest[123].* | |
16784 | fi | |
16785 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
16786 | |
16787 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 16788 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 16789 | _ACEOF |
96d0f4dc JJ |
16790 | |
16791 | fi | |
ab22c1fa CF |
16792 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
16793 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6; } | |
96d0f4dc | 16794 | |
ab22c1fa CF |
16795 | { echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
16796 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6; } | |
275b60d6 | 16797 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 16798 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
16799 | 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 \ |
16800 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
16801 | gcc_cv_ld_eh_frame_hdr=yes |
16802 | fi | |
16803 | elif test x$gcc_cv_ld != x; then | |
16804 | # Check if linker supports --eh-frame-hdr option | |
16805 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
16806 | gcc_cv_ld_eh_frame_hdr=yes | |
16807 | fi | |
16808 | fi | |
232b67d9 | 16809 | |
275b60d6 | 16810 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
16811 | |
16812 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 16813 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 16814 | _ACEOF |
275b60d6 JJ |
16815 | |
16816 | fi | |
ab22c1fa CF |
16817 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
16818 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6; } | |
275b60d6 | 16819 | |
ab22c1fa CF |
16820 | { echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
16821 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6; } | |
24a4dd31 JJ |
16822 | gcc_cv_ld_pie=no |
16823 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
16824 | 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 \ |
16825 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
16826 | gcc_cv_ld_pie=yes |
16827 | fi | |
16828 | elif test x$gcc_cv_ld != x; then | |
16829 | # Check if linker supports -pie option | |
16830 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
16831 | gcc_cv_ld_pie=yes | |
16832 | fi | |
16833 | fi | |
16834 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
16835 | |
16836 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 16837 | #define HAVE_LD_PIE 1 |
ba479fd2 | 16838 | _ACEOF |
24a4dd31 JJ |
16839 | |
16840 | fi | |
ab22c1fa CF |
16841 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
16842 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6; } | |
24a4dd31 | 16843 | |
ab22c1fa CF |
16844 | { echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5 |
16845 | echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6; } | |
22ba88ef | 16846 | gcc_cv_ld_eh_gc_sections=no |
b639c3c2 JJ |
16847 | if test $in_tree_ld = yes ; then |
16848 | 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 \ | |
16849 | && test $in_tree_ld_is_elf = yes; then | |
16850 | gcc_cv_ld_eh_gc_sections=yes | |
16851 | fi | |
16852 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
16853 | cat > conftest.s <<EOF | |
16854 | .section .text | |
16855 | .globl _start | |
16856 | .type _start, @function | |
16857 | _start: | |
16858 | .long foo | |
16859 | .size _start, .-_start | |
16860 | .section .text.foo,"ax",@progbits | |
16861 | .type foo, @function | |
16862 | foo: | |
16863 | .long 0 | |
16864 | .size foo, .-foo | |
16865 | .section .gcc_except_table.foo,"a",@progbits | |
16866 | .L0: | |
16867 | .long 0 | |
16868 | .section .eh_frame,"a",@progbits | |
16869 | .long .L0 | |
16870 | EOF | |
16871 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
16872 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
16873 | | grep "gc-sections option ignored" > /dev/null; then | |
16874 | gcc_cv_ld_eh_gc_sections=no | |
16875 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
16876 | gcc_cv_ld_eh_gc_sections=yes | |
16877 | # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections. | |
16878 | if test x$gcc_cv_as_comdat_group != xyes; then | |
16879 | gcc_cv_ld_eh_gc_sections=no | |
16880 | cat > conftest.s <<EOF | |
16881 | .section .text | |
16882 | .globl _start | |
16883 | .type _start, @function | |
16884 | _start: | |
16885 | .long foo | |
16886 | .size _start, .-_start | |
16887 | .section .gnu.linkonce.t.foo,"ax",@progbits | |
16888 | .type foo, @function | |
16889 | foo: | |
16890 | .long 0 | |
16891 | .size foo, .-foo | |
16892 | .section .gcc_except_table.foo,"a",@progbits | |
16893 | .L0: | |
16894 | .long 0 | |
16895 | .section .eh_frame,"a",@progbits | |
16896 | .long .L0 | |
16897 | EOF | |
16898 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
16899 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
16900 | | grep "gc-sections option ignored" > /dev/null; then | |
16901 | gcc_cv_ld_eh_gc_sections=no | |
16902 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
16903 | gcc_cv_ld_eh_gc_sections=yes | |
16904 | fi | |
16905 | fi | |
16906 | fi | |
16907 | fi | |
16908 | fi | |
16909 | rm -f conftest.s conftest.o conftest | |
16910 | fi | |
e9d207d9 EB |
16911 | case "$target" in |
16912 | hppa*-*-linux*) | |
16913 | # ??? This apparently exposes a binutils bug with PC-relative relocations. | |
16914 | gcc_cv_ld_eh_gc_sections=no | |
16915 | ;; | |
16916 | esac | |
22ba88ef EB |
16917 | if test x$gcc_cv_ld_eh_gc_sections = xyes; then |
16918 | ||
16919 | cat >>confdefs.h <<\_ACEOF | |
16920 | #define HAVE_LD_EH_GC_SECTIONS 1 | |
16921 | _ACEOF | |
16922 | ||
16923 | fi | |
ab22c1fa CF |
16924 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5 |
16925 | echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6; } | |
22ba88ef | 16926 | |
8bb915b6 NN |
16927 | # -------- |
16928 | # UNSORTED | |
16929 | # -------- | |
16930 | ||
ab22c1fa CF |
16931 | { echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
16932 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6; } | |
82e923f6 RS |
16933 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
16934 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16935 | else | |
16936 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
16937 | if test $in_tree_ld = yes ; then |
16938 | 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 \ | |
16939 | && test $in_tree_ld_is_elf = yes; then | |
16940 | gcc_cv_ld_as_needed=yes | |
16941 | fi | |
16942 | elif test x$gcc_cv_ld != x; then | |
16943 | # Check if linker supports --as-needed and --no-as-needed options | |
16944 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
16945 | gcc_cv_ld_as_needed=yes | |
16946 | fi | |
16947 | fi | |
82e923f6 RS |
16948 | |
16949 | fi | |
ab22c1fa CF |
16950 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 |
16951 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6; } | |
765f1bf9 AM |
16952 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
16953 | ||
16954 | cat >>confdefs.h <<\_ACEOF | |
16955 | #define HAVE_LD_AS_NEEDED 1 | |
16956 | _ACEOF | |
16957 | ||
16958 | fi | |
765f1bf9 | 16959 | |
d82bf747 AM |
16960 | case "$target:$tm_file" in |
16961 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
ab22c1fa CF |
16962 | { echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
16963 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6; } | |
85b776df AM |
16964 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then |
16965 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16966 | else | |
16967 | gcc_cv_ld_no_dot_syms=no | |
16968 | if test $in_tree_ld = yes ; then | |
16969 | 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 | |
16970 | gcc_cv_ld_no_dot_syms=yes | |
16971 | fi | |
16972 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
16973 | cat > conftest1.s <<EOF | |
16974 | .text | |
16975 | bl .foo | |
16976 | EOF | |
16977 | cat > conftest2.s <<EOF | |
16978 | .section ".opd","aw" | |
16979 | .align 3 | |
16980 | .globl foo | |
16981 | .type foo,@function | |
16982 | foo: | |
16983 | .quad .LEfoo,.TOC.@tocbase,0 | |
16984 | .text | |
16985 | .LEfoo: | |
16986 | blr | |
16987 | .size foo,.-.LEfoo | |
16988 | EOF | |
16989 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
16990 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
16991 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
16992 | gcc_cv_ld_no_dot_syms=yes | |
16993 | fi | |
16994 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
16995 | fi | |
16996 | ||
16997 | fi | |
ab22c1fa CF |
16998 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 |
16999 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6; } | |
85b776df AM |
17000 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then |
17001 | ||
17002 | cat >>confdefs.h <<\_ACEOF | |
17003 | #define HAVE_LD_NO_DOT_SYMS 1 | |
17004 | _ACEOF | |
17005 | ||
17006 | fi | |
17007 | ;; | |
17008 | esac | |
17009 | ||
ab22c1fa CF |
17010 | { echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
17011 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6; } | |
380e5ca4 MM |
17012 | if test "${gcc_cv_ld_sysroot+set}" = set; then |
17013 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17014 | else | |
17015 | gcc_cv_ld_sysroot=no | |
17016 | if test $in_tree_ld = yes ; then | |
17017 | 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 | 17018 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
17019 | fi |
17020 | elif test x$gcc_cv_ld != x; then | |
17021 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
17022 | gcc_cv_ld_sysroot=yes | |
17023 | fi | |
17024 | fi | |
17025 | fi | |
ab22c1fa CF |
17026 | { echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 |
17027 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6; } | |
380e5ca4 MM |
17028 | if test x"$gcc_cv_ld_sysroot" = xyes; then |
17029 | ||
17030 | cat >>confdefs.h <<\_ACEOF | |
17031 | #define HAVE_LD_SYSROOT 1 | |
17032 | _ACEOF | |
17033 | ||
17034 | fi | |
17035 | ||
9fb28a67 | 17036 | if test x$with_sysroot = x && test x$host = x$target \ |
c794c06f CD |
17037 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ |
17038 | && test "$prefix" != "NONE"; then | |
ba479fd2 NN |
17039 | |
17040 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 17041 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 17042 | _ACEOF |
793e9558 PB |
17043 | |
17044 | fi | |
17045 | ||
77008252 | 17046 | # Test for stack protector support in target C library. |
ab22c1fa CF |
17047 | { echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5 |
17048 | echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6; } | |
77008252 JJ |
17049 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then |
17050 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17051 | else | |
17052 | gcc_cv_libc_provides_ssp=no | |
a6ccdbab EC |
17053 | case "$target" in |
17054 | *-*-linux*) | |
77008252 JJ |
17055 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then |
17056 | if test "x$with_sysroot" = x; then | |
17057 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
c9ecbf86 JM |
17058 | elif test "x$with_build_sysroot" != "x"; then |
17059 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
77008252 JJ |
17060 | elif test "x$with_sysroot" = xyes; then |
17061 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
17062 | else | |
17063 | glibc_header_dir="${with_sysroot}/usr/include" | |
17064 | fi | |
17065 | else | |
17066 | glibc_header_dir=/usr/include | |
17067 | fi | |
17068 | # glibc 2.4 and later provides __stack_chk_fail and | |
17069 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
17070 | if test -f $glibc_header_dir/features.h \ | |
17071 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
17072 | $glibc_header_dir/features.h > /dev/null; then | |
17073 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
17074 | $glibc_header_dir/features.h > /dev/null; then | |
17075 | gcc_cv_libc_provides_ssp=yes | |
17076 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
17077 | $glibc_header_dir/features.h > /dev/null \ | |
17078 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
17079 | $glibc_header_dir/features.h > /dev/null; then | |
17080 | gcc_cv_libc_provides_ssp=yes | |
17081 | fi | |
a6ccdbab EC |
17082 | fi |
17083 | ;; | |
17084 | *-*-darwin*) | |
ab22c1fa CF |
17085 | { echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5 |
17086 | echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6; } | |
a6ccdbab EC |
17087 | if test "${ac_cv_func___stack_chk_fail+set}" = set; then |
17088 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17089 | else | |
17090 | cat >conftest.$ac_ext <<_ACEOF | |
17091 | /* confdefs.h. */ | |
17092 | _ACEOF | |
17093 | cat confdefs.h >>conftest.$ac_ext | |
17094 | cat >>conftest.$ac_ext <<_ACEOF | |
17095 | /* end confdefs.h. */ | |
17096 | /* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail. | |
17097 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
17098 | #define __stack_chk_fail innocuous___stack_chk_fail | |
17099 | ||
17100 | /* System header to define __stub macros and hopefully few prototypes, | |
17101 | which can conflict with char __stack_chk_fail (); below. | |
17102 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
17103 | <limits.h> exists even on freestanding compilers. */ | |
17104 | ||
17105 | #ifdef __STDC__ | |
17106 | # include <limits.h> | |
17107 | #else | |
17108 | # include <assert.h> | |
17109 | #endif | |
17110 | ||
17111 | #undef __stack_chk_fail | |
17112 | ||
ab22c1fa CF |
17113 | /* Override any GCC internal prototype to avoid an error. |
17114 | Use char because int might match the return type of a GCC | |
17115 | builtin and then its argument prototype would still apply. */ | |
a6ccdbab EC |
17116 | #ifdef __cplusplus |
17117 | extern "C" | |
17118 | #endif | |
17119 | char __stack_chk_fail (); | |
17120 | /* The GNU C library defines this for functions which it implements | |
17121 | to always fail with ENOSYS. Some functions are actually named | |
17122 | something starting with __ and the normal name is an alias. */ | |
ab22c1fa | 17123 | #if defined __stub___stack_chk_fail || defined __stub_____stack_chk_fail |
a6ccdbab EC |
17124 | choke me |
17125 | #endif | |
17126 | ||
17127 | int | |
17128 | main () | |
17129 | { | |
ab22c1fa | 17130 | return __stack_chk_fail (); |
a6ccdbab EC |
17131 | ; |
17132 | return 0; | |
17133 | } | |
17134 | _ACEOF | |
17135 | rm -f conftest.$ac_objext conftest$ac_exeext | |
ab22c1fa CF |
17136 | if { (ac_try="$ac_link" |
17137 | case "(($ac_try" in | |
17138 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
17139 | *) ac_try_echo=$ac_try;; | |
17140 | esac | |
17141 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | |
17142 | (eval "$ac_link") 2>conftest.er1 | |
a6ccdbab EC |
17143 | ac_status=$? |
17144 | grep -v '^ *+' conftest.er1 >conftest.err | |
17145 | rm -f conftest.er1 | |
17146 | cat conftest.err >&5 | |
17147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
ab22c1fa CF |
17148 | (exit $ac_status); } && { |
17149 | test -z "$ac_c_werror_flag" || | |
17150 | test ! -s conftest.err | |
17151 | } && test -s conftest$ac_exeext && | |
17152 | $as_test_x conftest$ac_exeext; then | |
8b1f719a PB |
17153 | ac_cv_func___stack_chk_fail=yes |
17154 | else | |
a6ccdbab EC |
17155 | echo "$as_me: failed program was:" >&5 |
17156 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17157 | ||
ab22c1fa | 17158 | ac_cv_func___stack_chk_fail=no |
a6ccdbab | 17159 | fi |
ab22c1fa CF |
17160 | |
17161 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
a6ccdbab EC |
17162 | conftest$ac_exeext conftest.$ac_ext |
17163 | fi | |
ab22c1fa CF |
17164 | { echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5 |
17165 | echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6; } | |
a6ccdbab EC |
17166 | if test $ac_cv_func___stack_chk_fail = yes; then |
17167 | gcc_cv_libc_provides_ssp=yes | |
17168 | else | |
17169 | echo "no __stack_chk_fail on this target" | |
77008252 | 17170 | fi |
a6ccdbab EC |
17171 | |
17172 | ;; | |
77008252 | 17173 | *) gcc_cv_libc_provides_ssp=no ;; |
a6ccdbab EC |
17174 | esac |
17175 | fi | |
ab22c1fa CF |
17176 | { echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 |
17177 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6; } | |
a6ccdbab | 17178 | |
77008252 JJ |
17179 | if test x$gcc_cv_libc_provides_ssp = xyes; then |
17180 | ||
17181 | cat >>confdefs.h <<\_ACEOF | |
17182 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
17183 | _ACEOF | |
17184 | ||
17185 | fi | |
17186 | ||
ed965309 JJ |
17187 | # Check if TFmode long double should be used by default or not. |
17188 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
17189 | # and later they can use TFmode. | |
17190 | case "$target" in | |
f7cc5390 JM |
17191 | powerpc*-*-linux* | \ |
17192 | powerpc*-*-gnu* | \ | |
ed965309 JJ |
17193 | sparc*-*-linux* | \ |
17194 | s390*-*-linux* | \ | |
17195 | alpha*-*-linux*) | |
17196 | ||
ab22c1fa | 17197 | # Check whether --with-long-double-128 was given. |
ed965309 | 17198 | if test "${with_long_double_128+set}" = set; then |
ab22c1fa | 17199 | withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128" |
ed965309 JJ |
17200 | else |
17201 | gcc_cv_target_ldbl128=no | |
17202 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
17203 | if test "x$with_sysroot" = x; then | |
17204 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
c9ecbf86 JM |
17205 | elif test "x$with_build_sysroot" != "x"; then |
17206 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
ed965309 JJ |
17207 | elif test "x$with_sysroot" = xyes; then |
17208 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
17209 | else | |
17210 | glibc_header_dir="${with_sysroot}/usr/include" | |
17211 | fi | |
17212 | else | |
17213 | glibc_header_dir=/usr/include | |
17214 | fi | |
65280f6c | 17215 | grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ |
ed965309 JJ |
17216 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ |
17217 | && gcc_cv_target_ldbl128=yes | |
65280f6c | 17218 | |
ab22c1fa CF |
17219 | fi |
17220 | ||
ed965309 JJ |
17221 | ;; |
17222 | esac | |
17223 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
17224 | ||
17225 | cat >>confdefs.h <<\_ACEOF | |
17226 | #define TARGET_DEFAULT_LONG_DOUBLE_128 1 | |
17227 | _ACEOF | |
17228 | ||
17229 | fi | |
17230 | ||
81bf3d9e | 17231 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 17232 | |
ab22c1fa | 17233 | # Check whether --with-gc was given. |
81bf3d9e | 17234 | if test "${with_gc+set}" = set; then |
ab22c1fa | 17235 | withval=$with_gc; case "$withval" in |
08cee789 | 17236 | page) |
81bf3d9e | 17237 | GGC=ggc-$withval |
08cee789 DJ |
17238 | ;; |
17239 | zone) | |
17240 | GGC=ggc-$withval | |
17241 | ||
17242 | cat >>confdefs.h <<\_ACEOF | |
17243 | #define GGC_ZONE 1 | |
17244 | _ACEOF | |
17245 | ||
81bf3d9e RH |
17246 | ;; |
17247 | *) | |
ba479fd2 NN |
17248 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
17249 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
17250 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
17251 | ;; |
17252 | esac | |
17253 | else | |
005537df | 17254 | GGC=ggc-page |
ab22c1fa CF |
17255 | fi |
17256 | ||
81bf3d9e RH |
17257 | |
17258 | echo "Using $GGC for garbage collection." | |
17259 | ||
3c809ba4 | 17260 | # Use the system's zlib library. |
b8dad04b ZW |
17261 | zlibdir=-L../zlib |
17262 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 17263 | |
ab22c1fa | 17264 | # Check whether --with-system-zlib was given. |
3c809ba4 | 17265 | if test "${with_system_zlib+set}" = set; then |
ab22c1fa | 17266 | withval=$with_system_zlib; zlibdir= |
3c809ba4 AG |
17267 | zlibinc= |
17268 | ||
ab22c1fa | 17269 | fi |
3c809ba4 | 17270 | |
dc6746e7 | 17271 | |
b8ec3cc8 | 17272 | |
703d89ab | 17273 | |
ab22c1fa CF |
17274 | |
17275 | { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
17276 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } | |
17277 | # Check whether --enable-maintainer-mode was given. | |
dc6746e7 | 17278 | if test "${enable_maintainer_mode+set}" = set; then |
ab22c1fa | 17279 | enableval=$enable_maintainer_mode; maintainer_mode=$enableval |
dc6746e7 PT |
17280 | else |
17281 | maintainer_mode=no | |
ab22c1fa CF |
17282 | fi |
17283 | ||
a6ccdbab | 17284 | |
ab22c1fa CF |
17285 | { echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
17286 | echo "${ECHO_T}$maintainer_mode" >&6; } | |
dc6746e7 PT |
17287 | |
17288 | if test "$maintainer_mode" = "yes"; then | |
17289 | MAINT='' | |
17290 | else | |
17291 | MAINT='#' | |
17292 | fi | |
17293 | ||
8bb915b6 NN |
17294 | # -------------- |
17295 | # Language hooks | |
17296 | # -------------- | |
17297 | ||
861bb6c1 JL |
17298 | # Make empty files to contain the specs and options for each language. |
17299 | # Then add #include lines to for a compiler that has specs and/or options. | |
17300 | ||
cc11cc9b | 17301 | subdirs= |
d7b42618 | 17302 | lang_opt_files= |
861bb6c1 | 17303 | lang_specs_files= |
3103b7db | 17304 | lang_tree_files= |
861bb6c1 JL |
17305 | # These (without "all_") are set in each config-lang.in. |
17306 | # `language' must be a single word so is spelled singularly. | |
17307 | all_languages= | |
861bb6c1 | 17308 | all_compilers= |
fa958513 | 17309 | all_outputs='Makefile gccbug libada-mk' |
861bb6c1 | 17310 | # List of language makefile fragments. |
2ed26f6b ZW |
17311 | all_lang_makefrags= |
17312 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 17313 | all_lang_makefiles= |
703d89ab | 17314 | # Additional files for gengtype |
ef69da62 | 17315 | all_gtfiles="$target_gtfiles" |
861bb6c1 | 17316 | |
cc11cc9b PB |
17317 | # These are the languages that are set in --enable-languages, |
17318 | # and are available in the GCC tree. | |
17319 | all_selected_languages= | |
17320 | ||
861bb6c1 JL |
17321 | # Add the language fragments. |
17322 | # Languages are added via two mechanisms. Some information must be | |
17323 | # recorded in makefile variables, these are defined in config-lang.in. | |
17324 | # We accumulate them and plug them into the main Makefile. | |
17325 | # The other mechanism is a set of hooks for each of the main targets | |
17326 | # like `clean', `install', etc. | |
17327 | ||
861bb6c1 | 17328 | language_hooks="Make-hooks" |
861bb6c1 | 17329 | |
cc11cc9b | 17330 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 17331 | do |
1546bb64 PB |
17332 | test "$lang" = "${srcdir}/*/config-lang.in" && continue |
17333 | ||
cc11cc9b PB |
17334 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` |
17335 | if test "x$lang_alias" = x | |
17336 | then | |
17337 | echo "$lang doesn't set \$language." 1>&2 | |
17338 | exit 1 | |
17339 | fi | |
17340 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
17341 | subdirs="$subdirs $subdir" | |
17342 | case ",$enable_languages," in | |
17343 | *,$lang_alias,*) | |
17344 | all_selected_languages="$all_selected_languages $lang_alias" | |
17345 | if test -f $srcdir/$subdir/lang-specs.h; then | |
17346 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
17347 | fi | |
17348 | ;; | |
17349 | esac | |
17350 | ||
cc11cc9b PB |
17351 | language= |
17352 | boot_language= | |
17353 | compilers= | |
cc11cc9b PB |
17354 | outputs= |
17355 | gtfiles= | |
1546bb64 | 17356 | subdir_requires= |
cc11cc9b PB |
17357 | . ${srcdir}/$subdir/config-lang.in |
17358 | if test "x$language" = x | |
17359 | then | |
17360 | echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 | |
17361 | exit 1 | |
17362 | fi | |
1546bb64 PB |
17363 | |
17364 | ok=: | |
17365 | case ",$enable_languages," in | |
17366 | *,$lang_alias,*) ;; | |
17367 | *) | |
17368 | for i in $subdir_requires; do | |
b6348cb3 | 17369 | test -f "${srcdir}/$i/config-lang.in" && continue |
1546bb64 PB |
17370 | ok=false |
17371 | break | |
17372 | done | |
17373 | ;; | |
17374 | esac | |
17375 | $ok || continue | |
17376 | ||
cc11cc9b | 17377 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" |
1546bb64 PB |
17378 | if test -f $srcdir/$subdir/lang.opt; then |
17379 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
17380 | fi | |
17381 | if test -f $srcdir/$subdir/$subdir-tree.def; then | |
17382 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
17383 | fi | |
cc11cc9b PB |
17384 | if test -f ${srcdir}/$subdir/Makefile.in |
17385 | then all_lang_makefiles="$subdir/Makefile" | |
17386 | fi | |
17387 | all_languages="$all_languages $language" | |
cc11cc9b | 17388 | all_compilers="$all_compilers $compilers" |
cc11cc9b | 17389 | all_outputs="$all_outputs $outputs" |
703d89ab | 17390 | all_gtfiles="$all_gtfiles [$subdir] $gtfiles" |
861bb6c1 JL |
17391 | done |
17392 | ||
8ac9d31f TJ |
17393 | # Pick up gtfiles for c |
17394 | gtfiles= | |
8ac9d31f | 17395 | . ${srcdir}/c-config-lang.in |
703d89ab | 17396 | all_gtfiles="$all_gtfiles [c] $gtfiles" |
8ac9d31f | 17397 | |
cbc59f01 | 17398 | check_languages= |
cc11cc9b | 17399 | for language in $all_selected_languages |
cbc59f01 | 17400 | do |
cc11cc9b | 17401 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
17402 | done |
17403 | ||
62b81e45 | 17404 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 17405 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
17406 | |
17407 | rm -f Make-hooks | |
17408 | touch Make-hooks | |
bd97af06 | 17409 | target_list="all.cross start.encap rest.encap tags \ |
bcc3d150 BM |
17410 | install-common install-man install-info install-pdf dvi pdf \ |
17411 | html uninstall info man srcextra srcman srcinfo \ | |
8b1f719a | 17412 | mostlyclean clean distclean maintainer-clean" |
cc11cc9b | 17413 | |
861bb6c1 JL |
17414 | for t in $target_list |
17415 | do | |
17416 | x= | |
cc11cc9b | 17417 | for lang in $all_selected_languages |
861bb6c1 | 17418 | do |
cc11cc9b | 17419 | x="$x $lang.$t" |
861bb6c1 JL |
17420 | done |
17421 | echo "lang.$t: $x" >> Make-hooks | |
17422 | done | |
17423 | ||
8bb915b6 NN |
17424 | # -------- |
17425 | # UNSORTED | |
17426 | # -------- | |
17427 | ||
cc06d68c | 17428 | # Create .gdbinit. |
861bb6c1 | 17429 | |
cc06d68c GP |
17430 | echo "dir ." > .gdbinit |
17431 | echo "dir ${srcdir}" >> .gdbinit | |
17432 | if test x$gdb_needs_out_file_path = xyes | |
17433 | then | |
17434 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
17435 | fi | |
17436 | if test "x$subdirs" != x; then | |
17437 | for s in $subdirs | |
17438 | do | |
17439 | echo "dir ${srcdir}/$s" >> .gdbinit | |
17440 | done | |
861bb6c1 | 17441 | fi |
cc06d68c | 17442 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 17443 | |
15c723f3 | 17444 | gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' |
d062c304 JL |
17445 | |
17446 | ||
2ce3c6c6 | 17447 | |
2bbea3a6 RH |
17448 | # Find a directory in which to install a shared libgcc. |
17449 | ||
ab22c1fa | 17450 | # Check whether --enable-version-specific-runtime-libs was given. |
2bbea3a6 | 17451 | if test "${enable_version_specific_runtime_libs+set}" = set; then |
ab22c1fa CF |
17452 | enableval=$enable_version_specific_runtime_libs; |
17453 | fi | |
ba479fd2 | 17454 | |
2bbea3a6 RH |
17455 | |
17456 | ||
ab22c1fa | 17457 | # Check whether --with-slibdir was given. |
5b15f277 | 17458 | if test "${with_slibdir+set}" = set; then |
ab22c1fa | 17459 | withval=$with_slibdir; slibdir="$with_slibdir" |
5b15f277 RH |
17460 | else |
17461 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 17462 | slibdir='$(libsubdir)' |
5b15f277 | 17463 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
17464 | slibdir='$(build_tooldir)/lib' |
17465 | else | |
5b15f277 | 17466 | slibdir='$(libdir)' |
2bbea3a6 | 17467 | fi |
ab22c1fa CF |
17468 | fi |
17469 | ||
2bbea3a6 RH |
17470 | |
17471 | ||
1e6347d8 | 17472 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
17473 | |
17474 | ||
22482f74 | 17475 | |
ab22c1fa | 17476 | # Check whether --with-datarootdir was given. |
22482f74 | 17477 | if test "${with_datarootdir+set}" = set; then |
ab22c1fa | 17478 | withval=$with_datarootdir; datarootdir="\${prefix}/$with_datarootdir" |
22482f74 MS |
17479 | else |
17480 | datarootdir='$(prefix)/share' | |
ab22c1fa CF |
17481 | fi |
17482 | ||
22482f74 MS |
17483 | |
17484 | ||
a6ccdbab | 17485 | |
ab22c1fa | 17486 | # Check whether --with-docdir was given. |
22482f74 | 17487 | if test "${with_docdir+set}" = set; then |
ab22c1fa | 17488 | withval=$with_docdir; docdir="\${prefix}/$with_docdir" |
22482f74 MS |
17489 | else |
17490 | docdir='$(datarootdir)' | |
ab22c1fa | 17491 | fi |
22482f74 | 17492 | |
b8ec3cc8 | 17493 | |
703d89ab | 17494 | |
ab22c1fa CF |
17495 | |
17496 | # Check whether --with-htmldir was given. | |
22482f74 | 17497 | if test "${with_htmldir+set}" = set; then |
ab22c1fa | 17498 | withval=$with_htmldir; htmldir="\${prefix}/$with_htmldir" |
22482f74 MS |
17499 | else |
17500 | htmldir='$(docdir)' | |
ab22c1fa CF |
17501 | fi |
17502 | ||
861bb6c1 JL |
17503 | |
17504 | ||
703d89ab | 17505 | # Substitute configuration variables |
861bb6c1 JL |
17506 | |
17507 | ||
17508 | ||
17509 | ||
17510 | ||
17511 | ||
17512 | ||
17513 | ||
17514 | ||
17515 | ||
17516 | ||
17517 | ||
17518 | ||
17519 | ||
17520 | ||
17521 | ||
17522 | ||
17523 | ||
17524 | ||
17525 | ||
17526 | ||
17527 | ||
17528 | ||
17529 | ||
17530 | ||
17531 | ||
17532 | ||
17533 | ||
17534 | ||
17535 | ||
17536 | ||
17537 | ||
17538 | ||
17539 | ||
17540 | ||
17541 | ||
17542 | ||
17543 | ||
17544 | ||
17545 | ||
17546 | ||
17547 | ||
17548 | ||
17549 | ||
9b16d2c4 | 17550 | |
e9a25f70 | 17551 | |
6e26218f | 17552 | |
c8724862 | 17553 | |
11642c3a ZW |
17554 | |
17555 | ||
17556 | ||
3d9d2476 | 17557 | |
e2500fed | 17558 | |
51b9ff45 | 17559 | |
861bb6c1 | 17560 | |
6e3f3080 NN |
17561 | # Echo link setup. |
17562 | if test x${build} = x${host} ; then | |
17563 | if test x${host} = x${target} ; then | |
17564 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
17565 | else | |
17566 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
17567 | echo " from ${host} to ${target}." 1>&2 | |
17568 | fi | |
17569 | else | |
17570 | if test x${host} = x${target} ; then | |
17571 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
17572 | echo " for ${target}." 1>&2 | |
17573 | else | |
17574 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
17575 | echo " from ${host} to ${target}." 1>&2 | |
17576 | fi | |
17577 | fi | |
17578 | ||
6de9cd9a DN |
17579 | |
17580 | ||
17581 | ||
6e3f3080 NN |
17582 | # Configure the subdirectories |
17583 | # AC_CONFIG_SUBDIRS($subdirs) | |
17584 | ||
17585 | # Create the Makefile | |
17586 | # and configure language subdirectories | |
ab22c1fa | 17587 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
17588 | |
17589 | ||
ab22c1fa | 17590 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 17591 | |
ba479fd2 | 17592 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
17593 | # This file is a shell script that caches the results of configure |
17594 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
17595 | # scripts and configure runs, see configure's option --config-cache. |
17596 | # It is not useful on other systems. If it contains results you don't | |
17597 | # want to keep, you may remove or edit it. | |
6e3f3080 | 17598 | # |
ba479fd2 NN |
17599 | # config.status only pays attention to the cache file if you give it |
17600 | # the --recheck option to rerun configure. | |
6e3f3080 | 17601 | # |
ba479fd2 NN |
17602 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
17603 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17604 | # following values. | |
17605 | ||
17606 | _ACEOF | |
17607 | ||
6e3f3080 NN |
17608 | # The following way of writing the cache mishandles newlines in values, |
17609 | # but we know of no workaround that is simple, portable, and efficient. | |
ab22c1fa | 17610 | # So, we kill variables containing newlines. |
6e3f3080 NN |
17611 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17612 | # and sets the high bit in the cache file unless we assign to the vars. | |
ab22c1fa CF |
17613 | ( |
17614 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17615 | eval ac_val=\$$ac_var | |
17616 | case $ac_val in #( | |
17617 | *${as_nl}*) | |
17618 | case $ac_var in #( | |
17619 | *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 | |
17620 | echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; | |
17621 | esac | |
17622 | case $ac_var in #( | |
17623 | _ | IFS | as_nl) ;; #( | |
17624 | *) $as_unset $ac_var ;; | |
17625 | esac ;; | |
17626 | esac | |
17627 | done | |
17628 | ||
ba479fd2 | 17629 | (set) 2>&1 | |
ab22c1fa CF |
17630 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
17631 | *${as_nl}ac_space=\ *) | |
ba479fd2 NN |
17632 | # `set' does not quote correctly, so add quotes (double-quote |
17633 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
17634 | sed -n \ | |
86da66b5 HPN |
17635 | "s/'/'\\\\''/g; |
17636 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ab22c1fa | 17637 | ;; #( |
ba479fd2 NN |
17638 | *) |
17639 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
ab22c1fa | 17640 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
ba479fd2 | 17641 | ;; |
ab22c1fa CF |
17642 | esac | |
17643 | sort | |
17644 | ) | | |
ba479fd2 | 17645 | sed ' |
ab22c1fa | 17646 | /^ac_cv_env_/b end |
ba479fd2 | 17647 | t clear |
ab22c1fa | 17648 | :clear |
ba479fd2 NN |
17649 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17650 | t end | |
ab22c1fa CF |
17651 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17652 | :end' >>confcache | |
17653 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17654 | if test -w "$cache_file"; then | |
17655 | test "x$cache_file" != "x/dev/null" && | |
17656 | { echo "$as_me:$LINENO: updating cache $cache_file" >&5 | |
17657 | echo "$as_me: updating cache $cache_file" >&6;} | |
ba479fd2 | 17658 | cat confcache >$cache_file |
6e3f3080 | 17659 | else |
ab22c1fa CF |
17660 | { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 |
17661 | echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
6e3f3080 NN |
17662 | fi |
17663 | fi | |
17664 | rm -f confcache | |
17665 | ||
17666 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17667 | # Let make expand exec_prefix. | |
17668 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17669 | ||
63cf211a | 17670 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 17671 | |
ba479fd2 NN |
17672 | ac_libobjs= |
17673 | ac_ltlibobjs= | |
17674 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
17675 | # 1. Remove the extension, and $U if already installed. | |
ab22c1fa CF |
17676 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
17677 | ac_i=`echo "$ac_i" | sed "$ac_script"` | |
17678 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17679 | # will be set to the directory where LIBOBJS objects are built. | |
17680 | ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17681 | ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' | |
ba479fd2 NN |
17682 | done |
17683 | LIBOBJS=$ac_libobjs | |
63cf211a | 17684 | |
ba479fd2 NN |
17685 | LTLIBOBJS=$ac_ltlibobjs |
17686 | ||
17687 | ||
17688 | ||
17689 | : ${CONFIG_STATUS=./config.status} | |
17690 | ac_clean_files_save=$ac_clean_files | |
17691 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
17692 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
17693 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17694 | cat >$CONFIG_STATUS <<_ACEOF | |
17695 | #! $SHELL | |
17696 | # Generated by $as_me. | |
6e3f3080 NN |
17697 | # Run this file to recreate the current configuration. |
17698 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 17699 | # configure, is in config.log if it exists. |
6e3f3080 | 17700 | |
ba479fd2 NN |
17701 | debug=false |
17702 | ac_cs_recheck=false | |
17703 | ac_cs_silent=false | |
17704 | SHELL=\${CONFIG_SHELL-$SHELL} | |
17705 | _ACEOF | |
17706 | ||
17707 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17708 | ## --------------------- ## | |
17709 | ## M4sh Initialization. ## | |
17710 | ## --------------------- ## | |
17711 | ||
ab22c1fa CF |
17712 | # Be more Bourne compatible |
17713 | DUALCASE=1; export DUALCASE # for MKS sh | |
ba479fd2 NN |
17714 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
17715 | emulate sh | |
17716 | NULLCMD=: | |
17717 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
17718 | # is contrary to our usage. Disable this feature. | |
17719 | alias -g '${1+"$@"}'='"$@"' | |
ab22c1fa | 17720 | setopt NO_GLOB_SUBST |
703d89ab | 17721 | else |
ab22c1fa CF |
17722 | case `(set -o) 2>/dev/null` in |
17723 | *posix*) set -o posix ;; | |
17724 | esac | |
17725 | ||
703d89ab ZW |
17726 | fi |
17727 | ||
17728 | ||
ba479fd2 | 17729 | |
6e3f3080 | 17730 | |
ab22c1fa | 17731 | # PATH needs CR |
a3bba767 JJ |
17732 | # Avoid depending upon Character Ranges. |
17733 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
17734 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
17735 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
17736 | as_cr_digits='0123456789' | |
17737 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
17738 | ||
17739 | # The user is always right. | |
17740 | if test "${PATH_SEPARATOR+set}" != set; then | |
17741 | echo "#! /bin/sh" >conf$$.sh | |
17742 | echo "exit 0" >>conf$$.sh | |
17743 | chmod +x conf$$.sh | |
17744 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
17745 | PATH_SEPARATOR=';' | |
17746 | else | |
17747 | PATH_SEPARATOR=: | |
17748 | fi | |
17749 | rm -f conf$$.sh | |
17750 | fi | |
dd7f7a6e | 17751 | |
ab22c1fa CF |
17752 | # Support unset when possible. |
17753 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
17754 | as_unset=unset | |
17755 | else | |
17756 | as_unset=false | |
17757 | fi | |
17758 | ||
8b1f719a | 17759 | |
ab22c1fa CF |
17760 | # IFS |
17761 | # We need space, tab and new line, in precisely that order. Quoting is | |
17762 | # there to prevent editors from complaining about space-tab. | |
17763 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17764 | # splitting by setting IFS to empty value.) | |
17765 | as_nl=' | |
17766 | ' | |
17767 | IFS=" "" $as_nl" | |
17768 | ||
17769 | # Find who we are. Look in the path if we contain no directory separator. | |
17770 | case $0 in | |
17771 | *[\\/]* ) as_myself=$0 ;; | |
17772 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
a3bba767 JJ |
17773 | for as_dir in $PATH |
17774 | do | |
17775 | IFS=$as_save_IFS | |
17776 | test -z "$as_dir" && as_dir=. | |
17777 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17778 | done | |
ab22c1fa | 17779 | IFS=$as_save_IFS |
8b1f719a | 17780 | |
ab22c1fa CF |
17781 | ;; |
17782 | esac | |
17783 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17784 | # in which case we are not to be found in the path. | |
17785 | if test "x$as_myself" = x; then | |
17786 | as_myself=$0 | |
17787 | fi | |
17788 | if test ! -f "$as_myself"; then | |
17789 | echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
17790 | { (exit 1); exit 1; } | |
17791 | fi | |
17792 | ||
17793 | # Work around bugs in pre-3.0 UWIN ksh. | |
17794 | for as_var in ENV MAIL MAILPATH | |
17795 | do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var | |
17796 | done | |
17797 | PS1='$ ' | |
17798 | PS2='> ' | |
17799 | PS4='+ ' | |
17800 | ||
17801 | # NLS nuisances. | |
17802 | for as_var in \ | |
17803 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
17804 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
17805 | LC_TELEPHONE LC_TIME | |
a3bba767 | 17806 | do |
ab22c1fa CF |
17807 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
17808 | eval $as_var=C; export $as_var | |
17809 | else | |
17810 | ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var | |
17811 | fi | |
17812 | done | |
17813 | ||
17814 | # Required to use basename. | |
17815 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
17816 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
17817 | as_expr=expr | |
17818 | else | |
17819 | as_expr=false | |
17820 | fi | |
17821 | ||
17822 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
17823 | as_basename=basename | |
17824 | else | |
17825 | as_basename=false | |
17826 | fi | |
17827 | ||
17828 | ||
17829 | # Name of the executable. | |
17830 | as_me=`$as_basename -- "$0" || | |
17831 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
17832 | X"$0" : 'X\(//\)$' \| \ | |
17833 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
17834 | echo X/"$0" | | |
17835 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
17836 | s//\1/ | |
17837 | q | |
17838 | } | |
17839 | /^X\/\(\/\/\)$/{ | |
17840 | s//\1/ | |
17841 | q | |
17842 | } | |
17843 | /^X\/\(\/\).*/{ | |
17844 | s//\1/ | |
17845 | q | |
17846 | } | |
17847 | s/.*/./; q'` | |
17848 | ||
17849 | # CDPATH. | |
17850 | $as_unset CDPATH | |
17851 | ||
17852 | ||
17853 | ||
8b1f719a PB |
17854 | as_lineno_1=$LINENO |
17855 | as_lineno_2=$LINENO | |
8b1f719a | 17856 | test "x$as_lineno_1" != "x$as_lineno_2" && |
ab22c1fa | 17857 | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { |
ba479fd2 NN |
17858 | |
17859 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
17860 | # uniformly replaced by the line number. The first 'sed' inserts a | |
ab22c1fa CF |
17861 | # line-number line after each line using $LINENO; the second 'sed' |
17862 | # does the real work. The second script uses 'N' to pair each | |
17863 | # line-number line with the line containing $LINENO, and appends | |
17864 | # trailing '-' during substitution so that $LINENO is not a special | |
17865 | # case at line end. | |
ba479fd2 | 17866 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the |
ab22c1fa CF |
17867 | # scripts with optimization help from Paolo Bonzini. Blame Lee |
17868 | # E. McMahon (1931-1989) for sed's syntax. :-) | |
17869 | sed -n ' | |
17870 | p | |
17871 | /[$]LINENO/= | |
17872 | ' <$as_myself | | |
ba479fd2 | 17873 | sed ' |
ab22c1fa CF |
17874 | s/[$]LINENO.*/&-/ |
17875 | t lineno | |
17876 | b | |
17877 | :lineno | |
ba479fd2 | 17878 | N |
ab22c1fa CF |
17879 | :loop |
17880 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
ba479fd2 | 17881 | t loop |
ab22c1fa | 17882 | s/-\n.*// |
ba479fd2 | 17883 | ' >$as_me.lineno && |
ab22c1fa CF |
17884 | chmod +x "$as_me.lineno" || |
17885 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 | |
ba479fd2 NN |
17886 | { (exit 1); exit 1; }; } |
17887 | ||
17888 | # Don't try to exec as it changes $[0], causing all sort of problems | |
17889 | # (the dirname of $[0] is not the place where we might find the | |
ab22c1fa CF |
17890 | # original and so on. Autoconf is especially sensitive to this). |
17891 | . "./$as_me.lineno" | |
ba479fd2 NN |
17892 | # Exit status is that of the last command. |
17893 | exit | |
17894 | } | |
17895 | ||
17896 | ||
ab22c1fa CF |
17897 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
17898 | as_dirname=dirname | |
17899 | else | |
17900 | as_dirname=false | |
17901 | fi | |
17902 | ||
17903 | ECHO_C= ECHO_N= ECHO_T= | |
17904 | case `echo -n x` in | |
17905 | -n*) | |
17906 | case `echo 'x\c'` in | |
17907 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
17908 | *) ECHO_C='\c';; | |
17909 | esac;; | |
17910 | *) | |
17911 | ECHO_N='-n';; | |
ba479fd2 NN |
17912 | esac |
17913 | ||
ab22c1fa CF |
17914 | if expr a : '\(a\)' >/dev/null 2>&1 && |
17915 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
ba479fd2 NN |
17916 | as_expr=expr |
17917 | else | |
17918 | as_expr=false | |
17919 | fi | |
17920 | ||
17921 | rm -f conf$$ conf$$.exe conf$$.file | |
ab22c1fa CF |
17922 | if test -d conf$$.dir; then |
17923 | rm -f conf$$.dir/conf$$.file | |
17924 | else | |
17925 | rm -f conf$$.dir | |
17926 | mkdir conf$$.dir | |
17927 | fi | |
ba479fd2 NN |
17928 | echo >conf$$.file |
17929 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
ab22c1fa CF |
17930 | as_ln_s='ln -s' |
17931 | # ... but there are two gotchas: | |
17932 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
17933 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
17934 | # In both cases, we have to default to `cp -p'. | |
17935 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
ba479fd2 | 17936 | as_ln_s='cp -p' |
ba479fd2 NN |
17937 | elif ln conf$$.file conf$$ 2>/dev/null; then |
17938 | as_ln_s=ln | |
17939 | else | |
17940 | as_ln_s='cp -p' | |
17941 | fi | |
ab22c1fa CF |
17942 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
17943 | rmdir conf$$.dir 2>/dev/null | |
ba479fd2 NN |
17944 | |
17945 | if mkdir -p . 2>/dev/null; then | |
17946 | as_mkdir_p=: | |
17947 | else | |
86da66b5 | 17948 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
17949 | as_mkdir_p=false |
17950 | fi | |
17951 | ||
ab22c1fa CF |
17952 | if test -x / >/dev/null 2>&1; then |
17953 | as_test_x='test -x' | |
17954 | else | |
17955 | if ls -dL / >/dev/null 2>&1; then | |
17956 | as_ls_L_option=L | |
17957 | else | |
17958 | as_ls_L_option= | |
17959 | fi | |
17960 | as_test_x=' | |
17961 | eval sh -c '\'' | |
17962 | if test -d "$1"; then | |
17963 | test -d "$1/."; | |
17964 | else | |
17965 | case $1 in | |
17966 | -*)set "./$1";; | |
17967 | esac; | |
17968 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in | |
17969 | ???[sx]*):;;*)false;;esac;fi | |
17970 | '\'' sh | |
17971 | ' | |
17972 | fi | |
17973 | as_executable_p=$as_test_x | |
ba479fd2 NN |
17974 | |
17975 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 17976 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
17977 | |
17978 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 17979 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
17980 | |
17981 | ||
ba479fd2 NN |
17982 | exec 6>&1 |
17983 | ||
ab22c1fa | 17984 | # Save the log message, to keep $[0] and so on meaningful, and to |
ba479fd2 | 17985 | # report actual input values of CONFIG_FILES etc. instead of their |
ab22c1fa CF |
17986 | # values after options handling. |
17987 | ac_log=" | |
ba479fd2 | 17988 | This file was extended by $as_me, which was |
ab22c1fa | 17989 | generated by GNU Autoconf 2.61. Invocation command line was |
ba479fd2 NN |
17990 | |
17991 | CONFIG_FILES = $CONFIG_FILES | |
17992 | CONFIG_HEADERS = $CONFIG_HEADERS | |
17993 | CONFIG_LINKS = $CONFIG_LINKS | |
17994 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
17995 | $ $0 $@ | |
17996 | ||
ab22c1fa CF |
17997 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
17998 | " | |
17999 | ||
ba479fd2 NN |
18000 | _ACEOF |
18001 | ||
ab22c1fa | 18002 | cat >>$CONFIG_STATUS <<_ACEOF |
ba479fd2 | 18003 | # Files that config.status was made for. |
ab22c1fa CF |
18004 | config_files="$ac_config_files" |
18005 | config_headers="$ac_config_headers" | |
18006 | config_commands="$ac_config_commands" | |
a3bba767 | 18007 | |
ab22c1fa | 18008 | _ACEOF |
ba479fd2 NN |
18009 | |
18010 | cat >>$CONFIG_STATUS <<\_ACEOF | |
ba479fd2 NN |
18011 | ac_cs_usage="\ |
18012 | \`$as_me' instantiates files from templates according to the | |
18013 | current configuration. | |
18014 | ||
18015 | Usage: $0 [OPTIONS] [FILE]... | |
18016 | ||
18017 | -h, --help print this help, then exit | |
ab22c1fa | 18018 | -V, --version print version number and configuration settings, then exit |
ba479fd2 NN |
18019 | -q, --quiet do not print progress messages |
18020 | -d, --debug don't remove temporary files | |
18021 | --recheck update $as_me by reconfiguring in the same conditions | |
18022 | --file=FILE[:TEMPLATE] | |
86da66b5 | 18023 | instantiate the configuration file FILE |
ba479fd2 | 18024 | --header=FILE[:TEMPLATE] |
86da66b5 | 18025 | instantiate the configuration header FILE |
ba479fd2 NN |
18026 | |
18027 | Configuration files: | |
18028 | $config_files | |
18029 | ||
18030 | Configuration headers: | |
18031 | $config_headers | |
18032 | ||
18033 | Configuration commands: | |
18034 | $config_commands | |
18035 | ||
18036 | Report bugs to <bug-autoconf@gnu.org>." | |
a3bba767 | 18037 | |
ab22c1fa | 18038 | _ACEOF |
ba479fd2 NN |
18039 | cat >>$CONFIG_STATUS <<_ACEOF |
18040 | ac_cs_version="\\ | |
18041 | config.status | |
ab22c1fa CF |
18042 | configured by $0, generated by GNU Autoconf 2.61, |
18043 | with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
ba479fd2 | 18044 | |
ab22c1fa | 18045 | Copyright (C) 2006 Free Software Foundation, Inc. |
ba479fd2 NN |
18046 | This config.status script is free software; the Free Software Foundation |
18047 | gives unlimited permission to copy, distribute and modify it." | |
ab22c1fa CF |
18048 | |
18049 | ac_pwd='$ac_pwd' | |
18050 | srcdir='$srcdir' | |
ba479fd2 NN |
18051 | _ACEOF |
18052 | ||
18053 | cat >>$CONFIG_STATUS <<\_ACEOF | |
18054 | # If no file are specified by the user, then we need to provide default | |
18055 | # value. By we need to know if files were specified by the user. | |
18056 | ac_need_defaults=: | |
18057 | while test $# != 0 | |
18058 | do | |
18059 | case $1 in | |
18060 | --*=*) | |
ab22c1fa CF |
18061 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18062 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
ba479fd2 NN |
18063 | ac_shift=: |
18064 | ;; | |
ab22c1fa | 18065 | *) |
ba479fd2 NN |
18066 | ac_option=$1 |
18067 | ac_optarg=$2 | |
18068 | ac_shift=shift | |
18069 | ;; | |
ba479fd2 NN |
18070 | esac |
18071 | ||
18072 | case $ac_option in | |
18073 | # Handling of the options. | |
ba479fd2 NN |
18074 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
18075 | ac_cs_recheck=: ;; | |
ab22c1fa CF |
18076 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
18077 | echo "$ac_cs_version"; exit ;; | |
18078 | --debug | --debu | --deb | --de | --d | -d ) | |
ba479fd2 NN |
18079 | debug=: ;; |
18080 | --file | --fil | --fi | --f ) | |
18081 | $ac_shift | |
18082 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
18083 | ac_need_defaults=false;; | |
18084 | --header | --heade | --head | --hea ) | |
18085 | $ac_shift | |
18086 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
18087 | ac_need_defaults=false;; | |
ab22c1fa CF |
18088 | --he | --h) |
18089 | # Conflict between --help and --header | |
18090 | { echo "$as_me: error: ambiguous option: $1 | |
18091 | Try \`$0 --help' for more information." >&2 | |
18092 | { (exit 1); exit 1; }; };; | |
18093 | --help | --hel | -h ) | |
18094 | echo "$ac_cs_usage"; exit ;; | |
ba479fd2 NN |
18095 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
18096 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18097 | ac_cs_silent=: ;; | |
18098 | ||
18099 | # This is an error. | |
ab22c1fa CF |
18100 | -*) { echo "$as_me: error: unrecognized option: $1 |
18101 | Try \`$0 --help' for more information." >&2 | |
ba479fd2 NN |
18102 | { (exit 1); exit 1; }; } ;; |
18103 | ||
ab22c1fa CF |
18104 | *) ac_config_targets="$ac_config_targets $1" |
18105 | ac_need_defaults=false ;; | |
ba479fd2 NN |
18106 | |
18107 | esac | |
18108 | shift | |
6e3f3080 | 18109 | done |
ba479fd2 NN |
18110 | |
18111 | ac_configure_extra_args= | |
18112 | ||
18113 | if $ac_cs_silent; then | |
18114 | exec 6>/dev/null | |
18115 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
18116 | fi |
18117 | ||
ba479fd2 NN |
18118 | _ACEOF |
18119 | cat >>$CONFIG_STATUS <<_ACEOF | |
18120 | if \$ac_cs_recheck; then | |
ab22c1fa CF |
18121 | echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 |
18122 | CONFIG_SHELL=$SHELL | |
18123 | export CONFIG_SHELL | |
18124 | exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
ba479fd2 | 18125 | fi |
861bb6c1 | 18126 | |
ba479fd2 | 18127 | _ACEOF |
ab22c1fa CF |
18128 | cat >>$CONFIG_STATUS <<\_ACEOF |
18129 | exec 5>>config.log | |
18130 | { | |
18131 | echo | |
18132 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18133 | ## Running $as_me. ## | |
18134 | _ASBOX | |
18135 | echo "$ac_log" | |
18136 | } >&5 | |
ba479fd2 | 18137 | |
ab22c1fa | 18138 | _ACEOF |
ba479fd2 NN |
18139 | cat >>$CONFIG_STATUS <<_ACEOF |
18140 | # | |
ab22c1fa | 18141 | # INIT-COMMANDS |
ba479fd2 | 18142 | # |
ba479fd2 | 18143 | subdirs='$subdirs' |
ba479fd2 NN |
18144 | |
18145 | _ACEOF | |
18146 | ||
a3bba767 | 18147 | cat >>$CONFIG_STATUS <<\_ACEOF |
ab22c1fa CF |
18148 | |
18149 | # Handling of arguments. | |
ba479fd2 NN |
18150 | for ac_config_target in $ac_config_targets |
18151 | do | |
ab22c1fa CF |
18152 | case $ac_config_target in |
18153 | "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
18154 | "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;; | |
18155 | "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;; | |
18156 | "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;; | |
18157 | "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
18158 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
18159 | ||
ba479fd2 NN |
18160 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 |
18161 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
18162 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 18163 | esac |
ba479fd2 NN |
18164 | done |
18165 | ||
ab22c1fa | 18166 | |
ba479fd2 NN |
18167 | # If the user did not use the arguments to specify the items to instantiate, |
18168 | # then the envvar interface is used. Set only those that are not. | |
18169 | # We use the long form for the default assignment because of an extremely | |
18170 | # bizarre bug on SunOS 4.1.3. | |
18171 | if $ac_need_defaults; then | |
18172 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18173 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18174 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18175 | fi | |
18176 | ||
18177 | # Have a temporary directory for convenience. Make it in the build tree | |
ab22c1fa | 18178 | # simply because there is no reason against having it here, and in addition, |
ba479fd2 | 18179 | # creating and moving files from /tmp can sometimes cause problems. |
ab22c1fa CF |
18180 | # Hook for its removal unless debugging. |
18181 | # Note that there is a small window in which the directory will not be cleaned: | |
18182 | # after its creation but before its name has been assigned to `$tmp'. | |
ba479fd2 NN |
18183 | $debug || |
18184 | { | |
ab22c1fa CF |
18185 | tmp= |
18186 | trap 'exit_status=$? | |
18187 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
18188 | ' 0 | |
ba479fd2 NN |
18189 | trap '{ (exit 1); exit 1; }' 1 2 13 15 |
18190 | } | |
ba479fd2 | 18191 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 18192 | |
ba479fd2 | 18193 | { |
ab22c1fa | 18194 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
ba479fd2 NN |
18195 | test -n "$tmp" && test -d "$tmp" |
18196 | } || | |
18197 | { | |
ab22c1fa CF |
18198 | tmp=./conf$$-$RANDOM |
18199 | (umask 077 && mkdir "$tmp") | |
ba479fd2 NN |
18200 | } || |
18201 | { | |
18202 | echo "$me: cannot create a temporary directory in ." >&2 | |
18203 | { (exit 1); exit 1; } | |
18204 | } | |
18205 | ||
ba479fd2 | 18206 | # |
ab22c1fa | 18207 | # Set up the sed scripts for CONFIG_FILES section. |
ba479fd2 NN |
18208 | # |
18209 | ||
18210 | # No need to generate the scripts if there are no CONFIG_FILES. | |
18211 | # This happens for instance when ./config.status config.h | |
ab22c1fa CF |
18212 | if test -n "$CONFIG_FILES"; then |
18213 | ||
18214 | _ACEOF | |
18215 | ||
18216 | # Create sed commands to just substitute file output variables. | |
18217 | ||
18218 | # Remaining file output variables are in a fragment that also has non-file | |
18219 | # output varibles. | |
18220 | ||
18221 | ||
18222 | ||
18223 | ac_delim='%!_!# ' | |
18224 | for ac_last_try in false false false false false :; do | |
18225 | cat >conf$$subs.sed <<_ACEOF | |
18226 | SHELL!$SHELL$ac_delim | |
18227 | PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim | |
18228 | PACKAGE_NAME!$PACKAGE_NAME$ac_delim | |
18229 | PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim | |
18230 | PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim | |
18231 | PACKAGE_STRING!$PACKAGE_STRING$ac_delim | |
18232 | PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim | |
18233 | exec_prefix!$exec_prefix$ac_delim | |
18234 | prefix!$prefix$ac_delim | |
18235 | program_transform_name!$program_transform_name$ac_delim | |
18236 | bindir!$bindir$ac_delim | |
18237 | sbindir!$sbindir$ac_delim | |
18238 | libexecdir!$libexecdir$ac_delim | |
18239 | datarootdir!$datarootdir$ac_delim | |
18240 | datadir!$datadir$ac_delim | |
18241 | sysconfdir!$sysconfdir$ac_delim | |
18242 | sharedstatedir!$sharedstatedir$ac_delim | |
18243 | localstatedir!$localstatedir$ac_delim | |
18244 | includedir!$includedir$ac_delim | |
18245 | oldincludedir!$oldincludedir$ac_delim | |
18246 | docdir!$docdir$ac_delim | |
18247 | infodir!$infodir$ac_delim | |
18248 | htmldir!$htmldir$ac_delim | |
18249 | dvidir!$dvidir$ac_delim | |
18250 | pdfdir!$pdfdir$ac_delim | |
18251 | psdir!$psdir$ac_delim | |
18252 | libdir!$libdir$ac_delim | |
18253 | localedir!$localedir$ac_delim | |
18254 | mandir!$mandir$ac_delim | |
18255 | DEFS!$DEFS$ac_delim | |
18256 | ECHO_C!$ECHO_C$ac_delim | |
18257 | ECHO_N!$ECHO_N$ac_delim | |
18258 | ECHO_T!$ECHO_T$ac_delim | |
18259 | LIBS!$LIBS$ac_delim | |
18260 | build_alias!$build_alias$ac_delim | |
18261 | host_alias!$host_alias$ac_delim | |
18262 | target_alias!$target_alias$ac_delim | |
18263 | build!$build$ac_delim | |
18264 | build_cpu!$build_cpu$ac_delim | |
18265 | build_vendor!$build_vendor$ac_delim | |
18266 | build_os!$build_os$ac_delim | |
18267 | host!$host$ac_delim | |
18268 | host_cpu!$host_cpu$ac_delim | |
18269 | host_vendor!$host_vendor$ac_delim | |
18270 | host_os!$host_os$ac_delim | |
18271 | target!$target$ac_delim | |
18272 | target_cpu!$target_cpu$ac_delim | |
18273 | target_vendor!$target_vendor$ac_delim | |
18274 | target_os!$target_os$ac_delim | |
18275 | target_noncanonical!$target_noncanonical$ac_delim | |
18276 | build_libsubdir!$build_libsubdir$ac_delim | |
18277 | build_subdir!$build_subdir$ac_delim | |
18278 | host_subdir!$host_subdir$ac_delim | |
18279 | target_subdir!$target_subdir$ac_delim | |
18280 | GENINSRC!$GENINSRC$ac_delim | |
18281 | CC!$CC$ac_delim | |
18282 | CFLAGS!$CFLAGS$ac_delim | |
18283 | LDFLAGS!$LDFLAGS$ac_delim | |
18284 | CPPFLAGS!$CPPFLAGS$ac_delim | |
18285 | ac_ct_CC!$ac_ct_CC$ac_delim | |
18286 | EXEEXT!$EXEEXT$ac_delim | |
18287 | OBJEXT!$OBJEXT$ac_delim | |
18288 | NO_MINUS_C_MINUS_O!$NO_MINUS_C_MINUS_O$ac_delim | |
18289 | OUTPUT_OPTION!$OUTPUT_OPTION$ac_delim | |
18290 | CPP!$CPP$ac_delim | |
18291 | GREP!$GREP$ac_delim | |
18292 | EGREP!$EGREP$ac_delim | |
18293 | loose_warn!$loose_warn$ac_delim | |
18294 | cxx_compat_warn!$cxx_compat_warn$ac_delim | |
18295 | strict_warn!$strict_warn$ac_delim | |
18296 | warn_cflags!$warn_cflags$ac_delim | |
18297 | nocommon_flag!$nocommon_flag$ac_delim | |
18298 | TREEBROWSER!$TREEBROWSER$ac_delim | |
18299 | valgrind_path!$valgrind_path$ac_delim | |
18300 | valgrind_path_defines!$valgrind_path_defines$ac_delim | |
18301 | valgrind_command!$valgrind_command$ac_delim | |
18302 | coverage_flags!$coverage_flags$ac_delim | |
18303 | enable_multilib!$enable_multilib$ac_delim | |
18304 | enable_decimal_float!$enable_decimal_float$ac_delim | |
18305 | enable_fixed_point!$enable_fixed_point$ac_delim | |
18306 | enable_shared!$enable_shared$ac_delim | |
18307 | TARGET_SYSTEM_ROOT!$TARGET_SYSTEM_ROOT$ac_delim | |
18308 | TARGET_SYSTEM_ROOT_DEFINE!$TARGET_SYSTEM_ROOT_DEFINE$ac_delim | |
18309 | CROSS_SYSTEM_HEADER_DIR!$CROSS_SYSTEM_HEADER_DIR$ac_delim | |
18310 | onestep!$onestep$ac_delim | |
18311 | SET_MAKE!$SET_MAKE$ac_delim | |
18312 | AWK!$AWK$ac_delim | |
18313 | LN_S!$LN_S$ac_delim | |
18314 | LN!$LN$ac_delim | |
18315 | RANLIB!$RANLIB$ac_delim | |
18316 | ranlib_flags!$ranlib_flags$ac_delim | |
18317 | INSTALL!$INSTALL$ac_delim | |
18318 | INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim | |
18319 | INSTALL_DATA!$INSTALL_DATA$ac_delim | |
18320 | _ACEOF | |
18321 | ||
18322 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then | |
18323 | break | |
18324 | elif $ac_last_try; then | |
18325 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 | |
18326 | echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} | |
18327 | { (exit 1); exit 1; }; } | |
18328 | else | |
18329 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
703d89ab | 18330 | fi |
ab22c1fa | 18331 | done |
703d89ab | 18332 | |
ab22c1fa CF |
18333 | ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` |
18334 | if test -n "$ac_eof"; then | |
18335 | ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` | |
18336 | ac_eof=`expr $ac_eof + 1` | |
18337 | fi | |
18338 | ||
18339 | cat >>$CONFIG_STATUS <<_ACEOF | |
18340 | cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof | |
18341 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
18342 | /^[ ]*@language_hooks@[ ]*$/{ | |
18343 | r $language_hooks | |
18344 | d | |
18345 | } | |
b8ec3cc8 | 18346 | _ACEOF |
ab22c1fa CF |
18347 | sed ' |
18348 | s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g | |
18349 | s/^/s,@/; s/!/@,|#_!!_#|/ | |
18350 | :n | |
18351 | t n | |
18352 | s/'"$ac_delim"'$/,g/; t | |
18353 | s/$/\\/; p | |
18354 | N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n | |
18355 | ' >>$CONFIG_STATUS <conf$$subs.sed | |
18356 | rm -f conf$$subs.sed | |
18357 | cat >>$CONFIG_STATUS <<_ACEOF | |
18358 | CEOF$ac_eof | |
18359 | _ACEOF | |
18360 | ||
18361 | ||
18362 | ac_delim='%!_!# ' | |
18363 | for ac_last_try in false false false false false :; do | |
18364 | cat >conf$$subs.sed <<_ACEOF | |
18365 | make_compare_target!$make_compare_target$ac_delim | |
18366 | have_mktemp_command!$have_mktemp_command$ac_delim | |
18367 | MAKEINFO!$MAKEINFO$ac_delim | |
18368 | BUILD_INFO!$BUILD_INFO$ac_delim | |
18369 | GENERATED_MANPAGES!$GENERATED_MANPAGES$ac_delim | |
18370 | FLEX!$FLEX$ac_delim | |
18371 | BISON!$BISON$ac_delim | |
18372 | NM!$NM$ac_delim | |
18373 | AR!$AR$ac_delim | |
18374 | COLLECT2_LIBS!$COLLECT2_LIBS$ac_delim | |
18375 | GNAT_LIBEXC!$GNAT_LIBEXC$ac_delim | |
18376 | LDEXP_LIB!$LDEXP_LIB$ac_delim | |
18377 | TARGET_GETGROUPS_T!$TARGET_GETGROUPS_T$ac_delim | |
18378 | LIBICONV!$LIBICONV$ac_delim | |
18379 | LTLIBICONV!$LTLIBICONV$ac_delim | |
18380 | LIBICONV_DEP!$LIBICONV_DEP$ac_delim | |
18381 | manext!$manext$ac_delim | |
18382 | objext!$objext$ac_delim | |
18383 | gthread_flags!$gthread_flags$ac_delim | |
18384 | extra_modes_file!$extra_modes_file$ac_delim | |
18385 | extra_opt_files!$extra_opt_files$ac_delim | |
18386 | USE_NLS!$USE_NLS$ac_delim | |
18387 | LIBINTL!$LIBINTL$ac_delim | |
18388 | LIBINTL_DEP!$LIBINTL_DEP$ac_delim | |
18389 | INCINTL!$INCINTL$ac_delim | |
18390 | XGETTEXT!$XGETTEXT$ac_delim | |
18391 | GMSGFMT!$GMSGFMT$ac_delim | |
18392 | POSUB!$POSUB$ac_delim | |
18393 | CATALOGS!$CATALOGS$ac_delim | |
18394 | DATADIRNAME!$DATADIRNAME$ac_delim | |
18395 | INSTOBJEXT!$INSTOBJEXT$ac_delim | |
18396 | GENCAT!$GENCAT$ac_delim | |
18397 | CATOBJEXT!$CATOBJEXT$ac_delim | |
18398 | host_cc_for_libada!$host_cc_for_libada$ac_delim | |
18399 | CROSS!$CROSS$ac_delim | |
18400 | ALL!$ALL$ac_delim | |
18401 | SYSTEM_HEADER_DIR!$SYSTEM_HEADER_DIR$ac_delim | |
18402 | inhibit_libc!$inhibit_libc$ac_delim | |
18403 | CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim | |
18404 | BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim | |
18405 | STMP_FIXINC!$STMP_FIXINC$ac_delim | |
18406 | STMP_FIXPROTO!$STMP_FIXPROTO$ac_delim | |
18407 | collect2!$collect2$ac_delim | |
18408 | gcc_cv_as!$gcc_cv_as$ac_delim | |
18409 | ORIGINAL_AS_FOR_TARGET!$ORIGINAL_AS_FOR_TARGET$ac_delim | |
18410 | gcc_cv_ld!$gcc_cv_ld$ac_delim | |
18411 | ORIGINAL_LD_FOR_TARGET!$ORIGINAL_LD_FOR_TARGET$ac_delim | |
18412 | gcc_cv_nm!$gcc_cv_nm$ac_delim | |
18413 | ORIGINAL_NM_FOR_TARGET!$ORIGINAL_NM_FOR_TARGET$ac_delim | |
18414 | gcc_cv_objdump!$gcc_cv_objdump$ac_delim | |
18415 | libgcc_visibility!$libgcc_visibility$ac_delim | |
18416 | GGC!$GGC$ac_delim | |
18417 | zlibdir!$zlibdir$ac_delim | |
18418 | zlibinc!$zlibinc$ac_delim | |
18419 | MAINT!$MAINT$ac_delim | |
18420 | gcc_tooldir!$gcc_tooldir$ac_delim | |
18421 | dollar!$dollar$ac_delim | |
18422 | slibdir!$slibdir$ac_delim | |
18423 | objdir!$objdir$ac_delim | |
18424 | subdirs!$subdirs$ac_delim | |
18425 | srcdir!$srcdir$ac_delim | |
18426 | all_compilers!$all_compilers$ac_delim | |
18427 | all_gtfiles!$all_gtfiles$ac_delim | |
18428 | all_lang_makefrags!$all_lang_makefrags$ac_delim | |
18429 | all_lang_makefiles!$all_lang_makefiles$ac_delim | |
18430 | all_languages!$all_languages$ac_delim | |
18431 | all_selected_languages!$all_selected_languages$ac_delim | |
18432 | build_exeext!$build_exeext$ac_delim | |
18433 | build_install_headers_dir!$build_install_headers_dir$ac_delim | |
18434 | build_xm_file_list!$build_xm_file_list$ac_delim | |
18435 | build_xm_include_list!$build_xm_include_list$ac_delim | |
18436 | build_xm_defines!$build_xm_defines$ac_delim | |
18437 | check_languages!$check_languages$ac_delim | |
18438 | cpp_install_dir!$cpp_install_dir$ac_delim | |
18439 | xmake_file!$xmake_file$ac_delim | |
18440 | tmake_file!$tmake_file$ac_delim | |
18441 | extra_gcc_objs!$extra_gcc_objs$ac_delim | |
18442 | extra_headers_list!$extra_headers_list$ac_delim | |
18443 | extra_objs!$extra_objs$ac_delim | |
18444 | extra_parts!$extra_parts$ac_delim | |
18445 | extra_passes!$extra_passes$ac_delim | |
18446 | extra_programs!$extra_programs$ac_delim | |
18447 | float_h_file!$float_h_file$ac_delim | |
18448 | gcc_config_arguments!$gcc_config_arguments$ac_delim | |
18449 | gcc_gxx_include_dir!$gcc_gxx_include_dir$ac_delim | |
18450 | host_exeext!$host_exeext$ac_delim | |
18451 | host_xm_file_list!$host_xm_file_list$ac_delim | |
18452 | host_xm_include_list!$host_xm_include_list$ac_delim | |
18453 | host_xm_defines!$host_xm_defines$ac_delim | |
18454 | out_host_hook_obj!$out_host_hook_obj$ac_delim | |
18455 | install!$install$ac_delim | |
18456 | lang_opt_files!$lang_opt_files$ac_delim | |
18457 | lang_specs_files!$lang_specs_files$ac_delim | |
18458 | lang_tree_files!$lang_tree_files$ac_delim | |
18459 | local_prefix!$local_prefix$ac_delim | |
18460 | md_file!$md_file$ac_delim | |
18461 | objc_boehm_gc!$objc_boehm_gc$ac_delim | |
18462 | _ACEOF | |
18463 | ||
18464 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then | |
18465 | break | |
18466 | elif $ac_last_try; then | |
18467 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 | |
18468 | echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} | |
18469 | { (exit 1); exit 1; }; } | |
18470 | else | |
18471 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18472 | fi | |
18473 | done | |
18474 | ||
18475 | ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` | |
18476 | if test -n "$ac_eof"; then | |
18477 | ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` | |
18478 | ac_eof=`expr $ac_eof + 1` | |
18479 | fi | |
18480 | ||
18481 | cat >>$CONFIG_STATUS <<_ACEOF | |
18482 | cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof | |
18483 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
18484 | _ACEOF | |
18485 | sed ' | |
18486 | s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g | |
18487 | s/^/s,@/; s/!/@,|#_!!_#|/ | |
18488 | :n | |
18489 | t n | |
18490 | s/'"$ac_delim"'$/,g/; t | |
18491 | s/$/\\/; p | |
18492 | N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n | |
18493 | ' >>$CONFIG_STATUS <conf$$subs.sed | |
18494 | rm -f conf$$subs.sed | |
18495 | cat >>$CONFIG_STATUS <<_ACEOF | |
18496 | CEOF$ac_eof | |
18497 | _ACEOF | |
18498 | ||
18499 | ||
18500 | ac_delim='%!_!# ' | |
18501 | for ac_last_try in false false false false false :; do | |
18502 | cat >conf$$subs.sed <<_ACEOF | |
18503 | out_file!$out_file$ac_delim | |
18504 | out_object_file!$out_object_file$ac_delim | |
18505 | thread_file!$thread_file$ac_delim | |
18506 | tm_file_list!$tm_file_list$ac_delim | |
18507 | tm_include_list!$tm_include_list$ac_delim | |
18508 | tm_defines!$tm_defines$ac_delim | |
18509 | tm_p_file_list!$tm_p_file_list$ac_delim | |
18510 | tm_p_include_list!$tm_p_include_list$ac_delim | |
18511 | xm_file_list!$xm_file_list$ac_delim | |
18512 | xm_include_list!$xm_include_list$ac_delim | |
18513 | xm_defines!$xm_defines$ac_delim | |
18514 | c_target_objs!$c_target_objs$ac_delim | |
18515 | cxx_target_objs!$cxx_target_objs$ac_delim | |
18516 | target_cpu_default!$target_cpu_default$ac_delim | |
18517 | GMPLIBS!$GMPLIBS$ac_delim | |
18518 | GMPINC!$GMPINC$ac_delim | |
18519 | LIBOBJS!$LIBOBJS$ac_delim | |
18520 | LTLIBOBJS!$LTLIBOBJS$ac_delim | |
18521 | _ACEOF | |
18522 | ||
18523 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then | |
18524 | break | |
18525 | elif $ac_last_try; then | |
18526 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 | |
18527 | echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} | |
18528 | { (exit 1); exit 1; }; } | |
18529 | else | |
18530 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18531 | fi | |
18532 | done | |
18533 | ||
18534 | ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` | |
18535 | if test -n "$ac_eof"; then | |
18536 | ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` | |
18537 | ac_eof=`expr $ac_eof + 1` | |
18538 | fi | |
18539 | ||
18540 | cat >>$CONFIG_STATUS <<_ACEOF | |
18541 | cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof | |
18542 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end | |
18543 | _ACEOF | |
18544 | sed ' | |
18545 | s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g | |
18546 | s/^/s,@/; s/!/@,|#_!!_#|/ | |
18547 | :n | |
18548 | t n | |
18549 | s/'"$ac_delim"'$/,g/; t | |
18550 | s/$/\\/; p | |
18551 | N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n | |
18552 | ' >>$CONFIG_STATUS <conf$$subs.sed | |
18553 | rm -f conf$$subs.sed | |
18554 | cat >>$CONFIG_STATUS <<_ACEOF | |
18555 | :end | |
18556 | s/|#_!!_#|//g | |
18557 | CEOF$ac_eof | |
18558 | _ACEOF | |
18559 | ||
18560 | ||
18561 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
18562 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
18563 | # trailing colons and then remove the whole line if VPATH becomes empty | |
18564 | # (actually we leave an empty line to preserve line numbers). | |
18565 | if test "x$srcdir" = x.; then | |
18566 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
18567 | s/:*\$(srcdir):*/:/ | |
18568 | s/:*\${srcdir}:*/:/ | |
18569 | s/:*@srcdir@:*/:/ | |
18570 | s/^\([^=]*=[ ]*\):*/\1/ | |
18571 | s/:*$// | |
18572 | s/^[^=]*=[ ]*$// | |
18573 | }' | |
18574 | fi | |
18575 | ||
ba479fd2 | 18576 | cat >>$CONFIG_STATUS <<\_ACEOF |
ab22c1fa CF |
18577 | fi # test -n "$CONFIG_FILES" |
18578 | ||
18579 | ||
18580 | for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS | |
18581 | do | |
18582 | case $ac_tag in | |
18583 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18584 | esac | |
18585 | case $ac_mode$ac_tag in | |
18586 | :[FHL]*:*);; | |
18587 | :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 | |
18588 | echo "$as_me: error: Invalid tag $ac_tag." >&2;} | |
18589 | { (exit 1); exit 1; }; };; | |
18590 | :[FH]-) ac_tag=-:-;; | |
18591 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18592 | esac | |
18593 | ac_save_IFS=$IFS | |
18594 | IFS=: | |
18595 | set x $ac_tag | |
18596 | IFS=$ac_save_IFS | |
18597 | shift | |
18598 | ac_file=$1 | |
18599 | shift | |
18600 | ||
18601 | case $ac_mode in | |
18602 | :L) ac_source=$1;; | |
18603 | :[FH]) | |
18604 | ac_file_inputs= | |
18605 | for ac_f | |
18606 | do | |
18607 | case $ac_f in | |
18608 | -) ac_f="$tmp/stdin";; | |
18609 | *) # Look for the file first in the build tree, then in the source tree | |
18610 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18611 | # because $ac_f cannot contain `:'. | |
18612 | test -f "$ac_f" || | |
18613 | case $ac_f in | |
18614 | [\\/$]*) false;; | |
18615 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18616 | esac || | |
18617 | { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 | |
18618 | echo "$as_me: error: cannot find input file: $ac_f" >&2;} | |
18619 | { (exit 1); exit 1; }; };; | |
18620 | esac | |
18621 | ac_file_inputs="$ac_file_inputs $ac_f" | |
18622 | done | |
18623 | ||
18624 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18625 | # use $as_me), people would be surprised to read: | |
18626 | # /* config.h. Generated by config.status. */ | |
18627 | configure_input="Generated from "`IFS=: | |
18628 | echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." | |
18629 | if test x"$ac_file" != x-; then | |
18630 | configure_input="$ac_file. $configure_input" | |
18631 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
18632 | echo "$as_me: creating $ac_file" >&6;} | |
18633 | fi | |
18634 | ||
18635 | case $ac_tag in | |
18636 | *:-:* | *:-) cat >"$tmp/stdin";; | |
18637 | esac | |
18638 | ;; | |
703d89ab ZW |
18639 | esac |
18640 | ||
ab22c1fa | 18641 | ac_dir=`$as_dirname -- "$ac_file" || |
ba479fd2 | 18642 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
18643 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
18644 | X"$ac_file" : 'X\(//\)$' \| \ | |
ab22c1fa | 18645 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 18646 | echo X"$ac_file" | |
ab22c1fa CF |
18647 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
18648 | s//\1/ | |
18649 | q | |
18650 | } | |
18651 | /^X\(\/\/\)[^/].*/{ | |
18652 | s//\1/ | |
18653 | q | |
18654 | } | |
18655 | /^X\(\/\/\)$/{ | |
18656 | s//\1/ | |
18657 | q | |
18658 | } | |
18659 | /^X\(\/\).*/{ | |
18660 | s//\1/ | |
18661 | q | |
18662 | } | |
18663 | s/.*/./; q'` | |
18664 | { as_dir="$ac_dir" | |
18665 | case $as_dir in #( | |
18666 | -*) as_dir=./$as_dir;; | |
18667 | esac | |
18668 | test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { | |
ba479fd2 | 18669 | as_dirs= |
ab22c1fa CF |
18670 | while :; do |
18671 | case $as_dir in #( | |
18672 | *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( | |
18673 | *) as_qdir=$as_dir;; | |
18674 | esac | |
18675 | as_dirs="'$as_qdir' $as_dirs" | |
18676 | as_dir=`$as_dirname -- "$as_dir" || | |
ba479fd2 | 18677 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
18678 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
18679 | X"$as_dir" : 'X\(//\)$' \| \ | |
ab22c1fa | 18680 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
ba479fd2 | 18681 | echo X"$as_dir" | |
ab22c1fa CF |
18682 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
18683 | s//\1/ | |
18684 | q | |
18685 | } | |
18686 | /^X\(\/\/\)[^/].*/{ | |
18687 | s//\1/ | |
18688 | q | |
18689 | } | |
18690 | /^X\(\/\/\)$/{ | |
18691 | s//\1/ | |
18692 | q | |
18693 | } | |
18694 | /^X\(\/\).*/{ | |
18695 | s//\1/ | |
18696 | q | |
18697 | } | |
18698 | s/.*/./; q'` | |
18699 | test -d "$as_dir" && break | |
ba479fd2 | 18700 | done |
ab22c1fa CF |
18701 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
18702 | } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 | |
18703 | echo "$as_me: error: cannot create directory $as_dir" >&2;} | |
ba479fd2 | 18704 | { (exit 1); exit 1; }; }; } |
ba479fd2 NN |
18705 | ac_builddir=. |
18706 | ||
ab22c1fa CF |
18707 | case "$ac_dir" in |
18708 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18709 | *) | |
ba479fd2 | 18710 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
ab22c1fa CF |
18711 | # A ".." for each directory in $ac_dir_suffix. |
18712 | ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` | |
18713 | case $ac_top_builddir_sub in | |
18714 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18715 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18716 | esac ;; | |
18717 | esac | |
18718 | ac_abs_top_builddir=$ac_pwd | |
18719 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18720 | # for backward compatibility: | |
18721 | ac_top_builddir=$ac_top_build_prefix | |
ba479fd2 NN |
18722 | |
18723 | case $srcdir in | |
ab22c1fa | 18724 | .) # We are building in place. |
ba479fd2 | 18725 | ac_srcdir=. |
ab22c1fa CF |
18726 | ac_top_srcdir=$ac_top_builddir_sub |
18727 | ac_abs_top_srcdir=$ac_pwd ;; | |
18728 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
ba479fd2 | 18729 | ac_srcdir=$srcdir$ac_dir_suffix; |
ab22c1fa CF |
18730 | ac_top_srcdir=$srcdir |
18731 | ac_abs_top_srcdir=$srcdir ;; | |
18732 | *) # Relative name. | |
18733 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18734 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18735 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
ba479fd2 | 18736 | esac |
ab22c1fa | 18737 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
ba479fd2 NN |
18738 | |
18739 | ||
ab22c1fa CF |
18740 | case $ac_mode in |
18741 | :F) | |
18742 | # | |
18743 | # CONFIG_FILE | |
18744 | # | |
a6ccdbab | 18745 | |
ab22c1fa | 18746 | _ACEOF |
703d89ab | 18747 | |
ab22c1fa CF |
18748 | cat >>$CONFIG_STATUS <<\_ACEOF |
18749 | # If the template does not know about datarootdir, expand it. | |
18750 | # FIXME: This hack should be removed a few years after 2.60. | |
18751 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18752 | ||
18753 | case `sed -n '/datarootdir/ { | |
18754 | p | |
18755 | q | |
18756 | } | |
18757 | /@datadir@/p | |
18758 | /@docdir@/p | |
18759 | /@infodir@/p | |
18760 | /@localedir@/p | |
18761 | /@mandir@/p | |
18762 | ' $ac_file_inputs` in | |
18763 | *datarootdir*) ac_datarootdir_seen=yes;; | |
18764 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
18765 | { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
18766 | echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
18767 | _ACEOF | |
18768 | cat >>$CONFIG_STATUS <<_ACEOF | |
18769 | ac_datarootdir_hack=' | |
18770 | s&@datadir@&$datadir&g | |
18771 | s&@docdir@&$docdir&g | |
18772 | s&@infodir@&$infodir&g | |
18773 | s&@localedir@&$localedir&g | |
18774 | s&@mandir@&$mandir&g | |
18775 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
18776 | esac | |
a6ccdbab | 18777 | _ACEOF |
ab22c1fa CF |
18778 | |
18779 | # Neutralize VPATH when `$srcdir' = `.'. | |
18780 | # Shell code in configure.ac might set extrasub. | |
18781 | # FIXME: do we really want to maintain this feature? | |
ba479fd2 NN |
18782 | cat >>$CONFIG_STATUS <<_ACEOF |
18783 | sed "$ac_vpsub | |
18784 | $extrasub | |
18785 | _ACEOF | |
18786 | cat >>$CONFIG_STATUS <<\_ACEOF | |
18787 | :t | |
18788 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
ab22c1fa CF |
18789 | s&@configure_input@&$configure_input&;t t |
18790 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
18791 | s&@srcdir@&$ac_srcdir&;t t | |
18792 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
18793 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
18794 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
18795 | s&@builddir@&$ac_builddir&;t t | |
18796 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
18797 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
18798 | $ac_datarootdir_hack | |
18799 | " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out | |
18800 | ||
18801 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
18802 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
18803 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
18804 | { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18805 | which seems to be undefined. Please make sure it is defined." >&5 | |
18806 | echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
18807 | which seems to be undefined. Please make sure it is defined." >&2;} | |
18808 | ||
18809 | rm -f "$tmp/stdin" | |
be0fe523 | 18810 | case $ac_file in |
ab22c1fa CF |
18811 | -) cat "$tmp/out"; rm -f "$tmp/out";; |
18812 | *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; | |
be0fe523 | 18813 | esac |
ab22c1fa CF |
18814 | ;; |
18815 | :H) | |
18816 | # | |
18817 | # CONFIG_HEADER | |
18818 | # | |
18819 | _ACEOF | |
18820 | ||
18821 | # Transform confdefs.h into a sed script `conftest.defines', that | |
18822 | # substitutes the proper values into config.h.in to produce config.h. | |
18823 | rm -f conftest.defines conftest.tail | |
18824 | # First, append a space to every undef/define line, to ease matching. | |
18825 | echo 's/$/ /' >conftest.defines | |
18826 | # Then, protect against being on the right side of a sed subst, or in | |
18827 | # an unquoted here document, in config.status. If some macros were | |
18828 | # called several times there might be several #defines for the same | |
18829 | # symbol, which is useless. But do not sort them, since the last | |
18830 | # AC_DEFINE must be honored. | |
18831 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18832 | # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where | |
18833 | # NAME is the cpp macro being defined, VALUE is the value it is being given. | |
18834 | # PARAMS is the parameter list in the macro definition--in most cases, it's | |
18835 | # just an empty string. | |
18836 | ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' | |
18837 | ac_dB='\\)[ (].*,\\1define\\2' | |
a3bba767 | 18838 | ac_dC=' ' |
ab22c1fa CF |
18839 | ac_dD=' ,' |
18840 | ||
18841 | uniq confdefs.h | | |
18842 | sed -n ' | |
18843 | t rset | |
18844 | :rset | |
18845 | s/^[ ]*#[ ]*define[ ][ ]*// | |
18846 | t ok | |
18847 | d | |
18848 | :ok | |
18849 | s/[\\&,]/\\&/g | |
18850 | s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p | |
18851 | s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p | |
18852 | ' >>conftest.defines | |
18853 | ||
18854 | # Remove the space that was appended to ease matching. | |
18855 | # Then replace #undef with comments. This is necessary, for | |
861bb6c1 JL |
18856 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
18857 | # on some systems where configure will not decide to define it. | |
ab22c1fa CF |
18858 | # (The regexp can be short, since the line contains either #define or #undef.) |
18859 | echo 's/ $// | |
18860 | s,^[ #]*u.*,/* & */,' >>conftest.defines | |
18861 | ||
18862 | # Break up conftest.defines: | |
18863 | ac_max_sed_lines=50 | |
18864 | ||
18865 | # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" | |
18866 | # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" | |
18867 | # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" | |
18868 | # et cetera. | |
18869 | ac_in='$ac_file_inputs' | |
18870 | ac_out='"$tmp/out1"' | |
18871 | ac_nxt='"$tmp/out2"' | |
18872 | ||
18873 | while : | |
ba479fd2 | 18874 | do |
ab22c1fa CF |
18875 | # Write a here document: |
18876 | cat >>$CONFIG_STATUS <<_ACEOF | |
18877 | # First, check the format of the line: | |
18878 | cat >"\$tmp/defines.sed" <<\\CEOF | |
18879 | /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def | |
18880 | /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def | |
18881 | b | |
18882 | :def | |
18883 | _ACEOF | |
18884 | sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS | |
ba479fd2 | 18885 | echo 'CEOF |
ab22c1fa CF |
18886 | sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS |
18887 | ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in | |
18888 | sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail | |
18889 | grep . conftest.tail >/dev/null || break | |
ba479fd2 NN |
18890 | rm -f conftest.defines |
18891 | mv conftest.tail conftest.defines | |
18892 | done | |
ab22c1fa | 18893 | rm -f conftest.defines conftest.tail |
ba479fd2 | 18894 | |
ab22c1fa | 18895 | echo "ac_result=$ac_in" >>$CONFIG_STATUS |
ba479fd2 | 18896 | cat >>$CONFIG_STATUS <<\_ACEOF |
ba479fd2 | 18897 | if test x"$ac_file" != x-; then |
ab22c1fa CF |
18898 | echo "/* $configure_input */" >"$tmp/config.h" |
18899 | cat "$ac_result" >>"$tmp/config.h" | |
18900 | if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then | |
ba479fd2 NN |
18901 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 |
18902 | echo "$as_me: $ac_file is unchanged" >&6;} | |
18903 | else | |
ba479fd2 | 18904 | rm -f $ac_file |
ab22c1fa | 18905 | mv "$tmp/config.h" $ac_file |
ba479fd2 NN |
18906 | fi |
18907 | else | |
ab22c1fa CF |
18908 | echo "/* $configure_input */" |
18909 | cat "$ac_result" | |
ba479fd2 | 18910 | fi |
ab22c1fa CF |
18911 | rm -f "$tmp/out12" |
18912 | ;; | |
a3bba767 | 18913 | |
ab22c1fa CF |
18914 | :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 |
18915 | echo "$as_me: executing $ac_file commands" >&6;} | |
18916 | ;; | |
18917 | esac | |
a3bba767 JJ |
18918 | |
18919 | ||
ab22c1fa CF |
18920 | case $ac_file$ac_mode in |
18921 | "as":F) chmod +x as ;; | |
18922 | "collect-ld":F) chmod +x collect-ld ;; | |
18923 | "nm":F) chmod +x nm ;; | |
18924 | "default":C) | |
f1faaabd NN |
18925 | case ${CONFIG_HEADERS} in |
18926 | *auto-host.h:config.in*) | |
18927 | echo > cstamp-h ;; | |
861bb6c1 | 18928 | esac |
2ed26f6b | 18929 | # Make sure all the subdirs exist. |
3b620440 | 18930 | for d in $subdirs doc build |
2ed26f6b | 18931 | do |
2ed26f6b | 18932 | test -d $d || mkdir $d |
2ed26f6b | 18933 | done |
ba479fd2 | 18934 | ;; |
ab22c1fa | 18935 | |
ba479fd2 | 18936 | esac |
ab22c1fa | 18937 | done # for ac_tag |
cafe096b | 18938 | |
ba479fd2 NN |
18939 | |
18940 | { (exit 0); exit 0; } | |
18941 | _ACEOF | |
861bb6c1 | 18942 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
18943 | ac_clean_files=$ac_clean_files_save |
18944 | ||
18945 | ||
18946 | # configure is writing to config.log, and then calls config.status. | |
18947 | # config.status does its own redirection, appending to config.log. | |
18948 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
18949 | # by configure, so config.status won't be able to write to it; its | |
18950 | # output is simply discarded. So we exec the FD to /dev/null, | |
18951 | # effectively closing config.log, so it can be properly (re)opened and | |
18952 | # appended to by config.status. When coming back to configure, we | |
18953 | # need to make the FD available again. | |
18954 | if test "$no_create" != yes; then | |
18955 | ac_cs_success=: | |
18956 | ac_config_status_args= | |
18957 | test "$silent" = yes && | |
18958 | ac_config_status_args="$ac_config_status_args --quiet" | |
18959 | exec 5>/dev/null | |
18960 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
18961 | exec 5>>config.log | |
18962 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
18963 | # would make configure fail if this is the last instruction. | |
18964 | $ac_cs_success || { (exit 1); exit 1; } | |
18965 | fi | |
861bb6c1 | 18966 |