]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
re PR c++/37875 ([c++0x] misinterpreted closing angle bracket in decltype operand)
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
5213506e
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
861bb6c1
JL
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
5213506e
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
ba479fd2 14
5213506e
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
ba479fd2
NN
18 emulate sh
19 NULLCMD=:
5213506e 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
ba479fd2
NN
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
ba479fd2
NN
31fi
32
5213506e
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
ba479fd2
NN
79fi
80
81
5213506e
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
ba479fd2
NN
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
5213506e
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
ba479fd2 184do
5213506e
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
ba479fd2 228 else
5213506e
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
ba479fd2 233 fi
5213506e
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
263
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
ba479fd2 356
5213506e
RW
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
ba479fd2
NN
375 as_expr=expr
376else
377 as_expr=false
378fi
379
5213506e 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
ba479fd2
NN
381 as_basename=basename
382else
383 as_basename=false
384fi
385
5213506e
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
ba479fd2 391
5213506e 392as_me=`$as_basename -- "$0" ||
ba479fd2
NN
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
5213506e
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
ab22c1fa 410
b61ff9c8
BS
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
1a4b763e 417
ba479fd2 418
5213506e
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
ba479fd2 428 sed '
5213506e
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
ba479fd2 433 N
5213506e
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
ba479fd2 436 t loop
5213506e 437 s/-\n.*//
ba479fd2 438 ' >$as_me.lineno &&
5213506e
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
ba479fd2
NN
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
5213506e
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
ba479fd2
NN
446 # Exit status is that of the last command.
447 exit
448}
449
5213506e
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
ba479fd2
NN
461esac
462
5213506e
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
ba479fd2 466else
5213506e
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
ba479fd2 469fi
5213506e
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8 472 as_ln_s='ln -s'
5213506e
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b61ff9c8 483 fi
ba479fd2
NN
484else
485 as_ln_s='cp -p'
486fi
5213506e
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
861bb6c1 489
ba479fd2 490if mkdir -p . 2>/dev/null; then
5213506e 491 as_mkdir_p='mkdir -p "$as_dir"'
ba479fd2 492else
86da66b5 493 test -d ./-p && rmdir ./-p
ba479fd2
NN
494 as_mkdir_p=false
495fi
496
5213506e
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
ba479fd2
NN
519
520# Sed expression to map a string onto a valid CPP name.
86da66b5 521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
522
523# Sed expression to map a string onto a valid variable name.
86da66b5 524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
525
526
da0f6381
PB
527
528# Check that we are running under the correct shell.
529SHELL=${CONFIG_SHELL-/bin/sh}
530
531case X$lt_ECHO in
532X*--fallback-echo)
533 # Remove one level of quotation (which was required for Make).
534 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
535 ;;
536esac
537
538ECHO=${lt_ECHO-echo}
539if test "X$1" = X--no-reexec; then
540 # Discard the --no-reexec flag, and continue.
541 shift
542elif test "X$1" = X--fallback-echo; then
543 # Avoid inline document here, it may be left over
544 :
545elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
546 # Yippee, $ECHO works!
547 :
548else
549 # Restart under the correct shell.
550 exec $SHELL "$0" --no-reexec ${1+"$@"}
551fi
552
553if test "X$1" = X--fallback-echo; then
554 # used as fallback echo
555 shift
556 cat <<_LT_EOF
557$*
558_LT_EOF
559 exit 0
560fi
561
562# The HP-UX ksh and POSIX shell print the target directory to stdout
563# if CDPATH is set.
564(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
565
566if test -z "$lt_ECHO"; then
567 if test "X${echo_test_string+set}" != Xset; then
568 # find a string as large as possible, as long as the shell can cope with it
569 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
570 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
571 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
572 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
573 then
574 break
575 fi
576 done
577 fi
578
579 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
580 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
581 test "X$echo_testing_string" = "X$echo_test_string"; then
582 :
583 else
584 # The Solaris, AIX, and Digital Unix default echo programs unquote
585 # backslashes. This makes it impossible to quote backslashes using
586 # echo "$something" | sed 's/\\/\\\\/g'
587 #
588 # So, first we look for a working echo in the user's PATH.
589
590 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
591 for dir in $PATH /usr/ucb; do
592 IFS="$lt_save_ifs"
593 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
594 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
595 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
596 test "X$echo_testing_string" = "X$echo_test_string"; then
597 ECHO="$dir/echo"
598 break
599 fi
600 done
601 IFS="$lt_save_ifs"
602
603 if test "X$ECHO" = Xecho; then
604 # We didn't find a better echo, so look for alternatives.
605 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
606 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
607 test "X$echo_testing_string" = "X$echo_test_string"; then
608 # This shell has a builtin print -r that does the trick.
609 ECHO='print -r'
610 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
611 test "X$CONFIG_SHELL" != X/bin/ksh; then
612 # If we have ksh, try running configure again with it.
613 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
614 export ORIGINAL_CONFIG_SHELL
615 CONFIG_SHELL=/bin/ksh
616 export CONFIG_SHELL
617 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
618 else
619 # Try using printf.
620 ECHO='printf %s\n'
621 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
622 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
623 test "X$echo_testing_string" = "X$echo_test_string"; then
624 # Cool, printf works
625 :
626 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
627 test "X$echo_testing_string" = 'X\t' &&
628 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
629 test "X$echo_testing_string" = "X$echo_test_string"; then
630 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
631 export CONFIG_SHELL
632 SHELL="$CONFIG_SHELL"
633 export SHELL
634 ECHO="$CONFIG_SHELL $0 --fallback-echo"
635 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
636 test "X$echo_testing_string" = 'X\t' &&
637 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
638 test "X$echo_testing_string" = "X$echo_test_string"; then
639 ECHO="$CONFIG_SHELL $0 --fallback-echo"
640 else
641 # maybe with a smaller string...
642 prev=:
643
644 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
645 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
646 then
647 break
648 fi
649 prev="$cmd"
650 done
651
652 if test "$prev" != 'sed 50q "$0"'; then
653 echo_test_string=`eval $prev`
654 export echo_test_string
655 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
656 else
657 # Oops. We lost completely, so just stick with echo.
658 ECHO=echo
659 fi
660 fi
661 fi
662 fi
663 fi
664fi
665
666# Copy echo and quote the copy suitably for passing to libtool from
667# the Makefile, instead of quoting the original, which is used later.
668lt_ECHO=$ECHO
669if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
670 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
671fi
672
673
674
675
5213506e
RW
676exec 7<&0 </dev/null 6>&1
677
ba479fd2
NN
678# Name of the host.
679# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
680# so uname gets run too.
681ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
682
ba479fd2
NN
683#
684# Initializations.
685#
861bb6c1 686ac_default_prefix=/usr/local
5213506e 687ac_clean_files=
ba479fd2 688ac_config_libobj_dir=.
5213506e 689LIBOBJS=
ba479fd2
NN
690cross_compiling=no
691subdirs=
692MFLAGS=
693MAKEFLAGS=
b61ff9c8 694
ba479fd2
NN
695# Identity of this package.
696PACKAGE_NAME=
697PACKAGE_TARNAME=
698PACKAGE_VERSION=
699PACKAGE_STRING=
700PACKAGE_BUGREPORT=
5213506e 701PACKAGE_URL=
ba479fd2
NN
702
703ac_unique_file="tree.c"
704# Factoring default headers for most tests.
705ac_includes_default="\
706#include <stdio.h>
5213506e 707#ifdef HAVE_SYS_TYPES_H
ba479fd2
NN
708# include <sys/types.h>
709#endif
5213506e 710#ifdef HAVE_SYS_STAT_H
ba479fd2
NN
711# include <sys/stat.h>
712#endif
5213506e 713#ifdef STDC_HEADERS
ba479fd2
NN
714# include <stdlib.h>
715# include <stddef.h>
716#else
5213506e 717# ifdef HAVE_STDLIB_H
ba479fd2
NN
718# include <stdlib.h>
719# endif
720#endif
5213506e
RW
721#ifdef HAVE_STRING_H
722# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
ba479fd2
NN
723# include <memory.h>
724# endif
725# include <string.h>
726#endif
5213506e 727#ifdef HAVE_STRINGS_H
ba479fd2
NN
728# include <strings.h>
729#endif
5213506e 730#ifdef HAVE_INTTYPES_H
ba479fd2 731# include <inttypes.h>
ba479fd2 732#endif
5213506e
RW
733#ifdef HAVE_STDINT_H
734# include <stdint.h>
735#endif
736#ifdef HAVE_UNISTD_H
ba479fd2
NN
737# include <unistd.h>
738#endif"
739
5213506e
RW
740ac_subst_vars='LTLIBOBJS
741LIBOBJS
742enable_plugin
743pluginlibs
d7f09764
DN
744LIBELFINC
745LIBELFLIBS
5213506e
RW
746CLOOGINC
747CLOOGLIBS
748PPLINC
749PPLLIBS
750GMPINC
751GMPLIBS
752target_cpu_default
753fortran_target_objs
754cxx_target_objs
755c_target_objs
756use_gcc_stdint
757xm_defines
758xm_include_list
759xm_file_list
760tm_p_include_list
761tm_p_file_list
762tm_defines
763tm_include_list
764tm_file_list
765thread_file
766out_object_file
767out_file
768objc_boehm_gc
769md_file
770local_prefix
771lang_tree_files
772lang_specs_files
773lang_opt_files
774install
775out_host_hook_obj
776host_xm_defines
777host_xm_include_list
778host_xm_file_list
779host_exeext
780gcc_gxx_include_dir
781gcc_config_arguments
782float_h_file
783extra_programs
784extra_passes
785extra_parts
786extra_objs
787extra_headers_list
788extra_gcc_objs
789TM_MULTILIB_EXCEPTIONS_CONFIG
790TM_MULTILIB_CONFIG
791TM_ENDIAN_CONFIG
792tmake_file
793xmake_file
794cpp_install_dir
795check_languages
796build_file_translate
797build_xm_defines
798build_xm_include_list
799build_xm_file_list
800build_install_headers_dir
801build_exeext
802all_selected_languages
803all_languages
804all_lang_makefiles
805all_lang_makefrags
806all_gtfiles
807all_compilers
808srcdir
809subdirs
810slibdir
811dollar
812gcc_tooldir
d7f09764 813enable_lto
5213506e
RW
814MAINT
815zlibinc
816zlibdir
817HOST_LIBS
818GGC
819libgcc_visibility
820gcc_cv_readelf
821gcc_cv_objdump
822ORIGINAL_NM_FOR_TARGET
823gcc_cv_nm
824ORIGINAL_LD_FOR_TARGET
825gcc_cv_ld
826ORIGINAL_AS_FOR_TARGET
827gcc_cv_as
828enable_fast_install
829objdir
830CXXCPP
831OTOOL64
832OTOOL
833LIPO
834NMEDIT
835DSYMUTIL
836lt_ECHO
837STRIP
838OBJDUMP
839ac_ct_DUMPBIN
840DUMPBIN
841LD
842FGREP
843SED
844LIBTOOL
845collect2
846STMP_FIXINC
847BUILD_LDFLAGS
848BUILD_CFLAGS
849CC_FOR_BUILD
850inhibit_libc
851SYSTEM_HEADER_DIR
852ALL
853CROSS
854CATOBJEXT
855GENCAT
856INSTOBJEXT
857DATADIRNAME
858CATALOGS
859POSUB
860GMSGFMT
861XGETTEXT
862INCINTL
863LIBINTL_DEP
864LIBINTL
865USE_NLS
866extra_opt_files
867extra_modes_file
868gthread_flags
869objext
870manext
871LIBICONV_DEP
872LTLIBICONV
873LIBICONV
874LDEXP_LIB
875GNAT_LIBEXC
876COLLECT2_LIBS
877AR
878NM
879BISON
880FLEX
881GENERATED_MANPAGES
882BUILD_INFO
883MAKEINFO
884have_mktemp_command
885make_compare_target
886INSTALL_DATA
887INSTALL_PROGRAM
888INSTALL
889ranlib_flags
890RANLIB
891LN
892LN_S
893AWK
894SET_MAKE
895REPORT_BUGS_TEXI
896REPORT_BUGS_TO
897PKGVERSION
898onestep
899CROSS_SYSTEM_HEADER_DIR
900TARGET_SYSTEM_ROOT_DEFINE
901TARGET_SYSTEM_ROOT
902enable_shared
903enable_fixed_point
904enable_decimal_float
905enable_multilib
906ENABLE_BUILD_WITH_CXX
907coverage_flags
908valgrind_command
909valgrind_path_defines
910valgrind_path
911TREEBROWSER
912nocommon_flag
913warn_cxxflags
914warn_cflags
915c_strict_warn
916strict_warn
917c_loose_warn
918loose_warn
919EGREP
920GREP
921CPP
922OUTPUT_OPTION
923NO_MINUS_C_MINUS_O
924GNATMAKE
925GNATBIND
926ac_ct_CXX
927CXXFLAGS
928CXX
929OBJEXT
930EXEEXT
931ac_ct_CC
932CPPFLAGS
933LDFLAGS
934CFLAGS
935CC
936GENINSRC
937target_subdir
938host_subdir
939build_subdir
940build_libsubdir
941target_noncanonical
942target_os
943target_vendor
944target_cpu
945target
946host_os
947host_vendor
948host_cpu
949host
950build_os
951build_vendor
952build_cpu
953build
954target_alias
955host_alias
956build_alias
957LIBS
958ECHO_T
959ECHO_N
960ECHO_C
961DEFS
962mandir
963localedir
964libdir
965psdir
966pdfdir
967dvidir
968htmldir
969infodir
970docdir
971oldincludedir
972includedir
973localstatedir
974sharedstatedir
975sysconfdir
976datadir
977datarootdir
978libexecdir
979sbindir
980bindir
981program_transform_name
982prefix
983exec_prefix
984PACKAGE_URL
985PACKAGE_BUGREPORT
986PACKAGE_STRING
987PACKAGE_VERSION
988PACKAGE_TARNAME
989PACKAGE_NAME
990PATH_SEPARATOR
991SHELL'
ba479fd2 992ac_subst_files='language_hooks'
5213506e
RW
993ac_user_opts='
994enable_option_checking
995with_build_libsubdir
996with_local_prefix
997with_gxx_include_dir
998with_cpp_install_dir
999enable_generated_files_in_srcdir
1000with_gnu_ld
1001with_ld
1002with_demangler_in_ld
1003with_gnu_as
1004with_as
1005enable_werror_always
1006enable_checking
1007enable_coverage
1008enable_gather_detailed_mem_stats
1009enable_build_with_cxx
1010with_stabs
1011enable_multilib
1012enable___cxa_atexit
1013enable_decimal_float
1014enable_fixed_point
1015enable_threads
1016enable_tls
1017enable_objc_gc
1018with_dwarf2
1019enable_shared
1020with_build_sysroot
1021with_sysroot
1022enable_intermodule
1023with_pkgversion
1024with_bugurl
1025enable_languages
1026with_multilib_list
1027enable_rpath
1028with_libiconv_prefix
1029enable_initfini_array
1030enable_sjlj_exceptions
1031with_system_libunwind
1032enable_secureplt
1033enable_cld
1034enable_win32_registry
1035enable_static
1036with_pic
1037enable_fast_install
1038enable_libtool_lock
1039enable_gnu_unique_object
1040enable_linker_build_id
1041with_long_double_128
1042with_gc
1043with_system_zlib
1044enable_maintainer_mode
1045enable_version_specific_runtime_libs
1046with_slibdir
5213506e
RW
1047enable_plugin
1048'
1049 ac_precious_vars='build_alias
1050host_alias
1051target_alias
1052CC
1053CFLAGS
1054LDFLAGS
1055LIBS
1056CPPFLAGS
1057CXX
1058CXXFLAGS
1059CCC
1060CPP
1061CXXCPP
1062GMPLIBS
1063GMPINC
1064PPLLIBS
1065PPLINC
1066CLOOGLIBS
d7f09764
DN
1067CLOOGINC
1068LIBELFLIBS
1069LIBELFINC'
5213506e 1070
861bb6c1
JL
1071
1072# Initialize some variables set by options.
ba479fd2
NN
1073ac_init_help=
1074ac_init_version=false
5213506e
RW
1075ac_unrecognized_opts=
1076ac_unrecognized_sep=
861bb6c1
JL
1077# The variables have the same names as the options, with
1078# dashes changed to underlines.
ba479fd2 1079cache_file=/dev/null
861bb6c1 1080exec_prefix=NONE
861bb6c1 1081no_create=
861bb6c1
JL
1082no_recursion=
1083prefix=NONE
1084program_prefix=NONE
1085program_suffix=NONE
1086program_transform_name=s,x,x,
1087silent=
1088site=
1089srcdir=
861bb6c1
JL
1090verbose=
1091x_includes=NONE
1092x_libraries=NONE
ba479fd2
NN
1093
1094# Installation directory options.
1095# These are left unexpanded so users can "make install exec_prefix=/foo"
1096# and all the variables that are supposed to be based on exec_prefix
1097# by default will actually change.
1098# Use braces instead of parens because sh, perl, etc. also accept them.
5213506e 1099# (The list follows the same order as the GNU Coding Standards.)
861bb6c1
JL
1100bindir='${exec_prefix}/bin'
1101sbindir='${exec_prefix}/sbin'
1102libexecdir='${exec_prefix}/libexec'
5213506e
RW
1103datarootdir='${prefix}/share'
1104datadir='${datarootdir}'
861bb6c1
JL
1105sysconfdir='${prefix}/etc'
1106sharedstatedir='${prefix}/com'
1107localstatedir='${prefix}/var'
861bb6c1
JL
1108includedir='${prefix}/include'
1109oldincludedir='/usr/include'
5213506e
RW
1110docdir='${datarootdir}/doc/${PACKAGE}'
1111infodir='${datarootdir}/info'
1112htmldir='${docdir}'
1113dvidir='${docdir}'
1114pdfdir='${docdir}'
1115psdir='${docdir}'
1116libdir='${exec_prefix}/lib'
1117localedir='${datarootdir}/locale'
1118mandir='${datarootdir}/man'
861bb6c1 1119
861bb6c1 1120ac_prev=
5213506e 1121ac_dashdash=
861bb6c1
JL
1122for ac_option
1123do
861bb6c1
JL
1124 # If the previous option needs an argument, assign it.
1125 if test -n "$ac_prev"; then
5213506e 1126 eval $ac_prev=\$ac_option
861bb6c1
JL
1127 ac_prev=
1128 continue
1129 fi
1130
5213506e
RW
1131 case $ac_option in
1132 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1133 *) ac_optarg=yes ;;
1134 esac
861bb6c1
JL
1135
1136 # Accept the important Cygnus configure options, so we can diagnose typos.
1137
5213506e
RW
1138 case $ac_dashdash$ac_option in
1139 --)
1140 ac_dashdash=yes ;;
861bb6c1
JL
1141
1142 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1143 ac_prev=bindir ;;
1144 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 1145 bindir=$ac_optarg ;;
861bb6c1
JL
1146
1147 -build | --build | --buil | --bui | --bu)
ba479fd2 1148 ac_prev=build_alias ;;
861bb6c1 1149 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 1150 build_alias=$ac_optarg ;;
861bb6c1
JL
1151
1152 -cache-file | --cache-file | --cache-fil | --cache-fi \
1153 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1154 ac_prev=cache_file ;;
1155 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1156 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
1157 cache_file=$ac_optarg ;;
1158
1159 --config-cache | -C)
1160 cache_file=config.cache ;;
861bb6c1 1161
5213506e 1162 -datadir | --datadir | --datadi | --datad)
861bb6c1 1163 ac_prev=datadir ;;
5213506e 1164 -datadir=* | --datadir=* | --datadi=* | --datad=*)
ba479fd2 1165 datadir=$ac_optarg ;;
861bb6c1 1166
5213506e
RW
1167 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1168 | --dataroo | --dataro | --datar)
1169 ac_prev=datarootdir ;;
1170 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1171 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1172 datarootdir=$ac_optarg ;;
1173
861bb6c1 1174 -disable-* | --disable-*)
5213506e 1175 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 1176 # Reject names that are not valid shell variable names.
5213506e
RW
1177 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1178 as_fn_error "invalid feature name: $ac_useropt"
1179 ac_useropt_orig=$ac_useropt
1180 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181 case $ac_user_opts in
1182 *"
1183"enable_$ac_useropt"
1184"*) ;;
1185 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1186 ac_unrecognized_sep=', ';;
1187 esac
1188 eval enable_$ac_useropt=no ;;
1189
1190 -docdir | --docdir | --docdi | --doc | --do)
1191 ac_prev=docdir ;;
1192 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1193 docdir=$ac_optarg ;;
1194
1195 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1196 ac_prev=dvidir ;;
1197 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1198 dvidir=$ac_optarg ;;
861bb6c1
JL
1199
1200 -enable-* | --enable-*)
5213506e 1201 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 1202 # Reject names that are not valid shell variable names.
5213506e
RW
1203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1204 as_fn_error "invalid feature name: $ac_useropt"
1205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"enable_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
b61ff9c8 1213 esac
5213506e 1214 eval enable_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1215
1216 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1217 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1218 | --exec | --exe | --ex)
1219 ac_prev=exec_prefix ;;
1220 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1221 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1222 | --exec=* | --exe=* | --ex=*)
ba479fd2 1223 exec_prefix=$ac_optarg ;;
861bb6c1
JL
1224
1225 -gas | --gas | --ga | --g)
1226 # Obsolete; use --with-gas.
1227 with_gas=yes ;;
1228
ba479fd2
NN
1229 -help | --help | --hel | --he | -h)
1230 ac_init_help=long ;;
1231 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1232 ac_init_help=recursive ;;
1233 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1234 ac_init_help=short ;;
861bb6c1
JL
1235
1236 -host | --host | --hos | --ho)
ba479fd2 1237 ac_prev=host_alias ;;
861bb6c1 1238 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 1239 host_alias=$ac_optarg ;;
861bb6c1 1240
5213506e
RW
1241 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1242 ac_prev=htmldir ;;
1243 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1244 | --ht=*)
1245 htmldir=$ac_optarg ;;
1246
861bb6c1
JL
1247 -includedir | --includedir | --includedi | --included | --include \
1248 | --includ | --inclu | --incl | --inc)
1249 ac_prev=includedir ;;
1250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1251 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 1252 includedir=$ac_optarg ;;
861bb6c1
JL
1253
1254 -infodir | --infodir | --infodi | --infod | --info | --inf)
1255 ac_prev=infodir ;;
1256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 1257 infodir=$ac_optarg ;;
861bb6c1
JL
1258
1259 -libdir | --libdir | --libdi | --libd)
1260 ac_prev=libdir ;;
1261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 1262 libdir=$ac_optarg ;;
861bb6c1
JL
1263
1264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1265 | --libexe | --libex | --libe)
1266 ac_prev=libexecdir ;;
1267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1268 | --libexe=* | --libex=* | --libe=*)
ba479fd2 1269 libexecdir=$ac_optarg ;;
861bb6c1 1270
5213506e
RW
1271 -localedir | --localedir | --localedi | --localed | --locale)
1272 ac_prev=localedir ;;
1273 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1274 localedir=$ac_optarg ;;
1275
861bb6c1 1276 -localstatedir | --localstatedir | --localstatedi | --localstated \
5213506e 1277 | --localstate | --localstat | --localsta | --localst | --locals)
861bb6c1
JL
1278 ac_prev=localstatedir ;;
1279 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
5213506e 1280 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
ba479fd2 1281 localstatedir=$ac_optarg ;;
861bb6c1
JL
1282
1283 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1284 ac_prev=mandir ;;
1285 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 1286 mandir=$ac_optarg ;;
861bb6c1
JL
1287
1288 -nfp | --nfp | --nf)
1289 # Obsolete; use --without-fp.
1290 with_fp=no ;;
1291
1292 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 1293 | --no-cr | --no-c | -n)
861bb6c1
JL
1294 no_create=yes ;;
1295
1296 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1297 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1298 no_recursion=yes ;;
1299
1300 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1301 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1302 | --oldin | --oldi | --old | --ol | --o)
1303 ac_prev=oldincludedir ;;
1304 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1305 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1306 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 1307 oldincludedir=$ac_optarg ;;
861bb6c1
JL
1308
1309 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1310 ac_prev=prefix ;;
1311 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 1312 prefix=$ac_optarg ;;
861bb6c1
JL
1313
1314 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1315 | --program-pre | --program-pr | --program-p)
1316 ac_prev=program_prefix ;;
1317 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1318 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 1319 program_prefix=$ac_optarg ;;
861bb6c1
JL
1320
1321 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1322 | --program-suf | --program-su | --program-s)
1323 ac_prev=program_suffix ;;
1324 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1325 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 1326 program_suffix=$ac_optarg ;;
861bb6c1
JL
1327
1328 -program-transform-name | --program-transform-name \
1329 | --program-transform-nam | --program-transform-na \
1330 | --program-transform-n | --program-transform- \
1331 | --program-transform | --program-transfor \
1332 | --program-transfo | --program-transf \
1333 | --program-trans | --program-tran \
1334 | --progr-tra | --program-tr | --program-t)
1335 ac_prev=program_transform_name ;;
1336 -program-transform-name=* | --program-transform-name=* \
1337 | --program-transform-nam=* | --program-transform-na=* \
1338 | --program-transform-n=* | --program-transform-=* \
1339 | --program-transform=* | --program-transfor=* \
1340 | --program-transfo=* | --program-transf=* \
1341 | --program-trans=* | --program-tran=* \
1342 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 1343 program_transform_name=$ac_optarg ;;
861bb6c1 1344
5213506e
RW
1345 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1346 ac_prev=pdfdir ;;
1347 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1348 pdfdir=$ac_optarg ;;
1349
1350 -psdir | --psdir | --psdi | --psd | --ps)
1351 ac_prev=psdir ;;
1352 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1353 psdir=$ac_optarg ;;
1354
861bb6c1
JL
1355 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1356 | -silent | --silent | --silen | --sile | --sil)
1357 silent=yes ;;
1358
1359 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1360 ac_prev=sbindir ;;
1361 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1362 | --sbi=* | --sb=*)
ba479fd2 1363 sbindir=$ac_optarg ;;
861bb6c1
JL
1364
1365 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1366 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1367 | --sharedst | --shareds | --shared | --share | --shar \
1368 | --sha | --sh)
1369 ac_prev=sharedstatedir ;;
1370 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1371 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1372 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1373 | --sha=* | --sh=*)
ba479fd2 1374 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
1375
1376 -site | --site | --sit)
1377 ac_prev=site ;;
1378 -site=* | --site=* | --sit=*)
ba479fd2 1379 site=$ac_optarg ;;
861bb6c1
JL
1380
1381 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1382 ac_prev=srcdir ;;
1383 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 1384 srcdir=$ac_optarg ;;
861bb6c1
JL
1385
1386 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1387 | --syscon | --sysco | --sysc | --sys | --sy)
1388 ac_prev=sysconfdir ;;
1389 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1390 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 1391 sysconfdir=$ac_optarg ;;
861bb6c1
JL
1392
1393 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 1394 ac_prev=target_alias ;;
861bb6c1 1395 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 1396 target_alias=$ac_optarg ;;
861bb6c1
JL
1397
1398 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1399 verbose=yes ;;
1400
ba479fd2
NN
1401 -version | --version | --versio | --versi | --vers | -V)
1402 ac_init_version=: ;;
861bb6c1
JL
1403
1404 -with-* | --with-*)
5213506e 1405 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 1406 # Reject names that are not valid shell variable names.
5213506e
RW
1407 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1408 as_fn_error "invalid package name: $ac_useropt"
1409 ac_useropt_orig=$ac_useropt
1410 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1411 case $ac_user_opts in
1412 *"
1413"with_$ac_useropt"
1414"*) ;;
1415 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1416 ac_unrecognized_sep=', ';;
b61ff9c8 1417 esac
5213506e 1418 eval with_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1419
1420 -without-* | --without-*)
5213506e 1421 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 1422 # Reject names that are not valid shell variable names.
5213506e
RW
1423 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1424 as_fn_error "invalid package name: $ac_useropt"
1425 ac_useropt_orig=$ac_useropt
1426 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1427 case $ac_user_opts in
1428 *"
1429"with_$ac_useropt"
1430"*) ;;
1431 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1432 ac_unrecognized_sep=', ';;
1433 esac
1434 eval with_$ac_useropt=no ;;
861bb6c1
JL
1435
1436 --x)
1437 # Obsolete; use --with-x.
1438 with_x=yes ;;
1439
1440 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1441 | --x-incl | --x-inc | --x-in | --x-i)
1442 ac_prev=x_includes ;;
1443 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1444 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 1445 x_includes=$ac_optarg ;;
861bb6c1
JL
1446
1447 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1448 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1449 ac_prev=x_libraries ;;
1450 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1451 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 1452 x_libraries=$ac_optarg ;;
861bb6c1 1453
5213506e
RW
1454 -*) as_fn_error "unrecognized option: \`$ac_option'
1455Try \`$0 --help' for more information."
861bb6c1
JL
1456 ;;
1457
ba479fd2
NN
1458 *=*)
1459 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1460 # Reject names that are not valid shell variable names.
5213506e
RW
1461 case $ac_envvar in #(
1462 '' | [0-9]* | *[!_$as_cr_alnum]* )
1463 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1464 esac
1465 eval $ac_envvar=\$ac_optarg
ba479fd2
NN
1466 export $ac_envvar ;;
1467
861bb6c1 1468 *)
ba479fd2 1469 # FIXME: should be removed in autoconf 3.0.
5213506e 1470 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
ba479fd2 1471 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
5213506e 1472 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
ba479fd2 1473 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
1474 ;;
1475
1476 esac
1477done
1478
1479if test -n "$ac_prev"; then
ba479fd2 1480 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
5213506e 1481 as_fn_error "missing argument to $ac_option"
63cf211a 1482fi
63cf211a 1483
5213506e
RW
1484if test -n "$ac_unrecognized_opts"; then
1485 case $enable_option_checking in
1486 no) ;;
1487 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1488 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2f41c1d6 1489 esac
5213506e 1490fi
2f41c1d6 1491
5213506e
RW
1492# Check all directory arguments for consistency.
1493for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1494 datadir sysconfdir sharedstatedir localstatedir includedir \
1495 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1496 libdir localedir mandir
b61ff9c8 1497do
5213506e
RW
1498 eval ac_val=\$$ac_var
1499 # Remove trailing slashes.
1500 case $ac_val in
1501 */ )
1502 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1503 eval $ac_var=\$ac_val;;
1504 esac
1505 # Be sure to have absolute directory names.
b61ff9c8 1506 case $ac_val in
5213506e
RW
1507 [\\/$]* | ?:[\\/]* ) continue;;
1508 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
b61ff9c8 1509 esac
5213506e 1510 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
b61ff9c8
BS
1511done
1512
1513# There might be people who depend on the old broken behavior: `$host'
1514# used to hold the argument of --host etc.
1515# FIXME: To remove some day.
1516build=$build_alias
1517host=$host_alias
ba479fd2
NN
1518target=$target_alias
1519
1520# FIXME: To remove some day.
1521if test "x$host_alias" != x; then
1522 if test "x$build_alias" = x; then
1523 cross_compiling=maybe
5213506e 1524 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
ba479fd2
NN
1525 If a cross compiler is detected then cross compile mode will be used." >&2
1526 elif test "x$build_alias" != "x$host_alias"; then
1527 cross_compiling=yes
1528 fi
1529fi
6e3f3080 1530
ba479fd2
NN
1531ac_tool_prefix=
1532test -n "$host_alias" && ac_tool_prefix=$host_alias-
1533
1534test "$silent" = yes && exec 6>/dev/null
861bb6c1 1535
861bb6c1 1536
5213506e
RW
1537ac_pwd=`pwd` && test -n "$ac_pwd" &&
1538ac_ls_di=`ls -di .` &&
1539ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1540 as_fn_error "working directory cannot be determined"
1541test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1542 as_fn_error "pwd does not report name of working directory"
1543
1544
861bb6c1
JL
1545# Find the source files, if location was not specified.
1546if test -z "$srcdir"; then
1547 ac_srcdir_defaulted=yes
5213506e
RW
1548 # Try the directory containing this script, then the parent directory.
1549 ac_confdir=`$as_dirname -- "$as_myself" ||
1550$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1551 X"$as_myself" : 'X\(//\)[^/]' \| \
1552 X"$as_myself" : 'X\(//\)$' \| \
1553 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1554$as_echo X"$as_myself" |
1555 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1556 s//\1/
1557 q
1558 }
1559 /^X\(\/\/\)[^/].*/{
1560 s//\1/
1561 q
1562 }
1563 /^X\(\/\/\)$/{
1564 s//\1/
1565 q
1566 }
1567 /^X\(\/\).*/{
1568 s//\1/
1569 q
1570 }
1571 s/.*/./; q'`
861bb6c1 1572 srcdir=$ac_confdir
5213506e 1573 if test ! -r "$srcdir/$ac_unique_file"; then
861bb6c1
JL
1574 srcdir=..
1575 fi
1576else
1577 ac_srcdir_defaulted=no
1578fi
5213506e
RW
1579if test ! -r "$srcdir/$ac_unique_file"; then
1580 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1581 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1582fi
1583ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1584ac_abs_confdir=`(
1585 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1586 pwd)`
1587# When building in place, set srcdir=.
1588if test "$ac_abs_confdir" = "$ac_pwd"; then
1589 srcdir=.
1590fi
1591# Remove unnecessary trailing slashes from srcdir.
1592# Double slashes in file names in object file debugging info
1593# mess up M-x gdb in Emacs.
1594case $srcdir in
1595*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1596esac
1597for ac_var in $ac_precious_vars; do
1598 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1599 eval ac_env_${ac_var}_value=\$${ac_var}
1600 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1601 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1602done
63cf211a 1603
ba479fd2
NN
1604#
1605# Report the --help message.
1606#
1607if test "$ac_init_help" = "long"; then
1608 # Omit some internal or obsolete options to make the list less imposing.
1609 # This message is too long to be a string in the A/UX 3.1 sh.
1610 cat <<_ACEOF
1611\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 1612
ba479fd2 1613Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 1614
ba479fd2
NN
1615To assign environment variables (e.g., CC, CFLAGS...), specify them as
1616VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 1617
ba479fd2 1618Defaults for the options are specified in brackets.
861bb6c1 1619
ba479fd2
NN
1620Configuration:
1621 -h, --help display this help and exit
1622 --help=short display options specific to this package
1623 --help=recursive display the short help of all the included packages
1624 -V, --version display version information and exit
1625 -q, --quiet, --silent do not print \`checking...' messages
1626 --cache-file=FILE cache test results in FILE [disabled]
1627 -C, --config-cache alias for \`--cache-file=config.cache'
1628 -n, --no-create do not create output files
1629 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1630
ba479fd2
NN
1631Installation directories:
1632 --prefix=PREFIX install architecture-independent files in PREFIX
5213506e 1633 [$ac_default_prefix]
ba479fd2 1634 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5213506e 1635 [PREFIX]
861bb6c1 1636
ba479fd2
NN
1637By default, \`make install' will install all the files in
1638\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1639an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1640for instance \`--prefix=\$HOME'.
13c22933 1641
ba479fd2 1642For better control, use the options below.
13c22933 1643
ba479fd2 1644Fine tuning of the installation directories:
5213506e
RW
1645 --bindir=DIR user executables [EPREFIX/bin]
1646 --sbindir=DIR system admin executables [EPREFIX/sbin]
1647 --libexecdir=DIR program executables [EPREFIX/libexec]
1648 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1649 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1650 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1651 --libdir=DIR object code libraries [EPREFIX/lib]
1652 --includedir=DIR C header files [PREFIX/include]
1653 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1654 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1655 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1656 --infodir=DIR info documentation [DATAROOTDIR/info]
1657 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1658 --mandir=DIR man documentation [DATAROOTDIR/man]
1659 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1660 --htmldir=DIR html documentation [DOCDIR]
1661 --dvidir=DIR dvi documentation [DOCDIR]
1662 --pdfdir=DIR pdf documentation [DOCDIR]
1663 --psdir=DIR ps documentation [DOCDIR]
ba479fd2 1664_ACEOF
13c22933 1665
ba479fd2 1666 cat <<\_ACEOF
13c22933 1667
ba479fd2
NN
1668Program names:
1669 --program-prefix=PREFIX prepend PREFIX to installed program names
1670 --program-suffix=SUFFIX append SUFFIX to installed program names
1671 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1672
ba479fd2
NN
1673System types:
1674 --build=BUILD configure for building on BUILD [guessed]
1675 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1676 --target=TARGET configure for building compilers for TARGET [HOST]
1677_ACEOF
13c22933
JJ
1678fi
1679
ba479fd2 1680if test -n "$ac_init_help"; then
13c22933 1681
ba479fd2 1682 cat <<\_ACEOF
13c22933 1683
ba479fd2 1684Optional Features:
5213506e 1685 --disable-option-checking ignore unrecognized --enable/--with options
ba479fd2
NN
1686 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1687 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1688 --enable-generated-files-in-srcdir
1689 put copies of generated files in source dir
1690 intended for creating source tarballs for users
1691 without texinfo bison or flex.
3bbd5a19 1692 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1693 --enable-checking=LIST
1694 enable expensive run-time checks. With LIST,
1695 enable only specific categories of checks.
cdce5c16 1696 Categories are: yes,no,all,none,release.
726a989a 1697 Flags are: assert,df,fold,gc,gcac,gimple,misc,
7e98624c 1698 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1699 --enable-coverage=LEVEL
fb38008e 1700 enable compiler's code coverage collection.
ba479fd2
NN
1701 Use to measure compiler performance and locate
1702 unused parts of the compiler. With LEVEL, specify
1703 optimization. Values are opt, noopt,
1704 default is noopt
1705 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
00020c16 1706 --enable-build-with-cxx build with C++ compiler instead of C compiler
ba479fd2
NN
1707 --enable-multilib enable library support for multiple ABIs
1708 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1709 --enable-decimal-float={no,yes,bid,dpd}
1710 enable decimal float extension to C. Selecting 'bid'
1711 or 'dpd' choses which decimal floating point format
1712 to use
ab22c1fa 1713 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1714 --enable-threads enable thread usage for target GCC
1715 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1716 --enable-tls enable or disable generation of tls code
1717 overriding the assembler check for tls support
ba479fd2
NN
1718 --enable-objc-gc enable the use of Boehm's garbage collector with
1719 the GNU Objective-C runtime
1720 --disable-shared don't provide a shared libgcc
1721 --enable-intermodule build the compiler in one step
f3c9f174 1722 --enable-languages=LIST specify which front-ends to build
dfb77e37 1723 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1724 --enable-initfini-array use .init_array/.fini_array sections
1725 --enable-sjlj-exceptions
1726 arrange to use setjmp/longjmp exception handling
7f970b70 1727 --enable-secureplt enable -msecure-plt by default for PowerPC
922e3e33 1728 --enable-cld enable -mcld by default for 32bit x86
ba479fd2
NN
1729 --disable-win32-registry
1730 disable lookup of installation paths in the
1731 Registry on Windows hosts
1732 --enable-win32-registry enable registry lookup (default)
1733 --enable-win32-registry=KEY
1734 use KEY instead of GCC version as the last portion
1735 of the registry key
5213506e
RW
1736 --enable-shared[=PKGS] build shared libraries [default=yes]
1737 --enable-static[=PKGS] build static libraries [default=yes]
da0f6381
PB
1738 --enable-fast-install[=PKGS]
1739 optimize for fast installation [default=yes]
1740 --disable-libtool-lock avoid locking (might break parallel builds)
e31bcd1b
JM
1741 --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on
1742 glibc systems
cd533689
PP
1743 --enable-linker-build-id
1744 compiler will always pass --build-id to linker
ba479fd2
NN
1745 --enable-maintainer-mode
1746 enable make rules and dependencies not useful
1747 (and sometimes confusing) to the casual installer
1748 --enable-version-specific-runtime-libs
1749 specify that runtime libraries should be
1750 installed in a compiler-specific directory
68a607d8 1751 --enable-plugin enable plugin support
093e61a6 1752
ba479fd2
NN
1753Optional Packages:
1754 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1755 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1756 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1757 --with-local-prefix=DIR specifies directory to put local include
1758 --with-gxx-include-dir=DIR
1759 specifies directory to put g++ header files
1760 --with-cpp-install-dir=DIR
1761 install the user visible C preprocessor in DIR
1762 (relative to PREFIX) as well as PREFIX/bin
1763 --with-gnu-ld arrange to work with GNU ld.
1764 --with-ld arrange to use the specified ld (full pathname)
d594623a 1765 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1766 --with-gnu-as arrange to work with GNU as
1767 --with-as arrange to use the specified as (full pathname)
1768 --with-stabs arrange to use stabs instead of host debug format
1769 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1770 --with-build-sysroot=sysroot
1771 use sysroot as the system root during the build
ba479fd2 1772 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
2f41c1d6
PB
1773 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1774 --with-bugurl=URL Direct users to URL to report a bug
aca600aa 1775 --with-multilib-list Select multilibs (SH only)
dfb77e37
KC
1776 --with-gnu-ld assume the C compiler uses GNU ld default=no
1777 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1778 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1779 --with-system-libunwind use installed libunwind
da0f6381
PB
1780 --with-pic try to use only PIC/non-PIC objects [default=use
1781 both]
1782 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
ed965309 1783 --with-long-double-128 Use 128-bit long double by default.
59415997 1784 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1785 with the compiler
1786 --with-system-zlib use installed libz
22482f74 1787 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
13c22933 1788
ba479fd2
NN
1789Some influential environment variables:
1790 CC C compiler command
1791 CFLAGS C compiler flags
1792 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1793 nonstandard directory <lib dir>
5213506e
RW
1794 LIBS libraries to pass to the linker, e.g. -l<library>
1795 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1796 you have headers in a nonstandard directory <include dir>
00020c16
ILT
1797 CXX C++ compiler command
1798 CXXFLAGS C++ compiler flags
ba479fd2 1799 CPP C preprocessor
00020c16 1800 CXXCPP C++ preprocessor
6de9cd9a
DN
1801 GMPLIBS How to link GMP
1802 GMPINC How to find GMP include files
f8bf9252
SP
1803 PPLLIBS How to link PPL
1804 PPLINC How to find PPL include files
1805 CLOOGLIBS How to link CLOOG
1806 CLOOGINC How to find CLOOG include files
d7f09764
DN
1807 LIBELFLIBS How to link libelf
1808 LIBELFINC How to find libelf include files
13c22933 1809
ba479fd2
NN
1810Use these variables to override the choices made by `configure' or to help
1811it to find libraries and programs with nonstandard names/locations.
73458fb7 1812
5213506e 1813Report bugs to the package provider.
ba479fd2 1814_ACEOF
5213506e 1815ac_status=$?
ba479fd2 1816fi
6e3f3080 1817
ba479fd2
NN
1818if test "$ac_init_help" = "recursive"; then
1819 # If there are subdirs, report their specific --help.
ba479fd2 1820 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
5213506e
RW
1821 test -d "$ac_dir" ||
1822 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1823 continue
ba479fd2
NN
1824 ac_builddir=.
1825
5213506e
RW
1826case "$ac_dir" in
1827.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1828*)
1829 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1830 # A ".." for each directory in $ac_dir_suffix.
1831 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1832 case $ac_top_builddir_sub in
1833 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1834 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1835 esac ;;
1836esac
1837ac_abs_top_builddir=$ac_pwd
1838ac_abs_builddir=$ac_pwd$ac_dir_suffix
1839# for backward compatibility:
1840ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
1841
1842case $srcdir in
5213506e 1843 .) # We are building in place.
ba479fd2 1844 ac_srcdir=.
5213506e
RW
1845 ac_top_srcdir=$ac_top_builddir_sub
1846 ac_abs_top_srcdir=$ac_pwd ;;
1847 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 1848 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
1849 ac_top_srcdir=$srcdir
1850 ac_abs_top_srcdir=$srcdir ;;
1851 *) # Relative name.
1852 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1853 ac_top_srcdir=$ac_top_build_prefix$srcdir
1854 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
86da66b5 1855esac
5213506e
RW
1856ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1857
1858 cd "$ac_dir" || { ac_status=$?; continue; }
1859 # Check for guested configure.
1860 if test -f "$ac_srcdir/configure.gnu"; then
1861 echo &&
1862 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1863 elif test -f "$ac_srcdir/configure"; then
1864 echo &&
1865 $SHELL "$ac_srcdir/configure" --help=recursive
ba479fd2 1866 else
5213506e
RW
1867 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1868 fi || ac_status=$?
1869 cd "$ac_pwd" || { ac_status=$?; break; }
ba479fd2
NN
1870 done
1871fi
1872
5213506e 1873test -n "$ac_init_help" && exit $ac_status
ba479fd2
NN
1874if $ac_init_version; then
1875 cat <<\_ACEOF
5213506e
RW
1876configure
1877generated by GNU Autoconf 2.64
ba479fd2 1878
5213506e 1879Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
1880This configure script is free software; the Free Software Foundation
1881gives unlimited permission to copy, distribute and modify it.
1882_ACEOF
5213506e 1883 exit
ba479fd2 1884fi
ba479fd2 1885
5213506e
RW
1886## ------------------------ ##
1887## Autoconf initialization. ##
1888## ------------------------ ##
ba479fd2 1889
5213506e
RW
1890# ac_fn_c_try_compile LINENO
1891# --------------------------
1892# Try to compile conftest.$ac_ext, and return whether this succeeded.
1893ac_fn_c_try_compile ()
ba479fd2 1894{
5213506e
RW
1895 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1896 rm -f conftest.$ac_objext
1897 if { { ac_try="$ac_compile"
1898case "(($ac_try" in
1899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900 *) ac_try_echo=$ac_try;;
1901esac
1902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903$as_echo "$ac_try_echo"; } >&5
1904 (eval "$ac_compile") 2>conftest.err
1905 ac_status=$?
1906 if test -s conftest.err; then
1907 grep -v '^ *+' conftest.err >conftest.er1
1908 cat conftest.er1 >&5
1909 mv -f conftest.er1 conftest.err
1910 fi
1911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912 test $ac_status = 0; } && {
1913 test -z "$ac_c_werror_flag" ||
1914 test ! -s conftest.err
1915 } && test -s conftest.$ac_objext; then :
1916 ac_retval=0
1917else
1918 $as_echo "$as_me: failed program was:" >&5
1919sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1920
5213506e
RW
1921 ac_retval=1
1922fi
1923 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1924 return $ac_retval
ba479fd2 1925
5213506e 1926} # ac_fn_c_try_compile
ba479fd2 1927
5213506e
RW
1928# ac_fn_cxx_try_compile LINENO
1929# ----------------------------
1930# Try to compile conftest.$ac_ext, and return whether this succeeded.
1931ac_fn_cxx_try_compile ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 rm -f conftest.$ac_objext
1935 if { { ac_try="$ac_compile"
1936case "(($ac_try" in
1937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1938 *) ac_try_echo=$ac_try;;
1939esac
1940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1941$as_echo "$ac_try_echo"; } >&5
1942 (eval "$ac_compile") 2>conftest.err
1943 ac_status=$?
1944 if test -s conftest.err; then
1945 grep -v '^ *+' conftest.err >conftest.er1
1946 cat conftest.er1 >&5
1947 mv -f conftest.er1 conftest.err
1948 fi
1949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950 test $ac_status = 0; } && {
1951 test -z "$ac_cxx_werror_flag" ||
1952 test ! -s conftest.err
1953 } && test -s conftest.$ac_objext; then :
1954 ac_retval=0
1955else
1956 $as_echo "$as_me: failed program was:" >&5
1957sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1958
5213506e
RW
1959 ac_retval=1
1960fi
1961 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1962 return $ac_retval
ba479fd2 1963
5213506e 1964} # ac_fn_cxx_try_compile
ba479fd2 1965
5213506e
RW
1966# ac_fn_c_try_cpp LINENO
1967# ----------------------
1968# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1969ac_fn_c_try_cpp ()
1970{
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 if { { ac_try="$ac_cpp conftest.$ac_ext"
1973case "(($ac_try" in
1974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1975 *) ac_try_echo=$ac_try;;
1976esac
1977eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1978$as_echo "$ac_try_echo"; } >&5
1979 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1980 ac_status=$?
1981 if test -s conftest.err; then
1982 grep -v '^ *+' conftest.err >conftest.er1
1983 cat conftest.er1 >&5
1984 mv -f conftest.er1 conftest.err
1985 fi
1986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1987 test $ac_status = 0; } >/dev/null && {
1988 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1989 test ! -s conftest.err
1990 }; then :
1991 ac_retval=0
1992else
1993 $as_echo "$as_me: failed program was:" >&5
1994sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1995
5213506e
RW
1996 ac_retval=1
1997fi
1998 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1999 return $ac_retval
ba479fd2 2000
5213506e 2001} # ac_fn_c_try_cpp
ba479fd2 2002
5213506e
RW
2003# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2004# -------------------------------------------------------
2005# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2006# the include files in INCLUDES and setting the cache variable VAR
2007# accordingly.
2008ac_fn_c_check_header_mongrel ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2013$as_echo_n "checking for $2... " >&6; }
2014if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2015 $as_echo_n "(cached) " >&6
2016fi
2017eval ac_res=\$$3
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2019$as_echo "$ac_res" >&6; }
2020else
2021 # Is the header compilable?
2022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2023$as_echo_n "checking $2 usability... " >&6; }
2024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027#include <$2>
ba479fd2 2028_ACEOF
5213506e
RW
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_header_compiler=yes
2031else
2032 ac_header_compiler=no
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2036$as_echo "$ac_header_compiler" >&6; }
ba479fd2 2037
5213506e
RW
2038# Is the header present?
2039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2040$as_echo_n "checking $2 presence... " >&6; }
2041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043#include <$2>
2044_ACEOF
2045if ac_fn_c_try_cpp "$LINENO"; then :
2046 ac_header_preproc=yes
2047else
2048 ac_header_preproc=no
2049fi
2050rm -f conftest.err conftest.$ac_ext
2051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2052$as_echo "$ac_header_preproc" >&6; }
ba479fd2 2053
5213506e
RW
2054# So? What about this header?
2055case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2056 yes:no: )
2057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2058$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2060$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2061 ;;
2062 no:yes:* )
2063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2064$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2066$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2068$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2070$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2072$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2073 ;;
2074esac
2075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2076$as_echo_n "checking for $2... " >&6; }
2077if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2078 $as_echo_n "(cached) " >&6
2079else
2080 eval "$3=\$ac_header_compiler"
2081fi
2082eval ac_res=\$$3
2083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2084$as_echo "$ac_res" >&6; }
2085fi
2086 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2087
5213506e 2088} # ac_fn_c_check_header_mongrel
ba479fd2 2089
5213506e
RW
2090# ac_fn_c_try_run LINENO
2091# ----------------------
2092# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2093# that executables *can* be run.
2094ac_fn_c_try_run ()
b61ff9c8 2095{
5213506e
RW
2096 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097 if { { ac_try="$ac_link"
2098case "(($ac_try" in
2099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2100 *) ac_try_echo=$ac_try;;
2101esac
2102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2103$as_echo "$ac_try_echo"; } >&5
2104 (eval "$ac_link") 2>&5
2105 ac_status=$?
2106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2107 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2108 { { case "(($ac_try" in
2109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2110 *) ac_try_echo=$ac_try;;
2111esac
2112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2113$as_echo "$ac_try_echo"; } >&5
2114 (eval "$ac_try") 2>&5
2115 ac_status=$?
2116 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2117 test $ac_status = 0; }; }; then :
2118 ac_retval=0
2119else
2120 $as_echo "$as_me: program exited with status $ac_status" >&5
2121 $as_echo "$as_me: failed program was:" >&5
2122sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2123
5213506e
RW
2124 ac_retval=$ac_status
2125fi
2126 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2127 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2128 return $ac_retval
ba479fd2 2129
5213506e 2130} # ac_fn_c_try_run
ba479fd2 2131
5213506e
RW
2132# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2133# -------------------------------------------------------
2134# Tests whether HEADER exists and can be compiled using the include files in
2135# INCLUDES, setting the cache variable VAR accordingly.
2136ac_fn_c_check_header_compile ()
2137{
2138 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140$as_echo_n "checking for $2... " >&6; }
2141if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2142 $as_echo_n "(cached) " >&6
2143else
2144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145/* end confdefs.h. */
2146$4
2147#include <$2>
ba479fd2 2148_ACEOF
5213506e
RW
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 eval "$3=yes"
2151else
2152 eval "$3=no"
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155fi
2156eval ac_res=\$$3
2157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2158$as_echo "$ac_res" >&6; }
2159 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2160
5213506e 2161} # ac_fn_c_check_header_compile
ba479fd2 2162
5213506e
RW
2163# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2164# --------------------------------------------
2165# Tries to find the compile-time value of EXPR in a program that includes
2166# INCLUDES, setting VAR accordingly. Returns whether the value could be
2167# computed
2168ac_fn_c_compute_int ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 if test "$cross_compiling" = yes; then
2172 # Depending upon the size, compute the lo and hi bounds.
2173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) >= 0)];
2180test_array [0] = 0
ba479fd2 2181
5213506e
RW
2182 ;
2183 return 0;
2184}
ba479fd2 2185_ACEOF
5213506e
RW
2186if ac_fn_c_try_compile "$LINENO"; then :
2187 ac_lo=0 ac_mid=0
2188 while :; do
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2196test_array [0] = 0
ba479fd2 2197
5213506e
RW
2198 ;
2199 return 0;
2200}
ba479fd2 2201_ACEOF
5213506e
RW
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_hi=$ac_mid; break
2204else
2205 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2206 if test $ac_lo -le $ac_mid; then
2207 ac_lo= ac_hi=
2208 break
2209 fi
2210 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2211fi
2212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 done
2214else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218int
2219main ()
2220{
2221static int test_array [1 - 2 * !(($2) < 0)];
2222test_array [0] = 0
ba479fd2 2223
5213506e
RW
2224 ;
2225 return 0;
2226}
ba479fd2 2227_ACEOF
5213506e
RW
2228if ac_fn_c_try_compile "$LINENO"; then :
2229 ac_hi=-1 ac_mid=-1
2230 while :; do
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233$4
2234int
2235main ()
2236{
2237static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2238test_array [0] = 0
ba479fd2 2239
5213506e
RW
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_compile "$LINENO"; then :
2245 ac_lo=$ac_mid; break
2246else
2247 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2248 if test $ac_mid -le $ac_hi; then
2249 ac_lo= ac_hi=
2250 break
2251 fi
2252 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
ba479fd2 2253fi
5213506e
RW
2254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255 done
ba479fd2 2256else
5213506e 2257 ac_lo= ac_hi=
ba479fd2 2258fi
5213506e
RW
2259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262# Binary search between lo and hi bounds.
2263while test "x$ac_lo" != "x$ac_hi"; do
2264 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267$4
2268int
2269main ()
2270{
2271static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2272test_array [0] = 0
ba479fd2 2273
5213506e
RW
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_compile "$LINENO"; then :
2279 ac_hi=$ac_mid
2280else
2281 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
ba479fd2 2282fi
5213506e
RW
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284done
2285case $ac_lo in #((
2286?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2287'') ac_retval=1 ;;
2288esac
2289 else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$4
2293static long int longval () { return $2; }
2294static unsigned long int ulongval () { return $2; }
2295#include <stdio.h>
2296#include <stdlib.h>
2297int
2298main ()
2299{
ba479fd2 2300
5213506e
RW
2301 FILE *f = fopen ("conftest.val", "w");
2302 if (! f)
2303 return 1;
2304 if (($2) < 0)
2305 {
2306 long int i = longval ();
2307 if (i != ($2))
2308 return 1;
2309 fprintf (f, "%ld", i);
2310 }
2311 else
2312 {
2313 unsigned long int i = ulongval ();
2314 if (i != ($2))
2315 return 1;
2316 fprintf (f, "%lu", i);
2317 }
2318 /* Do not output a trailing newline, as this causes \r\n confusion
2319 on some platforms. */
2320 return ferror (f) || fclose (f) != 0;
ba479fd2 2321
5213506e
RW
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_run "$LINENO"; then :
2327 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2328else
2329 ac_retval=1
2330fi
2331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2332 conftest.$ac_objext conftest.beam conftest.$ac_ext
2333rm -f conftest.val
ba479fd2 2334
5213506e
RW
2335 fi
2336 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2337 return $ac_retval
ba479fd2 2338
5213506e 2339} # ac_fn_c_compute_int
ba479fd2 2340
5213506e
RW
2341# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2342# -------------------------------------------
2343# Tests whether TYPE exists after having included INCLUDES, setting cache
2344# variable VAR accordingly.
2345ac_fn_c_check_type ()
2346{
2347 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2349$as_echo_n "checking for $2... " >&6; }
2350if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2351 $as_echo_n "(cached) " >&6
2352else
2353 eval "$3=no"
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h. */
2356$4
2357int
2358main ()
2359{
2360if (sizeof ($2))
2361 return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h. */
2369$4
2370int
2371main ()
2372{
2373if (sizeof (($2)))
2374 return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 2380
5213506e
RW
2381else
2382 eval "$3=yes"
2383fi
2384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387fi
2388eval ac_res=\$$3
2389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2390$as_echo "$ac_res" >&6; }
2391 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2392
5213506e 2393} # ac_fn_c_check_type
ba479fd2 2394
fa802374
KT
2395# ac_fn_c_find_intX_t LINENO BITS VAR
2396# -----------------------------------
2397# Finds a signed integer type with width BITS, setting cache variable VAR
2398# accordingly.
2399ac_fn_c_find_intX_t ()
5213506e
RW
2400{
2401 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
fa802374
KT
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2403$as_echo_n "checking for int$2_t... " >&6; }
5213506e
RW
2404if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2405 $as_echo_n "(cached) " >&6
2406else
fa802374
KT
2407 eval "$3=no"
2408 for ac_type in int$2_t 'int' 'long int' \
2409 'long long int' 'short int' 'signed char'; do
2410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411/* end confdefs.h. */
2412$ac_includes_default
2413int
2414main ()
2415{
2416static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
2417test_array [0] = 0
2418
2419 ;
2420 return 0;
2421}
2422_ACEOF
2423if ac_fn_c_try_compile "$LINENO"; then :
5213506e
RW
2424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h. */
fa802374
KT
2426$ac_includes_default
2427int
2428main ()
2429{
2430static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
2431 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
2432test_array [0] = 0
2433
2434 ;
2435 return 0;
2436}
5213506e 2437_ACEOF
fa802374
KT
2438if ac_fn_c_try_compile "$LINENO"; then :
2439
5213506e 2440else
fa802374
KT
2441 case $ac_type in #(
2442 int$2_t) :
2443 eval "$3=yes" ;; #(
2444 *) :
2445 eval "$3=\$ac_type" ;;
2446esac
5213506e 2447fi
fa802374
KT
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451 eval as_val=\$$3
2452 if test "x$as_val" = x""no; then :
2453
2454else
2455 break
2456fi
2457 done
5213506e
RW
2458fi
2459eval ac_res=\$$3
2460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2461$as_echo "$ac_res" >&6; }
2462 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2463
fa802374 2464} # ac_fn_c_find_intX_t
18c04407 2465
5213506e
RW
2466# ac_fn_c_try_link LINENO
2467# -----------------------
2468# Try to link conftest.$ac_ext, and return whether this succeeded.
2469ac_fn_c_try_link ()
2470{
2471 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472 rm -f conftest.$ac_objext conftest$ac_exeext
2473 if { { ac_try="$ac_link"
2474case "(($ac_try" in
2475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476 *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480 (eval "$ac_link") 2>conftest.err
2481 ac_status=$?
2482 if test -s conftest.err; then
2483 grep -v '^ *+' conftest.err >conftest.er1
2484 cat conftest.er1 >&5
2485 mv -f conftest.er1 conftest.err
2486 fi
2487 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488 test $ac_status = 0; } && {
2489 test -z "$ac_c_werror_flag" ||
2490 test ! -s conftest.err
2491 } && test -s conftest$ac_exeext && {
2492 test "$cross_compiling" = yes ||
2493 $as_test_x conftest$ac_exeext
2494 }; then :
2495 ac_retval=0
2496else
2497 $as_echo "$as_me: failed program was:" >&5
2498sed 's/^/| /' conftest.$ac_ext >&5
18c04407 2499
5213506e
RW
2500 ac_retval=1
2501fi
2502 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2503 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2504 # interfere with the next link command; also delete a directory that is
2505 # left behind by Apple's compiler. We do this before executing the actions.
2506 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2507 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2508 return $ac_retval
18c04407 2509
5213506e 2510} # ac_fn_c_try_link
ba479fd2 2511
fa802374
KT
2512# ac_fn_c_find_uintX_t LINENO BITS VAR
2513# ------------------------------------
2514# Finds an unsigned integer type with width BITS, setting cache variable VAR
2515# accordingly.
2516ac_fn_c_find_uintX_t ()
2517{
2518 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2520$as_echo_n "checking for uint$2_t... " >&6; }
2521if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2522 $as_echo_n "(cached) " >&6
2523else
2524 eval "$3=no"
2525 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2526 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2528/* end confdefs.h. */
2529$ac_includes_default
2530int
2531main ()
2532{
2533static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
2534test_array [0] = 0
2535
2536 ;
2537 return 0;
2538}
2539_ACEOF
2540if ac_fn_c_try_compile "$LINENO"; then :
2541 case $ac_type in #(
2542 uint$2_t) :
2543 eval "$3=yes" ;; #(
2544 *) :
2545 eval "$3=\$ac_type" ;;
2546esac
2547fi
2548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2549 eval as_val=\$$3
2550 if test "x$as_val" = x""no; then :
2551
2552else
2553 break
2554fi
2555 done
2556fi
2557eval ac_res=\$$3
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2559$as_echo "$ac_res" >&6; }
2560 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2561
2562} # ac_fn_c_find_uintX_t
2563
2564# ac_fn_c_check_header_preproc LINENO HEADER VAR
2565# ----------------------------------------------
2566# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2567ac_fn_c_check_header_preproc ()
2568{
2569 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2571$as_echo_n "checking for $2... " >&6; }
2572if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2573 $as_echo_n "(cached) " >&6
2574else
2575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2576/* end confdefs.h. */
2577#include <$2>
2578_ACEOF
2579if ac_fn_c_try_cpp "$LINENO"; then :
2580 eval "$3=yes"
2581else
2582 eval "$3=no"
2583fi
2584rm -f conftest.err conftest.$ac_ext
2585fi
2586eval ac_res=\$$3
2587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2588$as_echo "$ac_res" >&6; }
2589 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2590
2591} # ac_fn_c_check_header_preproc
2592
5213506e
RW
2593# ac_fn_c_check_func LINENO FUNC VAR
2594# ----------------------------------
2595# Tests whether FUNC exists, setting the cache variable VAR accordingly
2596ac_fn_c_check_func ()
2597{
2598 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2600$as_echo_n "checking for $2... " >&6; }
2601if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2602 $as_echo_n "(cached) " >&6
2603else
2604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h. */
2606/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2607 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2608#define $2 innocuous_$2
ba479fd2 2609
5213506e
RW
2610/* System header to define __stub macros and hopefully few prototypes,
2611 which can conflict with char $2 (); below.
2612 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2613 <limits.h> exists even on freestanding compilers. */
914c5af7 2614
5213506e
RW
2615#ifdef __STDC__
2616# include <limits.h>
2617#else
2618# include <assert.h>
2619#endif
ba479fd2 2620
5213506e 2621#undef $2
ba479fd2 2622
5213506e
RW
2623/* Override any GCC internal prototype to avoid an error.
2624 Use char because int might match the return type of a GCC
2625 builtin and then its argument prototype would still apply. */
2626#ifdef __cplusplus
2627extern "C"
2628#endif
2629char $2 ();
2630/* The GNU C library defines this for functions which it implements
2631 to always fail with ENOSYS. Some functions are actually named
2632 something starting with __ and the normal name is an alias. */
2633#if defined __stub_$2 || defined __stub___$2
2634choke me
2635#endif
9f18db39 2636
5213506e
RW
2637int
2638main ()
2639{
2640return $2 ();
2641 ;
2642 return 0;
2643}
2644_ACEOF
2645if ac_fn_c_try_link "$LINENO"; then :
2646 eval "$3=yes"
2647else
2648 eval "$3=no"
ba479fd2 2649fi
5213506e
RW
2650rm -f core conftest.err conftest.$ac_objext \
2651 conftest$ac_exeext conftest.$ac_ext
2652fi
2653eval ac_res=\$$3
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2655$as_echo "$ac_res" >&6; }
2656 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
b61ff9c8 2657
5213506e 2658} # ac_fn_c_check_func
b61ff9c8 2659
5213506e
RW
2660# ac_fn_cxx_try_cpp LINENO
2661# ------------------------
2662# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2663ac_fn_cxx_try_cpp ()
2664{
2665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2666 if { { ac_try="$ac_cpp conftest.$ac_ext"
2667case "(($ac_try" in
2668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2669 *) ac_try_echo=$ac_try;;
2670esac
2671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2672$as_echo "$ac_try_echo"; } >&5
2673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2674 ac_status=$?
2675 if test -s conftest.err; then
2676 grep -v '^ *+' conftest.err >conftest.er1
2677 cat conftest.er1 >&5
2678 mv -f conftest.er1 conftest.err
2679 fi
2680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2681 test $ac_status = 0; } >/dev/null && {
2682 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2683 test ! -s conftest.err
2684 }; then :
2685 ac_retval=0
2686else
2687 $as_echo "$as_me: failed program was:" >&5
2688sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2689
5213506e 2690 ac_retval=1
ba479fd2 2691fi
5213506e
RW
2692 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2693 return $ac_retval
b61ff9c8 2694
5213506e 2695} # ac_fn_cxx_try_cpp
b61ff9c8 2696
5213506e
RW
2697# ac_fn_cxx_try_link LINENO
2698# -------------------------
2699# Try to link conftest.$ac_ext, and return whether this succeeded.
2700ac_fn_cxx_try_link ()
2701{
2702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703 rm -f conftest.$ac_objext conftest$ac_exeext
2704 if { { ac_try="$ac_link"
2705case "(($ac_try" in
2706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2707 *) ac_try_echo=$ac_try;;
2708esac
2709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2710$as_echo "$ac_try_echo"; } >&5
2711 (eval "$ac_link") 2>conftest.err
2712 ac_status=$?
2713 if test -s conftest.err; then
2714 grep -v '^ *+' conftest.err >conftest.er1
2715 cat conftest.er1 >&5
2716 mv -f conftest.er1 conftest.err
2717 fi
2718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2719 test $ac_status = 0; } && {
2720 test -z "$ac_cxx_werror_flag" ||
2721 test ! -s conftest.err
2722 } && test -s conftest$ac_exeext && {
2723 test "$cross_compiling" = yes ||
2724 $as_test_x conftest$ac_exeext
2725 }; then :
2726 ac_retval=0
2727else
2728 $as_echo "$as_me: failed program was:" >&5
2729sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2730
5213506e 2731 ac_retval=1
ba479fd2 2732fi
5213506e
RW
2733 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2734 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2735 # interfere with the next link command; also delete a directory that is
2736 # left behind by Apple's compiler. We do this before executing the actions.
2737 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2738 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2739 return $ac_retval
ba479fd2 2740
5213506e
RW
2741} # ac_fn_cxx_try_link
2742cat >config.log <<_ACEOF
2743This file contains any messages produced by compilers while
2744running configure, to aid debugging if configure makes a mistake.
ba479fd2 2745
5213506e
RW
2746It was created by $as_me, which was
2747generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2 2748
5213506e 2749 $ $0 $@
18fc9bd4 2750
5213506e
RW
2751_ACEOF
2752exec 5>>config.log
2753{
2754cat <<_ASUNAME
2755## --------- ##
2756## Platform. ##
2757## --------- ##
18fc9bd4 2758
5213506e
RW
2759hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2760uname -m = `(uname -m) 2>/dev/null || echo unknown`
2761uname -r = `(uname -r) 2>/dev/null || echo unknown`
2762uname -s = `(uname -s) 2>/dev/null || echo unknown`
2763uname -v = `(uname -v) 2>/dev/null || echo unknown`
18fc9bd4 2764
5213506e
RW
2765/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2766/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
18fc9bd4 2767
5213506e
RW
2768/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2769/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2770/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2771/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2772/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2773/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2774/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
18fc9bd4 2775
5213506e 2776_ASUNAME
8f1529e6 2777
5213506e
RW
2778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2779for as_dir in $PATH
2780do
2781 IFS=$as_save_IFS
2782 test -z "$as_dir" && as_dir=.
2783 $as_echo "PATH: $as_dir"
2784 done
2785IFS=$as_save_IFS
57255173 2786
5213506e 2787} >&5
57255173 2788
5213506e 2789cat >&5 <<_ACEOF
1546bb64 2790
18fc9bd4 2791
5213506e
RW
2792## ----------- ##
2793## Core tests. ##
2794## ----------- ##
73458fb7 2795
ba479fd2 2796_ACEOF
13c22933
JJ
2797
2798
5213506e
RW
2799# Keep a trace of the command line.
2800# Strip out --no-create and --no-recursion so they do not pile up.
2801# Strip out --silent because we don't want to record it for future runs.
2802# Also quote any args containing shell meta-characters.
2803# Make two passes to allow for proper duplicate-argument suppression.
2804ac_configure_args=
2805ac_configure_args0=
2806ac_configure_args1=
2807ac_must_keep_next=false
2808for ac_pass in 1 2
00020c16 2809do
5213506e
RW
2810 for ac_arg
2811 do
2812 case $ac_arg in
2813 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2814 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2815 | -silent | --silent | --silen | --sile | --sil)
2816 continue ;;
2817 *\'*)
2818 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2819 esac
2820 case $ac_pass in
2821 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2822 2)
2823 as_fn_append ac_configure_args1 " '$ac_arg'"
2824 if test $ac_must_keep_next = true; then
2825 ac_must_keep_next=false # Got value, back to normal.
2826 else
2827 case $ac_arg in
2828 *=* | --config-cache | -C | -disable-* | --disable-* \
2829 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2830 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2831 | -with-* | --with-* | -without-* | --without-* | --x)
2832 case "$ac_configure_args0 " in
2833 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2834 esac
2835 ;;
2836 -* ) ac_must_keep_next=true ;;
2837 esac
2838 fi
2839 as_fn_append ac_configure_args " '$ac_arg'"
2840 ;;
2841 esac
2842 done
00020c16 2843done
5213506e
RW
2844{ ac_configure_args0=; unset ac_configure_args0;}
2845{ ac_configure_args1=; unset ac_configure_args1;}
60d26958 2846
5213506e
RW
2847# When interrupted or exit'd, cleanup temporary files, and complete
2848# config.log. We remove comments because anyway the quotes in there
2849# would cause problems or look ugly.
2850# WARNING: Use '\'' to represent an apostrophe within the trap.
2851# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2852trap 'exit_status=$?
2853 # Save into config.log some information that might help in debugging.
2854 {
2855 echo
1a4b763e 2856
5213506e
RW
2857 cat <<\_ASBOX
2858## ---------------- ##
2859## Cache variables. ##
2860## ---------------- ##
2861_ASBOX
2862 echo
2863 # The following way of writing the cache mishandles newlines in values,
2864(
2865 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2866 eval ac_val=\$$ac_var
2867 case $ac_val in #(
2868 *${as_nl}*)
2869 case $ac_var in #(
2870 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2871$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2872 esac
2873 case $ac_var in #(
2874 _ | IFS | as_nl) ;; #(
2875 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2876 *) { eval $ac_var=; unset $ac_var;} ;;
2877 esac ;;
2878 esac
2879 done
2880 (set) 2>&1 |
2881 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2882 *${as_nl}ac_space=\ *)
2883 sed -n \
2884 "s/'\''/'\''\\\\'\'''\''/g;
2885 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2886 ;; #(
2887 *)
2888 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2889 ;;
2890 esac |
2891 sort
2892)
2893 echo
1a4b763e 2894
5213506e
RW
2895 cat <<\_ASBOX
2896## ----------------- ##
2897## Output variables. ##
2898## ----------------- ##
2899_ASBOX
2900 echo
2901 for ac_var in $ac_subst_vars
2902 do
2903 eval ac_val=\$$ac_var
2904 case $ac_val in
2905 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2906 esac
2907 $as_echo "$ac_var='\''$ac_val'\''"
2908 done | sort
2909 echo
60d26958 2910
5213506e
RW
2911 if test -n "$ac_subst_files"; then
2912 cat <<\_ASBOX
2913## ------------------- ##
2914## File substitutions. ##
2915## ------------------- ##
2916_ASBOX
2917 echo
2918 for ac_var in $ac_subst_files
2919 do
2920 eval ac_val=\$$ac_var
2921 case $ac_val in
2922 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2923 esac
2924 $as_echo "$ac_var='\''$ac_val'\''"
2925 done | sort
2926 echo
2927 fi
60d26958 2928
5213506e
RW
2929 if test -s confdefs.h; then
2930 cat <<\_ASBOX
2931## ----------- ##
2932## confdefs.h. ##
2933## ----------- ##
2934_ASBOX
2935 echo
2936 cat confdefs.h
2937 echo
2938 fi
2939 test "$ac_signal" != 0 &&
2940 $as_echo "$as_me: caught signal $ac_signal"
2941 $as_echo "$as_me: exit $exit_status"
2942 } >&5
2943 rm -f core *.core core.conftest.* &&
2944 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2945 exit $exit_status
2946' 0
2947for ac_signal in 1 2 13 15; do
2948 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
00020c16 2949done
5213506e 2950ac_signal=0
00020c16 2951
5213506e
RW
2952# confdefs.h avoids OS command line length limits that DEFS can exceed.
2953rm -f -r conftest* confdefs.h
00020c16 2954
5213506e
RW
2955$as_echo "/* confdefs.h */" > confdefs.h
2956
2957# Predefined preprocessor variables.
2958
2959cat >>confdefs.h <<_ACEOF
2960#define PACKAGE_NAME "$PACKAGE_NAME"
60d26958 2961_ACEOF
60d26958 2962
5213506e
RW
2963cat >>confdefs.h <<_ACEOF
2964#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2965_ACEOF
60d26958 2966
5213506e
RW
2967cat >>confdefs.h <<_ACEOF
2968#define PACKAGE_VERSION "$PACKAGE_VERSION"
60d26958 2969_ACEOF
5213506e
RW
2970
2971cat >>confdefs.h <<_ACEOF
2972#define PACKAGE_STRING "$PACKAGE_STRING"
60d26958 2973_ACEOF
60d26958 2974
5213506e
RW
2975cat >>confdefs.h <<_ACEOF
2976#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2977_ACEOF
60d26958 2978
5213506e
RW
2979cat >>confdefs.h <<_ACEOF
2980#define PACKAGE_URL "$PACKAGE_URL"
2981_ACEOF
00020c16 2982
60d26958 2983
5213506e
RW
2984# Let the site file select an alternate cache file if it wants to.
2985# Prefer an explicitly selected file to automatically selected ones.
2986ac_site_file1=NONE
2987ac_site_file2=NONE
2988if test -n "$CONFIG_SITE"; then
2989 ac_site_file1=$CONFIG_SITE
2990elif test "x$prefix" != xNONE; then
2991 ac_site_file1=$prefix/share/config.site
2992 ac_site_file2=$prefix/etc/config.site
2993else
2994 ac_site_file1=$ac_default_prefix/share/config.site
2995 ac_site_file2=$ac_default_prefix/etc/config.site
2996fi
2997for ac_site_file in "$ac_site_file1" "$ac_site_file2"
00020c16 2998do
5213506e
RW
2999 test "x$ac_site_file" = xNONE && continue
3000 if test -r "$ac_site_file"; then
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3002$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3003 sed 's/^/| /' "$ac_site_file" >&5
3004 . "$ac_site_file"
60d26958 3005 fi
5213506e 3006done
60d26958 3007
5213506e
RW
3008if test -r "$cache_file"; then
3009 # Some versions of bash will fail to source /dev/null (special
3010 # files actually), so we avoid doing that.
3011 if test -f "$cache_file"; then
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3013$as_echo "$as_me: loading cache $cache_file" >&6;}
3014 case $cache_file in
3015 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3016 *) . "./$cache_file";;
3017 esac
60d26958
PB
3018 fi
3019else
5213506e
RW
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3021$as_echo "$as_me: creating cache $cache_file" >&6;}
3022 >$cache_file
bf3b7cd3
JD
3023fi
3024
5213506e
RW
3025# Check that the precious variables saved in the cache have kept the same
3026# value.
3027ac_cache_corrupted=false
3028for ac_var in $ac_precious_vars; do
3029 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3030 eval ac_new_set=\$ac_env_${ac_var}_set
3031 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3032 eval ac_new_val=\$ac_env_${ac_var}_value
3033 case $ac_old_set,$ac_new_set in
3034 set,)
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3036$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3037 ac_cache_corrupted=: ;;
3038 ,set)
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3040$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3041 ac_cache_corrupted=: ;;
3042 ,);;
3043 *)
3044 if test "x$ac_old_val" != "x$ac_new_val"; then
3045 # differences in whitespace do not lead to failure.
3046 ac_old_val_w=`echo x $ac_old_val`
3047 ac_new_val_w=`echo x $ac_new_val`
3048 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3049 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3050$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3051 ac_cache_corrupted=:
3052 else
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3054$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3055 eval $ac_var=\$ac_old_val
3056 fi
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3058$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3060$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3061 fi;;
3062 esac
3063 # Pass precious variables to config.status.
3064 if test "$ac_new_set" = set; then
3065 case $ac_new_val in
3066 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3067 *) ac_arg=$ac_var=$ac_new_val ;;
3068 esac
3069 case " $ac_configure_args " in
3070 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3071 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3072 esac
3073 fi
60d26958 3074done
5213506e
RW
3075if $ac_cache_corrupted; then
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3079$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3080 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
60d26958 3081fi
5213506e
RW
3082## -------------------- ##
3083## Main body of script. ##
3084## -------------------- ##
60d26958 3085
00020c16
ILT
3086ac_ext=c
3087ac_cpp='$CPP $CPPFLAGS'
3088ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3089ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3090ac_compiler_gnu=$ac_cv_c_compiler_gnu
60d26958 3091
00020c16 3092
bf3b7cd3 3093
bf3b7cd3 3094
00020c16 3095
bf3b7cd3 3096
5213506e 3097ac_config_headers="$ac_config_headers auto-host.h:config.in"
bf3b7cd3 3098
bf3b7cd3 3099
5213506e 3100gcc_version=`cat $srcdir/BASE-VER`
bf3b7cd3 3101
5213506e
RW
3102# Determine the host, build, and target systems
3103ac_aux_dir=
3104for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3105 for ac_t in install-sh install.sh shtool; do
3106 if test -f "$ac_dir/$ac_t"; then
3107 ac_aux_dir=$ac_dir
3108 ac_install_sh="$ac_aux_dir/$ac_t -c"
3109 break 2
3110 fi
3111 done
3112done
3113if test -z "$ac_aux_dir"; then
3114 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
00020c16 3115fi
5213506e
RW
3116
3117# These three variables are undocumented and unsupported,
3118# and are intended to be withdrawn in a future Autoconf release.
3119# They can cause serious problems if a builder's source tree is in a directory
3120# whose full name contains unusual characters.
3121ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3122ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3123ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3124
3125
3126# Make sure we can run config.sub.
3127$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3128 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3129
3130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3131$as_echo_n "checking build system type... " >&6; }
3132if test "${ac_cv_build+set}" = set; then :
3133 $as_echo_n "(cached) " >&6
3134else
3135 ac_build_alias=$build_alias
3136test "x$ac_build_alias" = x &&
3137 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3138test "x$ac_build_alias" = x &&
3139 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3140ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3141 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3142
3143fi
3144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3145$as_echo "$ac_cv_build" >&6; }
3146case $ac_cv_build in
3147*-*-*) ;;
3148*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3149esac
3150build=$ac_cv_build
3151ac_save_IFS=$IFS; IFS='-'
3152set x $ac_cv_build
3153shift
3154build_cpu=$1
3155build_vendor=$2
3156shift; shift
3157# Remember, the first character of IFS is used to create $*,
3158# except with old shells:
3159build_os=$*
3160IFS=$ac_save_IFS
3161case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3162
3163
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3165$as_echo_n "checking host system type... " >&6; }
3166if test "${ac_cv_host+set}" = set; then :
3167 $as_echo_n "(cached) " >&6
3168else
3169 if test "x$host_alias" = x; then
3170 ac_cv_host=$ac_cv_build
3171else
3172 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3173 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
00020c16 3174fi
5213506e 3175
00020c16 3176fi
5213506e
RW
3177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3178$as_echo "$ac_cv_host" >&6; }
3179case $ac_cv_host in
3180*-*-*) ;;
3181*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3182esac
3183host=$ac_cv_host
3184ac_save_IFS=$IFS; IFS='-'
3185set x $ac_cv_host
3186shift
3187host_cpu=$1
3188host_vendor=$2
3189shift; shift
3190# Remember, the first character of IFS is used to create $*,
3191# except with old shells:
3192host_os=$*
3193IFS=$ac_save_IFS
3194case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
00020c16 3195
bf3b7cd3 3196
5213506e
RW
3197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3198$as_echo_n "checking target system type... " >&6; }
3199if test "${ac_cv_target+set}" = set; then :
3200 $as_echo_n "(cached) " >&6
3201else
3202 if test "x$target_alias" = x; then
3203 ac_cv_target=$ac_cv_host
3204else
3205 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3206 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
bf3b7cd3
JD
3207fi
3208
5213506e
RW
3209fi
3210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3211$as_echo "$ac_cv_target" >&6; }
3212case $ac_cv_target in
3213*-*-*) ;;
3214*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
3215esac
3216target=$ac_cv_target
3217ac_save_IFS=$IFS; IFS='-'
3218set x $ac_cv_target
3219shift
3220target_cpu=$1
3221target_vendor=$2
3222shift; shift
3223# Remember, the first character of IFS is used to create $*,
3224# except with old shells:
3225target_os=$*
3226IFS=$ac_save_IFS
3227case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
60d26958 3228
bf3b7cd3 3229
5213506e
RW
3230# The aliases save the names the user supplied, while $host etc.
3231# will get canonicalized.
3232test -n "$target_alias" &&
3233 test "$program_prefix$program_suffix$program_transform_name" = \
3234 NONENONEs,x,x, &&
3235 program_prefix=${target_alias}-
bf3b7cd3 3236
5213506e
RW
3237# Determine the noncanonical target name, for directory use.
3238 case ${build_alias} in
3239 "") build_noncanonical=${build} ;;
3240 *) build_noncanonical=${build_alias} ;;
3241esac
00020c16 3242
5213506e
RW
3243 case ${host_alias} in
3244 "") host_noncanonical=${build_noncanonical} ;;
3245 *) host_noncanonical=${host_alias} ;;
3246esac
00020c16 3247
5213506e
RW
3248 case ${target_alias} in
3249 "") target_noncanonical=${host_noncanonical} ;;
3250 *) target_noncanonical=${target_alias} ;;
3251esac
00020c16
ILT
3252
3253
3254
3255
5213506e 3256# Determine the target- and build-specific subdirectories
00020c16 3257
5213506e
RW
3258# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
3259# have matching libraries, they should use host libraries: Makefile.tpl
3260# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
3261# However, they still use the build modules, because the corresponding
3262# host modules (e.g. bison) are only built for the host when bootstrap
3263# finishes. So:
3264# - build_subdir is where we find build modules, and never changes.
3265# - build_libsubdir is where we find build libraries, and can be overridden.
bf3b7cd3 3266
5213506e
RW
3267# Prefix 'build-' so this never conflicts with target_subdir.
3268build_subdir="build-${build_noncanonical}"
3269
3270# Check whether --with-build-libsubdir was given.
3271if test "${with_build_libsubdir+set}" = set; then :
3272 withval=$with_build_libsubdir; build_libsubdir="$withval"
3273else
3274 build_libsubdir="$build_subdir"
bf3b7cd3 3275fi
bf3b7cd3 3276
5213506e
RW
3277# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
3278if ( test $srcdir = . && test -d gcc ) \
3279 || test -d $srcdir/../host-${host_noncanonical}; then
3280 host_subdir="host-${host_noncanonical}"
3281else
3282 host_subdir=.
00020c16 3283fi
5213506e
RW
3284# No prefix.
3285target_subdir=${target_noncanonical}
00020c16 3286
00020c16 3287
5213506e
RW
3288# Set program_transform_name
3289test "$program_prefix" != NONE &&
3290 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3291# Use a double $ so make ignores it.
3292test "$program_suffix" != NONE &&
3293 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3294# Double any \ or $.
3295# By default was `s,x,x', remove it if useless.
3296ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3297program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
00020c16
ILT
3298
3299
5213506e
RW
3300# Check for bogus environment variables.
3301# Test if LIBRARY_PATH contains the notation for the current directory
3302# since this would lead to problems installing/building glibc.
3303# LIBRARY_PATH contains the current directory if one of the following
3304# is true:
3305# - one of the terminals (":" and ";") is the first or last sign
3306# - two terminals occur directly after each other
3307# - the path contains an element with a dot in it
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY_PATH variable" >&5
3309$as_echo_n "checking LIBRARY_PATH variable... " >&6; }
3310case ${LIBRARY_PATH} in
3311 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3312 library_path_setting="contains current directory"
3313 ;;
3314 *)
3315 library_path_setting="ok"
3316 ;;
3317esac
3318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $library_path_setting" >&5
3319$as_echo "$library_path_setting" >&6; }
3320if test "$library_path_setting" != "ok"; then
3321as_fn_error "
3322*** LIBRARY_PATH shouldn't contain the current directory when
3323*** building gcc. Please change the environment variable
3324*** and run configure again." "$LINENO" 5
00020c16 3325fi
00020c16 3326
5213506e
RW
3327# Test if GCC_EXEC_PREFIX contains the notation for the current directory
3328# since this would lead to problems installing/building glibc.
3329# GCC_EXEC_PREFIX contains the current directory if one of the following
3330# is true:
3331# - one of the terminals (":" and ";") is the first or last sign
3332# - two terminals occur directly after each other
3333# - the path contains an element with a dot in it
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GCC_EXEC_PREFIX variable" >&5
3335$as_echo_n "checking GCC_EXEC_PREFIX variable... " >&6; }
3336case ${GCC_EXEC_PREFIX} in
3337 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3338 gcc_exec_prefix_setting="contains current directory"
3339 ;;
3340 *)
3341 gcc_exec_prefix_setting="ok"
3342 ;;
3343esac
3344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_exec_prefix_setting" >&5
3345$as_echo "$gcc_exec_prefix_setting" >&6; }
3346if test "$gcc_exec_prefix_setting" != "ok"; then
3347as_fn_error "
3348*** GCC_EXEC_PREFIX shouldn't contain the current directory when
3349*** building gcc. Please change the environment variable
3350*** and run configure again." "$LINENO" 5
00020c16 3351fi
00020c16 3352
5213506e
RW
3353# -----------
3354# Directories
3355# -----------
3356
3357# Specify the local prefix
3358local_prefix=
3359
3360# Check whether --with-local-prefix was given.
3361if test "${with_local_prefix+set}" = set; then :
3362 withval=$with_local_prefix; case "${withval}" in
3363yes) as_fn_error "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;;
3364no) ;;
3365*) local_prefix=$with_local_prefix ;;
3366esac
00020c16 3367fi
bf3b7cd3 3368
5213506e
RW
3369
3370# Default local prefix if it is empty
3371if test x$local_prefix = x; then
3372 local_prefix=/usr/local
bf3b7cd3 3373fi
00020c16 3374
5213506e
RW
3375# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
3376# passed in by the toplevel make and thus we'd get different behavior
3377# depending on where we built the sources.
3378gcc_gxx_include_dir=
3379# Specify the g++ header file directory
3380
3381# Check whether --with-gxx-include-dir was given.
3382if test "${with_gxx_include_dir+set}" = set; then :
3383 withval=$with_gxx_include_dir; case "${withval}" in
3384yes) as_fn_error "bad value ${withval} given for g++ include directory" "$LINENO" 5 ;;
3385no) ;;
3386*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
00020c16 3387esac
00020c16 3388fi
bf3b7cd3 3389
5213506e
RW
3390
3391# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
3392if test x${gcc_gxx_include_dir} = x; then
3393 if test x${enable_version_specific_runtime_libs} = xyes; then
3394 gcc_gxx_include_dir='${libsubdir}/include/c++'
3395 else
3396 libstdcxx_incdir='include/c++/$(version)'
3397 if test x$host != x$target; then
3398 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
3399 fi
3400 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
3401 fi
00020c16
ILT
3402fi
3403
3404
5213506e
RW
3405# Check whether --with-cpp_install_dir was given.
3406if test "${with_cpp_install_dir+set}" = set; then :
3407 withval=$with_cpp_install_dir; if test x$withval = xyes; then
3408 as_fn_error "option --with-cpp-install-dir requires an argument" "$LINENO" 5
3409elif test x$withval != xno; then
3410 cpp_install_dir=$withval
3411fi
3412fi
00020c16 3413
00020c16 3414
5213506e
RW
3415# We would like to our source tree to be readonly. However when releases or
3416# pre-releases are generated, the flex/bison generated files as well as the
3417# various formats of manuals need to be included along with the rest of the
3418# sources. Therefore we have --enable-generated-files-in-srcdir to do
3419# just that.
00020c16 3420
5213506e
RW
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to place generated files in the source directory" >&5
3422$as_echo_n "checking whether to place generated files in the source directory... " >&6; }
3423 # Check whether --enable-generated-files-in-srcdir was given.
3424if test "${enable_generated_files_in_srcdir+set}" = set; then :
3425 enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval
3426else
3427 generated_files_in_srcdir=no
3428fi
00020c16
ILT
3429
3430
5213506e
RW
3431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $generated_files_in_srcdir" >&5
3432$as_echo "$generated_files_in_srcdir" >&6; }
00020c16 3433
5213506e
RW
3434if test "$generated_files_in_srcdir" = "yes"; then
3435 GENINSRC=''
3436else
3437 GENINSRC='#'
3438fi
00020c16
ILT
3439
3440
5213506e
RW
3441# -------------------
3442# Find default linker
3443# -------------------
3444
3445# With GNU ld
00020c16 3446
5213506e
RW
3447# Check whether --with-gnu-ld was given.
3448if test "${with_gnu_ld+set}" = set; then :
3449 withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld"
00020c16 3450else
5213506e
RW
3451 gnu_ld_flag=no
3452fi
00020c16 3453
bf3b7cd3 3454
5213506e 3455# With pre-defined ld
00020c16 3456
5213506e
RW
3457# Check whether --with-ld was given.
3458if test "${with_ld+set}" = set; then :
3459 withval=$with_ld; DEFAULT_LINKER="$with_ld"
00020c16 3460fi
00020c16 3461
5213506e
RW
3462if test x"${DEFAULT_LINKER+set}" = x"set"; then
3463 if test ! -x "$DEFAULT_LINKER"; then
3464 as_fn_error "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5
3465 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3466 gnu_ld_flag=yes
3467 fi
3468
3469cat >>confdefs.h <<_ACEOF
3470#define DEFAULT_LINKER "$DEFAULT_LINKER"
00020c16
ILT
3471_ACEOF
3472
5213506e 3473fi
00020c16 3474
5213506e 3475gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
00020c16 3476
5213506e
RW
3477cat >>confdefs.h <<_ACEOF
3478#define HAVE_GNU_LD $gnu_ld
00020c16
ILT
3479_ACEOF
3480
3481
5213506e
RW
3482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default linker was specified" >&5
3483$as_echo_n "checking whether a default linker was specified... " >&6; }
3484if test x"${DEFAULT_LINKER+set}" = x"set"; then
3485 if test x"$gnu_ld_flag" = x"no"; then
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER)" >&5
3487$as_echo "yes ($DEFAULT_LINKER)" >&6; }
00020c16 3488 else
5213506e
RW
3489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
3490$as_echo "yes ($DEFAULT_LINKER - GNU ld)" >&6; }
00020c16 3491 fi
bf3b7cd3 3492else
5213506e
RW
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3494$as_echo "no" >&6; }
bf3b7cd3 3495fi
bf3b7cd3 3496
5213506e 3497# With demangler in GNU ld
00020c16 3498
5213506e
RW
3499# Check whether --with-demangler-in-ld was given.
3500if test "${with_demangler_in_ld+set}" = set; then :
3501 withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld"
00020c16 3502else
5213506e 3503 demangler_in_ld=no
00020c16 3504fi
bf3b7cd3 3505
00020c16 3506
5213506e
RW
3507# ----------------------
3508# Find default assembler
3509# ----------------------
00020c16 3510
5213506e 3511# With GNU as
00020c16 3512
5213506e
RW
3513# Check whether --with-gnu-as was given.
3514if test "${with_gnu_as+set}" = set; then :
3515 withval=$with_gnu_as; gas_flag="$with_gnu_as"
00020c16 3516else
5213506e 3517 gas_flag=no
00020c16 3518fi
00020c16 3519
5213506e
RW
3520
3521
3522# Check whether --with-as was given.
3523if test "${with_as+set}" = set; then :
3524 withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
00020c16 3525fi
00020c16 3526
5213506e
RW
3527if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3528 if test ! -x "$DEFAULT_ASSEMBLER"; then
3529 as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5
3530 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3531 gas_flag=yes
3532 fi
3533
3534cat >>confdefs.h <<_ACEOF
3535#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
00020c16 3536_ACEOF
5213506e
RW
3537
3538fi
3539
3540gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
3541
3542cat >>confdefs.h <<_ACEOF
3543#define HAVE_GNU_AS $gnu_as
00020c16 3544_ACEOF
5213506e
RW
3545
3546
3547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5
3548$as_echo_n "checking whether a default assembler was specified... " >&6; }
3549if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3550 if test x"$gas_flag" = x"no"; then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5
3552$as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; }
00020c16 3553 else
5213506e
RW
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
3555$as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; }
00020c16 3556 fi
bf3b7cd3 3557else
5213506e
RW
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3559$as_echo "no" >&6; }
00020c16 3560fi
bf3b7cd3 3561
5213506e
RW
3562# ---------------
3563# Find C compiler
3564# ---------------
00020c16 3565
5213506e
RW
3566# If a non-executable a.out is present (e.g. created by GNU as above even if
3567# invoked with -v only), the IRIX 6 native ld just overwrites the existing
3568# file, even when creating an executable, so an execution test fails.
3569# Remove possible default executable files to avoid this.
3570#
3571# FIXME: This really belongs into AC_PROG_CC and can be removed once
3572# Autoconf includes it.
3573rm -f a.out a.exe b.out
bf3b7cd3 3574
5213506e 3575# Find the native compiler
00020c16
ILT
3576ac_ext=c
3577ac_cpp='$CPP $CPPFLAGS'
3578ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3579ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3580ac_compiler_gnu=$ac_cv_c_compiler_gnu
5213506e
RW
3581if test -n "$ac_tool_prefix"; then
3582 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3583set dummy ${ac_tool_prefix}gcc; ac_word=$2
3584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3585$as_echo_n "checking for $ac_word... " >&6; }
3586if test "${ac_cv_prog_CC+set}" = set; then :
3587 $as_echo_n "(cached) " >&6
bf3b7cd3 3588else
5213506e
RW
3589 if test -n "$CC"; then
3590 ac_cv_prog_CC="$CC" # Let the user override the test.
3591else
3592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3593for as_dir in $PATH
3594do
3595 IFS=$as_save_IFS
3596 test -z "$as_dir" && as_dir=.
3597 for ac_exec_ext in '' $ac_executable_extensions; do
3598 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3599 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3601 break 2
3602 fi
3603done
3604 done
3605IFS=$as_save_IFS
00020c16 3606
5213506e
RW
3607fi
3608fi
3609CC=$ac_cv_prog_CC
3610if test -n "$CC"; then
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3612$as_echo "$CC" >&6; }
bf3b7cd3 3613else
5213506e
RW
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3615$as_echo "no" >&6; }
3616fi
3617
bf3b7cd3 3618
bf3b7cd3 3619fi
5213506e
RW
3620if test -z "$ac_cv_prog_CC"; then
3621 ac_ct_CC=$CC
3622 # Extract the first word of "gcc", so it can be a program name with args.
3623set dummy gcc; ac_word=$2
3624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3625$as_echo_n "checking for $ac_word... " >&6; }
3626if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3627 $as_echo_n "(cached) " >&6
3628else
3629 if test -n "$ac_ct_CC"; then
3630 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3631else
3632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3633for as_dir in $PATH
3634do
3635 IFS=$as_save_IFS
3636 test -z "$as_dir" && as_dir=.
3637 for ac_exec_ext in '' $ac_executable_extensions; do
3638 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3639 ac_cv_prog_ac_ct_CC="gcc"
3640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3641 break 2
3642 fi
00020c16 3643done
5213506e
RW
3644 done
3645IFS=$as_save_IFS
00020c16 3646
bf3b7cd3 3647fi
5213506e
RW
3648fi
3649ac_ct_CC=$ac_cv_prog_ac_ct_CC
3650if test -n "$ac_ct_CC"; then
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3652$as_echo "$ac_ct_CC" >&6; }
3653else
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3655$as_echo "no" >&6; }
3656fi
00020c16 3657
5213506e
RW
3658 if test "x$ac_ct_CC" = x; then
3659 CC=""
3660 else
3661 case $cross_compiling:$ac_tool_warned in
3662yes:)
3663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3665ac_tool_warned=yes ;;
3666esac
3667 CC=$ac_ct_CC
3668 fi
3669else
3670 CC="$ac_cv_prog_CC"
3671fi
00020c16 3672
5213506e
RW
3673if test -z "$CC"; then
3674 if test -n "$ac_tool_prefix"; then
3675 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3676set dummy ${ac_tool_prefix}cc; ac_word=$2
3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678$as_echo_n "checking for $ac_word... " >&6; }
3679if test "${ac_cv_prog_CC+set}" = set; then :
3680 $as_echo_n "(cached) " >&6
bf3b7cd3 3681else
5213506e
RW
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
00020c16 3684else
5213506e
RW
3685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
3690 for ac_exec_ext in '' $ac_executable_extensions; do
3691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3692 ac_cv_prog_CC="${ac_tool_prefix}cc"
3693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3694 break 2
3695 fi
3696done
3697 done
3698IFS=$as_save_IFS
00020c16 3699
00020c16 3700fi
00020c16 3701fi
5213506e
RW
3702CC=$ac_cv_prog_CC
3703if test -n "$CC"; then
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705$as_echo "$CC" >&6; }
00020c16 3706else
5213506e
RW
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708$as_echo "no" >&6; }
3709fi
bf3b7cd3 3710
bf3b7cd3 3711
5213506e
RW
3712 fi
3713fi
3714if test -z "$CC"; then
3715 # Extract the first word of "cc", so it can be a program name with args.
3716set dummy cc; ac_word=$2
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
3719if test "${ac_cv_prog_CC+set}" = set; then :
3720 $as_echo_n "(cached) " >&6
bf3b7cd3 3721else
5213506e
RW
3722 if test -n "$CC"; then
3723 ac_cv_prog_CC="$CC" # Let the user override the test.
3724else
3725 ac_prog_rejected=no
3726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
3731 for ac_exec_ext in '' $ac_executable_extensions; do
3732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3733 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3734 ac_prog_rejected=yes
3735 continue
3736 fi
3737 ac_cv_prog_CC="cc"
3738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3739 break 2
3740 fi
3741done
3742 done
3743IFS=$as_save_IFS
bf3b7cd3 3744
5213506e
RW
3745if test $ac_prog_rejected = yes; then
3746 # We found a bogon in the path, so make sure we never use it.
3747 set dummy $ac_cv_prog_CC
3748 shift
3749 if test $# != 0; then
3750 # We chose a different compiler from the bogus one.
3751 # However, it has the same basename, so the bogon will be chosen
3752 # first if we set CC to just the basename; use the full file name.
3753 shift
3754 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3755 fi
bf3b7cd3 3756fi
5213506e
RW
3757fi
3758fi
3759CC=$ac_cv_prog_CC
3760if test -n "$CC"; then
3761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3762$as_echo "$CC" >&6; }
bf3b7cd3 3763else
5213506e
RW
3764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3765$as_echo "no" >&6; }
3766fi
bf3b7cd3 3767
bf3b7cd3 3768
5213506e
RW
3769fi
3770if test -z "$CC"; then
3771 if test -n "$ac_tool_prefix"; then
3772 for ac_prog in cl.exe
3773 do
3774 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3775set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777$as_echo_n "checking for $ac_word... " >&6; }
3778if test "${ac_cv_prog_CC+set}" = set; then :
3779 $as_echo_n "(cached) " >&6
bf3b7cd3 3780else
5213506e
RW
3781 if test -n "$CC"; then
3782 ac_cv_prog_CC="$CC" # Let the user override the test.
3783else
3784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785for as_dir in $PATH
3786do
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
3789 for ac_exec_ext in '' $ac_executable_extensions; do
3790 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3791 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3793 break 2
3794 fi
3795done
3796 done
3797IFS=$as_save_IFS
bf3b7cd3 3798
bf3b7cd3 3799fi
5213506e
RW
3800fi
3801CC=$ac_cv_prog_CC
3802if test -n "$CC"; then
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3804$as_echo "$CC" >&6; }
3805else
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807$as_echo "no" >&6; }
3808fi
3809
3810
3811 test -n "$CC" && break
bf3b7cd3 3812 done
5213506e
RW
3813fi
3814if test -z "$CC"; then
3815 ac_ct_CC=$CC
3816 for ac_prog in cl.exe
3817do
3818 # Extract the first word of "$ac_prog", so it can be a program name with args.
3819set dummy $ac_prog; ac_word=$2
3820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3821$as_echo_n "checking for $ac_word... " >&6; }
3822if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3823 $as_echo_n "(cached) " >&6
bf3b7cd3 3824else
5213506e
RW
3825 if test -n "$ac_ct_CC"; then
3826 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3827else
3828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829for as_dir in $PATH
3830do
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
3833 for ac_exec_ext in '' $ac_executable_extensions; do
3834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3835 ac_cv_prog_ac_ct_CC="$ac_prog"
3836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3837 break 2
3838 fi
3839done
3840 done
3841IFS=$as_save_IFS
bf3b7cd3 3842
bf3b7cd3 3843fi
bf3b7cd3 3844fi
5213506e
RW
3845ac_ct_CC=$ac_cv_prog_ac_ct_CC
3846if test -n "$ac_ct_CC"; then
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3848$as_echo "$ac_ct_CC" >&6; }
bf3b7cd3 3849else
5213506e
RW
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851$as_echo "no" >&6; }
3852fi
3853
3854
3855 test -n "$ac_ct_CC" && break
3856done
3857
3858 if test "x$ac_ct_CC" = x; then
3859 CC=""
3860 else
3861 case $cross_compiling:$ac_tool_warned in
3862yes:)
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3865ac_tool_warned=yes ;;
3866esac
3867 CC=$ac_ct_CC
3868 fi
3869fi
bf3b7cd3 3870
bf3b7cd3 3871fi
5213506e
RW
3872
3873
3874test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3876as_fn_error "no acceptable C compiler found in \$PATH
3877See \`config.log' for more details." "$LINENO" 5; }
3878
3879# Provide some information about the compiler.
3880$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3881set X $ac_compile
3882ac_compiler=$2
3883for ac_option in --version -v -V -qversion; do
3884 { { ac_try="$ac_compiler $ac_option >&5"
3885case "(($ac_try" in
3886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3887 *) ac_try_echo=$ac_try;;
bf3b7cd3 3888esac
5213506e
RW
3889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3890$as_echo "$ac_try_echo"; } >&5
3891 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3892 ac_status=$?
3893 if test -s conftest.err; then
3894 sed '10a\
3895... rest of stderr output deleted ...
3896 10q' conftest.err >conftest.er1
3897 cat conftest.er1 >&5
3898 rm -f conftest.er1 conftest.err
3899 fi
3900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3901 test $ac_status = 0; }
3902done
3903
3904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 3905/* end confdefs.h. */
5213506e 3906
bf3b7cd3
JD
3907int
3908main ()
3909{
3910
bf3b7cd3
JD
3911 ;
3912 return 0;
3913}
3914_ACEOF
5213506e
RW
3915ac_clean_files_save=$ac_clean_files
3916ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3917# Try to create an executable without -o first, disregard a.out.
3918# It will help us diagnose broken compilers, and finding out an intuition
3919# of exeext.
3920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3921$as_echo_n "checking for C compiler default output file name... " >&6; }
3922ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3923
3924# The possible output files:
3925ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3926
3927ac_rmfiles=
3928for ac_file in $ac_files
3929do
3930 case $ac_file in
3931 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3932 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3933 esac
3934done
3935rm -f $ac_rmfiles
3936
3937if { { ac_try="$ac_link_default"
3938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3943$as_echo "$ac_try_echo"; } >&5
3944 (eval "$ac_link_default") 2>&5
3945 ac_status=$?
3946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3947 test $ac_status = 0; }; then :
3948 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3949# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3950# in a Makefile. We should not override ac_cv_exeext if it was cached,
3951# so that the user can short-circuit this test for compilers unknown to
3952# Autoconf.
3953for ac_file in $ac_files ''
3954do
3955 test -f "$ac_file" || continue
3956 case $ac_file in
3957 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3958 ;;
3959 [ab].out )
3960 # We found the default executable, but exeext='' is most
3961 # certainly right.
3962 break;;
3963 *.* )
3964 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3965 then :; else
3966 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3967 fi
3968 # We set ac_cv_exeext here because the later test for it is not
3969 # safe: cross compilers may not add the suffix if given an `-o'
3970 # argument, so we may need to know it at that point already.
3971 # Even if this section looks crufty: it has the advantage of
3972 # actually working.
3973 break;;
3974 * )
3975 break;;
3976 esac
3977done
3978test "$ac_cv_exeext" = no && ac_cv_exeext=
3979
bf3b7cd3 3980else
5213506e
RW
3981 ac_file=''
3982fi
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3984$as_echo "$ac_file" >&6; }
3985if test -z "$ac_file"; then :
3986 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
3987sed 's/^/| /' conftest.$ac_ext >&5
3988
5213506e
RW
3989{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3991{ as_fn_set_status 77
3992as_fn_error "C compiler cannot create executables
3993See \`config.log' for more details." "$LINENO" 5; }; }
bf3b7cd3 3994fi
5213506e
RW
3995ac_exeext=$ac_cv_exeext
3996
3997# Check that the compiler produces executables we can run. If not, either
3998# the compiler is broken, or we cross compile.
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4000$as_echo_n "checking whether the C compiler works... " >&6; }
4001# If not cross compiling, check that we can run a simple program.
4002if test "$cross_compiling" != yes; then
4003 if { ac_try='./$ac_file'
4004 { { case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
4008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009$as_echo "$ac_try_echo"; } >&5
4010 (eval "$ac_try") 2>&5
4011 ac_status=$?
4012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }; }; then
4014 cross_compiling=no
4015 else
4016 if test "$cross_compiling" = maybe; then
4017 cross_compiling=yes
4018 else
4019 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4021as_fn_error "cannot run C compiled programs.
4022If you meant to cross compile, use \`--host'.
4023See \`config.log' for more details." "$LINENO" 5; }
4024 fi
4025 fi
bf3b7cd3 4026fi
5213506e
RW
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4028$as_echo "yes" >&6; }
4029
4030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
4031ac_clean_files=$ac_clean_files_save
4032# Check that the compiler produces executables we can run. If not, either
4033# the compiler is broken, or we cross compile.
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4035$as_echo_n "checking whether we are cross compiling... " >&6; }
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4037$as_echo "$cross_compiling" >&6; }
4038
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4040$as_echo_n "checking for suffix of executables... " >&6; }
4041if { { ac_try="$ac_link"
4042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
4046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
4048 (eval "$ac_link") 2>&5
4049 ac_status=$?
4050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }; then :
4052 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4053# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4054# work properly (i.e., refer to `conftest.exe'), while it won't with
4055# `rm'.
4056for ac_file in conftest.exe conftest conftest.*; do
4057 test -f "$ac_file" || continue
4058 case $ac_file in
4059 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4060 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4061 break;;
4062 * ) break;;
4063 esac
4064done
b61ff9c8 4065else
5213506e
RW
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4068as_fn_error "cannot compute suffix of executables: cannot compile and link
4069See \`config.log' for more details." "$LINENO" 5; }
b61ff9c8 4070fi
5213506e
RW
4071rm -f conftest$ac_cv_exeext
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4073$as_echo "$ac_cv_exeext" >&6; }
bf3b7cd3 4074
5213506e
RW
4075rm -f conftest.$ac_ext
4076EXEEXT=$ac_cv_exeext
4077ac_exeext=$EXEEXT
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4079$as_echo_n "checking for suffix of object files... " >&6; }
4080if test "${ac_cv_objext+set}" = set; then :
4081 $as_echo_n "(cached) " >&6
bf3b7cd3 4082else
5213506e 4083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4084/* end confdefs.h. */
5213506e 4085
bf3b7cd3
JD
4086int
4087main ()
4088{
5213506e 4089
bf3b7cd3
JD
4090 ;
4091 return 0;
4092}
4093_ACEOF
5213506e
RW
4094rm -f conftest.o conftest.obj
4095if { { ac_try="$ac_compile"
4096case "(($ac_try" in
4097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4098 *) ac_try_echo=$ac_try;;
4099esac
4100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4101$as_echo "$ac_try_echo"; } >&5
4102 (eval "$ac_compile") 2>&5
4103 ac_status=$?
4104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4105 test $ac_status = 0; }; then :
4106 for ac_file in conftest.o conftest.obj conftest.*; do
4107 test -f "$ac_file" || continue;
4108 case $ac_file in
4109 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4110 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4111 break;;
4112 esac
4113done
bf3b7cd3 4114else
5213506e 4115 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
4116sed 's/^/| /' conftest.$ac_ext >&5
4117
5213506e
RW
4118{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4120as_fn_error "cannot compute suffix of object files: cannot compile
4121See \`config.log' for more details." "$LINENO" 5; }
bf3b7cd3 4122fi
5213506e 4123rm -f conftest.$ac_cv_objext conftest.$ac_ext
bf3b7cd3 4124fi
5213506e
RW
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4126$as_echo "$ac_cv_objext" >&6; }
4127OBJEXT=$ac_cv_objext
4128ac_objext=$OBJEXT
4129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4130$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4131if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4132 $as_echo_n "(cached) " >&6
bf3b7cd3 4133else
5213506e 4134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4135/* end confdefs.h. */
5213506e 4136
bf3b7cd3
JD
4137int
4138main ()
4139{
5213506e
RW
4140#ifndef __GNUC__
4141 choke me
4142#endif
bf3b7cd3
JD
4143
4144 ;
4145 return 0;
4146}
4147_ACEOF
5213506e
RW
4148if ac_fn_c_try_compile "$LINENO"; then :
4149 ac_compiler_gnu=yes
4150else
4151 ac_compiler_gnu=no
4152fi
4153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4154ac_cv_c_compiler_gnu=$ac_compiler_gnu
4155
4156fi
4157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4158$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4159if test $ac_compiler_gnu = yes; then
4160 GCC=yes
4161else
4162 GCC=
4163fi
4164ac_test_CFLAGS=${CFLAGS+set}
4165ac_save_CFLAGS=$CFLAGS
4166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4167$as_echo_n "checking whether $CC accepts -g... " >&6; }
4168if test "${ac_cv_prog_cc_g+set}" = set; then :
4169 $as_echo_n "(cached) " >&6
4170else
4171 ac_save_c_werror_flag=$ac_c_werror_flag
4172 ac_c_werror_flag=yes
4173 ac_cv_prog_cc_g=no
4174 CFLAGS="-g"
4175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4176/* end confdefs.h. */
5213506e 4177
bf3b7cd3
JD
4178int
4179main ()
4180{
bf3b7cd3
JD
4181
4182 ;
4183 return 0;
4184}
4185_ACEOF
5213506e
RW
4186if ac_fn_c_try_compile "$LINENO"; then :
4187 ac_cv_prog_cc_g=yes
bf3b7cd3 4188else
5213506e
RW
4189 CFLAGS=""
4190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4191/* end confdefs.h. */
5213506e 4192
bf3b7cd3
JD
4193int
4194main ()
4195{
bf3b7cd3
JD
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
5213506e
RW
4201if ac_fn_c_try_compile "$LINENO"; then :
4202
4203else
4204 ac_c_werror_flag=$ac_save_c_werror_flag
4205 CFLAGS="-g"
4206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4207/* end confdefs.h. */
5213506e 4208
bf3b7cd3
JD
4209int
4210main ()
4211{
bf3b7cd3
JD
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
5213506e
RW
4217if ac_fn_c_try_compile "$LINENO"; then :
4218 ac_cv_prog_cc_g=yes
bf3b7cd3 4219fi
5213506e 4220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4221fi
5213506e 4222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4223fi
5213506e
RW
4224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4225 ac_c_werror_flag=$ac_save_c_werror_flag
4226fi
4227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4228$as_echo "$ac_cv_prog_cc_g" >&6; }
4229if test "$ac_test_CFLAGS" = set; then
4230 CFLAGS=$ac_save_CFLAGS
4231elif test $ac_cv_prog_cc_g = yes; then
4232 if test "$GCC" = yes; then
4233 CFLAGS="-g -O2"
4234 else
4235 CFLAGS="-g"
4236 fi
4237else
4238 if test "$GCC" = yes; then
4239 CFLAGS="-O2"
4240 else
4241 CFLAGS=
4242 fi
4243fi
4244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4245$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4246if test "${ac_cv_prog_cc_c89+set}" = set; then :
4247 $as_echo_n "(cached) " >&6
4248else
4249 ac_cv_prog_cc_c89=no
4250ac_save_CC=$CC
4251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4252/* end confdefs.h. */
5213506e
RW
4253#include <stdarg.h>
4254#include <stdio.h>
4255#include <sys/types.h>
4256#include <sys/stat.h>
4257/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4258struct buf { int x; };
4259FILE * (*rcsopen) (struct buf *, struct stat *, int);
4260static char *e (p, i)
4261 char **p;
4262 int i;
4263{
4264 return p[i];
4265}
4266static char *f (char * (*g) (char **, int), char **p, ...)
4267{
4268 char *s;
4269 va_list v;
4270 va_start (v,p);
4271 s = g (p, va_arg (v,int));
4272 va_end (v);
4273 return s;
4274}
4275
4276/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4277 function prototypes and stuff, but not '\xHH' hex character constants.
4278 These don't provoke an error unfortunately, instead are silently treated
4279 as 'x'. The following induces an error, until -std is added to get
4280 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4281 array size at least. It's necessary to write '\x00'==0 to get something
4282 that's true only with -std. */
4283int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4284
4285/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4286 inside strings and character constants. */
4287#define FOO(x) 'x'
4288int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4289
4290int test (int i, double x);
4291struct s1 {int (*f) (int a);};
4292struct s2 {int (*f) (double a);};
4293int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4294int argc;
4295char **argv;
bf3b7cd3
JD
4296int
4297main ()
4298{
5213506e 4299return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bf3b7cd3
JD
4300 ;
4301 return 0;
4302}
4303_ACEOF
5213506e
RW
4304for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4305 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4306do
4307 CC="$ac_save_CC $ac_arg"
4308 if ac_fn_c_try_compile "$LINENO"; then :
4309 ac_cv_prog_cc_c89=$ac_arg
bf3b7cd3 4310fi
5213506e
RW
4311rm -f core conftest.err conftest.$ac_objext
4312 test "x$ac_cv_prog_cc_c89" != "xno" && break
bf3b7cd3 4313done
5213506e
RW
4314rm -f conftest.$ac_ext
4315CC=$ac_save_CC
4316
4317fi
4318# AC_CACHE_VAL
4319case "x$ac_cv_prog_cc_c89" in
4320 x)
4321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4322$as_echo "none needed" >&6; } ;;
4323 xno)
4324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4325$as_echo "unsupported" >&6; } ;;
4326 *)
4327 CC="$CC $ac_cv_prog_cc_c89"
4328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4329$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bf3b7cd3 4330esac
5213506e
RW
4331if test "x$ac_cv_prog_cc_c89" != xno; then :
4332
4333fi
4334
4335ac_ext=c
4336ac_cpp='$CPP $CPPFLAGS'
4337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339ac_compiler_gnu=$ac_cv_c_compiler_gnu
4340
4341if test "x$CC" != xcc; then
4342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4343$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
b61ff9c8 4344else
5213506e
RW
4345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4346$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4347fi
4348set dummy $CC; ac_cc=`$as_echo "$2" |
4349 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4350if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
4351 $as_echo_n "(cached) " >&6
4352else
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4354/* end confdefs.h. */
5213506e 4355
bf3b7cd3
JD
4356int
4357main ()
4358{
4359
bf3b7cd3
JD
4360 ;
4361 return 0;
4362}
4363_ACEOF
5213506e
RW
4364# Make sure it works both with $CC and with simple cc.
4365# We do the test twice because some compilers refuse to overwrite an
4366# existing .o file with -o, though they will create one.
4367ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4368rm -f conftest2.*
4369if { { case "(($ac_try" in
4370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4371 *) ac_try_echo=$ac_try;;
4372esac
4373eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4374$as_echo "$ac_try_echo"; } >&5
4375 (eval "$ac_try") 2>&5
4376 ac_status=$?
4377 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4378 test $ac_status = 0; } &&
4379 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4381 *) ac_try_echo=$ac_try;;
4382esac
4383eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4384$as_echo "$ac_try_echo"; } >&5
4385 (eval "$ac_try") 2>&5
bf3b7cd3 4386 ac_status=$?
5213506e
RW
4387 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4388 test $ac_status = 0; };
4389then
4390 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4391 if test "x$CC" != xcc; then
4392 # Test first that cc exists at all.
4393 if { ac_try='cc -c conftest.$ac_ext >&5'
4394 { { case "(($ac_try" in
4395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4396 *) ac_try_echo=$ac_try;;
4397esac
4398eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4399$as_echo "$ac_try_echo"; } >&5
4400 (eval "$ac_try") 2>&5
4401 ac_status=$?
4402 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4403 test $ac_status = 0; }; }; then
4404 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4405 rm -f conftest2.*
4406 if { { case "(($ac_try" in
4407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4408 *) ac_try_echo=$ac_try;;
4409esac
4410eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4411$as_echo "$ac_try_echo"; } >&5
4412 (eval "$ac_try") 2>&5
4413 ac_status=$?
4414 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4415 test $ac_status = 0; } &&
4416 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4418 *) ac_try_echo=$ac_try;;
4419esac
4420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4421$as_echo "$ac_try_echo"; } >&5
4422 (eval "$ac_try") 2>&5
bf3b7cd3 4423 ac_status=$?
5213506e
RW
4424 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4425 test $ac_status = 0; };
4426 then
4427 # cc works too.
4428 :
4429 else
4430 # cc exists but doesn't like -o.
4431 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4432 fi
4433 fi
4434 fi
bf3b7cd3 4435else
5213506e
RW
4436 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4437fi
4438rm -f core conftest*
bf3b7cd3 4439
b61ff9c8 4440fi
5213506e
RW
4441if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4443$as_echo "yes" >&6; }
4444else
4445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447
4448$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
4449
bf3b7cd3 4450fi
5213506e
RW
4451
4452# expand $ac_aux_dir to an absolute path
4453am_aux_dir=`cd $ac_aux_dir && pwd`
4454
4455# FIXME: we rely on the cache variable name because
4456# there is no other way.
4457set dummy $CC
4458am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4459eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
4460if test "$am_t" != yes; then
4461 # Losing compiler, so override with the script.
4462 # FIXME: It is wrong to rewrite CC.
4463 # But if we don't then we get into trouble of one sort or another.
4464 # A longer-term fix would be to have automake use am__CC in this case,
4465 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4466 CC="$am_aux_dir/compile $CC"
bf3b7cd3 4467fi
5213506e
RW
4468
4469
4470ac_ext=cpp
4471ac_cpp='$CXXCPP $CPPFLAGS'
4472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4475if test -z "$CXX"; then
4476 if test -n "$CCC"; then
4477 CXX=$CCC
4478 else
4479 if test -n "$ac_tool_prefix"; then
4480 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4481 do
4482 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4483set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4485$as_echo_n "checking for $ac_word... " >&6; }
4486if test "${ac_cv_prog_CXX+set}" = set; then :
4487 $as_echo_n "(cached) " >&6
b61ff9c8 4488else
5213506e
RW
4489 if test -n "$CXX"; then
4490 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4491else
4492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in $PATH
4494do
4495 IFS=$as_save_IFS
4496 test -z "$as_dir" && as_dir=.
4497 for ac_exec_ext in '' $ac_executable_extensions; do
4498 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4499 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4501 break 2
4502 fi
4503done
4504 done
4505IFS=$as_save_IFS
4506
bf3b7cd3 4507fi
b61ff9c8 4508fi
5213506e
RW
4509CXX=$ac_cv_prog_CXX
4510if test -n "$CXX"; then
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4512$as_echo "$CXX" >&6; }
4513else
4514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4515$as_echo "no" >&6; }
4516fi
bf3b7cd3
JD
4517
4518
5213506e
RW
4519 test -n "$CXX" && break
4520 done
4521fi
4522if test -z "$CXX"; then
4523 ac_ct_CXX=$CXX
4524 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4525do
4526 # Extract the first word of "$ac_prog", so it can be a program name with args.
4527set dummy $ac_prog; ac_word=$2
4528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4529$as_echo_n "checking for $ac_word... " >&6; }
4530if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
4531 $as_echo_n "(cached) " >&6
bf3b7cd3 4532else
5213506e
RW
4533 if test -n "$ac_ct_CXX"; then
4534 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
bf3b7cd3 4535else
5213506e
RW
4536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in $PATH
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
4541 for ac_exec_ext in '' $ac_executable_extensions; do
4542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4543 ac_cv_prog_ac_ct_CXX="$ac_prog"
4544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4545 break 2
4546 fi
4547done
4548 done
4549IFS=$as_save_IFS
bf3b7cd3 4550
bf3b7cd3 4551fi
bf3b7cd3 4552fi
5213506e
RW
4553ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4554if test -n "$ac_ct_CXX"; then
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4556$as_echo "$ac_ct_CXX" >&6; }
bf3b7cd3 4557else
5213506e
RW
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4559$as_echo "no" >&6; }
4560fi
bf3b7cd3 4561
5213506e
RW
4562
4563 test -n "$ac_ct_CXX" && break
4564done
4565
4566 if test "x$ac_ct_CXX" = x; then
4567 CXX="g++"
4568 else
4569 case $cross_compiling:$ac_tool_warned in
4570yes:)
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4573ac_tool_warned=yes ;;
4574esac
4575 CXX=$ac_ct_CXX
4576 fi
4577fi
4578
4579 fi
4580fi
4581# Provide some information about the compiler.
4582$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4583set X $ac_compile
4584ac_compiler=$2
4585for ac_option in --version -v -V -qversion; do
4586 { { ac_try="$ac_compiler $ac_option >&5"
4587case "(($ac_try" in
4588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4589 *) ac_try_echo=$ac_try;;
4590esac
4591eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4592$as_echo "$ac_try_echo"; } >&5
4593 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
b61ff9c8 4594 ac_status=$?
5213506e
RW
4595 if test -s conftest.err; then
4596 sed '10a\
4597... rest of stderr output deleted ...
4598 10q' conftest.err >conftest.er1
4599 cat conftest.er1 >&5
4600 rm -f conftest.er1 conftest.err
4601 fi
4602 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4603 test $ac_status = 0; }
4604done
4605
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4607$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4608if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
4609 $as_echo_n "(cached) " >&6
4610else
4611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4612/* end confdefs.h. */
5213506e 4613
bf3b7cd3
JD
4614int
4615main ()
4616{
5213506e
RW
4617#ifndef __GNUC__
4618 choke me
4619#endif
bf3b7cd3
JD
4620
4621 ;
4622 return 0;
4623}
4624_ACEOF
5213506e
RW
4625if ac_fn_cxx_try_compile "$LINENO"; then :
4626 ac_compiler_gnu=yes
bf3b7cd3 4627else
5213506e
RW
4628 ac_compiler_gnu=no
4629fi
4630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4631ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
bf3b7cd3 4632
bf3b7cd3 4633fi
5213506e
RW
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4635$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4636if test $ac_compiler_gnu = yes; then
4637 GXX=yes
bf3b7cd3 4638else
5213506e
RW
4639 GXX=
4640fi
4641ac_test_CXXFLAGS=${CXXFLAGS+set}
4642ac_save_CXXFLAGS=$CXXFLAGS
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4644$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4645if test "${ac_cv_prog_cxx_g+set}" = set; then :
4646 $as_echo_n "(cached) " >&6
4647else
4648 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4649 ac_cxx_werror_flag=yes
4650 ac_cv_prog_cxx_g=no
4651 CXXFLAGS="-g"
4652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4653/* end confdefs.h. */
5213506e 4654
bf3b7cd3
JD
4655int
4656main ()
4657{
bf3b7cd3
JD
4658
4659 ;
4660 return 0;
4661}
4662_ACEOF
5213506e
RW
4663if ac_fn_cxx_try_compile "$LINENO"; then :
4664 ac_cv_prog_cxx_g=yes
4665else
4666 CXXFLAGS=""
4667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4668/* end confdefs.h. */
5213506e 4669
bf3b7cd3
JD
4670int
4671main ()
4672{
bf3b7cd3
JD
4673
4674 ;
4675 return 0;
4676}
4677_ACEOF
5213506e 4678if ac_fn_cxx_try_compile "$LINENO"; then :
bf3b7cd3 4679
bf3b7cd3 4680else
5213506e
RW
4681 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4682 CXXFLAGS="-g"
4683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4684/* end confdefs.h. */
5213506e 4685
bf3b7cd3
JD
4686int
4687main ()
4688{
bf3b7cd3
JD
4689
4690 ;
4691 return 0;
4692}
4693_ACEOF
5213506e
RW
4694if ac_fn_cxx_try_compile "$LINENO"; then :
4695 ac_cv_prog_cxx_g=yes
4696fi
4697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4698fi
4699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4700fi
4701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4702 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4703fi
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4705$as_echo "$ac_cv_prog_cxx_g" >&6; }
4706if test "$ac_test_CXXFLAGS" = set; then
4707 CXXFLAGS=$ac_save_CXXFLAGS
4708elif test $ac_cv_prog_cxx_g = yes; then
4709 if test "$GXX" = yes; then
4710 CXXFLAGS="-g -O2"
4711 else
4712 CXXFLAGS="-g"
4713 fi
bf3b7cd3 4714else
5213506e
RW
4715 if test "$GXX" = yes; then
4716 CXXFLAGS="-O2"
4717 else
4718 CXXFLAGS=
4719 fi
4720fi
4721ac_ext=c
4722ac_cpp='$CPP $CPPFLAGS'
4723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4725ac_compiler_gnu=$ac_cv_c_compiler_gnu
4726
4727
4728
4729
4730if test -n "$ac_tool_prefix"; then
4731 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
4732set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734$as_echo_n "checking for $ac_word... " >&6; }
4735if test "${ac_cv_prog_GNATBIND+set}" = set; then :
4736 $as_echo_n "(cached) " >&6
4737else
4738 if test -n "$GNATBIND"; then
4739 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
4740else
4741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742for as_dir in $PATH
4743do
4744 IFS=$as_save_IFS
4745 test -z "$as_dir" && as_dir=.
4746 for ac_exec_ext in '' $ac_executable_extensions; do
4747 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4748 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
4749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750 break 2
4751 fi
4752done
4753 done
4754IFS=$as_save_IFS
4755
4756fi
4757fi
4758GNATBIND=$ac_cv_prog_GNATBIND
4759if test -n "$GNATBIND"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATBIND" >&5
4761$as_echo "$GNATBIND" >&6; }
4762else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
bf3b7cd3 4767
bf3b7cd3 4768fi
5213506e
RW
4769if test -z "$ac_cv_prog_GNATBIND"; then
4770 ac_ct_GNATBIND=$GNATBIND
4771 # Extract the first word of "gnatbind", so it can be a program name with args.
4772set dummy gnatbind; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
4775if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then :
4776 $as_echo_n "(cached) " >&6
4777else
4778 if test -n "$ac_ct_GNATBIND"; then
4779 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
4780else
4781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782for as_dir in $PATH
4783do
4784 IFS=$as_save_IFS
4785 test -z "$as_dir" && as_dir=.
4786 for ac_exec_ext in '' $ac_executable_extensions; do
4787 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4788 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
4789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4790 break 2
4791 fi
bf3b7cd3 4792done
5213506e
RW
4793 done
4794IFS=$as_save_IFS
4795
4796fi
4797fi
4798ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
4799if test -n "$ac_ct_GNATBIND"; then
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATBIND" >&5
4801$as_echo "$ac_ct_GNATBIND" >&6; }
4802else
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804$as_echo "no" >&6; }
4805fi
4806
4807 if test "x$ac_ct_GNATBIND" = x; then
4808 GNATBIND="no"
4809 else
4810 case $cross_compiling:$ac_tool_warned in
4811yes:)
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4814ac_tool_warned=yes ;;
bf3b7cd3 4815esac
5213506e
RW
4816 GNATBIND=$ac_ct_GNATBIND
4817 fi
b61ff9c8 4818else
5213506e
RW
4819 GNATBIND="$ac_cv_prog_GNATBIND"
4820fi
bf3b7cd3 4821
5213506e
RW
4822if test -n "$ac_tool_prefix"; then
4823 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
4824set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if test "${ac_cv_prog_GNATMAKE+set}" = set; then :
4828 $as_echo_n "(cached) " >&6
4829else
4830 if test -n "$GNATMAKE"; then
4831 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
4832else
4833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4834for as_dir in $PATH
4835do
4836 IFS=$as_save_IFS
4837 test -z "$as_dir" && as_dir=.
4838 for ac_exec_ext in '' $ac_executable_extensions; do
4839 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4840 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
4841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4842 break 2
4843 fi
4844done
4845 done
4846IFS=$as_save_IFS
4847
4848fi
4849fi
4850GNATMAKE=$ac_cv_prog_GNATMAKE
4851if test -n "$GNATMAKE"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATMAKE" >&5
4853$as_echo "$GNATMAKE" >&6; }
4854else
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
4857fi
4858
4859
4860fi
4861if test -z "$ac_cv_prog_GNATMAKE"; then
4862 ac_ct_GNATMAKE=$GNATMAKE
4863 # Extract the first word of "gnatmake", so it can be a program name with args.
4864set dummy gnatmake; ac_word=$2
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then :
4868 $as_echo_n "(cached) " >&6
4869else
4870 if test -n "$ac_ct_GNATMAKE"; then
4871 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
4872else
4873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in $PATH
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
4878 for ac_exec_ext in '' $ac_executable_extensions; do
4879 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4880 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
4881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4882 break 2
4883 fi
4884done
4885 done
4886IFS=$as_save_IFS
4887
4888fi
4889fi
4890ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
4891if test -n "$ac_ct_GNATMAKE"; then
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATMAKE" >&5
4893$as_echo "$ac_ct_GNATMAKE" >&6; }
4894else
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899 if test "x$ac_ct_GNATMAKE" = x; then
4900 GNATMAKE="no"
bf3b7cd3 4901 else
5213506e
RW
4902 case $cross_compiling:$ac_tool_warned in
4903yes:)
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4906ac_tool_warned=yes ;;
4907esac
4908 GNATMAKE=$ac_ct_GNATMAKE
4909 fi
4910else
4911 GNATMAKE="$ac_cv_prog_GNATMAKE"
4912fi
bf3b7cd3 4913
5213506e
RW
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5
4915$as_echo_n "checking whether compiler driver understands Ada... " >&6; }
4916if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then :
4917 $as_echo_n "(cached) " >&6
bf3b7cd3 4918else
5213506e
RW
4919 cat >conftest.adb <<EOF
4920procedure conftest is begin null; end conftest;
4921EOF
4922acx_cv_cc_gcc_supports_ada=no
4923# There is a bug in old released versions of GCC which causes the
4924# driver to exit successfully when the appropriate language module
4925# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
4926# Therefore we must check for the error message as well as an
4927# unsuccessful exit.
4928# Other compilers, like HP Tru64 UNIX cc, exit successfully when
4929# given a .adb file, but produce no object file. So we must check
4930# if an object file was really produced to guard against this.
4931errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
4932if test x"$errors" = x && test -f conftest.$ac_objext; then
4933 acx_cv_cc_gcc_supports_ada=yes
4934fi
4935rm -f conftest.*
4936fi
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
4938$as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
bf3b7cd3 4939
5213506e
RW
4940if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
4941 have_gnat=yes
4942else
4943 have_gnat=no
b61ff9c8 4944fi
5213506e
RW
4945
4946
4947# autoconf is lame and doesn't give us any substitution variable for this.
4948if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
4949 NO_MINUS_C_MINUS_O=yes
4950else
4951 OUTPUT_OPTION='-o $@'
bf3b7cd3 4952fi
5213506e
RW
4953
4954
4955
4956# Remove the -O2: for historical reasons, unless bootstrapping we prefer
4957# optimizations to be activated explicitly by the toplevel.
4958case "$CC" in
4959 */prev-gcc/xgcc*) ;;
4960 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
4961esac
4962
4963
4964# -------------------------
4965# Check C compiler features
4966# -------------------------
4967
4968
4969ac_ext=c
4970ac_cpp='$CPP $CPPFLAGS'
4971ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4972ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4973ac_compiler_gnu=$ac_cv_c_compiler_gnu
4974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4975$as_echo_n "checking how to run the C preprocessor... " >&6; }
4976# On Suns, sometimes $CPP names a directory.
4977if test -n "$CPP" && test -d "$CPP"; then
4978 CPP=
bf3b7cd3 4979fi
5213506e
RW
4980if test -z "$CPP"; then
4981 if test "${ac_cv_prog_CPP+set}" = set; then :
4982 $as_echo_n "(cached) " >&6
b61ff9c8 4983else
5213506e
RW
4984 # Double quotes because CPP needs to be expanded
4985 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4986 do
4987 ac_preproc_ok=false
4988for ac_c_preproc_warn_flag in '' yes
4989do
4990 # Use a header file that comes with gcc, so configuring glibc
4991 # with a fresh cross-compiler works.
4992 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4993 # <limits.h> exists even on freestanding compilers.
4994 # On the NeXT, cc -E runs the code through the compiler's parser,
4995 # not just through cpp. "Syntax error" is here to catch this case.
4996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4997/* end confdefs.h. */
4998#ifdef __STDC__
4999# include <limits.h>
5000#else
5001# include <assert.h>
5002#endif
5003 Syntax error
bf3b7cd3 5004_ACEOF
5213506e 5005if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 5006
bf3b7cd3 5007else
5213506e
RW
5008 # Broken: fails on valid input.
5009continue
5010fi
5011rm -f conftest.err conftest.$ac_ext
5012
5013 # OK, works on sane cases. Now check whether nonexistent headers
5014 # can be detected and how.
5015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 5016/* end confdefs.h. */
5213506e 5017#include <ac_nonexistent.h>
bf3b7cd3 5018_ACEOF
5213506e
RW
5019if ac_fn_c_try_cpp "$LINENO"; then :
5020 # Broken: success on invalid input.
5021continue
b61ff9c8 5022else
5213506e
RW
5023 # Passes both tests.
5024ac_preproc_ok=:
5025break
bf3b7cd3 5026fi
5213506e 5027rm -f conftest.err conftest.$ac_ext
bf3b7cd3 5028
5213506e
RW
5029done
5030# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5031rm -f conftest.err conftest.$ac_ext
5032if $ac_preproc_ok; then :
5033 break
5034fi
bf3b7cd3 5035
5213506e
RW
5036 done
5037 ac_cv_prog_CPP=$CPP
bf3b7cd3 5038
8b1f719a 5039fi
5213506e 5040 CPP=$ac_cv_prog_CPP
8b1f719a 5041else
5213506e
RW
5042 ac_cv_prog_CPP=$CPP
5043fi
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5045$as_echo "$CPP" >&6; }
5046ac_preproc_ok=false
5047for ac_c_preproc_warn_flag in '' yes
5048do
5049 # Use a header file that comes with gcc, so configuring glibc
5050 # with a fresh cross-compiler works.
5051 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5052 # <limits.h> exists even on freestanding compilers.
5053 # On the NeXT, cc -E runs the code through the compiler's parser,
5054 # not just through cpp. "Syntax error" is here to catch this case.
5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 5056/* end confdefs.h. */
5213506e
RW
5057#ifdef __STDC__
5058# include <limits.h>
5059#else
5060# include <assert.h>
5061#endif
5062 Syntax error
bf3b7cd3 5063_ACEOF
5213506e 5064if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 5065
bf3b7cd3 5066else
5213506e
RW
5067 # Broken: fails on valid input.
5068continue
bf3b7cd3 5069fi
5213506e 5070rm -f conftest.err conftest.$ac_ext
bf3b7cd3 5071
5213506e
RW
5072 # OK, works on sane cases. Now check whether nonexistent headers
5073 # can be detected and how.
5074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 5075/* end confdefs.h. */
5213506e 5076#include <ac_nonexistent.h>
bf3b7cd3 5077_ACEOF
5213506e
RW
5078if ac_fn_c_try_cpp "$LINENO"; then :
5079 # Broken: success on invalid input.
5080continue
bf3b7cd3 5081else
5213506e
RW
5082 # Passes both tests.
5083ac_preproc_ok=:
5084break
bf3b7cd3 5085fi
5213506e
RW
5086rm -f conftest.err conftest.$ac_ext
5087
bf3b7cd3 5088done
5213506e
RW
5089# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5090rm -f conftest.err conftest.$ac_ext
5091if $ac_preproc_ok; then :
5092
b61ff9c8 5093else
5213506e
RW
5094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5096as_fn_error "C preprocessor \"$CPP\" fails sanity check
5097See \`config.log' for more details." "$LINENO" 5; }
5098fi
bf3b7cd3 5099
5213506e
RW
5100ac_ext=c
5101ac_cpp='$CPP $CPPFLAGS'
5102ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5103ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5104ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 5105
bf3b7cd3 5106
5213506e
RW
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5108$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5109if test "${ac_cv_path_GREP+set}" = set; then :
5110 $as_echo_n "(cached) " >&6
5111else
5112 if test -z "$GREP"; then
5113 ac_path_GREP_found=false
5114 # Loop through the user's path and test for each of PROGNAME-LIST
5115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5116for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5117do
5118 IFS=$as_save_IFS
5119 test -z "$as_dir" && as_dir=.
5120 for ac_prog in grep ggrep; do
5121 for ac_exec_ext in '' $ac_executable_extensions; do
5122 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5123 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5124# Check for GNU ac_path_GREP and select it if it is found.
5125 # Check for GNU $ac_path_GREP
5126case `"$ac_path_GREP" --version 2>&1` in
5127*GNU*)
5128 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5129*)
5130 ac_count=0
5131 $as_echo_n 0123456789 >"conftest.in"
5132 while :
5133 do
5134 cat "conftest.in" "conftest.in" >"conftest.tmp"
5135 mv "conftest.tmp" "conftest.in"
5136 cp "conftest.in" "conftest.nl"
5137 $as_echo 'GREP' >> "conftest.nl"
5138 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5139 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5140 as_fn_arith $ac_count + 1 && ac_count=$as_val
5141 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5142 # Best one so far, save it but keep looking for a better one
5143 ac_cv_path_GREP="$ac_path_GREP"
5144 ac_path_GREP_max=$ac_count
5145 fi
5146 # 10*(2^10) chars as input seems more than enough
5147 test $ac_count -gt 10 && break
5148 done
5149 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5150esac
5151
5152 $ac_path_GREP_found && break 3
5153 done
5154 done
5155 done
5156IFS=$as_save_IFS
5157 if test -z "$ac_cv_path_GREP"; then
5158 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5159 fi
b61ff9c8 5160else
5213506e 5161 ac_cv_path_GREP=$GREP
2f41c1d6 5162fi
5213506e 5163
b61ff9c8 5164fi
5213506e
RW
5165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5166$as_echo "$ac_cv_path_GREP" >&6; }
5167 GREP="$ac_cv_path_GREP"
bf3b7cd3
JD
5168
5169
5213506e
RW
5170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5171$as_echo_n "checking for egrep... " >&6; }
5172if test "${ac_cv_path_EGREP+set}" = set; then :
5173 $as_echo_n "(cached) " >&6
5ec1c5e6 5174else
5213506e
RW
5175 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5176 then ac_cv_path_EGREP="$GREP -E"
5177 else
5178 if test -z "$EGREP"; then
5179 ac_path_EGREP_found=false
5180 # Loop through the user's path and test for each of PROGNAME-LIST
5181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5182for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5183do
5184 IFS=$as_save_IFS
5185 test -z "$as_dir" && as_dir=.
5186 for ac_prog in egrep; do
5187 for ac_exec_ext in '' $ac_executable_extensions; do
5188 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5189 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5190# Check for GNU ac_path_EGREP and select it if it is found.
5191 # Check for GNU $ac_path_EGREP
5192case `"$ac_path_EGREP" --version 2>&1` in
5193*GNU*)
5194 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5195*)
5196 ac_count=0
5197 $as_echo_n 0123456789 >"conftest.in"
5198 while :
5199 do
5200 cat "conftest.in" "conftest.in" >"conftest.tmp"
5201 mv "conftest.tmp" "conftest.in"
5202 cp "conftest.in" "conftest.nl"
5203 $as_echo 'EGREP' >> "conftest.nl"
5204 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5205 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5206 as_fn_arith $ac_count + 1 && ac_count=$as_val
5207 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5208 # Best one so far, save it but keep looking for a better one
5209 ac_cv_path_EGREP="$ac_path_EGREP"
5210 ac_path_EGREP_max=$ac_count
5211 fi
5212 # 10*(2^10) chars as input seems more than enough
5213 test $ac_count -gt 10 && break
5214 done
5215 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5216esac
5ec1c5e6 5217
5213506e
RW
5218 $ac_path_EGREP_found && break 3
5219 done
5220 done
5221 done
5222IFS=$as_save_IFS
5223 if test -z "$ac_cv_path_EGREP"; then
5224 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5225 fi
5226else
5227 ac_cv_path_EGREP=$EGREP
5ec1c5e6 5228fi
5213506e
RW
5229
5230 fi
5ec1c5e6 5231fi
5213506e
RW
5232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5233$as_echo "$ac_cv_path_EGREP" >&6; }
5234 EGREP="$ac_cv_path_EGREP"
5ec1c5e6 5235
5ec1c5e6 5236
5213506e
RW
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5238$as_echo_n "checking for ANSI C header files... " >&6; }
5239if test "${ac_cv_header_stdc+set}" = set; then :
5240 $as_echo_n "(cached) " >&6
bf3b7cd3 5241else
5213506e 5242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5243/* end confdefs.h. */
5213506e
RW
5244#include <stdlib.h>
5245#include <stdarg.h>
5246#include <string.h>
5247#include <float.h>
5248
ba479fd2
NN
5249int
5250main ()
5251{
5213506e 5252
ba479fd2
NN
5253 ;
5254 return 0;
5255}
5256_ACEOF
5213506e
RW
5257if ac_fn_c_try_compile "$LINENO"; then :
5258 ac_cv_header_stdc=yes
75b6f3fd 5259else
5213506e 5260 ac_cv_header_stdc=no
75b6f3fd 5261fi
5213506e 5262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5263
5213506e
RW
5264if test $ac_cv_header_stdc = yes; then
5265 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5267/* end confdefs.h. */
5213506e 5268#include <string.h>
bf3b7cd3 5269
ba479fd2 5270_ACEOF
5213506e
RW
5271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5272 $EGREP "memchr" >/dev/null 2>&1; then :
bf3b7cd3 5273
75e93faa 5274else
5213506e
RW
5275 ac_cv_header_stdc=no
5276fi
5277rm -f conftest*
ba479fd2 5278
75e93faa 5279fi
bf3b7cd3 5280
5213506e
RW
5281if test $ac_cv_header_stdc = yes; then
5282 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5284/* end confdefs.h. */
5213506e 5285#include <stdlib.h>
bf3b7cd3 5286
ba479fd2 5287_ACEOF
5213506e
RW
5288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5289 $EGREP "free" >/dev/null 2>&1; then :
bf3b7cd3 5290
04cabffc 5291else
5213506e 5292 ac_cv_header_stdc=no
04cabffc 5293fi
5213506e 5294rm -f conftest*
04cabffc 5295
414d23ae 5296fi
ba479fd2 5297
5213506e
RW
5298if test $ac_cv_header_stdc = yes; then
5299 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5300 if test "$cross_compiling" = yes; then :
5301 :
b61ff9c8 5302else
5213506e 5303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 5304/* end confdefs.h. */
5213506e 5305#include <ctype.h>
bf3b7cd3 5306#include <stdlib.h>
5213506e
RW
5307#if ((' ' & 0x0FF) == 0x020)
5308# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5309# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5310#else
5311# define ISLOWER(c) \
5312 (('a' <= (c) && (c) <= 'i') \
5313 || ('j' <= (c) && (c) <= 'r') \
5314 || ('s' <= (c) && (c) <= 'z'))
5315# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5316#endif
5317
5318#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bf3b7cd3
JD
5319int
5320main ()
5321{
5213506e
RW
5322 int i;
5323 for (i = 0; i < 256; i++)
5324 if (XOR (islower (i), ISLOWER (i))
5325 || toupper (i) != TOUPPER (i))
5326 return 2;
bf3b7cd3
JD
5327 return 0;
5328}
5329_ACEOF
5213506e 5330if ac_fn_c_try_run "$LINENO"; then :
75e93faa 5331
5213506e
RW
5332else
5333 ac_cv_header_stdc=no
b61ff9c8 5334fi
5213506e
RW
5335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5336 conftest.$ac_objext conftest.beam conftest.$ac_ext
bf3b7cd3 5337fi
5213506e 5338
bf3b7cd3 5339fi
bf3b7cd3 5340fi
5213506e
RW
5341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5342$as_echo "$ac_cv_header_stdc" >&6; }
5343if test $ac_cv_header_stdc = yes; then
5344
5345$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5346
b61ff9c8 5347fi
5213506e
RW
5348
5349# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5350for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5351 inttypes.h stdint.h unistd.h
5352do :
5353 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5354ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5355"
5356eval as_val=\$$as_ac_Header
5357 if test "x$as_val" = x""yes; then :
5358 cat >>confdefs.h <<_ACEOF
5359#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2 5360_ACEOF
414d23ae 5361
5213506e
RW
5362fi
5363
5364done
5365
5366
cafe096b 5367
5213506e
RW
5368 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5369if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5370 MINIX=yes
5371else
5372 MINIX=
414d23ae
HPN
5373fi
5374
5213506e
RW
5375
5376 if test "$MINIX" = yes; then
5377
5378$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5379
5380
5381$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5382
5383
5384$as_echo "#define _MINIX 1" >>confdefs.h
5385
5386 fi
5387
5388
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5390$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5391if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5392 $as_echo_n "(cached) " >&6
b5472e1d 5393else
5213506e 5394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b5472e1d 5395/* end confdefs.h. */
5213506e
RW
5396
5397# define __EXTENSIONS__ 1
5398 $ac_includes_default
3bbd5a19
PB
5399int
5400main ()
5401{
5213506e 5402
3bbd5a19
PB
5403 ;
5404 return 0;
5405}
b5472e1d 5406_ACEOF
5213506e
RW
5407if ac_fn_c_try_compile "$LINENO"; then :
5408 ac_cv_safe_to_define___extensions__=yes
b5472e1d 5409else
5213506e 5410 ac_cv_safe_to_define___extensions__=no
b5472e1d 5411fi
5213506e 5412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 5413fi
5213506e
RW
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5415$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5416 test $ac_cv_safe_to_define___extensions__ = yes &&
5417 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3bbd5a19 5418
5213506e
RW
5419 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5420
5421 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3bbd5a19 5422
5213506e
RW
5423 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5424
5425 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5426
5427
5428ac_ext=c
5429ac_cpp='$CPP $CPPFLAGS'
5430ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5431ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5432ac_compiler_gnu=$ac_cv_c_compiler_gnu
5433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5434$as_echo_n "checking how to run the C preprocessor... " >&6; }
5435# On Suns, sometimes $CPP names a directory.
5436if test -n "$CPP" && test -d "$CPP"; then
5437 CPP=
5438fi
5439if test -z "$CPP"; then
5440 if test "${ac_cv_prog_CPP+set}" = set; then :
5441 $as_echo_n "(cached) " >&6
89a42ac8 5442else
5213506e
RW
5443 # Double quotes because CPP needs to be expanded
5444 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5445 do
5446 ac_preproc_ok=false
5447for ac_c_preproc_warn_flag in '' yes
5448do
5449 # Use a header file that comes with gcc, so configuring glibc
5450 # with a fresh cross-compiler works.
5451 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5452 # <limits.h> exists even on freestanding compilers.
5453 # On the NeXT, cc -E runs the code through the compiler's parser,
5454 # not just through cpp. "Syntax error" is here to catch this case.
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
89a42ac8 5456/* end confdefs.h. */
5213506e
RW
5457#ifdef __STDC__
5458# include <limits.h>
5459#else
5460# include <assert.h>
5461#endif
5462 Syntax error
89a42ac8 5463_ACEOF
5213506e
RW
5464if ac_fn_c_try_cpp "$LINENO"; then :
5465
89a42ac8 5466else
5213506e
RW
5467 # Broken: fails on valid input.
5468continue
5469fi
5470rm -f conftest.err conftest.$ac_ext
89a42ac8 5471
5213506e
RW
5472 # OK, works on sane cases. Now check whether nonexistent headers
5473 # can be detected and how.
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h. */
5476#include <ac_nonexistent.h>
5477_ACEOF
5478if ac_fn_c_try_cpp "$LINENO"; then :
5479 # Broken: success on invalid input.
5480continue
5481else
5482 # Passes both tests.
5483ac_preproc_ok=:
5484break
89a42ac8 5485fi
5213506e
RW
5486rm -f conftest.err conftest.$ac_ext
5487
5488done
5489# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5490rm -f conftest.err conftest.$ac_ext
5491if $ac_preproc_ok; then :
5492 break
34a86c2b
NN
5493fi
5494
5213506e
RW
5495 done
5496 ac_cv_prog_CPP=$CPP
5497
5498fi
5499 CPP=$ac_cv_prog_CPP
643d3bd2 5500else
5213506e
RW
5501 ac_cv_prog_CPP=$CPP
5502fi
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5504$as_echo "$CPP" >&6; }
5505ac_preproc_ok=false
5506for ac_c_preproc_warn_flag in '' yes
5507do
5508 # Use a header file that comes with gcc, so configuring glibc
5509 # with a fresh cross-compiler works.
5510 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5511 # <limits.h> exists even on freestanding compilers.
5512 # On the NeXT, cc -E runs the code through the compiler's parser,
5513 # not just through cpp. "Syntax error" is here to catch this case.
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
643d3bd2 5515/* end confdefs.h. */
5213506e
RW
5516#ifdef __STDC__
5517# include <limits.h>
5518#else
5519# include <assert.h>
5520#endif
5521 Syntax error
00020c16 5522_ACEOF
5213506e 5523if ac_fn_c_try_cpp "$LINENO"; then :
3bbd5a19 5524
643d3bd2 5525else
5213506e
RW
5526 # Broken: fails on valid input.
5527continue
5528fi
5529rm -f conftest.err conftest.$ac_ext
643d3bd2 5530
5213506e
RW
5531 # OK, works on sane cases. Now check whether nonexistent headers
5532 # can be detected and how.
5533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5534/* end confdefs.h. */
5535#include <ac_nonexistent.h>
5536_ACEOF
5537if ac_fn_c_try_cpp "$LINENO"; then :
5538 # Broken: success on invalid input.
5539continue
5540else
5541 # Passes both tests.
5542ac_preproc_ok=:
5543break
643d3bd2 5544fi
5213506e
RW
5545rm -f conftest.err conftest.$ac_ext
5546
5547done
5548# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5549rm -f conftest.err conftest.$ac_ext
5550if $ac_preproc_ok; then :
5551
09a9c095 5552else
5213506e
RW
5553 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5554$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5555as_fn_error "C preprocessor \"$CPP\" fails sanity check
5556See \`config.log' for more details." "$LINENO" 5; }
5557fi
373477bb 5558
5213506e
RW
5559ac_ext=c
5560ac_cpp='$CPP $CPPFLAGS'
5561ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5562ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5563ac_compiler_gnu=$ac_cv_c_compiler_gnu
5564
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5566$as_echo_n "checking for inline... " >&6; }
5567if test "${ac_cv_c_inline+set}" = set; then :
5568 $as_echo_n "(cached) " >&6
5569else
5570 ac_cv_c_inline=no
5571for ac_kw in inline __inline__ __inline; do
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 5573/* end confdefs.h. */
5213506e
RW
5574#ifndef __cplusplus
5575typedef int foo_t;
5576static $ac_kw foo_t static_foo () {return 0; }
5577$ac_kw foo_t foo () {return 0; }
5578#endif
373477bb 5579
00020c16 5580_ACEOF
5213506e
RW
5581if ac_fn_c_try_compile "$LINENO"; then :
5582 ac_cv_c_inline=$ac_kw
5583fi
5584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5585 test "$ac_cv_c_inline" != no && break
5586done
5587
5588fi
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5590$as_echo "$ac_cv_c_inline" >&6; }
5591
5592case $ac_cv_c_inline in
5593 inline | yes) ;;
5594 *)
5595 case $ac_cv_c_inline in
5596 no) ac_val=;;
5597 *) ac_val=$ac_cv_c_inline;;
5598 esac
5599 cat >>confdefs.h <<_ACEOF
5600#ifndef __cplusplus
5601#define inline $ac_val
5602#endif
00020c16 5603_ACEOF
5213506e
RW
5604 ;;
5605esac
5606
5607
5608# sizeof(char) is 1 by definition.
5609# The cast to long int works around a bug in the HP C Compiler
5610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5612# This bug is HP SR number 8606223364.
5613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
5614$as_echo_n "checking size of void *... " >&6; }
5615if test "${ac_cv_sizeof_void_p+set}" = set; then :
5616 $as_echo_n "(cached) " >&6
5617else
5618 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
5619
5620else
5621 if test "$ac_cv_type_void_p" = yes; then
5622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5624{ as_fn_set_status 77
5625as_fn_error "cannot compute sizeof (void *)
5626See \`config.log' for more details." "$LINENO" 5; }; }
5627 else
5628 ac_cv_sizeof_void_p=0
5629 fi
5630fi
5631
5632fi
5633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
5634$as_echo "$ac_cv_sizeof_void_p" >&6; }
414d23ae 5635
5213506e
RW
5636
5637
5638cat >>confdefs.h <<_ACEOF
5639#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
00020c16 5640_ACEOF
5213506e
RW
5641
5642
5643# The cast to long int works around a bug in the HP C Compiler
5644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5646# This bug is HP SR number 8606223364.
5647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
5648$as_echo_n "checking size of short... " >&6; }
5649if test "${ac_cv_sizeof_short+set}" = set; then :
5650 $as_echo_n "(cached) " >&6
00020c16 5651else
5213506e
RW
5652 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
5653
5654else
5655 if test "$ac_cv_type_short" = yes; then
5656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5658{ as_fn_set_status 77
5659as_fn_error "cannot compute sizeof (short)
5660See \`config.log' for more details." "$LINENO" 5; }; }
5661 else
5662 ac_cv_sizeof_short=0
5663 fi
5664fi
414d23ae 5665
a1286ef5 5666fi
5213506e
RW
5667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
5668$as_echo "$ac_cv_sizeof_short" >&6; }
5669
5670
5671
5672cat >>confdefs.h <<_ACEOF
5673#define SIZEOF_SHORT $ac_cv_sizeof_short
5674_ACEOF
5675
5676
5677# The cast to long int works around a bug in the HP C Compiler
5678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5680# This bug is HP SR number 8606223364.
5681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
5682$as_echo_n "checking size of int... " >&6; }
5683if test "${ac_cv_sizeof_int+set}" = set; then :
5684 $as_echo_n "(cached) " >&6
e1bbfc5c 5685else
5213506e 5686 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
e1bbfc5c 5687
5213506e
RW
5688else
5689 if test "$ac_cv_type_int" = yes; then
5690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5692{ as_fn_set_status 77
5693as_fn_error "cannot compute sizeof (int)
5694See \`config.log' for more details." "$LINENO" 5; }; }
5695 else
5696 ac_cv_sizeof_int=0
5697 fi
e1bbfc5c 5698fi
5213506e 5699
ba479fd2 5700fi
5213506e
RW
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
5702$as_echo "$ac_cv_sizeof_int" >&6; }
00020c16 5703
5213506e
RW
5704
5705
5706cat >>confdefs.h <<_ACEOF
5707#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 5708_ACEOF
5213506e
RW
5709
5710
5711# The cast to long int works around a bug in the HP C Compiler
5712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5714# This bug is HP SR number 8606223364.
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5716$as_echo_n "checking size of long... " >&6; }
5717if test "${ac_cv_sizeof_long+set}" = set; then :
5718 $as_echo_n "(cached) " >&6
ba479fd2 5719else
5213506e 5720 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
ba479fd2 5721
00020c16 5722else
5213506e
RW
5723 if test "$ac_cv_type_long" = yes; then
5724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5726{ as_fn_set_status 77
5727as_fn_error "cannot compute sizeof (long)
5728See \`config.log' for more details." "$LINENO" 5; }; }
5729 else
5730 ac_cv_sizeof_long=0
5731 fi
5732fi
5733
5734fi
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5736$as_echo "$ac_cv_sizeof_long" >&6; }
5737
5738
5739
5740cat >>confdefs.h <<_ACEOF
5741#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 5742_ACEOF
00020c16 5743
00020c16 5744
5213506e
RW
5745ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
5746if test "x$ac_cv_type_long_long" = x""yes; then :
5747
5748cat >>confdefs.h <<_ACEOF
5749#define HAVE_LONG_LONG 1
ba479fd2 5750_ACEOF
5213506e
RW
5751
5752# The cast to long int works around a bug in the HP C Compiler
5753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5755# This bug is HP SR number 8606223364.
5756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
5757$as_echo_n "checking size of long long... " >&6; }
5758if test "${ac_cv_sizeof_long_long+set}" = set; then :
5759 $as_echo_n "(cached) " >&6
b61ff9c8 5760else
5213506e 5761 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
ba479fd2 5762
5213506e
RW
5763else
5764 if test "$ac_cv_type_long_long" = yes; then
5765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5767{ as_fn_set_status 77
5768as_fn_error "cannot compute sizeof (long long)
5769See \`config.log' for more details." "$LINENO" 5; }; }
5770 else
5771 ac_cv_sizeof_long_long=0
5772 fi
ba479fd2 5773fi
5213506e 5774
6938ec6c 5775fi
5213506e
RW
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
5777$as_echo "$ac_cv_sizeof_long_long" >&6; }
5778
5779
5780
5781cat >>confdefs.h <<_ACEOF
5782#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5783_ACEOF
5784
5785
6e3f3080 5786fi
5213506e
RW
5787
5788ac_fn_c_check_type "$LINENO" "__int64" "ac_cv_type___int64" "$ac_includes_default"
5789if test "x$ac_cv_type___int64" = x""yes; then :
5790
5791cat >>confdefs.h <<_ACEOF
5792#define HAVE___INT64 1
5793_ACEOF
5794
5795# The cast to long int works around a bug in the HP C Compiler
5796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5798# This bug is HP SR number 8606223364.
5799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5
5800$as_echo_n "checking size of __int64... " >&6; }
5801if test "${ac_cv_sizeof___int64+set}" = set; then :
5802 $as_echo_n "(cached) " >&6
5803else
5804 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then :
5805
6938ec6c 5806else
5213506e
RW
5807 if test "$ac_cv_type___int64" = yes; then
5808 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5810{ as_fn_set_status 77
5811as_fn_error "cannot compute sizeof (__int64)
5812See \`config.log' for more details." "$LINENO" 5; }; }
5813 else
5814 ac_cv_sizeof___int64=0
5815 fi
6938ec6c 5816fi
5213506e 5817
00020c16 5818fi
5213506e
RW
5819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5
5820$as_echo "$ac_cv_sizeof___int64" >&6; }
5821
5822
5823
00020c16
ILT
5824cat >>confdefs.h <<_ACEOF
5825#define SIZEOF___INT64 $ac_cv_sizeof___int64
5826_ACEOF
6938ec6c
NN
5827
5828
00020c16 5829fi
ba479fd2 5830
fa802374
KT
5831ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
5832case $ac_cv_c_int8_t in #(
5833 no|yes) ;; #(
5834 *)
5835
5836cat >>confdefs.h <<_ACEOF
5837#define int8_t $ac_cv_c_int8_t
5838_ACEOF
5839;;
5840esac
5841
5842ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
5843case $ac_cv_c_int16_t in #(
5844 no|yes) ;; #(
5845 *)
5846
5847cat >>confdefs.h <<_ACEOF
5848#define int16_t $ac_cv_c_int16_t
5849_ACEOF
5850;;
5851esac
5852
5853ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
5854case $ac_cv_c_int32_t in #(
5855 no|yes) ;; #(
5856 *)
5857
5858cat >>confdefs.h <<_ACEOF
5859#define int32_t $ac_cv_c_int32_t
5860_ACEOF
5861;;
5862esac
5863
5864ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
5865case $ac_cv_c_int64_t in #(
5866 no|yes) ;; #(
5867 *)
5868
5869cat >>confdefs.h <<_ACEOF
5870#define int64_t $ac_cv_c_int64_t
5871_ACEOF
5872;;
5873esac
5874
5875
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5877$as_echo_n "checking for long long int... " >&6; }
5878if test "${ac_cv_type_long_long_int+set}" = set; then :
5879 $as_echo_n "(cached) " >&6
5880else
5881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5882/* end confdefs.h. */
5883
5884 /* For now, do not test the preprocessor; as of 2007 there are too many
5885 implementations with broken preprocessors. Perhaps this can
5886 be revisited in 2012. In the meantime, code should not expect
5887 #if to work with literals wider than 32 bits. */
5888 /* Test literals. */
5889 long long int ll = 9223372036854775807ll;
5890 long long int nll = -9223372036854775807LL;
5891 unsigned long long int ull = 18446744073709551615ULL;
5892 /* Test constant expressions. */
5893 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5894 ? 1 : -1)];
5895 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5896 ? 1 : -1)];
5897 int i = 63;
5898int
5899main ()
5900{
5901/* Test availability of runtime routines for shift and division. */
5902 long long int llmax = 9223372036854775807ll;
5903 unsigned long long int ullmax = 18446744073709551615ull;
5904 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5905 | (llmax / ll) | (llmax % ll)
5906 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5907 | (ullmax / ull) | (ullmax % ull));
5908 ;
5909 return 0;
5910}
5911
5912_ACEOF
5913if ac_fn_c_try_link "$LINENO"; then :
5914 if test "$cross_compiling" = yes; then :
5915 ac_cv_type_long_long_int=yes
5916else
5917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5918/* end confdefs.h. */
5919#include <limits.h>
5920 #ifndef LLONG_MAX
5921 # define HALF \
5922 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5923 # define LLONG_MAX (HALF - 1 + HALF)
5924 #endif
5925int
5926main ()
5927{
5928long long int n = 1;
5929 int i;
5930 for (i = 0; ; i++)
5931 {
5932 long long int m = n << i;
5933 if (m >> i != n)
5934 return 1;
5935 if (LLONG_MAX / 2 < m)
5936 break;
5937 }
5938 return 0;
5939 ;
5940 return 0;
5941}
5942_ACEOF
5943if ac_fn_c_try_run "$LINENO"; then :
5944 ac_cv_type_long_long_int=yes
5945else
5946 ac_cv_type_long_long_int=no
5947fi
5948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5949 conftest.$ac_objext conftest.beam conftest.$ac_ext
5950fi
5951
5952else
5953 ac_cv_type_long_long_int=no
5954fi
5955rm -f core conftest.err conftest.$ac_objext \
5956 conftest$ac_exeext conftest.$ac_ext
5957fi
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5959$as_echo "$ac_cv_type_long_long_int" >&6; }
5960 if test $ac_cv_type_long_long_int = yes; then
5961
5962$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
5963
5964 fi
5965
5966
5967
5968 ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
5969if test "x$ac_cv_type_intmax_t" = x""yes; then :
5970
5971$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
5972
5973else
5974 test $ac_cv_type_long_long_int = yes \
5975 && ac_type='long long int' \
5976 || ac_type='long int'
5977
5978cat >>confdefs.h <<_ACEOF
5979#define intmax_t $ac_type
5980_ACEOF
5981
5982fi
5983
5984
5985
5986 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
5987if test "x$ac_cv_type_intptr_t" = x""yes; then :
5988
5989$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
5990
5991else
5992 for ac_type in 'int' 'long int' 'long long int'; do
5993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5994/* end confdefs.h. */
5995$ac_includes_default
5996int
5997main ()
5998{
5999static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6000test_array [0] = 0
6001
6002 ;
6003 return 0;
6004}
6005_ACEOF
6006if ac_fn_c_try_compile "$LINENO"; then :
6007
6008cat >>confdefs.h <<_ACEOF
6009#define intptr_t $ac_type
6010_ACEOF
6011
6012 ac_type=
6013fi
6014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6015 test -z "$ac_type" && break
6016 done
6017fi
6018
6019
6020ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
6021case $ac_cv_c_uint8_t in #(
6022 no|yes) ;; #(
6023 *)
6024
6025$as_echo "#define _UINT8_T 1" >>confdefs.h
6026
6027
6028cat >>confdefs.h <<_ACEOF
6029#define uint8_t $ac_cv_c_uint8_t
6030_ACEOF
6031;;
6032 esac
6033
6034ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
6035case $ac_cv_c_uint16_t in #(
6036 no|yes) ;; #(
6037 *)
6038
6039
6040cat >>confdefs.h <<_ACEOF
6041#define uint16_t $ac_cv_c_uint16_t
6042_ACEOF
6043;;
6044 esac
6045
6046ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6047case $ac_cv_c_uint32_t in #(
6048 no|yes) ;; #(
6049 *)
6050
6051$as_echo "#define _UINT32_T 1" >>confdefs.h
6052
6053
6054cat >>confdefs.h <<_ACEOF
6055#define uint32_t $ac_cv_c_uint32_t
6056_ACEOF
6057;;
6058 esac
6059
6060ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6061case $ac_cv_c_uint64_t in #(
6062 no|yes) ;; #(
6063 *)
6064
6065$as_echo "#define _UINT64_T 1" >>confdefs.h
6066
6067
6068cat >>confdefs.h <<_ACEOF
6069#define uint64_t $ac_cv_c_uint64_t
6070_ACEOF
6071;;
6072 esac
6073
6074
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6076$as_echo_n "checking for unsigned long long int... " >&6; }
6077if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
6078 $as_echo_n "(cached) " >&6
6079else
6080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6081/* end confdefs.h. */
6082
6083 /* For now, do not test the preprocessor; as of 2007 there are too many
6084 implementations with broken preprocessors. Perhaps this can
6085 be revisited in 2012. In the meantime, code should not expect
6086 #if to work with literals wider than 32 bits. */
6087 /* Test literals. */
6088 long long int ll = 9223372036854775807ll;
6089 long long int nll = -9223372036854775807LL;
6090 unsigned long long int ull = 18446744073709551615ULL;
6091 /* Test constant expressions. */
6092 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6093 ? 1 : -1)];
6094 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6095 ? 1 : -1)];
6096 int i = 63;
6097int
6098main ()
6099{
6100/* Test availability of runtime routines for shift and division. */
6101 long long int llmax = 9223372036854775807ll;
6102 unsigned long long int ullmax = 18446744073709551615ull;
6103 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6104 | (llmax / ll) | (llmax % ll)
6105 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6106 | (ullmax / ull) | (ullmax % ull));
6107 ;
6108 return 0;
6109}
6110
6111_ACEOF
6112if ac_fn_c_try_link "$LINENO"; then :
6113 ac_cv_type_unsigned_long_long_int=yes
6114else
6115 ac_cv_type_unsigned_long_long_int=no
6116fi
6117rm -f core conftest.err conftest.$ac_objext \
6118 conftest$ac_exeext conftest.$ac_ext
6119fi
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6121$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6122 if test $ac_cv_type_unsigned_long_long_int = yes; then
6123
6124$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6125
6126 fi
6127
6128
6129
6130 ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
6131if test "x$ac_cv_type_uintmax_t" = x""yes; then :
6132
6133$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
6134
6135else
6136 test $ac_cv_type_unsigned_long_long_int = yes \
6137 && ac_type='unsigned long long int' \
6138 || ac_type='unsigned long int'
6139
6140cat >>confdefs.h <<_ACEOF
6141#define uintmax_t $ac_type
6142_ACEOF
6143
6144fi
6145
6146
6147
6148 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
6149if test "x$ac_cv_type_uintptr_t" = x""yes; then :
6150
6151$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
6152
6153else
6154 for ac_type in 'unsigned int' 'unsigned long int' \
6155 'unsigned long long int'; do
6156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6157/* end confdefs.h. */
6158$ac_includes_default
6159int
6160main ()
6161{
6162static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6163test_array [0] = 0
6164
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169if ac_fn_c_try_compile "$LINENO"; then :
6170
6171cat >>confdefs.h <<_ACEOF
6172#define uintptr_t $ac_type
6173_ACEOF
6174
6175 ac_type=
6176fi
6177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6178 test -z "$ac_type" && break
6179 done
6180fi
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
00020c16
ILT
6195
6196# ---------------------
6197# Warnings and checking
6198# ---------------------
6199
6200# Check $CC warning features (if it's GCC).
6201# We want to use -pedantic, but we don't want warnings about
6202# * 'long long'
6203# * variadic macros
6204# * overlong strings
6205# So, we only use -pedantic if we can disable those warnings.
6206
6207loose_warn=
6208save_CFLAGS="$CFLAGS"
6209for option in -W -Wall -Wwrite-strings -Wcast-qual; do
5213506e 6210 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6211
5213506e
RW
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6213$as_echo_n "checking whether $CC supports $option... " >&6; }
6214if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6215 $as_echo_n "(cached) " >&6
00020c16
ILT
6216else
6217 CFLAGS="$option"
5213506e 6218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6219/* end confdefs.h. */
00020c16
ILT
6220
6221int
6222main ()
6223{
6224
6225 ;
6226 return 0;
6227}
ba479fd2 6228_ACEOF
5213506e 6229if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6230 eval "$as_acx_Woption=yes"
a207b594 6231else
5213506e 6232 eval "$as_acx_Woption=no"
a207b594 6233fi
5213506e 6234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6235
6236fi
5213506e
RW
6237eval ac_res=\$$as_acx_Woption
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6239$as_echo "$ac_res" >&6; }
6240 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6241 loose_warn="$loose_warn${loose_warn:+ }$option"
6242fi
00020c16
ILT
6243 done
6244CFLAGS="$save_CFLAGS"
6245
6246c_loose_warn=
6247save_CFLAGS="$CFLAGS"
6248for option in -Wstrict-prototypes -Wmissing-prototypes; do
5213506e 6249 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6250
5213506e
RW
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6252$as_echo_n "checking whether $CC supports $option... " >&6; }
6253if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6254 $as_echo_n "(cached) " >&6
00020c16
ILT
6255else
6256 CFLAGS="$option"
5213506e 6257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6258/* end confdefs.h. */
00020c16
ILT
6259
6260int
6261main ()
6262{
6263
6264 ;
6265 return 0;
6266}
ba479fd2 6267_ACEOF
5213506e 6268if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6269 eval "$as_acx_Woption=yes"
14011ca4 6270else
5213506e 6271 eval "$as_acx_Woption=no"
cafe096b 6272fi
5213506e 6273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 6274
56694dd9 6275fi
5213506e
RW
6276eval ac_res=\$$as_acx_Woption
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6278$as_echo "$ac_res" >&6; }
6279 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16 6280 c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option"
56694dd9 6281fi
00020c16
ILT
6282 done
6283CFLAGS="$save_CFLAGS"
6284
6285strict_warn=
6286save_CFLAGS="$CFLAGS"
6287for option in -Wmissing-format-attribute; do
5213506e 6288 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6289
5213506e
RW
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6291$as_echo_n "checking whether $CC supports $option... " >&6; }
6292if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6293 $as_echo_n "(cached) " >&6
414d23ae 6294else
00020c16 6295 CFLAGS="$option"
5213506e 6296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6297/* end confdefs.h. */
6298
6299int
6300main ()
6301{
6302
6303 ;
6304 return 0;
6305}
6306_ACEOF
5213506e 6307if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6308 eval "$as_acx_Woption=yes"
414d23ae 6309else
5213506e 6310 eval "$as_acx_Woption=no"
414d23ae 6311fi
5213506e 6312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6313
00020c16 6314fi
5213506e
RW
6315eval ac_res=\$$as_acx_Woption
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6317$as_echo "$ac_res" >&6; }
6318 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6319 strict_warn="$strict_warn${strict_warn:+ }$option"
6320fi
00020c16
ILT
6321 done
6322CFLAGS="$save_CFLAGS"
75e93faa 6323
00020c16
ILT
6324c_strict_warn=
6325save_CFLAGS="$CFLAGS"
6326for option in -Wold-style-definition -Wc++-compat; do
5213506e 6327 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
ba479fd2 6328
5213506e
RW
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6330$as_echo_n "checking whether $CC supports $option... " >&6; }
6331if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6332 $as_echo_n "(cached) " >&6
00020c16
ILT
6333else
6334 CFLAGS="$option"
5213506e 6335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6336/* end confdefs.h. */
a207b594 6337
00020c16
ILT
6338int
6339main ()
6340{
ba479fd2 6341
00020c16
ILT
6342 ;
6343 return 0;
6344}
ba479fd2 6345_ACEOF
5213506e 6346if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
6347 eval "$as_acx_Woption=yes"
6348else
5213506e 6349 eval "$as_acx_Woption=no"
414d23ae 6350fi
5213506e 6351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa 6352
00020c16 6353fi
5213506e
RW
6354eval ac_res=\$$as_acx_Woption
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6356$as_echo "$ac_res" >&6; }
6357 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6358 c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option"
6359fi
00020c16
ILT
6360 done
6361CFLAGS="$save_CFLAGS"
75e93faa 6362
5213506e
RW
6363if test "$GCC" = yes; then :
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
6365$as_echo_n "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... " >&6; }
6366if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then :
6367 $as_echo_n "(cached) " >&6
75e93faa 6368else
00020c16
ILT
6369 save_CFLAGS="$CFLAGS"
6370CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
5213506e 6371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6372/* end confdefs.h. */
2f41c1d6 6373
00020c16
ILT
6374int
6375main ()
6376{
b61ff9c8 6377
00020c16
ILT
6378 ;
6379 return 0;
6380}
6381_ACEOF
5213506e 6382if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6383 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes
439a7e54 6384else
5213506e 6385 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no
00020c16 6386fi
5213506e 6387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6388CFLAGS="$save_CFLAGS"
6389fi
5213506e
RW
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5
6391$as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6; }
6392if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then :
00020c16
ILT
6393 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
6394fi
ba479fd2 6395
439a7e54
DN
6396fi
6397
5213506e
RW
6398# Check whether --enable-werror-always was given.
6399if test "${enable_werror_always+set}" = set; then :
6400 enableval=$enable_werror_always;
34a86c2b 6401else
00020c16 6402 enable_werror_always=no
00020c16 6403fi
cafe096b 6404
5213506e
RW
6405if test $enable_werror_always = yes; then :
6406 strict_warn="$strict_warn${strict_warn:+ }-Werror"
6407fi
b61ff9c8 6408
75e93faa 6409
34a86c2b 6410
00020c16
ILT
6411# The above macros do nothing if the compiler is not GCC. However, the
6412# Makefile has more goo to add other flags, so these variables are used
6413# to enable warnings only for GCC.
6414warn_cflags=
6415warn_cxxflags=
6416if test "x$GCC" = "xyes"; then
6417 warn_cflags='$(GCC_WARN_CFLAGS)'
6418 warn_cxxflags='$(GCC_WARN_CXXFLAGS)'
6419fi
75e93faa
ZW
6420
6421
b61ff9c8 6422
00020c16
ILT
6423# Enable expensive internal checks
6424is_release=
6425if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6426 is_release=yes
6427fi
79b87c74 6428
5213506e
RW
6429# Check whether --enable-checking was given.
6430if test "${enable_checking+set}" = set; then :
6431 enableval=$enable_checking; ac_checking_flags="${enableval}"
79b87c74
MM
6432else
6433
00020c16
ILT
6434# Determine the default checks.
6435if test x$is_release = x ; then
6436 ac_checking_flags=yes
6437else
6438 ac_checking_flags=release
6439fi
5213506e
RW
6440fi
6441
00020c16
ILT
6442IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6443for check in release $ac_checking_flags
6444do
6445 case $check in
6446 # these set all the flags to specific states
6447 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
6448 ac_fold_checking= ; ac_gc_checking=1 ;
6449 ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
6450 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6451 ac_tree_checking=1 ; ac_valgrind_checking= ;
6452 ac_types_checking=1 ;;
6453 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
6454 ac_fold_checking= ; ac_gc_checking= ;
6455 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6456 ac_rtlflag_checking= ; ac_runtime_checking= ;
6457 ac_tree_checking= ; ac_valgrind_checking= ;
6458 ac_types_checking= ;;
6459 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
6460 ac_fold_checking=1 ; ac_gc_checking=1 ;
6461 ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
6462 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6463 ac_tree_checking=1 ; ac_valgrind_checking= ;
6464 ac_types_checking=1 ;;
6465 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
6466 ac_fold_checking= ; ac_gc_checking= ;
6467 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6468 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6469 ac_tree_checking= ; ac_valgrind_checking= ;
6470 ac_types_checking= ;;
6471 # these enable particular checks
6472 assert) ac_assert_checking=1 ;;
6473 df) ac_df_checking=1 ;;
6474 fold) ac_fold_checking=1 ;;
6475 gc) ac_gc_checking=1 ;;
6476 gcac) ac_gc_always_collect=1 ;;
6477 gimple) ac_gimple_checking=1 ;;
6478 misc) ac_checking=1 ;;
6479 rtl) ac_rtl_checking=1 ;;
6480 rtlflag) ac_rtlflag_checking=1 ;;
6481 runtime) ac_runtime_checking=1 ;;
6482 tree) ac_tree_checking=1 ;;
6483 types) ac_types_checking=1 ;;
6484 valgrind) ac_valgrind_checking=1 ;;
5213506e 6485 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
00020c16
ILT
6486 esac
6487done
6488IFS="$ac_save_IFS"
486aa804 6489
00020c16
ILT
6490nocommon_flag=""
6491if test x$ac_checking != x ; then
79b87c74 6492
5213506e 6493$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
79b87c74 6494
00020c16
ILT
6495 nocommon_flag=-fno-common
6496fi
79b87c74 6497
00020c16 6498if test x$ac_df_checking != x ; then
486aa804 6499
5213506e 6500$as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h
486aa804 6501
00020c16
ILT
6502fi
6503if test x$ac_assert_checking != x ; then
486aa804 6504
5213506e 6505$as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h
486aa804 6506
00020c16
ILT
6507fi
6508if test x$ac_gimple_checking != x ; then
486aa804 6509
5213506e 6510$as_echo "#define ENABLE_GIMPLE_CHECKING 1" >>confdefs.h
b61ff9c8 6511
00020c16 6512fi
ab22c1fa 6513
00020c16 6514if test x$ac_runtime_checking != x ; then
ab22c1fa 6515
5213506e 6516$as_echo "#define ENABLE_RUNTIME_CHECKING 1" >>confdefs.h
ab22c1fa 6517
00020c16
ILT
6518fi
6519if test x$ac_tree_checking != x ; then
ab22c1fa 6520
5213506e 6521$as_echo "#define ENABLE_TREE_CHECKING 1" >>confdefs.h
ab22c1fa 6522
00020c16
ILT
6523 TREEBROWSER=tree-browser.o
6524fi
6525if test x$ac_types_checking != x ; then
ab22c1fa 6526
5213506e 6527$as_echo "#define ENABLE_TYPES_CHECKING 1" >>confdefs.h
ab22c1fa 6528
00020c16 6529fi
ab22c1fa 6530
00020c16 6531if test x$ac_rtl_checking != x ; then
2f41c1d6 6532
5213506e
RW
6533$as_echo "#define ENABLE_RTL_CHECKING 1" >>confdefs.h
6534
00020c16 6535fi
5213506e
RW
6536if test x$ac_rtlflag_checking != x ; then
6537
6538$as_echo "#define ENABLE_RTL_FLAG_CHECKING 1" >>confdefs.h
4977bab6 6539
00020c16 6540fi
5213506e
RW
6541if test x$ac_gc_checking != x ; then
6542
6543$as_echo "#define ENABLE_GC_CHECKING 1" >>confdefs.h
6544
6545fi
6546if test x$ac_gc_always_collect != x ; then
6547
6548$as_echo "#define ENABLE_GC_ALWAYS_COLLECT 1" >>confdefs.h
4977bab6 6549
00020c16 6550fi
5213506e
RW
6551if test x$ac_fold_checking != x ; then
6552
6553$as_echo "#define ENABLE_FOLD_CHECKING 1" >>confdefs.h
2f41c1d6 6554
00020c16 6555fi
5213506e
RW
6556valgrind_path_defines=
6557valgrind_command=
6558
6559ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
6560if test "x$ac_cv_header_valgrind_h" = x""yes; then :
00020c16 6561 have_valgrind_h=yes
2f41c1d6 6562else
00020c16
ILT
6563 have_valgrind_h=no
6564fi
2f41c1d6 6565
1a4b763e 6566
2f41c1d6 6567
00020c16
ILT
6568if test x$ac_valgrind_checking != x ; then
6569 # It is certainly possible that there's valgrind but no valgrind.h.
6570 # GCC relies on making annotations so we must have both.
5213506e
RW
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6572$as_echo_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... " >&6; }
6573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6574/* end confdefs.h. */
6575#include <valgrind/memcheck.h>
6576#ifndef VALGRIND_DISCARD
6577#error VALGRIND_DISCARD not defined
6578#endif
6579_ACEOF
5213506e 6580if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6581 gcc_cv_header_valgrind_memcheck_h=yes
aca600aa 6582else
00020c16
ILT
6583 gcc_cv_header_valgrind_memcheck_h=no
6584fi
6585rm -f conftest.err conftest.$ac_ext
5213506e
RW
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6587$as_echo "$gcc_cv_header_valgrind_memcheck_h" >&6; }
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6589$as_echo_n "checking for VALGRIND_DISCARD in <memcheck.h>... " >&6; }
6590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6591/* end confdefs.h. */
6592#include <memcheck.h>
6593#ifndef VALGRIND_DISCARD
6594#error VALGRIND_DISCARD not defined
6595#endif
6596_ACEOF
5213506e 6597if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6598 gcc_cv_header_memcheck_h=yes
e9a25f70 6599else
00020c16
ILT
6600 gcc_cv_header_memcheck_h=no
6601fi
6602rm -f conftest.err conftest.$ac_ext
5213506e
RW
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_memcheck_h" >&5
6604$as_echo "$gcc_cv_header_memcheck_h" >&6; }
00020c16
ILT
6605
6606# Prepare PATH_SEPARATOR.
6607# The user is always right.
6608if test "${PATH_SEPARATOR+set}" != set; then
6609 echo "#! /bin/sh" >conf$$.sh
6610 echo "exit 0" >>conf$$.sh
6611 chmod +x conf$$.sh
6612 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6613 PATH_SEPARATOR=';'
6614 else
6615 PATH_SEPARATOR=:
6616 fi
6617 rm -f conf$$.sh
e9a25f70
JL
6618fi
6619
00020c16
ILT
6620# Find out how to test for executable files. Don't use a zero-byte file,
6621# as systems may use methods other than mode bits to determine executability.
6622cat >conf$$.file <<_ASEOF
6623#! /bin/sh
6624exit 0
6625_ASEOF
6626chmod +x conf$$.file
6627if test -x conf$$.file >/dev/null 2>&1; then
6628 ac_executable_p="test -x"
6629else
6630 ac_executable_p="test -f"
6631fi
6632rm -f conf$$.file
e9a25f70 6633
00020c16
ILT
6634# Extract the first word of "valgrind", so it can be a program name with args.
6635set dummy valgrind; ac_word=$2
5213506e
RW
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6637$as_echo_n "checking for $ac_word... " >&6; }
6638if test "${ac_cv_path_valgrind_path+set}" = set; then :
6639 $as_echo_n "(cached) " >&6
861bb6c1 6640else
00020c16
ILT
6641 case "$valgrind_path" in
6642 [\\/]* | ?:[\\/]*)
6643 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6644 ;;
6645 *)
6646 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6647 for ac_dir in $PATH; do
6648 IFS="$ac_save_IFS"
6649 test -z "$ac_dir" && ac_dir=.
6650 for ac_exec_ext in '' $ac_executable_extensions; do
6651 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6652 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6653 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6654 break 2
6655 fi
6656 fi
6657 done
6658 done
6659 IFS="$ac_save_IFS"
6660 ;;
6661esac
861bb6c1 6662fi
00020c16
ILT
6663valgrind_path="$ac_cv_path_valgrind_path"
6664if test -n "$valgrind_path"; then
5213506e
RW
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $valgrind_path" >&5
6666$as_echo "$valgrind_path" >&6; }
861bb6c1 6667else
5213506e
RW
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669$as_echo "no" >&6; }
861bb6c1
JL
6670fi
6671
00020c16
ILT
6672 if test "x$valgrind_path" = "x" \
6673 || (test $have_valgrind_h = no \
6674 && test $gcc_cv_header_memcheck_h = no \
6675 && test $gcc_cv_header_valgrind_memcheck_h = no); then
5213506e 6676 as_fn_error "*** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5
00020c16
ILT
6677 fi
6678 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6679 valgrind_command="$valgrind_path -q"
861bb6c1 6680
5213506e 6681$as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h
00020c16
ILT
6682
6683 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
6684
5213506e 6685$as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h
2c4902b9 6686
0a4b6309 6687 fi
00020c16
ILT
6688 if test $gcc_cv_header_memcheck_h = yes; then
6689
5213506e 6690$as_echo "#define HAVE_MEMCHECK_H 1" >>confdefs.h
0a4b6309 6691
0a4b6309
RL
6692 fi
6693fi
6694
18fc9bd4 6695
18fc9bd4 6696
00020c16 6697# Enable code coverage collection
5213506e
RW
6698# Check whether --enable-coverage was given.
6699if test "${enable_coverage+set}" = set; then :
6700 enableval=$enable_coverage; case "${enableval}" in
00020c16
ILT
6701 yes|noopt)
6702 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6703 ;;
6704 opt)
6705 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6706 ;;
6707 no)
6708 # a.k.a. --disable-coverage
6709 coverage_flags=""
6710 ;;
6711 *)
5213506e 6712 as_fn_error "unknown coverage setting $enableval" "$LINENO" 5
00020c16
ILT
6713 ;;
6714esac
861bb6c1 6715else
00020c16 6716 coverage_flags=""
5213506e 6717fi
00020c16
ILT
6718
6719
ba479fd2 6720
5213506e
RW
6721# Check whether --enable-gather-detailed-mem-stats was given.
6722if test "${enable_gather_detailed_mem_stats+set}" = set; then :
6723 enableval=$enable_gather_detailed_mem_stats;
ba479fd2 6724else
00020c16 6725 enable_gather_detailed_mem_stats=no
5213506e
RW
6726fi
6727
00020c16
ILT
6728if test x$enable_gather_detailed_mem_stats = xyes ; then
6729
5213506e 6730$as_echo "#define GATHER_STATISTICS 1" >>confdefs.h
ba479fd2
NN
6731
6732fi
00020c16
ILT
6733
6734# -------------------------------
6735# Miscenalleous configure options
6736# -------------------------------
6737
6738# See if we are building gcc with C++.
5213506e
RW
6739# Check whether --enable-build-with-cxx was given.
6740if test "${enable_build_with_cxx+set}" = set; then :
6741 enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval
ba479fd2 6742else
00020c16 6743 ENABLE_BUILD_WITH_CXX=no
5213506e
RW
6744fi
6745
ba479fd2 6746
00020c16
ILT
6747
6748# With stabs
6749
5213506e
RW
6750# Check whether --with-stabs was given.
6751if test "${with_stabs+set}" = set; then :
6752 withval=$with_stabs; stabs="$with_stabs"
6e3f3080 6753else
00020c16 6754 stabs=no
5213506e 6755fi
00020c16 6756
ba479fd2 6757
5213506e
RW
6758# Determine whether or not multilibs are enabled.
6759# Check whether --enable-multilib was given.
6760if test "${enable_multilib+set}" = set; then :
6761 enableval=$enable_multilib;
ba479fd2 6762else
00020c16 6763 enable_multilib=yes
5213506e
RW
6764fi
6765
861bb6c1 6766
343a6100 6767
00020c16 6768# Enable __cxa_atexit for C++.
5213506e
RW
6769# Check whether --enable-__cxa_atexit was given.
6770if test "${enable___cxa_atexit+set}" = set; then :
6771 enableval=$enable___cxa_atexit;
6772fi
00020c16 6773
00020c16
ILT
6774
6775# Enable C extension for decimal float if target supports it.
5213506e
RW
6776# Check whether --enable-decimal-float was given.
6777if test "${enable_decimal_float+set}" = set; then :
6778 enableval=$enable_decimal_float;
00020c16
ILT
6779 case $enable_decimal_float in
6780 yes | no | bid | dpd) ;;
5213506e
RW
6781 *) as_fn_error "'$enable_decimal_float' is an invalid value for --enable-decimal-float.
6782Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;;
00020c16 6783 esac
343a6100 6784
0a4b6309 6785else
00020c16
ILT
6786
6787 case $target in
6788 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
6789 enable_decimal_float=yes
0a4b6309 6790 ;;
00020c16 6791 *)
5213506e
RW
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5
6793$as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
00020c16
ILT
6794 enable_decimal_float=no
6795 ;;
6796 esac
6797
5213506e
RW
6798fi
6799
00020c16
ILT
6800
6801dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
6802
6803cat >>confdefs.h <<_ACEOF
6804#define ENABLE_DECIMAL_FLOAT $dfp
6805_ACEOF
6806
6807
6808# x86's use BID format instead of DPD
6809case x$enable_decimal_float in
6810 xyes)
6811 case $target in
6812 i?86*-*-linux* | x86_64*-*-linux*)
6813 enable_decimal_float=bid
6814 ;;
6815 *)
6816 enable_decimal_float=dpd
6817 ;;
0a4b6309 6818 esac
00020c16
ILT
6819 ;;
6820 xno)
6821 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
6822 # dependency on libdecnumber.
6823 enable_decimal_float=dpd
6824 ;;
6825esac
0a4b6309 6826
0a4b6309 6827
00020c16 6828bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
0a4b6309 6829
00020c16
ILT
6830cat >>confdefs.h <<_ACEOF
6831#define ENABLE_DECIMAL_BID_FORMAT $bid
6832_ACEOF
6833
6834
6835# Enable C extension for fixed-point arithmetic.
5213506e
RW
6836# Check whether --enable-fixed-point was given.
6837if test "${enable_fixed_point+set}" = set; then :
6838 enableval=$enable_fixed_point;
861bb6c1 6839
3a000df0 6840else
3a000df0 6841
00020c16
ILT
6842 case $target in
6843 mips*-*-*)
6844 case $host in
6845 mips*-sgi-irix*)
5213506e
RW
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported on IRIX" >&5
6847$as_echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;}
00020c16
ILT
6848 enable_fixed_point=no
6849 ;;
6850 *)
6851 enable_fixed_point=yes
6852 ;;
6853 esac
6854 ;;
6855 *)
5213506e
RW
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported for this target" >&5
6857$as_echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
00020c16
ILT
6858 enable_fixed_point=no
6859 ;;
6860 esac
3a000df0 6861
5213506e
RW
6862fi
6863
3a000df0
KC
6864
6865
00020c16 6866fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
ba479fd2 6867
00020c16
ILT
6868cat >>confdefs.h <<_ACEOF
6869#define ENABLE_FIXED_POINT $fixedpoint
6870_ACEOF
73458fb7
NN
6871
6872
00020c16
ILT
6873# Enable threads
6874# Pass with no value to take the default
6875# Pass with a value to specify a thread package
5213506e
RW
6876# Check whether --enable-threads was given.
6877if test "${enable_threads+set}" = set; then :
6878 enableval=$enable_threads;
73458fb7 6879else
00020c16 6880 enable_threads=''
5213506e 6881fi
00020c16 6882
00020c16 6883
5213506e
RW
6884# Check whether --enable-tls was given.
6885if test "${enable_tls+set}" = set; then :
6886 enableval=$enable_tls;
00020c16
ILT
6887 case $enable_tls in
6888 yes | no) ;;
5213506e
RW
6889 *) as_fn_error "'$enable_tls' is an invalid value for --enable-tls.
6890Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
00020c16
ILT
6891 esac
6892
73458fb7 6893else
00020c16 6894 enable_tls=''
5213506e 6895fi
ba479fd2 6896
5213506e
RW
6897
6898# Check whether --enable-objc-gc was given.
6899if test "${enable_objc_gc+set}" = set; then :
6900 enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
00020c16 6901 objc_boehm_gc=''
73458fb7 6902else
00020c16 6903 objc_boehm_gc=1
73458fb7 6904fi
00020c16
ILT
6905else
6906 objc_boehm_gc=''
5213506e
RW
6907fi
6908
73458fb7 6909
00020c16 6910
5213506e
RW
6911# Check whether --with-dwarf2 was given.
6912if test "${with_dwarf2+set}" = set; then :
6913 withval=$with_dwarf2; dwarf2="$with_dwarf2"
73458fb7 6914else
00020c16 6915 dwarf2=no
5213506e 6916fi
3bbd5a19 6917
73458fb7 6918
5213506e
RW
6919# Check whether --enable-shared was given.
6920if test "${enable_shared+set}" = set; then :
6921 enableval=$enable_shared;
00020c16
ILT
6922 case $enable_shared in
6923 yes | no) ;;
6924 *)
6925 enable_shared=no
6926 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6927 for pkg in $enableval; do
6928 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6929 enable_shared=yes
6930 fi
6931 done
6932 IFS="$ac_save_ifs"
6933 ;;
6934 esac
73458fb7 6935
73458fb7 6936else
00020c16 6937 enable_shared=yes
5213506e 6938fi
73458fb7 6939
7c27e184 6940
00020c16 6941
00020c16 6942
5213506e
RW
6943# Check whether --with-build-sysroot was given.
6944if test "${with_build_sysroot+set}" = set; then :
6945 withval=$with_build_sysroot;
6946fi
00020c16
ILT
6947
6948
00020c16 6949
5213506e
RW
6950# Check whether --with-sysroot was given.
6951if test "${with_sysroot+set}" = set; then :
6952 withval=$with_sysroot;
00020c16
ILT
6953 case ${with_sysroot} in
6954 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
6955 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6956 esac
6957
6958 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6959 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
6960
6961 if test "x$prefix" = xNONE; then
6962 test_prefix=/usr/local
6963 else
6964 test_prefix=$prefix
6965 fi
6966 if test "x$exec_prefix" = xNONE; then
6967 test_exec_prefix=$test_prefix
6968 else
6969 test_exec_prefix=$exec_prefix
6970 fi
6971 case ${TARGET_SYSTEM_ROOT} in
6972 "${test_prefix}"|"${test_prefix}/"*|\
6973 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
6974 '${prefix}'|'${prefix}/'*|\
6975 '${exec_prefix}'|'${exec_prefix}/'*)
6976 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6977 TARGET_SYSTEM_ROOT_DEFINE="$t"
6978 ;;
6979 esac
6980
6981else
6982
6983 TARGET_SYSTEM_ROOT=
6984 TARGET_SYSTEM_ROOT_DEFINE=
6985 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6986
5213506e
RW
6987fi
6988
00020c16
ILT
6989
6990
6991
6992
6993# Build with intermodule optimisations
5213506e
RW
6994# Check whether --enable-intermodule was given.
6995if test "${enable_intermodule+set}" = set; then :
6996 enableval=$enable_intermodule; case ${enable_intermodule} in
00020c16
ILT
6997 yes) onestep="-onestep";;
6998 *) onestep="";;
6999esac
7000else
7001 onestep=""
5213506e
RW
7002fi
7003
00020c16
ILT
7004
7005
7006
7007
5213506e
RW
7008# Check whether --with-pkgversion was given.
7009if test "${with_pkgversion+set}" = set; then :
7010 withval=$with_pkgversion; case "$withval" in
7011 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
00020c16
ILT
7012 no) PKGVERSION= ;;
7013 *) PKGVERSION="($withval) " ;;
7014 esac
7015else
7016 PKGVERSION="(GCC) "
7017
5213506e 7018fi
00020c16
ILT
7019
7020
7021
7022
5213506e
RW
7023
7024# Check whether --with-bugurl was given.
7025if test "${with_bugurl+set}" = set; then :
7026 withval=$with_bugurl; case "$withval" in
7027 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
00020c16
ILT
7028 no) BUGURL=
7029 ;;
7030 *) BUGURL="$withval"
7031 ;;
7032 esac
7033else
7034 BUGURL="http://gcc.gnu.org/bugs.html"
7035
5213506e
RW
7036fi
7037
00020c16
ILT
7038 case ${BUGURL} in
7039 "")
7040 REPORT_BUGS_TO=
7041 REPORT_BUGS_TEXI=
7042 ;;
7043 *)
7044 REPORT_BUGS_TO="<$BUGURL>"
7045 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7046 ;;
7047 esac;
7048
7049
7050
7051
7052# Sanity check enable_languages in case someone does not run the toplevel
7053# configure # script.
5213506e
RW
7054# Check whether --enable-languages was given.
7055if test "${enable_languages+set}" = set; then :
7056 enableval=$enable_languages; case ,${enable_languages}, in
00020c16
ILT
7057 ,,|,yes,)
7058 # go safe -- we cannot be much sure without the toplevel
7059 # configure's
7060 # analysis of which target libs are present and usable
7061 enable_languages=c
7062 ;;
7063 *,all,*)
5213506e 7064 as_fn_error "only the toplevel supports --enable-languages=all" "$LINENO" 5
00020c16
ILT
7065 ;;
7066 *,c,*)
7067 ;;
7068 *)
7069 enable_languages=c,${enable_languages}
7070 ;;
7071esac
7072else
7073 enable_languages=c
5213506e
RW
7074fi
7075
00020c16 7076
00020c16 7077
5213506e
RW
7078# Check whether --with-multilib-list was given.
7079if test "${with_multilib_list+set}" = set; then :
7080 withval=$with_multilib_list; :
00020c16
ILT
7081else
7082 with_multilib_list=default
5213506e
RW
7083fi
7084
00020c16
ILT
7085
7086# -------------------------
7087# Checks for other programs
7088# -------------------------
7089
5213506e
RW
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7091$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
7092set x ${MAKE-make}
7093ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
7094if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
7095 $as_echo_n "(cached) " >&6
00020c16
ILT
7096else
7097 cat >conftest.make <<\_ACEOF
5213506e 7098SHELL = /bin/sh
00020c16 7099all:
5213506e 7100 @echo '@@@%%%=$(MAKE)=@@@%%%'
00020c16
ILT
7101_ACEOF
7102# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5213506e
RW
7103case `${MAKE-make} -f conftest.make 2>/dev/null` in
7104 *@@@%%%=?*=@@@%%%*)
7105 eval ac_cv_prog_make_${ac_make}_set=yes;;
7106 *)
7107 eval ac_cv_prog_make_${ac_make}_set=no;;
7108esac
00020c16
ILT
7109rm -f conftest.make
7110fi
5213506e
RW
7111if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7113$as_echo "yes" >&6; }
00020c16 7114 SET_MAKE=
73458fb7 7115else
5213506e
RW
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7117$as_echo "no" >&6; }
00020c16 7118 SET_MAKE="MAKE=${MAKE-make}"
73458fb7
NN
7119fi
7120
7c27e184 7121
00020c16
ILT
7122# Find some useful tools
7123for ac_prog in gawk mawk nawk awk
7c27e184
PB
7124do
7125 # Extract the first word of "$ac_prog", so it can be a program name with args.
7126set dummy $ac_prog; ac_word=$2
5213506e
RW
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if test "${ac_cv_prog_AWK+set}" = set; then :
7130 $as_echo_n "(cached) " >&6
73458fb7 7131else
00020c16
ILT
7132 if test -n "$AWK"; then
7133 ac_cv_prog_AWK="$AWK" # Let the user override the test.
73458fb7 7134else
ba479fd2
NN
7135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7136for as_dir in $PATH
7137do
7138 IFS=$as_save_IFS
7139 test -z "$as_dir" && as_dir=.
5213506e
RW
7140 for ac_exec_ext in '' $ac_executable_extensions; do
7141 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7142 ac_cv_prog_AWK="$ac_prog"
5213506e 7143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7144 break 2
7145 fi
7146done
5213506e
RW
7147 done
7148IFS=$as_save_IFS
ba479fd2 7149
73458fb7
NN
7150fi
7151fi
00020c16
ILT
7152AWK=$ac_cv_prog_AWK
7153if test -n "$AWK"; then
5213506e
RW
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7155$as_echo "$AWK" >&6; }
73458fb7 7156else
5213506e
RW
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
73458fb7
NN
7159fi
7160
5213506e 7161
00020c16 7162 test -n "$AWK" && break
7c27e184 7163done
7c27e184 7164
00020c16
ILT
7165# We need awk to create options.c and options.h.
7166# Bail out if it's missing.
7167case ${AWK} in
5213506e 7168 "") as_fn_error "can't build without awk, bailing out" "$LINENO" 5 ;;
00020c16 7169esac
73458fb7 7170
5213506e
RW
7171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7172$as_echo_n "checking whether ln -s works... " >&6; }
7173if test "${gcc_cv_prog_LN_S+set}" = set; then :
7174 $as_echo_n "(cached) " >&6
00020c16
ILT
7175else
7176 rm -f conftestdata_t
7177echo >conftestdata_f
7178if ln -s conftestdata_f conftestdata_t 2>/dev/null
7179then
7180 gcc_cv_prog_LN_S="ln -s"
7181else
7182 if ln conftestdata_f conftestdata_t 2>/dev/null
7183 then
7184 gcc_cv_prog_LN_S=ln
7185 else
7186 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7187 then
7188 gcc_cv_prog_LN_S="cp -p"
7189 else
7190 gcc_cv_prog_LN_S=cp
7191 fi
7192 fi
7193fi
7194rm -f conftestdata_f conftestdata_t
7195
7196fi
7197LN_S="$gcc_cv_prog_LN_S"
7198if test "$gcc_cv_prog_LN_S" = "ln -s"; then
5213506e
RW
7199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7200$as_echo "yes" >&6; }
00020c16
ILT
7201else
7202 if test "$gcc_cv_prog_LN_S" = "ln"; then
5213506e
RW
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using ln" >&5
7204$as_echo "no, using ln" >&6; }
00020c16 7205 else
5213506e
RW
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7207$as_echo "no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; }
00020c16
ILT
7208 fi
7209fi
7210
5213506e
RW
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5
7212$as_echo_n "checking whether ln works... " >&6; }
7213if test "${acx_cv_prog_LN+set}" = set; then :
7214 $as_echo_n "(cached) " >&6
00020c16
ILT
7215else
7216 rm -f conftestdata_t
7217echo >conftestdata_f
7218if ln conftestdata_f conftestdata_t 2>/dev/null
7219then
7220 acx_cv_prog_LN=ln
7221else
7222 acx_cv_prog_LN=no
7223fi
7224rm -f conftestdata_f conftestdata_t
7225
7226fi
7227if test $acx_cv_prog_LN = no; then
7228 LN="$LN_S"
5213506e
RW
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN" >&5
7230$as_echo "no, using $LN" >&6; }
00020c16
ILT
7231else
7232 LN="$acx_cv_prog_LN"
5213506e
RW
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7234$as_echo "yes" >&6; }
00020c16
ILT
7235fi
7236
7237if test -n "$ac_tool_prefix"; then
7238 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7239set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7241$as_echo_n "checking for $ac_word... " >&6; }
7242if test "${ac_cv_prog_RANLIB+set}" = set; then :
7243 $as_echo_n "(cached) " >&6
73458fb7 7244else
00020c16
ILT
7245 if test -n "$RANLIB"; then
7246 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
73458fb7 7247else
ba479fd2
NN
7248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7249for as_dir in $PATH
7250do
7251 IFS=$as_save_IFS
7252 test -z "$as_dir" && as_dir=.
5213506e
RW
7253 for ac_exec_ext in '' $ac_executable_extensions; do
7254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7255 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 7256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7257 break 2
7258 fi
7259done
5213506e
RW
7260 done
7261IFS=$as_save_IFS
ba479fd2 7262
73458fb7
NN
7263fi
7264fi
00020c16
ILT
7265RANLIB=$ac_cv_prog_RANLIB
7266if test -n "$RANLIB"; then
5213506e
RW
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7268$as_echo "$RANLIB" >&6; }
73458fb7 7269else
5213506e
RW
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7271$as_echo "no" >&6; }
73458fb7
NN
7272fi
7273
5213506e 7274
00020c16
ILT
7275fi
7276if test -z "$ac_cv_prog_RANLIB"; then
7277 ac_ct_RANLIB=$RANLIB
7278 # Extract the first word of "ranlib", so it can be a program name with args.
7279set dummy ranlib; ac_word=$2
5213506e
RW
7280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7281$as_echo_n "checking for $ac_word... " >&6; }
7282if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7283 $as_echo_n "(cached) " >&6
f6a874ac 7284else
00020c16
ILT
7285 if test -n "$ac_ct_RANLIB"; then
7286 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
f6a874ac
JW
7287else
7288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289for as_dir in $PATH
7290do
7291 IFS=$as_save_IFS
7292 test -z "$as_dir" && as_dir=.
5213506e
RW
7293 for ac_exec_ext in '' $ac_executable_extensions; do
7294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7295 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 7296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7297 break 2
7298 fi
7299done
5213506e
RW
7300 done
7301IFS=$as_save_IFS
f6a874ac 7302
f6a874ac
JW
7303fi
7304fi
00020c16
ILT
7305ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7306if test -n "$ac_ct_RANLIB"; then
5213506e
RW
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7308$as_echo "$ac_ct_RANLIB" >&6; }
f6a874ac 7309else
5213506e
RW
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311$as_echo "no" >&6; }
f6a874ac
JW
7312fi
7313
5213506e
RW
7314 if test "x$ac_ct_RANLIB" = x; then
7315 RANLIB=":"
7316 else
7317 case $cross_compiling:$ac_tool_warned in
7318yes:)
7319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7321ac_tool_warned=yes ;;
7322esac
7323 RANLIB=$ac_ct_RANLIB
7324 fi
00020c16
ILT
7325else
7326 RANLIB="$ac_cv_prog_RANLIB"
f6a874ac
JW
7327fi
7328
00020c16
ILT
7329case "${host}" in
7330*-*-darwin*)
7331 # By default, the Darwin ranlib will not treat common symbols as
7332 # definitions when building the archive table of contents. Other
7333 # ranlibs do that; pass an option to the Darwin ranlib that makes
7334 # it behave similarly.
7335 ranlib_flags="-c"
7336 ;;
7337*)
7338 ranlib_flags=""
7339esac
7340
7341
7342# Find a good install program. We prefer a C program (faster),
7343# so one script is as good as another. But avoid the broken or
7344# incompatible versions:
7345# SysV /etc/install, /usr/sbin/install
7346# SunOS /usr/etc/install
7347# IRIX /sbin/install
7348# AIX /bin/install
7349# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7350# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7351# ./install, which can be erroneously created by make from ./install.sh.
5213506e
RW
7352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD compatible install" >&5
7353$as_echo_n "checking for a BSD compatible install... " >&6; }
00020c16 7354if test -z "$INSTALL"; then
5213506e
RW
7355if test "${ac_cv_path_install+set}" = set; then :
7356 $as_echo_n "(cached) " >&6
f6a874ac 7357else
00020c16
ILT
7358 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7359 for ac_dir in $PATH; do
7360 # Account for people who put trailing slashes in PATH elements.
7361 case "$ac_dir/" in
7362 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7363 *)
7364 # OSF1 and SCO ODT 3.0 have their own names for install.
7365 for ac_prog in ginstall scoinst install; do
7366 if test -f $ac_dir/$ac_prog; then
7367 if test $ac_prog = install &&
7368 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7369 # AIX install. It has an incompatible calling convention.
7370 # OSF/1 installbsd also uses dspmsg, but is usable.
7371 :
7372 else
7373 ac_cv_path_install="$ac_dir/$ac_prog -c"
7374 break 2
7375 fi
7376 fi
7377 done
7378 ;;
7379 esac
7380 done
7381 IFS="$ac_save_IFS"
7382
7383fi
7384 if test "${ac_cv_path_install+set}" = set; then
7385 INSTALL="$ac_cv_path_install"
7386 else
7387 # As a last resort, use the slow shell script. We don't cache a
7388 # path for INSTALL within a source directory, because that will
7389 # break other packages using the cache if that directory is
7390 # removed, or if the path is relative.
7391 INSTALL="$ac_install_sh"
7392 fi
7393fi
5213506e
RW
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7395$as_echo "$INSTALL" >&6; }
00020c16
ILT
7396
7397# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7398# It thinks the first close brace ends the variable substitution.
7399test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7400
7401test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7402
7403
7404# See if cmp has --ignore-initial.
5213506e
RW
7405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmp's capabilities" >&5
7406$as_echo_n "checking for cmp's capabilities... " >&6; }
7407if test "${gcc_cv_prog_cmp_skip+set}" = set; then :
7408 $as_echo_n "(cached) " >&6
00020c16
ILT
7409else
7410 echo abfoo >t1
7411 echo cdfoo >t2
7412 gcc_cv_prog_cmp_skip=slowcompare
7413 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7414 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
7415 :
7416 else
7417 gcc_cv_prog_cmp_skip=gnucompare
7418 fi
7419 fi
7420 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7421 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7422 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7423 :
7424 else
7425 gcc_cv_prog_cmp_skip=fastcompare
7426 fi
7427 fi
7428 fi
7429 rm t1 t2
7430
7431fi
5213506e
RW
7432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
7433$as_echo "$gcc_cv_prog_cmp_skip" >&6; }
00020c16
ILT
7434make_compare_target=$gcc_cv_prog_cmp_skip
7435
7436
7437
7438# See if we have the mktemp command.
7439# Extract the first word of "mktemp", so it can be a program name with args.
7440set dummy mktemp; ac_word=$2
5213506e
RW
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442$as_echo_n "checking for $ac_word... " >&6; }
7443if test "${ac_cv_prog_have_mktemp_command+set}" = set; then :
7444 $as_echo_n "(cached) " >&6
f6a874ac 7445else
00020c16
ILT
7446 if test -n "$have_mktemp_command"; then
7447 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
f6a874ac
JW
7448else
7449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450for as_dir in $PATH
7451do
7452 IFS=$as_save_IFS
7453 test -z "$as_dir" && as_dir=.
5213506e
RW
7454 for ac_exec_ext in '' $ac_executable_extensions; do
7455 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7456 ac_cv_prog_have_mktemp_command="yes"
5213506e 7457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7458 break 2
7459 fi
7460done
5213506e
RW
7461 done
7462IFS=$as_save_IFS
f6a874ac 7463
00020c16 7464 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
f6a874ac
JW
7465fi
7466fi
00020c16
ILT
7467have_mktemp_command=$ac_cv_prog_have_mktemp_command
7468if test -n "$have_mktemp_command"; then
5213506e
RW
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mktemp_command" >&5
7470$as_echo "$have_mktemp_command" >&6; }
f6a874ac 7471else
5213506e
RW
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
f6a874ac
JW
7474fi
7475
f6a874ac 7476
5213506e 7477
00020c16
ILT
7478# See if makeinfo has been installed and is modern enough
7479# that we can use it.
ca9bc441 7480
00020c16
ILT
7481 # Extract the first word of "makeinfo", so it can be a program name with args.
7482set dummy makeinfo; ac_word=$2
5213506e
RW
7483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7484$as_echo_n "checking for $ac_word... " >&6; }
7485if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7486 $as_echo_n "(cached) " >&6
956d6950 7487else
00020c16
ILT
7488 if test -n "$MAKEINFO"; then
7489 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
956d6950 7490else
00020c16
ILT
7491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492for as_dir in $PATH
7493do
7494 IFS=$as_save_IFS
7495 test -z "$as_dir" && as_dir=.
5213506e
RW
7496 for ac_exec_ext in '' $ac_executable_extensions; do
7497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7498 ac_cv_prog_MAKEINFO="makeinfo"
5213506e 7499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7500 break 2
7501 fi
7502done
5213506e
RW
7503 done
7504IFS=$as_save_IFS
ba479fd2 7505
956d6950 7506fi
00020c16
ILT
7507fi
7508MAKEINFO=$ac_cv_prog_MAKEINFO
7509if test -n "$MAKEINFO"; then
5213506e
RW
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7511$as_echo "$MAKEINFO" >&6; }
956d6950 7512else
5213506e
RW
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514$as_echo "no" >&6; }
956d6950 7515fi
956d6950 7516
5213506e 7517
00020c16
ILT
7518 if test -n "$MAKEINFO"; then
7519 # Found it, now check the version.
5213506e
RW
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern makeinfo" >&5
7521$as_echo_n "checking for modern makeinfo... " >&6; }
7522if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then :
7523 $as_echo_n "(cached) " >&6
00020c16
ILT
7524else
7525 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
7526 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
956d6950 7527
00020c16
ILT
7528 case $ac_prog_version in
7529 '') gcc_cv_prog_makeinfo_modern=no;;
7530 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
7531 *) gcc_cv_prog_makeinfo_modern=no;;
7532 esac
ba479fd2 7533
956d6950 7534fi
5213506e
RW
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_makeinfo_modern" >&5
7536$as_echo "$gcc_cv_prog_makeinfo_modern" >&6; }
00020c16
ILT
7537 else
7538 gcc_cv_prog_makeinfo_modern=no
7539 fi
7540 if test $gcc_cv_prog_makeinfo_modern = no; then
7541 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
7542 fi
956d6950 7543
00020c16 7544if test $gcc_cv_prog_makeinfo_modern = no; then
5213506e 7545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
00020c16
ILT
7546*** Makeinfo is missing or too old.
7547*** Info documentation will not be built." >&5
5213506e 7548$as_echo "$as_me: WARNING:
00020c16
ILT
7549*** Makeinfo is missing or too old.
7550*** Info documentation will not be built." >&2;}
7551 BUILD_INFO=
7552else
7553 BUILD_INFO=info
956d6950
JL
7554fi
7555
63cf211a 7556
00020c16 7557# Is pod2man recent enough to regenerate manpages?
5213506e
RW
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent Pod::Man" >&5
7559$as_echo_n "checking for recent Pod::Man... " >&6; }
00020c16 7560if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
5213506e
RW
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7562$as_echo "yes" >&6; }
00020c16 7563 GENERATED_MANPAGES=generated-manpages
956d6950 7564else
5213506e
RW
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7566$as_echo "no" >&6; }
00020c16 7567 GENERATED_MANPAGES=
956d6950 7568fi
ba479fd2 7569
956d6950 7570
00020c16 7571MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
956d6950 7572
00020c16
ILT
7573# How about lex?
7574for ac_prog in flex
7575do
7576 # Extract the first word of "$ac_prog", so it can be a program name with args.
7577set dummy $ac_prog; ac_word=$2
5213506e
RW
7578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579$as_echo_n "checking for $ac_word... " >&6; }
7580if test "${ac_cv_prog_FLEX+set}" = set; then :
7581 $as_echo_n "(cached) " >&6
956d6950 7582else
00020c16
ILT
7583 if test -n "$FLEX"; then
7584 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
956d6950 7585else
00020c16
ILT
7586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587for as_dir in $PATH
7588do
7589 IFS=$as_save_IFS
7590 test -z "$as_dir" && as_dir=.
5213506e
RW
7591 for ac_exec_ext in '' $ac_executable_extensions; do
7592 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7593 ac_cv_prog_FLEX="$ac_prog"
5213506e 7594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7595 break 2
7596 fi
7597done
5213506e
RW
7598 done
7599IFS=$as_save_IFS
ba479fd2 7600
956d6950 7601fi
956d6950 7602fi
00020c16
ILT
7603FLEX=$ac_cv_prog_FLEX
7604if test -n "$FLEX"; then
5213506e
RW
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
7606$as_echo "$FLEX" >&6; }
00020c16 7607else
5213506e
RW
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
00020c16 7610fi
ba479fd2 7611
5213506e 7612
00020c16
ILT
7613 test -n "$FLEX" && break
7614done
7615test -n "$FLEX" || FLEX="$MISSING flex"
7616
7617
7618# Bison?
7619for ac_prog in bison
7620do
7621 # Extract the first word of "$ac_prog", so it can be a program name with args.
7622set dummy $ac_prog; ac_word=$2
5213506e
RW
7623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7624$as_echo_n "checking for $ac_word... " >&6; }
7625if test "${ac_cv_prog_BISON+set}" = set; then :
7626 $as_echo_n "(cached) " >&6
00020c16
ILT
7627else
7628 if test -n "$BISON"; then
7629 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7630else
7631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7632for as_dir in $PATH
7633do
7634 IFS=$as_save_IFS
7635 test -z "$as_dir" && as_dir=.
5213506e
RW
7636 for ac_exec_ext in '' $ac_executable_extensions; do
7637 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7638 ac_cv_prog_BISON="$ac_prog"
5213506e 7639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7640 break 2
7641 fi
7642done
5213506e
RW
7643 done
7644IFS=$as_save_IFS
956d6950 7645
00020c16
ILT
7646fi
7647fi
7648BISON=$ac_cv_prog_BISON
7649if test -n "$BISON"; then
5213506e
RW
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7651$as_echo "$BISON" >&6; }
00020c16 7652else
5213506e
RW
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7654$as_echo "no" >&6; }
956d6950
JL
7655fi
7656
5213506e 7657
00020c16
ILT
7658 test -n "$BISON" && break
7659done
7660test -n "$BISON" || BISON="$MISSING bison"
7661
7662
7663# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7664# check for build == host before using them.
7665
7666# NM
7667if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7668 && test -d ../binutils ; then
7669 NM='$(objdir)/../binutils/nm-new'
7670else
7671 # Extract the first word of "nm", so it can be a program name with args.
7672set dummy nm; ac_word=$2
5213506e
RW
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if test "${ac_cv_prog_NM+set}" = set; then :
7676 $as_echo_n "(cached) " >&6
00020c16
ILT
7677else
7678 if test -n "$NM"; then
7679 ac_cv_prog_NM="$NM" # Let the user override the test.
7680else
7681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682for as_dir in $PATH
7683do
7684 IFS=$as_save_IFS
7685 test -z "$as_dir" && as_dir=.
5213506e
RW
7686 for ac_exec_ext in '' $ac_executable_extensions; do
7687 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7688 ac_cv_prog_NM="nm"
5213506e 7689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7690 break 2
7691 fi
7692done
5213506e
RW
7693 done
7694IFS=$as_save_IFS
00020c16
ILT
7695
7696 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7697fi
7698fi
7699NM=$ac_cv_prog_NM
7700if test -n "$NM"; then
5213506e
RW
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
7702$as_echo "$NM" >&6; }
00020c16 7703else
5213506e
RW
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705$as_echo "no" >&6; }
00020c16
ILT
7706fi
7707
5213506e 7708
00020c16
ILT
7709fi
7710
7711# AR
7712if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7713 && test -d ../binutils ; then
7714 AR='$(objdir)/../binutils/ar'
7715else
7716 # Extract the first word of "ar", so it can be a program name with args.
7717set dummy ar; ac_word=$2
5213506e
RW
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719$as_echo_n "checking for $ac_word... " >&6; }
7720if test "${ac_cv_prog_AR+set}" = set; then :
7721 $as_echo_n "(cached) " >&6
00020c16
ILT
7722else
7723 if test -n "$AR"; then
7724 ac_cv_prog_AR="$AR" # Let the user override the test.
7725else
7726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727for as_dir in $PATH
7728do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
5213506e
RW
7731 for ac_exec_ext in '' $ac_executable_extensions; do
7732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7733 ac_cv_prog_AR="ar"
5213506e 7734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7735 break 2
7736 fi
7737done
5213506e
RW
7738 done
7739IFS=$as_save_IFS
00020c16
ILT
7740
7741 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7742fi
7743fi
7744AR=$ac_cv_prog_AR
7745if test -n "$AR"; then
5213506e
RW
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7747$as_echo "$AR" >&6; }
00020c16 7748else
5213506e
RW
7749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7750$as_echo "no" >&6; }
00020c16
ILT
7751fi
7752
5213506e 7753
00020c16
ILT
7754fi
7755
7756
7757# --------------------
7758# Checks for C headers
7759# --------------------
7760
7761# Need to reject headers which give warnings, so that the -Werror bootstrap
7762# works later. *sigh* This needs to come before all header checks.
7763
7764ac_c_preproc_warn_flag=yes
7765
5213506e
RW
7766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7767$as_echo_n "checking for ANSI C header files... " >&6; }
7768if test "${ac_cv_header_stdc+set}" = set; then :
7769 $as_echo_n "(cached) " >&6
18fc9bd4 7770else
5213506e 7771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4 7772/* end confdefs.h. */
00020c16
ILT
7773#include <stdlib.h>
7774#include <stdarg.h>
18fc9bd4 7775#include <string.h>
00020c16
ILT
7776#include <float.h>
7777
18fc9bd4
RG
7778int
7779main ()
7780{
7781
7782 ;
7783 return 0;
7784}
7785_ACEOF
5213506e 7786if ac_fn_c_try_compile "$LINENO"; then :
00020c16 7787 ac_cv_header_stdc=yes
18fc9bd4 7788else
5213506e 7789 ac_cv_header_stdc=no
18fc9bd4 7790fi
5213506e 7791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 7792
00020c16
ILT
7793if test $ac_cv_header_stdc = yes; then
7794 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5213506e 7795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7796/* end confdefs.h. */
7797#include <string.h>
7798
18fc9bd4 7799_ACEOF
00020c16 7800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7801 $EGREP "memchr" >/dev/null 2>&1; then :
7802
00020c16
ILT
7803else
7804 ac_cv_header_stdc=no
7805fi
7806rm -f conftest*
18fc9bd4
RG
7807
7808fi
7809
00020c16
ILT
7810if test $ac_cv_header_stdc = yes; then
7811 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5213506e 7812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 7813/* end confdefs.h. */
00020c16
ILT
7814#include <stdlib.h>
7815
7816_ACEOF
7817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7818 $EGREP "free" >/dev/null 2>&1; then :
7819
00020c16
ILT
7820else
7821 ac_cv_header_stdc=no
7822fi
7823rm -f conftest*
7824
7825fi
7826
7827if test $ac_cv_header_stdc = yes; then
7828 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213506e 7829 if test "$cross_compiling" = yes; then :
00020c16
ILT
7830 :
7831else
5213506e 7832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7833/* end confdefs.h. */
7834#include <ctype.h>
5213506e 7835#include <stdlib.h>
00020c16
ILT
7836#if ((' ' & 0x0FF) == 0x020)
7837# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7838# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7839#else
7840# define ISLOWER(c) \
7841 (('a' <= (c) && (c) <= 'i') \
7842 || ('j' <= (c) && (c) <= 'r') \
7843 || ('s' <= (c) && (c) <= 'z'))
7844# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7845#endif
7846
7847#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7848int
7849main ()
7850{
7851 int i;
7852 for (i = 0; i < 256; i++)
7853 if (XOR (islower (i), ISLOWER (i))
7854 || toupper (i) != TOUPPER (i))
5213506e
RW
7855 return 2;
7856 return 0;
00020c16
ILT
7857}
7858_ACEOF
5213506e 7859if ac_fn_c_try_run "$LINENO"; then :
00020c16 7860
5213506e
RW
7861else
7862 ac_cv_header_stdc=no
00020c16 7863fi
5213506e
RW
7864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7865 conftest.$ac_objext conftest.beam conftest.$ac_ext
00020c16 7866fi
5213506e 7867
00020c16
ILT
7868fi
7869fi
5213506e
RW
7870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7871$as_echo "$ac_cv_header_stdc" >&6; }
00020c16
ILT
7872if test $ac_cv_header_stdc = yes; then
7873
5213506e 7874$as_echo "#define STDC_HEADERS 1" >>confdefs.h
00020c16
ILT
7875
7876fi
7877
5213506e
RW
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7879$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7880if test "${ac_cv_header_time+set}" = set; then :
7881 $as_echo_n "(cached) " >&6
00020c16 7882else
5213506e 7883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7884/* end confdefs.h. */
7885#include <sys/types.h>
7886#include <sys/time.h>
7887#include <time.h>
7888
7889int
7890main ()
7891{
7892if ((struct tm *) 0)
7893return 0;
7894 ;
7895 return 0;
7896}
7897_ACEOF
5213506e 7898if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7899 ac_cv_header_time=yes
7900else
5213506e 7901 ac_cv_header_time=no
00020c16 7902fi
5213506e 7903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7904fi
5213506e
RW
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7906$as_echo "$ac_cv_header_time" >&6; }
00020c16
ILT
7907if test $ac_cv_header_time = yes; then
7908
5213506e 7909$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
00020c16
ILT
7910
7911fi
7912
5213506e
RW
7913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
7914$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
7915if test "${gcc_cv_header_string+set}" = set; then :
7916 $as_echo_n "(cached) " >&6
00020c16 7917else
5213506e 7918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7919/* end confdefs.h. */
7920#include <string.h>
7921#include <strings.h>
7922int
7923main ()
7924{
7925
7926 ;
7927 return 0;
7928}
7929_ACEOF
5213506e 7930if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7931 gcc_cv_header_string=yes
7932else
5213506e 7933 gcc_cv_header_string=no
00020c16 7934fi
5213506e 7935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7936fi
5213506e
RW
7937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5
7938$as_echo "$gcc_cv_header_string" >&6; }
00020c16
ILT
7939if test $gcc_cv_header_string = yes; then
7940
5213506e 7941$as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h
00020c16
ILT
7942
7943fi
7944
5213506e
RW
7945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7946$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7947if test "${ac_cv_header_sys_wait_h+set}" = set; then :
7948 $as_echo_n "(cached) " >&6
00020c16 7949else
5213506e 7950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7951/* end confdefs.h. */
7952#include <sys/types.h>
7953#include <sys/wait.h>
7954#ifndef WEXITSTATUS
5213506e 7955# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
e9831ca0
KG
7956#endif
7957#ifndef WIFEXITED
ba479fd2 7958# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 7959#endif
ba479fd2
NN
7960
7961int
7962main ()
7963{
7964 int s;
7965 wait (&s);
5213506e
RW
7966 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7967 ;
7968 return 0;
7969}
7970_ACEOF
7971if ac_fn_c_try_compile "$LINENO"; then :
7972 ac_cv_header_sys_wait_h=yes
7973else
7974 ac_cv_header_sys_wait_h=no
7975fi
7976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7977fi
7978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7979$as_echo "$ac_cv_header_sys_wait_h" >&6; }
7980if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2 7981
5213506e 7982$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
ba479fd2 7983
5213506e 7984fi
dfb77e37
KC
7985
7986for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 7987 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 7988 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 7989 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
5213506e
RW
7990do :
7991 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7992ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
7993eval as_val=\$$as_ac_Header
7994 if test "x$as_val" = x""yes; then :
ba479fd2 7995 cat >>confdefs.h <<_ACEOF
5213506e 7996#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2
NN
7997_ACEOF
7998
956d6950
JL
7999fi
8000done
8001
8002
f24af81b 8003# Check for thread headers.
5213506e
RW
8004ac_fn_c_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h"
8005if test "x$ac_cv_header_thread_h" = x""yes; then :
f24af81b
TT
8006 have_thread_h=yes
8007else
ba479fd2 8008 have_thread_h=
f24af81b
TT
8009fi
8010
5213506e
RW
8011ac_fn_c_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h"
8012if test "x$ac_cv_header_pthread_h" = x""yes; then :
f24af81b
TT
8013 have_pthread_h=yes
8014else
ba479fd2 8015 have_pthread_h=
f24af81b
TT
8016fi
8017
8018
84c041a1 8019# These tests can't be done till we know if we have limits.h.
5213506e
RW
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHAR_BIT" >&5
8021$as_echo_n "checking for CHAR_BIT... " >&6; }
8022if test "${gcc_cv_decl_char_bit+set}" = set; then :
8023 $as_echo_n "(cached) " >&6
ba479fd2 8024else
5213506e 8025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8026/* end confdefs.h. */
75e93faa
ZW
8027#ifdef HAVE_LIMITS_H
8028#include <limits.h>
8029#endif
8030#ifdef CHAR_BIT
8031found
8032#endif
ba479fd2 8033_ACEOF
75e93faa 8034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e 8035 $EGREP "found" >/dev/null 2>&1; then :
75e93faa
ZW
8036 gcc_cv_decl_char_bit=yes
8037else
75e93faa
ZW
8038 gcc_cv_decl_char_bit=no
8039fi
8040rm -f conftest*
8041
8042
8043fi
5213506e
RW
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_char_bit" >&5
8045$as_echo "$gcc_cv_decl_char_bit" >&6; }
75e93faa 8046if test $gcc_cv_decl_char_bit = no; then
5213506e
RW
8047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of bits in a byte" >&5
8048$as_echo_n "checking number of bits in a byte... " >&6; }
8049if test "${gcc_cv_c_nbby+set}" = set; then :
8050 $as_echo_n "(cached) " >&6
75e93faa
ZW
8051else
8052 i=8
8053 gcc_cv_c_nbby=
8054 while test $i -lt 65; do
5213506e 8055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
8056/* end confdefs.h. */
8057
8058int
8059main ()
8060{
4e70264f
ZW
8061switch(0) {
8062 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8063 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8064 ; }
ba479fd2
NN
8065 ;
8066 return 0;
8067}
8068_ACEOF
5213506e 8069if ac_fn_c_try_compile "$LINENO"; then :
4e70264f 8070 gcc_cv_c_nbby=$i; break
75e93faa 8071fi
5213506e 8072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8073 i=`expr $i + 1`
8074 done
8075 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8076
8077fi
5213506e
RW
8078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_nbby" >&5
8079$as_echo "$gcc_cv_c_nbby" >&6; }
75e93faa 8080if test $gcc_cv_c_nbby = failed; then
5213506e 8081 as_fn_error "cannot determine number of bits in a byte" "$LINENO" 5
75e93faa 8082else
ba479fd2
NN
8083
8084cat >>confdefs.h <<_ACEOF
75e93faa 8085#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8086_ACEOF
75e93faa
ZW
8087
8088fi
8089fi
5213506e
RW
8090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8091$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
8092if test "${ac_cv_c_bigendian+set}" = set; then :
8093 $as_echo_n "(cached) " >&6
84c041a1 8094else
5213506e
RW
8095 ac_cv_c_bigendian=unknown
8096 # See if we're dealing with a universal compiler.
8097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8098/* end confdefs.h. */
8099#ifndef __APPLE_CC__
8100 not a universal capable compiler
8101 #endif
8102 typedef int dummy;
8103
8104_ACEOF
8105if ac_fn_c_try_compile "$LINENO"; then :
8106
8107 # Check for potential -arch flags. It is not universal unless
8108 # there are at least two -arch flags with different values.
8109 ac_arch=
8110 ac_prev=
8111 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8112 if test -n "$ac_prev"; then
8113 case $ac_word in
8114 i?86 | x86_64 | ppc | ppc64)
8115 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8116 ac_arch=$ac_word
8117 else
8118 ac_cv_c_bigendian=universal
8119 break
8120 fi
8121 ;;
8122 esac
8123 ac_prev=
8124 elif test "x$ac_word" = "x-arch"; then
8125 ac_prev=arch
8126 fi
8127 done
8128fi
8129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8130 if test $ac_cv_c_bigendian = unknown; then
8131 # See if sys/param.h defines the BYTE_ORDER macro.
8132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8133/* end confdefs.h. */
4977bab6 8134#include <sys/types.h>
5213506e 8135 #include <sys/param.h>
9791c75c 8136
ba479fd2
NN
8137int
8138main ()
8139{
5213506e
RW
8140#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8141 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8142 && LITTLE_ENDIAN)
8143 bogus endian macros
8144 #endif
9791c75c 8145
ba479fd2
NN
8146 ;
8147 return 0;
8148}
8149_ACEOF
5213506e 8150if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6 8151 # It does; now see whether it defined to BIG_ENDIAN or not.
5213506e 8152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8153/* end confdefs.h. */
4977bab6 8154#include <sys/types.h>
5213506e 8155 #include <sys/param.h>
9791c75c 8156
ba479fd2
NN
8157int
8158main ()
8159{
4977bab6 8160#if BYTE_ORDER != BIG_ENDIAN
5213506e
RW
8161 not big endian
8162 #endif
9791c75c 8163
ba479fd2
NN
8164 ;
8165 return 0;
8166}
8167_ACEOF
5213506e 8168if ac_fn_c_try_compile "$LINENO"; then :
b61ff9c8
BS
8169 ac_cv_c_bigendian=yes
8170else
5213506e 8171 ac_cv_c_bigendian=no
4977bab6 8172fi
5213506e
RW
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8174fi
8175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8176 fi
8177 if test $ac_cv_c_bigendian = unknown; then
8178 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8180/* end confdefs.h. */
8181#include <limits.h>
ba479fd2 8182
5213506e
RW
8183int
8184main ()
8185{
8186#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8187 bogus endian macros
8188 #endif
8189
8190 ;
8191 return 0;
8192}
9791c75c 8193_ACEOF
5213506e
RW
8194if ac_fn_c_try_compile "$LINENO"; then :
8195 # It does; now see whether it defined to _BIG_ENDIAN or not.
8196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791c75c 8197/* end confdefs.h. */
5213506e
RW
8198#include <limits.h>
8199
9791c75c
KC
8200int
8201main ()
8202{
5213506e
RW
8203#ifndef _BIG_ENDIAN
8204 not big endian
8205 #endif
8206
9791c75c
KC
8207 ;
8208 return 0;
8209}
8210_ACEOF
5213506e 8211if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a 8212 ac_cv_c_bigendian=yes
5213506e
RW
8213else
8214 ac_cv_c_bigendian=no
8b1f719a 8215fi
5213506e 8216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9791c75c 8217fi
5213506e
RW
8218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8219 fi
8220 if test $ac_cv_c_bigendian = unknown; then
8221 # Compile a test program.
8222 if test "$cross_compiling" = yes; then :
8223 # Try to guess by grepping values from an object file.
8224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8225/* end confdefs.h. */
8226short int ascii_mm[] =
8227 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8228 short int ascii_ii[] =
8229 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8230 int use_ascii (int i) {
8231 return ascii_mm[i] + ascii_ii[i];
8232 }
8233 short int ebcdic_ii[] =
8234 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8235 short int ebcdic_mm[] =
8236 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8237 int use_ebcdic (int i) {
8238 return ebcdic_mm[i] + ebcdic_ii[i];
8239 }
8240 extern int foo;
9791c75c 8241
5213506e
RW
8242int
8243main ()
8244{
8245return use_ascii (foo) == use_ebcdic (foo);
8246 ;
8247 return 0;
8248}
8249_ACEOF
8250if ac_fn_c_try_compile "$LINENO"; then :
8251 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8252 ac_cv_c_bigendian=yes
8253 fi
8254 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8255 if test "$ac_cv_c_bigendian" = unknown; then
8256 ac_cv_c_bigendian=no
8257 else
8258 # finding both strings is unlikely to happen, but who knows?
8259 ac_cv_c_bigendian=unknown
8260 fi
8261 fi
4977bab6 8262fi
5213506e 8263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 8264else
5213506e 8265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8266/* end confdefs.h. */
5213506e 8267$ac_includes_default
9791c75c
KC
8268int
8269main ()
8270{
5213506e
RW
8271
8272 /* Are we little or big endian? From Harbison&Steele. */
8273 union
8274 {
8275 long int l;
8276 char c[sizeof (long int)];
8277 } u;
8278 u.l = 1;
8279 return u.c[sizeof (long int) - 1] == 1;
8280
8281 ;
8282 return 0;
4977bab6 8283}
ba479fd2 8284_ACEOF
5213506e 8285if ac_fn_c_try_run "$LINENO"; then :
4977bab6
ZW
8286 ac_cv_c_bigendian=no
8287else
5213506e 8288 ac_cv_c_bigendian=yes
4977bab6 8289fi
5213506e
RW
8290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8291 conftest.$ac_objext conftest.beam conftest.$ac_ext
4977bab6 8292fi
ba479fd2 8293
5213506e
RW
8294 fi
8295fi
8296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
8297$as_echo "$ac_cv_c_bigendian" >&6; }
8298 case $ac_cv_c_bigendian in #(
8299 yes)
8300 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
8301;; #(
8302 no)
8303 ;; #(
8304 universal)
8305
8306$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8307
8308 ;; #(
8309 *)
8310 as_fn_error "unknown endianness
8311 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8312 esac
84c041a1 8313
75e93faa 8314
73458fb7
NN
8315# --------
8316# UNSORTED
8317# --------
1e608388 8318
1e608388 8319
4e70264f
ZW
8320# These libraries may be used by collect2.
8321# We may need a special search path to get them linked.
5213506e
RW
8322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5
8323$as_echo_n "checking for collect2 libraries... " >&6; }
8324if test "${gcc_cv_collect2_libs+set}" = set; then :
8325 $as_echo_n "(cached) " >&6
4e70264f
ZW
8326else
8327 save_LIBS="$LIBS"
7f2749d4 8328for libs in '' -lld -lmld \
4e70264f
ZW
8329 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8330 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8331do
8332 LIBS="$libs"
5213506e 8333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
8334/* end confdefs.h. */
8335
5213506e
RW
8336/* Override any GCC internal prototype to avoid an error.
8337 Use char because int might match the return type of a GCC
8338 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8339#ifdef __cplusplus
8340extern "C"
8341#endif
ba479fd2
NN
8342char ldopen ();
8343int
8344main ()
8345{
5213506e 8346return ldopen ();
ba479fd2
NN
8347 ;
8348 return 0;
8349}
8350_ACEOF
5213506e 8351if ac_fn_c_try_link "$LINENO"; then :
4e70264f 8352 gcc_cv_collect2_libs="$libs"; break
4e70264f 8353fi
5213506e
RW
8354rm -f core conftest.err conftest.$ac_objext \
8355 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8356done
8357LIBS="$save_LIBS"
8358test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8359fi
5213506e
RW
8360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_collect2_libs" >&5
8361$as_echo "$gcc_cv_collect2_libs" >&6; }
4e70264f
ZW
8362case $gcc_cv_collect2_libs in
8363 "none required") ;;
8364 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8365esac
8366
8367
7f2749d4
RK
8368# When building Ada code on Alpha, we need exc_resume which is usually in
8369# -lexc. So test for it.
8370save_LIBS="$LIBS"
8371LIBS=
5213506e
RW
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing exc_resume" >&5
8373$as_echo_n "checking for library containing exc_resume... " >&6; }
8374if test "${ac_cv_search_exc_resume+set}" = set; then :
8375 $as_echo_n "(cached) " >&6
ba479fd2
NN
8376else
8377 ac_func_search_save_LIBS=$LIBS
5213506e 8378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8379/* end confdefs.h. */
7f2749d4 8380
5213506e
RW
8381/* Override any GCC internal prototype to avoid an error.
8382 Use char because int might match the return type of a GCC
b61ff9c8 8383 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8384#ifdef __cplusplus
8385extern "C"
8386#endif
b61ff9c8
BS
8387char exc_resume ();
8388int
8389main ()
8390{
5213506e 8391return exc_resume ();
b61ff9c8
BS
8392 ;
8393 return 0;
8394}
8395_ACEOF
5213506e
RW
8396for ac_lib in '' exc; do
8397 if test -z "$ac_lib"; then
8398 ac_res="none required"
8399 else
8400 ac_res=-l$ac_lib
8401 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8402 fi
8403 if ac_fn_c_try_link "$LINENO"; then :
8404 ac_cv_search_exc_resume=$ac_res
b8ec3cc8 8405fi
5213506e
RW
8406rm -f core conftest.err conftest.$ac_objext \
8407 conftest$ac_exeext
8408 if test "${ac_cv_search_exc_resume+set}" = set; then :
8409 break
b8ec3cc8 8410fi
5213506e
RW
8411done
8412if test "${ac_cv_search_exc_resume+set}" = set; then :
8413
dd7f7a6e 8414else
5213506e
RW
8415 ac_cv_search_exc_resume=no
8416fi
8417rm conftest.$ac_ext
8418LIBS=$ac_func_search_save_LIBS
8419fi
8420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_exc_resume" >&5
8421$as_echo "$ac_cv_search_exc_resume" >&6; }
8422ac_res=$ac_cv_search_exc_resume
8423if test "$ac_res" != no; then :
8424 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e 8425
1a4b763e 8426fi
5213506e
RW
8427
8428GNAT_LIBEXC="$LIBS"
8429LIBS="$save_LIBS"
8430
8431
8432# Some systems put ldexp and frexp in libm instead of libc; assume
8433# they're both in the same place. jcf-dump needs them.
8434save_LIBS="$LIBS"
8435LIBS=
8436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5
8437$as_echo_n "checking for library containing ldexp... " >&6; }
8438if test "${ac_cv_search_ldexp+set}" = set; then :
8439 $as_echo_n "(cached) " >&6
8440else
8441 ac_func_search_save_LIBS=$LIBS
8442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b61ff9c8 8443/* end confdefs.h. */
2f41c1d6 8444
5213506e
RW
8445/* Override any GCC internal prototype to avoid an error.
8446 Use char because int might match the return type of a GCC
8447 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8448#ifdef __cplusplus
8449extern "C"
8450#endif
b61ff9c8
BS
8451char ldexp ();
8452int
8453main ()
8454{
5213506e 8455return ldexp ();
b61ff9c8
BS
8456 ;
8457 return 0;
8458}
8459_ACEOF
5213506e
RW
8460for ac_lib in '' m; do
8461 if test -z "$ac_lib"; then
8462 ac_res="none required"
8463 else
8464 ac_res=-l$ac_lib
8465 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8466 fi
8467 if ac_fn_c_try_link "$LINENO"; then :
8468 ac_cv_search_ldexp=$ac_res
b61ff9c8 8469fi
5213506e
RW
8470rm -f core conftest.err conftest.$ac_objext \
8471 conftest$ac_exeext
8472 if test "${ac_cv_search_ldexp+set}" = set; then :
8473 break
8474fi
8475done
8476if test "${ac_cv_search_ldexp+set}" = set; then :
8477
8478else
8479 ac_cv_search_ldexp=no
dd7f7a6e 8480fi
5213506e 8481rm conftest.$ac_ext
dd7f7a6e
EC
8482LIBS=$ac_func_search_save_LIBS
8483fi
5213506e
RW
8484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5
8485$as_echo "$ac_cv_search_ldexp" >&6; }
8486ac_res=$ac_cv_search_ldexp
8487if test "$ac_res" != no; then :
8488 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
8489
8490fi
8491
8492LDEXP_LIB="$LIBS"
8493LIBS="$save_LIBS"
8494
8495
8496# Use <inttypes.h> only if it exists,
8497# doesn't clash with <sys/types.h>, and declares intmax_t.
5213506e
RW
8498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8499$as_echo_n "checking for inttypes.h... " >&6; }
8500if test "${gcc_cv_header_inttypes_h+set}" = set; then :
8501 $as_echo_n "(cached) " >&6
dd7f7a6e 8502else
5213506e 8503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd7f7a6e
EC
8504/* end confdefs.h. */
8505#include <sys/types.h>
8506#include <inttypes.h>
8507int
8508main ()
8509{
8510intmax_t i = -1;
8511 ;
8512 return 0;
8513}
8514_ACEOF
5213506e 8515if ac_fn_c_try_compile "$LINENO"; then :
dd7f7a6e
EC
8516 gcc_cv_header_inttypes_h=yes
8517else
5213506e 8518 gcc_cv_header_inttypes_h=no
dd7f7a6e 8519fi
5213506e 8520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
8521fi
8522
5213506e
RW
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_inttypes_h" >&5
8524$as_echo "$gcc_cv_header_inttypes_h" >&6; }
dd7f7a6e
EC
8525if test $gcc_cv_header_inttypes_h = yes; then
8526
5213506e 8527$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h
dd7f7a6e 8528
0056a9b5 8529fi
956d6950 8530
c149cc37 8531
ba479fd2 8532
52a6edcc 8533for ac_func in times clock kill getrlimit setrlimit atoll atoq \
d2e506f2 8534 sysconf strsignal getrusage nl_langinfo \
0d667716
KG
8535 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
8536 clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
5213506e
RW
8537do :
8538 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8539ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8540eval as_val=\$$as_ac_var
8541 if test "x$as_val" = x""yes; then :
ba479fd2 8542 cat >>confdefs.h <<_ACEOF
5213506e 8543#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2 8544_ACEOF
956d6950 8545
956d6950
JL
8546fi
8547done
8548
6885fc87 8549
39f6c4c8 8550if test x$ac_cv_func_mbstowcs = xyes; then
5213506e
RW
8551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbstowcs works" >&5
8552$as_echo_n "checking whether mbstowcs works... " >&6; }
8553if test "${gcc_cv_func_mbstowcs_works+set}" = set; then :
8554 $as_echo_n "(cached) " >&6
39f6c4c8 8555else
5213506e 8556 if test "$cross_compiling" = yes; then :
39f6c4c8
KW
8557 gcc_cv_func_mbstowcs_works=yes
8558else
5213506e 8559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8560/* end confdefs.h. */
39f6c4c8
KW
8561#include <stdlib.h>
8562int main()
8563{
8564 mbstowcs(0, "", 0);
8565 return 0;
8566}
ba479fd2 8567_ACEOF
5213506e 8568if ac_fn_c_try_run "$LINENO"; then :
39f6c4c8
KW
8569 gcc_cv_func_mbstowcs_works=yes
8570else
5213506e 8571 gcc_cv_func_mbstowcs_works=no
39f6c4c8 8572fi
5213506e
RW
8573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8574 conftest.$ac_objext conftest.beam conftest.$ac_ext
39f6c4c8 8575fi
5213506e 8576
39f6c4c8 8577fi
5213506e
RW
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mbstowcs_works" >&5
8579$as_echo "$gcc_cv_func_mbstowcs_works" >&6; }
63cf211a 8580 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2 8581
5213506e 8582$as_echo "#define HAVE_WORKING_MBSTOWCS 1" >>confdefs.h
39f6c4c8
KW
8583
8584 fi
8585fi
8586
5213506e
RW
8587ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
8588if test "x$ac_cv_type_ssize_t" = x""yes; then :
6e3f3080 8589
8b4fc07a 8590else
ba479fd2 8591
8b4fc07a 8592cat >>confdefs.h <<_ACEOF
f12bc141 8593#define ssize_t int
ba479fd2 8594_ACEOF
f12bc141
ZW
8595
8596fi
8597
5213506e
RW
8598ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
8599if test "x$ac_cv_type_caddr_t" = x""yes; then :
bba09b5a 8600
bba09b5a
AT
8601else
8602
8603cat >>confdefs.h <<_ACEOF
8604#define caddr_t char *
8605_ACEOF
8606
8607fi
8608
0b9d02c6 8609
3b0727a0 8610
5213506e
RW
8611ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h"
8612if test "x$ac_cv_header_sys_mman_h" = x""yes; then :
3b0727a0
MR
8613 gcc_header_sys_mman_h=yes
8614else
8615 gcc_header_sys_mman_h=no
8616fi
5213506e
RW
8617
8618ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
8619if test "x$ac_cv_func_mmap" = x""yes; then :
3b0727a0
MR
8620 gcc_func_mmap=yes
8621else
8622 gcc_func_mmap=no
8623fi
8624
8625if test "$gcc_header_sys_mman_h" != yes \
8626 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
8627 gcc_cv_func_mmap_file=no
8628 gcc_cv_func_mmap_dev_zero=no
8629 gcc_cv_func_mmap_anon=no
8630else
5213506e
RW
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read-only mmap of a plain file works" >&5
8632$as_echo_n "checking whether read-only mmap of a plain file works... " >&6; }
8633if test "${gcc_cv_func_mmap_file+set}" = set; then :
8634 $as_echo_n "(cached) " >&6
1072ec3f 8635else
ba479fd2 8636 # Add a system to this blacklist if
1072ec3f
ZW
8637 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
8638 # memory area containing the same data that you'd get if you applied
8639 # read() to the same fd. The only system known to have a problem here
8640 # is VMS, where text files have record structure.
8641 case "$host_os" in
ba479fd2 8642 vms* | ultrix*)
1072ec3f
ZW
8643 gcc_cv_func_mmap_file=no ;;
8644 *)
8645 gcc_cv_func_mmap_file=yes;;
8646 esac
8647fi
5213506e
RW
8648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_file" >&5
8649$as_echo "$gcc_cv_func_mmap_file" >&6; }
8650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap from /dev/zero works" >&5
8651$as_echo_n "checking whether mmap from /dev/zero works... " >&6; }
8652if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then :
8653 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8654else
8655 # Add a system to this blacklist if it has mmap() but /dev/zero
8656 # does not exist, or if mmapping /dev/zero does not give anonymous
8657 # zeroed pages with both the following properties:
8658 # 1. If you map N consecutive pages in with one call, and then
8659 # unmap any subset of those pages, the pages that were not
8660 # explicitly unmapped remain accessible.
8661 # 2. If you map two adjacent blocks of memory and then unmap them
8662 # both at once, they must both go away.
8663 # Systems known to be in this category are Windows (all variants),
8664 # VMS, and Darwin.
8665 case "$host_os" in
2ce240d3 8666 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
8667 gcc_cv_func_mmap_dev_zero=no ;;
8668 *)
8669 gcc_cv_func_mmap_dev_zero=yes;;
8670 esac
8671fi
5213506e
RW
8672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_dev_zero" >&5
8673$as_echo "$gcc_cv_func_mmap_dev_zero" >&6; }
1072ec3f
ZW
8674
8675 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
5213506e
RW
8676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5
8677$as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; }
8678if test "${gcc_cv_decl_map_anon+set}" = set; then :
8679 $as_echo_n "(cached) " >&6
ba479fd2 8680else
5213506e 8681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8682/* end confdefs.h. */
1072ec3f
ZW
8683#include <sys/types.h>
8684#include <sys/mman.h>
8685#include <unistd.h>
8686
8687#ifndef MAP_ANONYMOUS
8688#define MAP_ANONYMOUS MAP_ANON
8689#endif
8690
ba479fd2
NN
8691int
8692main ()
8693{
1072ec3f 8694int n = MAP_ANONYMOUS;
ba479fd2
NN
8695 ;
8696 return 0;
8697}
8698_ACEOF
5213506e 8699if ac_fn_c_try_compile "$LINENO"; then :
1072ec3f
ZW
8700 gcc_cv_decl_map_anon=yes
8701else
5213506e 8702 gcc_cv_decl_map_anon=no
1072ec3f 8703fi
5213506e 8704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 8705fi
5213506e
RW
8706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_map_anon" >&5
8707$as_echo "$gcc_cv_decl_map_anon" >&6; }
1072ec3f
ZW
8708
8709 if test $gcc_cv_decl_map_anon = no; then
8710 gcc_cv_func_mmap_anon=no
8711 else
5213506e
RW
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5
8713$as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; }
8714if test "${gcc_cv_func_mmap_anon+set}" = set; then :
8715 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8716else
8717 # Add a system to this blacklist if it has mmap() and MAP_ANON or
8718 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
8719 # doesn't give anonymous zeroed pages with the same properties listed
8720 # above for use of /dev/zero.
8721 # Systems known to be in this category are Windows, VMS, and SCO Unix.
8722 case "$host_os" in
8723 vms* | cygwin* | pe | mingw* | sco* | udk* )
8724 gcc_cv_func_mmap_anon=no ;;
8725 *)
8726 gcc_cv_func_mmap_anon=yes;;
8727 esac
8728fi
5213506e
RW
8729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_anon" >&5
8730$as_echo "$gcc_cv_func_mmap_anon" >&6; }
1072ec3f
ZW
8731 fi
8732fi
8733
8734if test $gcc_cv_func_mmap_file = yes; then
ba479fd2 8735
5213506e 8736$as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h
1072ec3f
ZW
8737
8738fi
8739if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2 8740
5213506e 8741$as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h
1072ec3f
ZW
8742
8743fi
8744if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2 8745
5213506e 8746$as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h
1072ec3f
ZW
8747
8748fi
8749
b27d2bd5
MK
8750
8751case "${host}" in
ee262b6f 8752*-*-*vms*)
ba479fd2 8753 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
8754 # won't work, and it isn't easily adaptable. It makes more sense to
8755 # just force it.
8756 ac_cv_func_vfork_works=yes
8757 ;;
b27d2bd5 8758esac
5213506e
RW
8759ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8760if test "x$ac_cv_type_pid_t" = x""yes; then :
6e3f3080 8761
ba479fd2
NN
8762else
8763
8764cat >>confdefs.h <<_ACEOF
c375c43b 8765#define pid_t int
ba479fd2 8766_ACEOF
c375c43b
KG
8767
8768fi
8769
5213506e
RW
8770for ac_header in vfork.h
8771do :
8772 ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h"
8773if test "x$ac_cv_header_vfork_h" = x""yes; then :
ba479fd2 8774 cat >>confdefs.h <<_ACEOF
5213506e 8775#define HAVE_VFORK_H 1
ba479fd2 8776_ACEOF
6e3f3080
NN
8777
8778fi
ba479fd2
NN
8779done
8780
ba479fd2 8781for ac_func in fork vfork
5213506e
RW
8782do :
8783 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8784ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8785eval as_val=\$$as_ac_var
8786 if test "x$as_val" = x""yes; then :
ba479fd2 8787 cat >>confdefs.h <<_ACEOF
5213506e 8788#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2
NN
8789_ACEOF
8790
c375c43b 8791fi
ba479fd2 8792done
c375c43b 8793
ba479fd2 8794if test "x$ac_cv_func_fork" = xyes; then
5213506e
RW
8795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8796$as_echo_n "checking for working fork... " >&6; }
8797if test "${ac_cv_func_fork_works+set}" = set; then :
8798 $as_echo_n "(cached) " >&6
c375c43b 8799else
5213506e 8800 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8801 ac_cv_func_fork_works=cross
8802else
5213506e
RW
8803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8804/* end confdefs.h. */
8805$ac_includes_default
8806int
8807main ()
8808{
8809
8810 /* By Ruediger Kuhlmann. */
8811 return fork () < 0;
8812
8813 ;
8814 return 0;
8815}
1a4b763e 8816_ACEOF
5213506e 8817if ac_fn_c_try_run "$LINENO"; then :
ba479fd2
NN
8818 ac_cv_func_fork_works=yes
8819else
5213506e 8820 ac_cv_func_fork_works=no
ba479fd2 8821fi
5213506e
RW
8822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8823 conftest.$ac_objext conftest.beam conftest.$ac_ext
ba479fd2 8824fi
5213506e 8825
ba479fd2 8826fi
5213506e
RW
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8828$as_echo "$ac_cv_func_fork_works" >&6; }
ba479fd2
NN
8829
8830else
8831 ac_cv_func_fork_works=$ac_cv_func_fork
8832fi
8833if test "x$ac_cv_func_fork_works" = xcross; then
8834 case $host in
8835 *-*-amigaos* | *-*-msdosdjgpp*)
8836 # Override, as these systems have only a dummy fork() stub
8837 ac_cv_func_fork_works=no
8838 ;;
8839 *)
8840 ac_cv_func_fork_works=yes
8841 ;;
8842 esac
5213506e
RW
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8844$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 8845fi
c375c43b 8846ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 8847if test "x$ac_cv_func_vfork" = xyes; then
5213506e
RW
8848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8849$as_echo_n "checking for working vfork... " >&6; }
8850if test "${ac_cv_func_vfork_works+set}" = set; then :
8851 $as_echo_n "(cached) " >&6
c375c43b 8852else
5213506e 8853 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8854 ac_cv_func_vfork_works=cross
8855else
5213506e 8856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8857/* end confdefs.h. */
c375c43b 8858/* Thanks to Paul Eggert for this test. */
5213506e 8859$ac_includes_default
ba479fd2 8860#include <sys/wait.h>
5213506e 8861#ifdef HAVE_VFORK_H
ba479fd2 8862# include <vfork.h>
c375c43b
KG
8863#endif
8864/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
8865 argument registers are propagated back to the parent. The compiler
8866 is told about this with #include <vfork.h>, but some compilers
8867 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8868 static variable whose address is put into a register that is
8869 clobbered by the vfork. */
8870static void
c375c43b
KG
8871#ifdef __cplusplus
8872sparc_address_test (int arg)
ba479fd2 8873# else
c375c43b
KG
8874sparc_address_test (arg) int arg;
8875#endif
8876{
8877 static pid_t child;
8878 if (!child) {
8879 child = vfork ();
8880 if (child < 0) {
8881 perror ("vfork");
8882 _exit(2);
8883 }
8884 if (!child) {
8885 arg = getpid();
8886 write(-1, "", 0);
8887 _exit (arg);
8888 }
8889 }
8890}
ba479fd2
NN
8891
8892int
8893main ()
8894{
c375c43b
KG
8895 pid_t parent = getpid ();
8896 pid_t child;
8897
ba479fd2 8898 sparc_address_test (0);
c375c43b
KG
8899
8900 child = vfork ();
8901
8902 if (child == 0) {
ba479fd2
NN
8903 /* Here is another test for sparc vfork register problems. This
8904 test uses lots of local variables, at least as many local
8905 variables as main has allocated so far including compiler
8906 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8907 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8908 reuse the register of parent for one of the local variables,
8909 since it will think that parent can't possibly be used any more
8910 in this routine. Assigning to the local variable will thus
8911 munge parent in the parent process. */
c375c43b
KG
8912 pid_t
8913 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8914 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8915 /* Convince the compiler that p..p7 are live; otherwise, it might
8916 use the same hardware register for all 8 local variables. */
8917 if (p != p1 || p != p2 || p != p3 || p != p4
8918 || p != p5 || p != p6 || p != p7)
8919 _exit(1);
8920
ba479fd2
NN
8921 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8922 from child file descriptors. If the child closes a descriptor
8923 before it execs or exits, this munges the parent's descriptor
8924 as well. Test for this by closing stdout in the child. */
c375c43b
KG
8925 _exit(close(fileno(stdout)) != 0);
8926 } else {
8927 int status;
8928 struct stat st;
8929
8930 while (wait(&status) != child)
8931 ;
5213506e 8932 return (
c375c43b
KG
8933 /* Was there some problem with vforking? */
8934 child < 0
8935
8936 /* Did the child fail? (This shouldn't happen.) */
8937 || status
8938
8939 /* Did the vfork/compiler bug occur? */
8940 || parent != getpid()
8941
8942 /* Did the file descriptor bug occur? */
8943 || fstat(fileno(stdout), &st) != 0
8944 );
8945 }
8946}
ba479fd2 8947_ACEOF
5213506e 8948if ac_fn_c_try_run "$LINENO"; then :
c375c43b
KG
8949 ac_cv_func_vfork_works=yes
8950else
5213506e 8951 ac_cv_func_vfork_works=no
cafe096b 8952fi
5213506e
RW
8953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8954 conftest.$ac_objext conftest.beam conftest.$ac_ext
6e3f3080 8955fi
5213506e 8956
ba479fd2 8957fi
5213506e
RW
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8959$as_echo "$ac_cv_func_vfork_works" >&6; }
c375c43b 8960
ba479fd2
NN
8961fi;
8962if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 8963 ac_cv_func_vfork_works=$ac_cv_func_vfork
5213506e
RW
8964 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8965$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
8966fi
8967
ba479fd2
NN
8968if test "x$ac_cv_func_vfork_works" = xyes; then
8969
5213506e 8970$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
ba479fd2
NN
8971
8972else
8973
5213506e 8974$as_echo "#define vfork fork" >>confdefs.h
c375c43b
KG
8975
8976fi
ba479fd2
NN
8977if test "x$ac_cv_func_fork_works" = xyes; then
8978
5213506e 8979$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
ba479fd2
NN
8980
8981fi
8982
c375c43b 8983
81bf3d9e 8984
dfb77e37
KC
8985 if test "X$prefix" = "XNONE"; then
8986 acl_final_prefix="$ac_default_prefix"
8987 else
8988 acl_final_prefix="$prefix"
8989 fi
8990 if test "X$exec_prefix" = "XNONE"; then
8991 acl_final_exec_prefix='${prefix}'
8992 else
8993 acl_final_exec_prefix="$exec_prefix"
8994 fi
8995 acl_save_prefix="$prefix"
8996 prefix="$acl_final_prefix"
8997 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8998 prefix="$acl_save_prefix"
f91abfce
TT
8999
9000
5213506e
RW
9001# Check whether --with-gnu-ld was given.
9002if test "${with_gnu_ld+set}" = set; then :
9003 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
ba479fd2 9004else
dfb77e37 9005 with_gnu_ld=no
5213506e
RW
9006fi
9007
dfb77e37
KC
9008# Prepare PATH_SEPARATOR.
9009# The user is always right.
9010if test "${PATH_SEPARATOR+set}" != set; then
9011 echo "#! /bin/sh" >conf$$.sh
9012 echo "exit 0" >>conf$$.sh
9013 chmod +x conf$$.sh
9014 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9015 PATH_SEPARATOR=';'
ba479fd2 9016 else
dfb77e37 9017 PATH_SEPARATOR=:
ba479fd2 9018 fi
dfb77e37
KC
9019 rm -f conf$$.sh
9020fi
9021ac_prog=ld
9022if test "$GCC" = yes; then
9023 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9025$as_echo_n "checking for ld used by GCC... " >&6; }
dfb77e37
KC
9026 case $host in
9027 *-*-mingw*)
9028 # gcc leaves a trailing carriage return which upsets mingw
9029 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9030 *)
9031 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9032 esac
9033 case $ac_prog in
9034 # Accept absolute paths.
9035 [\\/]* | [A-Za-z]:[\\/]*)
9036 re_direlt='/[^/][^/]*/\.\./'
9037 # Canonicalize the path of ld
9038 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9039 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9040 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9041 done
9042 test -z "$LD" && LD="$ac_prog"
9043 ;;
9044 "")
9045 # If it fails, then pretend we aren't using GCC.
9046 ac_prog=ld
9047 ;;
9048 *)
9049 # If it is relative, then search for the first ld in PATH.
9050 with_gnu_ld=unknown
9051 ;;
9052 esac
9053elif test "$with_gnu_ld" = yes; then
5213506e
RW
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9055$as_echo_n "checking for GNU ld... " >&6; }
ba479fd2 9056else
5213506e
RW
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9058$as_echo_n "checking for non-GNU ld... " >&6; }
ba479fd2 9059fi
5213506e
RW
9060if test "${acl_cv_path_LD+set}" = set; then :
9061 $as_echo_n "(cached) " >&6
ba479fd2 9062else
dfb77e37
KC
9063 if test -z "$LD"; then
9064 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9065 for ac_dir in $PATH; do
9066 test -z "$ac_dir" && ac_dir=.
9067 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9068 acl_cv_path_LD="$ac_dir/$ac_prog"
9069 # Check to see if the program is GNU ld. I'd rather use --version,
9070 # but apparently some GNU ld's only accept -v.
9071 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
9072 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9073 test "$with_gnu_ld" != no && break
9074 else
9075 test "$with_gnu_ld" != yes && break
9076 fi
dfb77e37
KC
9077 fi
9078 done
9079 IFS="$ac_save_ifs"
9080else
9081 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9082fi
9083fi
ba479fd2 9084
dfb77e37
KC
9085LD="$acl_cv_path_LD"
9086if test -n "$LD"; then
5213506e
RW
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9088$as_echo "$LD" >&6; }
dfb77e37 9089else
5213506e
RW
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
ba479fd2 9092fi
5213506e
RW
9093test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9095$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9096if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9097 $as_echo_n "(cached) " >&6
dfb77e37
KC
9098else
9099 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
9100if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9101 acl_cv_prog_gnu_ld=yes
9102else
9103 acl_cv_prog_gnu_ld=no
9104fi
dfb77e37 9105fi
5213506e
RW
9106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9107$as_echo "$acl_cv_prog_gnu_ld" >&6; }
dfb77e37
KC
9108with_gnu_ld=$acl_cv_prog_gnu_ld
9109
9110
9111
5213506e
RW
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9113$as_echo_n "checking for shared library run path origin... " >&6; }
9114if test "${acl_cv_rpath+set}" = set; then :
9115 $as_echo_n "(cached) " >&6
dfb77e37
KC
9116else
9117
9118 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9119 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9120 . ./conftest.sh
9121 rm -f ./conftest.sh
9122 acl_cv_rpath=done
ba479fd2 9123
eb158727 9124fi
5213506e
RW
9125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9126$as_echo "$acl_cv_rpath" >&6; }
dfb77e37
KC
9127 wl="$acl_cv_wl"
9128 libext="$acl_cv_libext"
9129 shlibext="$acl_cv_shlibext"
9130 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9131 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9132 hardcode_direct="$acl_cv_hardcode_direct"
9133 hardcode_minus_L="$acl_cv_hardcode_minus_L"
5213506e
RW
9134 # Check whether --enable-rpath was given.
9135if test "${enable_rpath+set}" = set; then :
9136 enableval=$enable_rpath; :
dfb77e37
KC
9137else
9138 enable_rpath=yes
5213506e
RW
9139fi
9140
8b1f719a 9141
a6ccdbab 9142
dfb77e37
KC
9143
9144
9145
9146
9147
b639c3c2
JJ
9148 use_additional=yes
9149
9150 acl_save_prefix="$prefix"
9151 prefix="$acl_final_prefix"
9152 acl_save_exec_prefix="$exec_prefix"
9153 exec_prefix="$acl_final_exec_prefix"
9154
9155 eval additional_includedir=\"$includedir\"
9156 eval additional_libdir=\"$libdir\"
9157
9158 exec_prefix="$acl_save_exec_prefix"
9159 prefix="$acl_save_prefix"
dfb77e37
KC
9160
9161
5213506e
RW
9162# Check whether --with-libiconv-prefix was given.
9163if test "${with_libiconv_prefix+set}" = set; then :
9164 withval=$with_libiconv_prefix;
8b1f719a 9165 if test "X$withval" = "Xno"; then
b639c3c2 9166 use_additional=no
8b1f719a
PB
9167 else
9168 if test "X$withval" = "X"; then
dfb77e37
KC
9169
9170 acl_save_prefix="$prefix"
9171 prefix="$acl_final_prefix"
9172 acl_save_exec_prefix="$exec_prefix"
9173 exec_prefix="$acl_final_exec_prefix"
9174
b639c3c2
JJ
9175 eval additional_includedir=\"$includedir\"
9176 eval additional_libdir=\"$libdir\"
dfb77e37
KC
9177
9178 exec_prefix="$acl_save_exec_prefix"
9179 prefix="$acl_save_prefix"
9180
8b1f719a 9181 else
b639c3c2
JJ
9182 additional_includedir="$withval/include"
9183 additional_libdir="$withval/lib"
8b1f719a
PB
9184 fi
9185 fi
9186
5213506e
RW
9187fi
9188
dfb77e37
KC
9189 LIBICONV=
9190 LTLIBICONV=
9191 INCICONV=
9192 rpathdirs=
9193 ltrpathdirs=
9194 names_already_handled=
9195 names_next_round='iconv '
9196 while test -n "$names_next_round"; do
9197 names_this_round="$names_next_round"
9198 names_next_round=
9199 for name in $names_this_round; do
9200 already_handled=
9201 for n in $names_already_handled; do
9202 if test "$n" = "$name"; then
9203 already_handled=yes
9204 break
9205 fi
9206 done
9207 if test -z "$already_handled"; then
9208 names_already_handled="$names_already_handled $name"
9209 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9210 eval value=\"\$HAVE_LIB$uppername\"
9211 if test -n "$value"; then
9212 if test "$value" = yes; then
9213 eval value=\"\$LIB$uppername\"
9214 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
9215 eval value=\"\$LTLIB$uppername\"
9216 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
9217 else
9218 :
9219 fi
9220 else
9221 found_dir=
9222 found_la=
9223 found_so=
9224 found_a=
b639c3c2
JJ
9225 if test $use_additional = yes; then
9226 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9227 found_dir="$additional_libdir"
9228 found_so="$additional_libdir/lib$name.$shlibext"
9229 if test -f "$additional_libdir/lib$name.la"; then
9230 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9231 fi
9232 else
b639c3c2
JJ
9233 if test -f "$additional_libdir/lib$name.$libext"; then
9234 found_dir="$additional_libdir"
9235 found_a="$additional_libdir/lib$name.$libext"
9236 if test -f "$additional_libdir/lib$name.la"; then
9237 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9238 fi
9239 fi
9240 fi
9241 fi
9242 if test "X$found_dir" = "X"; then
9243 for x in $LDFLAGS $LTLIBICONV; do
9244
9245 acl_save_prefix="$prefix"
9246 prefix="$acl_final_prefix"
9247 acl_save_exec_prefix="$exec_prefix"
9248 exec_prefix="$acl_final_exec_prefix"
9249 eval x=\"$x\"
9250 exec_prefix="$acl_save_exec_prefix"
9251 prefix="$acl_save_prefix"
9252
9253 case "$x" in
9254 -L*)
9255 dir=`echo "X$x" | sed -e 's/^X-L//'`
9256 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9257 found_dir="$dir"
9258 found_so="$dir/lib$name.$shlibext"
9259 if test -f "$dir/lib$name.la"; then
9260 found_la="$dir/lib$name.la"
9261 fi
9262 else
9263 if test -f "$dir/lib$name.$libext"; then
9264 found_dir="$dir"
9265 found_a="$dir/lib$name.$libext"
9266 if test -f "$dir/lib$name.la"; then
9267 found_la="$dir/lib$name.la"
9268 fi
9269 fi
9270 fi
9271 ;;
9272 esac
9273 if test "X$found_dir" != "X"; then
9274 break
9275 fi
9276 done
9277 fi
9278 if test "X$found_dir" != "X"; then
9279 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
9280 if test "X$found_so" != "X"; then
9281 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9282 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9283 else
9284 haveit=
9285 for x in $ltrpathdirs; do
9286 if test "X$x" = "X$found_dir"; then
9287 haveit=yes
9288 break
9289 fi
9290 done
9291 if test -z "$haveit"; then
9292 ltrpathdirs="$ltrpathdirs $found_dir"
9293 fi
9294 if test "$hardcode_direct" = yes; then
9295 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9296 else
9297 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9298 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9299 haveit=
9300 for x in $rpathdirs; do
9301 if test "X$x" = "X$found_dir"; then
9302 haveit=yes
9303 break
9304 fi
9305 done
9306 if test -z "$haveit"; then
9307 rpathdirs="$rpathdirs $found_dir"
9308 fi
9309 else
9310 haveit=
9311 for x in $LDFLAGS $LIBICONV; do
9312
9313 acl_save_prefix="$prefix"
9314 prefix="$acl_final_prefix"
9315 acl_save_exec_prefix="$exec_prefix"
9316 exec_prefix="$acl_final_exec_prefix"
9317 eval x=\"$x\"
9318 exec_prefix="$acl_save_exec_prefix"
9319 prefix="$acl_save_prefix"
9320
9321 if test "X$x" = "X-L$found_dir"; then
9322 haveit=yes
9323 break
9324 fi
9325 done
9326 if test -z "$haveit"; then
9327 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
9328 fi
9329 if test "$hardcode_minus_L" != no; then
9330 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9331 else
9332 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9333 fi
9334 fi
9335 fi
9336 fi
9337 else
9338 if test "X$found_a" != "X"; then
9339 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
9340 else
9341 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
9342 fi
9343 fi
9344 additional_includedir=
9345 case "$found_dir" in
9346 */lib | */lib/)
9347 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9348 additional_includedir="$basedir/include"
9349 ;;
9350 esac
9351 if test "X$additional_includedir" != "X"; then
9352 if test "X$additional_includedir" != "X/usr/include"; then
9353 haveit=
9354 if test "X$additional_includedir" = "X/usr/local/include"; then
9355 if test -n "$GCC"; then
9356 case $host_os in
18fc9bd4 9357 linux*) haveit=yes;;
dfb77e37
KC
9358 esac
9359 fi
9360 fi
9361 if test -z "$haveit"; then
9362 for x in $CPPFLAGS $INCICONV; do
9363
9364 acl_save_prefix="$prefix"
9365 prefix="$acl_final_prefix"
9366 acl_save_exec_prefix="$exec_prefix"
9367 exec_prefix="$acl_final_exec_prefix"
9368 eval x=\"$x\"
9369 exec_prefix="$acl_save_exec_prefix"
9370 prefix="$acl_save_prefix"
9371
9372 if test "X$x" = "X-I$additional_includedir"; then
9373 haveit=yes
9374 break
9375 fi
9376 done
9377 if test -z "$haveit"; then
9378 if test -d "$additional_includedir"; then
9379 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
9380 fi
9381 fi
9382 fi
9383 fi
9384 fi
9385 if test -n "$found_la"; then
9386 save_libdir="$libdir"
9387 case "$found_la" in
9388 */* | *\\*) . "$found_la" ;;
9389 *) . "./$found_la" ;;
9390 esac
9391 libdir="$save_libdir"
9392 for dep in $dependency_libs; do
9393 case "$dep" in
9394 -L*)
9395 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9396 if test "X$additional_libdir" != "X/usr/lib"; then
9397 haveit=
9398 if test "X$additional_libdir" = "X/usr/local/lib"; then
9399 if test -n "$GCC"; then
9400 case $host_os in
18fc9bd4 9401 linux*) haveit=yes;;
dfb77e37
KC
9402 esac
9403 fi
9404 fi
9405 if test -z "$haveit"; then
9406 haveit=
9407 for x in $LDFLAGS $LIBICONV; do
9408
9409 acl_save_prefix="$prefix"
9410 prefix="$acl_final_prefix"
9411 acl_save_exec_prefix="$exec_prefix"
9412 exec_prefix="$acl_final_exec_prefix"
9413 eval x=\"$x\"
9414 exec_prefix="$acl_save_exec_prefix"
9415 prefix="$acl_save_prefix"
9416
9417 if test "X$x" = "X-L$additional_libdir"; then
9418 haveit=yes
9419 break
9420 fi
9421 done
9422 if test -z "$haveit"; then
9423 if test -d "$additional_libdir"; then
9424 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
9425 fi
9426 fi
9427 haveit=
9428 for x in $LDFLAGS $LTLIBICONV; do
9429
9430 acl_save_prefix="$prefix"
9431 prefix="$acl_final_prefix"
9432 acl_save_exec_prefix="$exec_prefix"
9433 exec_prefix="$acl_final_exec_prefix"
9434 eval x=\"$x\"
9435 exec_prefix="$acl_save_exec_prefix"
9436 prefix="$acl_save_prefix"
9437
9438 if test "X$x" = "X-L$additional_libdir"; then
9439 haveit=yes
9440 break
9441 fi
9442 done
9443 if test -z "$haveit"; then
9444 if test -d "$additional_libdir"; then
9445 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
9446 fi
9447 fi
9448 fi
9449 fi
9450 ;;
9451 -R*)
9452 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9453 if test "$enable_rpath" != no; then
9454 haveit=
9455 for x in $rpathdirs; do
9456 if test "X$x" = "X$dir"; then
9457 haveit=yes
9458 break
9459 fi
9460 done
9461 if test -z "$haveit"; then
9462 rpathdirs="$rpathdirs $dir"
9463 fi
9464 haveit=
9465 for x in $ltrpathdirs; do
9466 if test "X$x" = "X$dir"; then
9467 haveit=yes
9468 break
9469 fi
9470 done
9471 if test -z "$haveit"; then
9472 ltrpathdirs="$ltrpathdirs $dir"
9473 fi
9474 fi
9475 ;;
9476 -l*)
9477 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9478 ;;
9479 *.la)
9480 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9481 ;;
9482 *)
9483 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
9484 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
9485 ;;
9486 esac
9487 done
9488 fi
9489 else
9490 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9491 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
9492 fi
9493 fi
9494 fi
9495 done
9496 done
9497 if test "X$rpathdirs" != "X"; then
9498 if test -n "$hardcode_libdir_separator"; then
9499 alldirs=
9500 for found_dir in $rpathdirs; do
9501 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9502 done
9503 acl_save_libdir="$libdir"
9504 libdir="$alldirs"
9505 eval flag=\"$hardcode_libdir_flag_spec\"
9506 libdir="$acl_save_libdir"
9507 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9508 else
9509 for found_dir in $rpathdirs; do
9510 acl_save_libdir="$libdir"
9511 libdir="$found_dir"
9512 eval flag=\"$hardcode_libdir_flag_spec\"
9513 libdir="$acl_save_libdir"
9514 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9515 done
9516 fi
9517 fi
9518 if test "X$ltrpathdirs" != "X"; then
9519 for found_dir in $ltrpathdirs; do
9520 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
9521 done
9522 fi
9523
9524
9525
9526
9527
9528
9529
9530 am_save_CPPFLAGS="$CPPFLAGS"
9531
9532 for element in $INCICONV; do
9533 haveit=
9534 for x in $CPPFLAGS; do
9535
9536 acl_save_prefix="$prefix"
9537 prefix="$acl_final_prefix"
9538 acl_save_exec_prefix="$exec_prefix"
9539 exec_prefix="$acl_final_exec_prefix"
9540 eval x=\"$x\"
9541 exec_prefix="$acl_save_exec_prefix"
9542 prefix="$acl_save_prefix"
9543
9544 if test "X$x" = "X$element"; then
9545 haveit=yes
9546 break
9547 fi
9548 done
9549 if test -z "$haveit"; then
9550 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9551 fi
9552 done
eb158727
ZW
9553
9554
5213506e
RW
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9556$as_echo_n "checking for iconv... " >&6; }
9557if test "${am_cv_func_iconv+set}" = set; then :
9558 $as_echo_n "(cached) " >&6
f91abfce 9559else
ba479fd2 9560
f91abfce
TT
9561 am_cv_func_iconv="no, consider installing GNU libiconv"
9562 am_cv_lib_iconv=no
5213506e 9563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9564/* end confdefs.h. */
f91abfce
TT
9565#include <stdlib.h>
9566#include <iconv.h>
ba479fd2
NN
9567int
9568main ()
9569{
f91abfce
TT
9570iconv_t cd = iconv_open("","");
9571 iconv(cd,NULL,NULL,NULL,NULL);
9572 iconv_close(cd);
ba479fd2
NN
9573 ;
9574 return 0;
9575}
9576_ACEOF
5213506e 9577if ac_fn_c_try_link "$LINENO"; then :
f91abfce 9578 am_cv_func_iconv=yes
f91abfce 9579fi
5213506e
RW
9580rm -f core conftest.err conftest.$ac_objext \
9581 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9582 if test "$am_cv_func_iconv" != yes; then
9583 am_save_LIBS="$LIBS"
dfb77e37 9584 LIBS="$LIBS $LIBICONV"
5213506e 9585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9586/* end confdefs.h. */
f91abfce
TT
9587#include <stdlib.h>
9588#include <iconv.h>
ba479fd2
NN
9589int
9590main ()
9591{
f91abfce
TT
9592iconv_t cd = iconv_open("","");
9593 iconv(cd,NULL,NULL,NULL,NULL);
9594 iconv_close(cd);
ba479fd2
NN
9595 ;
9596 return 0;
9597}
9598_ACEOF
5213506e 9599if ac_fn_c_try_link "$LINENO"; then :
f91abfce
TT
9600 am_cv_lib_iconv=yes
9601 am_cv_func_iconv=yes
f91abfce 9602fi
5213506e
RW
9603rm -f core conftest.err conftest.$ac_objext \
9604 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9605 LIBS="$am_save_LIBS"
9606 fi
6e3f3080 9607
ba479fd2 9608fi
5213506e
RW
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9610$as_echo "$am_cv_func_iconv" >&6; }
63cf211a 9611 if test "$am_cv_func_iconv" = yes; then
ba479fd2 9612
5213506e 9613$as_echo "#define HAVE_ICONV 1" >>confdefs.h
f91abfce 9614
dfb77e37
KC
9615 fi
9616 if test "$am_cv_lib_iconv" = yes; then
5213506e
RW
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
9618$as_echo_n "checking how to link with libiconv... " >&6; }
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
9620$as_echo "$LIBICONV" >&6; }
dfb77e37
KC
9621 else
9622 CPPFLAGS="$am_save_CPPFLAGS"
9623 LIBICONV=
9624 LTLIBICONV=
9625 fi
9626
9627
9628
9629 if test "$am_cv_func_iconv" = yes; then
5213506e
RW
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9631$as_echo_n "checking for iconv declaration... " >&6; }
9632 if test "${am_cv_proto_iconv+set}" = set; then :
9633 $as_echo_n "(cached) " >&6
f91abfce 9634else
ba479fd2 9635
5213506e 9636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9637/* end confdefs.h. */
f91abfce
TT
9638
9639#include <stdlib.h>
9640#include <iconv.h>
9641extern
9642#ifdef __cplusplus
9643"C"
9644#endif
9645#if defined(__STDC__) || defined(__cplusplus)
9646size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9647#else
9648size_t iconv();
9649#endif
9650
ba479fd2
NN
9651int
9652main ()
9653{
f91abfce 9654
ba479fd2
NN
9655 ;
9656 return 0;
9657}
9658_ACEOF
5213506e 9659if ac_fn_c_try_compile "$LINENO"; then :
f91abfce
TT
9660 am_cv_proto_iconv_arg1=""
9661else
5213506e 9662 am_cv_proto_iconv_arg1="const"
f91abfce 9663fi
5213506e 9664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
9665 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);"
9666fi
9667
9668 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5213506e 9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
ba479fd2 9670 }$am_cv_proto_iconv" >&5
5213506e
RW
9671$as_echo "${ac_t:-
9672 }$am_cv_proto_iconv" >&6; }
ba479fd2
NN
9673
9674cat >>confdefs.h <<_ACEOF
f91abfce 9675#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 9676_ACEOF
f91abfce
TT
9677
9678 fi
f91abfce 9679
56694dd9
ZW
9680# Until we have in-tree GNU iconv:
9681LIBICONV_DEP=
9682
9683
18fc9bd4 9684
5213506e
RW
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9686$as_echo_n "checking for LC_MESSAGES... " >&6; }
9687if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9688 $as_echo_n "(cached) " >&6
18fc9bd4 9689else
5213506e 9690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4
RG
9691/* end confdefs.h. */
9692#include <locale.h>
9693int
9694main ()
9695{
9696return LC_MESSAGES
9697 ;
9698 return 0;
9699}
9700_ACEOF
5213506e 9701if ac_fn_c_try_link "$LINENO"; then :
18fc9bd4
RG
9702 am_cv_val_LC_MESSAGES=yes
9703else
5213506e 9704 am_cv_val_LC_MESSAGES=no
18fc9bd4 9705fi
5213506e
RW
9706rm -f core conftest.err conftest.$ac_objext \
9707 conftest$ac_exeext conftest.$ac_ext
18fc9bd4 9708fi
5213506e
RW
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9710$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
18fc9bd4
RG
9711 if test $am_cv_val_LC_MESSAGES = yes; then
9712
5213506e 9713$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
18fc9bd4
RG
9714
9715 fi
9716
f91abfce 9717
a03ea89b 9718
5213506e
RW
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9720$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9721if test "${am_cv_langinfo_codeset+set}" = set; then :
9722 $as_echo_n "(cached) " >&6
a03ea89b 9723else
5213506e 9724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a03ea89b
BM
9725/* end confdefs.h. */
9726#include <langinfo.h>
9727int
9728main ()
9729{
9730char* cs = nl_langinfo(CODESET);
9731 ;
9732 return 0;
9733}
9734_ACEOF
5213506e 9735if ac_fn_c_try_link "$LINENO"; then :
a03ea89b
BM
9736 am_cv_langinfo_codeset=yes
9737else
5213506e 9738 am_cv_langinfo_codeset=no
a03ea89b 9739fi
5213506e
RW
9740rm -f core conftest.err conftest.$ac_objext \
9741 conftest$ac_exeext conftest.$ac_ext
a03ea89b
BM
9742
9743fi
5213506e
RW
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9745$as_echo "$am_cv_langinfo_codeset" >&6; }
a03ea89b
BM
9746 if test $am_cv_langinfo_codeset = yes; then
9747
5213506e 9748$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a03ea89b
BM
9749
9750 fi
9751
9752
86cf1cbd
KG
9753# We will need to find libiberty.h and ansidecl.h
9754saved_CFLAGS="$CFLAGS"
9755CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ed5b9f96
GK
9756for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
9757 strsignal strstr strverscmp \
9758 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 9759 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 9760do
5213506e
RW
9761 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9763$as_echo_n "checking whether $ac_func is declared... " >&6; }
9764if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9765 $as_echo_n "(cached) " >&6
9766else
9767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9768/* end confdefs.h. */
7afe8c41
KG
9769#undef $ac_tr_decl
9770#define $ac_tr_decl 1
ba479fd2 9771
d02af173 9772#include "ansidecl.h"
86cf1cbd 9773#include "system.h"
f31e826b 9774
ba479fd2
NN
9775int
9776main ()
9777{
86cf1cbd
KG
9778#ifndef $ac_func
9779char *(*pfn) = (char *(*)) $ac_func ;
9780#endif
ba479fd2 9781 ;
5213506e
RW
9782 return 0;
9783}
9784_ACEOF
9785if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9786 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9787else
5213506e 9788 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9789fi
5213506e 9790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9791fi
9792
f31e826b 9793if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9795$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9796#define $ac_tr_decl 1
ba479fd2
NN
9797_ACEOF
9798
81bf3d9e 9799else
5213506e
RW
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9802#define $ac_tr_decl 0
ba479fd2
NN
9803_ACEOF
9804
81bf3d9e
RH
9805fi
9806
9807done
ba479fd2 9808
ba479fd2 9809
81bf3d9e
RH
9810for ac_func in getrlimit setrlimit getrusage
9811do
5213506e
RW
9812 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9814$as_echo_n "checking whether $ac_func is declared... " >&6; }
9815if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9816 $as_echo_n "(cached) " >&6
9817else
9818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9819/* end confdefs.h. */
7afe8c41
KG
9820#undef $ac_tr_decl
9821#define $ac_tr_decl 1
ba479fd2 9822
d02af173 9823#include "ansidecl.h"
86cf1cbd 9824#include "system.h"
81bf3d9e
RH
9825#ifdef HAVE_SYS_RESOURCE_H
9826#include <sys/resource.h>
9827#endif
9828
f31e826b 9829
ba479fd2
NN
9830int
9831main ()
9832{
86cf1cbd
KG
9833#ifndef $ac_func
9834char *(*pfn) = (char *(*)) $ac_func ;
9835#endif
ba479fd2
NN
9836 ;
9837 return 0;
9838}
9839_ACEOF
5213506e 9840if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9841 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9842else
5213506e 9843 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9844fi
5213506e 9845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9846fi
9847
f31e826b 9848if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9850$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9851#define $ac_tr_decl 1
ba479fd2
NN
9852_ACEOF
9853
81bf3d9e 9854else
5213506e
RW
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9856$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9857#define $ac_tr_decl 0
ba479fd2
NN
9858_ACEOF
9859
81bf3d9e
RH
9860fi
9861
9862done
86cf1cbd 9863
81bf3d9e 9864
5213506e 9865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9866/* end confdefs.h. */
b2522d2b
HPN
9867
9868#include "ansidecl.h"
9869#include "system.h"
9870#ifdef HAVE_SYS_RESOURCE_H
9871#include <sys/resource.h>
9872#endif
9873
ba479fd2
NN
9874int
9875main ()
9876{
b2522d2b 9877rlim_t l = 0;
ba479fd2
NN
9878 ;
9879 return 0;
9880}
9881_ACEOF
5213506e 9882if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 9883
5213506e 9884else
ba479fd2 9885
5213506e 9886$as_echo "#define rlim_t long" >>confdefs.h
b2522d2b
HPN
9887
9888fi
5213506e 9889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 9890
2102b2fe
RS
9891# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
9892# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
9893# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
9894# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
351df804 9895for ac_func in ldgetname
c1800ec8 9896do
5213506e
RW
9897 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9899$as_echo_n "checking whether $ac_func is declared... " >&6; }
9900if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9901 $as_echo_n "(cached) " >&6
9902else
9903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9904/* end confdefs.h. */
c1800ec8
ZW
9905#undef $ac_tr_decl
9906#define $ac_tr_decl 1
ba479fd2 9907
351df804
KG
9908#include "ansidecl.h"
9909#include "system.h"
9910#ifdef HAVE_LDFCN_H
2102b2fe
RS
9911#undef FREAD
9912#undef FWRITE
351df804
KG
9913#include <ldfcn.h>
9914#endif
9915
9916
ba479fd2
NN
9917int
9918main ()
9919{
351df804
KG
9920#ifndef $ac_func
9921char *(*pfn) = (char *(*)) $ac_func ;
9922#endif
ba479fd2
NN
9923 ;
9924 return 0;
9925}
9926_ACEOF
5213506e 9927if ac_fn_c_try_compile "$LINENO"; then :
351df804
KG
9928 eval "gcc_cv_have_decl_$ac_func=yes"
9929else
5213506e 9930 eval "gcc_cv_have_decl_$ac_func=no"
351df804 9931fi
5213506e 9932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
9933fi
9934
9935if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9937$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9938#define $ac_tr_decl 1
ba479fd2
NN
9939_ACEOF
9940
351df804 9941else
5213506e
RW
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9944#define $ac_tr_decl 0
ba479fd2
NN
9945_ACEOF
9946
351df804
KG
9947fi
9948
9949done
ba479fd2 9950
351df804 9951
351df804
KG
9952for ac_func in times
9953do
5213506e
RW
9954 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9956$as_echo_n "checking whether $ac_func is declared... " >&6; }
9957if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9958 $as_echo_n "(cached) " >&6
9959else
9960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9961/* end confdefs.h. */
351df804
KG
9962#undef $ac_tr_decl
9963#define $ac_tr_decl 1
ba479fd2 9964
c1800ec8
ZW
9965#include "ansidecl.h"
9966#include "system.h"
9967#ifdef HAVE_SYS_TIMES_H
9968#include <sys/times.h>
9969#endif
9970
9971
ba479fd2
NN
9972int
9973main ()
9974{
c1800ec8
ZW
9975#ifndef $ac_func
9976char *(*pfn) = (char *(*)) $ac_func ;
9977#endif
ba479fd2
NN
9978 ;
9979 return 0;
9980}
9981_ACEOF
5213506e 9982if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6
PB
9983 eval "gcc_cv_have_decl_$ac_func=yes"
9984else
5213506e 9985 eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 9986fi
5213506e 9987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
9988fi
9989
9990if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9992$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9993#define $ac_tr_decl 1
ba479fd2
NN
9994_ACEOF
9995
c1800ec8 9996else
5213506e
RW
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9998$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9999#define $ac_tr_decl 0
ba479fd2
NN
10000_ACEOF
10001
c1800ec8
ZW
10002fi
10003
10004done
c1800ec8
ZW
10005
10006
4f6d8cc8
GK
10007for ac_func in sigaltstack
10008do
5213506e
RW
10009 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
10011$as_echo_n "checking whether $ac_func is declared... " >&6; }
10012if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
10013 $as_echo_n "(cached) " >&6
10014else
10015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4f6d8cc8
GK
10016/* end confdefs.h. */
10017#undef $ac_tr_decl
10018#define $ac_tr_decl 1
10019
10020#include "ansidecl.h"
10021#include "system.h"
10022#include <signal.h>
10023
10024
10025int
10026main ()
10027{
10028#ifndef $ac_func
10029char *(*pfn) = (char *(*)) $ac_func ;
10030#endif
10031 ;
10032 return 0;
10033}
10034_ACEOF
5213506e 10035if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a
PB
10036 eval "gcc_cv_have_decl_$ac_func=yes"
10037else
5213506e 10038 eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 10039fi
5213506e 10040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
10041fi
10042
10043if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10045$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
10046#define $ac_tr_decl 1
10047_ACEOF
10048
10049else
5213506e
RW
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10051$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
10052#define $ac_tr_decl 0
10053_ACEOF
10054
10055fi
10056
10057done
10058
10059
c1800ec8 10060# More time-related stuff.
5213506e
RW
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5
10062$as_echo_n "checking for struct tms... " >&6; }
10063if test "${ac_cv_struct_tms+set}" = set; then :
10064 $as_echo_n "(cached) " >&6
ba479fd2
NN
10065else
10066
5213506e 10067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10068/* end confdefs.h. */
c1800ec8
ZW
10069
10070#include "ansidecl.h"
10071#include "system.h"
10072#ifdef HAVE_SYS_TIMES_H
10073#include <sys/times.h>
10074#endif
10075
ba479fd2
NN
10076int
10077main ()
10078{
c1800ec8 10079struct tms tms;
ba479fd2
NN
10080 ;
10081 return 0;
10082}
10083_ACEOF
5213506e 10084if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10085 ac_cv_struct_tms=yes
10086else
5213506e 10087 ac_cv_struct_tms=no
c1800ec8 10088fi
5213506e 10089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10090fi
5213506e
RW
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tms" >&5
10092$as_echo "$ac_cv_struct_tms" >&6; }
63cf211a 10093if test $ac_cv_struct_tms = yes; then
ba479fd2 10094
5213506e 10095$as_echo "#define HAVE_STRUCT_TMS 1" >>confdefs.h
c1800ec8
ZW
10096
10097fi
10098
10099# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
10100# revisit after autoconf 2.50.
5213506e
RW
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
10102$as_echo_n "checking for clock_t... " >&6; }
10103if test "${gcc_cv_type_clock_t+set}" = set; then :
10104 $as_echo_n "(cached) " >&6
ba479fd2
NN
10105else
10106
5213506e 10107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10108/* end confdefs.h. */
c1800ec8
ZW
10109
10110#include "ansidecl.h"
10111#include "system.h"
10112
ba479fd2
NN
10113int
10114main ()
10115{
c1800ec8 10116clock_t x;
ba479fd2
NN
10117 ;
10118 return 0;
10119}
10120_ACEOF
5213506e 10121if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10122 gcc_cv_type_clock_t=yes
10123else
5213506e 10124 gcc_cv_type_clock_t=no
c1800ec8 10125fi
5213506e 10126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10127fi
5213506e
RW
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_type_clock_t" >&5
10129$as_echo "$gcc_cv_type_clock_t" >&6; }
63cf211a 10130if test $gcc_cv_type_clock_t = yes; then
ba479fd2 10131
5213506e 10132$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
c1800ec8
ZW
10133
10134fi
10135
eb70d86d
AS
10136# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
10137CFLAGS="$saved_CFLAGS"
10138
5213506e
RW
10139# Check whether --enable-initfini-array was given.
10140if test "${enable_initfini_array+set}" = set; then :
10141 enableval=$enable_initfini_array;
07cf4226 10142else
ba479fd2 10143
5213506e
RW
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5
10145$as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; }
10146if test "${gcc_cv_initfini_array+set}" = set; then :
10147 $as_echo_n "(cached) " >&6
07cf4226 10148else
5213506e 10149 if test "$cross_compiling" = yes; then :
918c4fe4 10150 gcc_cv_initfini_array=no
eb70d86d 10151else
5213506e 10152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10153/* end confdefs.h. */
eb70d86d 10154
07cf4226
DM
10155static int x = -1;
10156int main (void) { return x; }
10157int foo (void) { x = 0; }
10158int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2 10159_ACEOF
5213506e 10160if ac_fn_c_try_run "$LINENO"; then :
918c4fe4 10161 gcc_cv_initfini_array=yes
eb70d86d 10162else
5213506e 10163 gcc_cv_initfini_array=no
eb70d86d 10164fi
5213506e
RW
10165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10166 conftest.$ac_objext conftest.beam conftest.$ac_ext
eb70d86d 10167fi
5213506e 10168
07cf4226 10169fi
5213506e
RW
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5
10171$as_echo "$gcc_cv_initfini_array" >&6; }
eb70d86d 10172 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 10173
5213506e
RW
10174fi
10175
63cf211a 10176if test $enable_initfini_array = yes; then
ba479fd2 10177
5213506e 10178$as_echo "#define HAVE_INITFINI_ARRAY 1" >>confdefs.h
07cf4226 10179
eb70d86d 10180fi
81bf3d9e 10181
ba479fd2 10182# mkdir takes a single argument on some systems.
5213506e
RW
10183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if mkdir takes one argument" >&5
10184$as_echo_n "checking if mkdir takes one argument... " >&6; }
10185if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then :
10186 $as_echo_n "(cached) " >&6
75923b2f 10187else
5213506e 10188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10189/* end confdefs.h. */
75923b2f
MK
10190
10191#include <sys/types.h>
10192#ifdef HAVE_SYS_STAT_H
10193# include <sys/stat.h>
10194#endif
10195#ifdef HAVE_UNISTD_H
10196# include <unistd.h>
10197#endif
10198#ifdef HAVE_DIRECT_H
10199# include <direct.h>
10200#endif
ba479fd2
NN
10201int
10202main ()
10203{
75923b2f 10204mkdir ("foo", 0);
ba479fd2
NN
10205 ;
10206 return 0;
10207}
10208_ACEOF
5213506e 10209if ac_fn_c_try_compile "$LINENO"; then :
75923b2f
MK
10210 gcc_cv_mkdir_takes_one_arg=no
10211else
5213506e 10212 gcc_cv_mkdir_takes_one_arg=yes
75923b2f 10213fi
5213506e 10214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 10215fi
5213506e
RW
10216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mkdir_takes_one_arg" >&5
10217$as_echo "$gcc_cv_mkdir_takes_one_arg" >&6; }
63cf211a 10218if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2 10219
5213506e 10220$as_echo "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h
75923b2f
MK
10221
10222fi
10223
10224
861bb6c1
JL
10225# File extensions
10226manext='.1'
10227objext='.o'
10228
10229
10230
4977bab6 10231# With Setjmp/Longjmp based exception handling.
5213506e
RW
10232# Check whether --enable-sjlj-exceptions was given.
10233if test "${enable_sjlj_exceptions+set}" = set; then :
10234 enableval=$enable_sjlj_exceptions; case $target in
399fe3e1
JDA
10235 *-*-hpux10*)
10236 if test $enableval != yes; then
5213506e
RW
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
10238$as_echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
399fe3e1
JDA
10239 enableval=yes
10240 fi
10241 ;;
10242esac
10243force_sjlj_exceptions=yes
10244else
10245 case $target in
10246 *-*-hpux10*)
10247 force_sjlj_exceptions=yes
10248 enableval=yes
10249 ;;
10250 *)
10251 force_sjlj_exceptions=no
10252 ;;
10253esac
5213506e
RW
10254fi
10255
399fe3e1 10256if test $force_sjlj_exceptions = yes; then
b61ff9c8 10257 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 10258
ba479fd2
NN
10259cat >>confdefs.h <<_ACEOF
10260#define CONFIG_SJLJ_EXCEPTIONS $sjlj
10261_ACEOF
4977bab6 10262
399fe3e1 10263fi
4977bab6 10264
443728bb
L
10265# For platforms with the unwind ABI which includes an unwind library,
10266# libunwind, we can choose to use the system libunwind.
e61c76c9
SE
10267# config.gcc also contains tests of with_system_libunwind.
10268
4977bab6 10269
5213506e
RW
10270# Check whether --with-system-libunwind was given.
10271if test "${with_system_libunwind+set}" = set; then :
10272 withval=$with_system_libunwind;
10273fi
4977bab6 10274
e61c76c9
SE
10275 # If system-libunwind was not specifically set, pick a default setting.
10276 if test x$with_system_libunwind = x; then
10277 case ${target} in
10278 ia64-*-hpux*) with_system_libunwind=yes ;;
10279 *) with_system_libunwind=no ;;
10280 esac
10281 fi
10282 # Based on system-libunwind and target, do we have ipinfo?
10283 if test x$with_system_libunwind = xyes; then
10284 case ${target} in
10285 ia64-*-*) have_unwind_getipinfo=no ;;
10286 *) have_unwind_getipinfo=yes ;;
10287 esac
10288 else
a0e02041
AP
10289 # Darwin before version 9 does not have _Unwind_GetIPInfo.
10290
10291 case ${target} in
10292 *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
10293 *) have_unwind_getipinfo=yes ;;
10294 esac
10295
e61c76c9 10296 fi
4977bab6 10297
e61c76c9 10298 if test x$have_unwind_getipinfo = xyes; then
e64f5acf 10299
5213506e 10300$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
e64f5acf 10301
e61c76c9
SE
10302 fi
10303
e64f5acf 10304
34a86c2b
NN
10305# --------------------------------------------------------
10306# Build, host, and target specific configuration fragments
10307# --------------------------------------------------------
10308
5b28c537
NN
10309# Collect build-machine-specific information.
10310. ${srcdir}/config.build
10311
a89ea0df
NN
10312# Collect host-machine-specific information.
10313. ${srcdir}/config.host
10314
ef69da62 10315target_gtfiles=
a89ea0df
NN
10316
10317# Collect target-machine-specific information.
8ad9fb33 10318. ${srcdir}/config.gcc
861bb6c1
JL
10319
10320extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 10321extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
10322
10323# Default the target-machine variables that were not explicitly set.
75bffa71 10324if test x"$tm_file" = x
861bb6c1
JL
10325then tm_file=$cpu_type/$cpu_type.h; fi
10326
6b2adea9 10327if test x"$extra_headers" = x
861bb6c1
JL
10328then extra_headers=; fi
10329
75bffa71 10330if test x$md_file = x
e98e406f 10331then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 10332
75bffa71 10333if test x$out_file = x
861bb6c1
JL
10334then out_file=$cpu_type/$cpu_type.c; fi
10335
75bffa71 10336if test x"$tmake_file" = x
861bb6c1
JL
10337then tmake_file=$cpu_type/t-$cpu_type
10338fi
10339
90e6a802 10340if test x"$dwarf2" = xyes
756ee602 10341then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
10342fi
10343
861bb6c1 10344# Say what files are being used for the output code and MD file.
11642c3a 10345echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
10346echo "Using \`$srcdir/config/$md_file' as machine description file."
10347
11642c3a 10348# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
10349# about them and drop them.
10350
11642c3a
ZW
10351bx=
10352for x in $build_xm_file; do
10353 if test -f $srcdir/config/$x
10354 then bx="$bx $x"
5213506e
RW
10355 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10356$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10357 fi
10358done
10359build_xm_file="$bx"
10360
10361hx=
10362for x in $host_xm_file; do
10363 if test -f $srcdir/config/$x
10364 then hx="$hx $x"
5213506e
RW
10365 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10366$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10367 fi
10368done
10369host_xm_file="$hx"
10370
10371tx=
10372for x in $xm_file; do
10373 if test -f $srcdir/config/$x
10374 then tx="$tx $x"
5213506e
RW
10375 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10376$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10377 fi
10378done
10379xm_file="$tx"
10380
861bb6c1
JL
10381count=a
10382for f in $tm_file; do
10383 count=${count}x
10384done
75bffa71 10385if test $count = ax; then
861bb6c1
JL
10386 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
10387else
10388 echo "Using the following target machine macro files:"
10389 for f in $tm_file; do
10390 echo " $srcdir/config/$f"
10391 done
10392fi
10393
4977bab6 10394if test x$need_64bit_hwint = xyes; then
ba479fd2 10395
5213506e 10396$as_echo "#define NEED_64BIT_HOST_WIDE_INT 1" >>confdefs.h
4977bab6
ZW
10397
10398fi
10399
99fa8911
AP
10400if test x$use_long_long_for_widest_fast_int = xyes; then
10401
5213506e 10402$as_echo "#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1" >>confdefs.h
99fa8911
AP
10403
10404fi
10405
861bb6c1
JL
10406count=a
10407for f in $host_xm_file; do
10408 count=${count}x
10409done
11642c3a
ZW
10410if test $count = a; then
10411 :
10412elif test $count = ax; then
861bb6c1
JL
10413 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
10414else
10415 echo "Using the following host machine macro files:"
10416 for f in $host_xm_file; do
10417 echo " $srcdir/config/$f"
10418 done
10419fi
476d9098 10420echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 10421
75bffa71 10422if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
10423 count=a
10424 for f in $build_xm_file; do
10425 count=${count}x
10426 done
11642c3a
ZW
10427 if test $count = a; then
10428 :
10429 elif test $count = ax; then
861bb6c1
JL
10430 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
10431 else
10432 echo "Using the following build machine macro files:"
10433 for f in $build_xm_file; do
10434 echo " $srcdir/config/$f"
10435 done
10436 fi
10437fi
10438
4f6d8cc8 10439case ${host} in
b8ec3cc8 10440 powerpc*-*-darwin*)
5213506e
RW
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5
10442$as_echo_n "checking whether mcontext_t fields have underscores... " >&6; }
10443if test "${gcc_cv_mcontext_underscores+set}" = set; then :
10444 $as_echo_n "(cached) " >&6
4f6d8cc8 10445else
5213506e
RW
10446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10447/* end confdefs.h. */
4f6d8cc8 10448
ba7da42a 10449#include <sys/cdefs.h>
de4fb767 10450#include <sys/signal.h>
4f6d8cc8
GK
10451#include <ucontext.h>
10452int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
10453
10454_ACEOF
5213506e 10455if ac_fn_c_try_compile "$LINENO"; then :
4f6d8cc8
GK
10456 gcc_cv_mcontext_underscores=no
10457else
5213506e 10458 gcc_cv_mcontext_underscores=yes
4f6d8cc8 10459fi
5213506e 10460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 10461fi
5213506e
RW
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mcontext_underscores" >&5
10463$as_echo "$gcc_cv_mcontext_underscores" >&6; }
4f6d8cc8
GK
10464 if test $gcc_cv_mcontext_underscores = yes; then
10465
5213506e 10466$as_echo "#define HAS_MCONTEXT_T_UNDERSCORES /**/" >>confdefs.h
4f6d8cc8
GK
10467
10468 fi
10469 ;;
10470esac
10471
8bb915b6
NN
10472# ---------
10473# Threading
10474# ---------
10475
c2e494a8 10476# Check if a valid thread package
615be2cf 10477case ${enable_threads} in
c2e494a8
NN
10478 "" | no)
10479 # No threads
10480 target_thread_file='single'
10481 ;;
10482 yes)
10483 # default
10484 target_thread_file='single'
10485 ;;
18167442 10486 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 10487 single | solaris | vxworks | win32 | mipssde)
615be2cf 10488 target_thread_file=${enable_threads}
c2e494a8
NN
10489 ;;
10490 *)
615be2cf 10491 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
10492 exit 1
10493 ;;
10494esac
10495
10496if test x${thread_file} = x; then
10497 # No thread file set by target-specific clauses in config.gcc,
10498 # so use file chosen by default logic above
10499 thread_file=${target_thread_file}
861bb6c1
JL
10500fi
10501
8bb915b6
NN
10502# Make gthr-default.h if we have a thread file.
10503gthread_flags=
10504if test $thread_file != single; then
b15a9f63
RW
10505 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
10506 if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
10507 rm -f gthr-default.h-t
10508 else
10509 mv -f gthr-default.h-t gthr-default.h
10510 fi
8bb915b6
NN
10511 gthread_flags=-DHAVE_GTHR_DEFAULT
10512fi
10513
10514
10515# --------
10516# UNSORTED
10517# --------
10518
18fbf599 10519use_cxa_atexit=no
2121a768
JT
10520if test x$enable___cxa_atexit = xyes || \
10521 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 10522 if test x$host = x$target; then
97388150
DS
10523 case $host in
10524 # mingw32 doesn't have __cxa_atexit but uses atexit registration
10525 # keyed to flag_use_cxa_atexit
10526 *-*-mingw32*)
10527 use_cxa_atexit=yes
10528 ;;
10529 *)
5213506e
RW
10530 ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit"
10531if test "x$ac_cv_func___cxa_atexit" = x""yes; then :
18fbf599
PB
10532 use_cxa_atexit=yes
10533else
10534 echo "__cxa_atexit can't be enabled on this target"
10535fi
10536
5f60e48f 10537 ;;
97388150 10538 esac
18fbf599
PB
10539 else
10540 # We can't check for __cxa_atexit when building a cross, so assume
10541 # it is available
10542 use_cxa_atexit=yes
10543 fi
10544 if test x$use_cxa_atexit = xyes; then
ba479fd2 10545
5213506e 10546$as_echo "#define DEFAULT_USE_CXA_ATEXIT 2" >>confdefs.h
2121a768 10547
18fbf599 10548 fi
2121a768
JT
10549fi
10550
a5381466 10551# Look for a file containing extra machine modes.
1c0ca89d
ZW
10552if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
10553 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
10554
10555
10556cat >>confdefs.h <<_ACEOF
e22340b0 10557#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 10558_ACEOF
a5381466
ZW
10559
10560fi
10561
75685792
RS
10562# Convert extra_options into a form suitable for Makefile use.
10563extra_opt_files=
10564for f in $extra_options; do
10565 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
10566done
10567
10568
b7cb92ad 10569# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 10570# the first file included by config.h.
4977bab6 10571# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 10572# as well. If host!=build, we are in error and need to do more
db81d74a 10573# work to find out the build config parameters.
75bffa71 10574if test x$host = x$build
db81d74a 10575then
eaf4e618 10576 build_auto=auto-host.h
b7cb92ad
JL
10577else
10578 # We create a subdir, then run autoconf in the subdir.
10579 # To prevent recursion we set host and build for the new
10580 # invocation of configure to the build for this invocation
ba479fd2 10581 # of configure.
b7cb92ad
JL
10582 tempdir=build.$$
10583 rm -rf $tempdir
10584 mkdir $tempdir
10585 cd $tempdir
10586 case ${srcdir} in
255b8a49 10587 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
10588 *) realsrcdir=../${srcdir};;
10589 esac
d920e825
L
10590 saved_CFLAGS="${CFLAGS}"
10591 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 10592 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 10593 ${realsrcdir}/configure \
33e70558 10594 --enable-languages=${enable_languages-all} \
534d0cc0 10595 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 10596 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
10597
10598 # We just finished tests for the build machine, so rename
10599 # the file auto-build.h in the gcc directory.
10600 mv auto-host.h ../auto-build.h
10601 cd ..
10602 rm -rf $tempdir
eaf4e618 10603 build_auto=auto-build.h
db81d74a
RH
10604fi
10605
06f0b04c 10606
eaf4e618 10607tm_file="${tm_file} defaults.h"
4977bab6
ZW
10608tm_p_file="${tm_p_file} tm-preds.h"
10609host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
10610build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 10611# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 10612# put this back in temporarily.
232b67d9 10613xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 10614
34a86c2b
NN
10615# --------
10616# UNSORTED
10617# --------
10618
cc1e60ea 10619# Compile in configure arguments.
8105825d 10620if test -f configargs.h ; then
cc1e60ea 10621 # Being re-configured.
022dae81 10622 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
10623 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
10624else
10625 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
10626fi
eeae7b41
DJ
10627
10628# Double all backslashes and backslash all quotes to turn
10629# gcc_config_arguments into a C string.
10630sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
10631$gcc_config_arguments
10632EOF
10633gcc_config_arguments_str=`cat conftest.out`
10634rm -f conftest.out
10635
cc1e60ea
JM
10636cat > configargs.h <<EOF
10637/* Generated automatically. */
eeae7b41 10638static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 10639static const char thread_model[] = "$thread_file";
7816bea0
DJ
10640
10641static const struct {
10642 const char *name, *value;
10643} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
10644EOF
10645
40540e68
RAE
10646gcc_BASEVER=`cat $srcdir/BASE-VER`
10647gcc_DEVPHASE=`cat $srcdir/DEV-PHASE`
10648gcc_DATESTAMP=`cat $srcdir/DATESTAMP`
0c463e16 10649if test -f $srcdir/REVISION ; then
40540e68 10650 gcc_REVISION=`cat $srcdir/REVISION`
0c463e16
RAE
10651else
10652 gcc_REVISION=""
10653fi
10654cat > plugin-version.h <<EOF
10655#include "configargs.h"
10656
10657static char basever[] = "$gcc_BASEVER";
10658static char datestamp[] = "$gcc_DATESTAMP";
10659static char devphase[] = "$gcc_DEVPHASE";
10660static char revision[] = "$gcc_REVISION";
10661
10662/* FIXME plugins: We should make the version information more precise.
10663 One way to do is to add a checksum. */
10664
10665static struct plugin_gcc_version gcc_version = {basever, datestamp,
10666 devphase, revision,
10667 configuration_arguments};
10668EOF
10669
ab87f8c8 10670# Internationalization
18fc9bd4
RG
10671# If we haven't got the data from the intl directory,
10672# assume NLS is disabled.
10673USE_NLS=no
10674LIBINTL=
10675LIBINTL_DEP=
10676INCINTL=
10677XGETTEXT=
10678GMSGFMT=
10679POSUB=
10680
10681if test -f ../intl/config.intl; then
10682 . ../intl/config.intl
10683fi
5213506e
RW
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
10685$as_echo_n "checking whether NLS is requested... " >&6; }
18fc9bd4 10686if test x"$USE_NLS" != xyes; then
5213506e
RW
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688$as_echo "no" >&6; }
18fc9bd4 10689else
5213506e
RW
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10691$as_echo "yes" >&6; }
18fc9bd4 10692
5213506e 10693$as_echo "#define ENABLE_NLS 1" >>confdefs.h
18fc9bd4
RG
10694
10695
5213506e
RW
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
10697$as_echo_n "checking for catalogs to be installed... " >&6; }
18fc9bd4
RG
10698 # Look for .po and .gmo files in the source directory.
10699 CATALOGS=
10700 XLINGUAS=
10701 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
10702 # If there aren't any .gmo files the shell will give us the
10703 # literal string "../path/to/srcdir/po/*.gmo" which has to be
10704 # weeded out.
10705 case "$cat" in *\**)
10706 continue;;
10707 esac
10708 # The quadruple backslash is collapsed to a double backslash
10709 # by the backticks, then collapsed again by the double quotes,
10710 # leaving us with one backslash in the sed expression (right
10711 # before the dot that mustn't act as a wildcard).
10712 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
10713 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
10714 # The user is allowed to set LINGUAS to a list of languages to
10715 # install catalogs for. If it's empty that means "all of them."
10716 if test "x$LINGUAS" = x; then
10717 CATALOGS="$CATALOGS $cat"
10718 XLINGUAS="$XLINGUAS $lang"
10719 else
10720 case "$LINGUAS" in *$lang*)
10721 CATALOGS="$CATALOGS $cat"
10722 XLINGUAS="$XLINGUAS $lang"
10723 ;;
10724 esac
10725 fi
10726 done
10727 LINGUAS="$XLINGUAS"
5213506e
RW
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
10729$as_echo "$LINGUAS" >&6; }
18fc9bd4
RG
10730
10731
10732 DATADIRNAME=share
10733
10734 INSTOBJEXT=.mo
10735
10736 GENCAT=gencat
10737
10738 CATOBJEXT=.gmo
10739
10740fi
861bb6c1 10741
56694dd9
ZW
10742# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
10743# -liconv on the link line twice.
10744case "$LIBINTL" in *$LIBICONV*)
10745 LIBICONV= ;;
10746esac
dc6746e7 10747
5213506e
RW
10748# Check whether --enable-secureplt was given.
10749if test "${enable_secureplt+set}" = set; then :
10750 enableval=$enable_secureplt;
10751fi
7f970b70 10752
922e3e33 10753
5213506e
RW
10754# Check whether --enable-cld was given.
10755if test "${enable_cld+set}" = set; then :
10756 enableval=$enable_cld;
922e3e33
UB
10757else
10758 enable_cld=no
5213506e
RW
10759fi
10760
922e3e33 10761
56694dd9 10762# Windows32 Registry support for specifying GCC installation paths.
5213506e
RW
10763# Check whether --enable-win32-registry was given.
10764if test "${enable_win32_registry+set}" = set; then :
10765 enableval=$enable_win32_registry;
10766fi
dc6746e7 10767
ba479fd2 10768
a1286ef5
ZW
10769case $host_os in
10770 win32 | pe | cygwin* | mingw32* | uwin*)
10771 if test "x$enable_win32_registry" != xno; then
5213506e
RW
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RegOpenKeyExA" >&5
10773$as_echo_n "checking for library containing RegOpenKeyExA... " >&6; }
10774if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10775 $as_echo_n "(cached) " >&6
ba479fd2
NN
10776else
10777 ac_func_search_save_LIBS=$LIBS
5213506e 10778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10779/* end confdefs.h. */
861bb6c1 10780
5213506e
RW
10781/* Override any GCC internal prototype to avoid an error.
10782 Use char because int might match the return type of a GCC
10783 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10784#ifdef __cplusplus
10785extern "C"
10786#endif
ba479fd2
NN
10787char RegOpenKeyExA ();
10788int
10789main ()
10790{
5213506e 10791return RegOpenKeyExA ();
ba479fd2
NN
10792 ;
10793 return 0;
10794}
10795_ACEOF
5213506e
RW
10796for ac_lib in '' advapi32; do
10797 if test -z "$ac_lib"; then
10798 ac_res="none required"
10799 else
10800 ac_res=-l$ac_lib
b61ff9c8 10801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5213506e
RW
10802 fi
10803 if ac_fn_c_try_link "$LINENO"; then :
10804 ac_cv_search_RegOpenKeyExA=$ac_res
10805fi
10806rm -f core conftest.err conftest.$ac_objext \
10807 conftest$ac_exeext
10808 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10809 break
10810fi
10811done
10812if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
2f41c1d6 10813
1a4b763e 10814else
5213506e 10815 ac_cv_search_RegOpenKeyExA=no
dd7f7a6e 10816fi
5213506e 10817rm conftest.$ac_ext
dd7f7a6e
EC
10818LIBS=$ac_func_search_save_LIBS
10819fi
5213506e
RW
10820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RegOpenKeyExA" >&5
10821$as_echo "$ac_cv_search_RegOpenKeyExA" >&6; }
10822ac_res=$ac_cv_search_RegOpenKeyExA
10823if test "$ac_res" != no; then :
10824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
10825
10826else
10827 enable_win32_registry=no
10828fi
10829
10830 fi
10831
10832 if test "x$enable_win32_registry" != xno; then
10833
5213506e 10834$as_echo "#define ENABLE_WIN32_REGISTRY 1" >>confdefs.h
dd7f7a6e
EC
10835
10836
10837 if test "x$enable_win32_registry" != xyes \
10838 && test "x$enable_win32_registry" != x; then
10839
10840cat >>confdefs.h <<_ACEOF
10841#define WIN32_REGISTRY_KEY "$enable_win32_registry"
10842_ACEOF
10843
10844 fi
10845 fi
10846 ;;
10847esac
ab87f8c8 10848
56694dd9
ZW
10849# Get an absolute path to the GCC top-level source directory
10850holddir=`${PWDCMD-pwd}`
10851cd $srcdir
10852topdir=`${PWDCMD-pwd}`
10853cd $holddir
ab87f8c8 10854
56694dd9 10855# Conditionalize the makefile for this host machine.
2ed26f6b 10856xmake_file=
c406e779 10857for f in ${host_xmake_file}
56694dd9
ZW
10858do
10859 if test -f ${srcdir}/config/$f
10860 then
2ed26f6b 10861 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
10862 fi
10863done
093e61a6 10864
56694dd9 10865# Conditionalize the makefile for this target machine.
2ed26f6b 10866tmake_file_=
c406e779 10867for f in ${tmake_file}
56694dd9
ZW
10868do
10869 if test -f ${srcdir}/config/$f
10870 then
2ed26f6b 10871 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
10872 fi
10873done
2ed26f6b 10874tmake_file="${tmake_file_}"
71a94577 10875
ab87f8c8
JL
10876out_object_file=`basename $out_file .c`.o
10877
75685792
RS
10878tm_file_list="options.h"
10879tm_include_list="options.h"
ab87f8c8 10880for f in $tm_file; do
64ccbc99 10881 case $f in
3ca43df7
RS
10882 ./* )
10883 f=`echo $f | sed 's/^..//'`
10884 tm_file_list="${tm_file_list} $f"
10885 tm_include_list="${tm_include_list} $f"
10886 ;;
d02af173 10887 defaults.h )
e22340b0
ZW
10888 tm_file_list="${tm_file_list} \$(srcdir)/$f"
10889 tm_include_list="${tm_include_list} $f"
10890 ;;
10891 * )
10892 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
10893 tm_include_list="${tm_include_list} config/$f"
10894 ;;
64ccbc99 10895 esac
ab87f8c8
JL
10896done
10897
11642c3a 10898tm_p_file_list=
e22340b0 10899tm_p_include_list=
11642c3a 10900for f in $tm_p_file; do
4977bab6
ZW
10901 case $f in
10902 tm-preds.h )
e22340b0
ZW
10903 tm_p_file_list="${tm_p_file_list} $f"
10904 tm_p_include_list="${tm_p_include_list} $f"
10905 ;;
10906 * )
10907 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
10908 tm_p_include_list="${tm_p_include_list} config/$f"
10909 esac
10910done
10911
10912xm_file_list=
10913xm_include_list=
10914for f in $xm_file; do
10915 case $f in
10916 ansidecl.h )
10917 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
10918 xm_include_list="${xm_include_list} $f"
10919 ;;
10920 auto-host.h )
10921 xm_file_list="${xm_file_list} $f"
10922 xm_include_list="${xm_include_list} $f"
10923 ;;
10924 * )
10925 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
10926 xm_include_list="${xm_include_list} config/$f"
10927 ;;
4977bab6 10928 esac
11642c3a
ZW
10929done
10930
ab87f8c8 10931host_xm_file_list=
e22340b0 10932host_xm_include_list=
ab87f8c8 10933for f in $host_xm_file; do
64ccbc99 10934 case $f in
d02af173 10935 ansidecl.h )
e22340b0
ZW
10936 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
10937 host_xm_include_list="${host_xm_include_list} $f"
10938 ;;
e2500fed 10939 auto-host.h )
e22340b0
ZW
10940 host_xm_file_list="${host_xm_file_list} $f"
10941 host_xm_include_list="${host_xm_include_list} $f"
10942 ;;
10943 * )
10944 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
10945 host_xm_include_list="${host_xm_include_list} config/$f"
10946 ;;
64ccbc99 10947 esac
ab87f8c8
JL
10948done
10949
10950build_xm_file_list=
10951for f in $build_xm_file; do
64ccbc99 10952 case $f in
d02af173 10953 ansidecl.h )
e22340b0
ZW
10954 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
10955 build_xm_include_list="${build_xm_include_list} $f"
10956 ;;
e2500fed 10957 auto-build.h | auto-host.h )
e22340b0
ZW
10958 build_xm_file_list="${build_xm_file_list} $f"
10959 build_xm_include_list="${build_xm_include_list} $f"
10960 ;;
10961 * )
10962 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
10963 build_xm_include_list="${build_xm_include_list} config/$f"
10964 ;;
64ccbc99 10965 esac
ab87f8c8
JL
10966done
10967
2989d30c
GK
10968# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
10969# cross-compiler which does not use the native headers and libraries.
a078a589 10970# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
10971CROSS=
10972ALL=all.internal
10973SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10974
10975if test "x$with_build_sysroot" != x; then
14da6073 10976 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10977else
10978 # This value is used, even on a native system, because
10979 # CROSS_SYSTEM_HEADER_DIR is just
10980 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
10981 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
10982fi
10983
ab87f8c8
JL
10984if test x$host != x$target
10985then
2989d30c 10986 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 10987 ALL=all.cross
160633c6 10988 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 10989 case "$host","$target" in
3a7e8b87
GK
10990 # Darwin crosses can use the host system's libraries and headers,
10991 # because of the fat library support. Of course, it must be the
10992 # same version of Darwin on both sides. Allow the user to
10993 # just say --target=foo-darwin without a version number to mean
10994 # "the version on this system".
10995 *-*-darwin*,*-*-darwin*)
10996 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
10997 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
10998 if test $hostos = $targetos -o $targetos = darwin ; then
10999 CROSS=
11000 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
11001 with_headers=yes
11002 fi
11003 ;;
11004
343f59d9
AM
11005 i?86-*-*,x86_64-*-* \
11006 | powerpc*-*-*,powerpc64*-*-*)
11007 CROSS="$CROSS -DNATIVE_CROSS" ;;
11008 esac
7a615b25 11009elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 11010 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
11011fi
11012
b39d221a
EC
11013# If this is a cross-compiler that does not
11014# have its own set of headers then define
11015# inhibit_libc
11016
dc06db20
R
11017# If this is using newlib, without having the headers available now,
11018# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
11019# This prevents libgcc2 from containing any code which requires libc
11020# support.
a929bc28 11021: ${inhibit_libc=false}
dc06db20
R
11022if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
11023 test x$with_newlib = xyes ; } &&
e50084fa 11024 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 11025 inhibit_libc=true
b39d221a
EC
11026fi
11027
11028
a078a589
ZW
11029# When building gcc with a cross-compiler, we need to adjust things so
11030# that the generator programs are still built with the native compiler.
52c0e446 11031# Also, we cannot run fixincludes.
a078a589
ZW
11032
11033# These are the normal (build=host) settings:
ba479fd2
NN
11034CC_FOR_BUILD='$(CC)'
11035BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 11036BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 11037STMP_FIXINC=stmp-fixinc
8ad9fb33 11038
83599948
NS
11039# And these apply if build != host, or we are generating coverage data
11040if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 11041then
b11e4747 11042 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 11043 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
ab87f8c8
JL
11044fi
11045
11046# Expand extra_headers to include complete path.
11047# This substitutes for lots of t-* files.
11048extra_headers_list=
b1ef58c8
NN
11049# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
11050for file in ${extra_headers} ; do
11051 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
11052done
ab87f8c8 11053
1617e5ee
GK
11054# If use_gcc_tgmath is set, append ginclude/tgmath.h.
11055if test x"$use_gcc_tgmath" = xyes
11056then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
11057fi
11058
c38f02df
ILT
11059# Define collect2 in Makefile.
11060case $host_can_use_collect2 in
11061 no) collect2= ;;
11062 *) collect2='collect2$(exeext)' ;;
11063esac
11064
11065
ab87f8c8 11066# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
11067case $use_collect2 in
11068 no) use_collect2= ;;
11069 "") ;;
ba479fd2 11070 *)
34a86c2b
NN
11071 host_xm_defines="${host_xm_defines} USE_COLLECT2"
11072 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
11073 case $host_can_use_collect2 in
11074 no)
5213506e 11075 as_fn_error "collect2 is required but cannot be built on this system" "$LINENO" 5
c38f02df
ILT
11076 ;;
11077 esac
34a86c2b
NN
11078 ;;
11079esac
ab87f8c8 11080
8bb915b6
NN
11081# ---------------------------
11082# Assembler & linker features
11083# ---------------------------
11084
da0f6381
PB
11085# During stage 2, ld is actually gcc/collect-ld, which is a small script to
11086# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
11087# However when ld-new is first executed from the build tree, libtool will
11088# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
11089# to the build tree. While doing this we need to use the previous-stage
11090# linker, or we have an infinite loop. The presence of a shell script as
11091# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
11092# the gcc/collect-ld script. So we need to know how libtool works, or
11093# exec-tool will fail.
e8b05380 11094
da0f6381 11095
5d47bb02
PG
11096case `pwd` in
11097 *\ * | *\ *)
5213506e
RW
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
11099$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5d47bb02 11100esac
da0f6381
PB
11101
11102
da0f6381 11103
5d47bb02
PG
11104macro_version='2.2.6'
11105macro_revision='1.3012'
da0f6381
PB
11106
11107
11108
11109
11110
11111
da0f6381
PB
11112
11113
11114
11115
11116
11117
11118
5d47bb02 11119ltmain="$ac_aux_dir/ltmain.sh"
da0f6381 11120
5213506e
RW
11121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
11122$as_echo_n "checking for a sed that does not truncate output... " >&6; }
11123if test "${ac_cv_path_SED+set}" = set; then :
11124 $as_echo_n "(cached) " >&6
11125else
11126 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
11127 for ac_i in 1 2 3 4 5 6 7; do
11128 ac_script="$ac_script$as_nl$ac_script"
11129 done
11130 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
11131 { ac_script=; unset ac_script;}
11132 if test -z "$SED"; then
11133 ac_path_SED_found=false
11134 # Loop through the user's path and test for each of PROGNAME-LIST
11135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
11136for as_dir in $PATH
11137do
11138 IFS=$as_save_IFS
11139 test -z "$as_dir" && as_dir=.
5213506e 11140 for ac_prog in sed gsed; do
da0f6381 11141 for ac_exec_ext in '' $ac_executable_extensions; do
5213506e
RW
11142 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
11143 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
11144# Check for GNU ac_path_SED and select it if it is found.
11145 # Check for GNU $ac_path_SED
11146case `"$ac_path_SED" --version 2>&1` in
11147*GNU*)
11148 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
11149*)
11150 ac_count=0
11151 $as_echo_n 0123456789 >"conftest.in"
11152 while :
11153 do
11154 cat "conftest.in" "conftest.in" >"conftest.tmp"
11155 mv "conftest.tmp" "conftest.in"
11156 cp "conftest.in" "conftest.nl"
11157 $as_echo '' >> "conftest.nl"
11158 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
11159 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11160 as_fn_arith $ac_count + 1 && ac_count=$as_val
11161 if test $ac_count -gt ${ac_path_SED_max-0}; then
11162 # Best one so far, save it but keep looking for a better one
11163 ac_cv_path_SED="$ac_path_SED"
11164 ac_path_SED_max=$ac_count
11165 fi
11166 # 10*(2^10) chars as input seems more than enough
11167 test $ac_count -gt 10 && break
11168 done
11169 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11170esac
11171
11172 $ac_path_SED_found && break 3
da0f6381
PB
11173 done
11174 done
5213506e 11175 done
da0f6381 11176IFS=$as_save_IFS
5213506e
RW
11177 if test -z "$ac_cv_path_SED"; then
11178 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
da0f6381 11179 fi
5213506e
RW
11180else
11181 ac_cv_path_SED=$SED
e8b05380 11182fi
b61ff9c8 11183
5213506e
RW
11184fi
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
11186$as_echo "$ac_cv_path_SED" >&6; }
11187 SED="$ac_cv_path_SED"
11188 rm -f conftest.sed
e8b05380 11189
da0f6381
PB
11190test -z "$SED" && SED=sed
11191Xsed="$SED -e 1s/^X//"
e8b05380 11192
e8b05380
PB
11193
11194
ad9c4d9f 11195
da0f6381
PB
11196
11197
11198
11199
11200
11201
11202
5213506e
RW
11203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11204$as_echo_n "checking for fgrep... " >&6; }
11205if test "${ac_cv_path_FGREP+set}" = set; then :
11206 $as_echo_n "(cached) " >&6
11207else
11208 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11209 then ac_cv_path_FGREP="$GREP -F"
11210 else
11211 if test -z "$FGREP"; then
11212 ac_path_FGREP_found=false
11213 # Loop through the user's path and test for each of PROGNAME-LIST
11214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11215for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11216do
11217 IFS=$as_save_IFS
11218 test -z "$as_dir" && as_dir=.
11219 for ac_prog in fgrep; do
11220 for ac_exec_ext in '' $ac_executable_extensions; do
11221 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11222 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
11223# Check for GNU ac_path_FGREP and select it if it is found.
11224 # Check for GNU $ac_path_FGREP
11225case `"$ac_path_FGREP" --version 2>&1` in
11226*GNU*)
11227 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11228*)
11229 ac_count=0
11230 $as_echo_n 0123456789 >"conftest.in"
11231 while :
11232 do
11233 cat "conftest.in" "conftest.in" >"conftest.tmp"
11234 mv "conftest.tmp" "conftest.in"
11235 cp "conftest.in" "conftest.nl"
11236 $as_echo 'FGREP' >> "conftest.nl"
11237 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11238 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11239 as_fn_arith $ac_count + 1 && ac_count=$as_val
11240 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11241 # Best one so far, save it but keep looking for a better one
11242 ac_cv_path_FGREP="$ac_path_FGREP"
11243 ac_path_FGREP_max=$ac_count
11244 fi
11245 # 10*(2^10) chars as input seems more than enough
11246 test $ac_count -gt 10 && break
11247 done
11248 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11249esac
11250
11251 $ac_path_FGREP_found && break 3
11252 done
11253 done
11254 done
11255IFS=$as_save_IFS
11256 if test -z "$ac_cv_path_FGREP"; then
11257 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11258 fi
e8b05380 11259else
5213506e
RW
11260 ac_cv_path_FGREP=$FGREP
11261fi
11262
11263 fi
981d4858 11264fi
5213506e
RW
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11266$as_echo "$ac_cv_path_FGREP" >&6; }
11267 FGREP="$ac_cv_path_FGREP"
9e423e6d 11268
9f18db39 11269
da0f6381 11270test -z "$GREP" && GREP=grep
9f18db39 11271
da0f6381
PB
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
5213506e
RW
11290# Check whether --with-gnu-ld was given.
11291if test "${with_gnu_ld+set}" = set; then :
11292 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
da0f6381
PB
11293else
11294 with_gnu_ld=no
5213506e
RW
11295fi
11296
da0f6381
PB
11297ac_prog=ld
11298if test "$GCC" = yes; then
11299 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
11301$as_echo_n "checking for ld used by $CC... " >&6; }
da0f6381
PB
11302 case $host in
11303 *-*-mingw*)
11304 # gcc leaves a trailing carriage return which upsets mingw
11305 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11306 *)
11307 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11308 esac
11309 case $ac_prog in
11310 # Accept absolute paths.
11311 [\\/]* | ?:[\\/]*)
11312 re_direlt='/[^/][^/]*/\.\./'
11313 # Canonicalize the pathname of ld
11314 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
11315 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
11316 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
11317 done
11318 test -z "$LD" && LD="$ac_prog"
11319 ;;
11320 "")
11321 # If it fails, then pretend we aren't using GCC.
11322 ac_prog=ld
11323 ;;
11324 *)
11325 # If it is relative, then search for the first ld in PATH.
11326 with_gnu_ld=unknown
11327 ;;
11328 esac
11329elif test "$with_gnu_ld" = yes; then
5213506e
RW
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
11331$as_echo_n "checking for GNU ld... " >&6; }
da0f6381 11332else
5213506e
RW
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
11334$as_echo_n "checking for non-GNU ld... " >&6; }
da0f6381 11335fi
5213506e
RW
11336if test "${lt_cv_path_LD+set}" = set; then :
11337 $as_echo_n "(cached) " >&6
da0f6381
PB
11338else
11339 if test -z "$LD"; then
11340 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11341 for ac_dir in $PATH; do
11342 IFS="$lt_save_ifs"
11343 test -z "$ac_dir" && ac_dir=.
11344 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11345 lt_cv_path_LD="$ac_dir/$ac_prog"
11346 # Check to see if the program is GNU ld. I'd rather use --version,
11347 # but apparently some variants of GNU ld only accept -v.
11348 # Break only if it was the GNU/non-GNU ld that we prefer.
11349 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
11350 *GNU* | *'with BFD'*)
11351 test "$with_gnu_ld" != no && break
11352 ;;
11353 *)
11354 test "$with_gnu_ld" != yes && break
11355 ;;
11356 esac
11357 fi
11358 done
11359 IFS="$lt_save_ifs"
11360else
11361 lt_cv_path_LD="$LD" # Let the user override the test with a path.
11362fi
11363fi
11364
11365LD="$lt_cv_path_LD"
11366if test -n "$LD"; then
5213506e
RW
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11368$as_echo "$LD" >&6; }
da0f6381 11369else
5213506e
RW
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
da0f6381 11372fi
5213506e
RW
11373test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
11375$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
11376if test "${lt_cv_prog_gnu_ld+set}" = set; then :
11377 $as_echo_n "(cached) " >&6
da0f6381
PB
11378else
11379 # I'd rather use --version here, but apparently some GNU lds only accept -v.
11380case `$LD -v 2>&1 </dev/null` in
11381*GNU* | *'with BFD'*)
11382 lt_cv_prog_gnu_ld=yes
11383 ;;
11384*)
11385 lt_cv_prog_gnu_ld=no
11386 ;;
11387esac
11388fi
5213506e
RW
11389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
11390$as_echo "$lt_cv_prog_gnu_ld" >&6; }
da0f6381
PB
11391with_gnu_ld=$lt_cv_prog_gnu_ld
11392
11393
11394
11395
11396
11397
11398
11399
11400
5213506e
RW
11401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
11402$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
11403if test "${lt_cv_path_NM+set}" = set; then :
11404 $as_echo_n "(cached) " >&6
da0f6381
PB
11405else
11406 if test -n "$NM"; then
11407 # Let the user override the test.
11408 lt_cv_path_NM="$NM"
11409else
11410 lt_nm_to_check="${ac_tool_prefix}nm"
11411 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
11412 lt_nm_to_check="$lt_nm_to_check nm"
11413 fi
11414 for lt_tmp_nm in $lt_nm_to_check; do
11415 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11416 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
11417 IFS="$lt_save_ifs"
11418 test -z "$ac_dir" && ac_dir=.
11419 tmp_nm="$ac_dir/$lt_tmp_nm"
11420 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
11421 # Check to see if the nm accepts a BSD-compat flag.
11422 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
11423 # nm: unknown option "B" ignored
11424 # Tru64's nm complains that /dev/null is an invalid object file
11425 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
11426 */dev/null* | *'Invalid file or object type'*)
11427 lt_cv_path_NM="$tmp_nm -B"
11428 break
11429 ;;
11430 *)
11431 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
11432 */dev/null*)
11433 lt_cv_path_NM="$tmp_nm -p"
11434 break
11435 ;;
11436 *)
11437 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
11438 continue # so that we can try to find one that supports BSD flags
11439 ;;
11440 esac
11441 ;;
11442 esac
11443 fi
11444 done
11445 IFS="$lt_save_ifs"
11446 done
11447 : ${lt_cv_path_NM=no}
11448fi
11449fi
5213506e
RW
11450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
11451$as_echo "$lt_cv_path_NM" >&6; }
da0f6381
PB
11452if test "$lt_cv_path_NM" != "no"; then
11453 NM="$lt_cv_path_NM"
11454else
11455 # Didn't find any BSD compatible name lister, look for dumpbin.
11456 if test -n "$ac_tool_prefix"; then
11457 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
11458 do
11459 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11460set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
11461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11462$as_echo_n "checking for $ac_word... " >&6; }
11463if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
11464 $as_echo_n "(cached) " >&6
da0f6381
PB
11465else
11466 if test -n "$DUMPBIN"; then
11467 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
11468else
11469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11470for as_dir in $PATH
11471do
11472 IFS=$as_save_IFS
11473 test -z "$as_dir" && as_dir=.
5213506e
RW
11474 for ac_exec_ext in '' $ac_executable_extensions; do
11475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11476 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5213506e 11477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11478 break 2
11479 fi
11480done
5213506e
RW
11481 done
11482IFS=$as_save_IFS
da0f6381
PB
11483
11484fi
11485fi
11486DUMPBIN=$ac_cv_prog_DUMPBIN
11487if test -n "$DUMPBIN"; then
5213506e
RW
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
11489$as_echo "$DUMPBIN" >&6; }
da0f6381 11490else
5213506e
RW
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
da0f6381
PB
11493fi
11494
5213506e 11495
da0f6381
PB
11496 test -n "$DUMPBIN" && break
11497 done
11498fi
11499if test -z "$DUMPBIN"; then
11500 ac_ct_DUMPBIN=$DUMPBIN
11501 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
11502do
11503 # Extract the first word of "$ac_prog", so it can be a program name with args.
11504set dummy $ac_prog; ac_word=$2
5213506e
RW
11505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11506$as_echo_n "checking for $ac_word... " >&6; }
11507if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
11508 $as_echo_n "(cached) " >&6
da0f6381
PB
11509else
11510 if test -n "$ac_ct_DUMPBIN"; then
11511 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
11512else
11513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11514for as_dir in $PATH
11515do
11516 IFS=$as_save_IFS
11517 test -z "$as_dir" && as_dir=.
5213506e
RW
11518 for ac_exec_ext in '' $ac_executable_extensions; do
11519 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11520 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5213506e 11521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11522 break 2
11523 fi
11524done
5213506e
RW
11525 done
11526IFS=$as_save_IFS
da0f6381
PB
11527
11528fi
11529fi
11530ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
11531if test -n "$ac_ct_DUMPBIN"; then
5213506e
RW
11532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
11533$as_echo "$ac_ct_DUMPBIN" >&6; }
da0f6381 11534else
5213506e
RW
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11536$as_echo "no" >&6; }
da0f6381
PB
11537fi
11538
5213506e 11539
da0f6381
PB
11540 test -n "$ac_ct_DUMPBIN" && break
11541done
da0f6381 11542
5213506e
RW
11543 if test "x$ac_ct_DUMPBIN" = x; then
11544 DUMPBIN=":"
11545 else
11546 case $cross_compiling:$ac_tool_warned in
11547yes:)
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11549$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11550ac_tool_warned=yes ;;
11551esac
11552 DUMPBIN=$ac_ct_DUMPBIN
11553 fi
da0f6381
PB
11554fi
11555
11556
11557 if test "$DUMPBIN" != ":"; then
11558 NM="$DUMPBIN"
11559 fi
11560fi
11561test -z "$NM" && NM=nm
11562
11563
11564
11565
11566
11567
5213506e
RW
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
11569$as_echo_n "checking the name lister ($NM) interface... " >&6; }
11570if test "${lt_cv_nm_interface+set}" = set; then :
11571 $as_echo_n "(cached) " >&6
da0f6381
PB
11572else
11573 lt_cv_nm_interface="BSD nm"
11574 echo "int some_variable = 0;" > conftest.$ac_ext
d7f09764 11575 (eval echo "\"\$as_me:11575: $ac_compile\"" >&5)
da0f6381
PB
11576 (eval "$ac_compile" 2>conftest.err)
11577 cat conftest.err >&5
d7f09764 11578 (eval echo "\"\$as_me:11578: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
11579 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
11580 cat conftest.err >&5
d7f09764 11581 (eval echo "\"\$as_me:11581: output\"" >&5)
da0f6381
PB
11582 cat conftest.out >&5
11583 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
11584 lt_cv_nm_interface="MS dumpbin"
11585 fi
11586 rm -f conftest*
11587fi
5213506e
RW
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
11589$as_echo "$lt_cv_nm_interface" >&6; }
da0f6381 11590
5213506e
RW
11591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
11592$as_echo_n "checking whether ln -s works... " >&6; }
da0f6381
PB
11593LN_S=$as_ln_s
11594if test "$LN_S" = "ln -s"; then
5213506e
RW
11595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11596$as_echo "yes" >&6; }
da0f6381 11597else
5213506e
RW
11598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
11599$as_echo "no, using $LN_S" >&6; }
da0f6381
PB
11600fi
11601
11602# find the maximum length of command line arguments
5213506e
RW
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
11604$as_echo_n "checking the maximum length of command line arguments... " >&6; }
11605if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
11606 $as_echo_n "(cached) " >&6
da0f6381
PB
11607else
11608 i=0
11609 teststring="ABCD"
11610
11611 case $build_os in
11612 msdosdjgpp*)
11613 # On DJGPP, this test can blow up pretty badly due to problems in libc
11614 # (any single argument exceeding 2000 bytes causes a buffer overrun
11615 # during glob expansion). Even if it were fixed, the result of this
11616 # check would be larger than it should be.
11617 lt_cv_sys_max_cmd_len=12288; # 12K is about right
11618 ;;
11619
11620 gnu*)
11621 # Under GNU Hurd, this test is not required because there is
11622 # no limit to the length of command line arguments.
11623 # Libtool will interpret -1 as no limit whatsoever
11624 lt_cv_sys_max_cmd_len=-1;
11625 ;;
11626
5d47bb02 11627 cygwin* | mingw* | cegcc*)
da0f6381
PB
11628 # On Win9x/ME, this test blows up -- it succeeds, but takes
11629 # about 5 minutes as the teststring grows exponentially.
11630 # Worse, since 9x/ME are not pre-emptively multitasking,
11631 # you end up with a "frozen" computer, even though with patience
11632 # the test eventually succeeds (with a max line length of 256k).
11633 # Instead, let's just punt: use the minimum linelength reported by
11634 # all of the supported platforms: 8192 (on NT/2K/XP).
11635 lt_cv_sys_max_cmd_len=8192;
11636 ;;
11637
11638 amigaos*)
11639 # On AmigaOS with pdksh, this test takes hours, literally.
11640 # So we just punt and use a minimum line length of 8192.
11641 lt_cv_sys_max_cmd_len=8192;
11642 ;;
11643
11644 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
11645 # This has been around since 386BSD, at least. Likely further.
11646 if test -x /sbin/sysctl; then
11647 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
11648 elif test -x /usr/sbin/sysctl; then
11649 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
11650 else
11651 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
11652 fi
11653 # And add a safety zone
11654 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11655 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11656 ;;
11657
11658 interix*)
11659 # We know the value 262144 and hardcode it with a safety zone (like BSD)
11660 lt_cv_sys_max_cmd_len=196608
11661 ;;
11662
11663 osf*)
11664 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
11665 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
11666 # nice to cause kernel panics so lets avoid the loop below.
11667 # First set a reasonable default.
11668 lt_cv_sys_max_cmd_len=16384
11669 #
11670 if test -x /sbin/sysconfig; then
11671 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
11672 *1*) lt_cv_sys_max_cmd_len=-1 ;;
11673 esac
11674 fi
11675 ;;
11676 sco3.2v5*)
11677 lt_cv_sys_max_cmd_len=102400
11678 ;;
11679 sysv5* | sco5v6* | sysv4.2uw2*)
11680 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
11681 if test -n "$kargmax"; then
11682 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
11683 else
11684 lt_cv_sys_max_cmd_len=32768
11685 fi
11686 ;;
11687 *)
5d47bb02
PG
11688 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
11689 if test -n "$lt_cv_sys_max_cmd_len"; then
da0f6381
PB
11690 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11691 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11692 else
11693 # Make teststring a little bigger before we do anything with it.
11694 # a 1K string should be a reasonable start.
11695 for i in 1 2 3 4 5 6 7 8 ; do
11696 teststring=$teststring$teststring
11697 done
11698 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
11699 # If test is not a shell built-in, we'll probably end up computing a
11700 # maximum length that is only half of the actual maximum length, but
11701 # we can't tell.
11702 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
11703 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
11704 test $i != 17 # 1/2 MB should be enough
11705 do
11706 i=`expr $i + 1`
11707 teststring=$teststring$teststring
11708 done
11709 # Only check the string length outside the loop.
11710 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
11711 teststring=
11712 # Add a significant safety factor because C++ compilers can tack on
11713 # massive amounts of additional arguments before passing them to the
11714 # linker. It appears as though 1/2 is a usable value.
11715 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
11716 fi
11717 ;;
11718 esac
11719
11720fi
11721
11722if test -n $lt_cv_sys_max_cmd_len ; then
5213506e
RW
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
11724$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
da0f6381 11725else
5213506e
RW
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11727$as_echo "none" >&6; }
da0f6381
PB
11728fi
11729max_cmd_len=$lt_cv_sys_max_cmd_len
11730
11731
11732
11733
11734
11735
da0f6381
PB
11736: ${CP="cp -f"}
11737: ${MV="mv -f"}
11738: ${RM="rm -f"}
11739
5213506e
RW
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
11741$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
da0f6381
PB
11742# Try some XSI features
11743xsi_shell=no
11744( _lt_dummy="a/b/c"
11745 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5d47bb02
PG
11746 = c,a/b,, \
11747 && eval 'test $(( 1 + 1 )) -eq 2 \
11748 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
da0f6381 11749 && xsi_shell=yes
5213506e
RW
11750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
11751$as_echo "$xsi_shell" >&6; }
da0f6381
PB
11752
11753
5213506e
RW
11754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
11755$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
da0f6381
PB
11756lt_shell_append=no
11757( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
11758 >/dev/null 2>&1 \
11759 && lt_shell_append=yes
5213506e
RW
11760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
11761$as_echo "$lt_shell_append" >&6; }
da0f6381
PB
11762
11763
11764if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11765 lt_unset=unset
11766else
11767 lt_unset=false
11768fi
11769
11770
11771
11772
11773
11774# test EBCDIC or ASCII
11775case `echo X|tr X '\101'` in
11776 A) # ASCII based system
11777 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
11778 lt_SP2NL='tr \040 \012'
11779 lt_NL2SP='tr \015\012 \040\040'
11780 ;;
11781 *) # EBCDIC based system
11782 lt_SP2NL='tr \100 \n'
11783 lt_NL2SP='tr \r\n \100\100'
11784 ;;
11785esac
11786
11787
11788
11789
11790
11791
11792
11793
11794
5213506e
RW
11795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
11796$as_echo_n "checking for $LD option to reload object files... " >&6; }
11797if test "${lt_cv_ld_reload_flag+set}" = set; then :
11798 $as_echo_n "(cached) " >&6
da0f6381
PB
11799else
11800 lt_cv_ld_reload_flag='-r'
11801fi
5213506e
RW
11802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
11803$as_echo "$lt_cv_ld_reload_flag" >&6; }
da0f6381
PB
11804reload_flag=$lt_cv_ld_reload_flag
11805case $reload_flag in
11806"" | " "*) ;;
11807*) reload_flag=" $reload_flag" ;;
11808esac
11809reload_cmds='$LD$reload_flag -o $output$reload_objs'
11810case $host_os in
11811 darwin*)
11812 if test "$GCC" = yes; then
11813 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
11814 else
11815 reload_cmds='$LD$reload_flag -o $output$reload_objs'
11816 fi
11817 ;;
11818esac
11819
11820
11821
11822
11823
11824
11825
11826
11827
5d47bb02
PG
11828if test -n "$ac_tool_prefix"; then
11829 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
11830set dummy ${ac_tool_prefix}objdump; ac_word=$2
5213506e
RW
11831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11832$as_echo_n "checking for $ac_word... " >&6; }
11833if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
11834 $as_echo_n "(cached) " >&6
5d47bb02
PG
11835else
11836 if test -n "$OBJDUMP"; then
11837 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
11838else
11839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11840for as_dir in $PATH
11841do
11842 IFS=$as_save_IFS
11843 test -z "$as_dir" && as_dir=.
5213506e
RW
11844 for ac_exec_ext in '' $ac_executable_extensions; do
11845 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11846 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5213506e 11847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11848 break 2
11849 fi
11850done
5213506e
RW
11851 done
11852IFS=$as_save_IFS
5d47bb02
PG
11853
11854fi
11855fi
11856OBJDUMP=$ac_cv_prog_OBJDUMP
11857if test -n "$OBJDUMP"; then
5213506e
RW
11858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
11859$as_echo "$OBJDUMP" >&6; }
5d47bb02 11860else
5213506e
RW
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11862$as_echo "no" >&6; }
5d47bb02
PG
11863fi
11864
5213506e 11865
5d47bb02
PG
11866fi
11867if test -z "$ac_cv_prog_OBJDUMP"; then
11868 ac_ct_OBJDUMP=$OBJDUMP
11869 # Extract the first word of "objdump", so it can be a program name with args.
11870set dummy objdump; ac_word=$2
5213506e
RW
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11872$as_echo_n "checking for $ac_word... " >&6; }
11873if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
11874 $as_echo_n "(cached) " >&6
5d47bb02
PG
11875else
11876 if test -n "$ac_ct_OBJDUMP"; then
11877 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
11878else
11879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11880for as_dir in $PATH
11881do
11882 IFS=$as_save_IFS
11883 test -z "$as_dir" && as_dir=.
5213506e
RW
11884 for ac_exec_ext in '' $ac_executable_extensions; do
11885 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11886 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5213506e 11887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11888 break 2
11889 fi
11890done
5213506e
RW
11891 done
11892IFS=$as_save_IFS
5d47bb02 11893
5d47bb02
PG
11894fi
11895fi
11896ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
11897if test -n "$ac_ct_OBJDUMP"; then
5213506e
RW
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
11899$as_echo "$ac_ct_OBJDUMP" >&6; }
5d47bb02 11900else
5213506e
RW
11901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11902$as_echo "no" >&6; }
5d47bb02
PG
11903fi
11904
5213506e
RW
11905 if test "x$ac_ct_OBJDUMP" = x; then
11906 OBJDUMP="false"
11907 else
11908 case $cross_compiling:$ac_tool_warned in
11909yes:)
11910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11912ac_tool_warned=yes ;;
11913esac
11914 OBJDUMP=$ac_ct_OBJDUMP
11915 fi
5d47bb02
PG
11916else
11917 OBJDUMP="$ac_cv_prog_OBJDUMP"
11918fi
11919
11920test -z "$OBJDUMP" && OBJDUMP=objdump
11921
11922
11923
11924
11925
11926
11927
11928
da0f6381 11929
5213506e
RW
11930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
11931$as_echo_n "checking how to recognize dependent libraries... " >&6; }
11932if test "${lt_cv_deplibs_check_method+set}" = set; then :
11933 $as_echo_n "(cached) " >&6
da0f6381
PB
11934else
11935 lt_cv_file_magic_cmd='$MAGIC_CMD'
11936lt_cv_file_magic_test_file=
11937lt_cv_deplibs_check_method='unknown'
11938# Need to set the preceding variable on all platforms that support
11939# interlibrary dependencies.
11940# 'none' -- dependencies not supported.
11941# `unknown' -- same as none, but documents that we really don't know.
11942# 'pass_all' -- all dependencies passed with no checks.
11943# 'test_compile' -- check by making test program.
11944# 'file_magic [[regex]]' -- check by looking for files in library path
11945# which responds to the $file_magic_cmd with a given extended regex.
11946# If you have `file' or equivalent on your system and you're not sure
11947# whether `pass_all' will *always* work, you probably want this one.
11948
11949case $host_os in
11950aix[4-9]*)
11951 lt_cv_deplibs_check_method=pass_all
11952 ;;
11953
11954beos*)
11955 lt_cv_deplibs_check_method=pass_all
11956 ;;
11957
11958bsdi[45]*)
11959 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
11960 lt_cv_file_magic_cmd='/usr/bin/file -L'
11961 lt_cv_file_magic_test_file=/shlib/libc.so
11962 ;;
11963
11964cygwin*)
11965 # func_win32_libid is a shell function defined in ltmain.sh
11966 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
11967 lt_cv_file_magic_cmd='func_win32_libid'
11968 ;;
11969
11970mingw* | pw32*)
11971 # Base MSYS/MinGW do not provide the 'file' command needed by
11972 # func_win32_libid shell function, so use a weaker test based on 'objdump',
11973 # unless we find 'file', for example because we are cross-compiling.
11974 if ( file / ) >/dev/null 2>&1; then
11975 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
11976 lt_cv_file_magic_cmd='func_win32_libid'
11977 else
11978 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
11979 lt_cv_file_magic_cmd='$OBJDUMP -f'
11980 fi
11981 ;;
11982
5d47bb02
PG
11983cegcc)
11984 # use the weaker test based on 'objdump'. See mingw*.
11985 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
11986 lt_cv_file_magic_cmd='$OBJDUMP -f'
11987 ;;
11988
da0f6381
PB
11989darwin* | rhapsody*)
11990 lt_cv_deplibs_check_method=pass_all
11991 ;;
11992
11993freebsd* | dragonfly*)
11994 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
11995 case $host_cpu in
11996 i*86 )
11997 # Not sure whether the presence of OpenBSD here was a mistake.
11998 # Let's accept both of them until this is cleared up.
11999 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
12000 lt_cv_file_magic_cmd=/usr/bin/file
12001 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
12002 ;;
12003 esac
12004 else
12005 lt_cv_deplibs_check_method=pass_all
12006 fi
12007 ;;
12008
12009gnu*)
12010 lt_cv_deplibs_check_method=pass_all
12011 ;;
12012
12013hpux10.20* | hpux11*)
12014 lt_cv_file_magic_cmd=/usr/bin/file
12015 case $host_cpu in
12016 ia64*)
12017 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
12018 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
12019 ;;
12020 hppa*64*)
12021 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
12022 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
12023 ;;
12024 *)
12025 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
12026 lt_cv_file_magic_test_file=/usr/lib/libc.sl
12027 ;;
12028 esac
12029 ;;
12030
12031interix[3-9]*)
12032 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
12033 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
12034 ;;
12035
12036irix5* | irix6* | nonstopux*)
12037 case $LD in
12038 *-32|*"-32 ") libmagic=32-bit;;
12039 *-n32|*"-n32 ") libmagic=N32;;
12040 *-64|*"-64 ") libmagic=64-bit;;
12041 *) libmagic=never-match;;
12042 esac
12043 lt_cv_deplibs_check_method=pass_all
12044 ;;
12045
12046# This must be Linux ELF.
7a9d3fe8 12047linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
12048 lt_cv_deplibs_check_method=pass_all
12049 ;;
12050
12051netbsd*)
12052 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
12053 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12054 else
12055 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
12056 fi
12057 ;;
12058
12059newos6*)
12060 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
12061 lt_cv_file_magic_cmd=/usr/bin/file
12062 lt_cv_file_magic_test_file=/usr/lib/libnls.so
12063 ;;
12064
12065*nto* | *qnx*)
12066 lt_cv_deplibs_check_method=pass_all
12067 ;;
12068
12069openbsd*)
12070 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12071 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
12072 else
12073 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12074 fi
12075 ;;
12076
12077osf3* | osf4* | osf5*)
12078 lt_cv_deplibs_check_method=pass_all
12079 ;;
12080
12081rdos*)
12082 lt_cv_deplibs_check_method=pass_all
12083 ;;
12084
12085solaris*)
12086 lt_cv_deplibs_check_method=pass_all
12087 ;;
12088
12089sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12090 lt_cv_deplibs_check_method=pass_all
12091 ;;
12092
12093sysv4 | sysv4.3*)
12094 case $host_vendor in
12095 motorola)
12096 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
12097 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
12098 ;;
12099 ncr)
12100 lt_cv_deplibs_check_method=pass_all
12101 ;;
12102 sequent)
12103 lt_cv_file_magic_cmd='/bin/file'
12104 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
12105 ;;
12106 sni)
12107 lt_cv_file_magic_cmd='/bin/file'
12108 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
12109 lt_cv_file_magic_test_file=/lib/libc.so
12110 ;;
12111 siemens)
12112 lt_cv_deplibs_check_method=pass_all
12113 ;;
12114 pc)
12115 lt_cv_deplibs_check_method=pass_all
12116 ;;
12117 esac
12118 ;;
12119
12120tpf*)
12121 lt_cv_deplibs_check_method=pass_all
12122 ;;
12123esac
12124
12125fi
5213506e
RW
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
12127$as_echo "$lt_cv_deplibs_check_method" >&6; }
da0f6381
PB
12128file_magic_cmd=$lt_cv_file_magic_cmd
12129deplibs_check_method=$lt_cv_deplibs_check_method
12130test -z "$deplibs_check_method" && deplibs_check_method=unknown
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143if test -n "$ac_tool_prefix"; then
12144 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
12145set dummy ${ac_tool_prefix}ar; ac_word=$2
5213506e
RW
12146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12147$as_echo_n "checking for $ac_word... " >&6; }
12148if test "${ac_cv_prog_AR+set}" = set; then :
12149 $as_echo_n "(cached) " >&6
da0f6381
PB
12150else
12151 if test -n "$AR"; then
12152 ac_cv_prog_AR="$AR" # Let the user override the test.
12153else
12154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12155for as_dir in $PATH
12156do
12157 IFS=$as_save_IFS
12158 test -z "$as_dir" && as_dir=.
5213506e
RW
12159 for ac_exec_ext in '' $ac_executable_extensions; do
12160 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12161 ac_cv_prog_AR="${ac_tool_prefix}ar"
5213506e 12162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12163 break 2
12164 fi
12165done
5213506e
RW
12166 done
12167IFS=$as_save_IFS
da0f6381
PB
12168
12169fi
12170fi
12171AR=$ac_cv_prog_AR
12172if test -n "$AR"; then
5213506e
RW
12173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
12174$as_echo "$AR" >&6; }
da0f6381 12175else
5213506e
RW
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12177$as_echo "no" >&6; }
da0f6381
PB
12178fi
12179
5213506e 12180
da0f6381
PB
12181fi
12182if test -z "$ac_cv_prog_AR"; then
12183 ac_ct_AR=$AR
12184 # Extract the first word of "ar", so it can be a program name with args.
12185set dummy ar; ac_word=$2
5213506e
RW
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12187$as_echo_n "checking for $ac_word... " >&6; }
12188if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
12189 $as_echo_n "(cached) " >&6
da0f6381
PB
12190else
12191 if test -n "$ac_ct_AR"; then
12192 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
12193else
12194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195for as_dir in $PATH
12196do
12197 IFS=$as_save_IFS
12198 test -z "$as_dir" && as_dir=.
5213506e
RW
12199 for ac_exec_ext in '' $ac_executable_extensions; do
12200 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12201 ac_cv_prog_ac_ct_AR="ar"
5213506e 12202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12203 break 2
12204 fi
12205done
5213506e
RW
12206 done
12207IFS=$as_save_IFS
da0f6381 12208
da0f6381
PB
12209fi
12210fi
12211ac_ct_AR=$ac_cv_prog_ac_ct_AR
12212if test -n "$ac_ct_AR"; then
5213506e
RW
12213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
12214$as_echo "$ac_ct_AR" >&6; }
da0f6381 12215else
5213506e
RW
12216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12217$as_echo "no" >&6; }
da0f6381
PB
12218fi
12219
5213506e
RW
12220 if test "x$ac_ct_AR" = x; then
12221 AR="false"
12222 else
12223 case $cross_compiling:$ac_tool_warned in
12224yes:)
12225{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12226$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12227ac_tool_warned=yes ;;
12228esac
12229 AR=$ac_ct_AR
12230 fi
da0f6381
PB
12231else
12232 AR="$ac_cv_prog_AR"
12233fi
12234
12235test -z "$AR" && AR=ar
12236test -z "$AR_FLAGS" && AR_FLAGS=cru
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248if test -n "$ac_tool_prefix"; then
12249 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
12250set dummy ${ac_tool_prefix}strip; ac_word=$2
5213506e
RW
12251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12252$as_echo_n "checking for $ac_word... " >&6; }
12253if test "${ac_cv_prog_STRIP+set}" = set; then :
12254 $as_echo_n "(cached) " >&6
da0f6381
PB
12255else
12256 if test -n "$STRIP"; then
12257 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
12258else
12259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12260for as_dir in $PATH
12261do
12262 IFS=$as_save_IFS
12263 test -z "$as_dir" && as_dir=.
5213506e
RW
12264 for ac_exec_ext in '' $ac_executable_extensions; do
12265 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12266 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5213506e 12267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12268 break 2
12269 fi
12270done
5213506e
RW
12271 done
12272IFS=$as_save_IFS
da0f6381
PB
12273
12274fi
12275fi
12276STRIP=$ac_cv_prog_STRIP
12277if test -n "$STRIP"; then
5213506e
RW
12278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
12279$as_echo "$STRIP" >&6; }
da0f6381 12280else
5213506e
RW
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12282$as_echo "no" >&6; }
da0f6381
PB
12283fi
12284
5213506e 12285
da0f6381
PB
12286fi
12287if test -z "$ac_cv_prog_STRIP"; then
12288 ac_ct_STRIP=$STRIP
12289 # Extract the first word of "strip", so it can be a program name with args.
12290set dummy strip; ac_word=$2
5213506e
RW
12291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12292$as_echo_n "checking for $ac_word... " >&6; }
12293if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
12294 $as_echo_n "(cached) " >&6
da0f6381
PB
12295else
12296 if test -n "$ac_ct_STRIP"; then
12297 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
12298else
12299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12300for as_dir in $PATH
12301do
12302 IFS=$as_save_IFS
12303 test -z "$as_dir" && as_dir=.
5213506e
RW
12304 for ac_exec_ext in '' $ac_executable_extensions; do
12305 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12306 ac_cv_prog_ac_ct_STRIP="strip"
5213506e 12307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12308 break 2
12309 fi
12310done
5213506e
RW
12311 done
12312IFS=$as_save_IFS
da0f6381 12313
da0f6381
PB
12314fi
12315fi
12316ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
12317if test -n "$ac_ct_STRIP"; then
5213506e
RW
12318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
12319$as_echo "$ac_ct_STRIP" >&6; }
da0f6381 12320else
5213506e
RW
12321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12322$as_echo "no" >&6; }
da0f6381
PB
12323fi
12324
5213506e
RW
12325 if test "x$ac_ct_STRIP" = x; then
12326 STRIP=":"
12327 else
12328 case $cross_compiling:$ac_tool_warned in
12329yes:)
12330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12332ac_tool_warned=yes ;;
12333esac
12334 STRIP=$ac_ct_STRIP
12335 fi
da0f6381
PB
12336else
12337 STRIP="$ac_cv_prog_STRIP"
12338fi
12339
12340test -z "$STRIP" && STRIP=:
12341
12342
12343
12344
12345
12346
12347if test -n "$ac_tool_prefix"; then
12348 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
12349set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
12350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12351$as_echo_n "checking for $ac_word... " >&6; }
12352if test "${ac_cv_prog_RANLIB+set}" = set; then :
12353 $as_echo_n "(cached) " >&6
da0f6381
PB
12354else
12355 if test -n "$RANLIB"; then
12356 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
12357else
12358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12359for as_dir in $PATH
12360do
12361 IFS=$as_save_IFS
12362 test -z "$as_dir" && as_dir=.
5213506e
RW
12363 for ac_exec_ext in '' $ac_executable_extensions; do
12364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12365 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 12366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12367 break 2
12368 fi
12369done
5213506e
RW
12370 done
12371IFS=$as_save_IFS
da0f6381
PB
12372
12373fi
12374fi
12375RANLIB=$ac_cv_prog_RANLIB
12376if test -n "$RANLIB"; then
5213506e
RW
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
12378$as_echo "$RANLIB" >&6; }
da0f6381 12379else
5213506e
RW
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12381$as_echo "no" >&6; }
da0f6381
PB
12382fi
12383
5213506e 12384
da0f6381
PB
12385fi
12386if test -z "$ac_cv_prog_RANLIB"; then
12387 ac_ct_RANLIB=$RANLIB
12388 # Extract the first word of "ranlib", so it can be a program name with args.
12389set dummy ranlib; ac_word=$2
5213506e
RW
12390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12391$as_echo_n "checking for $ac_word... " >&6; }
12392if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
12393 $as_echo_n "(cached) " >&6
da0f6381
PB
12394else
12395 if test -n "$ac_ct_RANLIB"; then
12396 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
12397else
12398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12399for as_dir in $PATH
12400do
12401 IFS=$as_save_IFS
12402 test -z "$as_dir" && as_dir=.
5213506e
RW
12403 for ac_exec_ext in '' $ac_executable_extensions; do
12404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12405 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 12406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12407 break 2
12408 fi
12409done
5213506e
RW
12410 done
12411IFS=$as_save_IFS
da0f6381 12412
da0f6381
PB
12413fi
12414fi
12415ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
12416if test -n "$ac_ct_RANLIB"; then
5213506e
RW
12417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
12418$as_echo "$ac_ct_RANLIB" >&6; }
da0f6381 12419else
5213506e
RW
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421$as_echo "no" >&6; }
da0f6381
PB
12422fi
12423
5213506e
RW
12424 if test "x$ac_ct_RANLIB" = x; then
12425 RANLIB=":"
12426 else
12427 case $cross_compiling:$ac_tool_warned in
12428yes:)
12429{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12430$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12431ac_tool_warned=yes ;;
12432esac
12433 RANLIB=$ac_ct_RANLIB
12434 fi
da0f6381
PB
12435else
12436 RANLIB="$ac_cv_prog_RANLIB"
12437fi
12438
12439test -z "$RANLIB" && RANLIB=:
12440
12441
12442
12443
12444
12445
12446# Determine commands to create old-style static archives.
5d47bb02 12447old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
da0f6381
PB
12448old_postinstall_cmds='chmod 644 $oldlib'
12449old_postuninstall_cmds=
12450
12451if test -n "$RANLIB"; then
12452 case $host_os in
12453 openbsd*)
12454 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
12455 ;;
12456 *)
12457 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
12458 ;;
12459 esac
12460 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
12461fi
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496# If no C compiler was specified, use CC.
12497LTCC=${LTCC-"$CC"}
12498
12499# If no C compiler flags were specified, use CFLAGS.
12500LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12501
12502# Allow CC to be a program name with arguments.
12503compiler=$CC
12504
12505
12506# Check for command to grab the raw symbol name followed by C symbol from nm.
5213506e
RW
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
12508$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
12509if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
12510 $as_echo_n "(cached) " >&6
da0f6381
PB
12511else
12512
12513# These are sane defaults that work on at least a few old systems.
12514# [They come from Ultrix. What could be older than Ultrix?!! ;)]
12515
12516# Character class describing NM global symbol codes.
12517symcode='[BCDEGRST]'
12518
12519# Regexp to match symbols that can be accessed directly from C.
12520sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
12521
12522# Define system-specific variables.
12523case $host_os in
12524aix*)
12525 symcode='[BCDT]'
12526 ;;
5d47bb02 12527cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
12528 symcode='[ABCDGISTW]'
12529 ;;
12530hpux*)
12531 if test "$host_cpu" = ia64; then
12532 symcode='[ABCDEGRST]'
12533 fi
12534 ;;
12535irix* | nonstopux*)
12536 symcode='[BCDEGRST]'
12537 ;;
12538osf*)
12539 symcode='[BCDEGQRST]'
12540 ;;
12541solaris*)
12542 symcode='[BDRT]'
12543 ;;
12544sco3.2v5*)
12545 symcode='[DT]'
12546 ;;
12547sysv4.2uw2*)
12548 symcode='[DT]'
12549 ;;
12550sysv5* | sco5v6* | unixware* | OpenUNIX*)
12551 symcode='[ABDT]'
12552 ;;
12553sysv4)
12554 symcode='[DFNSTU]'
12555 ;;
12556esac
12557
12558# If we're using GNU nm, then use its standard symbol codes.
12559case `$NM -V 2>&1` in
12560*GNU* | *'with BFD'*)
12561 symcode='[ABCDGIRSTW]' ;;
12562esac
12563
12564# Transform an extracted symbol line into a proper C declaration.
12565# Some systems (esp. on ia64) link data and code symbols differently,
12566# so use this general approach.
12567lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
12568
12569# Transform an extracted symbol line into symbol name and symbol address
12570lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5d47bb02 12571lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
da0f6381
PB
12572
12573# Handle CRLF in mingw tool chain
12574opt_cr=
12575case $build_os in
12576mingw*)
12577 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
12578 ;;
12579esac
12580
12581# Try without a prefix underscore, then with it.
12582for ac_symprfx in "" "_"; do
12583
12584 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
12585 symxfrm="\\1 $ac_symprfx\\2 \\2"
12586
12587 # Write the raw and C identifiers.
12588 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
12589 # Fake it for dumpbin and say T for any non-static function
12590 # and D for any global variable.
12591 # Also find C++ and __fastcall symbols from MSVC++,
12592 # which start with @ or ?.
12593 lt_cv_sys_global_symbol_pipe="$AWK '"\
12594" {last_section=section; section=\$ 3};"\
12595" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
12596" \$ 0!~/External *\|/{next};"\
12597" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
12598" {if(hide[section]) next};"\
12599" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
12600" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
12601" s[1]~/^[@?]/{print s[1], s[1]; next};"\
12602" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
12603" ' prfx=^$ac_symprfx"
12604 else
12605 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
12606 fi
12607
12608 # Check to see that the pipe works correctly.
12609 pipe_works=no
12610
12611 rm -f conftest*
12612 cat > conftest.$ac_ext <<_LT_EOF
12613#ifdef __cplusplus
12614extern "C" {
12615#endif
12616char nm_test_var;
12617void nm_test_func(void);
12618void nm_test_func(void){}
12619#ifdef __cplusplus
12620}
12621#endif
12622int main(){nm_test_var='a';nm_test_func();return(0);}
12623_LT_EOF
12624
5213506e 12625 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12626 (eval $ac_compile) 2>&5
12627 ac_status=$?
5213506e
RW
12628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12629 test $ac_status = 0; }; then
da0f6381
PB
12630 # Now try to grab the symbols.
12631 nlist=conftest.nm
5213506e 12632 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
da0f6381
PB
12633 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
12634 ac_status=$?
5213506e
RW
12635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12636 test $ac_status = 0; } && test -s "$nlist"; then
da0f6381
PB
12637 # Try sorting and uniquifying the output.
12638 if sort "$nlist" | uniq > "$nlist"T; then
12639 mv -f "$nlist"T "$nlist"
12640 else
12641 rm -f "$nlist"T
12642 fi
12643
12644 # Make sure that we snagged all the symbols we need.
12645 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
12646 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
12647 cat <<_LT_EOF > conftest.$ac_ext
12648#ifdef __cplusplus
12649extern "C" {
12650#endif
12651
12652_LT_EOF
12653 # Now generate the symbol file.
12654 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
12655
12656 cat <<_LT_EOF >> conftest.$ac_ext
12657
12658/* The mapping between symbol names and symbols. */
12659const struct {
12660 const char *name;
12661 void *address;
12662}
12663lt__PROGRAM__LTX_preloaded_symbols[] =
12664{
12665 { "@PROGRAM@", (void *) 0 },
12666_LT_EOF
12667 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
12668 cat <<\_LT_EOF >> conftest.$ac_ext
12669 {0, (void *) 0}
12670};
12671
12672/* This works around a problem in FreeBSD linker */
12673#ifdef FREEBSD_WORKAROUND
12674static const void *lt_preloaded_setup() {
12675 return lt__PROGRAM__LTX_preloaded_symbols;
12676}
12677#endif
12678
12679#ifdef __cplusplus
12680}
12681#endif
12682_LT_EOF
12683 # Now try linking the two files.
12684 mv conftest.$ac_objext conftstm.$ac_objext
12685 lt_save_LIBS="$LIBS"
12686 lt_save_CFLAGS="$CFLAGS"
12687 LIBS="conftstm.$ac_objext"
12688 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
5213506e 12689 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
da0f6381
PB
12690 (eval $ac_link) 2>&5
12691 ac_status=$?
5213506e
RW
12692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12693 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
da0f6381
PB
12694 pipe_works=yes
12695 fi
12696 LIBS="$lt_save_LIBS"
12697 CFLAGS="$lt_save_CFLAGS"
12698 else
12699 echo "cannot find nm_test_func in $nlist" >&5
12700 fi
12701 else
12702 echo "cannot find nm_test_var in $nlist" >&5
12703 fi
12704 else
12705 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
12706 fi
12707 else
12708 echo "$progname: failed program was:" >&5
12709 cat conftest.$ac_ext >&5
12710 fi
5d47bb02 12711 rm -rf conftest* conftst*
da0f6381
PB
12712
12713 # Do not use the global_symbol_pipe unless it works.
12714 if test "$pipe_works" = yes; then
12715 break
12716 else
12717 lt_cv_sys_global_symbol_pipe=
12718 fi
12719done
12720
12721fi
12722
12723if test -z "$lt_cv_sys_global_symbol_pipe"; then
12724 lt_cv_sys_global_symbol_to_cdecl=
12725fi
12726if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5213506e
RW
12727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12728$as_echo "failed" >&6; }
da0f6381 12729else
5213506e
RW
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12731$as_echo "ok" >&6; }
da0f6381
PB
12732fi
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
5d47bb02
PG
12748
12749
12750
12751
12752
da0f6381
PB
12753
12754
5213506e
RW
12755# Check whether --enable-libtool-lock was given.
12756if test "${enable_libtool_lock+set}" = set; then :
12757 enableval=$enable_libtool_lock;
12758fi
da0f6381 12759
da0f6381
PB
12760test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
12761
12762# Some flags need to be propagated to the compiler or linker for good
12763# libtool support.
12764case $host in
12765ia64-*-hpux*)
12766 # Find out which ABI we are using.
12767 echo 'int i;' > conftest.$ac_ext
5213506e 12768 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12769 (eval $ac_compile) 2>&5
12770 ac_status=$?
5213506e
RW
12771 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12772 test $ac_status = 0; }; then
da0f6381
PB
12773 case `/usr/bin/file conftest.$ac_objext` in
12774 *ELF-32*)
12775 HPUX_IA64_MODE="32"
12776 ;;
12777 *ELF-64*)
12778 HPUX_IA64_MODE="64"
12779 ;;
12780 esac
12781 fi
12782 rm -rf conftest*
12783 ;;
12784*-*-irix6*)
12785 # Find out which ABI we are using.
d7f09764 12786 echo '#line 12786 "configure"' > conftest.$ac_ext
5213506e 12787 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12788 (eval $ac_compile) 2>&5
12789 ac_status=$?
5213506e
RW
12790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12791 test $ac_status = 0; }; then
da0f6381
PB
12792 if test "$lt_cv_prog_gnu_ld" = yes; then
12793 case `/usr/bin/file conftest.$ac_objext` in
12794 *32-bit*)
12795 LD="${LD-ld} -melf32bsmip"
12796 ;;
12797 *N32*)
12798 LD="${LD-ld} -melf32bmipn32"
12799 ;;
12800 *64-bit*)
12801 LD="${LD-ld} -melf64bmip"
12802 ;;
12803 esac
12804 else
12805 case `/usr/bin/file conftest.$ac_objext` in
12806 *32-bit*)
12807 LD="${LD-ld} -32"
12808 ;;
12809 *N32*)
12810 LD="${LD-ld} -n32"
12811 ;;
12812 *64-bit*)
12813 LD="${LD-ld} -64"
12814 ;;
12815 esac
12816 fi
12817 fi
12818 rm -rf conftest*
12819 ;;
12820
12821x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
12822s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
12823 # Find out which ABI we are using.
12824 echo 'int i;' > conftest.$ac_ext
5213506e 12825 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12826 (eval $ac_compile) 2>&5
12827 ac_status=$?
5213506e
RW
12828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12829 test $ac_status = 0; }; then
da0f6381
PB
12830 case `/usr/bin/file conftest.o` in
12831 *32-bit*)
12832 case $host in
12833 x86_64-*kfreebsd*-gnu)
12834 LD="${LD-ld} -m elf_i386_fbsd"
12835 ;;
12836 x86_64-*linux*)
12837 LD="${LD-ld} -m elf_i386"
12838 ;;
12839 ppc64-*linux*|powerpc64-*linux*)
12840 LD="${LD-ld} -m elf32ppclinux"
12841 ;;
12842 s390x-*linux*)
12843 LD="${LD-ld} -m elf_s390"
12844 ;;
12845 sparc64-*linux*)
12846 LD="${LD-ld} -m elf32_sparc"
12847 ;;
12848 esac
12849 ;;
12850 *64-bit*)
12851 case $host in
12852 x86_64-*kfreebsd*-gnu)
12853 LD="${LD-ld} -m elf_x86_64_fbsd"
12854 ;;
12855 x86_64-*linux*)
12856 LD="${LD-ld} -m elf_x86_64"
12857 ;;
12858 ppc*-*linux*|powerpc*-*linux*)
12859 LD="${LD-ld} -m elf64ppc"
12860 ;;
12861 s390*-*linux*|s390*-*tpf*)
12862 LD="${LD-ld} -m elf64_s390"
12863 ;;
12864 sparc*-*linux*)
12865 LD="${LD-ld} -m elf64_sparc"
12866 ;;
12867 esac
12868 ;;
12869 esac
12870 fi
12871 rm -rf conftest*
12872 ;;
12873
12874*-*-sco3.2v5*)
12875 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
12876 SAVE_CFLAGS="$CFLAGS"
12877 CFLAGS="$CFLAGS -belf"
5213506e
RW
12878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
12879$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
12880if test "${lt_cv_cc_needs_belf+set}" = set; then :
12881 $as_echo_n "(cached) " >&6
da0f6381
PB
12882else
12883 ac_ext=c
12884ac_cpp='$CPP $CPPFLAGS'
12885ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12886ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12887ac_compiler_gnu=$ac_cv_c_compiler_gnu
12888
5213506e 12889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
12890/* end confdefs.h. */
12891
12892int
12893main ()
12894{
12895
12896 ;
12897 return 0;
12898}
12899_ACEOF
5213506e 12900if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
12901 lt_cv_cc_needs_belf=yes
12902else
5213506e 12903 lt_cv_cc_needs_belf=no
da0f6381 12904fi
5213506e
RW
12905rm -f core conftest.err conftest.$ac_objext \
12906 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
12907 ac_ext=c
12908ac_cpp='$CPP $CPPFLAGS'
12909ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12910ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12911ac_compiler_gnu=$ac_cv_c_compiler_gnu
12912
12913fi
5213506e
RW
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
12915$as_echo "$lt_cv_cc_needs_belf" >&6; }
da0f6381
PB
12916 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
12917 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
12918 CFLAGS="$SAVE_CFLAGS"
12919 fi
12920 ;;
12921sparc*-*solaris*)
12922 # Find out which ABI we are using.
12923 echo 'int i;' > conftest.$ac_ext
5213506e 12924 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12925 (eval $ac_compile) 2>&5
12926 ac_status=$?
5213506e
RW
12927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12928 test $ac_status = 0; }; then
da0f6381
PB
12929 case `/usr/bin/file conftest.o` in
12930 *64-bit*)
12931 case $lt_cv_prog_gnu_ld in
12932 yes*) LD="${LD-ld} -m elf64_sparc" ;;
5d47bb02
PG
12933 *)
12934 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
12935 LD="${LD-ld} -64"
12936 fi
12937 ;;
da0f6381
PB
12938 esac
12939 ;;
12940 esac
12941 fi
12942 rm -rf conftest*
12943 ;;
12944esac
12945
5d47bb02
PG
12946need_locks="$enable_libtool_lock"
12947
12948
12949 case $host_os in
12950 rhapsody* | darwin*)
12951 if test -n "$ac_tool_prefix"; then
12952 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
12953set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
5213506e
RW
12954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12955$as_echo_n "checking for $ac_word... " >&6; }
12956if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
12957 $as_echo_n "(cached) " >&6
5d47bb02
PG
12958else
12959 if test -n "$DSYMUTIL"; then
12960 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
12961else
12962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12963for as_dir in $PATH
12964do
12965 IFS=$as_save_IFS
12966 test -z "$as_dir" && as_dir=.
5213506e
RW
12967 for ac_exec_ext in '' $ac_executable_extensions; do
12968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 12969 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
5213506e 12970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
12971 break 2
12972 fi
12973done
5213506e
RW
12974 done
12975IFS=$as_save_IFS
5d47bb02
PG
12976
12977fi
12978fi
12979DSYMUTIL=$ac_cv_prog_DSYMUTIL
12980if test -n "$DSYMUTIL"; then
5213506e
RW
12981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
12982$as_echo "$DSYMUTIL" >&6; }
5d47bb02 12983else
5213506e
RW
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12985$as_echo "no" >&6; }
5d47bb02
PG
12986fi
12987
5213506e 12988
5d47bb02
PG
12989fi
12990if test -z "$ac_cv_prog_DSYMUTIL"; then
12991 ac_ct_DSYMUTIL=$DSYMUTIL
12992 # Extract the first word of "dsymutil", so it can be a program name with args.
12993set dummy dsymutil; ac_word=$2
5213506e
RW
12994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12995$as_echo_n "checking for $ac_word... " >&6; }
12996if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
12997 $as_echo_n "(cached) " >&6
5d47bb02
PG
12998else
12999 if test -n "$ac_ct_DSYMUTIL"; then
13000 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
13001else
13002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13003for as_dir in $PATH
13004do
13005 IFS=$as_save_IFS
13006 test -z "$as_dir" && as_dir=.
5213506e
RW
13007 for ac_exec_ext in '' $ac_executable_extensions; do
13008 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13009 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
5213506e 13010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13011 break 2
13012 fi
13013done
5213506e
RW
13014 done
13015IFS=$as_save_IFS
5d47bb02 13016
5d47bb02
PG
13017fi
13018fi
13019ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
13020if test -n "$ac_ct_DSYMUTIL"; then
5213506e
RW
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
13022$as_echo "$ac_ct_DSYMUTIL" >&6; }
5d47bb02 13023else
5213506e
RW
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13025$as_echo "no" >&6; }
5d47bb02
PG
13026fi
13027
5213506e
RW
13028 if test "x$ac_ct_DSYMUTIL" = x; then
13029 DSYMUTIL=":"
13030 else
13031 case $cross_compiling:$ac_tool_warned in
13032yes:)
13033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13035ac_tool_warned=yes ;;
13036esac
13037 DSYMUTIL=$ac_ct_DSYMUTIL
13038 fi
5d47bb02
PG
13039else
13040 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
13041fi
13042
13043 if test -n "$ac_tool_prefix"; then
13044 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
13045set dummy ${ac_tool_prefix}nmedit; ac_word=$2
5213506e
RW
13046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13047$as_echo_n "checking for $ac_word... " >&6; }
13048if test "${ac_cv_prog_NMEDIT+set}" = set; then :
13049 $as_echo_n "(cached) " >&6
5d47bb02
PG
13050else
13051 if test -n "$NMEDIT"; then
13052 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
13053else
13054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057 IFS=$as_save_IFS
13058 test -z "$as_dir" && as_dir=.
5213506e
RW
13059 for ac_exec_ext in '' $ac_executable_extensions; do
13060 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13061 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
5213506e 13062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13063 break 2
13064 fi
13065done
5213506e
RW
13066 done
13067IFS=$as_save_IFS
5d47bb02
PG
13068
13069fi
13070fi
13071NMEDIT=$ac_cv_prog_NMEDIT
13072if test -n "$NMEDIT"; then
5213506e
RW
13073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
13074$as_echo "$NMEDIT" >&6; }
5d47bb02 13075else
5213506e
RW
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077$as_echo "no" >&6; }
5d47bb02
PG
13078fi
13079
5213506e 13080
5d47bb02
PG
13081fi
13082if test -z "$ac_cv_prog_NMEDIT"; then
13083 ac_ct_NMEDIT=$NMEDIT
13084 # Extract the first word of "nmedit", so it can be a program name with args.
13085set dummy nmedit; ac_word=$2
5213506e
RW
13086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13087$as_echo_n "checking for $ac_word... " >&6; }
13088if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
13089 $as_echo_n "(cached) " >&6
5d47bb02
PG
13090else
13091 if test -n "$ac_ct_NMEDIT"; then
13092 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
13093else
13094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13095for as_dir in $PATH
13096do
13097 IFS=$as_save_IFS
13098 test -z "$as_dir" && as_dir=.
5213506e
RW
13099 for ac_exec_ext in '' $ac_executable_extensions; do
13100 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13101 ac_cv_prog_ac_ct_NMEDIT="nmedit"
5213506e 13102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13103 break 2
13104 fi
13105done
5213506e
RW
13106 done
13107IFS=$as_save_IFS
5d47bb02 13108
5d47bb02
PG
13109fi
13110fi
13111ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
13112if test -n "$ac_ct_NMEDIT"; then
5213506e
RW
13113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
13114$as_echo "$ac_ct_NMEDIT" >&6; }
5d47bb02 13115else
5213506e
RW
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13117$as_echo "no" >&6; }
5d47bb02
PG
13118fi
13119
5213506e
RW
13120 if test "x$ac_ct_NMEDIT" = x; then
13121 NMEDIT=":"
13122 else
13123 case $cross_compiling:$ac_tool_warned in
13124yes:)
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13127ac_tool_warned=yes ;;
13128esac
13129 NMEDIT=$ac_ct_NMEDIT
13130 fi
5d47bb02
PG
13131else
13132 NMEDIT="$ac_cv_prog_NMEDIT"
13133fi
13134
13135 if test -n "$ac_tool_prefix"; then
13136 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
13137set dummy ${ac_tool_prefix}lipo; ac_word=$2
5213506e
RW
13138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13139$as_echo_n "checking for $ac_word... " >&6; }
13140if test "${ac_cv_prog_LIPO+set}" = set; then :
13141 $as_echo_n "(cached) " >&6
5d47bb02
PG
13142else
13143 if test -n "$LIPO"; then
13144 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
13145else
13146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149 IFS=$as_save_IFS
13150 test -z "$as_dir" && as_dir=.
5213506e
RW
13151 for ac_exec_ext in '' $ac_executable_extensions; do
13152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13153 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
5213506e 13154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13155 break 2
13156 fi
13157done
5213506e
RW
13158 done
13159IFS=$as_save_IFS
5d47bb02
PG
13160
13161fi
13162fi
13163LIPO=$ac_cv_prog_LIPO
13164if test -n "$LIPO"; then
5213506e
RW
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
13166$as_echo "$LIPO" >&6; }
5d47bb02 13167else
5213506e
RW
13168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13169$as_echo "no" >&6; }
5d47bb02
PG
13170fi
13171
5213506e 13172
5d47bb02
PG
13173fi
13174if test -z "$ac_cv_prog_LIPO"; then
13175 ac_ct_LIPO=$LIPO
13176 # Extract the first word of "lipo", so it can be a program name with args.
13177set dummy lipo; ac_word=$2
5213506e
RW
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
13181 $as_echo_n "(cached) " >&6
5d47bb02
PG
13182else
13183 if test -n "$ac_ct_LIPO"; then
13184 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189 IFS=$as_save_IFS
13190 test -z "$as_dir" && as_dir=.
5213506e
RW
13191 for ac_exec_ext in '' $ac_executable_extensions; do
13192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13193 ac_cv_prog_ac_ct_LIPO="lipo"
5213506e 13194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13195 break 2
13196 fi
13197done
5213506e
RW
13198 done
13199IFS=$as_save_IFS
5d47bb02 13200
5d47bb02
PG
13201fi
13202fi
13203ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
13204if test -n "$ac_ct_LIPO"; then
5213506e
RW
13205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
13206$as_echo "$ac_ct_LIPO" >&6; }
5d47bb02 13207else
5213506e
RW
13208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
5d47bb02
PG
13210fi
13211
5213506e
RW
13212 if test "x$ac_ct_LIPO" = x; then
13213 LIPO=":"
13214 else
13215 case $cross_compiling:$ac_tool_warned in
13216yes:)
13217{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13218$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13219ac_tool_warned=yes ;;
13220esac
13221 LIPO=$ac_ct_LIPO
13222 fi
5d47bb02
PG
13223else
13224 LIPO="$ac_cv_prog_LIPO"
13225fi
13226
13227 if test -n "$ac_tool_prefix"; then
13228 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
13229set dummy ${ac_tool_prefix}otool; ac_word=$2
5213506e
RW
13230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13231$as_echo_n "checking for $ac_word... " >&6; }
13232if test "${ac_cv_prog_OTOOL+set}" = set; then :
13233 $as_echo_n "(cached) " >&6
5d47bb02
PG
13234else
13235 if test -n "$OTOOL"; then
13236 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
13237else
13238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13239for as_dir in $PATH
13240do
13241 IFS=$as_save_IFS
13242 test -z "$as_dir" && as_dir=.
5213506e
RW
13243 for ac_exec_ext in '' $ac_executable_extensions; do
13244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13245 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
5213506e 13246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13247 break 2
13248 fi
13249done
5213506e
RW
13250 done
13251IFS=$as_save_IFS
5d47bb02
PG
13252
13253fi
13254fi
13255OTOOL=$ac_cv_prog_OTOOL
13256if test -n "$OTOOL"; then
5213506e
RW
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
13258$as_echo "$OTOOL" >&6; }
5d47bb02 13259else
5213506e
RW
13260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13261$as_echo "no" >&6; }
5d47bb02
PG
13262fi
13263
5213506e 13264
5d47bb02
PG
13265fi
13266if test -z "$ac_cv_prog_OTOOL"; then
13267 ac_ct_OTOOL=$OTOOL
13268 # Extract the first word of "otool", so it can be a program name with args.
13269set dummy otool; ac_word=$2
5213506e
RW
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13271$as_echo_n "checking for $ac_word... " >&6; }
13272if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
13273 $as_echo_n "(cached) " >&6
5d47bb02
PG
13274else
13275 if test -n "$ac_ct_OTOOL"; then
13276 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
13277else
13278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13279for as_dir in $PATH
13280do
13281 IFS=$as_save_IFS
13282 test -z "$as_dir" && as_dir=.
5213506e
RW
13283 for ac_exec_ext in '' $ac_executable_extensions; do
13284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13285 ac_cv_prog_ac_ct_OTOOL="otool"
5213506e 13286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13287 break 2
13288 fi
13289done
5213506e
RW
13290 done
13291IFS=$as_save_IFS
5d47bb02 13292
5d47bb02
PG
13293fi
13294fi
13295ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
13296if test -n "$ac_ct_OTOOL"; then
5213506e
RW
13297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
13298$as_echo "$ac_ct_OTOOL" >&6; }
5d47bb02 13299else
5213506e
RW
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13301$as_echo "no" >&6; }
5d47bb02
PG
13302fi
13303
5213506e
RW
13304 if test "x$ac_ct_OTOOL" = x; then
13305 OTOOL=":"
13306 else
13307 case $cross_compiling:$ac_tool_warned in
13308yes:)
13309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13311ac_tool_warned=yes ;;
13312esac
13313 OTOOL=$ac_ct_OTOOL
13314 fi
5d47bb02
PG
13315else
13316 OTOOL="$ac_cv_prog_OTOOL"
13317fi
13318
13319 if test -n "$ac_tool_prefix"; then
13320 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
13321set dummy ${ac_tool_prefix}otool64; ac_word=$2
5213506e
RW
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13323$as_echo_n "checking for $ac_word... " >&6; }
13324if test "${ac_cv_prog_OTOOL64+set}" = set; then :
13325 $as_echo_n "(cached) " >&6
5d47bb02
PG
13326else
13327 if test -n "$OTOOL64"; then
13328 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
13329else
13330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13331for as_dir in $PATH
13332do
13333 IFS=$as_save_IFS
13334 test -z "$as_dir" && as_dir=.
5213506e
RW
13335 for ac_exec_ext in '' $ac_executable_extensions; do
13336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13337 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
5213506e 13338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13339 break 2
13340 fi
13341done
5213506e
RW
13342 done
13343IFS=$as_save_IFS
5d47bb02
PG
13344
13345fi
13346fi
13347OTOOL64=$ac_cv_prog_OTOOL64
13348if test -n "$OTOOL64"; then
5213506e
RW
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
13350$as_echo "$OTOOL64" >&6; }
5d47bb02 13351else
5213506e
RW
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13353$as_echo "no" >&6; }
5d47bb02
PG
13354fi
13355
5213506e 13356
5d47bb02
PG
13357fi
13358if test -z "$ac_cv_prog_OTOOL64"; then
13359 ac_ct_OTOOL64=$OTOOL64
13360 # Extract the first word of "otool64", so it can be a program name with args.
13361set dummy otool64; ac_word=$2
5213506e
RW
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13363$as_echo_n "checking for $ac_word... " >&6; }
13364if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
13365 $as_echo_n "(cached) " >&6
5d47bb02
PG
13366else
13367 if test -n "$ac_ct_OTOOL64"; then
13368 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
13369else
13370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13371for as_dir in $PATH
13372do
13373 IFS=$as_save_IFS
13374 test -z "$as_dir" && as_dir=.
5213506e
RW
13375 for ac_exec_ext in '' $ac_executable_extensions; do
13376 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13377 ac_cv_prog_ac_ct_OTOOL64="otool64"
5213506e 13378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13379 break 2
13380 fi
13381done
5213506e
RW
13382 done
13383IFS=$as_save_IFS
5d47bb02 13384
5d47bb02
PG
13385fi
13386fi
13387ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
13388if test -n "$ac_ct_OTOOL64"; then
5213506e
RW
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
13390$as_echo "$ac_ct_OTOOL64" >&6; }
5d47bb02 13391else
5213506e
RW
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13393$as_echo "no" >&6; }
5d47bb02
PG
13394fi
13395
5213506e
RW
13396 if test "x$ac_ct_OTOOL64" = x; then
13397 OTOOL64=":"
13398 else
13399 case $cross_compiling:$ac_tool_warned in
13400yes:)
13401{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13402$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13403ac_tool_warned=yes ;;
13404esac
13405 OTOOL64=$ac_ct_OTOOL64
13406 fi
5d47bb02
PG
13407else
13408 OTOOL64="$ac_cv_prog_OTOOL64"
13409fi
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
5213506e
RW
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
13438$as_echo_n "checking for -single_module linker flag... " >&6; }
13439if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
13440 $as_echo_n "(cached) " >&6
5d47bb02
PG
13441else
13442 lt_cv_apple_cc_single_mod=no
13443 if test -z "${LT_MULTI_MODULE}"; then
13444 # By default we will add the -single_module flag. You can override
13445 # by either setting the environment variable LT_MULTI_MODULE
13446 # non-empty at configure time, or by adding -multi_module to the
13447 # link flags.
13448 rm -rf libconftest.dylib*
13449 echo "int foo(void){return 1;}" > conftest.c
13450 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13451-dynamiclib -Wl,-single_module conftest.c" >&5
13452 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13453 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
13454 _lt_result=$?
13455 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
13456 lt_cv_apple_cc_single_mod=yes
13457 else
13458 cat conftest.err >&5
13459 fi
13460 rm -rf libconftest.dylib*
13461 rm -f conftest.*
13462 fi
13463fi
5213506e
RW
13464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
13465$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
13466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
13467$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
13468if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
13469 $as_echo_n "(cached) " >&6
5d47bb02
PG
13470else
13471 lt_cv_ld_exported_symbols_list=no
13472 save_LDFLAGS=$LDFLAGS
13473 echo "_main" > conftest.sym
13474 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
5213506e 13475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d47bb02
PG
13476/* end confdefs.h. */
13477
13478int
13479main ()
13480{
13481
13482 ;
13483 return 0;
13484}
13485_ACEOF
5213506e 13486if ac_fn_c_try_link "$LINENO"; then :
5d47bb02
PG
13487 lt_cv_ld_exported_symbols_list=yes
13488else
5213506e 13489 lt_cv_ld_exported_symbols_list=no
5d47bb02 13490fi
5213506e
RW
13491rm -f core conftest.err conftest.$ac_objext \
13492 conftest$ac_exeext conftest.$ac_ext
5d47bb02
PG
13493 LDFLAGS="$save_LDFLAGS"
13494
13495fi
5213506e
RW
13496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
13497$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
5d47bb02
PG
13498 case $host_os in
13499 rhapsody* | darwin1.[012])
13500 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
13501 darwin1.*)
13502 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13503 darwin*) # darwin 5.x on
13504 # if running on 10.5 or later, the deployment target defaults
13505 # to the OS version, if on x86, and 10.4, the deployment
13506 # target defaults to 10.4. Don't you love it?
13507 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
13508 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
13509 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13510 10.[012]*)
13511 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13512 10.*)
13513 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13514 esac
13515 ;;
13516 esac
13517 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
13518 _lt_dar_single_mod='$single_module'
13519 fi
13520 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
13521 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
13522 else
13523 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
13524 fi
13525 if test "$DSYMUTIL" != ":"; then
13526 _lt_dsymutil='~$DSYMUTIL $lib || :'
13527 else
13528 _lt_dsymutil=
13529 fi
13530 ;;
13531 esac
da0f6381 13532
da0f6381 13533for ac_header in dlfcn.h
5213506e
RW
13534do :
13535 ac_fn_c_check_header_preproc "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h"
13536if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
da0f6381 13537 cat >>confdefs.h <<_ACEOF
5213506e 13538#define HAVE_DLFCN_H 1
da0f6381
PB
13539_ACEOF
13540
13541fi
13542done
13543
13544
13545
5213506e 13546ac_ext=cpp
00020c16
ILT
13547ac_cpp='$CXXCPP $CPPFLAGS'
13548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5213506e
RW
13551if test -z "$CXX"; then
13552 if test -n "$CCC"; then
13553 CXX=$CCC
13554 else
13555 if test -n "$ac_tool_prefix"; then
13556 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
00020c16
ILT
13557 do
13558 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13559set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13561$as_echo_n "checking for $ac_word... " >&6; }
13562if test "${ac_cv_prog_CXX+set}" = set; then :
13563 $as_echo_n "(cached) " >&6
00020c16
ILT
13564else
13565 if test -n "$CXX"; then
13566 ac_cv_prog_CXX="$CXX" # Let the user override the test.
13567else
13568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13569for as_dir in $PATH
13570do
13571 IFS=$as_save_IFS
13572 test -z "$as_dir" && as_dir=.
5213506e
RW
13573 for ac_exec_ext in '' $ac_executable_extensions; do
13574 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 13575 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5213506e 13576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
13577 break 2
13578 fi
13579done
5213506e
RW
13580 done
13581IFS=$as_save_IFS
5d47bb02 13582
00020c16
ILT
13583fi
13584fi
13585CXX=$ac_cv_prog_CXX
13586if test -n "$CXX"; then
5213506e
RW
13587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
13588$as_echo "$CXX" >&6; }
00020c16 13589else
5213506e
RW
13590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13591$as_echo "no" >&6; }
00020c16 13592fi
5d47bb02 13593
5213506e 13594
00020c16
ILT
13595 test -n "$CXX" && break
13596 done
13597fi
13598if test -z "$CXX"; then
13599 ac_ct_CXX=$CXX
5213506e 13600 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
00020c16
ILT
13601do
13602 # Extract the first word of "$ac_prog", so it can be a program name with args.
13603set dummy $ac_prog; ac_word=$2
5213506e
RW
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13605$as_echo_n "checking for $ac_word... " >&6; }
13606if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
13607 $as_echo_n "(cached) " >&6
5d47bb02 13608else
00020c16
ILT
13609 if test -n "$ac_ct_CXX"; then
13610 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5d47bb02 13611else
00020c16
ILT
13612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13613for as_dir in $PATH
13614do
13615 IFS=$as_save_IFS
13616 test -z "$as_dir" && as_dir=.
5213506e
RW
13617 for ac_exec_ext in '' $ac_executable_extensions; do
13618 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 13619 ac_cv_prog_ac_ct_CXX="$ac_prog"
5213506e 13620 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
13621 break 2
13622 fi
13623done
5213506e
RW
13624 done
13625IFS=$as_save_IFS
5d47bb02 13626
00020c16
ILT
13627fi
13628fi
13629ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
13630if test -n "$ac_ct_CXX"; then
5213506e
RW
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
13632$as_echo "$ac_ct_CXX" >&6; }
5d47bb02 13633else
5213506e
RW
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13635$as_echo "no" >&6; }
00020c16 13636fi
5d47bb02 13637
5213506e 13638
00020c16
ILT
13639 test -n "$ac_ct_CXX" && break
13640done
5d47bb02 13641
5213506e
RW
13642 if test "x$ac_ct_CXX" = x; then
13643 CXX="g++"
13644 else
13645 case $cross_compiling:$ac_tool_warned in
13646yes:)
13647{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13648$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13649ac_tool_warned=yes ;;
13650esac
13651 CXX=$ac_ct_CXX
13652 fi
00020c16 13653fi
5d47bb02 13654
5213506e
RW
13655 fi
13656fi
00020c16 13657# Provide some information about the compiler.
5213506e
RW
13658$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
13659set X $ac_compile
13660ac_compiler=$2
13661for ac_option in --version -v -V -qversion; do
13662 { { ac_try="$ac_compiler $ac_option >&5"
13663case "(($ac_try" in
13664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13665 *) ac_try_echo=$ac_try;;
13666esac
13667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13668$as_echo "$ac_try_echo"; } >&5
13669 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
00020c16 13670 ac_status=$?
5213506e
RW
13671 if test -s conftest.err; then
13672 sed '10a\
13673... rest of stderr output deleted ...
13674 10q' conftest.err >conftest.er1
13675 cat conftest.er1 >&5
13676 rm -f conftest.er1 conftest.err
13677 fi
13678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13679 test $ac_status = 0; }
13680done
5d47bb02 13681
5213506e
RW
13682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
13683$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
13684if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
13685 $as_echo_n "(cached) " >&6
5d47bb02 13686else
5213506e 13687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 13688/* end confdefs.h. */
da0f6381 13689
00020c16
ILT
13690int
13691main ()
13692{
13693#ifndef __GNUC__
13694 choke me
13695#endif
da0f6381 13696
00020c16
ILT
13697 ;
13698 return 0;
13699}
13700_ACEOF
5213506e 13701if ac_fn_cxx_try_compile "$LINENO"; then :
00020c16
ILT
13702 ac_compiler_gnu=yes
13703else
5213506e 13704 ac_compiler_gnu=no
da0f6381 13705fi
5213506e 13706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
13707ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
13708
13709fi
5213506e
RW
13710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
13711$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
13712if test $ac_compiler_gnu = yes; then
13713 GXX=yes
00020c16 13714else
5213506e 13715 GXX=
00020c16 13716fi
5213506e
RW
13717ac_test_CXXFLAGS=${CXXFLAGS+set}
13718ac_save_CXXFLAGS=$CXXFLAGS
13719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
13720$as_echo_n "checking whether $CXX accepts -g... " >&6; }
13721if test "${ac_cv_prog_cxx_g+set}" = set; then :
13722 $as_echo_n "(cached) " >&6
13723else
13724 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
13725 ac_cxx_werror_flag=yes
13726 ac_cv_prog_cxx_g=no
13727 CXXFLAGS="-g"
13728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 13729/* end confdefs.h. */
5213506e 13730
00020c16
ILT
13731int
13732main ()
13733{
5213506e 13734
00020c16
ILT
13735 ;
13736 return 0;
13737}
13738_ACEOF
5213506e
RW
13739if ac_fn_cxx_try_compile "$LINENO"; then :
13740 ac_cv_prog_cxx_g=yes
00020c16 13741else
5213506e
RW
13742 CXXFLAGS=""
13743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 13744/* end confdefs.h. */
5213506e 13745
00020c16
ILT
13746int
13747main ()
13748{
5213506e 13749
00020c16
ILT
13750 ;
13751 return 0;
13752}
13753_ACEOF
5213506e
RW
13754if ac_fn_cxx_try_compile "$LINENO"; then :
13755
00020c16 13756else
5213506e
RW
13757 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
13758 CXXFLAGS="-g"
13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13760/* end confdefs.h. */
13761
13762int
13763main ()
13764{
da0f6381 13765
5213506e
RW
13766 ;
13767 return 0;
13768}
13769_ACEOF
13770if ac_fn_cxx_try_compile "$LINENO"; then :
13771 ac_cv_prog_cxx_g=yes
00020c16 13772fi
5213506e
RW
13773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13774fi
13775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13776fi
13777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13778 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
13779fi
13780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
13781$as_echo "$ac_cv_prog_cxx_g" >&6; }
13782if test "$ac_test_CXXFLAGS" = set; then
13783 CXXFLAGS=$ac_save_CXXFLAGS
13784elif test $ac_cv_prog_cxx_g = yes; then
13785 if test "$GXX" = yes; then
13786 CXXFLAGS="-g -O2"
13787 else
13788 CXXFLAGS="-g"
13789 fi
13790else
13791 if test "$GXX" = yes; then
13792 CXXFLAGS="-O2"
13793 else
13794 CXXFLAGS=
13795 fi
00020c16 13796fi
00020c16
ILT
13797ac_ext=c
13798ac_cpp='$CPP $CPPFLAGS'
13799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13801ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 13802
00020c16
ILT
13803if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
13804 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
13805 (test "X$CXX" != "Xg++"))) ; then
5213506e 13806 ac_ext=cpp
00020c16
ILT
13807ac_cpp='$CXXCPP $CPPFLAGS'
13808ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13809ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13810ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5213506e
RW
13811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
13812$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
00020c16 13813if test -z "$CXXCPP"; then
5213506e
RW
13814 if test "${ac_cv_prog_CXXCPP+set}" = set; then :
13815 $as_echo_n "(cached) " >&6
00020c16
ILT
13816else
13817 # Double quotes because CXXCPP needs to be expanded
13818 for CXXCPP in "$CXX -E" "/lib/cpp"
13819 do
13820 ac_preproc_ok=false
13821for ac_cxx_preproc_warn_flag in '' yes
13822do
13823 # Use a header file that comes with gcc, so configuring glibc
13824 # with a fresh cross-compiler works.
13825 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13826 # <limits.h> exists even on freestanding compilers.
13827 # On the NeXT, cc -E runs the code through the compiler's parser,
13828 # not just through cpp. "Syntax error" is here to catch this case.
5213506e 13829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
13830/* end confdefs.h. */
13831#ifdef __STDC__
13832# include <limits.h>
13833#else
13834# include <assert.h>
13835#endif
13836 Syntax error
13837_ACEOF
5213506e 13838if ac_fn_cxx_try_cpp "$LINENO"; then :
da0f6381 13839
5213506e 13840else
00020c16
ILT
13841 # Broken: fails on valid input.
13842continue
13843fi
13844rm -f conftest.err conftest.$ac_ext
da0f6381 13845
5213506e 13846 # OK, works on sane cases. Now check whether nonexistent headers
00020c16 13847 # can be detected and how.
5213506e 13848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
13849/* end confdefs.h. */
13850#include <ac_nonexistent.h>
13851_ACEOF
5213506e 13852if ac_fn_cxx_try_cpp "$LINENO"; then :
00020c16
ILT
13853 # Broken: success on invalid input.
13854continue
13855else
00020c16
ILT
13856 # Passes both tests.
13857ac_preproc_ok=:
13858break
13859fi
13860rm -f conftest.err conftest.$ac_ext
da0f6381 13861
00020c16
ILT
13862done
13863# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13864rm -f conftest.err conftest.$ac_ext
5213506e 13865if $ac_preproc_ok; then :
00020c16
ILT
13866 break
13867fi
da0f6381 13868
00020c16
ILT
13869 done
13870 ac_cv_prog_CXXCPP=$CXXCPP
da0f6381 13871
00020c16
ILT
13872fi
13873 CXXCPP=$ac_cv_prog_CXXCPP
13874else
13875 ac_cv_prog_CXXCPP=$CXXCPP
13876fi
5213506e
RW
13877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
13878$as_echo "$CXXCPP" >&6; }
00020c16
ILT
13879ac_preproc_ok=false
13880for ac_cxx_preproc_warn_flag in '' yes
13881do
13882 # Use a header file that comes with gcc, so configuring glibc
13883 # with a fresh cross-compiler works.
13884 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13885 # <limits.h> exists even on freestanding compilers.
13886 # On the NeXT, cc -E runs the code through the compiler's parser,
13887 # not just through cpp. "Syntax error" is here to catch this case.
5213506e 13888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
13889/* end confdefs.h. */
13890#ifdef __STDC__
13891# include <limits.h>
13892#else
13893# include <assert.h>
13894#endif
13895 Syntax error
13896_ACEOF
5213506e 13897if ac_fn_cxx_try_cpp "$LINENO"; then :
da0f6381 13898
5213506e 13899else
00020c16
ILT
13900 # Broken: fails on valid input.
13901continue
13902fi
13903rm -f conftest.err conftest.$ac_ext
da0f6381 13904
5213506e 13905 # OK, works on sane cases. Now check whether nonexistent headers
00020c16 13906 # can be detected and how.
5213506e 13907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
13908/* end confdefs.h. */
13909#include <ac_nonexistent.h>
13910_ACEOF
5213506e 13911if ac_fn_cxx_try_cpp "$LINENO"; then :
00020c16
ILT
13912 # Broken: success on invalid input.
13913continue
13914else
00020c16
ILT
13915 # Passes both tests.
13916ac_preproc_ok=:
13917break
13918fi
13919rm -f conftest.err conftest.$ac_ext
da0f6381 13920
00020c16
ILT
13921done
13922# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13923rm -f conftest.err conftest.$ac_ext
5213506e
RW
13924if $ac_preproc_ok; then :
13925
00020c16 13926else
5213506e
RW
13927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16
ILT
13929_lt_caught_CXX_error=yes; }
13930fi
da0f6381 13931
00020c16
ILT
13932ac_ext=c
13933ac_cpp='$CPP $CPPFLAGS'
13934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13936ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 13937
00020c16
ILT
13938else
13939 _lt_caught_CXX_error=yes
13940fi
da0f6381 13941
da0f6381 13942
da0f6381 13943
da0f6381 13944
da0f6381 13945
00020c16 13946# Set options
da0f6381
PB
13947
13948
da0f6381 13949
00020c16 13950 enable_dlopen=no
da0f6381 13951
da0f6381 13952
00020c16
ILT
13953 enable_win32_dll=no
13954
13955
5213506e
RW
13956 # Check whether --enable-shared was given.
13957if test "${enable_shared+set}" = set; then :
13958 enableval=$enable_shared; p=${PACKAGE-default}
00020c16
ILT
13959 case $enableval in
13960 yes) enable_shared=yes ;;
13961 no) enable_shared=no ;;
13962 *)
13963 enable_shared=no
13964 # Look at the argument we got. We use all the common list separators.
13965 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13966 for pkg in $enableval; do
13967 IFS="$lt_save_ifs"
13968 if test "X$pkg" = "X$p"; then
13969 enable_shared=yes
13970 fi
13971 done
13972 IFS="$lt_save_ifs"
13973 ;;
13974 esac
da0f6381 13975else
00020c16 13976 enable_shared=yes
5213506e
RW
13977fi
13978
da0f6381
PB
13979
13980
13981
13982
13983
da0f6381 13984
da0f6381 13985
da0f6381 13986
5213506e
RW
13987 # Check whether --enable-static was given.
13988if test "${enable_static+set}" = set; then :
13989 enableval=$enable_static; p=${PACKAGE-default}
00020c16
ILT
13990 case $enableval in
13991 yes) enable_static=yes ;;
13992 no) enable_static=no ;;
13993 *)
13994 enable_static=no
13995 # Look at the argument we got. We use all the common list separators.
13996 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13997 for pkg in $enableval; do
13998 IFS="$lt_save_ifs"
13999 if test "X$pkg" = "X$p"; then
14000 enable_static=yes
14001 fi
14002 done
14003 IFS="$lt_save_ifs"
14004 ;;
14005 esac
da0f6381 14006else
00020c16 14007 enable_static=yes
5213506e 14008fi
da0f6381
PB
14009
14010
da0f6381 14011
da0f6381 14012
da0f6381 14013
da0f6381
PB
14014
14015
da0f6381 14016
da0f6381 14017
5213506e
RW
14018
14019# Check whether --with-pic was given.
14020if test "${with_pic+set}" = set; then :
14021 withval=$with_pic; pic_mode="$withval"
00020c16
ILT
14022else
14023 pic_mode=default
5213506e
RW
14024fi
14025
da0f6381 14026
00020c16 14027test -z "$pic_mode" && pic_mode=default
da0f6381
PB
14028
14029
14030
14031
14032
14033
14034
5213506e
RW
14035 # Check whether --enable-fast-install was given.
14036if test "${enable_fast_install+set}" = set; then :
14037 enableval=$enable_fast_install; p=${PACKAGE-default}
00020c16
ILT
14038 case $enableval in
14039 yes) enable_fast_install=yes ;;
14040 no) enable_fast_install=no ;;
14041 *)
14042 enable_fast_install=no
14043 # Look at the argument we got. We use all the common list separators.
14044 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14045 for pkg in $enableval; do
14046 IFS="$lt_save_ifs"
14047 if test "X$pkg" = "X$p"; then
14048 enable_fast_install=yes
14049 fi
14050 done
14051 IFS="$lt_save_ifs"
14052 ;;
14053 esac
14054else
14055 enable_fast_install=yes
5213506e
RW
14056fi
14057
da0f6381 14058
da0f6381 14059
da0f6381 14060
da0f6381 14061
da0f6381 14062
da0f6381
PB
14063
14064
da0f6381 14065
da0f6381 14066
da0f6381 14067
00020c16
ILT
14068# This can be used to rebuild libtool when needed
14069LIBTOOL_DEPS="$ltmain"
da0f6381 14070
00020c16
ILT
14071# Always use our own libtool.
14072LIBTOOL='$(SHELL) $(top_builddir)/libtool'
da0f6381 14073
da0f6381 14074
da0f6381
PB
14075
14076
14077
14078
14079
14080
da0f6381 14081
da0f6381 14082
da0f6381 14083
da0f6381 14084
da0f6381 14085
da0f6381 14086
da0f6381 14087
da0f6381 14088
da0f6381 14089
da0f6381 14090
da0f6381 14091
da0f6381 14092
da0f6381 14093
da0f6381 14094
da0f6381 14095
da0f6381 14096
da0f6381 14097
00020c16 14098test -z "$LN_S" && LN_S="ln -s"
da0f6381 14099
da0f6381 14100
da0f6381 14101
da0f6381 14102
da0f6381 14103
da0f6381 14104
da0f6381 14105
da0f6381 14106
da0f6381 14107
da0f6381 14108
da0f6381 14109
da0f6381 14110
da0f6381 14111
da0f6381 14112
00020c16
ILT
14113if test -n "${ZSH_VERSION+set}" ; then
14114 setopt NO_GLOB_SUBST
14115fi
da0f6381 14116
5213506e
RW
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
14118$as_echo_n "checking for objdir... " >&6; }
14119if test "${lt_cv_objdir+set}" = set; then :
14120 $as_echo_n "(cached) " >&6
00020c16
ILT
14121else
14122 rm -f .libs 2>/dev/null
14123mkdir .libs 2>/dev/null
14124if test -d .libs; then
14125 lt_cv_objdir=.libs
14126else
14127 # MS-DOS does not allow filenames that begin with a dot.
14128 lt_cv_objdir=_libs
14129fi
14130rmdir .libs 2>/dev/null
14131fi
5213506e
RW
14132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
14133$as_echo "$lt_cv_objdir" >&6; }
00020c16 14134objdir=$lt_cv_objdir
da0f6381
PB
14135
14136
14137
14138
da0f6381 14139
00020c16
ILT
14140cat >>confdefs.h <<_ACEOF
14141#define LT_OBJDIR "$lt_cv_objdir/"
14142_ACEOF
da0f6381 14143
da0f6381 14144
da0f6381
PB
14145
14146
14147
14148
14149
14150
da0f6381 14151
da0f6381
PB
14152
14153
14154
14155
14156
14157
14158
da0f6381 14159
00020c16
ILT
14160case $host_os in
14161aix3*)
14162 # AIX sometimes has problems with the GCC collect2 program. For some
14163 # reason, if we set the COLLECT_NAMES environment variable, the problems
14164 # vanish in a puff of smoke.
14165 if test "X${COLLECT_NAMES+set}" != Xset; then
14166 COLLECT_NAMES=
14167 export COLLECT_NAMES
14168 fi
14169 ;;
14170esac
da0f6381 14171
00020c16
ILT
14172# Sed substitution that helps us do robust quoting. It backslashifies
14173# metacharacters that are still active within double-quoted strings.
14174sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
da0f6381 14175
00020c16
ILT
14176# Same as above, but do not quote variable references.
14177double_quote_subst='s/\(["`\\]\)/\\\1/g'
da0f6381 14178
00020c16
ILT
14179# Sed substitution to delay expansion of an escaped shell variable in a
14180# double_quote_subst'ed string.
14181delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
da0f6381 14182
00020c16
ILT
14183# Sed substitution to delay expansion of an escaped single quote.
14184delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
da0f6381 14185
00020c16
ILT
14186# Sed substitution to avoid accidental globbing in evaled expressions
14187no_glob_subst='s/\*/\\\*/g'
da0f6381 14188
00020c16
ILT
14189# Global variables:
14190ofile=libtool
14191can_build_shared=yes
da0f6381 14192
00020c16
ILT
14193# All known linkers require a `.a' archive for static linking (except MSVC,
14194# which needs '.lib').
14195libext=a
da0f6381 14196
00020c16 14197with_gnu_ld="$lt_cv_prog_gnu_ld"
da0f6381 14198
00020c16
ILT
14199old_CC="$CC"
14200old_CFLAGS="$CFLAGS"
da0f6381 14201
00020c16
ILT
14202# Set sane defaults for various variables
14203test -z "$CC" && CC=cc
14204test -z "$LTCC" && LTCC=$CC
14205test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
14206test -z "$LD" && LD=ld
14207test -z "$ac_objext" && ac_objext=o
da0f6381 14208
00020c16
ILT
14209for cc_temp in $compiler""; do
14210 case $cc_temp in
14211 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
14212 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
14213 \-*) ;;
14214 *) break;;
14215 esac
14216done
14217cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
da0f6381
PB
14218
14219
00020c16
ILT
14220# Only perform the check for file, if the check method requires it
14221test -z "$MAGIC_CMD" && MAGIC_CMD=file
14222case $deplibs_check_method in
14223file_magic*)
14224 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5213506e
RW
14225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
14226$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
14227if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
14228 $as_echo_n "(cached) " >&6
da0f6381 14229else
00020c16
ILT
14230 case $MAGIC_CMD in
14231[\\/*] | ?:[\\/]*)
14232 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
14233 ;;
14234*)
14235 lt_save_MAGIC_CMD="$MAGIC_CMD"
14236 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14237 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
14238 for ac_dir in $ac_dummy; do
14239 IFS="$lt_save_ifs"
14240 test -z "$ac_dir" && ac_dir=.
14241 if test -f $ac_dir/${ac_tool_prefix}file; then
14242 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
14243 if test -n "$file_magic_test_file"; then
14244 case $deplibs_check_method in
14245 "file_magic "*)
14246 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
14247 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
14248 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
14249 $EGREP "$file_magic_regex" > /dev/null; then
14250 :
14251 else
14252 cat <<_LT_EOF 1>&2
da0f6381 14253
00020c16
ILT
14254*** Warning: the command libtool uses to detect shared libraries,
14255*** $file_magic_cmd, produces output that libtool cannot recognize.
14256*** The result is that libtool may fail to recognize shared libraries
14257*** as such. This will affect the creation of libtool libraries that
14258*** depend on shared libraries, but programs linked with such libtool
14259*** libraries will work regardless of this problem. Nevertheless, you
14260*** may want to report the problem to your system manager and/or to
14261*** bug-libtool@gnu.org
da0f6381 14262
00020c16
ILT
14263_LT_EOF
14264 fi ;;
14265 esac
14266 fi
14267 break
14268 fi
14269 done
14270 IFS="$lt_save_ifs"
14271 MAGIC_CMD="$lt_save_MAGIC_CMD"
14272 ;;
14273esac
14274fi
da0f6381 14275
00020c16
ILT
14276MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
14277if test -n "$MAGIC_CMD"; then
5213506e
RW
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
14279$as_echo "$MAGIC_CMD" >&6; }
00020c16 14280else
5213506e
RW
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14282$as_echo "no" >&6; }
00020c16 14283fi
da0f6381
PB
14284
14285
14286
da0f6381 14287
da0f6381 14288
00020c16
ILT
14289if test -z "$lt_cv_path_MAGIC_CMD"; then
14290 if test -n "$ac_tool_prefix"; then
5213506e
RW
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
14292$as_echo_n "checking for file... " >&6; }
14293if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
14294 $as_echo_n "(cached) " >&6
00020c16
ILT
14295else
14296 case $MAGIC_CMD in
14297[\\/*] | ?:[\\/]*)
14298 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
14299 ;;
14300*)
14301 lt_save_MAGIC_CMD="$MAGIC_CMD"
14302 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14303 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
14304 for ac_dir in $ac_dummy; do
14305 IFS="$lt_save_ifs"
14306 test -z "$ac_dir" && ac_dir=.
14307 if test -f $ac_dir/file; then
14308 lt_cv_path_MAGIC_CMD="$ac_dir/file"
14309 if test -n "$file_magic_test_file"; then
14310 case $deplibs_check_method in
14311 "file_magic "*)
14312 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
14313 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
14314 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
14315 $EGREP "$file_magic_regex" > /dev/null; then
14316 :
14317 else
14318 cat <<_LT_EOF 1>&2
da0f6381 14319
00020c16
ILT
14320*** Warning: the command libtool uses to detect shared libraries,
14321*** $file_magic_cmd, produces output that libtool cannot recognize.
14322*** The result is that libtool may fail to recognize shared libraries
14323*** as such. This will affect the creation of libtool libraries that
14324*** depend on shared libraries, but programs linked with such libtool
14325*** libraries will work regardless of this problem. Nevertheless, you
14326*** may want to report the problem to your system manager and/or to
14327*** bug-libtool@gnu.org
da0f6381 14328
00020c16
ILT
14329_LT_EOF
14330 fi ;;
14331 esac
14332 fi
14333 break
da0f6381 14334 fi
00020c16
ILT
14335 done
14336 IFS="$lt_save_ifs"
14337 MAGIC_CMD="$lt_save_MAGIC_CMD"
14338 ;;
14339esac
14340fi
da0f6381 14341
00020c16
ILT
14342MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
14343if test -n "$MAGIC_CMD"; then
5213506e
RW
14344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
14345$as_echo "$MAGIC_CMD" >&6; }
00020c16 14346else
5213506e
RW
14347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14348$as_echo "no" >&6; }
00020c16 14349fi
da0f6381 14350
da0f6381 14351
00020c16
ILT
14352 else
14353 MAGIC_CMD=:
14354 fi
14355fi
da0f6381 14356
00020c16
ILT
14357 fi
14358 ;;
14359esac
da0f6381 14360
00020c16 14361# Use C for the default configuration in the libtool script
da0f6381 14362
00020c16
ILT
14363lt_save_CC="$CC"
14364ac_ext=c
14365ac_cpp='$CPP $CPPFLAGS'
14366ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14367ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14368ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 14369
da0f6381 14370
00020c16
ILT
14371# Source file extension for C test sources.
14372ac_ext=c
da0f6381 14373
00020c16
ILT
14374# Object file extension for compiled C test sources.
14375objext=o
14376objext=$objext
da0f6381 14377
00020c16
ILT
14378# Code to be used in simple compile tests
14379lt_simple_compile_test_code="int some_variable = 0;"
5d47bb02 14380
00020c16
ILT
14381# Code to be used in simple link tests
14382lt_simple_link_test_code='int main(){return(0);}'
da0f6381 14383
da0f6381 14384
da0f6381 14385
da0f6381 14386
00020c16
ILT
14387
14388
14389
14390# If no C compiler was specified, use CC.
14391LTCC=${LTCC-"$CC"}
14392
14393# If no C compiler flags were specified, use CFLAGS.
14394LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
14395
14396# Allow CC to be a program name with arguments.
14397compiler=$CC
14398
14399# Save the default compiler, since it gets overwritten when the other
14400# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
14401compiler_DEFAULT=$CC
14402
14403# save warnings/boilerplate of simple test code
14404ac_outfile=conftest.$ac_objext
14405echo "$lt_simple_compile_test_code" >conftest.$ac_ext
14406eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14407_lt_compiler_boilerplate=`cat conftest.err`
14408$RM conftest*
14409
14410ac_outfile=conftest.$ac_objext
14411echo "$lt_simple_link_test_code" >conftest.$ac_ext
14412eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14413_lt_linker_boilerplate=`cat conftest.err`
14414$RM -r conftest*
14415
14416
14417## CAVEAT EMPTOR:
14418## There is no encapsulation within the following macros, do not change
14419## the running order or otherwise move them around unless you know exactly
14420## what you are doing...
14421if test -n "$compiler"; then
14422
14423lt_prog_compiler_no_builtin_flag=
14424
14425if test "$GCC" = yes; then
14426 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
14427
5213506e
RW
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
14429$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
14430if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
14431 $as_echo_n "(cached) " >&6
00020c16
ILT
14432else
14433 lt_cv_prog_compiler_rtti_exceptions=no
14434 ac_outfile=conftest.$ac_objext
14435 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14436 lt_compiler_flag="-fno-rtti -fno-exceptions"
14437 # Insert the option either (1) after the last *FLAGS variable, or
14438 # (2) before a word containing "conftest.", or (3) at the end.
14439 # Note that $ac_compile itself does not contain backslashes and begins
14440 # with a dollar sign (not a hyphen), so the echo should work correctly.
14441 # The option is referenced via a variable to avoid confusing sed.
14442 lt_compile=`echo "$ac_compile" | $SED \
14443 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14444 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14445 -e 's:$: $lt_compiler_flag:'`
d7f09764 14446 (eval echo "\"\$as_me:14446: $lt_compile\"" >&5)
00020c16
ILT
14447 (eval "$lt_compile" 2>conftest.err)
14448 ac_status=$?
14449 cat conftest.err >&5
d7f09764 14450 echo "$as_me:14450: \$? = $ac_status" >&5
00020c16
ILT
14451 if (exit $ac_status) && test -s "$ac_outfile"; then
14452 # The compiler can only warn and ignore the option if not recognized
14453 # So say no if there are warnings other than the usual output.
14454 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
14455 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14456 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14457 lt_cv_prog_compiler_rtti_exceptions=yes
14458 fi
14459 fi
14460 $RM conftest*
14461
14462fi
5213506e
RW
14463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
14464$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
00020c16
ILT
14465
14466if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
14467 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
14468else
14469 :
14470fi
14471
14472fi
14473
14474
14475
14476
14477
14478
14479 lt_prog_compiler_wl=
14480lt_prog_compiler_pic=
14481lt_prog_compiler_static=
14482
5213506e
RW
14483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
14484$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
14485
14486 if test "$GCC" = yes; then
14487 lt_prog_compiler_wl='-Wl,'
14488 lt_prog_compiler_static='-static'
14489
14490 case $host_os in
14491 aix*)
14492 # All AIX code is PIC.
14493 if test "$host_cpu" = ia64; then
14494 # AIX 5 now supports IA64 processor
14495 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14496 fi
14497 ;;
14498
00020c16
ILT
14499 amigaos*)
14500 case $host_cpu in
14501 powerpc)
14502 # see comment about AmigaOS4 .so support
14503 lt_prog_compiler_pic='-fPIC'
14504 ;;
14505 m68k)
14506 # FIXME: we need at least 68020 code to build shared libraries, but
14507 # adding the `-m68020' flag to GCC prevents building anything better,
14508 # like `-m68040'.
14509 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
14510 ;;
14511 esac
14512 ;;
da0f6381 14513
00020c16
ILT
14514 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14515 # PIC is the default for these OSes.
14516 ;;
da0f6381 14517
00020c16
ILT
14518 mingw* | cygwin* | pw32* | os2* | cegcc*)
14519 # This hack is so that the source file can tell whether it is being
14520 # built for inclusion in a dll (and should export symbols for example).
14521 # Although the cygwin gcc ignores -fPIC, still need this for old-style
14522 # (--disable-auto-import) libraries
14523 lt_prog_compiler_pic='-DDLL_EXPORT'
14524 ;;
14525
14526 darwin* | rhapsody*)
14527 # PIC is the default on this platform
14528 # Common symbols not allowed in MH_DYLIB files
14529 lt_prog_compiler_pic='-fno-common'
14530 ;;
14531
14532 hpux*)
14533 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
14534 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
14535 # sets the default TLS model and affects inlining.
14536 case $host_cpu in
14537 hppa*64*)
14538 # +Z the default
da0f6381 14539 ;;
00020c16
ILT
14540 *)
14541 lt_prog_compiler_pic='-fPIC'
da0f6381
PB
14542 ;;
14543 esac
14544 ;;
14545
00020c16
ILT
14546 interix[3-9]*)
14547 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14548 # Instead, we relocate shared libraries at runtime.
da0f6381
PB
14549 ;;
14550
00020c16
ILT
14551 msdosdjgpp*)
14552 # Just because we use GCC doesn't mean we suddenly get shared libraries
14553 # on systems that don't support them.
14554 lt_prog_compiler_can_build_shared=no
14555 enable_shared=no
da0f6381 14556 ;;
da0f6381 14557
00020c16
ILT
14558 *nto* | *qnx*)
14559 # QNX uses GNU C++, but need to define -shared option too, otherwise
14560 # it will coredump.
14561 lt_prog_compiler_pic='-fPIC -shared'
14562 ;;
14563
14564 sysv4*MP*)
14565 if test -d /usr/nec; then
14566 lt_prog_compiler_pic=-Kconform_pic
da0f6381
PB
14567 fi
14568 ;;
14569
00020c16
ILT
14570 *)
14571 lt_prog_compiler_pic='-fPIC'
14572 ;;
14573 esac
14574 else
14575 # PORTME Check for flag to pass linker flags through the system compiler.
14576 case $host_os in
14577 aix*)
14578 lt_prog_compiler_wl='-Wl,'
da0f6381 14579 if test "$host_cpu" = ia64; then
00020c16
ILT
14580 # AIX 5 now supports IA64 processor
14581 lt_prog_compiler_static='-Bstatic'
da0f6381 14582 else
00020c16 14583 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
da0f6381 14584 fi
00020c16 14585 ;;
da0f6381 14586
00020c16
ILT
14587 mingw* | cygwin* | pw32* | os2* | cegcc*)
14588 # This hack is so that the source file can tell whether it is being
14589 # built for inclusion in a dll (and should export symbols for example).
14590 lt_prog_compiler_pic='-DDLL_EXPORT'
14591 ;;
da0f6381 14592
00020c16
ILT
14593 hpux9* | hpux10* | hpux11*)
14594 lt_prog_compiler_wl='-Wl,'
14595 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14596 # not for PA HP-UX.
14597 case $host_cpu in
14598 hppa*64*|ia64*)
14599 # +Z the default
14600 ;;
14601 *)
14602 lt_prog_compiler_pic='+Z'
14603 ;;
14604 esac
14605 # Is there a better lt_prog_compiler_static that works with the bundled CC?
14606 lt_prog_compiler_static='${wl}-a ${wl}archive'
14607 ;;
da0f6381 14608
00020c16
ILT
14609 irix5* | irix6* | nonstopux*)
14610 lt_prog_compiler_wl='-Wl,'
14611 # PIC (with -KPIC) is the default.
14612 lt_prog_compiler_static='-non_shared'
14613 ;;
14614
14615 linux* | k*bsd*-gnu | kopensolaris*-gnu)
14616 case $cc_basename in
14617 # old Intel for x86_64 which still supported -KPIC.
14618 ecc*)
14619 lt_prog_compiler_wl='-Wl,'
14620 lt_prog_compiler_pic='-KPIC'
14621 lt_prog_compiler_static='-static'
14622 ;;
14623 # icc used to be incompatible with GCC.
14624 # ICC 10 doesn't accept -KPIC any more.
14625 icc* | ifort*)
14626 lt_prog_compiler_wl='-Wl,'
14627 lt_prog_compiler_pic='-fPIC'
14628 lt_prog_compiler_static='-static'
14629 ;;
14630 # Lahey Fortran 8.1.
14631 lf95*)
14632 lt_prog_compiler_wl='-Wl,'
14633 lt_prog_compiler_pic='--shared'
14634 lt_prog_compiler_static='--static'
14635 ;;
14636 pgcc* | pgf77* | pgf90* | pgf95*)
14637 # Portland Group compilers (*not* the Pentium gcc compiler,
14638 # which looks to be a dead project)
14639 lt_prog_compiler_wl='-Wl,'
14640 lt_prog_compiler_pic='-fpic'
14641 lt_prog_compiler_static='-Bstatic'
14642 ;;
14643 ccc*)
14644 lt_prog_compiler_wl='-Wl,'
14645 # All Alpha code is PIC.
14646 lt_prog_compiler_static='-non_shared'
14647 ;;
14648 xl*)
14649 # IBM XL C 8.0/Fortran 10.1 on PPC
14650 lt_prog_compiler_wl='-Wl,'
14651 lt_prog_compiler_pic='-qpic'
14652 lt_prog_compiler_static='-qstaticlink'
14653 ;;
14654 *)
14655 case `$CC -V 2>&1 | sed 5q` in
14656 *Sun\ C*)
14657 # Sun C 5.9
14658 lt_prog_compiler_pic='-KPIC'
14659 lt_prog_compiler_static='-Bstatic'
14660 lt_prog_compiler_wl='-Wl,'
14661 ;;
14662 *Sun\ F*)
14663 # Sun Fortran 8.3 passes all unrecognized flags to the linker
14664 lt_prog_compiler_pic='-KPIC'
14665 lt_prog_compiler_static='-Bstatic'
14666 lt_prog_compiler_wl=''
da0f6381
PB
14667 ;;
14668 esac
00020c16
ILT
14669 ;;
14670 esac
14671 ;;
da0f6381 14672
00020c16
ILT
14673 newsos6)
14674 lt_prog_compiler_pic='-KPIC'
14675 lt_prog_compiler_static='-Bstatic'
14676 ;;
da0f6381 14677
00020c16
ILT
14678 *nto* | *qnx*)
14679 # QNX uses GNU C++, but need to define -shared option too, otherwise
14680 # it will coredump.
14681 lt_prog_compiler_pic='-fPIC -shared'
14682 ;;
da0f6381 14683
00020c16
ILT
14684 osf3* | osf4* | osf5*)
14685 lt_prog_compiler_wl='-Wl,'
14686 # All OSF/1 code is PIC.
14687 lt_prog_compiler_static='-non_shared'
14688 ;;
da0f6381 14689
00020c16
ILT
14690 rdos*)
14691 lt_prog_compiler_static='-non_shared'
da0f6381
PB
14692 ;;
14693
00020c16
ILT
14694 solaris*)
14695 lt_prog_compiler_pic='-KPIC'
14696 lt_prog_compiler_static='-Bstatic'
14697 case $cc_basename in
14698 f77* | f90* | f95*)
14699 lt_prog_compiler_wl='-Qoption ld ';;
14700 *)
14701 lt_prog_compiler_wl='-Wl,';;
5d47bb02 14702 esac
da0f6381
PB
14703 ;;
14704
00020c16
ILT
14705 sunos4*)
14706 lt_prog_compiler_wl='-Qoption ld '
14707 lt_prog_compiler_pic='-PIC'
14708 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14709 ;;
14710
00020c16
ILT
14711 sysv4 | sysv4.2uw2* | sysv4.3*)
14712 lt_prog_compiler_wl='-Wl,'
14713 lt_prog_compiler_pic='-KPIC'
14714 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14715 ;;
14716
00020c16
ILT
14717 sysv4*MP*)
14718 if test -d /usr/nec ;then
14719 lt_prog_compiler_pic='-Kconform_pic'
14720 lt_prog_compiler_static='-Bstatic'
14721 fi
da0f6381
PB
14722 ;;
14723
00020c16
ILT
14724 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14725 lt_prog_compiler_wl='-Wl,'
14726 lt_prog_compiler_pic='-KPIC'
14727 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14728 ;;
14729
00020c16
ILT
14730 unicos*)
14731 lt_prog_compiler_wl='-Wl,'
14732 lt_prog_compiler_can_build_shared=no
da0f6381
PB
14733 ;;
14734
00020c16
ILT
14735 uts4*)
14736 lt_prog_compiler_pic='-pic'
14737 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14738 ;;
14739
00020c16
ILT
14740 *)
14741 lt_prog_compiler_can_build_shared=no
da0f6381 14742 ;;
00020c16
ILT
14743 esac
14744 fi
da0f6381 14745
00020c16
ILT
14746case $host_os in
14747 # For platforms which do not support PIC, -DPIC is meaningless:
14748 *djgpp*)
14749 lt_prog_compiler_pic=
14750 ;;
14751 *)
14752 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
14753 ;;
14754esac
5213506e
RW
14755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
14756$as_echo "$lt_prog_compiler_pic" >&6; }
da0f6381 14757
da0f6381 14758
da0f6381 14759
da0f6381 14760
da0f6381 14761
da0f6381 14762
00020c16
ILT
14763#
14764# Check to make sure the PIC flag actually works.
14765#
14766if test -n "$lt_prog_compiler_pic"; then
5213506e
RW
14767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
14768$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
14769if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
14770 $as_echo_n "(cached) " >&6
00020c16
ILT
14771else
14772 lt_cv_prog_compiler_pic_works=no
14773 ac_outfile=conftest.$ac_objext
14774 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14775 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
14776 # Insert the option either (1) after the last *FLAGS variable, or
14777 # (2) before a word containing "conftest.", or (3) at the end.
14778 # Note that $ac_compile itself does not contain backslashes and begins
14779 # with a dollar sign (not a hyphen), so the echo should work correctly.
14780 # The option is referenced via a variable to avoid confusing sed.
14781 lt_compile=`echo "$ac_compile" | $SED \
14782 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14783 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14784 -e 's:$: $lt_compiler_flag:'`
d7f09764 14785 (eval echo "\"\$as_me:14785: $lt_compile\"" >&5)
00020c16
ILT
14786 (eval "$lt_compile" 2>conftest.err)
14787 ac_status=$?
14788 cat conftest.err >&5
d7f09764 14789 echo "$as_me:14789: \$? = $ac_status" >&5
00020c16
ILT
14790 if (exit $ac_status) && test -s "$ac_outfile"; then
14791 # The compiler can only warn and ignore the option if not recognized
14792 # So say no if there are warnings other than the usual output.
14793 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
14794 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14795 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14796 lt_cv_prog_compiler_pic_works=yes
14797 fi
14798 fi
14799 $RM conftest*
da0f6381 14800
00020c16 14801fi
5213506e
RW
14802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
14803$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
da0f6381 14804
00020c16
ILT
14805if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
14806 case $lt_prog_compiler_pic in
14807 "" | " "*) ;;
14808 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
14809 esac
da0f6381 14810else
00020c16
ILT
14811 lt_prog_compiler_pic=
14812 lt_prog_compiler_can_build_shared=no
da0f6381 14813fi
da0f6381 14814
00020c16 14815fi
da0f6381 14816
da0f6381 14817
da0f6381 14818
da0f6381 14819
da0f6381 14820
da0f6381 14821
00020c16
ILT
14822#
14823# Check to make sure the static flag actually works.
14824#
14825wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
5213506e
RW
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14827$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
14828if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
14829 $as_echo_n "(cached) " >&6
00020c16
ILT
14830else
14831 lt_cv_prog_compiler_static_works=no
14832 save_LDFLAGS="$LDFLAGS"
14833 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14834 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14835 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14836 # The linker can only warn and ignore the option if not recognized
14837 # So say no if there are warnings
14838 if test -s conftest.err; then
14839 # Append any errors to the config.log.
14840 cat conftest.err 1>&5
14841 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
14842 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14843 if diff conftest.exp conftest.er2 >/dev/null; then
14844 lt_cv_prog_compiler_static_works=yes
14845 fi
14846 else
14847 lt_cv_prog_compiler_static_works=yes
14848 fi
14849 fi
14850 $RM -r conftest*
14851 LDFLAGS="$save_LDFLAGS"
da0f6381 14852
00020c16 14853fi
5213506e
RW
14854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
14855$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
da0f6381 14856
00020c16
ILT
14857if test x"$lt_cv_prog_compiler_static_works" = xyes; then
14858 :
14859else
14860 lt_prog_compiler_static=
14861fi
da0f6381 14862
da0f6381 14863
da0f6381 14864
da0f6381 14865
da0f6381 14866
da0f6381 14867
da0f6381 14868
5213506e
RW
14869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14870$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14871if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14872 $as_echo_n "(cached) " >&6
00020c16
ILT
14873else
14874 lt_cv_prog_compiler_c_o=no
14875 $RM -r conftest 2>/dev/null
14876 mkdir conftest
14877 cd conftest
14878 mkdir out
14879 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14880
00020c16
ILT
14881 lt_compiler_flag="-o out/conftest2.$ac_objext"
14882 # Insert the option either (1) after the last *FLAGS variable, or
14883 # (2) before a word containing "conftest.", or (3) at the end.
14884 # Note that $ac_compile itself does not contain backslashes and begins
14885 # with a dollar sign (not a hyphen), so the echo should work correctly.
14886 lt_compile=`echo "$ac_compile" | $SED \
14887 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14888 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14889 -e 's:$: $lt_compiler_flag:'`
d7f09764 14890 (eval echo "\"\$as_me:14890: $lt_compile\"" >&5)
00020c16
ILT
14891 (eval "$lt_compile" 2>out/conftest.err)
14892 ac_status=$?
14893 cat out/conftest.err >&5
d7f09764 14894 echo "$as_me:14894: \$? = $ac_status" >&5
00020c16
ILT
14895 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14896 then
14897 # The compiler can only warn and ignore the option if not recognized
14898 # So say no if there are warnings
14899 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
14900 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14901 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14902 lt_cv_prog_compiler_c_o=yes
14903 fi
14904 fi
14905 chmod u+w . 2>&5
14906 $RM conftest*
14907 # SGI C++ compiler will create directory out/ii_files/ for
14908 # template instantiation
14909 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14910 $RM out/* && rmdir out
14911 cd ..
14912 $RM -r conftest
14913 $RM conftest*
da0f6381 14914
00020c16 14915fi
5213506e
RW
14916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14917$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14918
14919
14920
14921
14922
14923
5213506e
RW
14924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14925$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14926if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14927 $as_echo_n "(cached) " >&6
00020c16
ILT
14928else
14929 lt_cv_prog_compiler_c_o=no
14930 $RM -r conftest 2>/dev/null
14931 mkdir conftest
14932 cd conftest
14933 mkdir out
14934 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14935
00020c16
ILT
14936 lt_compiler_flag="-o out/conftest2.$ac_objext"
14937 # Insert the option either (1) after the last *FLAGS variable, or
14938 # (2) before a word containing "conftest.", or (3) at the end.
14939 # Note that $ac_compile itself does not contain backslashes and begins
14940 # with a dollar sign (not a hyphen), so the echo should work correctly.
14941 lt_compile=`echo "$ac_compile" | $SED \
14942 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14943 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14944 -e 's:$: $lt_compiler_flag:'`
d7f09764 14945 (eval echo "\"\$as_me:14945: $lt_compile\"" >&5)
00020c16
ILT
14946 (eval "$lt_compile" 2>out/conftest.err)
14947 ac_status=$?
14948 cat out/conftest.err >&5
d7f09764 14949 echo "$as_me:14949: \$? = $ac_status" >&5
00020c16
ILT
14950 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14951 then
14952 # The compiler can only warn and ignore the option if not recognized
14953 # So say no if there are warnings
14954 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
14955 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14956 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14957 lt_cv_prog_compiler_c_o=yes
14958 fi
14959 fi
14960 chmod u+w . 2>&5
14961 $RM conftest*
14962 # SGI C++ compiler will create directory out/ii_files/ for
14963 # template instantiation
14964 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14965 $RM out/* && rmdir out
14966 cd ..
14967 $RM -r conftest
14968 $RM conftest*
da0f6381 14969
00020c16 14970fi
5213506e
RW
14971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14972$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14973
14974
14975
14976
00020c16
ILT
14977hard_links="nottested"
14978if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
14979 # do not overwrite the value of need_locks provided by the user
5213506e
RW
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
14981$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16 14982 hard_links=yes
baafc534 14983 $RM conftest*
00020c16
ILT
14984 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14985 touch conftest.a
14986 ln conftest.a conftest.b 2>&5 || hard_links=no
14987 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
14988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
14989$as_echo "$hard_links" >&6; }
00020c16 14990 if test "$hard_links" = no; then
5213506e
RW
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14992$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16 14993 need_locks=warn
da0f6381 14994 fi
00020c16
ILT
14995else
14996 need_locks=no
14997fi
da0f6381
PB
14998
14999
15000
15001
15002
15003
5213506e
RW
15004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
15005$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
da0f6381 15006
00020c16
ILT
15007 runpath_var=
15008 allow_undefined_flag=
15009 always_export_symbols=no
15010 archive_cmds=
15011 archive_expsym_cmds=
15012 compiler_needs_object=no
15013 enable_shared_with_static_runtimes=no
15014 export_dynamic_flag_spec=
15015 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
15016 hardcode_automatic=no
15017 hardcode_direct=no
15018 hardcode_direct_absolute=no
15019 hardcode_libdir_flag_spec=
15020 hardcode_libdir_flag_spec_ld=
15021 hardcode_libdir_separator=
15022 hardcode_minus_L=no
15023 hardcode_shlibpath_var=unsupported
15024 inherit_rpath=no
15025 link_all_deplibs=unknown
15026 module_cmds=
15027 module_expsym_cmds=
15028 old_archive_from_new_cmds=
15029 old_archive_from_expsyms_cmds=
15030 thread_safe_flag_spec=
15031 whole_archive_flag_spec=
15032 # include_expsyms should be a list of space-separated symbols to be *always*
15033 # included in the symbol list
15034 include_expsyms=
15035 # exclude_expsyms can be an extended regexp of symbols to exclude
15036 # it will be wrapped by ` (' and `)$', so one must not match beginning or
15037 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
15038 # as well as any symbol that contains `d'.
15039 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
15040 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
15041 # platforms (ab)use it in PIC code, but their linkers get confused if
15042 # the symbol is explicitly referenced. Since portable code cannot
15043 # rely on this symbol name, it's probably fine to never include it in
15044 # preloaded symbol tables.
15045 # Exclude shared library initialization/finalization symbols.
15046 extract_expsyms_cmds=
da0f6381 15047
00020c16
ILT
15048 case $host_os in
15049 cygwin* | mingw* | pw32* | cegcc*)
15050 # FIXME: the MSVC++ port hasn't been tested in a loooong time
15051 # When not using gcc, we currently assume that we are using
15052 # Microsoft Visual C++.
15053 if test "$GCC" != yes; then
15054 with_gnu_ld=no
15055 fi
15056 ;;
15057 interix*)
15058 # we just hope/assume this is gcc and not c89 (= MSVC++)
15059 with_gnu_ld=yes
15060 ;;
15061 openbsd*)
15062 with_gnu_ld=no
15063 ;;
15064 esac
da0f6381 15065
00020c16
ILT
15066 ld_shlibs=yes
15067 if test "$with_gnu_ld" = yes; then
15068 # If archive_cmds runs LD, not CC, wlarc should be empty
15069 wlarc='${wl}'
da0f6381 15070
00020c16
ILT
15071 # Set some defaults for GNU ld with shared library support. These
15072 # are reset later if shared libraries are not supported. Putting them
15073 # here allows them to be overridden if necessary.
15074 runpath_var=LD_RUN_PATH
15075 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15076 export_dynamic_flag_spec='${wl}--export-dynamic'
15077 # ancient GNU ld didn't support --whole-archive et. al.
15078 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
15079 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
15080 else
15081 whole_archive_flag_spec=
15082 fi
15083 supports_anon_versioning=no
15084 case `$LD -v 2>&1` in
15085 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
15086 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
15087 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
15088 *\ 2.11.*) ;; # other 2.11 versions
15089 *) supports_anon_versioning=yes ;;
15090 esac
da0f6381 15091
00020c16
ILT
15092 # See if GNU ld supports shared libraries.
15093 case $host_os in
15094 aix[3-9]*)
15095 # On AIX/PPC, the GNU linker is very broken
15096 if test "$host_cpu" != ia64; then
15097 ld_shlibs=no
15098 cat <<_LT_EOF 1>&2
da0f6381 15099
00020c16
ILT
15100*** Warning: the GNU linker, at least up to release 2.9.1, is reported
15101*** to be unable to reliably create shared libraries on AIX.
15102*** Therefore, libtool is disabling shared libraries support. If you
15103*** really care for shared libraries, you may want to modify your PATH
15104*** so that a non-GNU linker is found, and then restart.
da0f6381 15105
00020c16
ILT
15106_LT_EOF
15107 fi
15108 ;;
da0f6381 15109
00020c16
ILT
15110 amigaos*)
15111 case $host_cpu in
15112 powerpc)
15113 # see comment about AmigaOS4 .so support
15114 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15115 archive_expsym_cmds=''
15116 ;;
15117 m68k)
15118 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
15119 hardcode_libdir_flag_spec='-L$libdir'
15120 hardcode_minus_L=yes
15121 ;;
15122 esac
15123 ;;
da0f6381 15124
00020c16
ILT
15125 beos*)
15126 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15127 allow_undefined_flag=unsupported
15128 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
15129 # support --undefined. This deserves some investigation. FIXME
15130 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15131 else
15132 ld_shlibs=no
15133 fi
15134 ;;
da0f6381 15135
00020c16
ILT
15136 cygwin* | mingw* | pw32* | cegcc*)
15137 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
15138 # as there is no search path for DLLs.
15139 hardcode_libdir_flag_spec='-L$libdir'
15140 allow_undefined_flag=unsupported
15141 always_export_symbols=no
15142 enable_shared_with_static_runtimes=yes
15143 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
da0f6381 15144
00020c16
ILT
15145 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
15146 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
15147 # If the export-symbols file already is a .def file (1st line
15148 # is EXPORTS), use it as is; otherwise, prepend...
15149 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
15150 cp $export_symbols $output_objdir/$soname.def;
15151 else
15152 echo EXPORTS > $output_objdir/$soname.def;
15153 cat $export_symbols >> $output_objdir/$soname.def;
15154 fi~
15155 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
15156 else
15157 ld_shlibs=no
15158 fi
15159 ;;
da0f6381 15160
00020c16
ILT
15161 interix[3-9]*)
15162 hardcode_direct=no
15163 hardcode_shlibpath_var=no
15164 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15165 export_dynamic_flag_spec='${wl}-E'
15166 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
15167 # Instead, shared libraries are loaded at an image base (0x10000000 by
15168 # default) and relocated if they conflict, which is a slow very memory
15169 # consuming and fragmenting process. To avoid this, we pick a random,
15170 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
15171 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
15172 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
15173 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
15174 ;;
da0f6381 15175
00020c16
ILT
15176 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
15177 tmp_diet=no
15178 if test "$host_os" = linux-dietlibc; then
15179 case $cc_basename in
15180 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
15181 esac
15182 fi
15183 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
15184 && test "$tmp_diet" = no
15185 then
15186 tmp_addflag=
15187 tmp_sharedflag='-shared'
15188 case $cc_basename,$host_cpu in
15189 pgcc*) # Portland Group C compiler
15190 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
15191 tmp_addflag=' $pic_flag'
15192 ;;
15193 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
15194 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
15195 tmp_addflag=' $pic_flag -Mnomain' ;;
15196 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
15197 tmp_addflag=' -i_dynamic' ;;
15198 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
15199 tmp_addflag=' -i_dynamic -nofor_main' ;;
15200 ifc* | ifort*) # Intel Fortran compiler
15201 tmp_addflag=' -nofor_main' ;;
15202 lf95*) # Lahey Fortran 8.1
15203 whole_archive_flag_spec=
15204 tmp_sharedflag='--shared' ;;
15205 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
15206 tmp_sharedflag='-qmkshrobj'
15207 tmp_addflag= ;;
15208 esac
15209 case `$CC -V 2>&1 | sed 5q` in
15210 *Sun\ C*) # Sun C 5.9
15211 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
15212 compiler_needs_object=yes
15213 tmp_sharedflag='-G' ;;
15214 *Sun\ F*) # Sun Fortran 8.3
15215 tmp_sharedflag='-G' ;;
15216 esac
15217 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
da0f6381 15218
00020c16
ILT
15219 if test "x$supports_anon_versioning" = xyes; then
15220 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
15221 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
15222 echo "local: *; };" >> $output_objdir/$libname.ver~
15223 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
15224 fi
da0f6381 15225
00020c16
ILT
15226 case $cc_basename in
15227 xlf*)
15228 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
15229 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
15230 hardcode_libdir_flag_spec=
15231 hardcode_libdir_flag_spec_ld='-rpath $libdir'
15232 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
15233 if test "x$supports_anon_versioning" = xyes; then
15234 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
15235 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
15236 echo "local: *; };" >> $output_objdir/$libname.ver~
15237 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
15238 fi
15239 ;;
15240 esac
15241 else
15242 ld_shlibs=no
15243 fi
15244 ;;
da0f6381 15245
00020c16
ILT
15246 netbsd*)
15247 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15248 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
15249 wlarc=
15250 else
15251 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15252 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15253 fi
15254 ;;
da0f6381 15255
00020c16
ILT
15256 solaris*)
15257 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
15258 ld_shlibs=no
15259 cat <<_LT_EOF 1>&2
da0f6381 15260
00020c16
ILT
15261*** Warning: The releases 2.8.* of the GNU linker cannot reliably
15262*** create shared libraries on Solaris systems. Therefore, libtool
15263*** is disabling shared libraries support. We urge you to upgrade GNU
15264*** binutils to release 2.9.1 or newer. Another option is to modify
15265*** your PATH or compiler configuration so that the native linker is
15266*** used, and then restart.
da0f6381 15267
00020c16
ILT
15268_LT_EOF
15269 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15270 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15271 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15272 else
15273 ld_shlibs=no
15274 fi
15275 ;;
da0f6381 15276
00020c16
ILT
15277 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
15278 case `$LD -v 2>&1` in
15279 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
15280 ld_shlibs=no
15281 cat <<_LT_EOF 1>&2
da0f6381 15282
00020c16
ILT
15283*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
15284*** reliably create shared libraries on SCO systems. Therefore, libtool
15285*** is disabling shared libraries support. We urge you to upgrade GNU
15286*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
15287*** your PATH or compiler configuration so that the native linker is
15288*** used, and then restart.
da0f6381 15289
00020c16
ILT
15290_LT_EOF
15291 ;;
15292 *)
15293 # For security reasons, it is highly recommended that you always
15294 # use absolute paths for naming shared libraries, and exclude the
15295 # DT_RUNPATH tag from executables and libraries. But doing so
15296 # requires that you compile everything twice, which is a pain.
15297 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15298 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15299 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15300 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15301 else
15302 ld_shlibs=no
15303 fi
15304 ;;
15305 esac
15306 ;;
da0f6381 15307
00020c16
ILT
15308 sunos4*)
15309 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15310 wlarc=
15311 hardcode_direct=yes
15312 hardcode_shlibpath_var=no
15313 ;;
da0f6381 15314
00020c16
ILT
15315 *)
15316 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15317 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15318 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15319 else
15320 ld_shlibs=no
15321 fi
15322 ;;
15323 esac
da0f6381 15324
00020c16
ILT
15325 if test "$ld_shlibs" = no; then
15326 runpath_var=
15327 hardcode_libdir_flag_spec=
15328 export_dynamic_flag_spec=
15329 whole_archive_flag_spec=
15330 fi
15331 else
15332 # PORTME fill in a description of your system's linker (not GNU ld)
15333 case $host_os in
15334 aix3*)
15335 allow_undefined_flag=unsupported
15336 always_export_symbols=yes
15337 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
15338 # Note: this linker hardcodes the directories in LIBPATH if there
15339 # are no directories specified by -L.
15340 hardcode_minus_L=yes
15341 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
15342 # Neither direct hardcoding nor static linking is supported with a
15343 # broken collect2.
15344 hardcode_direct=unsupported
15345 fi
15346 ;;
da0f6381 15347
00020c16
ILT
15348 aix[4-9]*)
15349 if test "$host_cpu" = ia64; then
15350 # On IA64, the linker does run time linking by default, so we don't
15351 # have to do anything special.
15352 aix_use_runtimelinking=no
15353 exp_sym_flag='-Bexport'
15354 no_entry_flag=""
15355 else
15356 # If we're using GNU nm, then we don't want the "-C" option.
15357 # -C means demangle to AIX nm, but means don't demangle with GNU nm
15358 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
15359 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
15360 else
15361 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
15362 fi
15363 aix_use_runtimelinking=no
da0f6381 15364
00020c16
ILT
15365 # Test if we are trying to use run time linking or normal
15366 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
15367 # need to do runtime linking.
15368 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
15369 for ld_flag in $LDFLAGS; do
15370 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
15371 aix_use_runtimelinking=yes
15372 break
15373 fi
15374 done
15375 ;;
15376 esac
da0f6381 15377
00020c16
ILT
15378 exp_sym_flag='-bexport'
15379 no_entry_flag='-bnoentry'
15380 fi
da0f6381 15381
00020c16
ILT
15382 # When large executables or shared objects are built, AIX ld can
15383 # have problems creating the table of contents. If linking a library
15384 # or program results in "error TOC overflow" add -mminimal-toc to
15385 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
15386 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
da0f6381 15387
00020c16
ILT
15388 archive_cmds=''
15389 hardcode_direct=yes
15390 hardcode_direct_absolute=yes
15391 hardcode_libdir_separator=':'
15392 link_all_deplibs=yes
15393 file_list_spec='${wl}-f,'
da0f6381 15394
00020c16
ILT
15395 if test "$GCC" = yes; then
15396 case $host_os in aix4.[012]|aix4.[012].*)
15397 # We only want to do this on AIX 4.2 and lower, the check
15398 # below for broken collect2 doesn't work under 4.3+
15399 collect2name=`${CC} -print-prog-name=collect2`
15400 if test -f "$collect2name" &&
15401 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
15402 then
15403 # We have reworked collect2
15404 :
15405 else
15406 # We have old collect2
15407 hardcode_direct=unsupported
15408 # It fails to find uninstalled libraries when the uninstalled
15409 # path is not listed in the libpath. Setting hardcode_minus_L
15410 # to unsupported forces relinking
15411 hardcode_minus_L=yes
15412 hardcode_libdir_flag_spec='-L$libdir'
15413 hardcode_libdir_separator=
15414 fi
15415 ;;
15416 esac
15417 shared_flag='-shared'
15418 if test "$aix_use_runtimelinking" = yes; then
15419 shared_flag="$shared_flag "'${wl}-G'
15420 fi
15421 else
15422 # not using gcc
15423 if test "$host_cpu" = ia64; then
15424 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
15425 # chokes on -Wl,-G. The following line is correct:
15426 shared_flag='-G'
15427 else
15428 if test "$aix_use_runtimelinking" = yes; then
15429 shared_flag='${wl}-G'
15430 else
15431 shared_flag='${wl}-bM:SRE'
15432 fi
15433 fi
15434 fi
da0f6381 15435
00020c16
ILT
15436 export_dynamic_flag_spec='${wl}-bexpall'
15437 # It seems that -bexpall does not export symbols beginning with
15438 # underscore (_), so it is better to generate a list of symbols to export.
15439 always_export_symbols=yes
15440 if test "$aix_use_runtimelinking" = yes; then
15441 # Warning - without using the other runtime loading flags (-brtl),
15442 # -berok will link without error, but may produce a broken library.
15443 allow_undefined_flag='-berok'
15444 # Determine the default libpath from the value encoded in an
15445 # empty executable.
5213506e 15446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15447/* end confdefs.h. */
da0f6381 15448
00020c16
ILT
15449int
15450main ()
15451{
da0f6381 15452
00020c16
ILT
15453 ;
15454 return 0;
15455}
15456_ACEOF
5213506e 15457if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15458
00020c16
ILT
15459lt_aix_libpath_sed='
15460 /Import File Strings/,/^$/ {
15461 /^0/ {
15462 s/^0 *\(.*\)$/\1/
15463 p
15464 }
15465 }'
15466aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15467# Check for a 64-bit object if we didn't find anything.
15468if test -z "$aix_libpath"; then
15469 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15470fi
00020c16 15471fi
5213506e
RW
15472rm -f core conftest.err conftest.$ac_objext \
15473 conftest$ac_exeext conftest.$ac_ext
00020c16 15474if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15475
00020c16
ILT
15476 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
15477 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
15478 else
15479 if test "$host_cpu" = ia64; then
15480 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
15481 allow_undefined_flag="-z nodefs"
15482 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
15483 else
15484 # Determine the default libpath from the value encoded in an
15485 # empty executable.
5213506e 15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15487/* end confdefs.h. */
da0f6381 15488
00020c16
ILT
15489int
15490main ()
15491{
da0f6381 15492
00020c16
ILT
15493 ;
15494 return 0;
15495}
15496_ACEOF
5213506e 15497if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15498
00020c16
ILT
15499lt_aix_libpath_sed='
15500 /Import File Strings/,/^$/ {
15501 /^0/ {
15502 s/^0 *\(.*\)$/\1/
15503 p
15504 }
15505 }'
15506aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15507# Check for a 64-bit object if we didn't find anything.
15508if test -z "$aix_libpath"; then
15509 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15510fi
00020c16 15511fi
5213506e
RW
15512rm -f core conftest.err conftest.$ac_objext \
15513 conftest$ac_exeext conftest.$ac_ext
00020c16 15514if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15515
00020c16
ILT
15516 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
15517 # Warning - without using the other run time loading flags,
15518 # -berok will link without error, but may produce a broken library.
15519 no_undefined_flag=' ${wl}-bernotok'
15520 allow_undefined_flag=' ${wl}-berok'
15521 # Exported symbols can be pulled into shared objects from archives
15522 whole_archive_flag_spec='$convenience'
15523 archive_cmds_need_lc=yes
15524 # This is similar to how AIX traditionally builds its shared libraries.
15525 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
15526 fi
15527 fi
15528 ;;
da0f6381 15529
00020c16
ILT
15530 amigaos*)
15531 case $host_cpu in
15532 powerpc)
15533 # see comment about AmigaOS4 .so support
15534 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15535 archive_expsym_cmds=''
15536 ;;
15537 m68k)
15538 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
15539 hardcode_libdir_flag_spec='-L$libdir'
15540 hardcode_minus_L=yes
15541 ;;
15542 esac
15543 ;;
da0f6381 15544
00020c16
ILT
15545 bsdi[45]*)
15546 export_dynamic_flag_spec=-rdynamic
15547 ;;
da0f6381 15548
00020c16
ILT
15549 cygwin* | mingw* | pw32* | cegcc*)
15550 # When not using gcc, we currently assume that we are using
15551 # Microsoft Visual C++.
15552 # hardcode_libdir_flag_spec is actually meaningless, as there is
15553 # no search path for DLLs.
15554 hardcode_libdir_flag_spec=' '
15555 allow_undefined_flag=unsupported
15556 # Tell ltmain to make .lib files, not .a files.
15557 libext=lib
15558 # Tell ltmain to make .dll files, not .so files.
15559 shrext_cmds=".dll"
15560 # FIXME: Setting linknames here is a bad hack.
15561 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
15562 # The linker will automatically build a .lib file if we build a DLL.
15563 old_archive_from_new_cmds='true'
15564 # FIXME: Should let the user specify the lib program.
15565 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
15566 fix_srcfile_path='`cygpath -w "$srcfile"`'
15567 enable_shared_with_static_runtimes=yes
15568 ;;
da0f6381 15569
00020c16 15570 darwin* | rhapsody*)
da0f6381
PB
15571
15572
00020c16
ILT
15573 archive_cmds_need_lc=no
15574 hardcode_direct=no
15575 hardcode_automatic=yes
15576 hardcode_shlibpath_var=unsupported
15577 whole_archive_flag_spec=''
15578 link_all_deplibs=yes
15579 allow_undefined_flag="$_lt_dar_allow_undefined"
15580 case $cc_basename in
15581 ifort*) _lt_dar_can_shared=yes ;;
15582 *) _lt_dar_can_shared=$GCC ;;
15583 esac
15584 if test "$_lt_dar_can_shared" = "yes"; then
15585 output_verbose_link_cmd=echo
15586 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
15587 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
15588 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
15589 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
da0f6381 15590
00020c16
ILT
15591 else
15592 ld_shlibs=no
15593 fi
da0f6381 15594
00020c16 15595 ;;
da0f6381 15596
00020c16
ILT
15597 dgux*)
15598 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15599 hardcode_libdir_flag_spec='-L$libdir'
15600 hardcode_shlibpath_var=no
15601 ;;
da0f6381 15602
00020c16
ILT
15603 freebsd1*)
15604 ld_shlibs=no
15605 ;;
da0f6381 15606
00020c16
ILT
15607 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15608 # support. Future versions do this automatically, but an explicit c++rt0.o
15609 # does not break anything, and helps significantly (at the cost of a little
15610 # extra space).
15611 freebsd2.2*)
15612 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
15613 hardcode_libdir_flag_spec='-R$libdir'
15614 hardcode_direct=yes
15615 hardcode_shlibpath_var=no
15616 ;;
da0f6381 15617
00020c16
ILT
15618 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
15619 freebsd2*)
15620 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15621 hardcode_direct=yes
15622 hardcode_minus_L=yes
15623 hardcode_shlibpath_var=no
15624 ;;
da0f6381 15625
00020c16
ILT
15626 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
15627 freebsd* | dragonfly*)
15628 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
15629 hardcode_libdir_flag_spec='-R$libdir'
15630 hardcode_direct=yes
15631 hardcode_shlibpath_var=no
15632 ;;
da0f6381 15633
00020c16
ILT
15634 hpux9*)
15635 if test "$GCC" = yes; then
15636 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
15637 else
15638 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
15639 fi
15640 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15641 hardcode_libdir_separator=:
15642 hardcode_direct=yes
da0f6381 15643
00020c16
ILT
15644 # hardcode_minus_L: Not really in the search PATH,
15645 # but as the default location of the library.
15646 hardcode_minus_L=yes
15647 export_dynamic_flag_spec='${wl}-E'
15648 ;;
da0f6381 15649
00020c16
ILT
15650 hpux10*)
15651 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
15652 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15653 else
15654 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15655 fi
15656 if test "$with_gnu_ld" = no; then
15657 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15658 hardcode_libdir_flag_spec_ld='+b $libdir'
15659 hardcode_libdir_separator=:
15660 hardcode_direct=yes
15661 hardcode_direct_absolute=yes
15662 export_dynamic_flag_spec='${wl}-E'
15663 # hardcode_minus_L: Not really in the search PATH,
15664 # but as the default location of the library.
15665 hardcode_minus_L=yes
15666 fi
15667 ;;
da0f6381 15668
00020c16
ILT
15669 hpux11*)
15670 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
15671 case $host_cpu in
15672 hppa*64*)
15673 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15674 ;;
15675 ia64*)
15676 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15677 ;;
15678 *)
15679 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15680 ;;
15681 esac
15682 else
15683 case $host_cpu in
15684 hppa*64*)
15685 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15686 ;;
15687 ia64*)
15688 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15689 ;;
15690 *)
15691 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15692 ;;
15693 esac
15694 fi
15695 if test "$with_gnu_ld" = no; then
15696 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15697 hardcode_libdir_separator=:
da0f6381 15698
00020c16
ILT
15699 case $host_cpu in
15700 hppa*64*|ia64*)
15701 hardcode_direct=no
15702 hardcode_shlibpath_var=no
15703 ;;
15704 *)
15705 hardcode_direct=yes
15706 hardcode_direct_absolute=yes
15707 export_dynamic_flag_spec='${wl}-E'
da0f6381 15708
00020c16
ILT
15709 # hardcode_minus_L: Not really in the search PATH,
15710 # but as the default location of the library.
15711 hardcode_minus_L=yes
15712 ;;
15713 esac
15714 fi
15715 ;;
da0f6381 15716
00020c16
ILT
15717 irix5* | irix6* | nonstopux*)
15718 if test "$GCC" = yes; then
15719 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15720 # Try to use the -exported_symbol ld option, if it does not
15721 # work, assume that -exports_file does not work either and
15722 # implicitly export all symbols.
15723 save_LDFLAGS="$LDFLAGS"
15724 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5213506e
RW
15725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15726/* end confdefs.h. */
00020c16
ILT
15727int foo(void) {}
15728_ACEOF
5213506e 15729if ac_fn_c_try_link "$LINENO"; then :
00020c16 15730 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
da0f6381 15731
00020c16 15732fi
5213506e
RW
15733rm -f core conftest.err conftest.$ac_objext \
15734 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
15735 LDFLAGS="$save_LDFLAGS"
15736 else
15737 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
15738 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
15739 fi
15740 archive_cmds_need_lc='no'
15741 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15742 hardcode_libdir_separator=:
15743 inherit_rpath=yes
15744 link_all_deplibs=yes
15745 ;;
da0f6381 15746
00020c16
ILT
15747 netbsd*)
15748 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15749 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
15750 else
15751 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
15752 fi
15753 hardcode_libdir_flag_spec='-R$libdir'
15754 hardcode_direct=yes
15755 hardcode_shlibpath_var=no
15756 ;;
da0f6381 15757
00020c16
ILT
15758 newsos6)
15759 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15760 hardcode_direct=yes
15761 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15762 hardcode_libdir_separator=:
15763 hardcode_shlibpath_var=no
15764 ;;
da0f6381 15765
00020c16
ILT
15766 *nto* | *qnx*)
15767 ;;
da0f6381 15768
00020c16
ILT
15769 openbsd*)
15770 if test -f /usr/libexec/ld.so; then
15771 hardcode_direct=yes
15772 hardcode_shlibpath_var=no
15773 hardcode_direct_absolute=yes
15774 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15775 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15776 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
15777 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15778 export_dynamic_flag_spec='${wl}-E'
15779 else
15780 case $host_os in
15781 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
15782 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15783 hardcode_libdir_flag_spec='-R$libdir'
15784 ;;
15785 *)
15786 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15787 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15788 ;;
15789 esac
15790 fi
15791 else
15792 ld_shlibs=no
15793 fi
15794 ;;
da0f6381 15795
00020c16
ILT
15796 os2*)
15797 hardcode_libdir_flag_spec='-L$libdir'
15798 hardcode_minus_L=yes
15799 allow_undefined_flag=unsupported
15800 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
15801 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
15802 ;;
da0f6381 15803
00020c16
ILT
15804 osf3*)
15805 if test "$GCC" = yes; then
15806 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
15807 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15808 else
15809 allow_undefined_flag=' -expect_unresolved \*'
15810 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
15811 fi
15812 archive_cmds_need_lc='no'
15813 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15814 hardcode_libdir_separator=:
15815 ;;
da0f6381 15816
00020c16
ILT
15817 osf4* | osf5*) # as osf3* with the addition of -msym flag
15818 if test "$GCC" = yes; then
15819 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
15820 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15821 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15822 else
15823 allow_undefined_flag=' -expect_unresolved \*'
15824 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
15825 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
15826 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
da0f6381 15827
00020c16
ILT
15828 # Both c and cxx compiler support -rpath directly
15829 hardcode_libdir_flag_spec='-rpath $libdir'
15830 fi
15831 archive_cmds_need_lc='no'
15832 hardcode_libdir_separator=:
15833 ;;
da0f6381 15834
00020c16
ILT
15835 solaris*)
15836 no_undefined_flag=' -z defs'
15837 if test "$GCC" = yes; then
15838 wlarc='${wl}'
15839 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15840 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15841 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15842 else
15843 case `$CC -V 2>&1` in
15844 *"Compilers 5.0"*)
15845 wlarc=''
15846 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15847 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15848 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
15849 ;;
15850 *)
15851 wlarc='${wl}'
15852 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
15853 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15854 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15855 ;;
15856 esac
15857 fi
15858 hardcode_libdir_flag_spec='-R$libdir'
15859 hardcode_shlibpath_var=no
15860 case $host_os in
15861 solaris2.[0-5] | solaris2.[0-5].*) ;;
15862 *)
15863 # The compiler driver will combine and reorder linker options,
15864 # but understands `-z linker_flag'. GCC discards it without `$wl',
15865 # but is careful enough not to reorder.
15866 # Supported since Solaris 2.6 (maybe 2.5.1?)
15867 if test "$GCC" = yes; then
15868 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
15869 else
15870 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
15871 fi
15872 ;;
15873 esac
15874 link_all_deplibs=yes
15875 ;;
da0f6381 15876
00020c16
ILT
15877 sunos4*)
15878 if test "x$host_vendor" = xsequent; then
15879 # Use $CC to link under sequent, because it throws in some extra .o
15880 # files that make .init and .fini sections work.
15881 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15882 else
15883 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15884 fi
15885 hardcode_libdir_flag_spec='-L$libdir'
15886 hardcode_direct=yes
15887 hardcode_minus_L=yes
15888 hardcode_shlibpath_var=no
15889 ;;
da0f6381 15890
00020c16
ILT
15891 sysv4)
15892 case $host_vendor in
15893 sni)
15894 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15895 hardcode_direct=yes # is this really true???
15896 ;;
15897 siemens)
15898 ## LD is ld it makes a PLAMLIB
15899 ## CC just makes a GrossModule.
15900 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15901 reload_cmds='$CC -r -o $output$reload_objs'
15902 hardcode_direct=no
15903 ;;
15904 motorola)
15905 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15906 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
15907 ;;
15908 esac
15909 runpath_var='LD_RUN_PATH'
15910 hardcode_shlibpath_var=no
15911 ;;
da0f6381 15912
00020c16
ILT
15913 sysv4.3*)
15914 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15915 hardcode_shlibpath_var=no
15916 export_dynamic_flag_spec='-Bexport'
15917 ;;
da0f6381 15918
00020c16
ILT
15919 sysv4*MP*)
15920 if test -d /usr/nec; then
15921 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15922 hardcode_shlibpath_var=no
15923 runpath_var=LD_RUN_PATH
15924 hardcode_runpath_var=yes
15925 ld_shlibs=yes
15926 fi
15927 ;;
da0f6381 15928
00020c16
ILT
15929 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15930 no_undefined_flag='${wl}-z,text'
15931 archive_cmds_need_lc=no
15932 hardcode_shlibpath_var=no
15933 runpath_var='LD_RUN_PATH'
da0f6381 15934
00020c16
ILT
15935 if test "$GCC" = yes; then
15936 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15937 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15938 else
15939 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15940 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15941 fi
15942 ;;
da0f6381 15943
00020c16
ILT
15944 sysv5* | sco3.2v5* | sco5v6*)
15945 # Note: We can NOT use -z defs as we might desire, because we do not
15946 # link with -lc, and that would cause any symbols used from libc to
15947 # always be unresolved, which means just about no library would
15948 # ever link correctly. If we're not using GNU ld we use -z text
15949 # though, which does catch some bad symbols but isn't as heavy-handed
15950 # as -z defs.
15951 no_undefined_flag='${wl}-z,text'
15952 allow_undefined_flag='${wl}-z,nodefs'
15953 archive_cmds_need_lc=no
15954 hardcode_shlibpath_var=no
15955 hardcode_libdir_flag_spec='${wl}-R,$libdir'
15956 hardcode_libdir_separator=':'
15957 link_all_deplibs=yes
15958 export_dynamic_flag_spec='${wl}-Bexport'
15959 runpath_var='LD_RUN_PATH'
da0f6381 15960
00020c16
ILT
15961 if test "$GCC" = yes; then
15962 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15963 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15964 else
15965 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15966 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15967 fi
15968 ;;
da0f6381 15969
00020c16
ILT
15970 uts4*)
15971 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15972 hardcode_libdir_flag_spec='-L$libdir'
15973 hardcode_shlibpath_var=no
15974 ;;
da0f6381 15975
00020c16
ILT
15976 *)
15977 ld_shlibs=no
15978 ;;
15979 esac
da0f6381 15980
00020c16
ILT
15981 if test x$host_vendor = xsni; then
15982 case $host in
15983 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
15984 export_dynamic_flag_spec='${wl}-Blargedynsym'
15985 ;;
15986 esac
15987 fi
15988 fi
da0f6381 15989
5213506e
RW
15990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
15991$as_echo "$ld_shlibs" >&6; }
00020c16 15992test "$ld_shlibs" = no && can_build_shared=no
da0f6381 15993
00020c16 15994with_gnu_ld=$with_gnu_ld
da0f6381
PB
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
00020c16
ILT
16010#
16011# Do we need to explicitly link libc?
16012#
16013case "x$archive_cmds_need_lc" in
16014x|xyes)
16015 # Assume -lc should be added
16016 archive_cmds_need_lc=yes
da0f6381 16017
00020c16
ILT
16018 if test "$enable_shared" = yes && test "$GCC" = yes; then
16019 case $archive_cmds in
16020 *'~'*)
16021 # FIXME: we may have to deal with multi-command sequences.
16022 ;;
16023 '$CC '*)
16024 # Test whether the compiler implicitly links with -lc since on some
16025 # systems, -lgcc has to come before -lc. If gcc already passes -lc
16026 # to ld, don't add -lc before -lgcc.
5213506e
RW
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
16028$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
16029if test "${lt_cv_archive_cmds_need_lc+set}" = set; then :
16030 $as_echo_n "(cached) " >&6
00020c16
ILT
16031else
16032 $RM conftest*
16033 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 16034
5213506e 16035 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
16036 (eval $ac_compile) 2>&5
16037 ac_status=$?
5213506e
RW
16038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16039 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
16040 soname=conftest
16041 lib=conftest
16042 libobjs=conftest.$ac_objext
16043 deplibs=
16044 wl=$lt_prog_compiler_wl
16045 pic_flag=$lt_prog_compiler_pic
16046 compiler_flags=-v
16047 linker_flags=-v
16048 verstring=
16049 output_objdir=.
16050 libname=conftest
16051 lt_save_allow_undefined_flag=$allow_undefined_flag
16052 allow_undefined_flag=
5213506e 16053 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
16054 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
16055 ac_status=$?
5213506e
RW
16056 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16057 test $ac_status = 0; }
00020c16
ILT
16058 then
16059 lt_cv_archive_cmds_need_lc=no
16060 else
16061 lt_cv_archive_cmds_need_lc=yes
16062 fi
16063 allow_undefined_flag=$lt_save_allow_undefined_flag
16064 else
16065 cat conftest.err 1>&5
16066 fi
16067 $RM conftest*
da0f6381 16068
00020c16 16069fi
5213506e
RW
16070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
16071$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
00020c16
ILT
16072 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
16073 ;;
16074 esac
16075 fi
16076 ;;
16077esac
da0f6381
PB
16078
16079
16080
16081
5d47bb02 16082
da0f6381 16083
da0f6381 16084
da0f6381 16085
da0f6381 16086
00020c16
ILT
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
5213506e
RW
16235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
16236$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
16237
16238if test "$GCC" = yes; then
16239 case $host_os in
16240 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
16241 *) lt_awk_arg="/^libraries:/" ;;
16242 esac
16243 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
16244 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
16245 # if the path contains ";" then we assume it to be the separator
16246 # otherwise default to the standard path separator (i.e. ":") - it is
16247 # assumed that no part of a normal pathname contains ";" but that should
16248 # okay in the real world where ";" in dirpaths is itself problematic.
16249 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
16250 else
16251 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16252 fi
16253 # Ok, now we have the path, separated by spaces, we can step through it
16254 # and add multilib dir if necessary.
16255 lt_tmp_lt_search_path_spec=
16256 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
16257 for lt_sys_path in $lt_search_path_spec; do
16258 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
16259 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
16260 else
16261 test -d "$lt_sys_path" && \
16262 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
16263 fi
16264 done
16265 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
16266BEGIN {RS=" "; FS="/|\n";} {
16267 lt_foo="";
16268 lt_count=0;
16269 for (lt_i = NF; lt_i > 0; lt_i--) {
16270 if ($lt_i != "" && $lt_i != ".") {
16271 if ($lt_i == "..") {
16272 lt_count++;
16273 } else {
16274 if (lt_count == 0) {
16275 lt_foo="/" $lt_i lt_foo;
16276 } else {
16277 lt_count--;
16278 }
16279 }
16280 }
16281 }
16282 if (lt_foo != "") { lt_freq[lt_foo]++; }
16283 if (lt_freq[lt_foo] == 1) { print lt_foo; }
16284}'`
16285 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
16286else
16287 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16288fi
16289library_names_spec=
16290libname_spec='lib$name'
16291soname_spec=
16292shrext_cmds=".so"
16293postinstall_cmds=
16294postuninstall_cmds=
16295finish_cmds=
16296finish_eval=
16297shlibpath_var=
16298shlibpath_overrides_runpath=unknown
16299version_type=none
16300dynamic_linker="$host_os ld.so"
16301sys_lib_dlsearch_path_spec="/lib /usr/lib"
16302need_lib_prefix=unknown
16303hardcode_into_libs=no
16304
16305# when you set need_version to no, make sure it does not cause -set_version
16306# flags to be left without arguments
16307need_version=unknown
16308
16309case $host_os in
16310aix3*)
16311 version_type=linux
16312 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
16313 shlibpath_var=LIBPATH
16314
16315 # AIX 3 has no versioning support, so we append a major version to the name.
16316 soname_spec='${libname}${release}${shared_ext}$major'
16317 ;;
16318
16319aix[4-9]*)
16320 version_type=linux
16321 need_lib_prefix=no
16322 need_version=no
16323 hardcode_into_libs=yes
16324 if test "$host_cpu" = ia64; then
16325 # AIX 5 supports IA64
16326 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
16327 shlibpath_var=LD_LIBRARY_PATH
16328 else
16329 # With GCC up to 2.95.x, collect2 would create an import file
16330 # for dependence libraries. The import file would start with
16331 # the line `#! .'. This would cause the generated library to
16332 # depend on `.', always an invalid library. This was fixed in
16333 # development snapshots of GCC prior to 3.0.
16334 case $host_os in
16335 aix4 | aix4.[01] | aix4.[01].*)
16336 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
16337 echo ' yes '
da0f6381
PB
16338 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
16339 :
16340 else
16341 can_build_shared=no
16342 fi
16343 ;;
16344 esac
16345 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
16346 # soname into executable. Probably we can add versioning support to
16347 # collect2, so additional links can be useful in future.
16348 if test "$aix_use_runtimelinking" = yes; then
16349 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
16350 # instead of lib<name>.a to let people know that these are not
16351 # typical AIX shared libraries.
16352 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16353 else
16354 # We preserve .a as extension for shared libraries through AIX4.2
16355 # and later when we are not doing run time linking.
16356 library_names_spec='${libname}${release}.a $libname.a'
16357 soname_spec='${libname}${release}${shared_ext}$major'
16358 fi
16359 shlibpath_var=LIBPATH
16360 fi
16361 ;;
16362
16363amigaos*)
5d47bb02
PG
16364 case $host_cpu in
16365 powerpc)
16366 # Since July 2007 AmigaOS4 officially supports .so libraries.
16367 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
16368 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16369 ;;
16370 m68k)
da0f6381
PB
16371 library_names_spec='$libname.ixlibrary $libname.a'
16372 # Create ${libname}_ixlibrary.a entries in /sys/libs.
16373 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
5d47bb02
PG
16374 ;;
16375 esac
da0f6381
PB
16376 ;;
16377
16378beos*)
16379 library_names_spec='${libname}${shared_ext}'
16380 dynamic_linker="$host_os ld.so"
16381 shlibpath_var=LIBRARY_PATH
16382 ;;
16383
16384bsdi[45]*)
16385 version_type=linux
16386 need_version=no
16387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16388 soname_spec='${libname}${release}${shared_ext}$major'
16389 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
16390 shlibpath_var=LD_LIBRARY_PATH
16391 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
16392 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
16393 # the default ld.so.conf also contains /usr/contrib/lib and
16394 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
16395 # libtool to hard-code these into programs
16396 ;;
16397
5d47bb02 16398cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
16399 version_type=windows
16400 shrext_cmds=".dll"
16401 need_version=no
16402 need_lib_prefix=no
16403
5d47bb02
PG
16404 case $GCC,$host_os in
16405 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
da0f6381
PB
16406 library_names_spec='$libname.dll.a'
16407 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16408 postinstall_cmds='base_file=`basename \${file}`~
16409 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
16410 dldir=$destdir/`dirname \$dlpath`~
16411 test -d \$dldir || mkdir -p \$dldir~
16412 $install_prog $dir/$dlname \$dldir/$dlname~
16413 chmod a+x \$dldir/$dlname~
16414 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16415 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16416 fi'
16417 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16418 dlpath=$dir/\$dldll~
16419 $RM \$dlpath'
16420 shlibpath_overrides_runpath=yes
16421
16422 case $host_os in
16423 cygwin*)
16424 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
16425 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16426 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
16427 ;;
5d47bb02 16428 mingw* | cegcc*)
da0f6381
PB
16429 # MinGW DLLs use traditional 'lib' prefix
16430 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16431 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
16432 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
16433 # It is most probably a Windows format PATH printed by
16434 # mingw gcc, but we are running on Cygwin. Gcc prints its search
16435 # path with ; separators, and with drive letters. We can handle the
16436 # drive letters (cygwin fileutils understands them), so leave them,
16437 # especially as we might pass files found there to a mingw objdump,
16438 # which wouldn't understand a cygwinified path. Ahh.
16439 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
16440 else
16441 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16442 fi
16443 ;;
16444 pw32*)
16445 # pw32 DLLs use 'pw' prefix rather than 'lib'
16446 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16447 ;;
16448 esac
16449 ;;
16450
16451 *)
16452 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
16453 ;;
16454 esac
16455 dynamic_linker='Win32 ld.exe'
16456 # FIXME: first we should search . and the directory the executable is in
16457 shlibpath_var=PATH
16458 ;;
16459
16460darwin* | rhapsody*)
16461 dynamic_linker="$host_os dyld"
16462 version_type=darwin
16463 need_lib_prefix=no
16464 need_version=no
16465 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
16466 soname_spec='${libname}${release}${major}$shared_ext'
16467 shlibpath_overrides_runpath=yes
16468 shlibpath_var=DYLD_LIBRARY_PATH
16469 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
16470
16471 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
16472 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
16473 ;;
16474
16475dgux*)
16476 version_type=linux
16477 need_lib_prefix=no
16478 need_version=no
16479 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
16480 soname_spec='${libname}${release}${shared_ext}$major'
16481 shlibpath_var=LD_LIBRARY_PATH
16482 ;;
16483
16484freebsd1*)
16485 dynamic_linker=no
16486 ;;
16487
16488freebsd* | dragonfly*)
16489 # DragonFly does not have aout. When/if they implement a new
16490 # versioning mechanism, adjust this.
16491 if test -x /usr/bin/objformat; then
16492 objformat=`/usr/bin/objformat`
16493 else
16494 case $host_os in
16495 freebsd[123]*) objformat=aout ;;
16496 *) objformat=elf ;;
16497 esac
16498 fi
16499 version_type=freebsd-$objformat
16500 case $version_type in
16501 freebsd-elf*)
16502 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16503 need_version=no
16504 need_lib_prefix=no
16505 ;;
16506 freebsd-*)
16507 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
16508 need_version=yes
16509 ;;
16510 esac
16511 shlibpath_var=LD_LIBRARY_PATH
16512 case $host_os in
16513 freebsd2*)
16514 shlibpath_overrides_runpath=yes
16515 ;;
16516 freebsd3.[01]* | freebsdelf3.[01]*)
16517 shlibpath_overrides_runpath=yes
16518 hardcode_into_libs=yes
16519 ;;
16520 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
16521 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
16522 shlibpath_overrides_runpath=no
16523 hardcode_into_libs=yes
16524 ;;
16525 *) # from 4.6 on, and DragonFly
16526 shlibpath_overrides_runpath=yes
16527 hardcode_into_libs=yes
16528 ;;
16529 esac
16530 ;;
16531
16532gnu*)
16533 version_type=linux
16534 need_lib_prefix=no
16535 need_version=no
16536 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
16537 soname_spec='${libname}${release}${shared_ext}$major'
16538 shlibpath_var=LD_LIBRARY_PATH
16539 hardcode_into_libs=yes
16540 ;;
16541
16542hpux9* | hpux10* | hpux11*)
16543 # Give a soname corresponding to the major version so that dld.sl refuses to
16544 # link against other versions.
16545 version_type=sunos
16546 need_lib_prefix=no
16547 need_version=no
16548 case $host_cpu in
16549 ia64*)
16550 shrext_cmds='.so'
16551 hardcode_into_libs=yes
16552 dynamic_linker="$host_os dld.so"
16553 shlibpath_var=LD_LIBRARY_PATH
16554 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16555 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16556 soname_spec='${libname}${release}${shared_ext}$major'
16557 if test "X$HPUX_IA64_MODE" = X32; then
16558 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16559 else
16560 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16561 fi
16562 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16563 ;;
16564 hppa*64*)
16565 shrext_cmds='.sl'
16566 hardcode_into_libs=yes
16567 dynamic_linker="$host_os dld.sl"
16568 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16569 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16571 soname_spec='${libname}${release}${shared_ext}$major'
16572 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16573 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16574 ;;
16575 *)
16576 shrext_cmds='.sl'
16577 dynamic_linker="$host_os dld.sl"
16578 shlibpath_var=SHLIB_PATH
16579 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
16580 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16581 soname_spec='${libname}${release}${shared_ext}$major'
16582 ;;
16583 esac
16584 # HP-UX runs *really* slowly unless shared libraries are mode 555.
16585 postinstall_cmds='chmod 555 $lib'
16586 ;;
16587
16588interix[3-9]*)
16589 version_type=linux
16590 need_lib_prefix=no
16591 need_version=no
16592 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16593 soname_spec='${libname}${release}${shared_ext}$major'
16594 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16595 shlibpath_var=LD_LIBRARY_PATH
16596 shlibpath_overrides_runpath=no
16597 hardcode_into_libs=yes
16598 ;;
16599
16600irix5* | irix6* | nonstopux*)
16601 case $host_os in
16602 nonstopux*) version_type=nonstopux ;;
16603 *)
16604 if test "$lt_cv_prog_gnu_ld" = yes; then
16605 version_type=linux
16606 else
16607 version_type=irix
16608 fi ;;
16609 esac
16610 need_lib_prefix=no
16611 need_version=no
16612 soname_spec='${libname}${release}${shared_ext}$major'
16613 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
16614 case $host_os in
16615 irix5* | nonstopux*)
16616 libsuff= shlibsuff=
16617 ;;
16618 *)
16619 case $LD in # libtool.m4 will add one of these switches to LD
16620 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16621 libsuff= shlibsuff= libmagic=32-bit;;
16622 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16623 libsuff=32 shlibsuff=N32 libmagic=N32;;
16624 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16625 libsuff=64 shlibsuff=64 libmagic=64-bit;;
16626 *) libsuff= shlibsuff= libmagic=never-match;;
16627 esac
16628 ;;
16629 esac
16630 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16631 shlibpath_overrides_runpath=no
16632 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
16633 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
16634 hardcode_into_libs=yes
16635 ;;
16636
16637# No shared lib support for Linux oldld, aout, or coff.
16638linux*oldld* | linux*aout* | linux*coff*)
16639 dynamic_linker=no
16640 ;;
16641
16642# This must be Linux ELF.
7a9d3fe8 16643linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
16644 version_type=linux
16645 need_lib_prefix=no
16646 need_version=no
16647 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16648 soname_spec='${libname}${release}${shared_ext}$major'
16649 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16650 shlibpath_var=LD_LIBRARY_PATH
16651 shlibpath_overrides_runpath=no
baafc534 16652
da0f6381 16653 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
16654 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
16655 $as_echo_n "(cached) " >&6
baafc534
RW
16656else
16657 lt_cv_shlibpath_overrides_runpath=no
16658 save_LDFLAGS=$LDFLAGS
16659 save_libdir=$libdir
16660 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
16661 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
5213506e 16662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16663/* end confdefs.h. */
16664
16665int
16666main ()
16667{
16668
16669 ;
16670 return 0;
16671}
16672_ACEOF
5213506e
RW
16673if ac_fn_c_try_link "$LINENO"; then :
16674 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
baafc534 16675 lt_cv_shlibpath_overrides_runpath=yes
da0f6381 16676fi
da0f6381 16677fi
5213506e
RW
16678rm -f core conftest.err conftest.$ac_objext \
16679 conftest$ac_exeext conftest.$ac_ext
baafc534
RW
16680 LDFLAGS=$save_LDFLAGS
16681 libdir=$save_libdir
16682
16683fi
16684
16685 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381
PB
16686
16687 # This implies no fast_install, which is unacceptable.
16688 # Some rework will be needed to allow for fast_install
16689 # before this can be enabled.
16690 hardcode_into_libs=yes
16691
16692 # Append ld.so.conf contents to the search path
16693 if test -f /etc/ld.so.conf; then
5d47bb02 16694 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
da0f6381
PB
16695 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16696 fi
16697
16698 # We used to test for /lib/ld.so.1 and disable shared libraries on
16699 # powerpc, because MkLinux only supported shared libraries with the
16700 # GNU dynamic linker. Since this was broken with cross compilers,
16701 # most powerpc-linux boxes support dynamic linking these days and
16702 # people can always --disable-shared, the test was removed, and we
16703 # assume the GNU/Linux dynamic linker is in use.
16704 dynamic_linker='GNU/Linux ld.so'
16705 ;;
16706
16707netbsd*)
16708 version_type=sunos
16709 need_lib_prefix=no
16710 need_version=no
16711 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16712 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16713 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16714 dynamic_linker='NetBSD (a.out) ld.so'
16715 else
16716 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16717 soname_spec='${libname}${release}${shared_ext}$major'
16718 dynamic_linker='NetBSD ld.elf_so'
16719 fi
16720 shlibpath_var=LD_LIBRARY_PATH
16721 shlibpath_overrides_runpath=yes
16722 hardcode_into_libs=yes
16723 ;;
16724
16725newsos6)
16726 version_type=linux
16727 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16728 shlibpath_var=LD_LIBRARY_PATH
16729 shlibpath_overrides_runpath=yes
16730 ;;
16731
16732*nto* | *qnx*)
16733 version_type=qnx
16734 need_lib_prefix=no
16735 need_version=no
16736 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16737 soname_spec='${libname}${release}${shared_ext}$major'
16738 shlibpath_var=LD_LIBRARY_PATH
16739 shlibpath_overrides_runpath=no
16740 hardcode_into_libs=yes
16741 dynamic_linker='ldqnx.so'
16742 ;;
16743
16744openbsd*)
16745 version_type=sunos
16746 sys_lib_dlsearch_path_spec="/usr/lib"
16747 need_lib_prefix=no
16748 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
16749 case $host_os in
16750 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
16751 *) need_version=no ;;
16752 esac
16753 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16754 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16755 shlibpath_var=LD_LIBRARY_PATH
16756 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
16757 case $host_os in
16758 openbsd2.[89] | openbsd2.[89].*)
16759 shlibpath_overrides_runpath=no
16760 ;;
16761 *)
16762 shlibpath_overrides_runpath=yes
16763 ;;
16764 esac
16765 else
16766 shlibpath_overrides_runpath=yes
16767 fi
16768 ;;
16769
16770os2*)
16771 libname_spec='$name'
16772 shrext_cmds=".dll"
16773 need_lib_prefix=no
16774 library_names_spec='$libname${shared_ext} $libname.a'
16775 dynamic_linker='OS/2 ld.exe'
16776 shlibpath_var=LIBPATH
16777 ;;
16778
16779osf3* | osf4* | osf5*)
16780 version_type=osf
16781 need_lib_prefix=no
16782 need_version=no
16783 soname_spec='${libname}${release}${shared_ext}$major'
16784 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16785 shlibpath_var=LD_LIBRARY_PATH
16786 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16787 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
16788 ;;
16789
16790rdos*)
16791 dynamic_linker=no
16792 ;;
16793
16794solaris*)
16795 version_type=linux
16796 need_lib_prefix=no
16797 need_version=no
16798 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16799 soname_spec='${libname}${release}${shared_ext}$major'
16800 shlibpath_var=LD_LIBRARY_PATH
16801 shlibpath_overrides_runpath=yes
16802 hardcode_into_libs=yes
16803 # ldd complains unless libraries are executable
16804 postinstall_cmds='chmod +x $lib'
16805 ;;
16806
16807sunos4*)
16808 version_type=sunos
16809 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16810 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16811 shlibpath_var=LD_LIBRARY_PATH
16812 shlibpath_overrides_runpath=yes
16813 if test "$with_gnu_ld" = yes; then
16814 need_lib_prefix=no
16815 fi
16816 need_version=yes
16817 ;;
16818
16819sysv4 | sysv4.3*)
16820 version_type=linux
16821 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16822 soname_spec='${libname}${release}${shared_ext}$major'
16823 shlibpath_var=LD_LIBRARY_PATH
16824 case $host_vendor in
16825 sni)
16826 shlibpath_overrides_runpath=no
16827 need_lib_prefix=no
16828 runpath_var=LD_RUN_PATH
16829 ;;
16830 siemens)
16831 need_lib_prefix=no
16832 ;;
16833 motorola)
16834 need_lib_prefix=no
16835 need_version=no
16836 shlibpath_overrides_runpath=no
16837 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16838 ;;
16839 esac
16840 ;;
16841
16842sysv4*MP*)
16843 if test -d /usr/nec ;then
16844 version_type=linux
16845 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
16846 soname_spec='$libname${shared_ext}.$major'
16847 shlibpath_var=LD_LIBRARY_PATH
16848 fi
16849 ;;
16850
16851sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16852 version_type=freebsd-elf
16853 need_lib_prefix=no
16854 need_version=no
16855 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16856 soname_spec='${libname}${release}${shared_ext}$major'
16857 shlibpath_var=LD_LIBRARY_PATH
16858 shlibpath_overrides_runpath=yes
16859 hardcode_into_libs=yes
16860 if test "$with_gnu_ld" = yes; then
16861 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16862 else
16863 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16864 case $host_os in
16865 sco3.2v5*)
16866 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16867 ;;
16868 esac
16869 fi
16870 sys_lib_dlsearch_path_spec='/usr/lib'
16871 ;;
16872
16873tpf*)
16874 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
16875 version_type=linux
16876 need_lib_prefix=no
16877 need_version=no
5d47bb02 16878 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
da0f6381
PB
16879 shlibpath_var=LD_LIBRARY_PATH
16880 shlibpath_overrides_runpath=no
16881 hardcode_into_libs=yes
16882 ;;
16883
16884uts4*)
16885 version_type=linux
16886 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16887 soname_spec='${libname}${release}${shared_ext}$major'
16888 shlibpath_var=LD_LIBRARY_PATH
16889 ;;
16890
16891*)
16892 dynamic_linker=no
16893 ;;
16894esac
5213506e
RW
16895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
16896$as_echo "$dynamic_linker" >&6; }
da0f6381
PB
16897test "$dynamic_linker" = no && can_build_shared=no
16898
16899variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16900if test "$GCC" = yes; then
16901 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16902fi
16903
5d47bb02
PG
16904if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
16905 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
16906fi
16907if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
16908 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
16909fi
16910
da0f6381
PB
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
5213506e
RW
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16998$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
da0f6381
PB
16999hardcode_action=
17000if test -n "$hardcode_libdir_flag_spec" ||
17001 test -n "$runpath_var" ||
17002 test "X$hardcode_automatic" = "Xyes" ; then
17003
17004 # We can hardcode non-existent directories.
17005 if test "$hardcode_direct" != no &&
17006 # If the only mechanism to avoid hardcoding is shlibpath_var, we
17007 # have to relink, otherwise we might link with an installed library
17008 # when we should be linking with a yet-to-be-installed one
17009 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
17010 test "$hardcode_minus_L" != no; then
17011 # Linking always hardcodes the temporary library directory.
17012 hardcode_action=relink
17013 else
17014 # We can link without hardcoding, and we can hardcode nonexisting dirs.
17015 hardcode_action=immediate
17016 fi
17017else
17018 # We cannot hardcode anything, or else we can only hardcode existing
17019 # directories.
17020 hardcode_action=unsupported
17021fi
5213506e
RW
17022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
17023$as_echo "$hardcode_action" >&6; }
da0f6381
PB
17024
17025if test "$hardcode_action" = relink ||
17026 test "$inherit_rpath" = yes; then
17027 # Fast installation is not supported
17028 enable_fast_install=no
17029elif test "$shlibpath_overrides_runpath" = yes ||
17030 test "$enable_shared" = no; then
17031 # Fast installation is not necessary
17032 enable_fast_install=needless
17033fi
17034
17035
17036
17037
17038
17039
17040 if test "x$enable_dlopen" != xyes; then
17041 enable_dlopen=unknown
17042 enable_dlopen_self=unknown
17043 enable_dlopen_self_static=unknown
17044else
17045 lt_cv_dlopen=no
17046 lt_cv_dlopen_libs=
17047
17048 case $host_os in
17049 beos*)
17050 lt_cv_dlopen="load_add_on"
17051 lt_cv_dlopen_libs=
17052 lt_cv_dlopen_self=yes
17053 ;;
17054
5d47bb02 17055 mingw* | pw32* | cegcc*)
da0f6381 17056 lt_cv_dlopen="LoadLibrary"
5213506e
RW
17057 lt_cv_dlopen_libs=
17058 ;;
da0f6381 17059
5213506e
RW
17060 cygwin*)
17061 lt_cv_dlopen="dlopen"
17062 lt_cv_dlopen_libs=
17063 ;;
17064
17065 darwin*)
17066 # if libdl is installed we need to link against it
17067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
17068$as_echo_n "checking for dlopen in -ldl... " >&6; }
17069if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
17070 $as_echo_n "(cached) " >&6
da0f6381
PB
17071else
17072 ac_check_lib_save_LIBS=$LIBS
5213506e
RW
17073LIBS="-ldl $LIBS"
17074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17075/* end confdefs.h. */
17076
5213506e
RW
17077/* Override any GCC internal prototype to avoid an error.
17078 Use char because int might match the return type of a GCC
17079 builtin and then its argument prototype would still apply. */
da0f6381
PB
17080#ifdef __cplusplus
17081extern "C"
17082#endif
5213506e 17083char dlopen ();
da0f6381
PB
17084int
17085main ()
17086{
5213506e 17087return dlopen ();
da0f6381
PB
17088 ;
17089 return 0;
17090}
17091_ACEOF
5213506e
RW
17092if ac_fn_c_try_link "$LINENO"; then :
17093 ac_cv_lib_dl_dlopen=yes
da0f6381 17094else
5213506e 17095 ac_cv_lib_dl_dlopen=no
da0f6381 17096fi
5213506e
RW
17097rm -f core conftest.err conftest.$ac_objext \
17098 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
17099LIBS=$ac_check_lib_save_LIBS
17100fi
5213506e
RW
17101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
17102$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
17103if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
17104 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
da0f6381 17105else
da0f6381 17106
5213506e
RW
17107 lt_cv_dlopen="dyld"
17108 lt_cv_dlopen_libs=
17109 lt_cv_dlopen_self=yes
da0f6381 17110
5213506e 17111fi
da0f6381 17112
5213506e 17113 ;;
da0f6381 17114
5213506e
RW
17115 *)
17116 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
17117if test "x$ac_cv_func_shl_load" = x""yes; then :
17118 lt_cv_dlopen="shl_load"
17119else
17120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
17121$as_echo_n "checking for shl_load in -ldld... " >&6; }
17122if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
17123 $as_echo_n "(cached) " >&6
17124else
17125 ac_check_lib_save_LIBS=$LIBS
17126LIBS="-ldld $LIBS"
17127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17128/* end confdefs.h. */
17129
17130/* Override any GCC internal prototype to avoid an error.
17131 Use char because int might match the return type of a GCC
da0f6381 17132 builtin and then its argument prototype would still apply. */
da0f6381 17133#ifdef __cplusplus
5213506e 17134extern "C"
da0f6381 17135#endif
5213506e 17136char shl_load ();
da0f6381
PB
17137int
17138main ()
17139{
5213506e 17140return shl_load ();
da0f6381
PB
17141 ;
17142 return 0;
17143}
17144_ACEOF
5213506e
RW
17145if ac_fn_c_try_link "$LINENO"; then :
17146 ac_cv_lib_dld_shl_load=yes
da0f6381 17147else
5213506e 17148 ac_cv_lib_dld_shl_load=no
da0f6381 17149fi
5213506e
RW
17150rm -f core conftest.err conftest.$ac_objext \
17151 conftest$ac_exeext conftest.$ac_ext
17152LIBS=$ac_check_lib_save_LIBS
da0f6381 17153fi
5213506e
RW
17154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
17155$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
17156if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
17157 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
17158else
17159 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
17160if test "x$ac_cv_func_dlopen" = x""yes; then :
da0f6381
PB
17161 lt_cv_dlopen="dlopen"
17162else
5213506e
RW
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
17164$as_echo_n "checking for dlopen in -ldl... " >&6; }
17165if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
17166 $as_echo_n "(cached) " >&6
da0f6381
PB
17167else
17168 ac_check_lib_save_LIBS=$LIBS
17169LIBS="-ldl $LIBS"
5213506e 17170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17171/* end confdefs.h. */
17172
5213506e
RW
17173/* Override any GCC internal prototype to avoid an error.
17174 Use char because int might match the return type of a GCC
17175 builtin and then its argument prototype would still apply. */
da0f6381
PB
17176#ifdef __cplusplus
17177extern "C"
17178#endif
da0f6381
PB
17179char dlopen ();
17180int
17181main ()
17182{
5213506e 17183return dlopen ();
da0f6381
PB
17184 ;
17185 return 0;
17186}
17187_ACEOF
5213506e 17188if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
17189 ac_cv_lib_dl_dlopen=yes
17190else
5213506e 17191 ac_cv_lib_dl_dlopen=no
da0f6381 17192fi
5213506e
RW
17193rm -f core conftest.err conftest.$ac_objext \
17194 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
17195LIBS=$ac_check_lib_save_LIBS
17196fi
5213506e
RW
17197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
17198$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
17199if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
da0f6381
PB
17200 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
17201else
5213506e
RW
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
17203$as_echo_n "checking for dlopen in -lsvld... " >&6; }
17204if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
17205 $as_echo_n "(cached) " >&6
da0f6381
PB
17206else
17207 ac_check_lib_save_LIBS=$LIBS
17208LIBS="-lsvld $LIBS"
5213506e 17209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17210/* end confdefs.h. */
17211
5213506e
RW
17212/* Override any GCC internal prototype to avoid an error.
17213 Use char because int might match the return type of a GCC
17214 builtin and then its argument prototype would still apply. */
da0f6381
PB
17215#ifdef __cplusplus
17216extern "C"
17217#endif
da0f6381
PB
17218char dlopen ();
17219int
17220main ()
17221{
5213506e 17222return dlopen ();
da0f6381
PB
17223 ;
17224 return 0;
17225}
17226_ACEOF
5213506e 17227if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
17228 ac_cv_lib_svld_dlopen=yes
17229else
5213506e 17230 ac_cv_lib_svld_dlopen=no
da0f6381 17231fi
5213506e
RW
17232rm -f core conftest.err conftest.$ac_objext \
17233 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
17234LIBS=$ac_check_lib_save_LIBS
17235fi
5213506e
RW
17236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
17237$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
17238if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
da0f6381
PB
17239 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
17240else
5213506e
RW
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
17242$as_echo_n "checking for dld_link in -ldld... " >&6; }
17243if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
17244 $as_echo_n "(cached) " >&6
da0f6381
PB
17245else
17246 ac_check_lib_save_LIBS=$LIBS
17247LIBS="-ldld $LIBS"
5213506e 17248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17249/* end confdefs.h. */
17250
5213506e
RW
17251/* Override any GCC internal prototype to avoid an error.
17252 Use char because int might match the return type of a GCC
17253 builtin and then its argument prototype would still apply. */
da0f6381
PB
17254#ifdef __cplusplus
17255extern "C"
17256#endif
da0f6381
PB
17257char dld_link ();
17258int
17259main ()
17260{
5213506e 17261return dld_link ();
00020c16
ILT
17262 ;
17263 return 0;
17264}
17265_ACEOF
5213506e 17266if ac_fn_c_try_link "$LINENO"; then :
00020c16
ILT
17267 ac_cv_lib_dld_dld_link=yes
17268else
5213506e 17269 ac_cv_lib_dld_dld_link=no
00020c16 17270fi
5213506e
RW
17271rm -f core conftest.err conftest.$ac_objext \
17272 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
17273LIBS=$ac_check_lib_save_LIBS
17274fi
5213506e
RW
17275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
17276$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
17277if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
00020c16
ILT
17278 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
17279fi
17280
17281
17282fi
17283
17284
17285fi
17286
17287
17288fi
17289
17290
17291fi
17292
17293
17294fi
17295
17296 ;;
17297 esac
17298
17299 if test "x$lt_cv_dlopen" != xno; then
17300 enable_dlopen=yes
17301 else
17302 enable_dlopen=no
17303 fi
17304
17305 case $lt_cv_dlopen in
17306 dlopen)
17307 save_CPPFLAGS="$CPPFLAGS"
17308 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
17309
17310 save_LDFLAGS="$LDFLAGS"
17311 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
17312
17313 save_LIBS="$LIBS"
17314 LIBS="$lt_cv_dlopen_libs $LIBS"
17315
5213506e
RW
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
17317$as_echo_n "checking whether a program can dlopen itself... " >&6; }
17318if test "${lt_cv_dlopen_self+set}" = set; then :
17319 $as_echo_n "(cached) " >&6
00020c16
ILT
17320else
17321 if test "$cross_compiling" = yes; then :
17322 lt_cv_dlopen_self=cross
17323else
17324 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17325 lt_status=$lt_dlunknown
17326 cat > conftest.$ac_ext <<_LT_EOF
d7f09764 17327#line 17327 "configure"
00020c16
ILT
17328#include "confdefs.h"
17329
17330#if HAVE_DLFCN_H
17331#include <dlfcn.h>
17332#endif
17333
17334#include <stdio.h>
17335
17336#ifdef RTLD_GLOBAL
17337# define LT_DLGLOBAL RTLD_GLOBAL
17338#else
17339# ifdef DL_GLOBAL
17340# define LT_DLGLOBAL DL_GLOBAL
17341# else
17342# define LT_DLGLOBAL 0
17343# endif
17344#endif
17345
17346/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17347 find out it does not work in some platform. */
17348#ifndef LT_DLLAZY_OR_NOW
17349# ifdef RTLD_LAZY
17350# define LT_DLLAZY_OR_NOW RTLD_LAZY
17351# else
17352# ifdef DL_LAZY
17353# define LT_DLLAZY_OR_NOW DL_LAZY
17354# else
17355# ifdef RTLD_NOW
17356# define LT_DLLAZY_OR_NOW RTLD_NOW
17357# else
17358# ifdef DL_NOW
17359# define LT_DLLAZY_OR_NOW DL_NOW
17360# else
17361# define LT_DLLAZY_OR_NOW 0
17362# endif
17363# endif
17364# endif
17365# endif
17366#endif
17367
17368void fnord() { int i=42;}
17369int main ()
17370{
17371 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17372 int status = $lt_dlunknown;
17373
17374 if (self)
17375 {
17376 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
17377 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17378 /* dlclose (self); */
17379 }
17380 else
17381 puts (dlerror ());
17382
17383 return status;
17384}
17385_LT_EOF
5213506e 17386 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17387 (eval $ac_link) 2>&5
17388 ac_status=$?
5213506e
RW
17389 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17390 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17391 (./conftest; exit; ) >&5 2>/dev/null
17392 lt_status=$?
17393 case x$lt_status in
17394 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
17395 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
17396 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
17397 esac
17398 else :
17399 # compilation failed
17400 lt_cv_dlopen_self=no
17401 fi
17402fi
17403rm -fr conftest*
17404
17405
17406fi
5213506e
RW
17407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
17408$as_echo "$lt_cv_dlopen_self" >&6; }
00020c16
ILT
17409
17410 if test "x$lt_cv_dlopen_self" = xyes; then
17411 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
5213506e
RW
17412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
17413$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
17414if test "${lt_cv_dlopen_self_static+set}" = set; then :
17415 $as_echo_n "(cached) " >&6
00020c16
ILT
17416else
17417 if test "$cross_compiling" = yes; then :
17418 lt_cv_dlopen_self_static=cross
17419else
17420 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17421 lt_status=$lt_dlunknown
17422 cat > conftest.$ac_ext <<_LT_EOF
d7f09764 17423#line 17423 "configure"
00020c16
ILT
17424#include "confdefs.h"
17425
17426#if HAVE_DLFCN_H
17427#include <dlfcn.h>
17428#endif
17429
17430#include <stdio.h>
17431
17432#ifdef RTLD_GLOBAL
17433# define LT_DLGLOBAL RTLD_GLOBAL
17434#else
17435# ifdef DL_GLOBAL
17436# define LT_DLGLOBAL DL_GLOBAL
17437# else
17438# define LT_DLGLOBAL 0
17439# endif
17440#endif
17441
17442/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17443 find out it does not work in some platform. */
17444#ifndef LT_DLLAZY_OR_NOW
17445# ifdef RTLD_LAZY
17446# define LT_DLLAZY_OR_NOW RTLD_LAZY
17447# else
17448# ifdef DL_LAZY
17449# define LT_DLLAZY_OR_NOW DL_LAZY
17450# else
17451# ifdef RTLD_NOW
17452# define LT_DLLAZY_OR_NOW RTLD_NOW
17453# else
17454# ifdef DL_NOW
17455# define LT_DLLAZY_OR_NOW DL_NOW
17456# else
17457# define LT_DLLAZY_OR_NOW 0
17458# endif
17459# endif
17460# endif
17461# endif
17462#endif
17463
17464void fnord() { int i=42;}
17465int main ()
17466{
17467 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17468 int status = $lt_dlunknown;
17469
17470 if (self)
17471 {
17472 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
17473 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17474 /* dlclose (self); */
17475 }
17476 else
17477 puts (dlerror ());
17478
17479 return status;
17480}
17481_LT_EOF
5213506e 17482 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17483 (eval $ac_link) 2>&5
17484 ac_status=$?
5213506e
RW
17485 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17486 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17487 (./conftest; exit; ) >&5 2>/dev/null
17488 lt_status=$?
17489 case x$lt_status in
17490 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
17491 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
17492 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
17493 esac
17494 else :
17495 # compilation failed
17496 lt_cv_dlopen_self_static=no
17497 fi
17498fi
17499rm -fr conftest*
17500
17501
17502fi
5213506e
RW
17503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
17504$as_echo "$lt_cv_dlopen_self_static" >&6; }
00020c16
ILT
17505 fi
17506
17507 CPPFLAGS="$save_CPPFLAGS"
17508 LDFLAGS="$save_LDFLAGS"
17509 LIBS="$save_LIBS"
17510 ;;
17511 esac
17512
17513 case $lt_cv_dlopen_self in
17514 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
17515 *) enable_dlopen_self=unknown ;;
17516 esac
17517
17518 case $lt_cv_dlopen_self_static in
17519 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
17520 *) enable_dlopen_self_static=unknown ;;
17521 esac
17522fi
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540striplib=
17541old_striplib=
5213506e
RW
17542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
17543$as_echo_n "checking whether stripping libraries is possible... " >&6; }
00020c16
ILT
17544if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
17545 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
17546 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5213506e
RW
17547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17548$as_echo "yes" >&6; }
00020c16
ILT
17549else
17550# FIXME - insert some real tests, host_os isn't really good enough
17551 case $host_os in
17552 darwin*)
17553 if test -n "$STRIP" ; then
17554 striplib="$STRIP -x"
17555 old_striplib="$STRIP -S"
5213506e
RW
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17557$as_echo "yes" >&6; }
00020c16 17558 else
5213506e
RW
17559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17560$as_echo "no" >&6; }
00020c16
ILT
17561 fi
17562 ;;
17563 *)
5213506e
RW
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17565$as_echo "no" >&6; }
00020c16
ILT
17566 ;;
17567 esac
17568fi
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581 # Report which library types will actually be built
5213506e
RW
17582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
17583$as_echo_n "checking if libtool supports shared libraries... " >&6; }
17584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
17585$as_echo "$can_build_shared" >&6; }
00020c16 17586
5213506e
RW
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
17588$as_echo_n "checking whether to build shared libraries... " >&6; }
00020c16
ILT
17589 test "$can_build_shared" = "no" && enable_shared=no
17590
17591 # On AIX, shared libraries and static libraries use the same namespace, and
17592 # are all built from PIC.
17593 case $host_os in
17594 aix3*)
17595 test "$enable_shared" = yes && enable_static=no
17596 if test -n "$RANLIB"; then
17597 archive_cmds="$archive_cmds~\$RANLIB \$lib"
17598 postinstall_cmds='$RANLIB $lib'
17599 fi
17600 ;;
17601
17602 aix[4-9]*)
17603 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
17604 test "$enable_shared" = yes && enable_static=no
17605 fi
17606 ;;
17607 esac
5213506e
RW
17608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
17609$as_echo "$enable_shared" >&6; }
00020c16 17610
5213506e
RW
17611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
17612$as_echo_n "checking whether to build static libraries... " >&6; }
00020c16
ILT
17613 # Make sure either enable_shared or enable_static is yes.
17614 test "$enable_shared" = yes || enable_static=yes
5213506e
RW
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
17616$as_echo "$enable_static" >&6; }
00020c16
ILT
17617
17618
17619
17620
17621fi
17622ac_ext=c
17623ac_cpp='$CPP $CPPFLAGS'
17624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17626ac_compiler_gnu=$ac_cv_c_compiler_gnu
17627
17628CC="$lt_save_CC"
17629
17630
5213506e 17631ac_ext=cpp
00020c16
ILT
17632ac_cpp='$CXXCPP $CPPFLAGS'
17633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17636
17637archive_cmds_need_lc_CXX=no
17638allow_undefined_flag_CXX=
17639always_export_symbols_CXX=no
17640archive_expsym_cmds_CXX=
17641compiler_needs_object_CXX=no
17642export_dynamic_flag_spec_CXX=
17643hardcode_direct_CXX=no
17644hardcode_direct_absolute_CXX=no
17645hardcode_libdir_flag_spec_CXX=
17646hardcode_libdir_flag_spec_ld_CXX=
17647hardcode_libdir_separator_CXX=
17648hardcode_minus_L_CXX=no
17649hardcode_shlibpath_var_CXX=unsupported
17650hardcode_automatic_CXX=no
17651inherit_rpath_CXX=no
17652module_cmds_CXX=
17653module_expsym_cmds_CXX=
17654link_all_deplibs_CXX=unknown
17655old_archive_cmds_CXX=$old_archive_cmds
17656no_undefined_flag_CXX=
17657whole_archive_flag_spec_CXX=
17658enable_shared_with_static_runtimes_CXX=no
17659
17660# Source file extension for C++ test sources.
17661ac_ext=cpp
17662
17663# Object file extension for compiled C++ test sources.
17664objext=o
17665objext_CXX=$objext
17666
17667# No sense in running all these tests if we already determined that
17668# the CXX compiler isn't working. Some variables (like enable_shared)
17669# are currently assumed to apply to all compilers on this platform,
17670# and will be corrupted by setting them based on a non-working compiler.
17671if test "$_lt_caught_CXX_error" != yes; then
17672 # Code to be used in simple compile tests
17673 lt_simple_compile_test_code="int some_variable = 0;"
17674
17675 # Code to be used in simple link tests
17676 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
17677
17678 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
17679
17680
17681
17682
17683
17684
17685# If no C compiler was specified, use CC.
17686LTCC=${LTCC-"$CC"}
17687
17688# If no C compiler flags were specified, use CFLAGS.
17689LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17690
17691# Allow CC to be a program name with arguments.
17692compiler=$CC
17693
17694
17695 # save warnings/boilerplate of simple test code
17696 ac_outfile=conftest.$ac_objext
17697echo "$lt_simple_compile_test_code" >conftest.$ac_ext
17698eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17699_lt_compiler_boilerplate=`cat conftest.err`
17700$RM conftest*
17701
17702 ac_outfile=conftest.$ac_objext
17703echo "$lt_simple_link_test_code" >conftest.$ac_ext
17704eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17705_lt_linker_boilerplate=`cat conftest.err`
17706$RM -r conftest*
17707
17708
17709 # Allow CC to be a program name with arguments.
17710 lt_save_CC=$CC
17711 lt_save_LD=$LD
17712 lt_save_GCC=$GCC
17713 GCC=$GXX
17714 lt_save_with_gnu_ld=$with_gnu_ld
17715 lt_save_path_LD=$lt_cv_path_LD
17716 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
17717 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
17718 else
17719 $as_unset lt_cv_prog_gnu_ld
17720 fi
17721 if test -n "${lt_cv_path_LDCXX+set}"; then
17722 lt_cv_path_LD=$lt_cv_path_LDCXX
17723 else
17724 $as_unset lt_cv_path_LD
17725 fi
17726 test -z "${LDCXX+set}" || LD=$LDCXX
17727 CC=${CXX-"c++"}
17728 compiler=$CC
17729 compiler_CXX=$CC
17730 for cc_temp in $compiler""; do
17731 case $cc_temp in
17732 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17733 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17734 \-*) ;;
17735 *) break;;
17736 esac
17737done
17738cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
17739
17740
17741 if test -n "$compiler"; then
17742 # We don't want -fno-exception when compiling C++ code, so set the
17743 # no_builtin_flag separately
17744 if test "$GXX" = yes; then
17745 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
17746 else
17747 lt_prog_compiler_no_builtin_flag_CXX=
17748 fi
17749
17750 if test "$GXX" = yes; then
17751 # Set up default GNU C++ configuration
17752
17753
17754
5213506e
RW
17755# Check whether --with-gnu-ld was given.
17756if test "${with_gnu_ld+set}" = set; then :
17757 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
00020c16
ILT
17758else
17759 with_gnu_ld=no
5213506e
RW
17760fi
17761
00020c16
ILT
17762ac_prog=ld
17763if test "$GCC" = yes; then
17764 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17766$as_echo_n "checking for ld used by $CC... " >&6; }
00020c16
ILT
17767 case $host in
17768 *-*-mingw*)
17769 # gcc leaves a trailing carriage return which upsets mingw
17770 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17771 *)
17772 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17773 esac
17774 case $ac_prog in
17775 # Accept absolute paths.
17776 [\\/]* | ?:[\\/]*)
17777 re_direlt='/[^/][^/]*/\.\./'
17778 # Canonicalize the pathname of ld
17779 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
17780 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
17781 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
17782 done
17783 test -z "$LD" && LD="$ac_prog"
17784 ;;
17785 "")
17786 # If it fails, then pretend we aren't using GCC.
17787 ac_prog=ld
17788 ;;
17789 *)
17790 # If it is relative, then search for the first ld in PATH.
17791 with_gnu_ld=unknown
17792 ;;
17793 esac
17794elif test "$with_gnu_ld" = yes; then
5213506e
RW
17795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17796$as_echo_n "checking for GNU ld... " >&6; }
00020c16 17797else
5213506e
RW
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17799$as_echo_n "checking for non-GNU ld... " >&6; }
00020c16 17800fi
5213506e
RW
17801if test "${lt_cv_path_LD+set}" = set; then :
17802 $as_echo_n "(cached) " >&6
00020c16
ILT
17803else
17804 if test -z "$LD"; then
17805 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17806 for ac_dir in $PATH; do
17807 IFS="$lt_save_ifs"
17808 test -z "$ac_dir" && ac_dir=.
17809 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17810 lt_cv_path_LD="$ac_dir/$ac_prog"
17811 # Check to see if the program is GNU ld. I'd rather use --version,
17812 # but apparently some variants of GNU ld only accept -v.
17813 # Break only if it was the GNU/non-GNU ld that we prefer.
17814 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
17815 *GNU* | *'with BFD'*)
17816 test "$with_gnu_ld" != no && break
17817 ;;
17818 *)
17819 test "$with_gnu_ld" != yes && break
17820 ;;
17821 esac
17822 fi
17823 done
17824 IFS="$lt_save_ifs"
17825else
17826 lt_cv_path_LD="$LD" # Let the user override the test with a path.
17827fi
17828fi
17829
17830LD="$lt_cv_path_LD"
17831if test -n "$LD"; then
5213506e
RW
17832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17833$as_echo "$LD" >&6; }
00020c16 17834else
5213506e
RW
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17836$as_echo "no" >&6; }
00020c16 17837fi
5213506e
RW
17838test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
17839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17840$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
17841if test "${lt_cv_prog_gnu_ld+set}" = set; then :
17842 $as_echo_n "(cached) " >&6
00020c16
ILT
17843else
17844 # I'd rather use --version here, but apparently some GNU lds only accept -v.
17845case `$LD -v 2>&1 </dev/null` in
17846*GNU* | *'with BFD'*)
17847 lt_cv_prog_gnu_ld=yes
17848 ;;
17849*)
17850 lt_cv_prog_gnu_ld=no
17851 ;;
17852esac
17853fi
5213506e
RW
17854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
17855$as_echo "$lt_cv_prog_gnu_ld" >&6; }
00020c16
ILT
17856with_gnu_ld=$lt_cv_prog_gnu_ld
17857
17858
17859
17860
17861
17862
17863
17864 # Check if GNU C++ uses GNU ld as the underlying linker, since the
17865 # archiving commands below assume that GNU ld is being used.
17866 if test "$with_gnu_ld" = yes; then
17867 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
17868 archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17869
17870 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
17871 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
17872
17873 # If archive_cmds runs LD, not CC, wlarc should be empty
17874 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
17875 # investigate it a little bit more. (MM)
17876 wlarc='${wl}'
17877
17878 # ancient GNU ld didn't support --whole-archive et. al.
17879 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
17880 $GREP 'no-whole-archive' > /dev/null; then
17881 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17882 else
17883 whole_archive_flag_spec_CXX=
17884 fi
17885 else
17886 with_gnu_ld=no
17887 wlarc=
17888
17889 # A generic and very simple default shared library creation
17890 # command for GNU C++ for the case where it uses the native
17891 # linker, instead of GNU ld. If possible, this setting should
17892 # overridden to take advantage of the native linker features on
17893 # the platform it is being used on.
17894 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
17895 fi
17896
17897 # Commands to make compiler produce verbose output that lists
17898 # what "hidden" libraries, object files and flags are used when
17899 # linking a shared library.
713e2ea6 17900 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
00020c16
ILT
17901
17902 else
17903 GXX=no
17904 with_gnu_ld=no
17905 wlarc=
17906 fi
17907
17908 # PORTME: fill in a description of your system's C++ link characteristics
5213506e
RW
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17910$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
17911 ld_shlibs_CXX=yes
17912 case $host_os in
17913 aix3*)
17914 # FIXME: insert proper C++ library support
17915 ld_shlibs_CXX=no
17916 ;;
17917 aix[4-9]*)
17918 if test "$host_cpu" = ia64; then
17919 # On IA64, the linker does run time linking by default, so we don't
17920 # have to do anything special.
17921 aix_use_runtimelinking=no
17922 exp_sym_flag='-Bexport'
17923 no_entry_flag=""
17924 else
17925 aix_use_runtimelinking=no
17926
17927 # Test if we are trying to use run time linking or normal
17928 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17929 # need to do runtime linking.
17930 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17931 for ld_flag in $LDFLAGS; do
17932 case $ld_flag in
17933 *-brtl*)
17934 aix_use_runtimelinking=yes
17935 break
17936 ;;
17937 esac
17938 done
17939 ;;
17940 esac
17941
17942 exp_sym_flag='-bexport'
17943 no_entry_flag='-bnoentry'
17944 fi
17945
17946 # When large executables or shared objects are built, AIX ld can
17947 # have problems creating the table of contents. If linking a library
17948 # or program results in "error TOC overflow" add -mminimal-toc to
17949 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17950 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17951
17952 archive_cmds_CXX=''
17953 hardcode_direct_CXX=yes
17954 hardcode_direct_absolute_CXX=yes
17955 hardcode_libdir_separator_CXX=':'
17956 link_all_deplibs_CXX=yes
17957 file_list_spec_CXX='${wl}-f,'
17958
17959 if test "$GXX" = yes; then
17960 case $host_os in aix4.[012]|aix4.[012].*)
17961 # We only want to do this on AIX 4.2 and lower, the check
17962 # below for broken collect2 doesn't work under 4.3+
17963 collect2name=`${CC} -print-prog-name=collect2`
17964 if test -f "$collect2name" &&
17965 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17966 then
17967 # We have reworked collect2
17968 :
17969 else
17970 # We have old collect2
17971 hardcode_direct_CXX=unsupported
17972 # It fails to find uninstalled libraries when the uninstalled
17973 # path is not listed in the libpath. Setting hardcode_minus_L
17974 # to unsupported forces relinking
17975 hardcode_minus_L_CXX=yes
17976 hardcode_libdir_flag_spec_CXX='-L$libdir'
17977 hardcode_libdir_separator_CXX=
17978 fi
17979 esac
17980 shared_flag='-shared'
17981 if test "$aix_use_runtimelinking" = yes; then
17982 shared_flag="$shared_flag "'${wl}-G'
17983 fi
17984 else
17985 # not using gcc
17986 if test "$host_cpu" = ia64; then
17987 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17988 # chokes on -Wl,-G. The following line is correct:
17989 shared_flag='-G'
17990 else
17991 if test "$aix_use_runtimelinking" = yes; then
17992 shared_flag='${wl}-G'
17993 else
17994 shared_flag='${wl}-bM:SRE'
17995 fi
17996 fi
17997 fi
17998
17999 export_dynamic_flag_spec_CXX='${wl}-bexpall'
18000 # It seems that -bexpall does not export symbols beginning with
18001 # underscore (_), so it is better to generate a list of symbols to
18002 # export.
18003 always_export_symbols_CXX=yes
18004 if test "$aix_use_runtimelinking" = yes; then
18005 # Warning - without using the other runtime loading flags (-brtl),
18006 # -berok will link without error, but may produce a broken library.
18007 allow_undefined_flag_CXX='-berok'
18008 # Determine the default libpath from the value encoded in an empty
18009 # executable.
5213506e 18010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
18011/* end confdefs.h. */
18012
18013int
18014main ()
18015{
18016
18017 ;
18018 return 0;
18019}
18020_ACEOF
5213506e 18021if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
18022
18023lt_aix_libpath_sed='
18024 /Import File Strings/,/^$/ {
18025 /^0/ {
18026 s/^0 *\(.*\)$/\1/
18027 p
18028 }
18029 }'
18030aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18031# Check for a 64-bit object if we didn't find anything.
18032if test -z "$aix_libpath"; then
18033 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18034fi
00020c16 18035fi
5213506e
RW
18036rm -f core conftest.err conftest.$ac_objext \
18037 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
18038if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
18039
18040 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
18041
18042 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
18043 else
18044 if test "$host_cpu" = ia64; then
18045 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
18046 allow_undefined_flag_CXX="-z nodefs"
18047 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
18048 else
18049 # Determine the default libpath from the value encoded in an
18050 # empty executable.
5213506e 18051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
18052/* end confdefs.h. */
18053
18054int
18055main ()
18056{
18057
18058 ;
18059 return 0;
18060}
18061_ACEOF
5213506e 18062if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
18063
18064lt_aix_libpath_sed='
18065 /Import File Strings/,/^$/ {
18066 /^0/ {
18067 s/^0 *\(.*\)$/\1/
18068 p
18069 }
18070 }'
18071aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18072# Check for a 64-bit object if we didn't find anything.
18073if test -z "$aix_libpath"; then
18074 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18075fi
00020c16 18076fi
5213506e
RW
18077rm -f core conftest.err conftest.$ac_objext \
18078 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
18079if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
18080
18081 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
18082 # Warning - without using the other run time loading flags,
18083 # -berok will link without error, but may produce a broken library.
18084 no_undefined_flag_CXX=' ${wl}-bernotok'
18085 allow_undefined_flag_CXX=' ${wl}-berok'
18086 # Exported symbols can be pulled into shared objects from archives
18087 whole_archive_flag_spec_CXX='$convenience'
18088 archive_cmds_need_lc_CXX=yes
18089 # This is similar to how AIX traditionally builds its shared
18090 # libraries.
18091 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
18092 fi
18093 fi
18094 ;;
18095
18096 beos*)
18097 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18098 allow_undefined_flag_CXX=unsupported
18099 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
18100 # support --undefined. This deserves some investigation. FIXME
18101 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18102 else
18103 ld_shlibs_CXX=no
18104 fi
18105 ;;
18106
18107 chorus*)
18108 case $cc_basename in
18109 *)
18110 # FIXME: insert proper C++ library support
18111 ld_shlibs_CXX=no
18112 ;;
18113 esac
18114 ;;
18115
18116 cygwin* | mingw* | pw32* | cegcc*)
18117 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
18118 # as there is no search path for DLLs.
18119 hardcode_libdir_flag_spec_CXX='-L$libdir'
18120 allow_undefined_flag_CXX=unsupported
18121 always_export_symbols_CXX=no
18122 enable_shared_with_static_runtimes_CXX=yes
18123
18124 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
18125 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
18126 # If the export-symbols file already is a .def file (1st line
18127 # is EXPORTS), use it as is; otherwise, prepend...
18128 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
18129 cp $export_symbols $output_objdir/$soname.def;
18130 else
18131 echo EXPORTS > $output_objdir/$soname.def;
18132 cat $export_symbols >> $output_objdir/$soname.def;
18133 fi~
18134 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
18135 else
18136 ld_shlibs_CXX=no
18137 fi
18138 ;;
18139 darwin* | rhapsody*)
18140
18141
18142 archive_cmds_need_lc_CXX=no
18143 hardcode_direct_CXX=no
18144 hardcode_automatic_CXX=yes
18145 hardcode_shlibpath_var_CXX=unsupported
18146 whole_archive_flag_spec_CXX=''
18147 link_all_deplibs_CXX=yes
18148 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
18149 case $cc_basename in
18150 ifort*) _lt_dar_can_shared=yes ;;
18151 *) _lt_dar_can_shared=$GCC ;;
18152 esac
18153 if test "$_lt_dar_can_shared" = "yes"; then
18154 output_verbose_link_cmd=echo
18155 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
18156 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
18157 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
18158 module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
18159 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
18160 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
18161 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
18162 fi
18163
18164 else
18165 ld_shlibs_CXX=no
18166 fi
18167
18168 ;;
18169
18170 dgux*)
18171 case $cc_basename in
18172 ec++*)
18173 # FIXME: insert proper C++ library support
18174 ld_shlibs_CXX=no
18175 ;;
18176 ghcx*)
18177 # Green Hills C++ Compiler
18178 # FIXME: insert proper C++ library support
18179 ld_shlibs_CXX=no
18180 ;;
18181 *)
18182 # FIXME: insert proper C++ library support
18183 ld_shlibs_CXX=no
18184 ;;
18185 esac
18186 ;;
18187
18188 freebsd[12]*)
18189 # C++ shared libraries reported to be fairly broken before
18190 # switch to ELF
18191 ld_shlibs_CXX=no
18192 ;;
18193
18194 freebsd-elf*)
18195 archive_cmds_need_lc_CXX=no
18196 ;;
18197
18198 freebsd* | dragonfly*)
18199 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
18200 # conventions
18201 ld_shlibs_CXX=yes
18202 ;;
18203
18204 gnu*)
18205 ;;
18206
18207 hpux9*)
18208 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18209 hardcode_libdir_separator_CXX=:
18210 export_dynamic_flag_spec_CXX='${wl}-E'
18211 hardcode_direct_CXX=yes
18212 hardcode_minus_L_CXX=yes # Not in the search PATH,
18213 # but as the default
18214 # location of the library.
18215
18216 case $cc_basename in
18217 CC*)
18218 # FIXME: insert proper C++ library support
18219 ld_shlibs_CXX=no
18220 ;;
18221 aCC*)
18222 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
18223 # Commands to make compiler produce verbose output that lists
18224 # what "hidden" libraries, object files and flags are used when
18225 # linking a shared library.
18226 #
18227 # There doesn't appear to be a way to prevent this compiler from
18228 # explicitly linking system object files so we need to strip them
18229 # from the output so that they don't get included in the library
18230 # dependencies.
713e2ea6 18231 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
00020c16
ILT
18232 ;;
18233 *)
18234 if test "$GXX" = yes; then
18235 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
18236 else
18237 # FIXME: insert proper C++ library support
18238 ld_shlibs_CXX=no
18239 fi
18240 ;;
18241 esac
18242 ;;
18243
18244 hpux10*|hpux11*)
18245 if test $with_gnu_ld = no; then
18246 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18247 hardcode_libdir_separator_CXX=:
18248
18249 case $host_cpu in
18250 hppa*64*|ia64*)
18251 ;;
18252 *)
18253 export_dynamic_flag_spec_CXX='${wl}-E'
18254 ;;
18255 esac
18256 fi
18257 case $host_cpu in
18258 hppa*64*|ia64*)
18259 hardcode_direct_CXX=no
18260 hardcode_shlibpath_var_CXX=no
18261 ;;
18262 *)
18263 hardcode_direct_CXX=yes
18264 hardcode_direct_absolute_CXX=yes
18265 hardcode_minus_L_CXX=yes # Not in the search PATH,
18266 # but as the default
18267 # location of the library.
18268 ;;
18269 esac
18270
18271 case $cc_basename in
18272 CC*)
18273 # FIXME: insert proper C++ library support
18274 ld_shlibs_CXX=no
18275 ;;
18276 aCC*)
18277 case $host_cpu in
18278 hppa*64*)
18279 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18280 ;;
18281 ia64*)
18282 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18283 ;;
18284 *)
18285 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18286 ;;
18287 esac
18288 # Commands to make compiler produce verbose output that lists
18289 # what "hidden" libraries, object files and flags are used when
18290 # linking a shared library.
18291 #
18292 # There doesn't appear to be a way to prevent this compiler from
18293 # explicitly linking system object files so we need to strip them
18294 # from the output so that they don't get included in the library
18295 # dependencies.
713e2ea6 18296 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
00020c16
ILT
18297 ;;
18298 *)
18299 if test "$GXX" = yes; then
18300 if test $with_gnu_ld = no; then
18301 case $host_cpu in
18302 hppa*64*)
18303 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18304 ;;
18305 ia64*)
18306 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18307 ;;
18308 *)
18309 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18310 ;;
18311 esac
18312 fi
18313 else
18314 # FIXME: insert proper C++ library support
18315 ld_shlibs_CXX=no
18316 fi
18317 ;;
18318 esac
18319 ;;
18320
18321 interix[3-9]*)
18322 hardcode_direct_CXX=no
18323 hardcode_shlibpath_var_CXX=no
18324 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18325 export_dynamic_flag_spec_CXX='${wl}-E'
18326 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
18327 # Instead, shared libraries are loaded at an image base (0x10000000 by
18328 # default) and relocated if they conflict, which is a slow very memory
18329 # consuming and fragmenting process. To avoid this, we pick a random,
18330 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
18331 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
18332 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
18333 archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
18334 ;;
18335 irix5* | irix6*)
18336 case $cc_basename in
18337 CC*)
18338 # SGI C++
18339 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
18340
18341 # Archives containing C++ object files must be created using
18342 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
18343 # necessary to make sure instantiated templates are included
18344 # in the archive.
18345 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
18346 ;;
18347 *)
18348 if test "$GXX" = yes; then
18349 if test "$with_gnu_ld" = no; then
18350 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
18351 else
18352 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
18353 fi
18354 fi
18355 link_all_deplibs_CXX=yes
18356 ;;
18357 esac
18358 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18359 hardcode_libdir_separator_CXX=:
18360 inherit_rpath_CXX=yes
18361 ;;
18362
18363 linux* | k*bsd*-gnu | kopensolaris*-gnu)
18364 case $cc_basename in
18365 KCC*)
18366 # Kuck and Associates, Inc. (KAI) C++ Compiler
18367
18368 # KCC will only create a shared library if the output file
18369 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18370 # to its proper name (with version) after linking.
18371 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
18372 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
18373 # Commands to make compiler produce verbose output that lists
18374 # what "hidden" libraries, object files and flags are used when
18375 # linking a shared library.
18376 #
18377 # There doesn't appear to be a way to prevent this compiler from
18378 # explicitly linking system object files so we need to strip them
18379 # from the output so that they don't get included in the library
18380 # dependencies.
18381 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
18382
18383 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18384 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18385
18386 # Archives containing C++ object files must be created using
18387 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
18388 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
18389 ;;
18390 icpc* | ecpc* )
18391 # Intel C++
18392 with_gnu_ld=yes
18393 # version 8.0 and above of icpc choke on multiply defined symbols
18394 # if we add $predep_objects and $postdep_objects, however 7.1 and
18395 # earlier do not add the objects themselves.
18396 case `$CC -V 2>&1` in
18397 *"Version 7."*)
18398 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18399 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
18400 ;;
18401 *) # Version 8.0 or newer
18402 tmp_idyn=
18403 case $host_cpu in
18404 ia64*) tmp_idyn=' -i_dynamic';;
18405 esac
18406 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18407 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
18408 ;;
18409 esac
18410 archive_cmds_need_lc_CXX=no
18411 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18412 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18413 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
18414 ;;
18415 pgCC* | pgcpp*)
18416 # Portland Group C++ compiler
18417 case `$CC -V` in
18418 *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
18419 prelink_cmds_CXX='tpldir=Template.dir~
18420 rm -rf $tpldir~
18421 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
18422 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
18423 old_archive_cmds_CXX='tpldir=Template.dir~
18424 rm -rf $tpldir~
18425 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
18426 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
18427 $RANLIB $oldlib'
18428 archive_cmds_CXX='tpldir=Template.dir~
18429 rm -rf $tpldir~
18430 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18431 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18432 archive_expsym_cmds_CXX='tpldir=Template.dir~
18433 rm -rf $tpldir~
18434 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18435 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
18436 ;;
18437 *) # Version 6 will use weak symbols
18438 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18439 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
18440 ;;
18441 esac
18442
18443 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
18444 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18445 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
18446 ;;
18447 cxx*)
18448 # Compaq C++
18449 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18450 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
18451
18452 runpath_var=LD_RUN_PATH
18453 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18454 hardcode_libdir_separator_CXX=:
18455
18456 # Commands to make compiler produce verbose output that lists
18457 # what "hidden" libraries, object files and flags are used when
18458 # linking a shared library.
18459 #
18460 # There doesn't appear to be a way to prevent this compiler from
18461 # explicitly linking system object files so we need to strip them
18462 # from the output so that they don't get included in the library
18463 # dependencies.
18464 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
18465 ;;
18466 xl*)
18467 # IBM XL 8.0 on PPC, with GNU ld
18468 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18469 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18470 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18471 if test "x$supports_anon_versioning" = xyes; then
18472 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
18473 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
18474 echo "local: *; };" >> $output_objdir/$libname.ver~
18475 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
18476 fi
18477 ;;
18478 *)
18479 case `$CC -V 2>&1 | sed 5q` in
18480 *Sun\ C*)
18481 # Sun C++ 5.9
18482 no_undefined_flag_CXX=' -zdefs'
18483 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18484 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
18485 hardcode_libdir_flag_spec_CXX='-R$libdir'
18486 whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
18487 compiler_needs_object_CXX=yes
18488
18489 # Not sure whether something based on
18490 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
18491 # would be better.
18492 output_verbose_link_cmd='echo'
18493
18494 # Archives containing C++ object files must be created using
18495 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18496 # necessary to make sure instantiated templates are included
18497 # in the archive.
18498 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18499 ;;
18500 esac
18501 ;;
18502 esac
18503 ;;
18504
18505 lynxos*)
18506 # FIXME: insert proper C++ library support
18507 ld_shlibs_CXX=no
18508 ;;
18509
18510 m88k*)
18511 # FIXME: insert proper C++ library support
18512 ld_shlibs_CXX=no
18513 ;;
18514
18515 mvs*)
18516 case $cc_basename in
18517 cxx*)
18518 # FIXME: insert proper C++ library support
18519 ld_shlibs_CXX=no
18520 ;;
18521 *)
18522 # FIXME: insert proper C++ library support
18523 ld_shlibs_CXX=no
18524 ;;
18525 esac
18526 ;;
18527
18528 netbsd*)
18529 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18530 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
18531 wlarc=
18532 hardcode_libdir_flag_spec_CXX='-R$libdir'
18533 hardcode_direct_CXX=yes
18534 hardcode_shlibpath_var_CXX=no
18535 fi
18536 # Workaround some broken pre-1.5 toolchains
18537 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
18538 ;;
18539
18540 *nto* | *qnx*)
18541 ld_shlibs_CXX=yes
18542 ;;
18543
18544 openbsd2*)
18545 # C++ shared libraries are fairly broken
18546 ld_shlibs_CXX=no
18547 ;;
18548
18549 openbsd*)
18550 if test -f /usr/libexec/ld.so; then
18551 hardcode_direct_CXX=yes
18552 hardcode_shlibpath_var_CXX=no
18553 hardcode_direct_absolute_CXX=yes
18554 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
18555 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18556 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18557 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
18558 export_dynamic_flag_spec_CXX='${wl}-E'
18559 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
18560 fi
18561 output_verbose_link_cmd=echo
18562 else
18563 ld_shlibs_CXX=no
18564 fi
18565 ;;
18566
18567 osf3* | osf4* | osf5*)
18568 case $cc_basename in
18569 KCC*)
18570 # Kuck and Associates, Inc. (KAI) C++ Compiler
18571
18572 # KCC will only create a shared library if the output file
18573 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18574 # to its proper name (with version) after linking.
18575 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
18576
18577 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18578 hardcode_libdir_separator_CXX=:
18579
18580 # Archives containing C++ object files must be created using
18581 # the KAI C++ compiler.
18582 case $host in
18583 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
18584 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
18585 esac
18586 ;;
18587 RCC*)
18588 # Rational C++ 2.4.1
18589 # FIXME: insert proper C++ library support
18590 ld_shlibs_CXX=no
18591 ;;
18592 cxx*)
18593 case $host in
18594 osf3*)
18595 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
18596 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
18597 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18598 ;;
18599 *)
18600 allow_undefined_flag_CXX=' -expect_unresolved \*'
18601 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
18602 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
18603 echo "-hidden">> $lib.exp~
18604 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
18605 $RM $lib.exp'
18606 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18607 ;;
18608 esac
18609
18610 hardcode_libdir_separator_CXX=:
18611
18612 # Commands to make compiler produce verbose output that lists
18613 # what "hidden" libraries, object files and flags are used when
18614 # linking a shared library.
18615 #
18616 # There doesn't appear to be a way to prevent this compiler from
18617 # explicitly linking system object files so we need to strip them
18618 # from the output so that they don't get included in the library
18619 # dependencies.
18620 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
18621 ;;
18622 *)
18623 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18624 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
18625 case $host in
18626 osf3*)
18627 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
18628 ;;
18629 *)
18630 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
18631 ;;
18632 esac
18633
18634 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18635 hardcode_libdir_separator_CXX=:
18636
18637 # Commands to make compiler produce verbose output that lists
18638 # what "hidden" libraries, object files and flags are used when
18639 # linking a shared library.
713e2ea6 18640 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
00020c16
ILT
18641
18642 else
18643 # FIXME: insert proper C++ library support
18644 ld_shlibs_CXX=no
18645 fi
18646 ;;
18647 esac
18648 ;;
18649
18650 psos*)
18651 # FIXME: insert proper C++ library support
18652 ld_shlibs_CXX=no
18653 ;;
18654
18655 sunos4*)
18656 case $cc_basename in
18657 CC*)
18658 # Sun C++ 4.x
18659 # FIXME: insert proper C++ library support
18660 ld_shlibs_CXX=no
18661 ;;
18662 lcc*)
18663 # Lucid
18664 # FIXME: insert proper C++ library support
18665 ld_shlibs_CXX=no
18666 ;;
18667 *)
18668 # FIXME: insert proper C++ library support
18669 ld_shlibs_CXX=no
18670 ;;
18671 esac
18672 ;;
18673
18674 solaris*)
18675 case $cc_basename in
18676 CC*)
18677 # Sun C++ 4.2, 5.x and Centerline C++
18678 archive_cmds_need_lc_CXX=yes
18679 no_undefined_flag_CXX=' -zdefs'
18680 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18681 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18682 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18683
18684 hardcode_libdir_flag_spec_CXX='-R$libdir'
18685 hardcode_shlibpath_var_CXX=no
18686 case $host_os in
18687 solaris2.[0-5] | solaris2.[0-5].*) ;;
18688 *)
18689 # The compiler driver will combine and reorder linker options,
18690 # but understands `-z linker_flag'.
18691 # Supported since Solaris 2.6 (maybe 2.5.1?)
18692 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
18693 ;;
18694 esac
18695 link_all_deplibs_CXX=yes
18696
18697 output_verbose_link_cmd='echo'
18698
18699 # Archives containing C++ object files must be created using
18700 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18701 # necessary to make sure instantiated templates are included
18702 # in the archive.
18703 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18704 ;;
18705 gcx*)
18706 # Green Hills C++ Compiler
18707 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18708
18709 # The C++ compiler must be used to create the archive.
18710 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
18711 ;;
18712 *)
18713 # GNU C++ compiler with Solaris linker
18714 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18715 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
18716 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
18717 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18718 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18719 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18720
18721 # Commands to make compiler produce verbose output that lists
18722 # what "hidden" libraries, object files and flags are used when
18723 # linking a shared library.
713e2ea6 18724 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
00020c16
ILT
18725 else
18726 # g++ 2.7 appears to require `-G' NOT `-shared' on this
18727 # platform.
18728 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18729 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18730 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18731
18732 # Commands to make compiler produce verbose output that lists
18733 # what "hidden" libraries, object files and flags are used when
18734 # linking a shared library.
713e2ea6 18735 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
00020c16
ILT
18736 fi
18737
18738 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
18739 case $host_os in
18740 solaris2.[0-5] | solaris2.[0-5].*) ;;
18741 *)
18742 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
18743 ;;
18744 esac
18745 fi
18746 ;;
18747 esac
18748 ;;
18749
18750 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
18751 no_undefined_flag_CXX='${wl}-z,text'
18752 archive_cmds_need_lc_CXX=no
18753 hardcode_shlibpath_var_CXX=no
18754 runpath_var='LD_RUN_PATH'
18755
18756 case $cc_basename in
18757 CC*)
18758 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18759 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18760 ;;
18761 *)
18762 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18763 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18764 ;;
18765 esac
18766 ;;
18767
18768 sysv5* | sco3.2v5* | sco5v6*)
18769 # Note: We can NOT use -z defs as we might desire, because we do not
18770 # link with -lc, and that would cause any symbols used from libc to
18771 # always be unresolved, which means just about no library would
18772 # ever link correctly. If we're not using GNU ld we use -z text
18773 # though, which does catch some bad symbols but isn't as heavy-handed
18774 # as -z defs.
18775 no_undefined_flag_CXX='${wl}-z,text'
18776 allow_undefined_flag_CXX='${wl}-z,nodefs'
18777 archive_cmds_need_lc_CXX=no
18778 hardcode_shlibpath_var_CXX=no
18779 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
18780 hardcode_libdir_separator_CXX=':'
18781 link_all_deplibs_CXX=yes
18782 export_dynamic_flag_spec_CXX='${wl}-Bexport'
18783 runpath_var='LD_RUN_PATH'
18784
18785 case $cc_basename in
18786 CC*)
18787 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18788 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18789 ;;
18790 *)
18791 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18792 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18793 ;;
18794 esac
18795 ;;
18796
18797 tandem*)
18798 case $cc_basename in
18799 NCC*)
18800 # NonStop-UX NCC 3.20
18801 # FIXME: insert proper C++ library support
18802 ld_shlibs_CXX=no
18803 ;;
18804 *)
18805 # FIXME: insert proper C++ library support
18806 ld_shlibs_CXX=no
18807 ;;
18808 esac
18809 ;;
18810
18811 vxworks*)
18812 # FIXME: insert proper C++ library support
18813 ld_shlibs_CXX=no
18814 ;;
18815
18816 *)
18817 # FIXME: insert proper C++ library support
18818 ld_shlibs_CXX=no
18819 ;;
18820 esac
18821
5213506e
RW
18822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
18823$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
18824 test "$ld_shlibs_CXX" = no && can_build_shared=no
18825
18826 GCC_CXX="$GXX"
18827 LD_CXX="$LD"
18828
18829 ## CAVEAT EMPTOR:
18830 ## There is no encapsulation within the following macros, do not change
18831 ## the running order or otherwise move them around unless you know exactly
18832 ## what you are doing...
18833 # Dependencies to place before and after the object being linked:
18834predep_objects_CXX=
18835postdep_objects_CXX=
18836predeps_CXX=
18837postdeps_CXX=
18838compiler_lib_search_path_CXX=
18839
18840cat > conftest.$ac_ext <<_LT_EOF
18841class Foo
18842{
18843public:
18844 Foo (void) { a = 0; }
18845private:
18846 int a;
18847};
18848_LT_EOF
18849
5213506e 18850if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
18851 (eval $ac_compile) 2>&5
18852 ac_status=$?
5213506e
RW
18853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18854 test $ac_status = 0; }; then
00020c16
ILT
18855 # Parse the compiler output and extract the necessary
18856 # objects, libraries and library flags.
18857
18858 # Sentinel used to keep track of whether or not we are before
18859 # the conftest object file.
18860 pre_test_object_deps_done=no
18861
18862 for p in `eval "$output_verbose_link_cmd"`; do
18863 case $p in
18864
18865 -L* | -R* | -l*)
18866 # Some compilers place space between "-{L,R}" and the path.
18867 # Remove the space.
18868 if test $p = "-L" ||
18869 test $p = "-R"; then
18870 prev=$p
18871 continue
18872 else
18873 prev=
18874 fi
18875
18876 if test "$pre_test_object_deps_done" = no; then
18877 case $p in
18878 -L* | -R*)
18879 # Internal compiler library paths should come after those
18880 # provided the user. The postdeps already come after the
18881 # user supplied libs so there is no need to process them.
18882 if test -z "$compiler_lib_search_path_CXX"; then
18883 compiler_lib_search_path_CXX="${prev}${p}"
18884 else
18885 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
18886 fi
18887 ;;
18888 # The "-l" case would never come before the object being
18889 # linked, so don't bother handling this case.
18890 esac
18891 else
18892 if test -z "$postdeps_CXX"; then
18893 postdeps_CXX="${prev}${p}"
18894 else
18895 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
18896 fi
18897 fi
18898 ;;
18899
18900 *.$objext)
18901 # This assumes that the test object file only shows up
18902 # once in the compiler output.
18903 if test "$p" = "conftest.$objext"; then
18904 pre_test_object_deps_done=yes
18905 continue
18906 fi
18907
18908 if test "$pre_test_object_deps_done" = no; then
18909 if test -z "$predep_objects_CXX"; then
18910 predep_objects_CXX="$p"
18911 else
18912 predep_objects_CXX="$predep_objects_CXX $p"
18913 fi
18914 else
18915 if test -z "$postdep_objects_CXX"; then
18916 postdep_objects_CXX="$p"
18917 else
18918 postdep_objects_CXX="$postdep_objects_CXX $p"
18919 fi
18920 fi
18921 ;;
18922
18923 *) ;; # Ignore the rest.
18924
18925 esac
18926 done
18927
18928 # Clean up.
18929 rm -f a.out a.exe
18930else
18931 echo "libtool.m4: error: problem compiling CXX test program"
18932fi
18933
18934$RM -f confest.$objext
18935
18936# PORTME: override above test on systems where it is broken
18937case $host_os in
18938interix[3-9]*)
18939 # Interix 3.5 installs completely hosed .la files for C++, so rather than
18940 # hack all around it, let's just trust "g++" to DTRT.
18941 predep_objects_CXX=
18942 postdep_objects_CXX=
18943 postdeps_CXX=
18944 ;;
18945
18946linux*)
18947 case `$CC -V 2>&1 | sed 5q` in
18948 *Sun\ C*)
18949 # Sun C++ 5.9
18950
18951 # The more standards-conforming stlport4 library is
18952 # incompatible with the Cstd library. Avoid specifying
18953 # it if it's in CXXFLAGS. Ignore libCrun as
18954 # -library=stlport4 depends on it.
18955 case " $CXX $CXXFLAGS " in
18956 *" -library=stlport4 "*)
18957 solaris_use_stlport4=yes
18958 ;;
18959 esac
18960
18961 if test "$solaris_use_stlport4" != yes; then
18962 postdeps_CXX='-library=Cstd -library=Crun'
18963 fi
18964 ;;
18965 esac
18966 ;;
18967
18968solaris*)
18969 case $cc_basename in
18970 CC*)
18971 # The more standards-conforming stlport4 library is
18972 # incompatible with the Cstd library. Avoid specifying
18973 # it if it's in CXXFLAGS. Ignore libCrun as
18974 # -library=stlport4 depends on it.
18975 case " $CXX $CXXFLAGS " in
18976 *" -library=stlport4 "*)
18977 solaris_use_stlport4=yes
18978 ;;
18979 esac
18980
18981 # Adding this requires a known-good setup of shared libraries for
18982 # Sun compiler versions before 5.6, else PIC objects from an old
18983 # archive will be linked into the output, leading to subtle bugs.
18984 if test "$solaris_use_stlport4" != yes; then
18985 postdeps_CXX='-library=Cstd -library=Crun'
18986 fi
18987 ;;
18988 esac
18989 ;;
18990esac
18991
18992
18993case " $postdeps_CXX " in
18994*" -lc "*) archive_cmds_need_lc_CXX=no ;;
18995esac
18996 compiler_lib_search_dirs_CXX=
18997if test -n "${compiler_lib_search_path_CXX}"; then
18998 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
18999fi
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031 lt_prog_compiler_wl_CXX=
19032lt_prog_compiler_pic_CXX=
19033lt_prog_compiler_static_CXX=
19034
5213506e
RW
19035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
19036$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
19037
19038 # C++ specific cases for pic, static, wl, etc.
19039 if test "$GXX" = yes; then
19040 lt_prog_compiler_wl_CXX='-Wl,'
19041 lt_prog_compiler_static_CXX='-static'
19042
19043 case $host_os in
19044 aix*)
19045 # All AIX code is PIC.
19046 if test "$host_cpu" = ia64; then
19047 # AIX 5 now supports IA64 processor
19048 lt_prog_compiler_static_CXX='-Bstatic'
19049 fi
19050 ;;
19051
19052 amigaos*)
19053 case $host_cpu in
19054 powerpc)
19055 # see comment about AmigaOS4 .so support
19056 lt_prog_compiler_pic_CXX='-fPIC'
19057 ;;
19058 m68k)
19059 # FIXME: we need at least 68020 code to build shared libraries, but
19060 # adding the `-m68020' flag to GCC prevents building anything better,
19061 # like `-m68040'.
19062 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
19063 ;;
19064 esac
19065 ;;
19066
19067 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19068 # PIC is the default for these OSes.
19069 ;;
19070 mingw* | cygwin* | os2* | pw32* | cegcc*)
19071 # This hack is so that the source file can tell whether it is being
19072 # built for inclusion in a dll (and should export symbols for example).
19073 # Although the cygwin gcc ignores -fPIC, still need this for old-style
19074 # (--disable-auto-import) libraries
19075 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
19076 ;;
19077 darwin* | rhapsody*)
19078 # PIC is the default on this platform
19079 # Common symbols not allowed in MH_DYLIB files
19080 lt_prog_compiler_pic_CXX='-fno-common'
19081 ;;
19082 *djgpp*)
19083 # DJGPP does not support shared libraries at all
19084 lt_prog_compiler_pic_CXX=
19085 ;;
19086 interix[3-9]*)
19087 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19088 # Instead, we relocate shared libraries at runtime.
19089 ;;
19090 sysv4*MP*)
19091 if test -d /usr/nec; then
19092 lt_prog_compiler_pic_CXX=-Kconform_pic
19093 fi
19094 ;;
19095 hpux*)
19096 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19097 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
19098 # sets the default TLS model and affects inlining.
19099 case $host_cpu in
19100 hppa*64*)
19101 ;;
19102 *)
19103 lt_prog_compiler_pic_CXX='-fPIC'
19104 ;;
19105 esac
19106 ;;
19107 *qnx* | *nto*)
19108 # QNX uses GNU C++, but need to define -shared option too, otherwise
19109 # it will coredump.
19110 lt_prog_compiler_pic_CXX='-fPIC -shared'
19111 ;;
19112 *)
19113 lt_prog_compiler_pic_CXX='-fPIC'
19114 ;;
19115 esac
19116 else
19117 case $host_os in
19118 aix[4-9]*)
19119 # All AIX code is PIC.
19120 if test "$host_cpu" = ia64; then
19121 # AIX 5 now supports IA64 processor
19122 lt_prog_compiler_static_CXX='-Bstatic'
19123 else
19124 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
19125 fi
19126 ;;
19127 chorus*)
19128 case $cc_basename in
19129 cxch68*)
19130 # Green Hills C++ Compiler
19131 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
19132 ;;
19133 esac
19134 ;;
19135 dgux*)
19136 case $cc_basename in
19137 ec++*)
19138 lt_prog_compiler_pic_CXX='-KPIC'
19139 ;;
19140 ghcx*)
19141 # Green Hills C++ Compiler
19142 lt_prog_compiler_pic_CXX='-pic'
19143 ;;
19144 *)
19145 ;;
19146 esac
19147 ;;
19148 freebsd* | dragonfly*)
19149 # FreeBSD uses GNU C++
19150 ;;
19151 hpux9* | hpux10* | hpux11*)
19152 case $cc_basename in
19153 CC*)
19154 lt_prog_compiler_wl_CXX='-Wl,'
19155 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19156 if test "$host_cpu" != ia64; then
19157 lt_prog_compiler_pic_CXX='+Z'
19158 fi
19159 ;;
19160 aCC*)
19161 lt_prog_compiler_wl_CXX='-Wl,'
19162 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19163 case $host_cpu in
19164 hppa*64*|ia64*)
19165 # +Z the default
19166 ;;
19167 *)
19168 lt_prog_compiler_pic_CXX='+Z'
19169 ;;
19170 esac
19171 ;;
19172 *)
19173 ;;
19174 esac
19175 ;;
19176 interix*)
19177 # This is c89, which is MS Visual C++ (no shared libs)
19178 # Anyone wants to do a port?
19179 ;;
19180 irix5* | irix6* | nonstopux*)
19181 case $cc_basename in
19182 CC*)
19183 lt_prog_compiler_wl_CXX='-Wl,'
19184 lt_prog_compiler_static_CXX='-non_shared'
19185 # CC pic flag -KPIC is the default.
19186 ;;
19187 *)
19188 ;;
19189 esac
19190 ;;
19191 linux* | k*bsd*-gnu | kopensolaris*-gnu)
19192 case $cc_basename in
19193 KCC*)
19194 # KAI C++ Compiler
19195 lt_prog_compiler_wl_CXX='--backend -Wl,'
19196 lt_prog_compiler_pic_CXX='-fPIC'
19197 ;;
19198 ecpc* )
19199 # old Intel C++ for x86_64 which still supported -KPIC.
19200 lt_prog_compiler_wl_CXX='-Wl,'
19201 lt_prog_compiler_pic_CXX='-KPIC'
19202 lt_prog_compiler_static_CXX='-static'
19203 ;;
19204 icpc* )
19205 # Intel C++, used to be incompatible with GCC.
19206 # ICC 10 doesn't accept -KPIC any more.
19207 lt_prog_compiler_wl_CXX='-Wl,'
19208 lt_prog_compiler_pic_CXX='-fPIC'
19209 lt_prog_compiler_static_CXX='-static'
19210 ;;
19211 pgCC* | pgcpp*)
19212 # Portland Group C++ compiler
19213 lt_prog_compiler_wl_CXX='-Wl,'
19214 lt_prog_compiler_pic_CXX='-fpic'
19215 lt_prog_compiler_static_CXX='-Bstatic'
19216 ;;
19217 cxx*)
19218 # Compaq C++
19219 # Make sure the PIC flag is empty. It appears that all Alpha
19220 # Linux and Compaq Tru64 Unix objects are PIC.
19221 lt_prog_compiler_pic_CXX=
19222 lt_prog_compiler_static_CXX='-non_shared'
19223 ;;
19224 xlc* | xlC*)
19225 # IBM XL 8.0 on PPC
19226 lt_prog_compiler_wl_CXX='-Wl,'
19227 lt_prog_compiler_pic_CXX='-qpic'
19228 lt_prog_compiler_static_CXX='-qstaticlink'
19229 ;;
19230 *)
19231 case `$CC -V 2>&1 | sed 5q` in
19232 *Sun\ C*)
19233 # Sun C++ 5.9
19234 lt_prog_compiler_pic_CXX='-KPIC'
19235 lt_prog_compiler_static_CXX='-Bstatic'
19236 lt_prog_compiler_wl_CXX='-Qoption ld '
19237 ;;
19238 esac
19239 ;;
19240 esac
19241 ;;
19242 lynxos*)
19243 ;;
19244 m88k*)
19245 ;;
19246 mvs*)
19247 case $cc_basename in
19248 cxx*)
19249 lt_prog_compiler_pic_CXX='-W c,exportall'
19250 ;;
19251 *)
19252 ;;
19253 esac
19254 ;;
19255 netbsd*)
19256 ;;
19257 *qnx* | *nto*)
19258 # QNX uses GNU C++, but need to define -shared option too, otherwise
19259 # it will coredump.
19260 lt_prog_compiler_pic_CXX='-fPIC -shared'
19261 ;;
19262 osf3* | osf4* | osf5*)
19263 case $cc_basename in
19264 KCC*)
19265 lt_prog_compiler_wl_CXX='--backend -Wl,'
19266 ;;
19267 RCC*)
19268 # Rational C++ 2.4.1
19269 lt_prog_compiler_pic_CXX='-pic'
19270 ;;
19271 cxx*)
19272 # Digital/Compaq C++
19273 lt_prog_compiler_wl_CXX='-Wl,'
19274 # Make sure the PIC flag is empty. It appears that all Alpha
19275 # Linux and Compaq Tru64 Unix objects are PIC.
19276 lt_prog_compiler_pic_CXX=
19277 lt_prog_compiler_static_CXX='-non_shared'
19278 ;;
19279 *)
19280 ;;
19281 esac
19282 ;;
19283 psos*)
19284 ;;
19285 solaris*)
19286 case $cc_basename in
19287 CC*)
19288 # Sun C++ 4.2, 5.x and Centerline C++
19289 lt_prog_compiler_pic_CXX='-KPIC'
19290 lt_prog_compiler_static_CXX='-Bstatic'
19291 lt_prog_compiler_wl_CXX='-Qoption ld '
19292 ;;
19293 gcx*)
19294 # Green Hills C++ Compiler
19295 lt_prog_compiler_pic_CXX='-PIC'
19296 ;;
19297 *)
19298 ;;
19299 esac
19300 ;;
19301 sunos4*)
19302 case $cc_basename in
19303 CC*)
19304 # Sun C++ 4.x
19305 lt_prog_compiler_pic_CXX='-pic'
19306 lt_prog_compiler_static_CXX='-Bstatic'
19307 ;;
19308 lcc*)
19309 # Lucid
19310 lt_prog_compiler_pic_CXX='-pic'
19311 ;;
19312 *)
19313 ;;
19314 esac
19315 ;;
19316 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
19317 case $cc_basename in
19318 CC*)
19319 lt_prog_compiler_wl_CXX='-Wl,'
19320 lt_prog_compiler_pic_CXX='-KPIC'
19321 lt_prog_compiler_static_CXX='-Bstatic'
19322 ;;
19323 esac
19324 ;;
19325 tandem*)
19326 case $cc_basename in
19327 NCC*)
19328 # NonStop-UX NCC 3.20
19329 lt_prog_compiler_pic_CXX='-KPIC'
19330 ;;
19331 *)
19332 ;;
19333 esac
19334 ;;
19335 vxworks*)
19336 ;;
19337 *)
19338 lt_prog_compiler_can_build_shared_CXX=no
19339 ;;
19340 esac
19341 fi
19342
19343case $host_os in
19344 # For platforms which do not support PIC, -DPIC is meaningless:
19345 *djgpp*)
19346 lt_prog_compiler_pic_CXX=
19347 ;;
19348 *)
19349 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
19350 ;;
19351esac
5213506e
RW
19352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
19353$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
00020c16
ILT
19354
19355
19356
19357#
19358# Check to make sure the PIC flag actually works.
19359#
19360if test -n "$lt_prog_compiler_pic_CXX"; then
5213506e
RW
19361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
19362$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
19363if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
19364 $as_echo_n "(cached) " >&6
00020c16
ILT
19365else
19366 lt_cv_prog_compiler_pic_works_CXX=no
19367 ac_outfile=conftest.$ac_objext
19368 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19369 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
19370 # Insert the option either (1) after the last *FLAGS variable, or
19371 # (2) before a word containing "conftest.", or (3) at the end.
19372 # Note that $ac_compile itself does not contain backslashes and begins
19373 # with a dollar sign (not a hyphen), so the echo should work correctly.
19374 # The option is referenced via a variable to avoid confusing sed.
19375 lt_compile=`echo "$ac_compile" | $SED \
19376 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19377 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19378 -e 's:$: $lt_compiler_flag:'`
d7f09764 19379 (eval echo "\"\$as_me:19379: $lt_compile\"" >&5)
00020c16
ILT
19380 (eval "$lt_compile" 2>conftest.err)
19381 ac_status=$?
19382 cat conftest.err >&5
d7f09764 19383 echo "$as_me:19383: \$? = $ac_status" >&5
00020c16
ILT
19384 if (exit $ac_status) && test -s "$ac_outfile"; then
19385 # The compiler can only warn and ignore the option if not recognized
19386 # So say no if there are warnings other than the usual output.
19387 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
19388 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19389 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19390 lt_cv_prog_compiler_pic_works_CXX=yes
19391 fi
19392 fi
19393 $RM conftest*
19394
19395fi
5213506e
RW
19396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
19397$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
00020c16
ILT
19398
19399if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
19400 case $lt_prog_compiler_pic_CXX in
19401 "" | " "*) ;;
19402 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
19403 esac
19404else
19405 lt_prog_compiler_pic_CXX=
19406 lt_prog_compiler_can_build_shared_CXX=no
19407fi
19408
19409fi
19410
19411
19412
19413#
19414# Check to make sure the static flag actually works.
19415#
19416wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
5213506e
RW
19417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19418$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19419if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
19420 $as_echo_n "(cached) " >&6
00020c16
ILT
19421else
19422 lt_cv_prog_compiler_static_works_CXX=no
19423 save_LDFLAGS="$LDFLAGS"
19424 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19425 echo "$lt_simple_link_test_code" > conftest.$ac_ext
19426 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19427 # The linker can only warn and ignore the option if not recognized
19428 # So say no if there are warnings
19429 if test -s conftest.err; then
19430 # Append any errors to the config.log.
19431 cat conftest.err 1>&5
19432 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
19433 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19434 if diff conftest.exp conftest.er2 >/dev/null; then
19435 lt_cv_prog_compiler_static_works_CXX=yes
19436 fi
19437 else
19438 lt_cv_prog_compiler_static_works_CXX=yes
19439 fi
19440 fi
19441 $RM -r conftest*
19442 LDFLAGS="$save_LDFLAGS"
19443
19444fi
5213506e
RW
19445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
19446$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
00020c16
ILT
19447
19448if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
19449 :
19450else
19451 lt_prog_compiler_static_CXX=
19452fi
19453
19454
19455
19456
5213506e
RW
19457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19458$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19459if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19460 $as_echo_n "(cached) " >&6
00020c16
ILT
19461else
19462 lt_cv_prog_compiler_c_o_CXX=no
19463 $RM -r conftest 2>/dev/null
19464 mkdir conftest
19465 cd conftest
19466 mkdir out
19467 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19468
19469 lt_compiler_flag="-o out/conftest2.$ac_objext"
19470 # Insert the option either (1) after the last *FLAGS variable, or
19471 # (2) before a word containing "conftest.", or (3) at the end.
19472 # Note that $ac_compile itself does not contain backslashes and begins
19473 # with a dollar sign (not a hyphen), so the echo should work correctly.
19474 lt_compile=`echo "$ac_compile" | $SED \
19475 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19476 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19477 -e 's:$: $lt_compiler_flag:'`
d7f09764 19478 (eval echo "\"\$as_me:19478: $lt_compile\"" >&5)
00020c16
ILT
19479 (eval "$lt_compile" 2>out/conftest.err)
19480 ac_status=$?
19481 cat out/conftest.err >&5
d7f09764 19482 echo "$as_me:19482: \$? = $ac_status" >&5
00020c16
ILT
19483 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19484 then
19485 # The compiler can only warn and ignore the option if not recognized
19486 # So say no if there are warnings
19487 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
19488 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19489 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19490 lt_cv_prog_compiler_c_o_CXX=yes
19491 fi
19492 fi
19493 chmod u+w . 2>&5
19494 $RM conftest*
19495 # SGI C++ compiler will create directory out/ii_files/ for
19496 # template instantiation
19497 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19498 $RM out/* && rmdir out
19499 cd ..
19500 $RM -r conftest
19501 $RM conftest*
19502
19503fi
5213506e
RW
19504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19505$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19506
19507
19508
5213506e
RW
19509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19510$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19511if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19512 $as_echo_n "(cached) " >&6
00020c16
ILT
19513else
19514 lt_cv_prog_compiler_c_o_CXX=no
19515 $RM -r conftest 2>/dev/null
19516 mkdir conftest
19517 cd conftest
19518 mkdir out
19519 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19520
19521 lt_compiler_flag="-o out/conftest2.$ac_objext"
19522 # Insert the option either (1) after the last *FLAGS variable, or
19523 # (2) before a word containing "conftest.", or (3) at the end.
19524 # Note that $ac_compile itself does not contain backslashes and begins
19525 # with a dollar sign (not a hyphen), so the echo should work correctly.
19526 lt_compile=`echo "$ac_compile" | $SED \
19527 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19528 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19529 -e 's:$: $lt_compiler_flag:'`
d7f09764 19530 (eval echo "\"\$as_me:19530: $lt_compile\"" >&5)
00020c16
ILT
19531 (eval "$lt_compile" 2>out/conftest.err)
19532 ac_status=$?
19533 cat out/conftest.err >&5
d7f09764 19534 echo "$as_me:19534: \$? = $ac_status" >&5
00020c16
ILT
19535 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19536 then
19537 # The compiler can only warn and ignore the option if not recognized
19538 # So say no if there are warnings
19539 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
19540 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19541 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19542 lt_cv_prog_compiler_c_o_CXX=yes
19543 fi
19544 fi
19545 chmod u+w . 2>&5
19546 $RM conftest*
19547 # SGI C++ compiler will create directory out/ii_files/ for
19548 # template instantiation
19549 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19550 $RM out/* && rmdir out
19551 cd ..
19552 $RM -r conftest
19553 $RM conftest*
19554
19555fi
5213506e
RW
19556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19557$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19558
19559
19560
19561
19562hard_links="nottested"
19563if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
19564 # do not overwrite the value of need_locks provided by the user
5213506e
RW
19565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19566$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16
ILT
19567 hard_links=yes
19568 $RM conftest*
19569 ln conftest.a conftest.b 2>/dev/null && hard_links=no
19570 touch conftest.a
19571 ln conftest.a conftest.b 2>&5 || hard_links=no
19572 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
19573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19574$as_echo "$hard_links" >&6; }
00020c16 19575 if test "$hard_links" = no; then
5213506e
RW
19576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
19577$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16
ILT
19578 need_locks=warn
19579 fi
19580else
19581 need_locks=no
19582fi
19583
19584
19585
5213506e
RW
19586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19587$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
19588
19589 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19590 case $host_os in
19591 aix[4-9]*)
19592 # If we're using GNU nm, then we don't want the "-C" option.
19593 # -C means demangle to AIX nm, but means don't demangle with GNU nm
19594 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
19595 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
19596 else
19597 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
19598 fi
19599 ;;
19600 pw32*)
19601 export_symbols_cmds_CXX="$ltdll_cmds"
19602 ;;
19603 cygwin* | mingw* | cegcc*)
19604 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
19605 ;;
19606 *)
19607 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19608 ;;
19609 esac
19610 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19611
5213506e
RW
19612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
19613$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
19614test "$ld_shlibs_CXX" = no && can_build_shared=no
19615
19616with_gnu_ld_CXX=$with_gnu_ld
19617
19618
19619
19620
19621
19622
19623#
19624# Do we need to explicitly link libc?
19625#
19626case "x$archive_cmds_need_lc_CXX" in
19627x|xyes)
19628 # Assume -lc should be added
19629 archive_cmds_need_lc_CXX=yes
19630
19631 if test "$enable_shared" = yes && test "$GCC" = yes; then
19632 case $archive_cmds_CXX in
19633 *'~'*)
19634 # FIXME: we may have to deal with multi-command sequences.
19635 ;;
19636 '$CC '*)
19637 # Test whether the compiler implicitly links with -lc since on some
19638 # systems, -lgcc has to come before -lc. If gcc already passes -lc
19639 # to ld, don't add -lc before -lgcc.
5213506e
RW
19640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
19641$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
19642if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then :
19643 $as_echo_n "(cached) " >&6
00020c16
ILT
19644else
19645 $RM conftest*
19646 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19647
5213506e 19648 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
19649 (eval $ac_compile) 2>&5
19650 ac_status=$?
5213506e
RW
19651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19652 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
19653 soname=conftest
19654 lib=conftest
19655 libobjs=conftest.$ac_objext
19656 deplibs=
19657 wl=$lt_prog_compiler_wl_CXX
19658 pic_flag=$lt_prog_compiler_pic_CXX
19659 compiler_flags=-v
19660 linker_flags=-v
19661 verstring=
19662 output_objdir=.
19663 libname=conftest
19664 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
19665 allow_undefined_flag_CXX=
5213506e 19666 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
19667 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
19668 ac_status=$?
5213506e
RW
19669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19670 test $ac_status = 0; }
00020c16
ILT
19671 then
19672 lt_cv_archive_cmds_need_lc_CXX=no
19673 else
19674 lt_cv_archive_cmds_need_lc_CXX=yes
19675 fi
19676 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
19677 else
19678 cat conftest.err 1>&5
19679 fi
19680 $RM conftest*
19681
19682fi
5213506e
RW
19683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
19684$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
00020c16
ILT
19685 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
19686 ;;
19687 esac
19688 fi
19689 ;;
19690esac
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
5213506e
RW
19755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
19756$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
19757
19758library_names_spec=
19759libname_spec='lib$name'
19760soname_spec=
19761shrext_cmds=".so"
19762postinstall_cmds=
19763postuninstall_cmds=
19764finish_cmds=
19765finish_eval=
19766shlibpath_var=
19767shlibpath_overrides_runpath=unknown
19768version_type=none
19769dynamic_linker="$host_os ld.so"
19770sys_lib_dlsearch_path_spec="/lib /usr/lib"
19771need_lib_prefix=unknown
19772hardcode_into_libs=no
19773
19774# when you set need_version to no, make sure it does not cause -set_version
19775# flags to be left without arguments
19776need_version=unknown
19777
19778case $host_os in
19779aix3*)
19780 version_type=linux
19781 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
19782 shlibpath_var=LIBPATH
19783
19784 # AIX 3 has no versioning support, so we append a major version to the name.
19785 soname_spec='${libname}${release}${shared_ext}$major'
19786 ;;
19787
19788aix[4-9]*)
19789 version_type=linux
19790 need_lib_prefix=no
19791 need_version=no
19792 hardcode_into_libs=yes
19793 if test "$host_cpu" = ia64; then
19794 # AIX 5 supports IA64
19795 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
19796 shlibpath_var=LD_LIBRARY_PATH
19797 else
19798 # With GCC up to 2.95.x, collect2 would create an import file
19799 # for dependence libraries. The import file would start with
19800 # the line `#! .'. This would cause the generated library to
19801 # depend on `.', always an invalid library. This was fixed in
19802 # development snapshots of GCC prior to 3.0.
19803 case $host_os in
19804 aix4 | aix4.[01] | aix4.[01].*)
19805 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19806 echo ' yes '
19807 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
19808 :
19809 else
19810 can_build_shared=no
19811 fi
19812 ;;
19813 esac
19814 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
19815 # soname into executable. Probably we can add versioning support to
19816 # collect2, so additional links can be useful in future.
19817 if test "$aix_use_runtimelinking" = yes; then
19818 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19819 # instead of lib<name>.a to let people know that these are not
19820 # typical AIX shared libraries.
19821 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19822 else
19823 # We preserve .a as extension for shared libraries through AIX4.2
19824 # and later when we are not doing run time linking.
19825 library_names_spec='${libname}${release}.a $libname.a'
19826 soname_spec='${libname}${release}${shared_ext}$major'
19827 fi
19828 shlibpath_var=LIBPATH
19829 fi
19830 ;;
19831
19832amigaos*)
19833 case $host_cpu in
19834 powerpc)
19835 # Since July 2007 AmigaOS4 officially supports .so libraries.
19836 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
19837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19838 ;;
19839 m68k)
19840 library_names_spec='$libname.ixlibrary $libname.a'
19841 # Create ${libname}_ixlibrary.a entries in /sys/libs.
19842 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
19843 ;;
19844 esac
19845 ;;
19846
19847beos*)
19848 library_names_spec='${libname}${shared_ext}'
19849 dynamic_linker="$host_os ld.so"
19850 shlibpath_var=LIBRARY_PATH
19851 ;;
19852
19853bsdi[45]*)
19854 version_type=linux
19855 need_version=no
19856 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19857 soname_spec='${libname}${release}${shared_ext}$major'
19858 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19859 shlibpath_var=LD_LIBRARY_PATH
19860 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19861 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19862 # the default ld.so.conf also contains /usr/contrib/lib and
19863 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19864 # libtool to hard-code these into programs
19865 ;;
19866
19867cygwin* | mingw* | pw32* | cegcc*)
19868 version_type=windows
19869 shrext_cmds=".dll"
19870 need_version=no
19871 need_lib_prefix=no
19872
19873 case $GCC,$host_os in
19874 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
19875 library_names_spec='$libname.dll.a'
19876 # DLL is installed to $(libdir)/../bin by postinstall_cmds
19877 postinstall_cmds='base_file=`basename \${file}`~
19878 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
19879 dldir=$destdir/`dirname \$dlpath`~
19880 test -d \$dldir || mkdir -p \$dldir~
19881 $install_prog $dir/$dlname \$dldir/$dlname~
19882 chmod a+x \$dldir/$dlname~
19883 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
19884 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
19885 fi'
19886 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19887 dlpath=$dir/\$dldll~
19888 $RM \$dlpath'
19889 shlibpath_overrides_runpath=yes
19890
19891 case $host_os in
19892 cygwin*)
19893 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
19894 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
19895 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
19896 ;;
19897 mingw* | cegcc*)
19898 # MinGW DLLs use traditional 'lib' prefix
19899 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
19900 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
19901 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
19902 # It is most probably a Windows format PATH printed by
19903 # mingw gcc, but we are running on Cygwin. Gcc prints its search
19904 # path with ; separators, and with drive letters. We can handle the
19905 # drive letters (cygwin fileutils understands them), so leave them,
19906 # especially as we might pass files found there to a mingw objdump,
19907 # which wouldn't understand a cygwinified path. Ahh.
19908 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
19909 else
19910 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
19911 fi
19912 ;;
19913 pw32*)
19914 # pw32 DLLs use 'pw' prefix rather than 'lib'
19915 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
19916 ;;
19917 esac
19918 ;;
19919
19920 *)
19921 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
19922 ;;
19923 esac
19924 dynamic_linker='Win32 ld.exe'
19925 # FIXME: first we should search . and the directory the executable is in
19926 shlibpath_var=PATH
19927 ;;
19928
19929darwin* | rhapsody*)
19930 dynamic_linker="$host_os dyld"
19931 version_type=darwin
19932 need_lib_prefix=no
19933 need_version=no
19934 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
19935 soname_spec='${libname}${release}${major}$shared_ext'
19936 shlibpath_overrides_runpath=yes
19937 shlibpath_var=DYLD_LIBRARY_PATH
19938 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
19939
19940 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
19941 ;;
19942
19943dgux*)
19944 version_type=linux
19945 need_lib_prefix=no
19946 need_version=no
19947 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
19948 soname_spec='${libname}${release}${shared_ext}$major'
19949 shlibpath_var=LD_LIBRARY_PATH
19950 ;;
19951
19952freebsd1*)
19953 dynamic_linker=no
19954 ;;
19955
19956freebsd* | dragonfly*)
19957 # DragonFly does not have aout. When/if they implement a new
19958 # versioning mechanism, adjust this.
19959 if test -x /usr/bin/objformat; then
19960 objformat=`/usr/bin/objformat`
19961 else
19962 case $host_os in
19963 freebsd[123]*) objformat=aout ;;
19964 *) objformat=elf ;;
19965 esac
19966 fi
19967 version_type=freebsd-$objformat
19968 case $version_type in
19969 freebsd-elf*)
19970 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
19971 need_version=no
19972 need_lib_prefix=no
19973 ;;
19974 freebsd-*)
19975 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
19976 need_version=yes
19977 ;;
19978 esac
19979 shlibpath_var=LD_LIBRARY_PATH
19980 case $host_os in
19981 freebsd2*)
19982 shlibpath_overrides_runpath=yes
19983 ;;
19984 freebsd3.[01]* | freebsdelf3.[01]*)
19985 shlibpath_overrides_runpath=yes
19986 hardcode_into_libs=yes
19987 ;;
19988 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
19989 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
19990 shlibpath_overrides_runpath=no
19991 hardcode_into_libs=yes
19992 ;;
19993 *) # from 4.6 on, and DragonFly
19994 shlibpath_overrides_runpath=yes
19995 hardcode_into_libs=yes
19996 ;;
19997 esac
19998 ;;
19999
20000gnu*)
20001 version_type=linux
20002 need_lib_prefix=no
20003 need_version=no
20004 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
20005 soname_spec='${libname}${release}${shared_ext}$major'
20006 shlibpath_var=LD_LIBRARY_PATH
20007 hardcode_into_libs=yes
20008 ;;
20009
20010hpux9* | hpux10* | hpux11*)
20011 # Give a soname corresponding to the major version so that dld.sl refuses to
20012 # link against other versions.
20013 version_type=sunos
20014 need_lib_prefix=no
20015 need_version=no
20016 case $host_cpu in
20017 ia64*)
20018 shrext_cmds='.so'
20019 hardcode_into_libs=yes
20020 dynamic_linker="$host_os dld.so"
20021 shlibpath_var=LD_LIBRARY_PATH
20022 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20023 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20024 soname_spec='${libname}${release}${shared_ext}$major'
20025 if test "X$HPUX_IA64_MODE" = X32; then
20026 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
20027 else
20028 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
20029 fi
20030 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20031 ;;
20032 hppa*64*)
20033 shrext_cmds='.sl'
20034 hardcode_into_libs=yes
20035 dynamic_linker="$host_os dld.sl"
20036 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
20037 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20038 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20039 soname_spec='${libname}${release}${shared_ext}$major'
20040 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
20041 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20042 ;;
20043 *)
20044 shrext_cmds='.sl'
20045 dynamic_linker="$host_os dld.sl"
20046 shlibpath_var=SHLIB_PATH
20047 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
20048 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20049 soname_spec='${libname}${release}${shared_ext}$major'
20050 ;;
20051 esac
20052 # HP-UX runs *really* slowly unless shared libraries are mode 555.
20053 postinstall_cmds='chmod 555 $lib'
20054 ;;
20055
20056interix[3-9]*)
20057 version_type=linux
20058 need_lib_prefix=no
20059 need_version=no
20060 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20061 soname_spec='${libname}${release}${shared_ext}$major'
20062 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
20063 shlibpath_var=LD_LIBRARY_PATH
20064 shlibpath_overrides_runpath=no
20065 hardcode_into_libs=yes
20066 ;;
20067
20068irix5* | irix6* | nonstopux*)
20069 case $host_os in
20070 nonstopux*) version_type=nonstopux ;;
20071 *)
20072 if test "$lt_cv_prog_gnu_ld" = yes; then
20073 version_type=linux
20074 else
20075 version_type=irix
20076 fi ;;
20077 esac
20078 need_lib_prefix=no
20079 need_version=no
20080 soname_spec='${libname}${release}${shared_ext}$major'
20081 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
20082 case $host_os in
20083 irix5* | nonstopux*)
20084 libsuff= shlibsuff=
20085 ;;
20086 *)
20087 case $LD in # libtool.m4 will add one of these switches to LD
20088 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
20089 libsuff= shlibsuff= libmagic=32-bit;;
20090 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
20091 libsuff=32 shlibsuff=N32 libmagic=N32;;
20092 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
20093 libsuff=64 shlibsuff=64 libmagic=64-bit;;
20094 *) libsuff= shlibsuff= libmagic=never-match;;
20095 esac
20096 ;;
20097 esac
20098 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
20099 shlibpath_overrides_runpath=no
20100 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
20101 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
20102 hardcode_into_libs=yes
20103 ;;
20104
20105# No shared lib support for Linux oldld, aout, or coff.
20106linux*oldld* | linux*aout* | linux*coff*)
20107 dynamic_linker=no
20108 ;;
20109
20110# This must be Linux ELF.
20111linux* | k*bsd*-gnu | kopensolaris*-gnu)
20112 version_type=linux
20113 need_lib_prefix=no
20114 need_version=no
20115 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20116 soname_spec='${libname}${release}${shared_ext}$major'
20117 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
20118 shlibpath_var=LD_LIBRARY_PATH
20119 shlibpath_overrides_runpath=no
20120
20121 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
20122 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
20123 $as_echo_n "(cached) " >&6
00020c16
ILT
20124else
20125 lt_cv_shlibpath_overrides_runpath=no
20126 save_LDFLAGS=$LDFLAGS
20127 save_libdir=$libdir
20128 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
20129 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
5213506e 20130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
20131/* end confdefs.h. */
20132
20133int
20134main ()
20135{
20136
da0f6381
PB
20137 ;
20138 return 0;
20139}
20140_ACEOF
5213506e
RW
20141if ac_fn_cxx_try_link "$LINENO"; then :
20142 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
00020c16
ILT
20143 lt_cv_shlibpath_overrides_runpath=yes
20144fi
da0f6381 20145fi
5213506e
RW
20146rm -f core conftest.err conftest.$ac_objext \
20147 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
20148 LDFLAGS=$save_LDFLAGS
20149 libdir=$save_libdir
da0f6381
PB
20150
20151fi
20152
00020c16 20153 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381 20154
00020c16
ILT
20155 # This implies no fast_install, which is unacceptable.
20156 # Some rework will be needed to allow for fast_install
20157 # before this can be enabled.
20158 hardcode_into_libs=yes
da0f6381 20159
00020c16
ILT
20160 # Append ld.so.conf contents to the search path
20161 if test -f /etc/ld.so.conf; then
20162 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
20163 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
20164 fi
da0f6381 20165
00020c16
ILT
20166 # We used to test for /lib/ld.so.1 and disable shared libraries on
20167 # powerpc, because MkLinux only supported shared libraries with the
20168 # GNU dynamic linker. Since this was broken with cross compilers,
20169 # most powerpc-linux boxes support dynamic linking these days and
20170 # people can always --disable-shared, the test was removed, and we
20171 # assume the GNU/Linux dynamic linker is in use.
20172 dynamic_linker='GNU/Linux ld.so'
20173 ;;
da0f6381 20174
00020c16
ILT
20175netbsd*)
20176 version_type=sunos
20177 need_lib_prefix=no
20178 need_version=no
20179 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20180 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20181 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20182 dynamic_linker='NetBSD (a.out) ld.so'
20183 else
20184 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20185 soname_spec='${libname}${release}${shared_ext}$major'
20186 dynamic_linker='NetBSD ld.elf_so'
20187 fi
20188 shlibpath_var=LD_LIBRARY_PATH
20189 shlibpath_overrides_runpath=yes
20190 hardcode_into_libs=yes
20191 ;;
da0f6381 20192
00020c16
ILT
20193newsos6)
20194 version_type=linux
20195 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20196 shlibpath_var=LD_LIBRARY_PATH
20197 shlibpath_overrides_runpath=yes
20198 ;;
da0f6381 20199
00020c16
ILT
20200*nto* | *qnx*)
20201 version_type=qnx
20202 need_lib_prefix=no
20203 need_version=no
20204 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20205 soname_spec='${libname}${release}${shared_ext}$major'
20206 shlibpath_var=LD_LIBRARY_PATH
20207 shlibpath_overrides_runpath=no
20208 hardcode_into_libs=yes
20209 dynamic_linker='ldqnx.so'
20210 ;;
da0f6381 20211
00020c16
ILT
20212openbsd*)
20213 version_type=sunos
20214 sys_lib_dlsearch_path_spec="/usr/lib"
20215 need_lib_prefix=no
20216 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
20217 case $host_os in
20218 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
20219 *) need_version=no ;;
da0f6381 20220 esac
00020c16
ILT
20221 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20222 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20223 shlibpath_var=LD_LIBRARY_PATH
20224 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
20225 case $host_os in
20226 openbsd2.[89] | openbsd2.[89].*)
20227 shlibpath_overrides_runpath=no
20228 ;;
20229 *)
20230 shlibpath_overrides_runpath=yes
20231 ;;
20232 esac
da0f6381 20233 else
00020c16 20234 shlibpath_overrides_runpath=yes
da0f6381 20235 fi
00020c16 20236 ;;
da0f6381 20237
00020c16
ILT
20238os2*)
20239 libname_spec='$name'
20240 shrext_cmds=".dll"
20241 need_lib_prefix=no
20242 library_names_spec='$libname${shared_ext} $libname.a'
20243 dynamic_linker='OS/2 ld.exe'
20244 shlibpath_var=LIBPATH
20245 ;;
da0f6381 20246
00020c16
ILT
20247osf3* | osf4* | osf5*)
20248 version_type=osf
20249 need_lib_prefix=no
20250 need_version=no
20251 soname_spec='${libname}${release}${shared_ext}$major'
20252 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20253 shlibpath_var=LD_LIBRARY_PATH
20254 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
20255 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
20256 ;;
da0f6381 20257
00020c16
ILT
20258rdos*)
20259 dynamic_linker=no
20260 ;;
da0f6381 20261
00020c16
ILT
20262solaris*)
20263 version_type=linux
20264 need_lib_prefix=no
20265 need_version=no
20266 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20267 soname_spec='${libname}${release}${shared_ext}$major'
20268 shlibpath_var=LD_LIBRARY_PATH
20269 shlibpath_overrides_runpath=yes
20270 hardcode_into_libs=yes
20271 # ldd complains unless libraries are executable
20272 postinstall_cmds='chmod +x $lib'
20273 ;;
da0f6381 20274
00020c16
ILT
20275sunos4*)
20276 version_type=sunos
20277 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20278 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
20279 shlibpath_var=LD_LIBRARY_PATH
20280 shlibpath_overrides_runpath=yes
20281 if test "$with_gnu_ld" = yes; then
20282 need_lib_prefix=no
20283 fi
20284 need_version=yes
20285 ;;
da0f6381 20286
00020c16
ILT
20287sysv4 | sysv4.3*)
20288 version_type=linux
20289 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20290 soname_spec='${libname}${release}${shared_ext}$major'
20291 shlibpath_var=LD_LIBRARY_PATH
20292 case $host_vendor in
20293 sni)
20294 shlibpath_overrides_runpath=no
20295 need_lib_prefix=no
20296 runpath_var=LD_RUN_PATH
20297 ;;
20298 siemens)
20299 need_lib_prefix=no
20300 ;;
20301 motorola)
20302 need_lib_prefix=no
20303 need_version=no
20304 shlibpath_overrides_runpath=no
20305 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
20306 ;;
20307 esac
20308 ;;
da0f6381 20309
00020c16
ILT
20310sysv4*MP*)
20311 if test -d /usr/nec ;then
20312 version_type=linux
20313 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
20314 soname_spec='$libname${shared_ext}.$major'
20315 shlibpath_var=LD_LIBRARY_PATH
20316 fi
20317 ;;
da0f6381 20318
00020c16
ILT
20319sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
20320 version_type=freebsd-elf
20321 need_lib_prefix=no
20322 need_version=no
20323 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
20324 soname_spec='${libname}${release}${shared_ext}$major'
20325 shlibpath_var=LD_LIBRARY_PATH
20326 shlibpath_overrides_runpath=yes
20327 hardcode_into_libs=yes
20328 if test "$with_gnu_ld" = yes; then
20329 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
da0f6381 20330 else
00020c16
ILT
20331 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
20332 case $host_os in
20333 sco3.2v5*)
20334 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
20335 ;;
da0f6381 20336 esac
da0f6381 20337 fi
00020c16
ILT
20338 sys_lib_dlsearch_path_spec='/usr/lib'
20339 ;;
da0f6381 20340
00020c16
ILT
20341tpf*)
20342 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
20343 version_type=linux
20344 need_lib_prefix=no
20345 need_version=no
20346 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20347 shlibpath_var=LD_LIBRARY_PATH
20348 shlibpath_overrides_runpath=no
20349 hardcode_into_libs=yes
20350 ;;
da0f6381 20351
00020c16
ILT
20352uts4*)
20353 version_type=linux
20354 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20355 soname_spec='${libname}${release}${shared_ext}$major'
20356 shlibpath_var=LD_LIBRARY_PATH
20357 ;;
da0f6381 20358
00020c16
ILT
20359*)
20360 dynamic_linker=no
20361 ;;
20362esac
5213506e
RW
20363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
20364$as_echo "$dynamic_linker" >&6; }
00020c16 20365test "$dynamic_linker" = no && can_build_shared=no
da0f6381 20366
00020c16
ILT
20367variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
20368if test "$GCC" = yes; then
20369 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
20370fi
da0f6381 20371
00020c16
ILT
20372if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
20373 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
20374fi
20375if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
20376 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
20377fi
da0f6381 20378
da0f6381 20379
da0f6381 20380
da0f6381 20381
da0f6381 20382
da0f6381
PB
20383
20384
da0f6381 20385
da0f6381 20386
da0f6381 20387
da0f6381
PB
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
da0f6381
PB
20405
20406
20407
20408
20409
20410
20411
20412
20413
5213506e
RW
20414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
20415$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
00020c16
ILT
20416hardcode_action_CXX=
20417if test -n "$hardcode_libdir_flag_spec_CXX" ||
20418 test -n "$runpath_var_CXX" ||
20419 test "X$hardcode_automatic_CXX" = "Xyes" ; then
da0f6381 20420
00020c16
ILT
20421 # We can hardcode non-existent directories.
20422 if test "$hardcode_direct_CXX" != no &&
20423 # If the only mechanism to avoid hardcoding is shlibpath_var, we
20424 # have to relink, otherwise we might link with an installed library
20425 # when we should be linking with a yet-to-be-installed one
20426 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
20427 test "$hardcode_minus_L_CXX" != no; then
20428 # Linking always hardcodes the temporary library directory.
20429 hardcode_action_CXX=relink
20430 else
20431 # We can link without hardcoding, and we can hardcode nonexisting dirs.
20432 hardcode_action_CXX=immediate
20433 fi
20434else
20435 # We cannot hardcode anything, or else we can only hardcode existing
20436 # directories.
20437 hardcode_action_CXX=unsupported
20438fi
5213506e
RW
20439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
20440$as_echo "$hardcode_action_CXX" >&6; }
da0f6381 20441
00020c16
ILT
20442if test "$hardcode_action_CXX" = relink ||
20443 test "$inherit_rpath_CXX" = yes; then
20444 # Fast installation is not supported
20445 enable_fast_install=no
20446elif test "$shlibpath_overrides_runpath" = yes ||
20447 test "$enable_shared" = no; then
20448 # Fast installation is not necessary
20449 enable_fast_install=needless
20450fi
da0f6381 20451
da0f6381 20452
da0f6381 20453
da0f6381 20454
da0f6381 20455
da0f6381
PB
20456
20457
00020c16 20458 fi # test -n "$compiler"
da0f6381 20459
00020c16
ILT
20460 CC=$lt_save_CC
20461 LDCXX=$LD
20462 LD=$lt_save_LD
20463 GCC=$lt_save_GCC
20464 with_gnu_ld=$lt_save_with_gnu_ld
20465 lt_cv_path_LDCXX=$lt_cv_path_LD
20466 lt_cv_path_LD=$lt_save_path_LD
20467 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
20468 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
20469fi # test "$_lt_caught_CXX_error" != yes
da0f6381 20470
da0f6381
PB
20471ac_ext=c
20472ac_cpp='$CPP $CPPFLAGS'
20473ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20474ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20475ac_compiler_gnu=$ac_cv_c_compiler_gnu
20476
da0f6381
PB
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492# Only expand once:
20493
20494
20495
20496
20497
20498# Identify the assembler which will work hand-in-glove with the newly
20499# built GCC, so that we can examine its features. This is the assembler
20500# which will be driven by the driver program.
20501#
20502# If build != host, and we aren't building gas in-tree, we identify a
20503# build->target assembler and hope that it will have the same features
20504# as the host->target assembler we'll be using.
20505gcc_cv_gas_major_version=
20506gcc_cv_gas_minor_version=
20507gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
20508
5213506e
RW
20509if test "${gcc_cv_as+set}" = set; then :
20510
da0f6381
PB
20511else
20512
20513if test -x "$DEFAULT_ASSEMBLER"; then
20514 gcc_cv_as="$DEFAULT_ASSEMBLER"
20515elif test -f $gcc_cv_as_gas_srcdir/configure.in \
20516 && test -f ../gas/Makefile \
20517 && test x$build = x$host; then
20518 gcc_cv_as=../gas/as-new$build_exeext
20519elif test -x as$build_exeext; then
20520 # Build using assembler in the current directory.
20521 gcc_cv_as=./as$build_exeext
20522elif test -x $AS_FOR_TARGET; then
20523 gcc_cv_as="$AS_FOR_TARGET"
20524else
20525 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
20526set dummy $AS_FOR_TARGET; ac_word=$2
5213506e
RW
20527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20528$as_echo_n "checking for $ac_word... " >&6; }
20529if test "${ac_cv_path_gcc_cv_as+set}" = set; then :
20530 $as_echo_n "(cached) " >&6
da0f6381
PB
20531else
20532 case $gcc_cv_as in
20533 [\\/]* | ?:[\\/]*)
20534 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
20535 ;;
20536 *)
20537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20538for as_dir in $PATH
20539do
20540 IFS=$as_save_IFS
20541 test -z "$as_dir" && as_dir=.
5213506e
RW
20542 for ac_exec_ext in '' $ac_executable_extensions; do
20543 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 20544 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
5213506e 20545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
20546 break 2
20547 fi
20548done
5213506e
RW
20549 done
20550IFS=$as_save_IFS
da0f6381
PB
20551
20552 ;;
20553esac
20554fi
20555gcc_cv_as=$ac_cv_path_gcc_cv_as
da0f6381 20556if test -n "$gcc_cv_as"; then
5213506e
RW
20557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20558$as_echo "$gcc_cv_as" >&6; }
da0f6381 20559else
5213506e
RW
20560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20561$as_echo "no" >&6; }
da0f6381
PB
20562fi
20563
5213506e 20564
da0f6381
PB
20565fi
20566fi
20567
da0f6381
PB
20568ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20569
20570case "$ORIGINAL_AS_FOR_TARGET" in
20571 ./as | ./as$build_exeext) ;;
5213506e 20572 *) ac_config_files="$ac_config_files as:exec-tool.in"
da0f6381
PB
20573 ;;
20574esac
20575
5213506e
RW
20576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5
20577$as_echo_n "checking what assembler to use... " >&6; }
da0f6381
PB
20578if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20579 # Single tree build which includes gas. We want to prefer it
20580 # over whatever linker top-level may have detected, since
20581 # we'll use what we're building after installation anyway.
5213506e
RW
20582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5
20583$as_echo "newly built gas" >&6; }
da0f6381
PB
20584 in_tree_gas=yes
20585 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20586for f in $gcc_cv_as_bfd_srcdir/configure \
20587 $gcc_cv_as_gas_srcdir/configure \
20588 $gcc_cv_as_gas_srcdir/configure.in \
20589 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20590 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20591 if test x$gcc_cv_gas_version != x; then
20592 break
20593 fi
20594done
20595gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20596gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20597gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20598case $gcc_cv_gas_patch_version in
20599 "") gcc_cv_gas_patch_version="0" ;;
20600esac
20601gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20602 + $gcc_cv_gas_minor_version \) \* 1000 \
20603 + $gcc_cv_gas_patch_version`
20604
20605 in_tree_gas_is_elf=no
20606 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20607 || (grep 'obj_format = multi' ../gas/Makefile \
20608 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20609 then
20610 in_tree_gas_is_elf=yes
20611 fi
20612else
5213506e
RW
20613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20614$as_echo "$gcc_cv_as" >&6; }
da0f6381
PB
20615 in_tree_gas=no
20616fi
20617
20618# Identify the linker which will work hand-in-glove with the newly
20619# built GCC, so that we can examine its features. This is the linker
20620# which will be driven by the driver program.
20621#
20622# If build != host, and we aren't building gas in-tree, we identify a
20623# build->target linker and hope that it will have the same features
20624# as the host->target linker we'll be using.
20625gcc_cv_gld_major_version=
20626gcc_cv_gld_minor_version=
20627gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20628gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20629
5213506e
RW
20630if test "${gcc_cv_ld+set}" = set; then :
20631
da0f6381
PB
20632else
20633
20634if test -x "$DEFAULT_LINKER"; then
20635 gcc_cv_ld="$DEFAULT_LINKER"
20636elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20637 && test -f ../ld/Makefile \
20638 && test x$build = x$host; then
20639 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20640elif test -x collect-ld$build_exeext; then
20641 # Build using linker in the current directory.
20642 gcc_cv_ld=./collect-ld$build_exeext
20643elif test -x $LD_FOR_TARGET; then
20644 gcc_cv_ld="$LD_FOR_TARGET"
20645else
20646 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20647set dummy $LD_FOR_TARGET; ac_word=$2
5213506e
RW
20648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20649$as_echo_n "checking for $ac_word... " >&6; }
20650if test "${ac_cv_path_gcc_cv_ld+set}" = set; then :
20651 $as_echo_n "(cached) " >&6
d739199a 20652else
e8b05380 20653 case $gcc_cv_ld in
d739199a 20654 [\\/]* | ?:[\\/]*)
e8b05380 20655 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20656 ;;
20657 *)
20658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20659for as_dir in $PATH
20660do
20661 IFS=$as_save_IFS
20662 test -z "$as_dir" && as_dir=.
5213506e
RW
20663 for ac_exec_ext in '' $ac_executable_extensions; do
20664 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20665 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
5213506e 20666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20667 break 2
20668 fi
20669done
5213506e
RW
20670 done
20671IFS=$as_save_IFS
d739199a
DJ
20672
20673 ;;
20674esac
20675fi
e8b05380 20676gcc_cv_ld=$ac_cv_path_gcc_cv_ld
e8b05380 20677if test -n "$gcc_cv_ld"; then
5213506e
RW
20678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20679$as_echo "$gcc_cv_ld" >&6; }
d739199a 20680else
5213506e
RW
20681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20682$as_echo "no" >&6; }
d739199a
DJ
20683fi
20684
5213506e 20685
d739199a 20686fi
e8b05380
PB
20687fi
20688
e8b05380
PB
20689ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20690
be0fe523
PB
20691case "$ORIGINAL_LD_FOR_TARGET" in
20692 ./collect-ld | ./collect-ld$build_exeext) ;;
5213506e 20693 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20694 ;;
20695esac
e8b05380 20696
5213506e
RW
20697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5
20698$as_echo_n "checking what linker to use... " >&6; }
e8b05380
PB
20699if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20700 # Single tree build which includes ld. We want to prefer it
20701 # over whatever linker top-level may have detected, since
20702 # we'll use what we're building after installation anyway.
5213506e
RW
20703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built ld" >&5
20704$as_echo "newly built ld" >&6; }
e8b05380
PB
20705 in_tree_ld=yes
20706 in_tree_ld_is_elf=no
20707 if (grep 'EMUL = .*elf' ../ld/Makefile \
20708 || grep 'EMUL = .*linux' ../ld/Makefile \
20709 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20710 in_tree_ld_is_elf=yes
20711 fi
20712 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
20713 do
20714 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20715 if test x$gcc_cv_gld_version != x; then
20716 break
20717 fi
20718 done
20719 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20720 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20721else
5213506e
RW
20722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20723$as_echo "$gcc_cv_ld" >&6; }
e8b05380
PB
20724 in_tree_ld=no
20725fi
20726
20727# Figure out what nm we will be using.
20728gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
5213506e
RW
20729if test "${gcc_cv_nm+set}" = set; then :
20730
e8b05380
PB
20731else
20732
20733if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20734 && test -f ../binutils/Makefile \
20735 && test x$build = x$host; then
e8b05380
PB
20736 gcc_cv_nm=../binutils/nm-new$build_exeext
20737elif test -x nm$build_exeext; then
20738 gcc_cv_nm=./nm$build_exeext
20739elif test -x $NM_FOR_TARGET; then
20740 gcc_cv_nm="$NM_FOR_TARGET"
20741else
20742 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20743set dummy $NM_FOR_TARGET; ac_word=$2
5213506e
RW
20744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20745$as_echo_n "checking for $ac_word... " >&6; }
20746if test "${ac_cv_path_gcc_cv_nm+set}" = set; then :
20747 $as_echo_n "(cached) " >&6
d739199a 20748else
e8b05380 20749 case $gcc_cv_nm in
d739199a 20750 [\\/]* | ?:[\\/]*)
e8b05380 20751 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20752 ;;
20753 *)
20754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20755for as_dir in $PATH
20756do
20757 IFS=$as_save_IFS
20758 test -z "$as_dir" && as_dir=.
5213506e
RW
20759 for ac_exec_ext in '' $ac_executable_extensions; do
20760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20761 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
5213506e 20762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20763 break 2
20764 fi
20765done
5213506e
RW
20766 done
20767IFS=$as_save_IFS
d739199a
DJ
20768
20769 ;;
20770esac
20771fi
e8b05380 20772gcc_cv_nm=$ac_cv_path_gcc_cv_nm
e8b05380 20773if test -n "$gcc_cv_nm"; then
5213506e
RW
20774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20775$as_echo "$gcc_cv_nm" >&6; }
d739199a 20776else
5213506e
RW
20777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20778$as_echo "no" >&6; }
d739199a
DJ
20779fi
20780
5213506e 20781
d739199a 20782fi
e8b05380 20783fi
d739199a 20784
5213506e
RW
20785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what nm to use" >&5
20786$as_echo_n "checking what nm to use... " >&6; }
e8b05380
PB
20787if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20788 # Single tree build which includes binutils.
5213506e
RW
20789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built nm" >&5
20790$as_echo "newly built nm" >&6; }
e8b05380
PB
20791 in_tree_nm=yes
20792else
5213506e
RW
20793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20794$as_echo "$gcc_cv_nm" >&6; }
e8b05380
PB
20795 in_tree_nm=no
20796fi
20797
20798ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20799
be0fe523
PB
20800case "$ORIGINAL_NM_FOR_TARGET" in
20801 ./nm | ./nm$build_exeext) ;;
5213506e 20802 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20803 ;;
20804esac
20805
e8b05380
PB
20806
20807# Figure out what objdump we will be using.
5213506e
RW
20808if test "${gcc_cv_objdump+set}" = set; then :
20809
e8b05380
PB
20810else
20811
20812if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20813 && test -f ../binutils/Makefile \
20814 && test x$build = x$host; then
e8b05380
PB
20815 # Single tree build which includes binutils.
20816 gcc_cv_objdump=../binutils/objdump$build_exeext
20817elif test -x objdump$build_exeext; then
20818 gcc_cv_objdump=./objdump$build_exeext
20819elif test -x $OBJDUMP_FOR_TARGET; then
20820 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20821else
20822 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20823set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
5213506e
RW
20824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20825$as_echo_n "checking for $ac_word... " >&6; }
20826if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then :
20827 $as_echo_n "(cached) " >&6
9f18db39 20828else
e8b05380 20829 case $gcc_cv_objdump in
9f18db39 20830 [\\/]* | ?:[\\/]*)
e8b05380 20831 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20832 ;;
20833 *)
20834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20835for as_dir in $PATH
9f18db39
PB
20836do
20837 IFS=$as_save_IFS
20838 test -z "$as_dir" && as_dir=.
5213506e
RW
20839 for ac_exec_ext in '' $ac_executable_extensions; do
20840 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20841 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
5213506e 20842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9f18db39
PB
20843 break 2
20844 fi
20845done
5213506e
RW
20846 done
20847IFS=$as_save_IFS
779243f7 20848
9f18db39
PB
20849 ;;
20850esac
20851fi
e8b05380 20852gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
e8b05380 20853if test -n "$gcc_cv_objdump"; then
5213506e
RW
20854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20855$as_echo "$gcc_cv_objdump" >&6; }
9f18db39 20856else
5213506e
RW
20857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20858$as_echo "no" >&6; }
9f18db39
PB
20859fi
20860
5213506e 20861
e8b05380
PB
20862fi
20863fi
9f18db39 20864
5213506e
RW
20865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what objdump to use" >&5
20866$as_echo_n "checking what objdump to use... " >&6; }
e8b05380
PB
20867if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20868 # Single tree build which includes binutils.
5213506e
RW
20869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built objdump" >&5
20870$as_echo "newly built objdump" >&6; }
e8b05380 20871elif test x$gcc_cv_objdump = x; then
5213506e
RW
20872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20873$as_echo "not found" >&6; }
e8b05380 20874else
5213506e
RW
20875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20876$as_echo "$gcc_cv_objdump" >&6; }
a2eafc76 20877fi
3cae5780 20878
6e97481b 20879# Figure out what readelf we will be using.
5213506e
RW
20880if test "${gcc_cv_readelf+set}" = set; then :
20881
6e97481b
JJ
20882else
20883
20884if test -f $gcc_cv_binutils_srcdir/configure.in \
20885 && test -f ../binutils/Makefile \
20886 && test x$build = x$host; then
20887 # Single tree build which includes binutils.
20888 gcc_cv_readelf=../binutils/readelf$build_exeext
20889elif test -x readelf$build_exeext; then
20890 gcc_cv_readelf=./readelf$build_exeext
20891else
20892 # Extract the first word of "readelf", so it can be a program name with args.
20893set dummy readelf; ac_word=$2
5213506e
RW
20894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20895$as_echo_n "checking for $ac_word... " >&6; }
20896if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then :
20897 $as_echo_n "(cached) " >&6
6e97481b
JJ
20898else
20899 case $gcc_cv_readelf in
20900 [\\/]* | ?:[\\/]*)
20901 ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path.
20902 ;;
20903 *)
20904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20905for as_dir in $PATH
20906do
20907 IFS=$as_save_IFS
20908 test -z "$as_dir" && as_dir=.
5213506e
RW
20909 for ac_exec_ext in '' $ac_executable_extensions; do
20910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6e97481b 20911 ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
5213506e 20912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6e97481b
JJ
20913 break 2
20914 fi
20915done
5213506e
RW
20916 done
20917IFS=$as_save_IFS
6e97481b
JJ
20918
20919 ;;
20920esac
20921fi
20922gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
6e97481b 20923if test -n "$gcc_cv_readelf"; then
5213506e
RW
20924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20925$as_echo "$gcc_cv_readelf" >&6; }
6e97481b 20926else
5213506e
RW
20927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20928$as_echo "no" >&6; }
6e97481b
JJ
20929fi
20930
5213506e 20931
6e97481b
JJ
20932fi
20933fi
20934
5213506e
RW
20935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5
20936$as_echo_n "checking what readelf to use... " >&6; }
6e97481b
JJ
20937if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
20938 # Single tree build which includes binutils.
5213506e
RW
20939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" >&5
20940$as_echo "newly built readelf" >&6; }
6e97481b 20941elif test x$gcc_cv_readelf = x; then
5213506e
RW
20942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20943$as_echo "not found" >&6; }
6e97481b 20944else
5213506e
RW
20945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20946$as_echo "$gcc_cv_readelf" >&6; }
6e97481b
JJ
20947fi
20948
981d4858 20949# Figure out what assembler alignment features are present.
5213506e
RW
20950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .balign and .p2align" >&5
20951$as_echo_n "checking assembler for .balign and .p2align... " >&6; }
20952if test "${gcc_cv_as_balign_and_p2align+set}" = set; then :
20953 $as_echo_n "(cached) " >&6
8ada417f
ZW
20954else
20955 gcc_cv_as_balign_and_p2align=no
20956 if test $in_tree_gas = yes; then
20957 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
20958 then gcc_cv_as_balign_and_p2align=yes
20959fi
20960 elif test x$gcc_cv_as != x; then
6e3f3080 20961 echo '.balign 4
8ada417f 20962.p2align 2' > conftest.s
ba479fd2 20963 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 20964 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
20965 (eval $ac_try) 2>&5
20966 ac_status=$?
5213506e
RW
20967 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20968 test $ac_status = 0; }; }
8ada417f
ZW
20969 then
20970 gcc_cv_as_balign_and_p2align=yes
20971 else
20972 echo "configure: failed program was" >&5
20973 cat conftest.s >&5
20974 fi
20975 rm -f conftest.o conftest.s
20976 fi
20977fi
5213506e
RW
20978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_balign_and_p2align" >&5
20979$as_echo "$gcc_cv_as_balign_and_p2align" >&6; }
63cf211a 20980if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2 20981
5213506e 20982$as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h
981d4858 20983
ad9c4d9f
NN
20984fi
20985
5213506e
RW
20986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5
20987$as_echo_n "checking assembler for .p2align with maximum skip... " >&6; }
20988if test "${gcc_cv_as_max_skip_p2align+set}" = set; then :
20989 $as_echo_n "(cached) " >&6
8ada417f
ZW
20990else
20991 gcc_cv_as_max_skip_p2align=no
20992 if test $in_tree_gas = yes; then
20993 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20994 then gcc_cv_as_max_skip_p2align=yes
20995fi
20996 elif test x$gcc_cv_as != x; then
6e3f3080 20997 echo '.p2align 4,,7' > conftest.s
ba479fd2 20998 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 20999 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21000 (eval $ac_try) 2>&5
21001 ac_status=$?
5213506e
RW
21002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21003 test $ac_status = 0; }; }
8ada417f
ZW
21004 then
21005 gcc_cv_as_max_skip_p2align=yes
21006 else
21007 echo "configure: failed program was" >&5
21008 cat conftest.s >&5
21009 fi
21010 rm -f conftest.o conftest.s
21011 fi
ad9c4d9f 21012fi
5213506e
RW
21013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_max_skip_p2align" >&5
21014$as_echo "$gcc_cv_as_max_skip_p2align" >&6; }
63cf211a 21015if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2 21016
5213506e 21017$as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h
9e423e6d 21018
9e423e6d 21019fi
ad9c4d9f 21020
5213506e
RW
21021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5
21022$as_echo_n "checking assembler for .literal16... " >&6; }
21023if test "${gcc_cv_as_literal16+set}" = set; then :
21024 $as_echo_n "(cached) " >&6
5708d18d
MS
21025else
21026 gcc_cv_as_literal16=no
21027 if test $in_tree_gas = yes; then
21028 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
21029 then gcc_cv_as_literal16=yes
21030fi
21031 elif test x$gcc_cv_as != x; then
21032 echo '.literal16' > conftest.s
21033 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21034 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
5708d18d
MS
21035 (eval $ac_try) 2>&5
21036 ac_status=$?
5213506e
RW
21037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21038 test $ac_status = 0; }; }
5708d18d
MS
21039 then
21040 gcc_cv_as_literal16=yes
21041 else
21042 echo "configure: failed program was" >&5
21043 cat conftest.s >&5
21044 fi
21045 rm -f conftest.o conftest.s
21046 fi
21047fi
5213506e
RW
21048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_literal16" >&5
21049$as_echo "$gcc_cv_as_literal16" >&6; }
5708d18d
MS
21050if test $gcc_cv_as_literal16 = yes; then
21051
5213506e 21052$as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h
5708d18d
MS
21053
21054fi
21055
5213506e
RW
21056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5
21057$as_echo_n "checking assembler for working .subsection -1... " >&6; }
21058if test "${gcc_cv_as_subsection_m1+set}" = set; then :
21059 $as_echo_n "(cached) " >&6
8ada417f
ZW
21060else
21061 gcc_cv_as_subsection_m1=no
21062 if test $in_tree_gas = yes; then
21063 if test $in_tree_gas_is_elf = yes \
21064 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
21065 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 21066fi
8ada417f 21067 elif test x$gcc_cv_as != x; then
6e3f3080 21068 echo 'conftest_label1: .word 0
d1accaa3
JJ
21069.subsection -1
21070conftest_label2: .word 0
8ada417f 21071.previous' > conftest.s
ba479fd2 21072 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21073 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21074 (eval $ac_try) 2>&5
21075 ac_status=$?
5213506e
RW
21076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21077 test $ac_status = 0; }; }
8ada417f
ZW
21078 then
21079 if test x$gcc_cv_nm != x; then
21080 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
21081 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
21082 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
21083 then :
21084 else gcc_cv_as_subsection_m1=yes
21085 fi
21086 rm -f conftest.nm1 conftest.nm2
21087 fi
21088 else
21089 echo "configure: failed program was" >&5
21090 cat conftest.s >&5
21091 fi
21092 rm -f conftest.o conftest.s
21093 fi
981d4858 21094fi
5213506e
RW
21095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_subsection_m1" >&5
21096$as_echo "$gcc_cv_as_subsection_m1" >&6; }
63cf211a 21097if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2 21098
5213506e 21099$as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h
981d4858 21100
d1accaa3 21101fi
ad9c4d9f 21102
5213506e
RW
21103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5
21104$as_echo_n "checking assembler for .weak... " >&6; }
21105if test "${gcc_cv_as_weak+set}" = set; then :
21106 $as_echo_n "(cached) " >&6
8ada417f
ZW
21107else
21108 gcc_cv_as_weak=no
21109 if test $in_tree_gas = yes; then
21110 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
21111 then gcc_cv_as_weak=yes
ad9c4d9f 21112fi
8ada417f 21113 elif test x$gcc_cv_as != x; then
6e3f3080 21114 echo ' .weak foobar' > conftest.s
ba479fd2 21115 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21116 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21117 (eval $ac_try) 2>&5
21118 ac_status=$?
5213506e
RW
21119 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21120 test $ac_status = 0; }; }
8ada417f
ZW
21121 then
21122 gcc_cv_as_weak=yes
21123 else
21124 echo "configure: failed program was" >&5
21125 cat conftest.s >&5
21126 fi
21127 rm -f conftest.o conftest.s
21128 fi
981d4858 21129fi
5213506e
RW
21130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weak" >&5
21131$as_echo "$gcc_cv_as_weak" >&6; }
63cf211a 21132if test $gcc_cv_as_weak = yes; then
ba479fd2 21133
5213506e 21134$as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h
981d4858 21135
12822146 21136fi
ad9c4d9f 21137
5213506e
RW
21138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5
21139$as_echo_n "checking assembler for .weakref... " >&6; }
21140if test "${gcc_cv_as_weakref+set}" = set; then :
21141 $as_echo_n "(cached) " >&6
a0203ca7
AO
21142else
21143 gcc_cv_as_weakref=no
21144 if test $in_tree_gas = yes; then
21145 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
21146 then gcc_cv_as_weakref=yes
21147fi
21148 elif test x$gcc_cv_as != x; then
21149 echo ' .weakref foobar, barfnot' > conftest.s
21150 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21151 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a0203ca7
AO
21152 (eval $ac_try) 2>&5
21153 ac_status=$?
5213506e
RW
21154 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21155 test $ac_status = 0; }; }
a0203ca7
AO
21156 then
21157 gcc_cv_as_weakref=yes
21158 else
21159 echo "configure: failed program was" >&5
21160 cat conftest.s >&5
21161 fi
21162 rm -f conftest.o conftest.s
21163 fi
21164fi
5213506e
RW
21165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weakref" >&5
21166$as_echo "$gcc_cv_as_weakref" >&6; }
a0203ca7
AO
21167if test $gcc_cv_as_weakref = yes; then
21168
5213506e 21169$as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h
a0203ca7
AO
21170
21171fi
21172
5213506e
RW
21173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5
21174$as_echo_n "checking assembler for .nsubspa comdat... " >&6; }
21175if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then :
21176 $as_echo_n "(cached) " >&6
e41f3691
JDA
21177else
21178 gcc_cv_as_nsubspa_comdat=no
21179 if test $in_tree_gas = yes; then
21180 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21181 then gcc_cv_as_nsubspa_comdat=yes
21182fi
21183 elif test x$gcc_cv_as != x; then
21184 echo ' .SPACE $TEXT$
21185 .NSUBSPA $CODE$,COMDAT' > conftest.s
21186 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21187 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e41f3691
JDA
21188 (eval $ac_try) 2>&5
21189 ac_status=$?
5213506e
RW
21190 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21191 test $ac_status = 0; }; }
e41f3691
JDA
21192 then
21193 gcc_cv_as_nsubspa_comdat=yes
21194 else
21195 echo "configure: failed program was" >&5
21196 cat conftest.s >&5
21197 fi
21198 rm -f conftest.o conftest.s
21199 fi
21200fi
5213506e
RW
21201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_nsubspa_comdat" >&5
21202$as_echo "$gcc_cv_as_nsubspa_comdat" >&6; }
e41f3691
JDA
21203if test $gcc_cv_as_nsubspa_comdat = yes; then
21204
5213506e 21205$as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h
e41f3691
JDA
21206
21207fi
21208
8ada417f
ZW
21209# .hidden needs to be supported in both the assembler and the linker,
21210# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
21211# This is irritatingly difficult to feature test for; we have to check the
21212# date string after the version number. If we've got an in-tree
21213# ld, we don't know its patchlevel version, so we set the baseline at 2.13
21214# to be safe.
21215# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
5213506e
RW
21216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .hidden" >&5
21217$as_echo_n "checking assembler for .hidden... " >&6; }
21218if test "${gcc_cv_as_hidden+set}" = set; then :
21219 $as_echo_n "(cached) " >&6
8ada417f
ZW
21220else
21221 gcc_cv_as_hidden=no
21222 if test $in_tree_gas = yes; then
21223 if test $in_tree_gas_is_elf = yes \
21224 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
21225 then gcc_cv_as_hidden=yes
21226fi
21227 elif test x$gcc_cv_as != x; then
6e3f3080 21228 echo ' .hidden foobar
8ada417f 21229foobar:' > conftest.s
ba479fd2 21230 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21231 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21232 (eval $ac_try) 2>&5
21233 ac_status=$?
5213506e
RW
21234 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21235 test $ac_status = 0; }; }
8ada417f
ZW
21236 then
21237 gcc_cv_as_hidden=yes
21238 else
21239 echo "configure: failed program was" >&5
21240 cat conftest.s >&5
21241 fi
21242 rm -f conftest.o conftest.s
21243 fi
21244fi
5213506e
RW
21245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5
21246$as_echo "$gcc_cv_as_hidden" >&6; }
63cf211a 21247
ad9c4d9f 21248
5213506e
RW
21249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .hidden support" >&5
21250$as_echo_n "checking linker for .hidden support... " >&6; }
21251if test "${gcc_cv_ld_hidden+set}" = set; then :
21252 $as_echo_n "(cached) " >&6
8ada417f
ZW
21253else
21254 if test $in_tree_ld = yes ; then
21255 gcc_cv_ld_hidden=no
21256 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 \
21257 && test $in_tree_ld_is_elf = yes; then
21258 gcc_cv_ld_hidden=yes
21259 fi
21260else
21261 gcc_cv_ld_hidden=yes
bace148a 21262 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
21263 if echo "$ld_ver" | grep GNU > /dev/null; then
21264 ld_vers=`echo $ld_ver | sed -n \
115e6e55 21265 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
8ada417f 21266 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
21267 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21268 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21269 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
21270 if test 0"$ld_date" -lt 20020404; then
21271 if test -n "$ld_date"; then
21272 # If there was date string, but was earlier than 2002-04-04, fail
21273 gcc_cv_ld_hidden=no
21274 elif test -z "$ld_vers"; then
21275 # If there was no date string nor ld version number, something is wrong
21276 gcc_cv_ld_hidden=no
21277 else
8ada417f
ZW
21278 test -z "$ld_vers_patch" && ld_vers_patch=0
21279 if test "$ld_vers_major" -lt 2; then
21280 gcc_cv_ld_hidden=no
21281 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
21282 gcc_cv_ld_hidden="no"
21283 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
21284 gcc_cv_ld_hidden=no
c72931a6 21285 fi
8ada417f 21286 fi
789b7de5 21287 fi
8ada417f 21288 else
28690784 21289 case "${target}" in
b0fd7d27 21290 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
21291 gcc_cv_ld_hidden=yes
21292 ;;
5e87dc23
RO
21293 *-*-solaris2.9* | *-*-solaris2.1[0-9]*)
21294 gcc_cv_ld_hidden=yes
21295 ;;
28690784
JDA
21296 *)
21297 gcc_cv_ld_hidden=no
21298 ;;
21299 esac
8ada417f
ZW
21300 fi
21301fi
6d07784a 21302fi
5213506e
RW
21303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_hidden" >&5
21304$as_echo "$gcc_cv_ld_hidden" >&6; }
8ada417f 21305libgcc_visibility=no
ad9c4d9f 21306
232b67d9 21307
8e3940b2 21308if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 21309 libgcc_visibility=yes
ba479fd2 21310
5213506e 21311$as_echo "#define HAVE_GAS_HIDDEN 1" >>confdefs.h
ad9c4d9f
NN
21312
21313fi
21314
5213506e
RW
21315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker read-only and read-write section mixing" >&5
21316$as_echo_n "checking linker read-only and read-write section mixing... " >&6; }
e73da78e
RO
21317gcc_cv_ld_ro_rw_mix=unknown
21318if test $in_tree_ld = yes ; then
21319 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 \
21320 && test $in_tree_ld_is_elf = yes; then
21321 gcc_cv_ld_ro_rw_mix=read-write
21322 fi
21323elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
21324 echo '.section myfoosect, "a"' > conftest1.s
21325 echo '.section myfoosect, "aw"' > conftest2.s
21326 echo '.byte 1' >> conftest2.s
21327 echo '.section myfoosect, "a"' > conftest3.s
21328 echo '.byte 0' >> conftest3.s
21329 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
21330 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
21331 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
21332 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
21333 conftest2.o conftest3.o > /dev/null 2>&1; then
21334 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
21335 | sed -e '/myfoosect/!d' -e N`
21336 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
21337 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
21338 gcc_cv_ld_ro_rw_mix=read-only
21339 else
21340 gcc_cv_ld_ro_rw_mix=read-write
21341 fi
21342 fi
21343 fi
21344 rm -f conftest.* conftest[123].*
21345fi
21346if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
21347
5213506e 21348$as_echo "#define HAVE_LD_RO_RW_SECTION_MIXING 1" >>confdefs.h
e73da78e
RO
21349
21350fi
5213506e
RW
21351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5
21352$as_echo "$gcc_cv_ld_ro_rw_mix" >&6; }
e73da78e 21353
8ada417f 21354# Check if we have .[us]leb128, and support symbol arithmetic with it.
5213506e
RW
21355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .sleb128 and .uleb128" >&5
21356$as_echo_n "checking assembler for .sleb128 and .uleb128... " >&6; }
21357if test "${gcc_cv_as_leb128+set}" = set; then :
21358 $as_echo_n "(cached) " >&6
8ada417f
ZW
21359else
21360 gcc_cv_as_leb128=no
21361 if test $in_tree_gas = yes; then
21362 if test $in_tree_gas_is_elf = yes \
21363 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
21364 then gcc_cv_as_leb128=yes
21365fi
21366 elif test x$gcc_cv_as != x; then
6e3f3080 21367 echo ' .data
b7460f24
RH
21368 .uleb128 L2 - L1
21369L1:
21370 .uleb128 1280
21371 .sleb128 -1010
8ada417f 21372L2:' > conftest.s
ba479fd2 21373 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21374 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21375 (eval $ac_try) 2>&5
21376 ac_status=$?
5213506e
RW
21377 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21378 test $ac_status = 0; }; }
8ada417f
ZW
21379 then
21380 # GAS versions before 2.11 do not support uleb128,
21381 # despite appearing to.
21382 # ??? There exists an elf-specific test that will crash
21383 # the assembler. Perhaps it's better to figure out whether
21384 # arbitrary sections are supported and try the test.
bace148a 21385 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 21386 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 21387 as_vers=`echo $as_ver | sed -n \
115e6e55 21388 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
21389 as_major=`expr "$as_vers" : '\([0-9]*\)'`
21390 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
21391 if test $as_major -eq 2 && test $as_minor -lt 11
21392 then :
21393 else gcc_cv_as_leb128=yes
21394 fi
21395 fi
21396 else
21397 echo "configure: failed program was" >&5
21398 cat conftest.s >&5
21399 fi
21400 rm -f conftest.o conftest.s
21401 fi
b7460f24 21402fi
5213506e
RW
21403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_leb128" >&5
21404$as_echo "$gcc_cv_as_leb128" >&6; }
63cf211a 21405if test $gcc_cv_as_leb128 = yes; then
ba479fd2 21406
5213506e 21407$as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h
b7460f24
RH
21408
21409fi
ad9c4d9f 21410
d4ea4622 21411# Check if we have assembler support for unwind directives.
5213506e
RW
21412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5
21413$as_echo_n "checking assembler for cfi directives... " >&6; }
21414if test "${gcc_cv_as_cfi_directive+set}" = set; then :
21415 $as_echo_n "(cached) " >&6
d4ea4622
RH
21416else
21417 gcc_cv_as_cfi_directive=no
6e60703f 21418 if test x$gcc_cv_as != x; then
d4ea4622
RH
21419 echo ' .text
21420 .cfi_startproc
21421 .cfi_offset 0, 0
21422 .cfi_same_value 1
21423 .cfi_def_cfa 1, 2
21424 .cfi_escape 1, 2, 3, 4, 5
21425 .cfi_endproc' > conftest.s
21426 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21427 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d4ea4622
RH
21428 (eval $ac_try) 2>&5
21429 ac_status=$?
5213506e
RW
21430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21431 test $ac_status = 0; }; }
d4ea4622 21432 then
e73da78e
RO
21433 case "$target" in
21434 *-*-solaris*)
21435 # If the linker used on Solaris (like Sun ld) isn't capable of merging
21436 # read-only and read-write sections, we need to make sure that the
21437 # assembler used emits read-write .eh_frame sections.
21438 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then
21439 if test "x$gcc_cv_objdump" != x; then
21440 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21441 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then
21442 gcc_cv_as_cfi_directive=no
21443 else
21444 gcc_cv_as_cfi_directive=yes
21445 fi
21446 else
21447 # no objdump, err on the side of caution
21448 gcc_cv_as_cfi_directive=no
21449 fi
21450 else
21451 gcc_cv_as_cfi_directive=yes
21452 fi
21453 ;;
21454 *-*-*)
21455 gcc_cv_as_cfi_directive=yes
21456 ;;
21457esac
d4ea4622
RH
21458 else
21459 echo "configure: failed program was" >&5
21460 cat conftest.s >&5
21461 fi
21462 rm -f conftest.o conftest.s
21463 fi
21464fi
5213506e
RW
21465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5
21466$as_echo "$gcc_cv_as_cfi_directive" >&6; }
d4ea4622 21467
6e97481b 21468if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_readelf != x; then
5213506e
RW
21469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5
21470$as_echo_n "checking assembler for working cfi advance... " >&6; }
21471if test "${gcc_cv_as_cfi_advance_working+set}" = set; then :
21472 $as_echo_n "(cached) " >&6
6e97481b
JJ
21473else
21474 gcc_cv_as_cfi_advance_working=no
21475 if test x$gcc_cv_as != x; then
21476 echo ' .text
21477 .cfi_startproc
21478 .cfi_adjust_cfa_offset 64
21479 .skip 512, 0
21480 .cfi_adjust_cfa_offset 128
21481 .cfi_endproc' > conftest.s
21482 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21483 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6e97481b
JJ
21484 (eval $ac_try) 2>&5
21485 ac_status=$?
5213506e
RW
21486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21487 test $ac_status = 0; }; }
6e97481b
JJ
21488 then
21489
21490if $gcc_cv_readelf -wf conftest.o 2>/dev/null \
21491 | grep 'DW_CFA_advance_loc[12]:[ ][ ]*512[ ]' >/dev/null; then
21492 gcc_cv_as_cfi_advance_working=yes
21493fi
21494
21495 else
21496 echo "configure: failed program was" >&5
21497 cat conftest.s >&5
21498 fi
21499 rm -f conftest.o conftest.s
21500 fi
21501fi
5213506e
RW
21502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5
21503$as_echo "$gcc_cv_as_cfi_advance_working" >&6; }
6e97481b
JJ
21504
21505else
66f91112
EB
21506 # no readelf, err on the side of caution
21507 gcc_cv_as_cfi_advance_working=no
6e97481b 21508fi
d4ea4622
RH
21509
21510cat >>confdefs.h <<_ACEOF
6e97481b
JJ
21511#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \
21512 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`
d4ea4622
RH
21513_ACEOF
21514
21515
5213506e
RW
21516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi personality directive" >&5
21517$as_echo_n "checking assembler for cfi personality directive... " >&6; }
21518if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then :
21519 $as_echo_n "(cached) " >&6
058514b3
RH
21520else
21521 gcc_cv_as_cfi_personality_directive=no
6e60703f 21522 if test x$gcc_cv_as != x; then
058514b3 21523 echo ' .text
042628f9 21524 .cfi_startproc
058514b3
RH
21525 .cfi_personality 0, symbol
21526 .cfi_endproc' > conftest.s
21527 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21528 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
058514b3
RH
21529 (eval $ac_try) 2>&5
21530 ac_status=$?
5213506e
RW
21531 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21532 test $ac_status = 0; }; }
058514b3
RH
21533 then
21534 gcc_cv_as_cfi_personality_directive=yes
21535 else
21536 echo "configure: failed program was" >&5
21537 cat conftest.s >&5
21538 fi
21539 rm -f conftest.o conftest.s
21540 fi
21541fi
5213506e
RW
21542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_personality_directive" >&5
21543$as_echo "$gcc_cv_as_cfi_personality_directive" >&6; }
058514b3
RH
21544
21545
21546cat >>confdefs.h <<_ACEOF
21547#define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
21548 then echo 1; else echo 0; fi`
21549_ACEOF
21550
21551
7d45fb94
JJ
21552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi sections directive" >&5
21553$as_echo_n "checking assembler for cfi sections directive... " >&6; }
21554if test "${gcc_cv_as_cfi_sections_directive+set}" = set; then :
21555 $as_echo_n "(cached) " >&6
21556else
21557 gcc_cv_as_cfi_sections_directive=no
21558 if test x$gcc_cv_as != x; then
21559 echo ' .text
21560 .cfi_sections .debug_frame, .eh_frame
21561 .cfi_startproc
21562 .cfi_endproc' > conftest.s
21563 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21564 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
21565 (eval $ac_try) 2>&5
21566 ac_status=$?
21567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21568 test $ac_status = 0; }; }
21569 then
21570 gcc_cv_as_cfi_sections_directive=yes
21571 else
21572 echo "configure: failed program was" >&5
21573 cat conftest.s >&5
21574 fi
21575 rm -f conftest.o conftest.s
21576 fi
21577fi
21578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_sections_directive" >&5
21579$as_echo "$gcc_cv_as_cfi_sections_directive" >&6; }
21580
21581
21582cat >>confdefs.h <<_ACEOF
21583#define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes;
21584 then echo 1; else echo 0; fi`
21585_ACEOF
21586
21587
8ada417f
ZW
21588# GAS versions up to and including 2.11.0 may mis-optimize
21589# .eh_frame data.
5213506e
RW
21590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for eh_frame optimization" >&5
21591$as_echo_n "checking assembler for eh_frame optimization... " >&6; }
21592if test "${gcc_cv_as_eh_frame+set}" = set; then :
21593 $as_echo_n "(cached) " >&6
8ada417f
ZW
21594else
21595 gcc_cv_as_eh_frame=no
21596 if test $in_tree_gas = yes; then
21597 if test $in_tree_gas_is_elf = yes \
21598 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21599 then gcc_cv_as_eh_frame=yes
ad9c4d9f 21600fi
8ada417f 21601 elif test x$gcc_cv_as != x; then
6e3f3080 21602 echo ' .text
c64688ae
RH
21603.LFB1:
21604 .4byte 0
21605.L1:
21606 .4byte 0
21607.LFE1:
21608 .section .eh_frame,"aw",@progbits
21609__FRAME_BEGIN__:
21610 .4byte .LECIE1-.LSCIE1
21611.LSCIE1:
21612 .4byte 0x0
21613 .byte 0x1
21614 .ascii "z\0"
21615 .byte 0x1
21616 .byte 0x78
21617 .byte 0x1a
21618 .byte 0x0
21619 .byte 0x4
21620 .4byte 1
21621 .p2align 1
21622.LECIE1:
21623.LSFDE1:
21624 .4byte .LEFDE1-.LASFDE1
21625.LASFDE1:
21626 .4byte .LASFDE1-__FRAME_BEGIN__
21627 .4byte .LFB1
21628 .4byte .LFE1-.LFB1
21629 .byte 0x4
21630 .4byte .LFE1-.LFB1
21631 .byte 0x4
21632 .4byte .L1-.LFB1
8ada417f 21633.LEFDE1:' > conftest.s
ba479fd2 21634 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21635 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21636 (eval $ac_try) 2>&5
21637 ac_status=$?
5213506e
RW
21638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21639 test $ac_status = 0; }; }
8ada417f
ZW
21640 then
21641 cat > conftest.lit <<EOF
c64688ae
RH
21642 0000 10000000 00000000 017a0001 781a0004 .........z..x...
21643 0010 01000000 12000000 18000000 00000000 ................
093e61a6 21644 0020 08000000 04080000 0044 .........D
01efb963 21645EOF
ba479fd2 21646cat > conftest.big <<EOF
01efb963
AS
21647 0000 00000010 00000000 017a0001 781a0004 .........z..x...
21648 0010 00000001 00000012 00000018 00000000 ................
093e61a6 21649 0020 00000008 04000000 0844 .........D
c64688ae 21650EOF
8ada417f
ZW
21651 # If the assembler didn't choke, and we can objdump,
21652 # and we got the correct data, then succeed.
dbc02e7f
AS
21653 # The text in the here-document typically retains its unix-style line
21654 # endings, while the output of objdump will use host line endings.
21655 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
21656 if test x$gcc_cv_objdump != x \
21657 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
21658 | tail -3 > conftest.got \
dbc02e7f
AS
21659 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
21660 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
21661 then
21662 gcc_cv_as_eh_frame=yes
ba479fd2 21663 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
5213506e 21664 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21665 (eval $ac_try) 2>&5
21666 ac_status=$?
5213506e
RW
21667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21668 test $ac_status = 0; }; }; then
8ada417f
ZW
21669 gcc_cv_as_eh_frame=buggy
21670 else
21671 # Uh oh, what do we do now?
21672 gcc_cv_as_eh_frame=no
21673 fi
21674 else
21675 echo "configure: failed program was" >&5
21676 cat conftest.s >&5
21677 fi
21678 rm -f conftest.o conftest.s
21679 fi
c64688ae 21680fi
5213506e
RW
21681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_eh_frame" >&5
21682$as_echo "$gcc_cv_as_eh_frame" >&6; }
ad9c4d9f 21683
6e3f3080 21684
63cf211a 21685if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2 21686
5213506e 21687$as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h
ad9c4d9f
NN
21688
21689fi
21690
5213506e
RW
21691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21692$as_echo_n "checking assembler for section merging support... " >&6; }
21693if test "${gcc_cv_as_shf_merge+set}" = set; then :
21694 $as_echo_n "(cached) " >&6
8ada417f
ZW
21695else
21696 gcc_cv_as_shf_merge=no
21697 if test $in_tree_gas = yes; then
21698 if test $in_tree_gas_is_elf = yes \
21699 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21700 then gcc_cv_as_shf_merge=yes
21701fi
21702 elif test x$gcc_cv_as != x; then
6e3f3080 21703 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2 21704 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21705 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21706 (eval $ac_try) 2>&5
21707 ac_status=$?
5213506e
RW
21708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21709 test $ac_status = 0; }; }
8ada417f
ZW
21710 then
21711 gcc_cv_as_shf_merge=yes
21712 else
21713 echo "configure: failed program was" >&5
21714 cat conftest.s >&5
21715 fi
21716 rm -f conftest.o conftest.s
21717 fi
201556f0 21718fi
5213506e
RW
21719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21720$as_echo "$gcc_cv_as_shf_merge" >&6; }
8ada417f 21721
c18a5b6c 21722if test $gcc_cv_as_shf_merge = no; then
5213506e
RW
21723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21724$as_echo_n "checking assembler for section merging support... " >&6; }
21725if test "${gcc_cv_as_shf_merge+set}" = set; then :
21726 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21727else
21728 gcc_cv_as_shf_merge=no
21729 if test $in_tree_gas = yes; then
21730 if test $in_tree_gas_is_elf = yes \
21731 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21732 then gcc_cv_as_shf_merge=yes
21733fi
21734 elif test x$gcc_cv_as != x; then
21735 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
21736 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21737 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21738 (eval $ac_try) 2>&5
21739 ac_status=$?
5213506e
RW
21740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21741 test $ac_status = 0; }; }
c18a5b6c
MM
21742 then
21743 gcc_cv_as_shf_merge=yes
21744 else
21745 echo "configure: failed program was" >&5
21746 cat conftest.s >&5
21747 fi
21748 rm -f conftest.o conftest.s
21749 fi
21750fi
5213506e
RW
21751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21752$as_echo "$gcc_cv_as_shf_merge" >&6; }
c18a5b6c
MM
21753
21754fi
8ad9fb33 21755
ba479fd2 21756cat >>confdefs.h <<_ACEOF
8ad9fb33 21757#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 21758_ACEOF
201556f0 21759
201556f0 21760
5213506e
RW
21761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21762$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21763if test "${gcc_cv_as_comdat_group+set}" = set; then :
21764 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21765else
21766 gcc_cv_as_comdat_group=no
21767 if test $in_tree_gas = yes; then
21768 if test $in_tree_gas_is_elf = yes \
11176d2a 21769 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21770 then gcc_cv_as_comdat_group=yes
21771fi
21772 elif test x$gcc_cv_as != x; then
21773 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
21774 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21775 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21776 (eval $ac_try) 2>&5
21777 ac_status=$?
5213506e
RW
21778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21779 test $ac_status = 0; }; }
c18a5b6c
MM
21780 then
21781 gcc_cv_as_comdat_group=yes
21782 else
21783 echo "configure: failed program was" >&5
21784 cat conftest.s >&5
21785 fi
21786 rm -f conftest.o conftest.s
21787 fi
21788fi
5213506e
RW
21789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5
21790$as_echo "$gcc_cv_as_comdat_group" >&6; }
c18a5b6c
MM
21791
21792if test $gcc_cv_as_comdat_group = yes; then
21793 gcc_cv_as_comdat_group_percent=no
21794else
5213506e
RW
21795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21796$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21797if test "${gcc_cv_as_comdat_group_percent+set}" = set; then :
21798 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21799else
21800 gcc_cv_as_comdat_group_percent=no
21801 if test $in_tree_gas = yes; then
21802 if test $in_tree_gas_is_elf = yes \
11176d2a 21803 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21804 then gcc_cv_as_comdat_group_percent=yes
21805fi
21806 elif test x$gcc_cv_as != x; then
21807 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
21808 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21809 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21810 (eval $ac_try) 2>&5
21811 ac_status=$?
5213506e
RW
21812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21813 test $ac_status = 0; }; }
c18a5b6c
MM
21814 then
21815 gcc_cv_as_comdat_group_percent=yes
21816 else
21817 echo "configure: failed program was" >&5
21818 cat conftest.s >&5
21819 fi
21820 rm -f conftest.o conftest.s
21821 fi
21822fi
5213506e
RW
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5
21824$as_echo "$gcc_cv_as_comdat_group_percent" >&6; }
c18a5b6c
MM
21825
21826fi
39ba7b7d
JB
21827if test $in_tree_ld = yes ; then
21828 comdat_group=no
21829 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 \
21830 && test $in_tree_ld_is_elf = yes; then
21831 comdat_group=yes
21832 fi
21833elif test x"$ld_vers" != x; then
11176d2a
JB
21834 comdat_group=yes
21835 if test 0"$ld_date" -lt 20050308; then
21836 if test -n "$ld_date"; then
21837 # If there was date string, but was earlier than 2005-03-08, fail
21838 comdat_group=no
21839 elif test "$ld_vers_major" -lt 2; then
21840 comdat_group=no
21841 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
21842 comdat_group=no
21843 fi
21844 fi
1cf0118d
RO
21845else
21846 # assume linkers other than GNU ld don't support COMDAT group
21847 comdat_group=no
21848fi
21849if test $comdat_group = no; then
21850 gcc_cv_as_comdat_group=no
21851 gcc_cv_as_comdat_group_percent=no
11176d2a 21852fi
c18a5b6c
MM
21853
21854cat >>confdefs.h <<_ACEOF
11176d2a 21855#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
21856_ACEOF
21857
21858
5213506e
RW
21859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for line table discriminator support" >&5
21860$as_echo_n "checking assembler for line table discriminator support... " >&6; }
21861if test "${gcc_cv_as_discriminator+set}" = set; then :
21862 $as_echo_n "(cached) " >&6
6c52e687
CC
21863else
21864 gcc_cv_as_discriminator=no
21865 if test $in_tree_gas = yes; then
21866 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 51`
21867 then gcc_cv_as_discriminator=yes
21868fi
21869 elif test x$gcc_cv_as != x; then
21870 echo ' .text
21871 .file 1 "conf.c"
21872 .loc 1 1 0 discriminator 1' > conftest.s
21873 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 21874 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6c52e687
CC
21875 (eval $ac_try) 2>&5
21876 ac_status=$?
5213506e
RW
21877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21878 test $ac_status = 0; }; }
6c52e687
CC
21879 then
21880 gcc_cv_as_discriminator=yes
21881 else
21882 echo "configure: failed program was" >&5
21883 cat conftest.s >&5
21884 fi
21885 rm -f conftest.o conftest.s
21886 fi
21887fi
5213506e
RW
21888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_discriminator" >&5
21889$as_echo "$gcc_cv_as_discriminator" >&6; }
6c52e687
CC
21890if test $gcc_cv_as_discriminator = yes; then
21891
5213506e 21892$as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h
6c52e687
CC
21893
21894fi
21895
6a7a462c 21896# Thread-local storage - the check is heavily parameterized.
f996902d
RH
21897conftest_s=
21898tls_first_major=
21899tls_first_minor=
9739c90c 21900tls_as_opt=
f996902d 21901case "$target" in
6f9b006d
RH
21902 alpha*-*-*)
21903 conftest_s='
21904 .section ".tdata","awT",@progbits
21905foo: .long 25
21906 .text
21907 ldq $27,__tls_get_addr($29) !literal!1
21908 lda $16,foo($29) !tlsgd!1
21909 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
21910 ldq $27,__tls_get_addr($29) !literal!2
21911 lda $16,foo($29) !tlsldm!2
21912 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
21913 ldq $1,foo($29) !gotdtprel
21914 ldah $2,foo($29) !dtprelhi
21915 lda $3,foo($2) !dtprello
21916 lda $4,foo($29) !dtprel
21917 ldq $1,foo($29) !gottprel
21918 ldah $2,foo($29) !tprelhi
21919 lda $3,foo($2) !tprello
21920 lda $4,foo($29) !tprel'
21921 tls_first_major=2
21922 tls_first_minor=13
2f3321ca 21923 tls_as_opt=--fatal-warnings
6f9b006d 21924 ;;
ad9646c7
HPN
21925 cris-*-*|crisv32-*-*)
21926 conftest_s='
21927 .section ".tdata","awT",@progbits
21928x: .long 25
21929 .text
21930 move.d x:IE,$r10
21931 nop'
21932 tls_first_major=2
21933 tls_first_minor=20
21934 tls_as_opt=--fatal-warnings
21935 ;;
e4dd71de
AH
21936 frv*-*-*)
21937 conftest_s='
21938 .section ".tdata","awT",@progbits
21939x: .long 25
21940 .text
21941 call #gettlsoff(x)'
21942 tls_first_major=2
21943 tls_first_minor=14
21944 ;;
51076f96
RC
21945 hppa*-*-linux*)
21946 conftest_s='
21947t1: .reg %r20
21948t2: .reg %r21
21949gp: .reg %r19
21950 .section ".tdata","awT",@progbits
21951foo: .long 25
21952 .text
21953 .align 4
21954 addil LT%foo-$tls_gdidx$,gp
21955 ldo RT%foo-$tls_gdidx$(%r1),%arg0
21956 b __tls_get_addr
21957 nop
21958 addil LT%foo-$tls_ldidx$,gp
21959 b __tls_get_addr
21960 ldo RT%foo-$tls_ldidx$(%r1),%arg0
21961 addil LR%foo-$tls_dtpoff$,%ret0
21962 ldo RR%foo-$tls_dtpoff$(%r1),%t1
21963 mfctl %cr27,%t1
21964 addil LT%foo-$tls_ieoff$,gp
21965 ldw RT%foo-$tls_ieoff$(%r1),%t2
21966 add %t1,%t2,%t3
21967 mfctl %cr27,%t1
21968 addil LR%foo-$tls_leoff$,%t1
21969 ldo RR%foo-$tls_leoff$(%r1),%t2'
21970 tls_first_major=2
21971 tls_first_minor=15
21972 tls_as_opt=--fatal-warnings
21973 ;;
d3585b76
DJ
21974 arm*-*-*)
21975 conftest_s='
21976 .section ".tdata","awT",%progbits
21977foo: .long 25
21978 .text
21979.word foo(gottpoff)
21980.word foo(tpoff)
21981.word foo(tlsgd)
21982.word foo(tlsldm)
21983.word foo(tlsldo)'
21984 tls_first_major=2
21985 tls_first_minor=17
21986 ;;
f996902d
RH
21987 i[34567]86-*-*)
21988 conftest_s='
21989 .section ".tdata","awT",@progbits
21990foo: .long 25
21991 .text
21992 movl %gs:0, %eax
21993 leal foo@TLSGD(,%ebx,1), %eax
21994 leal foo@TLSLDM(%ebx), %eax
21995 leal foo@DTPOFF(%eax), %edx
21996 movl foo@GOTTPOFF(%ebx), %eax
21997 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
21998 addl foo@GOTNTPOFF(%ebx), %eax
21999 movl foo@INDNTPOFF, %eax
f996902d
RH
22000 movl $foo@TPOFF, %eax
22001 subl $foo@TPOFF, %eax
22002 leal foo@NTPOFF(%ecx), %eax'
22003 tls_first_major=2
75d38379 22004 tls_first_minor=14
2f3321ca 22005 tls_as_opt=--fatal-warnings
75d38379
JJ
22006 ;;
22007 x86_64-*-*)
22008 conftest_s='
22009 .section ".tdata","awT",@progbits
22010foo: .long 25
22011 .text
22012 movq %fs:0, %rax
22013 leaq foo@TLSGD(%rip), %rdi
22014 leaq foo@TLSLD(%rip), %rdi
22015 leaq foo@DTPOFF(%rax), %rdx
22016 movq foo@GOTTPOFF(%rip), %rax
22017 movq $foo@TPOFF, %rax'
22018 tls_first_major=2
22019 tls_first_minor=14
2f3321ca 22020 tls_as_opt=--fatal-warnings
f996902d 22021 ;;
7b6e506e
RH
22022 ia64-*-*)
22023 conftest_s='
22024 .section ".tdata","awT",@progbits
22025foo: data8 25
22026 .text
22027 addl r16 = @ltoff(@dtpmod(foo#)), gp
22028 addl r17 = @ltoff(@dtprel(foo#)), gp
22029 addl r18 = @ltoff(@tprel(foo#)), gp
22030 addl r19 = @dtprel(foo#), gp
22031 adds r21 = @dtprel(foo#), r13
22032 movl r23 = @dtprel(foo#)
22033 addl r20 = @tprel(foo#), gp
22034 adds r22 = @tprel(foo#), r13
22035 movl r24 = @tprel(foo#)'
22036 tls_first_major=2
22037 tls_first_minor=13
2f3321ca 22038 tls_as_opt=--fatal-warnings
7b6e506e 22039 ;;
69229b81
DJ
22040 mips*-*-*)
22041 conftest_s='
22042 .section .tdata,"awT",@progbits
22043x:
22044 .word 2
22045 .text
22046 addiu $4, $28, %tlsgd(x)
22047 addiu $4, $28, %tlsldm(x)
22048 lui $4, %dtprel_hi(x)
22049 addiu $4, $4, %dtprel_lo(x)
22050 lw $4, %gottprel(x)($28)
22051 lui $4, %tprel_hi(x)
22052 addiu $4, $4, %tprel_lo(x)'
22053 tls_first_major=2
22054 tls_first_minor=16
22055 tls_as_opt='-32 --fatal-warnings'
22056 ;;
75df395f
MK
22057 m68k-*-*)
22058 conftest_s='
22059 .section .tdata,"awT",@progbits
22060x:
22061 .word 2
22062 .text
22063foo:
22064 move.l x@TLSGD(%a5),%a0
22065 move.l x@TLSLDM(%a5),%a0
22066 move.l x@TLSLDO(%a5),%a0
22067 move.l x@TLSIE(%a5),%a0
22068 move.l x@TLSLE(%a5),%a0'
22069 tls_first_major=2
22070 tls_first_minor=19
22071 tls_as_opt='--fatal-warnings'
22072 ;;
c4501e62
JJ
22073 powerpc-*-*)
22074 conftest_s='
22075 .section ".tdata","awT",@progbits
22076 .align 2
22077ld0: .space 4
22078ld1: .space 4
22079x1: .space 4
22080x2: .space 4
22081x3: .space 4
22082 .text
22083 addi 3,31,ld0@got@tlsgd
22084 bl __tls_get_addr
22085 addi 3,31,x1@got@tlsld
22086 bl __tls_get_addr
22087 addi 9,3,x1@dtprel
22088 addis 9,3,x2@dtprel@ha
22089 addi 9,9,x2@dtprel@l
22090 lwz 9,x3@got@tprel(31)
22091 add 9,9,x@tls
22092 addi 9,2,x1@tprel
22093 addis 9,2,x2@tprel@ha
22094 addi 9,9,x2@tprel@l'
22095 tls_first_major=2
22096 tls_first_minor=14
2f3321ca 22097 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
22098 ;;
22099 powerpc64-*-*)
22100 conftest_s='
22101 .section ".tdata","awT",@progbits
22102 .align 3
22103ld0: .space 8
22104ld1: .space 8
22105x1: .space 8
22106x2: .space 8
22107x3: .space 8
22108 .text
22109 addi 3,2,ld0@got@tlsgd
22110 bl .__tls_get_addr
22111 nop
22112 addi 3,2,ld1@toc
22113 bl .__tls_get_addr
22114 nop
22115 addi 3,2,x1@got@tlsld
22116 bl .__tls_get_addr
22117 nop
22118 addi 9,3,x1@dtprel
22119 bl .__tls_get_addr
22120 nop
22121 addis 9,3,x2@dtprel@ha
22122 addi 9,9,x2@dtprel@l
22123 bl .__tls_get_addr
22124 nop
22125 ld 9,x3@got@dtprel(2)
22126 add 9,9,3
22127 bl .__tls_get_addr
22128 nop'
22129 tls_first_major=2
22130 tls_first_minor=14
2f3321ca 22131 tls_as_opt="-a64 --fatal-warnings"
c4501e62 22132 ;;
fd3cd001
UW
22133 s390-*-*)
22134 conftest_s='
22135 .section ".tdata","awT",@progbits
22136foo: .long 25
22137 .text
22138 .long foo@TLSGD
22139 .long foo@TLSLDM
22140 .long foo@DTPOFF
22141 .long foo@NTPOFF
22142 .long foo@GOTNTPOFF
22143 .long foo@INDNTPOFF
22144 l %r1,foo@GOTNTPOFF(%r12)
22145 l %r1,0(%r1):tls_load:foo
22146 bas %r14,0(%r1,%r13):tls_gdcall:foo
22147 bas %r14,0(%r1,%r13):tls_ldcall:foo'
22148 tls_first_major=2
22149 tls_first_minor=14
2f3321ca 22150 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
22151 ;;
22152 s390x-*-*)
22153 conftest_s='
22154 .section ".tdata","awT",@progbits
22155foo: .long 25
22156 .text
22157 .quad foo@TLSGD
22158 .quad foo@TLSLDM
22159 .quad foo@DTPOFF
22160 .quad foo@NTPOFF
22161 .quad foo@GOTNTPOFF
22162 lg %r1,foo@GOTNTPOFF(%r12)
22163 larl %r1,foo@INDNTPOFF
22164 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
22165 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
22166 tls_first_major=2
22167 tls_first_minor=14
2f3321ca 22168 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 22169 ;;
9ff13962
KK
22170 sh-*-* | sh[34]-*-*)
22171 conftest_s='
22172 .section ".tdata","awT",@progbits
22173foo: .long 25
22174 .text
22175 .long foo@TLSGD
22176 .long foo@TLSLDM
22177 .long foo@DTPOFF
22178 .long foo@GOTTPOFF
22179 .long foo@TPOFF'
22180 tls_first_major=2
22181 tls_first_minor=13
2f3321ca 22182 tls_as_opt=--fatal-warnings
9ff13962 22183 ;;
5751a10b 22184 sparc*-*-*)
2f3321ca 22185 case "$target" in
7935dc1b
EB
22186 sparc*-sun-solaris2.[56789]*)
22187 # TLS was introduced in the Solaris 9 4/04 release but
22188 # we do not enable it by default on Solaris 9 either.
22189 if test "x$enable_tls" = xyes ; then
22190 on_solaris=yes
22191 else
22192 enable_tls=no;
22193 fi
22194 ;;
2f3321ca
EB
22195 sparc*-sun-solaris2.*)
22196 on_solaris=yes
22197 ;;
22198 *)
22199 on_solaris=no
22200 ;;
22201 esac
22202 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22203 conftest_s='
22204 .section ".tdata",#alloc,#write,#tls
22205foo: .long 25
22206 .text
22207 sethi %tgd_hi22(foo), %o0
22208 add %o0, %tgd_lo10(foo), %o1
22209 add %l7, %o1, %o0, %tgd_add(foo)
22210 call __tls_get_addr, %tgd_call(foo)
22211 sethi %tldm_hi22(foo), %l1
22212 add %l1, %tldm_lo10(foo), %l2
22213 add %l7, %l2, %o0, %tldm_add(foo)
22214 call __tls_get_addr, %tldm_call(foo)
22215 sethi %tldo_hix22(foo), %l3
22216 xor %l3, %tldo_lox10(foo), %l4
22217 add %o0, %l4, %l5, %tldo_add(foo)
22218 sethi %tie_hi22(foo), %o3
22219 add %o3, %tie_lo10(foo), %o3
22220 ld [%l7 + %o3], %o2, %tie_ld(foo)
22221 add %g7, %o2, %o4, %tie_add(foo)
22222 sethi %tle_hix22(foo), %l1
22223 xor %l1, %tle_lox10(foo), %o5
22224 ld [%g7 + %o5], %o1'
22225 tls_first_major=0
22226 tls_first_minor=0
22227 else
22228 conftest_s='
5751a10b
JJ
22229 .section ".tdata","awT",@progbits
22230foo: .long 25
22231 .text
22232 sethi %tgd_hi22(foo), %o0
22233 add %o0, %tgd_lo10(foo), %o1
22234 add %l7, %o1, %o0, %tgd_add(foo)
22235 call __tls_get_addr, %tgd_call(foo)
22236 sethi %tldm_hi22(foo), %l1
22237 add %l1, %tldm_lo10(foo), %l2
22238 add %l7, %l2, %o0, %tldm_add(foo)
22239 call __tls_get_addr, %tldm_call(foo)
22240 sethi %tldo_hix22(foo), %l3
22241 xor %l3, %tldo_lox10(foo), %l4
22242 add %o0, %l4, %l5, %tldo_add(foo)
22243 sethi %tie_hi22(foo), %o3
22244 add %o3, %tie_lo10(foo), %o3
22245 ld [%l7 + %o3], %o2, %tie_ld(foo)
22246 add %g7, %o2, %o4, %tie_add(foo)
22247 sethi %tle_hix22(foo), %l1
22248 xor %l1, %tle_lox10(foo), %o5
22249 ld [%g7 + %o5], %o1'
22250 tls_first_major=2
22251 tls_first_minor=14
2f3321ca
EB
22252 tls_as_opt="-32 --fatal-warnings"
22253 fi
5751a10b 22254 ;;
6a7a462c
BW
22255 xtensa*-*-*)
22256 conftest_s='
22257 .section ".tdata","awT",@progbits
22258foo: .long 25
22259 .text
22260 movi a8, foo@TLSFUNC
22261 movi a10, foo@TLSARG
22262 callx8.tls a8, foo@TLSCALL'
22263 tls_first_major=2
22264 tls_first_minor=19
22265 ;;
f996902d 22266esac
8dea1cca
DD
22267set_have_as_tls=no
22268if test "x$enable_tls" = xno ; then
22269 : # TLS explicitly disabled.
22270elif test "x$enable_tls" = xyes ; then
22271 set_have_as_tls=yes # TLS explicitly enabled.
22272elif test -z "$tls_first_major"; then
8ada417f
ZW
22273 : # If we don't have a check, assume no support.
22274else
5213506e
RW
22275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for thread-local storage support" >&5
22276$as_echo_n "checking assembler for thread-local storage support... " >&6; }
22277if test "${gcc_cv_as_tls+set}" = set; then :
22278 $as_echo_n "(cached) " >&6
8ada417f
ZW
22279else
22280 gcc_cv_as_tls=no
22281 if test $in_tree_gas = yes; then
22282 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
22283 then gcc_cv_as_tls=yes
ad9c4d9f 22284fi
8ada417f 22285 elif test x$gcc_cv_as != x; then
6e3f3080 22286 echo "$conftest_s" > conftest.s
2f3321ca 22287 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
5213506e 22288 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22289 (eval $ac_try) 2>&5
22290 ac_status=$?
5213506e
RW
22291 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22292 test $ac_status = 0; }; }
8ada417f
ZW
22293 then
22294 gcc_cv_as_tls=yes
22295 else
22296 echo "configure: failed program was" >&5
22297 cat conftest.s >&5
22298 fi
22299 rm -f conftest.o conftest.s
f996902d 22300 fi
f996902d 22301fi
5213506e
RW
22302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_tls" >&5
22303$as_echo "$gcc_cv_as_tls" >&6; }
63cf211a 22304if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
22305 set_have_as_tls=yes
22306fi
22307fi
22308if test $set_have_as_tls = yes ; then
ba479fd2 22309
5213506e 22310$as_echo "#define HAVE_AS_TLS 1" >>confdefs.h
f996902d 22311
8ada417f
ZW
22312fi
22313
22314# Target-specific assembler checks.
f996902d 22315
5213506e
RW
22316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker -Bstatic/-Bdynamic option" >&5
22317$as_echo_n "checking linker -Bstatic/-Bdynamic option... " >&6; }
7e9d8517
L
22318gcc_cv_ld_static_dynamic=no
22319if test $in_tree_ld = yes ; then
83f0ccb8 22320 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2; then
7e9d8517
L
22321 gcc_cv_ld_static_dynamic=yes
22322 fi
22323elif test x$gcc_cv_ld != x; then
22324 # Check if linker supports -Bstatic/-Bdynamic option
22325 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
22326 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
22327 gcc_cv_ld_static_dynamic=yes
22328 fi
22329fi
22330if test x"$gcc_cv_ld_static_dynamic" = xyes; then
22331
5213506e 22332$as_echo "#define HAVE_LD_STATIC_DYNAMIC 1" >>confdefs.h
7e9d8517
L
22333
22334fi
5213506e
RW
22335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_static_dynamic" >&5
22336$as_echo "$gcc_cv_ld_static_dynamic" >&6; }
7e9d8517 22337
d594623a 22338if test x"$demangler_in_ld" = xyes; then
5213506e
RW
22339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --demangle support" >&5
22340$as_echo_n "checking linker --demangle support... " >&6; }
d594623a
L
22341 gcc_cv_ld_demangle=no
22342 if test $in_tree_ld = yes; then
22343 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 \
22344 gcc_cv_ld_demangle=yes
22345 fi
22346 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
22347 # Check if the GNU linker supports --demangle option
22348 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
22349 gcc_cv_ld_demangle=yes
22350 fi
22351 fi
22352 if test x"$gcc_cv_ld_demangle" = xyes; then
22353
5213506e 22354$as_echo "#define HAVE_LD_DEMANGLE 1" >>confdefs.h
d594623a
L
22355
22356 fi
5213506e
RW
22357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_demangle" >&5
22358$as_echo "$gcc_cv_ld_demangle" >&6; }
d594623a
L
22359fi
22360
3a37b08e
RH
22361case "$target" in
22362 # All TARGET_ABI_OSF targets.
22363 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
5213506e
RW
22364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
22365$as_echo_n "checking assembler for explicit relocation support... " >&6; }
22366if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then :
22367 $as_echo_n "(cached) " >&6
3a37b08e 22368else
8ada417f
ZW
22369 gcc_cv_as_alpha_explicit_relocs=no
22370 if test $in_tree_gas = yes; then
22371 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
22372 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 22373fi
8ada417f 22374 elif test x$gcc_cv_as != x; then
6e3f3080 22375 echo ' .set nomacro
3a37b08e
RH
22376 .text
22377 extbl $3, $2, $3 !lituse_bytoff!1
22378 ldq $2, a($29) !literal!1
22379 ldq $4, b($29) !literal!2
22380 ldq_u $3, 0($2) !lituse_base!1
22381 ldq $27, f($29) !literal!5
22382 jsr $26, ($27), f !lituse_jsr!5
22383 ldah $29, 0($26) !gpdisp!3
22384 lda $0, c($29) !gprel
22385 ldah $1, d($29) !gprelhigh
22386 lda $1, d($1) !gprellow
8ada417f 22387 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2 22388 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22389 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22390 (eval $ac_try) 2>&5
22391 ac_status=$?
5213506e
RW
22392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22393 test $ac_status = 0; }; }
8ada417f
ZW
22394 then
22395 gcc_cv_as_alpha_explicit_relocs=yes
22396 else
22397 echo "configure: failed program was" >&5
22398 cat conftest.s >&5
22399 fi
22400 rm -f conftest.o conftest.s
22401 fi
cafe096b 22402fi
5213506e
RW
22403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_explicit_relocs" >&5
22404$as_echo "$gcc_cv_as_alpha_explicit_relocs" >&6; }
63cf211a 22405if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2 22406
5213506e 22407$as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h
3a37b08e 22408
d006f5eb 22409fi
5213506e
RW
22410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5
22411$as_echo_n "checking assembler for jsrdirect relocation support... " >&6; }
22412if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then :
22413 $as_echo_n "(cached) " >&6
d006f5eb
RH
22414else
22415 gcc_cv_as_alpha_jsrdirect_relocs=no
22416 if test $in_tree_gas = yes; then
22417 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
22418 then gcc_cv_as_alpha_jsrdirect_relocs=yes
22419fi
22420 elif test x$gcc_cv_as != x; then
22421 echo ' .set nomacro
22422 .text
22423 ldq $27, a($29) !literal!1
22424 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
22425 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22426 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d006f5eb
RH
22427 (eval $ac_try) 2>&5
22428 ac_status=$?
5213506e
RW
22429 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22430 test $ac_status = 0; }; }
d006f5eb
RH
22431 then
22432 gcc_cv_as_alpha_jsrdirect_relocs=yes
22433 else
22434 echo "configure: failed program was" >&5
22435 cat conftest.s >&5
22436 fi
22437 rm -f conftest.o conftest.s
22438 fi
22439fi
5213506e
RW
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
22441$as_echo "$gcc_cv_as_alpha_jsrdirect_relocs" >&6; }
d006f5eb
RH
22442if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
22443
5213506e 22444$as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h
d006f5eb 22445
86da66b5
HPN
22446fi
22447 ;;
22448
22449 cris-*-*)
5213506e
RW
22450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -no-mul-bug-abort option" >&5
22451$as_echo_n "checking assembler for -no-mul-bug-abort option... " >&6; }
22452if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then :
22453 $as_echo_n "(cached) " >&6
86da66b5
HPN
22454else
22455 gcc_cv_as_cris_no_mul_bug=no
22456 if test $in_tree_gas = yes; then
22457 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
22458 then gcc_cv_as_cris_no_mul_bug=yes
22459fi
22460 elif test x$gcc_cv_as != x; then
22461 echo '.text' > conftest.s
22462 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
5213506e 22463 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
86da66b5
HPN
22464 (eval $ac_try) 2>&5
22465 ac_status=$?
5213506e
RW
22466 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22467 test $ac_status = 0; }; }
86da66b5
HPN
22468 then
22469 gcc_cv_as_cris_no_mul_bug=yes
22470 else
22471 echo "configure: failed program was" >&5
22472 cat conftest.s >&5
22473 fi
22474 rm -f conftest.o conftest.s
22475 fi
22476fi
5213506e
RW
22477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cris_no_mul_bug" >&5
22478$as_echo "$gcc_cv_as_cris_no_mul_bug" >&6; }
86da66b5
HPN
22479if test $gcc_cv_as_cris_no_mul_bug = yes; then
22480
5213506e 22481$as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h
86da66b5 22482
8ada417f 22483fi
3a37b08e 22484 ;;
8ada417f 22485
1cb36a98 22486 sparc*-*-*)
5213506e
RW
22487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .register" >&5
22488$as_echo_n "checking assembler for .register... " >&6; }
22489if test "${gcc_cv_as_sparc_register_op+set}" = set; then :
22490 $as_echo_n "(cached) " >&6
5b68c389 22491else
8ada417f
ZW
22492 gcc_cv_as_sparc_register_op=no
22493 if test x$gcc_cv_as != x; then
6e3f3080 22494 echo '.register %g2, #scratch' > conftest.s
ba479fd2 22495 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22496 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22497 (eval $ac_try) 2>&5
22498 ac_status=$?
5213506e
RW
22499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22500 test $ac_status = 0; }; }
8ada417f
ZW
22501 then
22502 gcc_cv_as_sparc_register_op=yes
22503 else
22504 echo "configure: failed program was" >&5
22505 cat conftest.s >&5
22506 fi
22507 rm -f conftest.o conftest.s
22508 fi
cafe096b 22509fi
5213506e
RW
22510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_register_op" >&5
22511$as_echo "$gcc_cv_as_sparc_register_op" >&6; }
63cf211a 22512if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2 22513
5213506e 22514$as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
1cb36a98 22515
8ada417f 22516fi
1cb36a98 22517
5213506e
RW
22518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5
22519$as_echo_n "checking assembler for -relax option... " >&6; }
22520if test "${gcc_cv_as_sparc_relax+set}" = set; then :
22521 $as_echo_n "(cached) " >&6
e95b1e6a 22522else
8ada417f
ZW
22523 gcc_cv_as_sparc_relax=no
22524 if test x$gcc_cv_as != x; then
6e3f3080 22525 echo '.text' > conftest.s
ba479fd2 22526 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
5213506e 22527 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22528 (eval $ac_try) 2>&5
22529 ac_status=$?
5213506e
RW
22530 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22531 test $ac_status = 0; }; }
8ada417f
ZW
22532 then
22533 gcc_cv_as_sparc_relax=yes
22534 else
22535 echo "configure: failed program was" >&5
22536 cat conftest.s >&5
22537 fi
22538 rm -f conftest.o conftest.s
22539 fi
cafe096b 22540fi
5213506e
RW
22541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_relax" >&5
22542$as_echo "$gcc_cv_as_sparc_relax" >&6; }
63cf211a 22543if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2 22544
5213506e 22545$as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h
e95b1e6a 22546
8ada417f 22547fi
e95b1e6a 22548
5213506e
RW
22549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5
22550$as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; }
22551if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then :
22552 $as_echo_n "(cached) " >&6
17e9e88c 22553else
8ada417f
ZW
22554 gcc_cv_as_sparc_ua_pcrel=no
22555 if test x$gcc_cv_as != x; then
6e3f3080 22556 echo '.text
8ada417f
ZW
22557foo:
22558 nop
22559.data
22560.align 4
22561.byte 0
22562.uaword %r_disp32(foo)' > conftest.s
ba479fd2 22563 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
5213506e 22564 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22565 (eval $ac_try) 2>&5
22566 ac_status=$?
5213506e
RW
22567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22568 test $ac_status = 0; }; }
8ada417f
ZW
22569 then
22570 if test x$gcc_cv_ld != x \
22571 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22572 gcc_cv_as_sparc_ua_pcrel=yes
22573 fi
22574 rm -f conftest
22575 else
22576 echo "configure: failed program was" >&5
22577 cat conftest.s >&5
22578 fi
22579 rm -f conftest.o conftest.s
22580 fi
cafe096b 22581fi
5213506e
RW
22582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel" >&5
22583$as_echo "$gcc_cv_as_sparc_ua_pcrel" >&6; }
63cf211a 22584if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2 22585
5213506e 22586$as_echo "#define HAVE_AS_SPARC_UA_PCREL 1" >>confdefs.h
17e9e88c 22587
17e9e88c 22588
5213506e
RW
22589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
22590$as_echo_n "checking assembler for unaligned pcrel relocs against hidden symbols... " >&6; }
22591if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then :
22592 $as_echo_n "(cached) " >&6
cf7b8b0d 22593else
8ada417f
ZW
22594 gcc_cv_as_sparc_ua_pcrel_hidden=no
22595 if test x$gcc_cv_as != x; then
6e3f3080 22596 echo '.data
8ada417f
ZW
22597.align 4
22598.byte 0x31
22599.uaword %r_disp32(foo)
22600.byte 0x32, 0x33, 0x34
22601.global foo
22602.hidden foo
22603foo:
22604.skip 4' > conftest.s
ba479fd2 22605 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
5213506e 22606 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22607 (eval $ac_try) 2>&5
22608 ac_status=$?
5213506e
RW
22609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22610 test $ac_status = 0; }; }
8ada417f
ZW
22611 then
22612 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
22613 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
22614 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
22615 | grep ' 31000000 07323334' > /dev/null 2>&1; then
22616 if $gcc_cv_objdump -R conftest 2> /dev/null \
22617 | grep 'DISP32' > /dev/null 2>&1; then
22618 :
22619 else
22620 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 22621 fi
8ada417f
ZW
22622 fi
22623 rm -f conftest
22624 else
22625 echo "configure: failed program was" >&5
22626 cat conftest.s >&5
22627 fi
22628 rm -f conftest.o conftest.s
22629 fi
cafe096b 22630fi
5213506e
RW
22631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
22632$as_echo "$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; }
63cf211a 22633if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2 22634
5213506e 22635$as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h
cf7b8b0d 22636
8ada417f 22637fi
ba479fd2 22638
8ada417f 22639fi # unaligned pcrel relocs
cf7b8b0d 22640
5213506e
RW
22641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5
22642$as_echo_n "checking assembler for offsetable %lo()... " >&6; }
22643if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then :
22644 $as_echo_n "(cached) " >&6
5b68c389 22645else
8ada417f
ZW
22646 gcc_cv_as_sparc_offsetable_lo10=no
22647 if test x$gcc_cv_as != x; then
6e3f3080 22648 echo '.text
8ada417f
ZW
22649 or %g1, %lo(ab) + 12, %g1
22650 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2 22651 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
5213506e 22652 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22653 (eval $ac_try) 2>&5
22654 ac_status=$?
5213506e
RW
22655 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22656 test $ac_status = 0; }; }
8ada417f
ZW
22657 then
22658 if test x$gcc_cv_objdump != x \
ecb0ccbc 22659 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 22660 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 22661 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
22662 fi
22663 else
22664 echo "configure: failed program was" >&5
22665 cat conftest.s >&5
22666 fi
22667 rm -f conftest.o conftest.s
22668 fi
cafe096b 22669fi
5213506e
RW
22670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
22671$as_echo "$gcc_cv_as_sparc_offsetable_lo10" >&6; }
63cf211a 22672if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2 22673
5213506e 22674$as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h
1cb36a98 22675
8ada417f 22676fi
1cb36a98
RH
22677 ;;
22678
c307e6dd 22679 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
22680 case $target_os in
22681 cygwin* | pe | mingw32*)
233215fe
DK
22682 # Recent binutils allows the three-operand form of ".comm" on PE. This
22683 # definition is used unconditionally to initialise the default state of
22684 # the target option variable that governs usage of the feature.
5213506e
RW
22685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .comm with alignment" >&5
22686$as_echo_n "checking assembler for .comm with alignment... " >&6; }
22687if test "${gcc_cv_as_comm_has_align+set}" = set; then :
22688 $as_echo_n "(cached) " >&6
233215fe
DK
22689else
22690 gcc_cv_as_comm_has_align=no
22691 if test $in_tree_gas = yes; then
22692 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
22693 then gcc_cv_as_comm_has_align=yes
22694fi
22695 elif test x$gcc_cv_as != x; then
22696 echo '.comm foo,1,32' > conftest.s
22697 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22698 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
233215fe
DK
22699 (eval $ac_try) 2>&5
22700 ac_status=$?
5213506e
RW
22701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22702 test $ac_status = 0; }; }
233215fe
DK
22703 then
22704 gcc_cv_as_comm_has_align=yes
22705 else
22706 echo "configure: failed program was" >&5
22707 cat conftest.s >&5
22708 fi
22709 rm -f conftest.o conftest.s
22710 fi
22711fi
5213506e
RW
22712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comm_has_align" >&5
22713$as_echo "$gcc_cv_as_comm_has_align" >&6; }
233215fe
DK
22714
22715
22716cat >>confdefs.h <<_ACEOF
22717#define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi`
22718_ACEOF
22719
d38bc601 22720 # Used for DWARF 2 in PE
5213506e
RW
22721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .secrel32 relocs" >&5
22722$as_echo_n "checking assembler for .secrel32 relocs... " >&6; }
22723if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then :
22724 $as_echo_n "(cached) " >&6
d38bc601
BF
22725else
22726 gcc_cv_as_ix86_pe_secrel32=no
22727 if test $in_tree_gas = yes; then
22728 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
22729 then gcc_cv_as_ix86_pe_secrel32=yes
22730fi
22731 elif test x$gcc_cv_as != x; then
22732 echo '.text
22733foo: nop
22734.data
22735 .secrel32 foo' > conftest.s
22736 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22737 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d38bc601
BF
22738 (eval $ac_try) 2>&5
22739 ac_status=$?
5213506e
RW
22740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22741 test $ac_status = 0; }; }
d38bc601
BF
22742 then
22743 if test x$gcc_cv_ld != x \
22744 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
22745 gcc_cv_as_ix86_pe_secrel32=yes
22746 fi
22747 rm -f conftest
22748 else
22749 echo "configure: failed program was" >&5
22750 cat conftest.s >&5
22751 fi
22752 rm -f conftest.o conftest.s
22753 fi
22754fi
5213506e
RW
22755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_pe_secrel32" >&5
22756$as_echo "$gcc_cv_as_ix86_pe_secrel32" >&6; }
d38bc601
BF
22757if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
22758
5213506e 22759$as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h
d38bc601
BF
22760
22761fi
22762 ;;
22763 esac
22764
5213506e
RW
22765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5
22766$as_echo_n "checking assembler for filds and fists mnemonics... " >&6; }
22767if test "${gcc_cv_as_ix86_filds+set}" = set; then :
22768 $as_echo_n "(cached) " >&6
8ada417f 22769else
a3a5e3d1
UB
22770 gcc_cv_as_ix86_filds=no
22771 if test x$gcc_cv_as != x; then
6e3f3080 22772 echo 'filds mem; fists mem' > conftest.s
ba479fd2 22773 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22774 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22775 (eval $ac_try) 2>&5
22776 ac_status=$?
5213506e
RW
22777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22778 test $ac_status = 0; }; }
8ada417f 22779 then
a3a5e3d1
UB
22780 gcc_cv_as_ix86_filds=yes
22781 else
22782 echo "configure: failed program was" >&5
22783 cat conftest.s >&5
22784 fi
22785 rm -f conftest.o conftest.s
22786 fi
22787fi
5213506e
RW
22788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_filds" >&5
22789$as_echo "$gcc_cv_as_ix86_filds" >&6; }
a3a5e3d1
UB
22790if test $gcc_cv_as_ix86_filds = yes; then
22791
5213506e 22792$as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h
a3a5e3d1
UB
22793
22794fi
22795
5213506e
RW
22796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5
22797$as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; }
22798if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
22799 $as_echo_n "(cached) " >&6
a3a5e3d1
UB
22800else
22801 gcc_cv_as_ix86_fildq=no
22802 if test x$gcc_cv_as != x; then
22803 echo 'fildq mem; fistpq mem' > conftest.s
22804 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22805 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a3a5e3d1
UB
22806 (eval $ac_try) 2>&5
22807 ac_status=$?
5213506e
RW
22808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22809 test $ac_status = 0; }; }
a3a5e3d1
UB
22810 then
22811 gcc_cv_as_ix86_fildq=yes
8ada417f
ZW
22812 else
22813 echo "configure: failed program was" >&5
22814 cat conftest.s >&5
981d4858 22815 fi
8ada417f
ZW
22816 rm -f conftest.o conftest.s
22817 fi
22818fi
5213506e
RW
22819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_fildq" >&5
22820$as_echo "$gcc_cv_as_ix86_fildq" >&6; }
a3a5e3d1 22821if test $gcc_cv_as_ix86_fildq = yes; then
ba479fd2 22822
5213506e 22823$as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h
ad9c4d9f 22824
f6f5dff2
RO
22825fi
22826
5213506e
RW
22827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5
22828$as_echo_n "checking assembler for cmov syntax... " >&6; }
22829if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then :
22830 $as_echo_n "(cached) " >&6
f6f5dff2
RO
22831else
22832 gcc_cv_as_ix86_cmov_sun_syntax=no
22833 if test x$gcc_cv_as != x; then
6e3f3080 22834 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2 22835 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22836 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22837 (eval $ac_try) 2>&5
22838 ac_status=$?
5213506e
RW
22839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22840 test $ac_status = 0; }; }
f6f5dff2
RO
22841 then
22842 gcc_cv_as_ix86_cmov_sun_syntax=yes
22843 else
22844 echo "configure: failed program was" >&5
22845 cat conftest.s >&5
22846 fi
22847 rm -f conftest.o conftest.s
22848 fi
22849fi
5213506e
RW
22850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
22851$as_echo "$gcc_cv_as_ix86_cmov_sun_syntax" >&6; }
63cf211a 22852if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2 22853
5213506e 22854$as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h
f6f5dff2 22855
b6c03bcd
RS
22856fi
22857
5213506e
RW
22858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5
22859$as_echo_n "checking assembler for ffreep mnemonic... " >&6; }
22860if test "${gcc_cv_as_ix86_ffreep+set}" = set; then :
22861 $as_echo_n "(cached) " >&6
b6c03bcd
RS
22862else
22863 gcc_cv_as_ix86_ffreep=no
22864 if test x$gcc_cv_as != x; then
22865 echo 'ffreep %st(1)' > conftest.s
22866 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22867 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b6c03bcd
RS
22868 (eval $ac_try) 2>&5
22869 ac_status=$?
5213506e
RW
22870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22871 test $ac_status = 0; }; }
b6c03bcd
RS
22872 then
22873 gcc_cv_as_ix86_ffreep=yes
22874 else
22875 echo "configure: failed program was" >&5
22876 cat conftest.s >&5
22877 fi
22878 rm -f conftest.o conftest.s
22879 fi
22880fi
5213506e
RW
22881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_ffreep" >&5
22882$as_echo "$gcc_cv_as_ix86_ffreep" >&6; }
b6c03bcd
RS
22883if test $gcc_cv_as_ix86_ffreep = yes; then
22884
5213506e 22885$as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h
b6c03bcd 22886
38ca3765
UB
22887fi
22888
5213506e
RW
22889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5
22890$as_echo_n "checking assembler for sahf mnemonic... " >&6; }
22891if test "${gcc_cv_as_ix86_sahf+set}" = set; then :
22892 $as_echo_n "(cached) " >&6
38ca3765
UB
22893else
22894 gcc_cv_as_ix86_sahf=no
22895 if test x$gcc_cv_as != x; then
22896 echo 'sahf' > conftest.s
22897 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22898 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
38ca3765
UB
22899 (eval $ac_try) 2>&5
22900 ac_status=$?
5213506e
RW
22901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22902 test $ac_status = 0; }; }
38ca3765
UB
22903 then
22904 gcc_cv_as_ix86_sahf=yes
22905 else
22906 echo "configure: failed program was" >&5
22907 cat conftest.s >&5
22908 fi
22909 rm -f conftest.o conftest.s
22910 fi
22911fi
5213506e
RW
22912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_sahf" >&5
22913$as_echo "$gcc_cv_as_ix86_sahf" >&6; }
38ca3765
UB
22914if test $gcc_cv_as_ix86_sahf = yes; then
22915
5213506e 22916$as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h
38ca3765 22917
68b92f78
RS
22918fi
22919
5213506e
RW
22920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5
22921$as_echo_n "checking assembler for different section symbol subtraction... " >&6; }
22922if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then :
22923 $as_echo_n "(cached) " >&6
68b92f78
RS
22924else
22925 gcc_cv_as_ix86_diff_sect_delta=no
22926 if test x$gcc_cv_as != x; then
22927 echo '.section .rodata
22928.L1:
22929 .long .L2-.L1
22930 .long .L3-.L1
22931 .text
22932.L3: nop
22933.L2: nop' > conftest.s
22934 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22935 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
68b92f78
RS
22936 (eval $ac_try) 2>&5
22937 ac_status=$?
5213506e
RW
22938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22939 test $ac_status = 0; }; }
68b92f78
RS
22940 then
22941 gcc_cv_as_ix86_diff_sect_delta=yes
22942 else
22943 echo "configure: failed program was" >&5
22944 cat conftest.s >&5
22945 fi
22946 rm -f conftest.o conftest.s
22947 fi
22948fi
5213506e
RW
22949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
22950$as_echo "$gcc_cv_as_ix86_diff_sect_delta" >&6; }
68b92f78
RS
22951if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
22952
5213506e 22953$as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h
68b92f78 22954
ad9c4d9f
NN
22955fi
22956
6f3ca281
ZW
22957 # This one is used unconditionally by i386.[ch]; it is to be defined
22958 # to 1 if the feature is present, 0 otherwise.
5213506e
RW
22959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5
22960$as_echo_n "checking assembler for GOTOFF in data... " >&6; }
22961if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then :
22962 $as_echo_n "(cached) " >&6
8ada417f
ZW
22963else
22964 gcc_cv_as_ix86_gotoff_in_data=no
22965 if test $in_tree_gas = yes; then
22966 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22967 then gcc_cv_as_ix86_gotoff_in_data=yes
22968fi
22969 elif test x$gcc_cv_as != x; then
6e3f3080 22970 echo ' .text
f88c65f7
RH
22971.L0:
22972 nop
22973 .data
8ada417f 22974 .long .L0@GOTOFF' > conftest.s
ba479fd2 22975 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 22976 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22977 (eval $ac_try) 2>&5
22978 ac_status=$?
5213506e
RW
22979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22980 test $ac_status = 0; }; }
8ada417f
ZW
22981 then
22982 gcc_cv_as_ix86_gotoff_in_data=yes
22983 else
22984 echo "configure: failed program was" >&5
22985 cat conftest.s >&5
f88c65f7 22986 fi
8ada417f
ZW
22987 rm -f conftest.o conftest.s
22988 fi
22989fi
5213506e
RW
22990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
22991$as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; }
8ada417f 22992
6f3ca281 22993
ba479fd2 22994cat >>confdefs.h <<_ACEOF
6f3ca281 22995#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 22996_ACEOF
f88c65f7 22997
1cb36a98 22998 ;;
ef1ecf87
RH
22999
23000 ia64*-*-*)
5213506e
RW
23001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ltoffx and ldxmov relocs" >&5
23002$as_echo_n "checking assembler for ltoffx and ldxmov relocs... " >&6; }
23003if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then :
23004 $as_echo_n "(cached) " >&6
ef1ecf87 23005else
8ada417f
ZW
23006 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
23007 if test $in_tree_gas = yes; then
23008 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23009 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 23010fi
8ada417f 23011 elif test x$gcc_cv_as != x; then
6e3f3080 23012 echo ' .text
ef1ecf87
RH
23013 addl r15 = @ltoffx(x#), gp
23014 ;;
cfa9ee99 23015 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2 23016 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23017 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23018 (eval $ac_try) 2>&5
23019 ac_status=$?
5213506e
RW
23020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23021 test $ac_status = 0; }; }
8ada417f 23022 then
cfa9ee99 23023 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
23024 else
23025 echo "configure: failed program was" >&5
23026 cat conftest.s >&5
2c4a9cff 23027 fi
8ada417f
ZW
23028 rm -f conftest.o conftest.s
23029 fi
23030fi
5213506e
RW
23031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
23032$as_echo "$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; }
63cf211a 23033if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2 23034
5213506e 23035$as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h
8ada417f 23036
cfa9ee99 23037fi
8ada417f 23038
2c4a9cff 23039 ;;
8ada417f 23040
2c4a9cff 23041 powerpc*-*-*)
8ada417f 23042 case $target in
432218ba
DE
23043 *-*-aix*) conftest_s=' .machine "pwr5"
23044 .csect .text[PR]
6b37db3c 23045 mfcr 3,128';;
8af4d362 23046 *-*-darwin*)
5213506e
RW
23047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine directive support" >&5
23048$as_echo_n "checking assembler for .machine directive support... " >&6; }
23049if test "${gcc_cv_as_machine_directive+set}" = set; then :
23050 $as_echo_n "(cached) " >&6
8af4d362
PB
23051else
23052 gcc_cv_as_machine_directive=no
23053 if test x$gcc_cv_as != x; then
23054 echo ' .machine ppc7400' > conftest.s
23055 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23056 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8af4d362
PB
23057 (eval $ac_try) 2>&5
23058 ac_status=$?
5213506e
RW
23059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23060 test $ac_status = 0; }; }
8af4d362
PB
23061 then
23062 gcc_cv_as_machine_directive=yes
23063 else
23064 echo "configure: failed program was" >&5
23065 cat conftest.s >&5
23066 fi
23067 rm -f conftest.o conftest.s
23068 fi
23069fi
5213506e
RW
23070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5
23071$as_echo "$gcc_cv_as_machine_directive" >&6; }
8af4d362
PB
23072
23073 if test x$gcc_cv_as_machine_directive != xyes; then
23074 echo "*** This target requires an assembler supporting \".machine\"" >&2
23075 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
23076 test x$build = x$target && exit 1
23077 fi
23078 conftest_s=' .text
6b37db3c 23079 mfcr r3,128';;
4c67db14 23080 *) conftest_s=' .machine power4
d2ab3e37 23081 .text
6b37db3c 23082 mfcr 3,128';;
8ada417f 23083 esac
8ada417f 23084
5213506e
RW
23085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for mfcr field support" >&5
23086$as_echo_n "checking assembler for mfcr field support... " >&6; }
23087if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then :
23088 $as_echo_n "(cached) " >&6
2c4a9cff 23089else
8ada417f
ZW
23090 gcc_cv_as_powerpc_mfcrf=no
23091 if test $in_tree_gas = yes; then
23092 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23093 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 23094fi
8ada417f 23095 elif test x$gcc_cv_as != x; then
6e3f3080 23096 echo "$conftest_s" > conftest.s
ba479fd2 23097 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23098 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23099 (eval $ac_try) 2>&5
23100 ac_status=$?
5213506e
RW
23101 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23102 test $ac_status = 0; }; }
8ada417f
ZW
23103 then
23104 gcc_cv_as_powerpc_mfcrf=yes
23105 else
23106 echo "configure: failed program was" >&5
23107 cat conftest.s >&5
23108 fi
23109 rm -f conftest.o conftest.s
23110 fi
2c4a9cff 23111fi
5213506e
RW
23112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfcrf" >&5
23113$as_echo "$gcc_cv_as_powerpc_mfcrf" >&6; }
63cf211a 23114if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2 23115
5213506e 23116$as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h
ef1ecf87 23117
8ada417f 23118fi
432218ba
DE
23119
23120 case $target in
23121 *-*-aix*) conftest_s=' .machine "pwr5"
23122 .csect .text[PR]
23123 popcntb 3,3';;
23124 *) conftest_s=' .machine power5
23125 .text
23126 popcntb 3,3';;
23127 esac
23128
5213506e
RW
23129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntb support" >&5
23130$as_echo_n "checking assembler for popcntb support... " >&6; }
23131if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then :
23132 $as_echo_n "(cached) " >&6
432218ba
DE
23133else
23134 gcc_cv_as_powerpc_popcntb=no
23135 if test $in_tree_gas = yes; then
23136 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23137 then gcc_cv_as_powerpc_popcntb=yes
23138fi
23139 elif test x$gcc_cv_as != x; then
23140 echo "$conftest_s" > conftest.s
23141 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23142 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
432218ba
DE
23143 (eval $ac_try) 2>&5
23144 ac_status=$?
5213506e
RW
23145 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23146 test $ac_status = 0; }; }
432218ba
DE
23147 then
23148 gcc_cv_as_powerpc_popcntb=yes
23149 else
23150 echo "configure: failed program was" >&5
23151 cat conftest.s >&5
23152 fi
23153 rm -f conftest.o conftest.s
23154 fi
23155fi
5213506e
RW
23156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntb" >&5
23157$as_echo "$gcc_cv_as_powerpc_popcntb" >&6; }
432218ba
DE
23158if test $gcc_cv_as_powerpc_popcntb = yes; then
23159
5213506e 23160$as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h
432218ba 23161
9719f3b7
DE
23162fi
23163
23164 case $target in
23165 *-*-aix*) conftest_s=' .machine "pwr5x"
23166 .csect .text[PR]
23167 frin 1,1';;
1e04bfdc 23168 *) conftest_s=' .machine power5
9719f3b7
DE
23169 .text
23170 frin 1,1';;
23171 esac
23172
5213506e
RW
23173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fp round support" >&5
23174$as_echo_n "checking assembler for fp round support... " >&6; }
23175if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then :
23176 $as_echo_n "(cached) " >&6
9719f3b7
DE
23177else
23178 gcc_cv_as_powerpc_fprnd=no
23179 if test $in_tree_gas = yes; then
23180 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23181 then gcc_cv_as_powerpc_fprnd=yes
23182fi
23183 elif test x$gcc_cv_as != x; then
23184 echo "$conftest_s" > conftest.s
23185 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23186 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9719f3b7
DE
23187 (eval $ac_try) 2>&5
23188 ac_status=$?
5213506e
RW
23189 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23190 test $ac_status = 0; }; }
9719f3b7
DE
23191 then
23192 gcc_cv_as_powerpc_fprnd=yes
23193 else
23194 echo "configure: failed program was" >&5
23195 cat conftest.s >&5
23196 fi
23197 rm -f conftest.o conftest.s
23198 fi
23199fi
5213506e
RW
23200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_fprnd" >&5
23201$as_echo "$gcc_cv_as_powerpc_fprnd" >&6; }
9719f3b7
DE
23202if test $gcc_cv_as_powerpc_fprnd = yes; then
23203
5213506e 23204$as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h
9719f3b7 23205
44cd321e
PS
23206fi
23207
23208 case $target in
23209 *-*-aix*) conftest_s=' .machine "pwr6"
23210 .csect .text[PR]
23211 mffgpr 1,3';;
23212 *) conftest_s=' .machine power6
23213 .text
23214 mffgpr 1,3';;
23215 esac
23216
5213506e
RW
23217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for move fp gpr support" >&5
23218$as_echo_n "checking assembler for move fp gpr support... " >&6; }
23219if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then :
23220 $as_echo_n "(cached) " >&6
44cd321e
PS
23221else
23222 gcc_cv_as_powerpc_mfpgpr=no
23223 if test $in_tree_gas = yes; then
cacf1ca8 23224 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
44cd321e
PS
23225 then gcc_cv_as_powerpc_mfpgpr=yes
23226fi
23227 elif test x$gcc_cv_as != x; then
23228 echo "$conftest_s" > conftest.s
23229 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23230 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
44cd321e
PS
23231 (eval $ac_try) 2>&5
23232 ac_status=$?
5213506e
RW
23233 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23234 test $ac_status = 0; }; }
44cd321e
PS
23235 then
23236 gcc_cv_as_powerpc_mfpgpr=yes
23237 else
23238 echo "configure: failed program was" >&5
23239 cat conftest.s >&5
23240 fi
23241 rm -f conftest.o conftest.s
23242 fi
23243fi
5213506e
RW
23244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfpgpr" >&5
23245$as_echo "$gcc_cv_as_powerpc_mfpgpr" >&6; }
44cd321e
PS
23246if test $gcc_cv_as_powerpc_mfpgpr = yes; then
23247
5213506e 23248$as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h
44cd321e 23249
432218ba
DE
23250fi
23251
7f970b70
AM
23252 case $target in
23253 *-*-aix*) conftest_s=' .csect .text[PR]
23254LCF..0:
23255 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
23256 *-*-darwin*)
23257 conftest_s=' .text
23258LCF0:
23259 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
23260 *) conftest_s=' .text
23261.LCF0:
23262 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
23263 esac
23264
5213506e
RW
23265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rel16 relocs" >&5
23266$as_echo_n "checking assembler for rel16 relocs... " >&6; }
23267if test "${gcc_cv_as_powerpc_rel16+set}" = set; then :
23268 $as_echo_n "(cached) " >&6
695d8830
AS
23269else
23270 gcc_cv_as_powerpc_rel16=no
23271 if test $in_tree_gas = yes; then
23272 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23273 then gcc_cv_as_powerpc_rel16=yes
23274fi
23275 elif test x$gcc_cv_as != x; then
23276 echo "$conftest_s" > conftest.s
23277 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
5213506e 23278 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
695d8830
AS
23279 (eval $ac_try) 2>&5
23280 ac_status=$?
5213506e
RW
23281 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23282 test $ac_status = 0; }; }
695d8830
AS
23283 then
23284 gcc_cv_as_powerpc_rel16=yes
23285 else
23286 echo "configure: failed program was" >&5
23287 cat conftest.s >&5
23288 fi
23289 rm -f conftest.o conftest.s
23290 fi
23291fi
5213506e
RW
23292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_rel16" >&5
23293$as_echo "$gcc_cv_as_powerpc_rel16" >&6; }
695d8830
AS
23294if test $gcc_cv_as_powerpc_rel16 = yes; then
23295
5213506e 23296$as_echo "#define HAVE_AS_REL16 1" >>confdefs.h
695d8830
AS
23297
23298fi
23299
b639c3c2
JJ
23300 case $target in
23301 *-*-aix*) conftest_s=' .machine "pwr6"
23302 .csect .text[PR]
23303 cmpb 3,4,5';;
23304 *) conftest_s=' .machine power6
23305 .text
23306 cmpb 3,4,5';;
23307 esac
23308
5213506e
RW
23309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compare bytes support" >&5
23310$as_echo_n "checking assembler for compare bytes support... " >&6; }
23311if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then :
23312 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23313else
23314 gcc_cv_as_powerpc_cmpb=no
23315 if test $in_tree_gas = yes; then
cacf1ca8 23316 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23317 then gcc_cv_as_powerpc_cmpb=yes
23318fi
23319 elif test x$gcc_cv_as != x; then
23320 echo "$conftest_s" > conftest.s
23321 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
5213506e 23322 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23323 (eval $ac_try) 2>&5
23324 ac_status=$?
5213506e
RW
23325 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23326 test $ac_status = 0; }; }
b639c3c2
JJ
23327 then
23328 gcc_cv_as_powerpc_cmpb=yes
23329 else
23330 echo "configure: failed program was" >&5
23331 cat conftest.s >&5
23332 fi
23333 rm -f conftest.o conftest.s
23334 fi
23335fi
5213506e
RW
23336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_cmpb" >&5
23337$as_echo "$gcc_cv_as_powerpc_cmpb" >&6; }
b639c3c2
JJ
23338if test $gcc_cv_as_powerpc_cmpb = yes; then
23339
5213506e 23340$as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h
b639c3c2
JJ
23341
23342fi
23343
23344 case $target in
23345 *-*-aix*) conftest_s=' .machine "pwr6"
23346 .csect .text[PR]
0d74c0ee 23347 dadd 1,2,3';;
b639c3c2
JJ
23348 *) conftest_s=' .machine power6
23349 .text
0d74c0ee 23350 dadd 1,2,3';;
b639c3c2
JJ
23351 esac
23352
5213506e
RW
23353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for decimal float support" >&5
23354$as_echo_n "checking assembler for decimal float support... " >&6; }
23355if test "${gcc_cv_as_powerpc_dfp+set}" = set; then :
23356 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23357else
23358 gcc_cv_as_powerpc_dfp=no
23359 if test $in_tree_gas = yes; then
cacf1ca8 23360 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23361 then gcc_cv_as_powerpc_dfp=yes
23362fi
23363 elif test x$gcc_cv_as != x; then
23364 echo "$conftest_s" > conftest.s
23365 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
5213506e 23366 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23367 (eval $ac_try) 2>&5
23368 ac_status=$?
5213506e
RW
23369 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23370 test $ac_status = 0; }; }
b639c3c2
JJ
23371 then
23372 gcc_cv_as_powerpc_dfp=yes
23373 else
23374 echo "configure: failed program was" >&5
23375 cat conftest.s >&5
23376 fi
23377 rm -f conftest.o conftest.s
23378 fi
23379fi
5213506e
RW
23380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dfp" >&5
23381$as_echo "$gcc_cv_as_powerpc_dfp" >&6; }
b639c3c2
JJ
23382if test $gcc_cv_as_powerpc_dfp = yes; then
23383
5213506e 23384$as_echo "#define HAVE_AS_DFP 1" >>confdefs.h
b639c3c2 23385
d40c9e33
PB
23386fi
23387
23388 case $target in
23389 *-*-aix*) conftest_s=' .machine "pwr7"
23390 .csect .text[PR]
23391 lxvd2x 1,2,3';;
23392 *) conftest_s=' .machine power7
23393 .text
23394 lxvd2x 1,2,3';;
23395 esac
23396
5213506e
RW
23397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for vector-scalar support" >&5
23398$as_echo_n "checking assembler for vector-scalar support... " >&6; }
23399if test "${gcc_cv_as_powerpc_vsx+set}" = set; then :
23400 $as_echo_n "(cached) " >&6
d40c9e33
PB
23401else
23402 gcc_cv_as_powerpc_vsx=no
23403 if test $in_tree_gas = yes; then
cacf1ca8 23404 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
d40c9e33
PB
23405 then gcc_cv_as_powerpc_vsx=yes
23406fi
23407 elif test x$gcc_cv_as != x; then
23408 echo "$conftest_s" > conftest.s
23409 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
5213506e 23410 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d40c9e33
PB
23411 (eval $ac_try) 2>&5
23412 ac_status=$?
5213506e
RW
23413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23414 test $ac_status = 0; }; }
d40c9e33
PB
23415 then
23416 gcc_cv_as_powerpc_vsx=yes
23417 else
23418 echo "configure: failed program was" >&5
23419 cat conftest.s >&5
23420 fi
23421 rm -f conftest.o conftest.s
23422 fi
23423fi
5213506e
RW
23424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_vsx" >&5
23425$as_echo "$gcc_cv_as_powerpc_vsx" >&6; }
d40c9e33
PB
23426if test $gcc_cv_as_powerpc_vsx = yes; then
23427
5213506e 23428$as_echo "#define HAVE_AS_VSX 1" >>confdefs.h
d40c9e33 23429
cacf1ca8
MM
23430fi
23431
23432 case $target in
23433 *-*-aix*) conftest_s=' .machine "pwr7"
23434 .csect .text[PR]
23435 popcntd 3,3';;
23436 *) conftest_s=' .machine power7
23437 .text
23438 popcntd 3,3';;
23439 esac
23440
5213506e
RW
23441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntd support" >&5
23442$as_echo_n "checking assembler for popcntd support... " >&6; }
23443if test "${gcc_cv_as_powerpc_popcntd+set}" = set; then :
23444 $as_echo_n "(cached) " >&6
cacf1ca8
MM
23445else
23446 gcc_cv_as_powerpc_popcntd=no
23447 if test $in_tree_gas = yes; then
23448 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
23449 then gcc_cv_as_powerpc_popcntd=yes
23450fi
23451 elif test x$gcc_cv_as != x; then
23452 echo "$conftest_s" > conftest.s
23453 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
5213506e 23454 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
23455 (eval $ac_try) 2>&5
23456 ac_status=$?
5213506e
RW
23457 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23458 test $ac_status = 0; }; }
cacf1ca8
MM
23459 then
23460 gcc_cv_as_powerpc_popcntd=yes
23461 else
23462 echo "configure: failed program was" >&5
23463 cat conftest.s >&5
23464 fi
23465 rm -f conftest.o conftest.s
23466 fi
23467fi
5213506e
RW
23468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntd" >&5
23469$as_echo "$gcc_cv_as_powerpc_popcntd" >&6; }
cacf1ca8
MM
23470if test $gcc_cv_as_powerpc_popcntd = yes; then
23471
5213506e 23472$as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h
cacf1ca8
MM
23473
23474fi
23475
23476 case $target in
23477 *-*-aix*) conftest_s=' .csect .text[PR]
23478 lwsync';;
23479 *) conftest_s=' .text
23480 lwsync';;
23481 esac
23482
5213506e
RW
23483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for lwsync support" >&5
23484$as_echo_n "checking assembler for lwsync support... " >&6; }
23485if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then :
23486 $as_echo_n "(cached) " >&6
cacf1ca8
MM
23487else
23488 gcc_cv_as_powerpc_lwsync=no
23489 if test $in_tree_gas = yes; then
23490 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
23491 then gcc_cv_as_powerpc_lwsync=yes
23492fi
23493 elif test x$gcc_cv_as != x; then
23494 echo "$conftest_s" > conftest.s
23495 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
5213506e 23496 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
23497 (eval $ac_try) 2>&5
23498 ac_status=$?
5213506e
RW
23499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23500 test $ac_status = 0; }; }
cacf1ca8
MM
23501 then
23502 gcc_cv_as_powerpc_lwsync=yes
23503 else
23504 echo "configure: failed program was" >&5
23505 cat conftest.s >&5
23506 fi
23507 rm -f conftest.o conftest.s
23508 fi
23509fi
5213506e
RW
23510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_lwsync" >&5
23511$as_echo "$gcc_cv_as_powerpc_lwsync" >&6; }
cacf1ca8
MM
23512if test $gcc_cv_as_powerpc_lwsync = yes; then
23513
5213506e 23514$as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h
cacf1ca8 23515
47f67e51
PB
23516fi
23517
23518 case $target in
23519 *-*-aix*) conftest_s=' .machine "476"
23520 .csect .text[PR]
23521 dci 0';;
23522 *) conftest_s=' .machine "476"
23523 .text
23524 dci 0';;
23525 esac
23526
23527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for data cache invalidate support" >&5
23528$as_echo_n "checking assembler for data cache invalidate support... " >&6; }
23529if test "${gcc_cv_as_powerpc_dci+set}" = set; then :
23530 $as_echo_n "(cached) " >&6
23531else
23532 gcc_cv_as_powerpc_dci=no
23533 if test $in_tree_gas = yes; then
23534 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
23535 then gcc_cv_as_powerpc_dci=yes
23536fi
23537 elif test x$gcc_cv_as != x; then
23538 echo "$conftest_s" > conftest.s
23539 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
23540 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23541 (eval $ac_try) 2>&5
23542 ac_status=$?
23543 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23544 test $ac_status = 0; }; }
23545 then
23546 gcc_cv_as_powerpc_dci=yes
23547 else
23548 echo "configure: failed program was" >&5
23549 cat conftest.s >&5
23550 fi
23551 rm -f conftest.o conftest.s
23552 fi
23553fi
23554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dci" >&5
23555$as_echo "$gcc_cv_as_powerpc_dci" >&6; }
23556if test $gcc_cv_as_powerpc_dci = yes; then
23557
23558$as_echo "#define HAVE_AS_DCI 1" >>confdefs.h
23559
e51917ae
JM
23560fi
23561
5213506e
RW
23562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
23563$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
23564if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then :
23565 $as_echo_n "(cached) " >&6
e51917ae
JM
23566else
23567 gcc_cv_as_powerpc_gnu_attribute=no
23568 if test $in_tree_gas = yes; then
23569 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
23570 then gcc_cv_as_powerpc_gnu_attribute=yes
23571fi
23572 elif test x$gcc_cv_as != x; then
23573 echo '.gnu_attribute 4,1' > conftest.s
23574 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23575 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e51917ae
JM
23576 (eval $ac_try) 2>&5
23577 ac_status=$?
5213506e
RW
23578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23579 test $ac_status = 0; }; }
e51917ae
JM
23580 then
23581 gcc_cv_as_powerpc_gnu_attribute=yes
23582 else
23583 echo "configure: failed program was" >&5
23584 cat conftest.s >&5
23585 fi
23586 rm -f conftest.o conftest.s
23587 fi
23588fi
5213506e
RW
23589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
23590$as_echo "$gcc_cv_as_powerpc_gnu_attribute" >&6; }
e51917ae
JM
23591if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
23592
5213506e 23593$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
e51917ae 23594
9752c4ad
AM
23595fi
23596
5213506e
RW
23597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5
23598$as_echo_n "checking assembler for tls marker support... " >&6; }
23599if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then :
23600 $as_echo_n "(cached) " >&6
9752c4ad
AM
23601else
23602 gcc_cv_as_powerpc_tls_markers=no
23603 if test $in_tree_gas = yes; then
207bf79d 23604 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0`
9752c4ad
AM
23605 then gcc_cv_as_powerpc_tls_markers=yes
23606fi
23607 elif test x$gcc_cv_as != x; then
23608 echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s
23609 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23610 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9752c4ad
AM
23611 (eval $ac_try) 2>&5
23612 ac_status=$?
5213506e
RW
23613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23614 test $ac_status = 0; }; }
9752c4ad
AM
23615 then
23616 gcc_cv_as_powerpc_tls_markers=yes
23617 else
23618 echo "configure: failed program was" >&5
23619 cat conftest.s >&5
23620 fi
23621 rm -f conftest.o conftest.s
23622 fi
23623fi
5213506e
RW
23624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_tls_markers" >&5
23625$as_echo "$gcc_cv_as_powerpc_tls_markers" >&6; }
9752c4ad
AM
23626if test $gcc_cv_as_powerpc_tls_markers = yes; then
23627
5213506e 23628$as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h
9752c4ad 23629
7f970b70 23630fi
8ada417f
ZW
23631 ;;
23632
23633 mips*-*-*)
5213506e
RW
23634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
23635$as_echo_n "checking assembler for explicit relocation support... " >&6; }
23636if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then :
23637 $as_echo_n "(cached) " >&6
8ada417f
ZW
23638else
23639 gcc_cv_as_mips_explicit_relocs=no
23640 if test $in_tree_gas = yes; then
23641 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23642 then gcc_cv_as_mips_explicit_relocs=yes
23643fi
23644 elif test x$gcc_cv_as != x; then
6e3f3080 23645 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2 23646 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23647 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23648 (eval $ac_try) 2>&5
23649 ac_status=$?
5213506e
RW
23650 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23651 test $ac_status = 0; }; }
8ada417f
ZW
23652 then
23653 gcc_cv_as_mips_explicit_relocs=yes
23654 else
23655 echo "configure: failed program was" >&5
23656 cat conftest.s >&5
ef1ecf87 23657 fi
8ada417f
ZW
23658 rm -f conftest.o conftest.s
23659 fi
23660fi
5213506e
RW
23661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_explicit_relocs" >&5
23662$as_echo "$gcc_cv_as_mips_explicit_relocs" >&6; }
8ada417f
ZW
23663if test $gcc_cv_as_mips_explicit_relocs = yes; then
23664 if test x$target_cpu_default = x
23665 then target_cpu_default=MASK_EXPLICIT_RELOCS
23666 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
23667 fi
4551169f 23668fi
5213506e
RW
23669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5
23670$as_echo_n "checking assembler for -mno-shared support... " >&6; }
23671if test "${gcc_cv_as_mips_no_shared+set}" = set; then :
23672 $as_echo_n "(cached) " >&6
4551169f
RS
23673else
23674 gcc_cv_as_mips_no_shared=no
23675 if test $in_tree_gas = yes; then
23676 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
23677 then gcc_cv_as_mips_no_shared=yes
23678fi
23679 elif test x$gcc_cv_as != x; then
23680 echo 'nop' > conftest.s
23681 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
5213506e 23682 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4551169f
RS
23683 (eval $ac_try) 2>&5
23684 ac_status=$?
5213506e
RW
23685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23686 test $ac_status = 0; }; }
4551169f
RS
23687 then
23688 gcc_cv_as_mips_no_shared=yes
23689 else
23690 echo "configure: failed program was" >&5
23691 cat conftest.s >&5
23692 fi
23693 rm -f conftest.o conftest.s
23694 fi
23695fi
5213506e
RW
23696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_no_shared" >&5
23697$as_echo "$gcc_cv_as_mips_no_shared" >&6; }
4551169f
RS
23698if test $gcc_cv_as_mips_no_shared = yes; then
23699
5213506e 23700$as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h
4551169f 23701
dcb957d9
JM
23702fi
23703
5213506e
RW
23704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
23705$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
23706if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then :
23707 $as_echo_n "(cached) " >&6
dcb957d9
JM
23708else
23709 gcc_cv_as_mips_gnu_attribute=no
23710 if test $in_tree_gas = yes; then
23711 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
23712 then gcc_cv_as_mips_gnu_attribute=yes
23713fi
23714 elif test x$gcc_cv_as != x; then
23715 echo '.gnu_attribute 4,1' > conftest.s
23716 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23717 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
dcb957d9
JM
23718 (eval $ac_try) 2>&5
23719 ac_status=$?
5213506e
RW
23720 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23721 test $ac_status = 0; }; }
dcb957d9
JM
23722 then
23723 gcc_cv_as_mips_gnu_attribute=yes
23724 else
23725 echo "configure: failed program was" >&5
23726 cat conftest.s >&5
23727 fi
23728 rm -f conftest.o conftest.s
23729 fi
23730fi
5213506e
RW
23731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_gnu_attribute" >&5
23732$as_echo "$gcc_cv_as_mips_gnu_attribute" >&6; }
dcb957d9
JM
23733if test $gcc_cv_as_mips_gnu_attribute = yes; then
23734
5213506e 23735$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
dcb957d9 23736
a44380d2
JM
23737fi
23738
5213506e
RW
23739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5
23740$as_echo_n "checking assembler for .dtprelword support... " >&6; }
23741if test "${gcc_cv_as_mips_dtprelword+set}" = set; then :
23742 $as_echo_n "(cached) " >&6
a44380d2
JM
23743else
23744 gcc_cv_as_mips_dtprelword=no
23745 if test $in_tree_gas = yes; then
23746 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
23747 then gcc_cv_as_mips_dtprelword=yes
23748fi
23749 elif test x$gcc_cv_as != x; then
23750 echo '.section .tdata,"awT",@progbits
23751x:
23752 .word 2
23753 .text
23754 .dtprelword x+0x8000' > conftest.s
23755 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23756 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a44380d2
JM
23757 (eval $ac_try) 2>&5
23758 ac_status=$?
5213506e
RW
23759 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23760 test $ac_status = 0; }; }
a44380d2
JM
23761 then
23762 gcc_cv_as_mips_dtprelword=yes
23763 else
23764 echo "configure: failed program was" >&5
23765 cat conftest.s >&5
23766 fi
23767 rm -f conftest.o conftest.s
23768 fi
23769fi
5213506e
RW
23770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_dtprelword" >&5
23771$as_echo "$gcc_cv_as_mips_dtprelword" >&6; }
a44380d2
JM
23772if test $gcc_cv_as_mips_dtprelword = yes; then
23773
5213506e 23774$as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h
a44380d2 23775
8ada417f 23776fi
b53da244
AN
23777
23778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5
23779$as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; }
23780 gcc_cv_as_ld_jalr_reloc=no
23781 if test $gcc_cv_as_mips_explicit_relocs = yes; then
23782 if test $in_tree_ld = yes ; then
23783 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 20 -o "$gcc_cv_gld_major_version" -gt 2 \
23784 && test $in_tree_ld_is_elf = yes; then
23785 gcc_cv_as_ld_jalr_reloc=yes
23786 fi
23787 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then
23788 echo ' .ent x' > conftest.s
23789 echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s
23790 echo ' ld $25,%call16(y)($28)' >> conftest.s
23791 echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s
23792 echo '1: jalr $25' >> conftest.s
23793 echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s
23794 echo '1: jalr $25' >> conftest.s
23795 echo ' .end x' >> conftest.s
23796 if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&5 \
23797 && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&5; then
23798 if $gcc_cv_objdump -d conftest.so | grep -q jalr \
23799 && $gcc_cv_objdump -d conftest.so | grep -q "bal.*<x>"; then
23800 gcc_cv_as_ld_jalr_reloc=yes
23801 fi
23802 fi
23803 rm -f conftest.*
23804 fi
23805 fi
23806 if test $gcc_cv_as_ld_jalr_reloc = yes; then
23807 if test x$target_cpu_default = x; then
23808 target_cpu_default=MASK_RELAX_PIC_CALLS
23809 else
23810 target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
23811 fi
23812 fi
23813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
23814$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
49576e25
RS
23815
23816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .eh_frame personality relaxation" >&5
23817$as_echo_n "checking linker for .eh_frame personality relaxation... " >&6; }
23818if test "${gcc_cv_ld_mips_personality_relaxation+set}" = set; then :
23819 $as_echo_n "(cached) " >&6
23820else
23821 gcc_cv_ld_mips_personality_relaxation=no
23822 if test $in_tree_ld = yes ; then
23823 if test "$gcc_cv_gld_major_version" -eq 2 \
23824 -a "$gcc_cv_gld_minor_version" -ge 21 \
23825 -o "$gcc_cv_gld_major_version" -gt 2; then
23826 gcc_cv_ld_mips_personality_relaxation=yes
23827 fi
23828 elif test x$gcc_cv_as != x \
23829 -a x$gcc_cv_ld != x \
23830 -a x$gcc_cv_readelf != x ; then
23831 cat > conftest.s <<EOF
23832 .cfi_startproc
23833 .cfi_personality 0x80,indirect_ptr
23834 .ent test
23835test:
23836 nop
23837 .end test
23838 .cfi_endproc
23839
23840 .section .data,"aw",@progbits
23841indirect_ptr:
23842 .dc.a personality
23843EOF
23844 if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \
23845 && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then
23846 if $gcc_cv_readelf -d conftest 2>&1 \
23847 | grep TEXTREL > /dev/null 2>&1; then
23848 :
23849 elif $gcc_cv_readelf --relocs conftest 2>&1 \
23850 | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then
23851 :
23852 else
23853 gcc_cv_ld_mips_personality_relaxation=yes
23854 fi
23855 fi
23856 fi
23857 rm -f conftest.s conftest.o conftest
23858fi
23859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_mips_personality_relaxation" >&5
23860$as_echo "$gcc_cv_ld_mips_personality_relaxation" >&6; }
23861 if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then
23862
23863$as_echo "#define HAVE_LD_PERSONALITY_RELAXATION 1" >>confdefs.h
23864
23865 fi
dbad5e72
SE
23866 ;;
23867esac
8ada417f 23868
dbad5e72
SE
23869# Mips and HP-UX need the GNU assembler.
23870# Linux on IA64 might be able to use the Intel assembler.
23871
23872case "$target" in
23873 mips*-*-* | *-*-hpux* )
82563d35
RS
23874 if test x$gas_flag = xyes \
23875 || test x"$host" != x"$build" \
23876 || test ! -x "$gcc_cv_as" \
23877 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
23878 :
23879 else
23880 echo "*** This configuration requires the GNU assembler" >&2
23881 exit 1
23882 fi
ef1ecf87 23883 ;;
1cb36a98 23884esac
dbad5e72 23885
9d147085
RH
23886# ??? Not all targets support dwarf2 debug_line, even within a version
23887# of gas. Moreover, we need to emit a valid instruction to trigger any
23888# info to the output file. So, as supported targets are added to gas 2.11,
23889# add some instruction here to (also) show we expect this might work.
23890# ??? Once 2.11 is released, probably need to add first known working
23891# version to the per-target configury.
23892case "$target" in
80486e06 23893 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
cd985f66 23894 | x86_64*-*-* | hppa*-*-* | arm*-*-* \
ad9646c7 23895 | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
15a43677 23896 | spu-*-* | fido*-*-* | m32c-*-*)
9d147085
RH
23897 insn="nop"
23898 ;;
57116d8d 23899 ia64*-*-* | s390*-*-*)
9d147085
RH
23900 insn="nop 0"
23901 ;;
2853bc5a
HPN
23902 mmix-*-*)
23903 insn="swym 0"
23904 ;;
8ada417f
ZW
23905esac
23906if test x"$insn" != x; then
23907 conftest_s="\
23908 .file 1 \"conftest.s\"
23909 .loc 1 3 0
23910 $insn"
5213506e
RW
23911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for dwarf2 debug_line support" >&5
23912$as_echo_n "checking assembler for dwarf2 debug_line support... " >&6; }
23913if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then :
23914 $as_echo_n "(cached) " >&6
8ada417f
ZW
23915else
23916 gcc_cv_as_dwarf2_debug_line=no
23917 if test $in_tree_gas = yes; then
23918 if test $in_tree_gas_is_elf = yes \
23919 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23920 then gcc_cv_as_dwarf2_debug_line=yes
23921fi
23922 elif test x$gcc_cv_as != x; then
6e3f3080 23923 echo "$conftest_s" > conftest.s
ba479fd2 23924 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23925 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23926 (eval $ac_try) 2>&5
23927 ac_status=$?
5213506e
RW
23928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23929 test $ac_status = 0; }; }
8ada417f 23930 then
080a5bb0
EB
23931 if test x$gcc_cv_objdump != x \
23932 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
23933 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
23934 gcc_cv_as_dwarf2_debug_line=yes
23935 fi
23936 else
23937 echo "configure: failed program was" >&5
23938 cat conftest.s >&5
23939 fi
23940 rm -f conftest.o conftest.s
23941 fi
23942fi
5213506e
RW
23943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_debug_line" >&5
23944$as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; }
ad9c4d9f 23945
ad9c4d9f 23946
8ada417f
ZW
23947# The .debug_line file table must be in the exact order that
23948# we specified the files, since these indices are also used
23949# by DW_AT_decl_file. Approximate this test by testing if
23950# the assembler bitches if the same index is assigned twice.
5213506e
RW
23951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for buggy dwarf2 .file directive" >&5
23952$as_echo_n "checking assembler for buggy dwarf2 .file directive... " >&6; }
23953if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then :
23954 $as_echo_n "(cached) " >&6
8ada417f
ZW
23955else
23956 gcc_cv_as_dwarf2_file_buggy=no
23957 if test x$gcc_cv_as != x; then
6e3f3080 23958 echo ' .file 1 "foo.s"
8ada417f 23959 .file 1 "bar.s"' > conftest.s
ba479fd2 23960 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 23961 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23962 (eval $ac_try) 2>&5
23963 ac_status=$?
5213506e
RW
23964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23965 test $ac_status = 0; }; }
8ada417f
ZW
23966 then
23967 gcc_cv_as_dwarf2_file_buggy=yes
23968 else
23969 echo "configure: failed program was" >&5
23970 cat conftest.s >&5
23971 fi
23972 rm -f conftest.o conftest.s
23973 fi
ad9c4d9f 23974fi
5213506e
RW
23975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_file_buggy" >&5
23976$as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; }
8ada417f
ZW
23977
23978
23979 if test $gcc_cv_as_dwarf2_debug_line = yes \
23980 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2 23981
5213506e 23982$as_echo "#define HAVE_AS_DWARF2_DEBUG_LINE 1" >>confdefs.h
9d147085 23983
8ada417f 23984 fi
ad9c4d9f 23985
5213506e
RW
23986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf2 option" >&5
23987$as_echo_n "checking assembler for --gdwarf2 option... " >&6; }
23988if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then :
23989 $as_echo_n "(cached) " >&6
8ada417f
ZW
23990else
23991 gcc_cv_as_gdwarf2_flag=no
23992 if test $in_tree_gas = yes; then
23993 if test $in_tree_gas_is_elf = yes \
23994 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23995 then gcc_cv_as_gdwarf2_flag=yes
23996fi
23997 elif test x$gcc_cv_as != x; then
6e3f3080 23998 echo "$insn" > conftest.s
ba479fd2 23999 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
5213506e 24000 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24001 (eval $ac_try) 2>&5
24002 ac_status=$?
5213506e
RW
24003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24004 test $ac_status = 0; }; }
8ada417f
ZW
24005 then
24006 gcc_cv_as_gdwarf2_flag=yes
24007 else
24008 echo "configure: failed program was" >&5
24009 cat conftest.s >&5
24010 fi
24011 rm -f conftest.o conftest.s
24012 fi
ad9c4d9f 24013fi
5213506e
RW
24014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gdwarf2_flag" >&5
24015$as_echo "$gcc_cv_as_gdwarf2_flag" >&6; }
63cf211a 24016if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2 24017
5213506e 24018$as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2
GK
24019
24020fi
ad9c4d9f 24021
5213506e
RW
24022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
24023$as_echo_n "checking assembler for --gstabs option... " >&6; }
24024if test "${gcc_cv_as_gstabs_flag+set}" = set; then :
24025 $as_echo_n "(cached) " >&6
8ada417f
ZW
24026else
24027 gcc_cv_as_gstabs_flag=no
24028 if test $in_tree_gas = yes; then
24029 if test $in_tree_gas_is_elf = yes \
24030 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24031 then gcc_cv_as_gstabs_flag=yes
24032fi
24033 elif test x$gcc_cv_as != x; then
6e3f3080 24034 echo "$insn" > conftest.s
ba479fd2 24035 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
5213506e 24036 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24037 (eval $ac_try) 2>&5
24038 ac_status=$?
5213506e
RW
24039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24040 test $ac_status = 0; }; }
8ada417f
ZW
24041 then
24042 # The native Solaris 9/Intel assembler doesn't understand --gstabs
24043 # and warns about it, but still exits successfully. So check for
24044 # this.
ba479fd2 24045 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
5213506e 24046 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24047 (eval $ac_try) 2>&5
24048 ac_status=$?
5213506e
RW
24049 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24050 test $ac_status = 0; }; }
8ada417f
ZW
24051 then :
24052 else gcc_cv_as_gstabs_flag=yes
24053 fi
24054 else
24055 echo "configure: failed program was" >&5
24056 cat conftest.s >&5
24057 fi
24058 rm -f conftest.o conftest.s
24059 fi
ad9c4d9f 24060fi
5213506e
RW
24061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gstabs_flag" >&5
24062$as_echo "$gcc_cv_as_gstabs_flag" >&6; }
63cf211a 24063if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2 24064
5213506e 24065$as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2 24066
c8aea42c
PB
24067fi
24068
5213506e
RW
24069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5
24070$as_echo_n "checking assembler for --debug-prefix-map option... " >&6; }
24071if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then :
24072 $as_echo_n "(cached) " >&6
c8aea42c
PB
24073else
24074 gcc_cv_as_debug_prefix_map_flag=no
24075 if test $in_tree_gas = yes; then
303a4698 24076 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
24077 then gcc_cv_as_debug_prefix_map_flag=yes
24078fi
24079 elif test x$gcc_cv_as != x; then
24080 echo "$insn" > conftest.s
24081 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
5213506e 24082 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c8aea42c
PB
24083 (eval $ac_try) 2>&5
24084 ac_status=$?
5213506e
RW
24085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24086 test $ac_status = 0; }; }
c8aea42c
PB
24087 then
24088 gcc_cv_as_debug_prefix_map_flag=yes
24089 else
24090 echo "configure: failed program was" >&5
24091 cat conftest.s >&5
24092 fi
24093 rm -f conftest.o conftest.s
24094 fi
24095fi
5213506e
RW
24096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_debug_prefix_map_flag" >&5
24097$as_echo "$gcc_cv_as_debug_prefix_map_flag" >&6; }
c8aea42c
PB
24098if test $gcc_cv_as_debug_prefix_map_flag = yes; then
24099
5213506e 24100$as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h
c8aea42c 24101
5f0e9ea2 24102fi
8ada417f 24103fi
5f0e9ea2 24104
5213506e
RW
24105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5
24106$as_echo_n "checking assembler for .lcomm with alignment... " >&6; }
24107if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then :
24108 $as_echo_n "(cached) " >&6
28e6bb13
NC
24109else
24110 gcc_cv_as_lcomm_with_alignment=no
24111 if test x$gcc_cv_as != x; then
24112 echo '.lcomm bar,4,16' > conftest.s
24113 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 24114 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
28e6bb13
NC
24115 (eval $ac_try) 2>&5
24116 ac_status=$?
5213506e
RW
24117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24118 test $ac_status = 0; }; }
28e6bb13
NC
24119 then
24120 gcc_cv_as_lcomm_with_alignment=yes
24121 else
24122 echo "configure: failed program was" >&5
24123 cat conftest.s >&5
24124 fi
24125 rm -f conftest.o conftest.s
24126 fi
24127fi
5213506e
RW
24128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_lcomm_with_alignment" >&5
24129$as_echo "$gcc_cv_as_lcomm_with_alignment" >&6; }
28e6bb13
NC
24130if test $gcc_cv_as_lcomm_with_alignment = yes; then
24131
5213506e 24132$as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h
28e6bb13
NC
24133
24134fi
24135
5213506e
RW
24136# Check whether --enable-gnu-unique-object was given.
24137if test "${enable_gnu_unique_object+set}" = set; then :
24138 enableval=$enable_gnu_unique_object; case $enable_gnu_unique_object in
e31bcd1b 24139 yes | no) ;;
5213506e
RW
24140 *) as_fn_error "'$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object.
24141Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
e31bcd1b
JM
24142 esac
24143else
5213506e
RW
24144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_unique_object" >&5
24145$as_echo_n "checking assembler for gnu_unique_object... " >&6; }
24146if test "${gcc_cv_as_gnu_unique_object+set}" = set; then :
24147 $as_echo_n "(cached) " >&6
e31bcd1b
JM
24148else
24149 gcc_cv_as_gnu_unique_object=no
24150 if test $in_tree_gas = yes; then
24151 if test $in_tree_gas_is_elf = yes \
24152 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
24153 then gcc_cv_as_gnu_unique_object=yes
24154fi
24155 elif test x$gcc_cv_as != x; then
24156 echo '.type foo, @gnu_unique_object' > conftest.s
24157 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
5213506e 24158 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e31bcd1b
JM
24159 (eval $ac_try) 2>&5
24160 ac_status=$?
5213506e
RW
24161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24162 test $ac_status = 0; }; }
e31bcd1b 24163 then
e00ded68 24164 gcc_cv_as_gnu_unique_object=yes
e31bcd1b
JM
24165 else
24166 echo "configure: failed program was" >&5
24167 cat conftest.s >&5
24168 fi
24169 rm -f conftest.o conftest.s
24170 fi
24171fi
5213506e
RW
24172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5
24173$as_echo "$gcc_cv_as_gnu_unique_object" >&6; }
e31bcd1b 24174if test $gcc_cv_as_gnu_unique_object = yes; then
e00ded68
JM
24175 # Also check for ld.so support, i.e. glibc 2.11 or higher.
24176 if test x$host = x$build -a x$host = x$target &&
24177 glibcver=`ldd --version 2>/dev/null`; then
24178 glibcmajor=`expr "$glibcver" : "ldd (GNU libc) \([0-9]*\)"`
24179 glibcminor=`expr "$glibcver" : "ldd (GNU libc) [0-9]*\.\([0-9]*\)"`
24180 glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
24181 if test "$glibcnum" -ge 2011 ; then
24182 enable_gnu_unique_object=yes
24183 fi
24184 fi
e31bcd1b 24185fi
5213506e
RW
24186fi
24187
e31bcd1b
JM
24188if test x$enable_gnu_unique_object = xyes; then
24189
5213506e 24190$as_echo "#define HAVE_GAS_GNU_UNIQUE_OBJECT 1" >>confdefs.h
e31bcd1b
JM
24191
24192fi
24193
5213506e
RW
24194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tolerance to line number 0" >&5
24195$as_echo_n "checking assembler for tolerance to line number 0... " >&6; }
24196if test "${gcc_cv_as_line_zero+set}" = set; then :
24197 $as_echo_n "(cached) " >&6
03943c05
AO
24198else
24199 gcc_cv_as_line_zero=no
24200 if test $in_tree_gas = yes; then
cf0eb7a1
AO
24201 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
24202 then gcc_cv_as_line_zero=yes
03943c05
AO
24203fi
24204 elif test "x$gcc_cv_as" != x; then
24205 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
24206 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
5213506e 24207 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
03943c05
AO
24208 (eval $ac_try) 2>&5
24209 ac_status=$?
5213506e
RW
24210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24211 test $ac_status = 0; }; } &&
03943c05
AO
24212 test "x`cat conftest.out`" = x
24213 then
24214 gcc_cv_as_line_zero=yes
24215 else
24216 echo "configure: failed program was" >&5
24217 cat conftest.s >&5
24218 echo "configure: error output was" >&5
24219 cat conftest.out >&5
24220 fi
24221 rm -f conftest.o conftest.s conftest.out
24222 fi
24223fi
5213506e
RW
24224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_line_zero" >&5
24225$as_echo "$gcc_cv_as_line_zero" >&6; }
03943c05
AO
24226if test "x$gcc_cv_as_line_zero" = xyes; then
24227
5213506e 24228$as_echo "#define HAVE_AS_LINE_ZERO 1" >>confdefs.h
03943c05
AO
24229
24230fi
24231
5213506e
RW
24232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker PT_GNU_EH_FRAME support" >&5
24233$as_echo_n "checking linker PT_GNU_EH_FRAME support... " >&6; }
275b60d6 24234gcc_cv_ld_eh_frame_hdr=no
34a86c2b 24235if test $in_tree_ld = yes ; then
5408ac6c
HPN
24236 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 \
24237 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
24238 gcc_cv_ld_eh_frame_hdr=yes
24239 fi
24240elif test x$gcc_cv_ld != x; then
24241 # Check if linker supports --eh-frame-hdr option
24242 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
24243 gcc_cv_ld_eh_frame_hdr=yes
24244 fi
24245fi
232b67d9 24246
275b60d6 24247if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2 24248
5213506e 24249$as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
275b60d6
JJ
24250
24251fi
5213506e
RW
24252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
24253$as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
275b60d6 24254
5213506e
RW
24255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker position independent executable support" >&5
24256$as_echo_n "checking linker position independent executable support... " >&6; }
24a4dd31
JJ
24257gcc_cv_ld_pie=no
24258if test $in_tree_ld = yes ; then
5408ac6c
HPN
24259 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 \
24260 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
24261 gcc_cv_ld_pie=yes
24262 fi
24263elif test x$gcc_cv_ld != x; then
24264 # Check if linker supports -pie option
24265 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
24266 gcc_cv_ld_pie=yes
24267 fi
24268fi
24269if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2 24270
5213506e 24271$as_echo "#define HAVE_LD_PIE 1" >>confdefs.h
24a4dd31
JJ
24272
24273fi
5213506e
RW
24274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_pie" >&5
24275$as_echo "$gcc_cv_ld_pie" >&6; }
24a4dd31 24276
5213506e
RW
24277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker EH-compatible garbage collection of sections" >&5
24278$as_echo_n "checking linker EH-compatible garbage collection of sections... " >&6; }
22ba88ef 24279gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
24280if test $in_tree_ld = yes ; then
24281 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 \
24282 && test $in_tree_ld_is_elf = yes; then
24283 gcc_cv_ld_eh_gc_sections=yes
24284 fi
24285elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
24286 cat > conftest.s <<EOF
24287 .section .text
24288.globl _start
24289 .type _start, @function
24290_start:
24291 .long foo
24292 .size _start, .-_start
24293 .section .text.foo,"ax",@progbits
24294 .type foo, @function
24295foo:
24296 .long 0
24297 .size foo, .-foo
24298 .section .gcc_except_table.foo,"a",@progbits
24299.L0:
24300 .long 0
24301 .section .eh_frame,"a",@progbits
24302 .long .L0
24303EOF
24304 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24305 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24306 | grep "gc-sections option ignored" > /dev/null; then
24307 gcc_cv_ld_eh_gc_sections=no
24308 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
24309 gcc_cv_ld_eh_gc_sections=yes
24310 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
24311 if test x$gcc_cv_as_comdat_group != xyes; then
24312 gcc_cv_ld_eh_gc_sections=no
24313 cat > conftest.s <<EOF
24314 .section .text
24315.globl _start
24316 .type _start, @function
24317_start:
24318 .long foo
24319 .size _start, .-_start
24320 .section .gnu.linkonce.t.foo,"ax",@progbits
24321 .type foo, @function
24322foo:
24323 .long 0
24324 .size foo, .-foo
24325 .section .gcc_except_table.foo,"a",@progbits
24326.L0:
24327 .long 0
24328 .section .eh_frame,"a",@progbits
24329 .long .L0
24330EOF
24331 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24332 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24333 | grep "gc-sections option ignored" > /dev/null; then
24334 gcc_cv_ld_eh_gc_sections=no
24335 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
24336 gcc_cv_ld_eh_gc_sections=yes
24337 fi
24338 fi
24339 fi
24340 fi
24341 fi
24342 rm -f conftest.s conftest.o conftest
24343fi
e9d207d9
EB
24344case "$target" in
24345 hppa*-*-linux*)
24346 # ??? This apparently exposes a binutils bug with PC-relative relocations.
24347 gcc_cv_ld_eh_gc_sections=no
24348 ;;
24349esac
22ba88ef
EB
24350if test x$gcc_cv_ld_eh_gc_sections = xyes; then
24351
5213506e 24352$as_echo "#define HAVE_LD_EH_GC_SECTIONS 1" >>confdefs.h
22ba88ef
EB
24353
24354fi
5213506e
RW
24355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections" >&5
24356$as_echo "$gcc_cv_ld_eh_gc_sections" >&6; }
22ba88ef 24357
8bb915b6
NN
24358# --------
24359# UNSORTED
24360# --------
24361
5213506e
RW
24362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
24363$as_echo_n "checking linker --as-needed support... " >&6; }
24364if test "${gcc_cv_ld_as_needed+set}" = set; then :
24365 $as_echo_n "(cached) " >&6
82e923f6
RS
24366else
24367 gcc_cv_ld_as_needed=no
765f1bf9
AM
24368if test $in_tree_ld = yes ; then
24369 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 \
24370 && test $in_tree_ld_is_elf = yes; then
24371 gcc_cv_ld_as_needed=yes
24372 fi
24373elif test x$gcc_cv_ld != x; then
24374 # Check if linker supports --as-needed and --no-as-needed options
24375 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
24376 gcc_cv_ld_as_needed=yes
24377 fi
24378fi
82e923f6
RS
24379
24380fi
5213506e
RW
24381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_as_needed" >&5
24382$as_echo "$gcc_cv_ld_as_needed" >&6; }
765f1bf9
AM
24383if test x"$gcc_cv_ld_as_needed" = xyes; then
24384
5213506e 24385$as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h
765f1bf9
AM
24386
24387fi
765f1bf9 24388
d82bf747
AM
24389case "$target:$tm_file" in
24390 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
5213506e
RW
24391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5
24392$as_echo_n "checking linker support for omitting dot symbols... " >&6; }
24393if test "${gcc_cv_ld_no_dot_syms+set}" = set; then :
24394 $as_echo_n "(cached) " >&6
85b776df
AM
24395else
24396 gcc_cv_ld_no_dot_syms=no
24397 if test $in_tree_ld = yes ; then
24398 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
24399 gcc_cv_ld_no_dot_syms=yes
24400 fi
24401 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
24402 cat > conftest1.s <<EOF
24403 .text
24404 bl .foo
24405EOF
24406 cat > conftest2.s <<EOF
24407 .section ".opd","aw"
24408 .align 3
24409 .globl foo
24410 .type foo,@function
24411foo:
24412 .quad .LEfoo,.TOC.@tocbase,0
24413 .text
24414.LEfoo:
24415 blr
24416 .size foo,.-.LEfoo
24417EOF
24418 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
24419 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
24420 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
24421 gcc_cv_ld_no_dot_syms=yes
24422 fi
24423 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
24424 fi
24425
24426fi
5213506e
RW
24427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_no_dot_syms" >&5
24428$as_echo "$gcc_cv_ld_no_dot_syms" >&6; }
85b776df
AM
24429 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
24430
5213506e 24431$as_echo "#define HAVE_LD_NO_DOT_SYMS 1" >>confdefs.h
85b776df
AM
24432
24433 fi
24434 ;;
24435esac
24436
5213506e
RW
24437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5
24438$as_echo_n "checking linker --build-id support... " >&6; }
24439if test "${gcc_cv_ld_buildid+set}" = set; then :
24440 $as_echo_n "(cached) " >&6
cd533689
PP
24441else
24442 gcc_cv_ld_buildid=no
24443 if test $in_tree_ld = yes ; then
24444 if test "$gcc_cv_gld_major_version" -eq 2 -a \
24445 "$gcc_cv_gld_minor_version" -ge 18 -o \
24446 "$gcc_cv_gld_major_version" -gt 2 \
24447 && test $in_tree_ld_is_elf = yes; then
24448 gcc_cv_ld_buildid=yes
24449 fi
24450 elif test x$gcc_cv_ld != x; then
24451 if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then
24452 gcc_cv_ld_buildid=yes
24453 fi
24454 fi
24455fi
5213506e
RW
24456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_buildid" >&5
24457$as_echo "$gcc_cv_ld_buildid" >&6; }
cd533689
PP
24458if test x"$gcc_cv_ld_buildid" = xyes; then
24459
5213506e 24460$as_echo "#define HAVE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
24461
24462fi
24463
5213506e
RW
24464# Check whether --enable-linker-build-id was given.
24465if test "${enable_linker_build_id+set}" = set; then :
24466 enableval=$enable_linker_build_id;
cd533689
PP
24467else
24468 enable_linker_build_id=no
5213506e
RW
24469fi
24470
cd533689
PP
24471
24472if test x"$enable_linker_build_id" = xyes; then
24473 if test x"$gcc_cv_ld_buildid" = xyes; then
24474
5213506e 24475$as_echo "#define ENABLE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
24476
24477 else
5213506e
RW
24478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&5
24479$as_echo "$as_me: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&2;}
cd533689
PP
24480 fi
24481fi
24482
5213506e
RW
24483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --sysroot support" >&5
24484$as_echo_n "checking linker --sysroot support... " >&6; }
24485if test "${gcc_cv_ld_sysroot+set}" = set; then :
24486 $as_echo_n "(cached) " >&6
380e5ca4
MM
24487else
24488 gcc_cv_ld_sysroot=no
24489 if test $in_tree_ld = yes ; then
24490 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 24491 gcc_cv_ld_sysroot=yes
380e5ca4
MM
24492 fi
24493 elif test x$gcc_cv_ld != x; then
24494 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
24495 gcc_cv_ld_sysroot=yes
24496 fi
24497 fi
24498fi
5213506e
RW
24499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sysroot" >&5
24500$as_echo "$gcc_cv_ld_sysroot" >&6; }
380e5ca4
MM
24501if test x"$gcc_cv_ld_sysroot" = xyes; then
24502
5213506e 24503$as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h
380e5ca4
MM
24504
24505fi
24506
9fb28a67 24507if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
24508 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
24509 && test "$prefix" != "NONE"; then
ba479fd2
NN
24510
24511cat >>confdefs.h <<_ACEOF
793e9558 24512#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 24513_ACEOF
793e9558
PB
24514
24515fi
24516
77008252 24517# Test for stack protector support in target C library.
5213506e
RW
24518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5
24519$as_echo_n "checking __stack_chk_fail in target C library... " >&6; }
24520if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
24521 $as_echo_n "(cached) " >&6
77008252
JJ
24522else
24523 gcc_cv_libc_provides_ssp=no
a6ccdbab 24524 case "$target" in
22f96a0f 24525 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
77008252
JJ
24526 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
24527 if test "x$with_sysroot" = x; then
24528 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
24529 elif test "x$with_build_sysroot" != "x"; then
24530 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
24531 elif test "x$with_sysroot" = xyes; then
24532 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
24533 else
24534 glibc_header_dir="${with_sysroot}/usr/include"
24535 fi
24536 else
24537 glibc_header_dir=/usr/include
24538 fi
24539 # glibc 2.4 and later provides __stack_chk_fail and
24540 # either __stack_chk_guard, or TLS access to stack guard canary.
24541 if test -f $glibc_header_dir/features.h \
24542 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
24543 $glibc_header_dir/features.h > /dev/null; then
24544 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
24545 $glibc_header_dir/features.h > /dev/null; then
24546 gcc_cv_libc_provides_ssp=yes
24547 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
24548 $glibc_header_dir/features.h > /dev/null \
24549 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
24550 $glibc_header_dir/features.h > /dev/null; then
24551 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
24552 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
24553 $glibc_header_dir/features.h > /dev/null && \
24554 test -f $glibc_header_dir/bits/uClibc_config.h && \
24555 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
24556 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
24557 gcc_cv_libc_provides_ssp=yes
77008252 24558 fi
fed6d628 24559 fi
a6ccdbab 24560 ;;
4cc115a2
TS
24561 *-*-gnu*)
24562 # Avoid complicated tests (see
24563 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
24564 # simply assert that glibc does provide this, which is true for all
24565 # realistically usable GNU/Hurd configurations.
24566 gcc_cv_libc_provides_ssp=yes;;
61e1d511 24567 *-*-darwin* | *-*-freebsd*)
5213506e
RW
24568 ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
24569if test "x$ac_cv_func___stack_chk_fail" = x""yes; then :
a6ccdbab
EC
24570 gcc_cv_libc_provides_ssp=yes
24571else
24572 echo "no __stack_chk_fail on this target"
77008252 24573fi
a6ccdbab
EC
24574
24575 ;;
77008252 24576 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
24577 esac
24578fi
5213506e
RW
24579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_libc_provides_ssp" >&5
24580$as_echo "$gcc_cv_libc_provides_ssp" >&6; }
a6ccdbab 24581
77008252
JJ
24582if test x$gcc_cv_libc_provides_ssp = xyes; then
24583
5213506e 24584$as_echo "#define TARGET_LIBC_PROVIDES_SSP 1" >>confdefs.h
77008252
JJ
24585
24586fi
24587
ed965309
JJ
24588# Check if TFmode long double should be used by default or not.
24589# Some glibc targets used DFmode long double, but with glibc 2.4
24590# and later they can use TFmode.
24591case "$target" in
f7cc5390
JM
24592 powerpc*-*-linux* | \
24593 powerpc*-*-gnu* | \
ed965309
JJ
24594 sparc*-*-linux* | \
24595 s390*-*-linux* | \
24596 alpha*-*-linux*)
24597
5213506e
RW
24598# Check whether --with-long-double-128 was given.
24599if test "${with_long_double_128+set}" = set; then :
24600 withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
24601else
24602 gcc_cv_target_ldbl128=no
24603 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
24604 if test "x$with_sysroot" = x; then
24605 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
24606 elif test "x$with_build_sysroot" != "x"; then
24607 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
24608 elif test "x$with_sysroot" = xyes; then
24609 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
24610 else
24611 glibc_header_dir="${with_sysroot}/usr/include"
24612 fi
24613 else
24614 glibc_header_dir=/usr/include
24615 fi
65280f6c 24616 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
24617 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
24618 && gcc_cv_target_ldbl128=yes
65280f6c 24619
5213506e
RW
24620fi
24621
ed965309
JJ
24622 ;;
24623esac
24624if test x$gcc_cv_target_ldbl128 = xyes; then
24625
5213506e 24626$as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h
ed965309
JJ
24627
24628fi
24629
81bf3d9e 24630# Find out what GC implementation we want, or may, use.
ba479fd2 24631
5213506e
RW
24632# Check whether --with-gc was given.
24633if test "${with_gc+set}" = set; then :
24634 withval=$with_gc; case "$withval" in
08cee789 24635 page)
81bf3d9e 24636 GGC=ggc-$withval
08cee789
DJ
24637 ;;
24638 zone)
24639 GGC=ggc-$withval
24640
5213506e 24641$as_echo "#define GGC_ZONE 1" >>confdefs.h
08cee789 24642
81bf3d9e
RH
24643 ;;
24644 *)
5213506e 24645 as_fn_error "$withval is an invalid option to --with-gc" "$LINENO" 5
81bf3d9e
RH
24646 ;;
24647esac
24648else
005537df 24649 GGC=ggc-page
5213506e
RW
24650fi
24651
81bf3d9e
RH
24652
24653echo "Using $GGC for garbage collection."
24654
00020c16
ILT
24655# Libraries to use on the host. This will normally be set by the top
24656# level Makefile. Here we simply capture the value for our Makefile.
24657if test -z "${HOST_LIBS+set}"; then
24658 HOST_LIBS=
24659fi
24660
24661
3c809ba4 24662# Use the system's zlib library.
b8dad04b
ZW
24663zlibdir=-L../zlib
24664zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 24665
5213506e
RW
24666# Check whether --with-system-zlib was given.
24667if test "${with_system_zlib+set}" = set; then :
24668 withval=$with_system_zlib; zlibdir=
3c809ba4
AG
24669zlibinc=
24670
5213506e
RW
24671fi
24672
b8ec3cc8 24673
703d89ab 24674
ab22c1fa 24675
1a4b763e 24676
5213506e
RW
24677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
24678$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
24679 # Check whether --enable-maintainer-mode was given.
24680if test "${enable_maintainer_mode+set}" = set; then :
24681 enableval=$enable_maintainer_mode; maintainer_mode=$enableval
dc6746e7
PT
24682else
24683 maintainer_mode=no
5213506e 24684fi
a6ccdbab 24685
5213506e
RW
24686
24687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5
24688$as_echo "$maintainer_mode" >&6; }
dc6746e7
PT
24689
24690if test "$maintainer_mode" = "yes"; then
24691 MAINT=''
24692else
24693 MAINT='#'
24694fi
24695
8bb915b6
NN
24696# --------------
24697# Language hooks
24698# --------------
24699
861bb6c1
JL
24700# Make empty files to contain the specs and options for each language.
24701# Then add #include lines to for a compiler that has specs and/or options.
24702
cc11cc9b 24703subdirs=
d7b42618 24704lang_opt_files=
861bb6c1 24705lang_specs_files=
3103b7db 24706lang_tree_files=
861bb6c1
JL
24707# These (without "all_") are set in each config-lang.in.
24708# `language' must be a single word so is spelled singularly.
24709all_languages=
861bb6c1 24710all_compilers=
47ad7893 24711all_outputs='Makefile gccbug'
861bb6c1 24712# List of language makefile fragments.
2ed26f6b
ZW
24713all_lang_makefrags=
24714# List of language subdirectory makefiles. Deprecated.
861bb6c1 24715all_lang_makefiles=
703d89ab 24716# Additional files for gengtype
ef69da62 24717all_gtfiles="$target_gtfiles"
861bb6c1 24718
cc11cc9b
PB
24719# These are the languages that are set in --enable-languages,
24720# and are available in the GCC tree.
24721all_selected_languages=
24722
861bb6c1
JL
24723# Add the language fragments.
24724# Languages are added via two mechanisms. Some information must be
24725# recorded in makefile variables, these are defined in config-lang.in.
24726# We accumulate them and plug them into the main Makefile.
24727# The other mechanism is a set of hooks for each of the main targets
24728# like `clean', `install', etc.
24729
861bb6c1 24730language_hooks="Make-hooks"
861bb6c1 24731
cc11cc9b 24732for lang in ${srcdir}/*/config-lang.in
861bb6c1 24733do
1546bb64
PB
24734 test "$lang" = "${srcdir}/*/config-lang.in" && continue
24735
cc11cc9b
PB
24736 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
24737 if test "x$lang_alias" = x
24738 then
24739 echo "$lang doesn't set \$language." 1>&2
24740 exit 1
24741 fi
24742 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
24743 subdirs="$subdirs $subdir"
349c3166
OH
24744
24745 # $gcc_subdir is where the gcc integration files are to be found
24746 # for a language, both for internal compiler purposes (compiler
24747 # sources implementing front-end to GCC tree converters), and for
24748 # build infrastructure purposes (Make-lang.in, etc.)
24749 #
24750 # This will be <subdir> (relative to $srcdir) if a line like
24751 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
24752 # is found in <langdir>/config-lang.in, and will remain <langdir>
24753 # otherwise.
24754 #
24755 # Except for the language alias (fetched above), the regular
24756 # "config-lang.in" contents are always retrieved from $gcc_subdir,
24757 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
24758 # only this and the language alias.
24759
24760 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
24761 if [ "$gcc_subdir" = "" ]; then
24762 gcc_subdir="$subdir"
24763 fi
24764
cc11cc9b
PB
24765 case ",$enable_languages," in
24766 *,$lang_alias,*)
24767 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
24768 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
24769 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
24770 fi
24771 ;;
24772 esac
24773
cc11cc9b
PB
24774 language=
24775 boot_language=
24776 compilers=
cc11cc9b
PB
24777 outputs=
24778 gtfiles=
1546bb64 24779 subdir_requires=
349c3166 24780 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
24781 if test "x$language" = x
24782 then
349c3166 24783 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
24784 exit 1
24785 fi
1546bb64
PB
24786
24787 ok=:
24788 case ",$enable_languages," in
24789 *,$lang_alias,*) ;;
24790 *)
24791 for i in $subdir_requires; do
b6348cb3 24792 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
24793 ok=false
24794 break
24795 done
24796 ;;
24797 esac
24798 $ok || continue
24799
349c3166
OH
24800 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
24801 if test -f $srcdir/$gcc_subdir/lang.opt; then
24802 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 24803 fi
349c3166
OH
24804 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
24805 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 24806 fi
349c3166
OH
24807 if test -f ${srcdir}/$gcc_subdir/Makefile.in
24808 then all_lang_makefiles="$gcc_subdir/Makefile"
cc11cc9b
PB
24809 fi
24810 all_languages="$all_languages $language"
cc11cc9b 24811 all_compilers="$all_compilers $compilers"
cc11cc9b 24812 all_outputs="$all_outputs $outputs"
703d89ab 24813 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
d7f09764
DN
24814 case ",$enable_languages," in
24815 *,lto,*)
24816
24817$as_echo "#define ENABLE_LTO 1" >>confdefs.h
24818
24819 enable_lto=yes
24820
24821 ;;
24822 *) ;;
24823 esac
861bb6c1
JL
24824done
24825
8ac9d31f
TJ
24826# Pick up gtfiles for c
24827gtfiles=
8ac9d31f 24828. ${srcdir}/c-config-lang.in
703d89ab 24829all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 24830
cbc59f01 24831check_languages=
cc11cc9b 24832for language in $all_selected_languages
cbc59f01 24833do
cc11cc9b 24834 check_languages="$check_languages check-$language"
cbc59f01
DD
24835done
24836
62b81e45 24837# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 24838# lang.${target}. Only do so for selected languages.
861bb6c1
JL
24839
24840rm -f Make-hooks
24841touch Make-hooks
bd97af06 24842target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
24843 install-common install-man install-info install-pdf dvi pdf \
24844 html uninstall info man srcextra srcman srcinfo \
2a4c0366 24845 mostlyclean clean distclean maintainer-clean install-plugin"
cc11cc9b 24846
861bb6c1
JL
24847for t in $target_list
24848do
24849 x=
cc11cc9b 24850 for lang in $all_selected_languages
861bb6c1 24851 do
cc11cc9b 24852 x="$x $lang.$t"
861bb6c1
JL
24853 done
24854 echo "lang.$t: $x" >> Make-hooks
24855done
24856
8bb915b6
NN
24857# --------
24858# UNSORTED
24859# --------
24860
cc06d68c 24861# Create .gdbinit.
861bb6c1 24862
cc06d68c
GP
24863echo "dir ." > .gdbinit
24864echo "dir ${srcdir}" >> .gdbinit
24865if test x$gdb_needs_out_file_path = xyes
24866then
24867 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
24868fi
24869if test "x$subdirs" != x; then
24870 for s in $subdirs
24871 do
24872 echo "dir ${srcdir}/$s" >> .gdbinit
24873 done
861bb6c1 24874fi
cc06d68c 24875echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 24876
15c723f3 24877gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
24878
24879
2ce3c6c6 24880
2bbea3a6
RH
24881# Find a directory in which to install a shared libgcc.
24882
5213506e
RW
24883# Check whether --enable-version-specific-runtime-libs was given.
24884if test "${enable_version_specific_runtime_libs+set}" = set; then :
24885 enableval=$enable_version_specific_runtime_libs;
24886fi
ba479fd2 24887
2bbea3a6
RH
24888
24889
5213506e
RW
24890# Check whether --with-slibdir was given.
24891if test "${with_slibdir+set}" = set; then :
24892 withval=$with_slibdir; slibdir="$with_slibdir"
5b15f277
RH
24893else
24894 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 24895 slibdir='$(libsubdir)'
5b15f277 24896elif test "$host" != "$target"; then
2bbea3a6
RH
24897 slibdir='$(build_tooldir)/lib'
24898else
5b15f277 24899 slibdir='$(libdir)'
2bbea3a6 24900fi
5213506e
RW
24901fi
24902
2bbea3a6
RH
24903
24904
703d89ab 24905# Substitute configuration variables
861bb6c1
JL
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
9b16d2c4 24950
e9a25f70 24951
6e26218f 24952
c8724862 24953
11642c3a
ZW
24954
24955
24956
3d9d2476 24957
e2500fed 24958
a0e527e3 24959
aca600aa
AS
24960
24961
24962
c776a6d0 24963
207bf79d 24964
51b9ff45 24965
861bb6c1 24966
6e3f3080
NN
24967# Echo link setup.
24968if test x${build} = x${host} ; then
24969 if test x${host} = x${target} ; then
24970 echo "Links are now set up to build a native compiler for ${target}." 1>&2
24971 else
24972 echo "Links are now set up to build a cross-compiler" 1>&2
24973 echo " from ${host} to ${target}." 1>&2
24974 fi
24975else
24976 if test x${host} = x${target} ; then
24977 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
24978 echo " for ${target}." 1>&2
24979 else
24980 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
24981 echo " from ${host} to ${target}." 1>&2
24982 fi
24983fi
24984
6de9cd9a
DN
24985
24986
24987
acd26225
KG
24988case "${GMPLIBS}" in
24989 *-lmpc*)
5213506e 24990$as_echo "#define HAVE_mpc 1" >>confdefs.h
acd26225
KG
24991 ;;
24992esac
24993
f8bf9252
SP
24994
24995
24996
24997
24998
24999if test "x${CLOOGLIBS}" != "x" ; then
25000
5213506e 25001$as_echo "#define HAVE_cloog 1" >>confdefs.h
f8bf9252 25002
f8bf9252
SP
25003fi
25004
d7f09764
DN
25005
25006
25007if test "x${LIBELFLIBS}" != "x" ; then
25008
25009$as_echo "#define HAVE_libelf 1" >>confdefs.h
25010
25011fi
25012
68a607d8 25013# Check for plugin support
5213506e
RW
25014# Check whether --enable-plugin was given.
25015if test "${enable_plugin+set}" = set; then :
25016 enableval=$enable_plugin; enable_plugin=$enableval
68a607d8
DN
25017else
25018 enable_plugin=yes; default_plugin=yes
5213506e
RW
25019fi
25020
68a607d8
DN
25021
25022pluginlibs=
25023if test x"$enable_plugin" = x"yes"; then
25024 # Check that the host supports -rdynamic and -ldl
25025 have_rdynamic=no
25026 have_dl=no
25027 saved_LDFLAGS="$LDFLAGS"
25028 saved_LIBS="$LIBS"
25029 LIBS=
25030
25031 # Check -rdynamic
25032 LDFLAGS="$LDFLAGS -rdynamic"
5213506e
RW
25033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5
25034$as_echo_n "checking for -rdynamic... " >&6; }
25035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8
DN
25036/* end confdefs.h. */
25037
25038int
25039main ()
25040{
25041return 0;
25042 ;
25043 return 0;
25044}
25045_ACEOF
5213506e
RW
25046if ac_fn_c_try_link "$LINENO"; then :
25047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25048$as_echo "yes" >&6; }; have_rdynamic=yes
68a607d8 25049else
5213506e
RW
25050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25051$as_echo "no" >&6; }
68a607d8 25052fi
5213506e
RW
25053rm -f core conftest.err conftest.$ac_objext \
25054 conftest$ac_exeext conftest.$ac_ext
68a607d8
DN
25055 if test x"$have_rdynamic" = x"yes" ; then
25056 pluginlibs="-rdynamic"
25057 fi
25058
25059 # Check -ldl
0c2edd9f
ILT
25060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
25061$as_echo_n "checking for library containing dlopen... " >&6; }
25062if test "${ac_cv_search_dlopen+set}" = set; then :
25063 $as_echo_n "(cached) " >&6
25064else
25065 ac_func_search_save_LIBS=$LIBS
25066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8 25067/* end confdefs.h. */
0c2edd9f
ILT
25068
25069/* Override any GCC internal prototype to avoid an error.
25070 Use char because int might match the return type of a GCC
25071 builtin and then its argument prototype would still apply. */
25072#ifdef __cplusplus
25073extern "C"
25074#endif
25075char dlopen ();
68a607d8
DN
25076int
25077main ()
25078{
0c2edd9f 25079return dlopen ();
68a607d8
DN
25080 ;
25081 return 0;
25082}
25083_ACEOF
0c2edd9f
ILT
25084for ac_lib in '' dl; do
25085 if test -z "$ac_lib"; then
25086 ac_res="none required"
25087 else
25088 ac_res=-l$ac_lib
25089 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25090 fi
25091 if ac_fn_c_try_link "$LINENO"; then :
25092 ac_cv_search_dlopen=$ac_res
68a607d8 25093fi
5213506e 25094rm -f core conftest.err conftest.$ac_objext \
0c2edd9f
ILT
25095 conftest$ac_exeext
25096 if test "${ac_cv_search_dlopen+set}" = set; then :
25097 break
25098fi
25099done
25100if test "${ac_cv_search_dlopen+set}" = set; then :
25101
25102else
25103 ac_cv_search_dlopen=no
25104fi
25105rm conftest.$ac_ext
25106LIBS=$ac_func_search_save_LIBS
25107fi
25108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
25109$as_echo "$ac_cv_search_dlopen" >&6; }
25110ac_res=$ac_cv_search_dlopen
25111if test "$ac_res" != no; then :
25112 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25113
25114fi
25115
25116 if test x"$ac_cv_search_dlopen" = x"-ldl"; then
68a607d8
DN
25117 pluginlibs="$pluginlibs -ldl"
25118 fi
25119
25120 # Check that we can build shared objects with -fPIC -shared
25121 LDFLAGS="$LDFLAGS -fPIC -shared"
5213506e
RW
25122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
25123$as_echo_n "checking for -fPIC -shared... " >&6; }
25124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8
DN
25125/* end confdefs.h. */
25126extern int X;
25127int
25128main ()
25129{
25130return X == 0;
25131 ;
25132 return 0;
25133}
25134_ACEOF
5213506e
RW
25135if ac_fn_c_try_link "$LINENO"; then :
25136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25137$as_echo "yes" >&6; }; have_pic_shared=yes
68a607d8 25138else
5213506e
RW
25139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25140$as_echo "no" >&6; }; have_pic_shared=no
68a607d8 25141fi
5213506e
RW
25142rm -f core conftest.err conftest.$ac_objext \
25143 conftest$ac_exeext conftest.$ac_ext
0c2edd9f 25144 if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
68a607d8
DN
25145 pluginlibs=
25146 enable_plugin=no
25147 fi
25148
25149 # If plugin support had been requested but not available, fail.
25150 if test x"$enable_plugin" = x"no" ; then
25151 if test x"$default_plugin" != x"yes"; then
5213506e 25152 as_fn_error "
68a607d8 25153Building GCC with plugin support requires a host that supports
5213506e 25154-fPIC, -shared, -ldl and -rdynamic." "$LINENO" 5
68a607d8
DN
25155 fi
25156 fi
25157
25158 LDFLAGS="$saved_LDFLAGS"
25159 LIBS="$saved_LIBS"
25160fi
25161
25162
25163
25164if test x"$enable_plugin" = x"yes"; then
25165
5213506e 25166$as_echo "#define ENABLE_PLUGIN 1" >>confdefs.h
68a607d8
DN
25167
25168fi
25169
6e3f3080
NN
25170# Configure the subdirectories
25171# AC_CONFIG_SUBDIRS($subdirs)
25172
25173# Create the Makefile
25174# and configure language subdirectories
5213506e 25175ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
25176
25177
5213506e 25178ac_config_commands="$ac_config_commands default"
914c5af7 25179
ba479fd2 25180cat >confcache <<\_ACEOF
6e3f3080
NN
25181# This file is a shell script that caches the results of configure
25182# tests run on this system so they can be shared between configure
ba479fd2
NN
25183# scripts and configure runs, see configure's option --config-cache.
25184# It is not useful on other systems. If it contains results you don't
25185# want to keep, you may remove or edit it.
6e3f3080 25186#
ba479fd2
NN
25187# config.status only pays attention to the cache file if you give it
25188# the --recheck option to rerun configure.
6e3f3080 25189#
ba479fd2
NN
25190# `ac_cv_env_foo' variables (set or unset) will be overridden when
25191# loading this file, other *unset* `ac_cv_foo' will be assigned the
25192# following values.
25193
25194_ACEOF
25195
6e3f3080
NN
25196# The following way of writing the cache mishandles newlines in values,
25197# but we know of no workaround that is simple, portable, and efficient.
5213506e 25198# So, we kill variables containing newlines.
6e3f3080
NN
25199# Ultrix sh set writes to stderr and can't be redirected directly,
25200# and sets the high bit in the cache file unless we assign to the vars.
5213506e
RW
25201(
25202 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25203 eval ac_val=\$$ac_var
25204 case $ac_val in #(
25205 *${as_nl}*)
25206 case $ac_var in #(
25207 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25208$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25209 esac
25210 case $ac_var in #(
25211 _ | IFS | as_nl) ;; #(
25212 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25213 *) { eval $ac_var=; unset $ac_var;} ;;
25214 esac ;;
25215 esac
25216 done
25217
ba479fd2 25218 (set) 2>&1 |
5213506e
RW
25219 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25220 *${as_nl}ac_space=\ *)
25221 # `set' does not quote correctly, so add quotes: double-quote
25222 # substitution turns \\\\ into \\, and sed turns \\ into \.
ba479fd2 25223 sed -n \
86da66b5
HPN
25224 "s/'/'\\\\''/g;
25225 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5213506e 25226 ;; #(
ba479fd2
NN
25227 *)
25228 # `set' quotes correctly as required by POSIX, so do not add quotes.
5213506e 25229 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 25230 ;;
5213506e
RW
25231 esac |
25232 sort
25233) |
ba479fd2 25234 sed '
5213506e 25235 /^ac_cv_env_/b end
ba479fd2 25236 t clear
5213506e 25237 :clear
ba479fd2
NN
25238 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25239 t end
5213506e
RW
25240 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25241 :end' >>confcache
25242if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25243 if test -w "$cache_file"; then
25244 test "x$cache_file" != "x/dev/null" &&
25245 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25246$as_echo "$as_me: updating cache $cache_file" >&6;}
ba479fd2 25247 cat confcache >$cache_file
6e3f3080 25248 else
5213506e
RW
25249 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25250$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6e3f3080
NN
25251 fi
25252fi
25253rm -f confcache
25254
25255test "x$prefix" = xNONE && prefix=$ac_default_prefix
25256# Let make expand exec_prefix.
25257test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25258
63cf211a 25259DEFS=-DHAVE_CONFIG_H
6e3f3080 25260
ba479fd2
NN
25261ac_libobjs=
25262ac_ltlibobjs=
25263for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25264 # 1. Remove the extension, and $U if already installed.
5213506e
RW
25265 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25266 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25267 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25268 # will be set to the directory where LIBOBJS objects are built.
25269 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25270 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
ba479fd2
NN
25271done
25272LIBOBJS=$ac_libobjs
63cf211a 25273
ba479fd2
NN
25274LTLIBOBJS=$ac_ltlibobjs
25275
25276
25277
5213506e 25278
ba479fd2 25279: ${CONFIG_STATUS=./config.status}
5213506e 25280ac_write_fail=0
ba479fd2
NN
25281ac_clean_files_save=$ac_clean_files
25282ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5213506e
RW
25283{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25284$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25285as_write_fail=0
25286cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
ba479fd2
NN
25287#! $SHELL
25288# Generated by $as_me.
6e3f3080
NN
25289# Run this file to recreate the current configuration.
25290# Compiler output produced by configure, useful for debugging
ba479fd2 25291# configure, is in config.log if it exists.
6e3f3080 25292
ba479fd2
NN
25293debug=false
25294ac_cs_recheck=false
25295ac_cs_silent=false
ba479fd2 25296
5213506e
RW
25297SHELL=\${CONFIG_SHELL-$SHELL}
25298export SHELL
25299_ASEOF
25300cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25301## -------------------- ##
25302## M4sh Initialization. ##
25303## -------------------- ##
ba479fd2 25304
5213506e
RW
25305# Be more Bourne compatible
25306DUALCASE=1; export DUALCASE # for MKS sh
25307if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
ba479fd2
NN
25308 emulate sh
25309 NULLCMD=:
5213506e 25310 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
ba479fd2
NN
25311 # is contrary to our usage. Disable this feature.
25312 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
25313 setopt NO_GLOB_SUBST
25314else
25315 case `(set -o) 2>/dev/null` in #(
25316 *posix*) :
25317 set -o posix ;; #(
25318 *) :
25319 ;;
25320esac
2f41c1d6 25321fi
ab22c1fa 25322
5213506e
RW
25323
25324as_nl='
25325'
25326export as_nl
25327# Printing a long string crashes Solaris 7 /usr/bin/printf.
25328as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25329as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25330as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25331# Prefer a ksh shell builtin over an external printf program on Solaris,
25332# but without wasting forks for bash or zsh.
25333if test -z "$BASH_VERSION$ZSH_VERSION" \
25334 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25335 as_echo='print -r --'
25336 as_echo_n='print -rn --'
25337elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25338 as_echo='printf %s\n'
25339 as_echo_n='printf %s'
25340else
25341 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25342 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25343 as_echo_n='/usr/ucb/echo -n'
25344 else
25345 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25346 as_echo_n_body='eval
25347 arg=$1;
25348 case $arg in #(
25349 *"$as_nl"*)
25350 expr "X$arg" : "X\\(.*\\)$as_nl";
25351 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25352 esac;
25353 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25354 '
25355 export as_echo_n_body
25356 as_echo_n='sh -c $as_echo_n_body as_echo'
25357 fi
25358 export as_echo_body
25359 as_echo='sh -c $as_echo_body as_echo'
25360fi
25361
25362# The user is always right.
25363if test "${PATH_SEPARATOR+set}" != set; then
25364 PATH_SEPARATOR=:
25365 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25366 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25367 PATH_SEPARATOR=';'
25368 }
1a4b763e
BS
25369fi
25370
ab22c1fa 25371
5213506e
RW
25372# IFS
25373# We need space, tab and new line, in precisely that order. Quoting is
25374# there to prevent editors from complaining about space-tab.
25375# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25376# splitting by setting IFS to empty value.)
25377IFS=" "" $as_nl"
25378
25379# Find who we are. Look in the path if we contain no directory separator.
25380case $0 in #((
25381 *[\\/]* ) as_myself=$0 ;;
25382 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25383for as_dir in $PATH
25384do
25385 IFS=$as_save_IFS
25386 test -z "$as_dir" && as_dir=.
25387 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25388 done
25389IFS=$as_save_IFS
25390
25391 ;;
25392esac
25393# We did not find ourselves, most probably we were run as `sh COMMAND'
25394# in which case we are not to be found in the path.
25395if test "x$as_myself" = x; then
25396 as_myself=$0
25397fi
25398if test ! -f "$as_myself"; then
25399 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25400 exit 1
25401fi
25402
25403# Unset variables that we do not need and which cause bugs (e.g. in
25404# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
25405# suppresses any "Segmentation fault" message there. '((' could
25406# trigger a bug in pdksh 5.2.14.
25407for as_var in BASH_ENV ENV MAIL MAILPATH
25408do eval test x\${$as_var+set} = xset \
25409 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25410done
1a4b763e
BS
25411PS1='$ '
25412PS2='> '
25413PS4='+ '
25414
25415# NLS nuisances.
5213506e
RW
25416LC_ALL=C
25417export LC_ALL
25418LANGUAGE=C
25419export LANGUAGE
25420
25421# CDPATH.
25422(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25423
25424
25425# as_fn_error ERROR [LINENO LOG_FD]
25426# ---------------------------------
25427# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25428# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25429# script with status $?, using 1 if that was 0.
25430as_fn_error ()
25431{
25432 as_status=$?; test $as_status -eq 0 && as_status=1
25433 if test "$3"; then
25434 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25435 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
1a4b763e 25436 fi
5213506e
RW
25437 $as_echo "$as_me: error: $1" >&2
25438 as_fn_exit $as_status
25439} # as_fn_error
25440
25441
25442# as_fn_set_status STATUS
25443# -----------------------
25444# Set $? to STATUS, without forking.
25445as_fn_set_status ()
25446{
25447 return $1
25448} # as_fn_set_status
25449
25450# as_fn_exit STATUS
25451# -----------------
25452# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25453as_fn_exit ()
25454{
25455 set +e
25456 as_fn_set_status $1
25457 exit $1
25458} # as_fn_exit
25459
25460# as_fn_unset VAR
25461# ---------------
25462# Portably unset VAR.
25463as_fn_unset ()
25464{
25465 { eval $1=; unset $1;}
25466}
25467as_unset=as_fn_unset
25468# as_fn_append VAR VALUE
25469# ----------------------
25470# Append the text in VALUE to the end of the definition contained in VAR. Take
25471# advantage of any shell optimizations that allow amortized linear growth over
25472# repeated appends, instead of the typical quadratic growth present in naive
25473# implementations.
25474if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25475 eval 'as_fn_append ()
25476 {
25477 eval $1+=\$2
25478 }'
25479else
25480 as_fn_append ()
25481 {
25482 eval $1=\$$1\$2
25483 }
25484fi # as_fn_append
25485
25486# as_fn_arith ARG...
25487# ------------------
25488# Perform arithmetic evaluation on the ARGs, and store the result in the
25489# global $as_val. Take advantage of shells that can avoid forks. The arguments
25490# must be portable across $(()) and expr.
25491if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25492 eval 'as_fn_arith ()
25493 {
25494 as_val=$(( $* ))
25495 }'
25496else
25497 as_fn_arith ()
25498 {
25499 as_val=`expr "$@" || test $? -eq 1`
25500 }
25501fi # as_fn_arith
1a4b763e 25502
5213506e
RW
25503
25504if expr a : '\(a\)' >/dev/null 2>&1 &&
25505 test "X`expr 00001 : '.*\(...\)'`" = X001; then
1a4b763e
BS
25506 as_expr=expr
25507else
25508 as_expr=false
25509fi
25510
5213506e 25511if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1a4b763e
BS
25512 as_basename=basename
25513else
25514 as_basename=false
25515fi
25516
5213506e
RW
25517if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25518 as_dirname=dirname
25519else
25520 as_dirname=false
25521fi
1a4b763e 25522
5213506e 25523as_me=`$as_basename -- "$0" ||
1a4b763e
BS
25524$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25525 X"$0" : 'X\(//\)$' \| \
5213506e
RW
25526 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25527$as_echo X/"$0" |
25528 sed '/^.*\/\([^/][^/]*\)\/*$/{
25529 s//\1/
25530 q
25531 }
25532 /^X\/\(\/\/\)$/{
25533 s//\1/
25534 q
25535 }
25536 /^X\/\(\/\).*/{
25537 s//\1/
25538 q
25539 }
25540 s/.*/./; q'`
b61ff9c8 25541
b61ff9c8
BS
25542# Avoid depending upon Character Ranges.
25543as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25544as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25545as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25546as_cr_digits='0123456789'
25547as_cr_alnum=$as_cr_Letters$as_cr_digits
25548
5213506e
RW
25549ECHO_C= ECHO_N= ECHO_T=
25550case `echo -n x` in #(((((
25551-n*)
25552 case `echo 'xy\c'` in
25553 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25554 xy) ECHO_C='\c';;
25555 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
25556 ECHO_T=' ';;
25557 esac;;
25558*)
25559 ECHO_N='-n';;
ba479fd2
NN
25560esac
25561
ba479fd2 25562rm -f conf$$ conf$$.exe conf$$.file
5213506e
RW
25563if test -d conf$$.dir; then
25564 rm -f conf$$.dir/conf$$.file
25565else
25566 rm -f conf$$.dir
25567 mkdir conf$$.dir 2>/dev/null
25568fi
25569if (echo >conf$$.file) 2>/dev/null; then
25570 if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8 25571 as_ln_s='ln -s'
5213506e
RW
25572 # ... but there are two gotchas:
25573 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25574 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25575 # In both cases, we have to default to `cp -p'.
25576 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25577 as_ln_s='cp -p'
25578 elif ln conf$$.file conf$$ 2>/dev/null; then
25579 as_ln_s=ln
25580 else
25581 as_ln_s='cp -p'
b61ff9c8 25582 fi
ba479fd2
NN
25583else
25584 as_ln_s='cp -p'
25585fi
5213506e
RW
25586rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25587rmdir conf$$.dir 2>/dev/null
25588
25589
25590# as_fn_mkdir_p
25591# -------------
25592# Create "$as_dir" as a directory, including parents if necessary.
25593as_fn_mkdir_p ()
25594{
25595
25596 case $as_dir in #(
25597 -*) as_dir=./$as_dir;;
25598 esac
25599 test -d "$as_dir" || eval $as_mkdir_p || {
25600 as_dirs=
25601 while :; do
25602 case $as_dir in #(
25603 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25604 *) as_qdir=$as_dir;;
25605 esac
25606 as_dirs="'$as_qdir' $as_dirs"
25607 as_dir=`$as_dirname -- "$as_dir" ||
25608$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25609 X"$as_dir" : 'X\(//\)[^/]' \| \
25610 X"$as_dir" : 'X\(//\)$' \| \
25611 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25612$as_echo X"$as_dir" |
25613 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25614 s//\1/
25615 q
25616 }
25617 /^X\(\/\/\)[^/].*/{
25618 s//\1/
25619 q
25620 }
25621 /^X\(\/\/\)$/{
25622 s//\1/
25623 q
25624 }
25625 /^X\(\/\).*/{
25626 s//\1/
25627 q
25628 }
25629 s/.*/./; q'`
25630 test -d "$as_dir" && break
25631 done
25632 test -z "$as_dirs" || eval "mkdir $as_dirs"
25633 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25634
ba479fd2 25635
5213506e 25636} # as_fn_mkdir_p
ba479fd2 25637if mkdir -p . 2>/dev/null; then
5213506e 25638 as_mkdir_p='mkdir -p "$as_dir"'
ba479fd2 25639else
86da66b5 25640 test -d ./-p && rmdir ./-p
ba479fd2
NN
25641 as_mkdir_p=false
25642fi
25643
5213506e
RW
25644if test -x / >/dev/null 2>&1; then
25645 as_test_x='test -x'
25646else
25647 if ls -dL / >/dev/null 2>&1; then
25648 as_ls_L_option=L
25649 else
25650 as_ls_L_option=
25651 fi
25652 as_test_x='
25653 eval sh -c '\''
25654 if test -d "$1"; then
25655 test -d "$1/.";
25656 else
25657 case $1 in #(
25658 -*)set "./$1";;
25659 esac;
25660 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25661 ???[sx]*):;;*)false;;esac;fi
25662 '\'' sh
25663 '
25664fi
25665as_executable_p=$as_test_x
ba479fd2
NN
25666
25667# Sed expression to map a string onto a valid CPP name.
86da66b5 25668as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
25669
25670# Sed expression to map a string onto a valid variable name.
86da66b5 25671as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
25672
25673
ba479fd2 25674exec 6>&1
5213506e
RW
25675## ----------------------------------- ##
25676## Main body of $CONFIG_STATUS script. ##
25677## ----------------------------------- ##
25678_ASEOF
25679test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
ba479fd2 25680
5213506e
RW
25681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25682# Save the log message, to keep $0 and so on meaningful, and to
ba479fd2 25683# report actual input values of CONFIG_FILES etc. instead of their
5213506e
RW
25684# values after options handling.
25685ac_log="
ba479fd2 25686This file was extended by $as_me, which was
5213506e 25687generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2
NN
25688
25689 CONFIG_FILES = $CONFIG_FILES
25690 CONFIG_HEADERS = $CONFIG_HEADERS
25691 CONFIG_LINKS = $CONFIG_LINKS
25692 CONFIG_COMMANDS = $CONFIG_COMMANDS
25693 $ $0 $@
25694
5213506e
RW
25695on `(hostname || uname -n) 2>/dev/null | sed 1q`
25696"
25697
ba479fd2
NN
25698_ACEOF
25699
5213506e
RW
25700case $ac_config_files in *"
25701"*) set x $ac_config_files; shift; ac_config_files=$*;;
25702esac
2f41c1d6 25703
5213506e
RW
25704case $ac_config_headers in *"
25705"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25706esac
b61ff9c8 25707
b61ff9c8 25708
5213506e
RW
25709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25710# Files that config.status was made for.
25711config_files="$ac_config_files"
25712config_headers="$ac_config_headers"
25713config_commands="$ac_config_commands"
ba479fd2 25714
5213506e 25715_ACEOF
b61ff9c8 25716
5213506e 25717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2 25718ac_cs_usage="\
5213506e
RW
25719\`$as_me' instantiates files and other configuration actions
25720from templates according to the current configuration. Unless the files
25721and actions are specified as TAGs, all are instantiated by default.
ba479fd2 25722
5213506e 25723Usage: $0 [OPTION]... [TAG]...
ba479fd2
NN
25724
25725 -h, --help print this help, then exit
5213506e
RW
25726 -V, --version print version number and configuration settings, then exit
25727 -q, --quiet, --silent
25728 do not print progress messages
ba479fd2
NN
25729 -d, --debug don't remove temporary files
25730 --recheck update $as_me by reconfiguring in the same conditions
5213506e
RW
25731 --file=FILE[:TEMPLATE]
25732 instantiate the configuration file FILE
25733 --header=FILE[:TEMPLATE]
25734 instantiate the configuration header FILE
ba479fd2
NN
25735
25736Configuration files:
25737$config_files
25738
25739Configuration headers:
25740$config_headers
25741
25742Configuration commands:
25743$config_commands
25744
5213506e 25745Report bugs to the package provider."
b61ff9c8 25746
5213506e
RW
25747_ACEOF
25748cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2
NN
25749ac_cs_version="\\
25750config.status
5213506e
RW
25751configured by $0, generated by GNU Autoconf 2.64,
25752 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 25753
5213506e 25754Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
25755This config.status script is free software; the Free Software Foundation
25756gives unlimited permission to copy, distribute and modify it."
5213506e
RW
25757
25758ac_pwd='$ac_pwd'
25759srcdir='$srcdir'
25760AWK='$AWK'
25761test -n "\$AWK" || AWK=awk
ba479fd2
NN
25762_ACEOF
25763
5213506e
RW
25764cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25765# The default lists apply if the user does not specify any file.
ba479fd2
NN
25766ac_need_defaults=:
25767while test $# != 0
25768do
25769 case $1 in
25770 --*=*)
5213506e
RW
25771 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25772 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ba479fd2
NN
25773 ac_shift=:
25774 ;;
5213506e 25775 *)
ba479fd2
NN
25776 ac_option=$1
25777 ac_optarg=$2
25778 ac_shift=shift
25779 ;;
ba479fd2
NN
25780 esac
25781
25782 case $ac_option in
25783 # Handling of the options.
ba479fd2
NN
25784 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25785 ac_cs_recheck=: ;;
5213506e
RW
25786 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25787 $as_echo "$ac_cs_version"; exit ;;
25788 --debug | --debu | --deb | --de | --d | -d )
ba479fd2
NN
25789 debug=: ;;
25790 --file | --fil | --fi | --f )
25791 $ac_shift
5213506e
RW
25792 case $ac_optarg in
25793 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25794 esac
25795 as_fn_append CONFIG_FILES " '$ac_optarg'"
ba479fd2
NN
25796 ac_need_defaults=false;;
25797 --header | --heade | --head | --hea )
25798 $ac_shift
5213506e
RW
25799 case $ac_optarg in
25800 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25801 esac
25802 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ba479fd2 25803 ac_need_defaults=false;;
5213506e
RW
25804 --he | --h)
25805 # Conflict between --help and --header
25806 as_fn_error "ambiguous option: \`$1'
25807Try \`$0 --help' for more information.";;
25808 --help | --hel | -h )
25809 $as_echo "$ac_cs_usage"; exit ;;
ba479fd2
NN
25810 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25811 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25812 ac_cs_silent=: ;;
25813
25814 # This is an error.
5213506e
RW
25815 -*) as_fn_error "unrecognized option: \`$1'
25816Try \`$0 --help' for more information." ;;
ba479fd2 25817
5213506e
RW
25818 *) as_fn_append ac_config_targets " $1"
25819 ac_need_defaults=false ;;
ba479fd2
NN
25820
25821 esac
25822 shift
6e3f3080 25823done
ba479fd2
NN
25824
25825ac_configure_extra_args=
25826
25827if $ac_cs_silent; then
25828 exec 6>/dev/null
25829 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
25830fi
25831
ba479fd2 25832_ACEOF
5213506e 25833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 25834if \$ac_cs_recheck; then
5213506e
RW
25835 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25836 shift
25837 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25838 CONFIG_SHELL='$SHELL'
25839 export CONFIG_SHELL
25840 exec "\$@"
ba479fd2 25841fi
861bb6c1 25842
ba479fd2 25843_ACEOF
5213506e
RW
25844cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25845exec 5>>config.log
25846{
25847 echo
25848 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25849## Running $as_me. ##
25850_ASBOX
25851 $as_echo "$ac_log"
25852} >&5
ba479fd2 25853
5213506e
RW
25854_ACEOF
25855cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 25856#
5213506e 25857# INIT-COMMANDS
ba479fd2 25858#
ba479fd2 25859subdirs='$subdirs'
ba479fd2
NN
25860
25861_ACEOF
25862
5213506e 25863cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1a4b763e 25864
5213506e 25865# Handling of arguments.
ba479fd2
NN
25866for ac_config_target in $ac_config_targets
25867do
5213506e
RW
25868 case $ac_config_target in
25869 "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
25870 "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
25871 "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
25872 "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
25873 "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
25874 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25875
25876 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
861bb6c1 25877 esac
ba479fd2
NN
25878done
25879
5213506e 25880
ba479fd2
NN
25881# If the user did not use the arguments to specify the items to instantiate,
25882# then the envvar interface is used. Set only those that are not.
25883# We use the long form for the default assignment because of an extremely
25884# bizarre bug on SunOS 4.1.3.
25885if $ac_need_defaults; then
25886 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25887 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25888 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25889fi
25890
25891# Have a temporary directory for convenience. Make it in the build tree
5213506e 25892# simply because there is no reason against having it here, and in addition,
ba479fd2 25893# creating and moving files from /tmp can sometimes cause problems.
5213506e
RW
25894# Hook for its removal unless debugging.
25895# Note that there is a small window in which the directory will not be cleaned:
25896# after its creation but before its name has been assigned to `$tmp'.
ba479fd2
NN
25897$debug ||
25898{
5213506e
RW
25899 tmp=
25900 trap 'exit_status=$?
25901 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25902' 0
25903 trap 'as_fn_exit 1' 1 2 13 15
ba479fd2 25904}
ba479fd2 25905# Create a (secure) tmp directory for tmp files.
6e3f3080 25906
ba479fd2 25907{
5213506e 25908 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ba479fd2
NN
25909 test -n "$tmp" && test -d "$tmp"
25910} ||
25911{
5213506e
RW
25912 tmp=./conf$$-$RANDOM
25913 (umask 077 && mkdir "$tmp")
25914} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25915
25916# Set up the scripts for CONFIG_FILES section.
25917# No need to generate them if there are no CONFIG_FILES.
25918# This happens for instance with `./config.status config.h'.
25919if test -n "$CONFIG_FILES"; then
25920
25921if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
25922 ac_cs_awk_getline=:
25923 ac_cs_awk_pipe_init=
25924 ac_cs_awk_read_file='
25925 while ((getline aline < (F[key])) > 0)
25926 print(aline)
25927 close(F[key])'
25928 ac_cs_awk_pipe_fini=
25929else
25930 ac_cs_awk_getline=false
25931 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
25932 ac_cs_awk_read_file='
25933 print "|#_!!_#|"
25934 print "cat " F[key] " &&"
25935 '$ac_cs_awk_pipe_init
25936 # The final `:' finishes the AND list.
25937 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
25938fi
25939ac_cr=`echo X | tr X '\015'`
25940# On cygwin, bash can eat \r inside `` if the user requested igncr.
25941# But we know of no other shell where ac_cr would be empty at this
25942# point, so we can use a bashism as a fallback.
25943if test "x$ac_cr" = x; then
25944 eval ac_cr=\$\'\\r\'
25945fi
25946ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25947if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25948 ac_cs_awk_cr='\r'
25949else
25950 ac_cs_awk_cr=$ac_cr
25951fi
25952
25953echo 'BEGIN {' >"$tmp/subs1.awk" &&
25954_ACEOF
25955
25956# Create commands to substitute file output variables.
ba479fd2 25957{
5213506e
RW
25958 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
25959 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
25960 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
25961 echo "_ACAWK" &&
25962 echo "_ACEOF"
25963} >conf$$files.sh &&
25964. ./conf$$files.sh ||
25965 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25966rm -f conf$$files.sh
ba479fd2 25967
5213506e
RW
25968{
25969 echo "cat >conf$$subs.awk <<_ACEOF" &&
25970 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25971 echo "_ACEOF"
25972} >conf$$subs.sh ||
25973 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25974ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25975ac_delim='%!_!# '
25976for ac_last_try in false false false false false :; do
25977 . ./conf$$subs.sh ||
25978 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25979
25980 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25981 if test $ac_delim_n = $ac_delim_num; then
25982 break
25983 elif $ac_last_try; then
25984 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25985 else
25986 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25987 fi
25988done
25989rm -f conf$$subs.sh
25990
25991cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25992cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25993_ACEOF
25994sed -n '
25995h
25996s/^/S["/; s/!.*/"]=/
25997p
25998g
25999s/^[^!]*!//
26000:repl
26001t repl
26002s/'"$ac_delim"'$//
26003t delim
26004:nl
26005h
26006s/\(.\{148\}\).*/\1/
26007t more1
26008s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26009p
26010n
26011b repl
26012:more1
26013s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26014p
26015g
26016s/.\{148\}//
26017t nl
26018:delim
26019h
26020s/\(.\{148\}\).*/\1/
26021t more2
26022s/["\\]/\\&/g; s/^/"/; s/$/"/
26023p
26024b
26025:more2
26026s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26027p
26028g
26029s/.\{148\}//
26030t delim
26031' <conf$$subs.awk | sed '
26032/^[^""]/{
26033 N
26034 s/\n//
26035}
26036' >>$CONFIG_STATUS || ac_write_fail=1
26037rm -f conf$$subs.awk
26038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26039_ACAWK
26040cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26041 for (key in S) S_is_set[key] = 1
26042 FS = "\a"
26043 \$ac_cs_awk_pipe_init
26044}
26045{
26046 line = $ 0
26047 nfields = split(line, field, "@")
26048 substed = 0
26049 len = length(field[1])
26050 for (i = 2; i < nfields; i++) {
26051 key = field[i]
26052 keylen = length(key)
26053 if (S_is_set[key]) {
26054 value = S[key]
26055 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26056 len += length(value) + length(field[++i])
26057 substed = 1
26058 } else
26059 len += 1 + keylen
26060 }
26061 if (nfields == 3 && !substed) {
26062 key = field[2]
26063 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
26064 \$ac_cs_awk_read_file
26065 next
26066 }
26067 }
26068 print line
26069}
26070\$ac_cs_awk_pipe_fini
26071_ACAWK
26072_ACEOF
26073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26074if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26075 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26076else
26077 cat
26078fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26079 || as_fn_error "could not setup config files machinery" "$LINENO" 5
b61ff9c8
BS
26080_ACEOF
26081
5213506e
RW
26082# VPATH may cause trouble with some makes, so we remove $(srcdir),
26083# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26084# trailing colons and then remove the whole line if VPATH becomes empty
26085# (actually we leave an empty line to preserve line numbers).
26086if test "x$srcdir" = x.; then
26087 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26088s/:*\$(srcdir):*/:/
26089s/:*\${srcdir}:*/:/
26090s/:*@srcdir@:*/:/
26091s/^\([^=]*=[ ]*\):*/\1/
26092s/:*$//
26093s/^[^=]*=[ ]*$//
26094}'
26095fi
ba479fd2 26096
5213506e
RW
26097cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26098fi # test -n "$CONFIG_FILES"
b61ff9c8 26099
5213506e
RW
26100# Set up the scripts for CONFIG_HEADERS section.
26101# No need to generate them if there are no CONFIG_HEADERS.
26102# This happens for instance with `./config.status Makefile'.
26103if test -n "$CONFIG_HEADERS"; then
26104cat >"$tmp/defines.awk" <<\_ACAWK ||
26105BEGIN {
b61ff9c8
BS
26106_ACEOF
26107
5213506e
RW
26108# Transform confdefs.h into an awk script `defines.awk', embedded as
26109# here-document in config.status, that substitutes the proper values into
26110# config.h.in to produce config.h.
26111
26112# Create a delimiter string that does not exist in confdefs.h, to ease
26113# handling of long lines.
26114ac_delim='%!_!# '
26115for ac_last_try in false false :; do
26116 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26117 if test -z "$ac_t"; then
26118 break
26119 elif $ac_last_try; then
26120 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
26121 else
26122 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1a4b763e 26123 fi
5213506e 26124done
1a4b763e 26125
5213506e
RW
26126# For the awk script, D is an array of macro values keyed by name,
26127# likewise P contains macro parameters if any. Preserve backslash
26128# newline sequences.
26129
26130ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26131sed -n '
26132s/.\{148\}/&'"$ac_delim"'/g
26133t rset
26134:rset
26135s/^[ ]*#[ ]*define[ ][ ]*/ /
26136t def
26137d
26138:def
26139s/\\$//
26140t bsnl
26141s/["\\]/\\&/g
26142s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26143D["\1"]=" \3"/p
26144s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26145d
26146:bsnl
26147s/["\\]/\\&/g
26148s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26149D["\1"]=" \3\\\\\\n"\\/p
26150t cont
26151s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26152t cont
26153d
26154:cont
26155n
26156s/.\{148\}/&'"$ac_delim"'/g
26157t clear
26158:clear
26159s/\\$//
26160t bsnlc
26161s/["\\]/\\&/g; s/^/"/; s/$/"/p
26162d
26163:bsnlc
26164s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26165b cont
26166' <confdefs.h | sed '
26167s/'"$ac_delim"'/"\\\
26168"/g' >>$CONFIG_STATUS || ac_write_fail=1
26169
26170cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26171 for (key in D) D_is_set[key] = 1
26172 FS = "\a"
26173}
26174/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26175 line = \$ 0
26176 split(line, arg, " ")
26177 if (arg[1] == "#") {
26178 defundef = arg[2]
26179 mac1 = arg[3]
26180 } else {
26181 defundef = substr(arg[1], 2)
26182 mac1 = arg[2]
26183 }
26184 split(mac1, mac2, "(") #)
26185 macro = mac2[1]
26186 prefix = substr(line, 1, index(line, defundef) - 1)
26187 if (D_is_set[macro]) {
26188 # Preserve the white space surrounding the "#".
26189 print prefix "define", macro P[macro] D[macro]
26190 next
26191 } else {
26192 # Replace #undef with comments. This is necessary, for example,
26193 # in the case of _POSIX_SOURCE, which is predefined and required
26194 # on some systems where configure will not decide to define it.
26195 if (defundef == "undef") {
26196 print "/*", prefix defundef, macro, "*/"
26197 next
26198 }
26199 }
26200}
26201{ print }
26202_ACAWK
1a4b763e 26203_ACEOF
5213506e
RW
26204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26205 as_fn_error "could not setup config headers machinery" "$LINENO" 5
26206fi # test -n "$CONFIG_HEADERS"
26207
26208
26209eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26210shift
26211for ac_tag
26212do
26213 case $ac_tag in
26214 :[FHLC]) ac_mode=$ac_tag; continue;;
26215 esac
26216 case $ac_mode$ac_tag in
26217 :[FHL]*:*);;
26218 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26219 :[FH]-) ac_tag=-:-;;
26220 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26221 esac
26222 ac_save_IFS=$IFS
26223 IFS=:
26224 set x $ac_tag
26225 IFS=$ac_save_IFS
26226 shift
26227 ac_file=$1
26228 shift
26229
26230 case $ac_mode in
26231 :L) ac_source=$1;;
26232 :[FH])
26233 ac_file_inputs=
26234 for ac_f
26235 do
26236 case $ac_f in
26237 -) ac_f="$tmp/stdin";;
26238 *) # Look for the file first in the build tree, then in the source tree
26239 # (if the path is not absolute). The absolute path cannot be DOS-style,
26240 # because $ac_f cannot contain `:'.
26241 test -f "$ac_f" ||
26242 case $ac_f in
26243 [\\/$]*) false;;
26244 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26245 esac ||
26246 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26247 esac
26248 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26249 as_fn_append ac_file_inputs " '$ac_f'"
26250 done
26251
26252 # Let's still pretend it is `configure' which instantiates (i.e., don't
26253 # use $as_me), people would be surprised to read:
26254 # /* config.h. Generated by config.status. */
26255 configure_input='Generated from '`
26256 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26257 `' by configure.'
26258 if test x"$ac_file" != x-; then
26259 configure_input="$ac_file. $configure_input"
26260 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26261$as_echo "$as_me: creating $ac_file" >&6;}
26262 fi
26263 # Neutralize special characters interpreted by sed in replacement strings.
26264 case $configure_input in #(
26265 *\&* | *\|* | *\\* )
26266 ac_sed_conf_input=`$as_echo "$configure_input" |
26267 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26268 *) ac_sed_conf_input=$configure_input;;
26269 esac
26270
26271 case $ac_tag in
26272 *:-:* | *:-) cat >"$tmp/stdin" \
26273 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26274 esac
26275 ;;
703d89ab
ZW
26276 esac
26277
5213506e 26278 ac_dir=`$as_dirname -- "$ac_file" ||
ba479fd2 26279$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
26280 X"$ac_file" : 'X\(//\)[^/]' \| \
26281 X"$ac_file" : 'X\(//\)$' \| \
5213506e
RW
26282 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26283$as_echo X"$ac_file" |
26284 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26285 s//\1/
26286 q
26287 }
26288 /^X\(\/\/\)[^/].*/{
26289 s//\1/
26290 q
26291 }
26292 /^X\(\/\/\)$/{
26293 s//\1/
26294 q
26295 }
26296 /^X\(\/\).*/{
26297 s//\1/
26298 q
26299 }
26300 s/.*/./; q'`
26301 as_dir="$ac_dir"; as_fn_mkdir_p
ba479fd2
NN
26302 ac_builddir=.
26303
5213506e
RW
26304case "$ac_dir" in
26305.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26306*)
26307 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26308 # A ".." for each directory in $ac_dir_suffix.
26309 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26310 case $ac_top_builddir_sub in
26311 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26312 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26313 esac ;;
26314esac
26315ac_abs_top_builddir=$ac_pwd
26316ac_abs_builddir=$ac_pwd$ac_dir_suffix
26317# for backward compatibility:
26318ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
26319
26320case $srcdir in
5213506e 26321 .) # We are building in place.
ba479fd2 26322 ac_srcdir=.
5213506e
RW
26323 ac_top_srcdir=$ac_top_builddir_sub
26324 ac_abs_top_srcdir=$ac_pwd ;;
26325 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 26326 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
26327 ac_top_srcdir=$srcdir
26328 ac_abs_top_srcdir=$srcdir ;;
26329 *) # Relative name.
26330 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26331 ac_top_srcdir=$ac_top_build_prefix$srcdir
26332 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
ba479fd2 26333esac
5213506e 26334ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
ba479fd2 26335
703d89ab 26336
5213506e
RW
26337 case $ac_mode in
26338 :F)
26339 #
26340 # CONFIG_FILE
26341 #
ab22c1fa 26342
5213506e 26343_ACEOF
1a4b763e 26344
5213506e
RW
26345cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26346# If the template does not know about datarootdir, expand it.
26347# FIXME: This hack should be removed a few years after 2.60.
26348ac_datarootdir_hack=; ac_datarootdir_seen=
26349ac_sed_dataroot='
26350/datarootdir/ {
26351 p
26352 q
26353}
26354/@datadir@/p
26355/@docdir@/p
26356/@infodir@/p
26357/@localedir@/p
26358/@mandir@/p'
26359case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26360*datarootdir*) ac_datarootdir_seen=yes;;
26361*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26362 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26363$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26364_ACEOF
26365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26366 ac_datarootdir_hack='
26367 s&@datadir@&$datadir&g
26368 s&@docdir@&$docdir&g
26369 s&@infodir@&$infodir&g
26370 s&@localedir@&$localedir&g
26371 s&@mandir@&$mandir&g
26372 s&\\\${datarootdir}&$datarootdir&g' ;;
26373esac
a6ccdbab 26374_ACEOF
5213506e
RW
26375
26376# Neutralize VPATH when `$srcdir' = `.'.
26377# Shell code in configure.ac might set extrasub.
26378# FIXME: do we really want to maintain this feature?
26379cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26380ac_sed_extra="$ac_vpsub
ba479fd2
NN
26381$extrasub
26382_ACEOF
5213506e 26383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2
NN
26384:t
26385/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5213506e
RW
26386s|@configure_input@|$ac_sed_conf_input|;t t
26387s&@top_builddir@&$ac_top_builddir_sub&;t t
26388s&@top_build_prefix@&$ac_top_build_prefix&;t t
26389s&@srcdir@&$ac_srcdir&;t t
26390s&@abs_srcdir@&$ac_abs_srcdir&;t t
26391s&@top_srcdir@&$ac_top_srcdir&;t t
26392s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26393s&@builddir@&$ac_builddir&;t t
26394s&@abs_builddir@&$ac_abs_builddir&;t t
26395s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26396$ac_datarootdir_hack
26397"
26398eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
26399if $ac_cs_awk_getline; then
26400 $AWK -f "$tmp/subs.awk"
26401else
26402 $AWK -f "$tmp/subs.awk" | $SHELL
26403fi >$tmp/out \
26404 || as_fn_error "could not create $ac_file" "$LINENO" 5
26405
26406test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26407 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26408 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26409 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26410which seems to be undefined. Please make sure it is defined." >&5
26411$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26412which seems to be undefined. Please make sure it is defined." >&2;}
26413
26414 rm -f "$tmp/stdin"
b61ff9c8 26415 case $ac_file in
5213506e
RW
26416 -) cat "$tmp/out" && rm -f "$tmp/out";;
26417 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26418 esac \
26419 || as_fn_error "could not create $ac_file" "$LINENO" 5
26420 ;;
26421 :H)
26422 #
26423 # CONFIG_HEADER
26424 #
ba479fd2 26425 if test x"$ac_file" != x-; then
5213506e
RW
26426 {
26427 $as_echo "/* $configure_input */" \
26428 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26429 } >"$tmp/config.h" \
26430 || as_fn_error "could not create $ac_file" "$LINENO" 5
26431 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26432 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26433$as_echo "$as_me: $ac_file is unchanged" >&6;}
ba479fd2 26434 else
5213506e
RW
26435 rm -f "$ac_file"
26436 mv "$tmp/config.h" "$ac_file" \
26437 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba479fd2
NN
26438 fi
26439 else
5213506e
RW
26440 $as_echo "/* $configure_input */" \
26441 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26442 || as_fn_error "could not create -" "$LINENO" 5
ba479fd2 26443 fi
5213506e 26444 ;;
b61ff9c8 26445
5213506e
RW
26446 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26447$as_echo "$as_me: executing $ac_file commands" >&6;}
26448 ;;
26449 esac
b61ff9c8
BS
26450
26451
5213506e
RW
26452 case $ac_file$ac_mode in
26453 "as":F) chmod +x as ;;
26454 "collect-ld":F) chmod +x collect-ld ;;
26455 "nm":F) chmod +x nm ;;
26456 "default":C)
f1faaabd
NN
26457case ${CONFIG_HEADERS} in
26458 *auto-host.h:config.in*)
26459 echo > cstamp-h ;;
861bb6c1 26460esac
2ed26f6b 26461# Make sure all the subdirs exist.
3b620440 26462for d in $subdirs doc build
2ed26f6b 26463do
2ed26f6b 26464 test -d $d || mkdir $d
2ed26f6b 26465done
ba479fd2 26466 ;;
5213506e 26467
ba479fd2 26468 esac
5213506e 26469done # for ac_tag
cafe096b 26470
ba479fd2 26471
5213506e 26472as_fn_exit 0
ba479fd2 26473_ACEOF
ba479fd2
NN
26474ac_clean_files=$ac_clean_files_save
26475
5213506e
RW
26476test $ac_write_fail = 0 ||
26477 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26478
ba479fd2
NN
26479
26480# configure is writing to config.log, and then calls config.status.
26481# config.status does its own redirection, appending to config.log.
26482# Unfortunately, on DOS this fails, as config.log is still kept open
26483# by configure, so config.status won't be able to write to it; its
26484# output is simply discarded. So we exec the FD to /dev/null,
26485# effectively closing config.log, so it can be properly (re)opened and
26486# appended to by config.status. When coming back to configure, we
26487# need to make the FD available again.
26488if test "$no_create" != yes; then
26489 ac_cs_success=:
26490 ac_config_status_args=
26491 test "$silent" = yes &&
26492 ac_config_status_args="$ac_config_status_args --quiet"
26493 exec 5>/dev/null
26494 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26495 exec 5>>config.log
26496 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26497 # would make configure fail if this is the last instruction.
5213506e
RW
26498 $ac_cs_success || as_fn_exit $?
26499fi
26500if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26501 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26502$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
ba479fd2 26503fi
861bb6c1 26504