]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
re PR target/18788 ("-pthreads" option with "-shared" does not cause libpthread.so...
[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
43e02a8a
RW
172test \$(( 1 + 1 )) = 2 || exit 1
173
174 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
175 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
176 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
177 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
178 PATH=/empty FPATH=/empty; export PATH FPATH
179 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
180 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
5213506e
RW
181 if (eval "$as_required") 2>/dev/null; then :
182 as_have_required=yes
183else
184 as_have_required=no
185fi
186 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
187
188else
189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
190as_found=false
191for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
ba479fd2 192do
5213506e
RW
193 IFS=$as_save_IFS
194 test -z "$as_dir" && as_dir=.
195 as_found=:
196 case $as_dir in #(
197 /*)
198 for as_base in sh bash ksh sh5; do
199 # Try only shells that exist, to save several forks.
200 as_shell=$as_dir/$as_base
201 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
202 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 CONFIG_SHELL=$as_shell as_have_required=yes
204 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
205 break 2
206fi
207fi
208 done;;
209 esac
210 as_found=false
211done
212$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
213 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
214 CONFIG_SHELL=$SHELL as_have_required=yes
215fi; }
216IFS=$as_save_IFS
217
218
219 if test "x$CONFIG_SHELL" != x; then :
220 # We cannot yet assume a decent shell, so we have to provide a
221 # neutralization value for shells without unset; and this also
222 # works around shells that cannot unset nonexistent variables.
223 BASH_ENV=/dev/null
224 ENV=/dev/null
225 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
226 export CONFIG_SHELL
227 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
228fi
229
230 if test x$as_have_required = xno; then :
231 $as_echo "$0: This script requires a shell more modern than all"
232 $as_echo "$0: the shells that I found on your system."
233 if test x${ZSH_VERSION+set} = xset ; then
234 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
235 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
ba479fd2 236 else
5213506e
RW
237 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
238$0: including any error possibly output before this
239$0: message. Then install a modern shell, or manually run
240$0: the script under such a shell if you do have one."
ba479fd2 241 fi
5213506e
RW
242 exit 1
243fi
244fi
245fi
246SHELL=${CONFIG_SHELL-/bin/sh}
247export SHELL
248# Unset more variables known to interfere with behavior of common tools.
249CLICOLOR_FORCE= GREP_OPTIONS=
250unset CLICOLOR_FORCE GREP_OPTIONS
251
252## --------------------- ##
253## M4sh Shell Functions. ##
254## --------------------- ##
255# as_fn_unset VAR
256# ---------------
257# Portably unset VAR.
258as_fn_unset ()
259{
260 { eval $1=; unset $1;}
261}
262as_unset=as_fn_unset
263
264# as_fn_set_status STATUS
265# -----------------------
266# Set $? to STATUS, without forking.
267as_fn_set_status ()
268{
269 return $1
270} # as_fn_set_status
271
272# as_fn_exit STATUS
273# -----------------
274# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
275as_fn_exit ()
276{
277 set +e
278 as_fn_set_status $1
279 exit $1
280} # as_fn_exit
281
282# as_fn_mkdir_p
283# -------------
284# Create "$as_dir" as a directory, including parents if necessary.
285as_fn_mkdir_p ()
286{
287
288 case $as_dir in #(
289 -*) as_dir=./$as_dir;;
290 esac
291 test -d "$as_dir" || eval $as_mkdir_p || {
292 as_dirs=
293 while :; do
294 case $as_dir in #(
295 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
296 *) as_qdir=$as_dir;;
297 esac
298 as_dirs="'$as_qdir' $as_dirs"
299 as_dir=`$as_dirname -- "$as_dir" ||
300$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
301 X"$as_dir" : 'X\(//\)[^/]' \| \
302 X"$as_dir" : 'X\(//\)$' \| \
303 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
304$as_echo X"$as_dir" |
305 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\/\)[^/].*/{
310 s//\1/
311 q
312 }
313 /^X\(\/\/\)$/{
314 s//\1/
315 q
316 }
317 /^X\(\/\).*/{
318 s//\1/
319 q
320 }
321 s/.*/./; q'`
322 test -d "$as_dir" && break
323 done
324 test -z "$as_dirs" || eval "mkdir $as_dirs"
325 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
326
327
328} # as_fn_mkdir_p
329# as_fn_append VAR VALUE
330# ----------------------
331# Append the text in VALUE to the end of the definition contained in VAR. Take
332# advantage of any shell optimizations that allow amortized linear growth over
333# repeated appends, instead of the typical quadratic growth present in naive
334# implementations.
335if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
336 eval 'as_fn_append ()
337 {
338 eval $1+=\$2
339 }'
340else
341 as_fn_append ()
342 {
343 eval $1=\$$1\$2
344 }
345fi # as_fn_append
346
347# as_fn_arith ARG...
348# ------------------
349# Perform arithmetic evaluation on the ARGs, and store the result in the
350# global $as_val. Take advantage of shells that can avoid forks. The arguments
351# must be portable across $(()) and expr.
352if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
353 eval 'as_fn_arith ()
354 {
355 as_val=$(( $* ))
356 }'
357else
358 as_fn_arith ()
359 {
360 as_val=`expr "$@" || test $? -eq 1`
361 }
362fi # as_fn_arith
363
ba479fd2 364
5213506e
RW
365# as_fn_error ERROR [LINENO LOG_FD]
366# ---------------------------------
367# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
368# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
369# script with status $?, using 1 if that was 0.
370as_fn_error ()
371{
372 as_status=$?; test $as_status -eq 0 && as_status=1
373 if test "$3"; then
374 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
375 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
376 fi
377 $as_echo "$as_me: error: $1" >&2
378 as_fn_exit $as_status
379} # as_fn_error
380
381if expr a : '\(a\)' >/dev/null 2>&1 &&
382 test "X`expr 00001 : '.*\(...\)'`" = X001; then
ba479fd2
NN
383 as_expr=expr
384else
385 as_expr=false
386fi
387
5213506e 388if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
ba479fd2
NN
389 as_basename=basename
390else
391 as_basename=false
392fi
393
5213506e
RW
394if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
395 as_dirname=dirname
396else
397 as_dirname=false
398fi
ba479fd2 399
5213506e 400as_me=`$as_basename -- "$0" ||
ba479fd2
NN
401$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
402 X"$0" : 'X\(//\)$' \| \
5213506e
RW
403 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
404$as_echo X/"$0" |
405 sed '/^.*\/\([^/][^/]*\)\/*$/{
406 s//\1/
407 q
408 }
409 /^X\/\(\/\/\)$/{
410 s//\1/
411 q
412 }
413 /^X\/\(\/\).*/{
414 s//\1/
415 q
416 }
417 s/.*/./; q'`
ab22c1fa 418
b61ff9c8
BS
419# Avoid depending upon Character Ranges.
420as_cr_letters='abcdefghijklmnopqrstuvwxyz'
421as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
422as_cr_Letters=$as_cr_letters$as_cr_LETTERS
423as_cr_digits='0123456789'
424as_cr_alnum=$as_cr_Letters$as_cr_digits
1a4b763e 425
ba479fd2 426
5213506e
RW
427 as_lineno_1=$LINENO as_lineno_1a=$LINENO
428 as_lineno_2=$LINENO as_lineno_2a=$LINENO
429 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
430 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
431 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
432 sed -n '
433 p
434 /[$]LINENO/=
435 ' <$as_myself |
ba479fd2 436 sed '
5213506e
RW
437 s/[$]LINENO.*/&-/
438 t lineno
439 b
440 :lineno
ba479fd2 441 N
5213506e
RW
442 :loop
443 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
ba479fd2 444 t loop
5213506e 445 s/-\n.*//
ba479fd2 446 ' >$as_me.lineno &&
5213506e
RW
447 chmod +x "$as_me.lineno" ||
448 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
ba479fd2
NN
449
450 # Don't try to exec as it changes $[0], causing all sort of problems
451 # (the dirname of $[0] is not the place where we might find the
5213506e
RW
452 # original and so on. Autoconf is especially sensitive to this).
453 . "./$as_me.lineno"
ba479fd2
NN
454 # Exit status is that of the last command.
455 exit
456}
457
5213506e
RW
458ECHO_C= ECHO_N= ECHO_T=
459case `echo -n x` in #(((((
460-n*)
461 case `echo 'xy\c'` in
462 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
463 xy) ECHO_C='\c';;
464 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
465 ECHO_T=' ';;
466 esac;;
467*)
468 ECHO_N='-n';;
ba479fd2
NN
469esac
470
5213506e
RW
471rm -f conf$$ conf$$.exe conf$$.file
472if test -d conf$$.dir; then
473 rm -f conf$$.dir/conf$$.file
ba479fd2 474else
5213506e
RW
475 rm -f conf$$.dir
476 mkdir conf$$.dir 2>/dev/null
ba479fd2 477fi
5213506e
RW
478if (echo >conf$$.file) 2>/dev/null; then
479 if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8 480 as_ln_s='ln -s'
5213506e
RW
481 # ... but there are two gotchas:
482 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
483 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
484 # In both cases, we have to default to `cp -p'.
485 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
486 as_ln_s='cp -p'
487 elif ln conf$$.file conf$$ 2>/dev/null; then
488 as_ln_s=ln
489 else
490 as_ln_s='cp -p'
b61ff9c8 491 fi
ba479fd2
NN
492else
493 as_ln_s='cp -p'
494fi
5213506e
RW
495rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
496rmdir conf$$.dir 2>/dev/null
861bb6c1 497
ba479fd2 498if mkdir -p . 2>/dev/null; then
5213506e 499 as_mkdir_p='mkdir -p "$as_dir"'
ba479fd2 500else
86da66b5 501 test -d ./-p && rmdir ./-p
ba479fd2
NN
502 as_mkdir_p=false
503fi
504
5213506e
RW
505if test -x / >/dev/null 2>&1; then
506 as_test_x='test -x'
507else
508 if ls -dL / >/dev/null 2>&1; then
509 as_ls_L_option=L
510 else
511 as_ls_L_option=
512 fi
513 as_test_x='
514 eval sh -c '\''
515 if test -d "$1"; then
516 test -d "$1/.";
517 else
518 case $1 in #(
519 -*)set "./$1";;
520 esac;
521 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
522 ???[sx]*):;;*)false;;esac;fi
523 '\'' sh
524 '
525fi
526as_executable_p=$as_test_x
ba479fd2
NN
527
528# Sed expression to map a string onto a valid CPP name.
86da66b5 529as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
530
531# Sed expression to map a string onto a valid variable name.
86da66b5 532as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2 533
da0f6381
PB
534SHELL=${CONFIG_SHELL-/bin/sh}
535
da0f6381 536
5213506e
RW
537exec 7<&0 </dev/null 6>&1
538
ba479fd2
NN
539# Name of the host.
540# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
541# so uname gets run too.
542ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
543
ba479fd2
NN
544#
545# Initializations.
546#
861bb6c1 547ac_default_prefix=/usr/local
5213506e 548ac_clean_files=
ba479fd2 549ac_config_libobj_dir=.
5213506e 550LIBOBJS=
ba479fd2
NN
551cross_compiling=no
552subdirs=
553MFLAGS=
554MAKEFLAGS=
b61ff9c8 555
ba479fd2
NN
556# Identity of this package.
557PACKAGE_NAME=
558PACKAGE_TARNAME=
559PACKAGE_VERSION=
560PACKAGE_STRING=
561PACKAGE_BUGREPORT=
5213506e 562PACKAGE_URL=
ba479fd2
NN
563
564ac_unique_file="tree.c"
565# Factoring default headers for most tests.
566ac_includes_default="\
567#include <stdio.h>
5213506e 568#ifdef HAVE_SYS_TYPES_H
ba479fd2
NN
569# include <sys/types.h>
570#endif
5213506e 571#ifdef HAVE_SYS_STAT_H
ba479fd2
NN
572# include <sys/stat.h>
573#endif
5213506e 574#ifdef STDC_HEADERS
ba479fd2
NN
575# include <stdlib.h>
576# include <stddef.h>
577#else
5213506e 578# ifdef HAVE_STDLIB_H
ba479fd2
NN
579# include <stdlib.h>
580# endif
581#endif
5213506e
RW
582#ifdef HAVE_STRING_H
583# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
ba479fd2
NN
584# include <memory.h>
585# endif
586# include <string.h>
587#endif
5213506e 588#ifdef HAVE_STRINGS_H
ba479fd2
NN
589# include <strings.h>
590#endif
5213506e 591#ifdef HAVE_INTTYPES_H
ba479fd2 592# include <inttypes.h>
ba479fd2 593#endif
5213506e
RW
594#ifdef HAVE_STDINT_H
595# include <stdint.h>
596#endif
597#ifdef HAVE_UNISTD_H
ba479fd2
NN
598# include <unistd.h>
599#endif"
600
5213506e
RW
601ac_subst_vars='LTLIBOBJS
602LIBOBJS
603enable_plugin
604pluginlibs
d7f09764
DN
605LIBELFINC
606LIBELFLIBS
5213506e
RW
607CLOOGINC
608CLOOGLIBS
609PPLINC
610PPLLIBS
611GMPINC
612GMPLIBS
613target_cpu_default
614fortran_target_objs
615cxx_target_objs
616c_target_objs
617use_gcc_stdint
618xm_defines
619xm_include_list
620xm_file_list
621tm_p_include_list
622tm_p_file_list
623tm_defines
624tm_include_list
625tm_file_list
626thread_file
627out_object_file
628out_file
629objc_boehm_gc
630md_file
631local_prefix
632lang_tree_files
633lang_specs_files
634lang_opt_files
635install
636out_host_hook_obj
637host_xm_defines
638host_xm_include_list
639host_xm_file_list
640host_exeext
641gcc_gxx_include_dir
642gcc_config_arguments
643float_h_file
644extra_programs
645extra_passes
646extra_parts
647extra_objs
648extra_headers_list
649extra_gcc_objs
650TM_MULTILIB_EXCEPTIONS_CONFIG
651TM_MULTILIB_CONFIG
652TM_ENDIAN_CONFIG
653tmake_file
654xmake_file
655cpp_install_dir
656check_languages
657build_file_translate
658build_xm_defines
659build_xm_include_list
660build_xm_file_list
661build_install_headers_dir
662build_exeext
663all_selected_languages
664all_languages
5213506e
RW
665all_lang_makefrags
666all_gtfiles
667all_compilers
668srcdir
669subdirs
670slibdir
671dollar
672gcc_tooldir
3bec79c5
DK
673LTO_USE_LIBELF
674LTO_BINARY_READER
d7f09764 675enable_lto
5213506e
RW
676MAINT
677zlibinc
678zlibdir
679HOST_LIBS
680GGC
681libgcc_visibility
682gcc_cv_readelf
683gcc_cv_objdump
684ORIGINAL_NM_FOR_TARGET
685gcc_cv_nm
686ORIGINAL_LD_FOR_TARGET
5938f74d 687ORIGINAL_PLUGIN_LD_FOR_TARGET
5213506e
RW
688gcc_cv_ld
689ORIGINAL_AS_FOR_TARGET
690gcc_cv_as
691enable_fast_install
692objdir
693CXXCPP
694OTOOL64
695OTOOL
696LIPO
697NMEDIT
698DSYMUTIL
5213506e
RW
699STRIP
700OBJDUMP
701ac_ct_DUMPBIN
702DUMPBIN
703LD
704FGREP
705SED
706LIBTOOL
707collect2
708STMP_FIXINC
709BUILD_LDFLAGS
710BUILD_CFLAGS
711CC_FOR_BUILD
712inhibit_libc
713SYSTEM_HEADER_DIR
714ALL
715CROSS
716CATOBJEXT
717GENCAT
718INSTOBJEXT
719DATADIRNAME
720CATALOGS
721POSUB
722GMSGFMT
723XGETTEXT
724INCINTL
725LIBINTL_DEP
726LIBINTL
727USE_NLS
728extra_opt_files
729extra_modes_file
730gthread_flags
731objext
732manext
733LIBICONV_DEP
734LTLIBICONV
735LIBICONV
736LDEXP_LIB
737GNAT_LIBEXC
738COLLECT2_LIBS
739AR
740NM
741BISON
742FLEX
743GENERATED_MANPAGES
744BUILD_INFO
745MAKEINFO
746have_mktemp_command
747make_compare_target
748INSTALL_DATA
749INSTALL_PROGRAM
750INSTALL
751ranlib_flags
752RANLIB
753LN
754LN_S
755AWK
756SET_MAKE
757REPORT_BUGS_TEXI
758REPORT_BUGS_TO
759PKGVERSION
760onestep
e11ddaf5 761CONFIGURE_SPECS
5213506e
RW
762CROSS_SYSTEM_HEADER_DIR
763TARGET_SYSTEM_ROOT_DEFINE
764TARGET_SYSTEM_ROOT
765enable_shared
766enable_fixed_point
767enable_decimal_float
768enable_multilib
769ENABLE_BUILD_WITH_CXX
770coverage_flags
771valgrind_command
772valgrind_path_defines
773valgrind_path
774TREEBROWSER
775nocommon_flag
776warn_cxxflags
777warn_cflags
778c_strict_warn
779strict_warn
780c_loose_warn
781loose_warn
782EGREP
783GREP
784CPP
785OUTPUT_OPTION
786NO_MINUS_C_MINUS_O
787GNATMAKE
788GNATBIND
789ac_ct_CXX
790CXXFLAGS
791CXX
792OBJEXT
793EXEEXT
794ac_ct_CC
795CPPFLAGS
796LDFLAGS
797CFLAGS
798CC
799GENINSRC
800target_subdir
801host_subdir
802build_subdir
803build_libsubdir
804target_noncanonical
805target_os
806target_vendor
807target_cpu
808target
809host_os
810host_vendor
811host_cpu
812host
813build_os
814build_vendor
815build_cpu
816build
817target_alias
818host_alias
819build_alias
820LIBS
821ECHO_T
822ECHO_N
823ECHO_C
824DEFS
825mandir
826localedir
827libdir
828psdir
829pdfdir
830dvidir
831htmldir
832infodir
833docdir
834oldincludedir
835includedir
836localstatedir
837sharedstatedir
838sysconfdir
839datadir
840datarootdir
841libexecdir
842sbindir
843bindir
844program_transform_name
845prefix
846exec_prefix
847PACKAGE_URL
848PACKAGE_BUGREPORT
849PACKAGE_STRING
850PACKAGE_VERSION
851PACKAGE_TARNAME
852PACKAGE_NAME
853PATH_SEPARATOR
854SHELL'
ba479fd2 855ac_subst_files='language_hooks'
5213506e
RW
856ac_user_opts='
857enable_option_checking
858with_build_libsubdir
859with_local_prefix
860with_gxx_include_dir
861with_cpp_install_dir
862enable_generated_files_in_srcdir
863with_gnu_ld
864with_ld
865with_demangler_in_ld
866with_gnu_as
867with_as
868enable_werror_always
869enable_checking
870enable_coverage
871enable_gather_detailed_mem_stats
872enable_build_with_cxx
873with_stabs
874enable_multilib
875enable___cxa_atexit
876enable_decimal_float
877enable_fixed_point
878enable_threads
879enable_tls
880enable_objc_gc
881with_dwarf2
882enable_shared
883with_build_sysroot
884with_sysroot
e11ddaf5 885with_specs
5213506e
RW
886enable_intermodule
887with_pkgversion
888with_bugurl
889enable_languages
890with_multilib_list
891enable_rpath
892with_libiconv_prefix
893enable_initfini_array
894enable_sjlj_exceptions
895with_system_libunwind
896enable_secureplt
ad211091 897enable_leading_mingw64_underscores
5213506e
RW
898enable_cld
899enable_win32_registry
900enable_static
901with_pic
902enable_fast_install
903enable_libtool_lock
5938f74d 904with_plugin_ld
55c4f715 905enable_comdat
5213506e
RW
906enable_gnu_unique_object
907enable_linker_build_id
908with_long_double_128
909with_gc
910with_system_zlib
911enable_maintainer_mode
912enable_version_specific_runtime_libs
913with_slibdir
5213506e
RW
914enable_plugin
915'
916 ac_precious_vars='build_alias
917host_alias
918target_alias
919CC
920CFLAGS
921LDFLAGS
922LIBS
923CPPFLAGS
924CXX
925CXXFLAGS
926CCC
927CPP
928CXXCPP
929GMPLIBS
930GMPINC
931PPLLIBS
932PPLINC
933CLOOGLIBS
d7f09764
DN
934CLOOGINC
935LIBELFLIBS
936LIBELFINC'
5213506e 937
861bb6c1
JL
938
939# Initialize some variables set by options.
ba479fd2
NN
940ac_init_help=
941ac_init_version=false
5213506e
RW
942ac_unrecognized_opts=
943ac_unrecognized_sep=
861bb6c1
JL
944# The variables have the same names as the options, with
945# dashes changed to underlines.
ba479fd2 946cache_file=/dev/null
861bb6c1 947exec_prefix=NONE
861bb6c1 948no_create=
861bb6c1
JL
949no_recursion=
950prefix=NONE
951program_prefix=NONE
952program_suffix=NONE
953program_transform_name=s,x,x,
954silent=
955site=
956srcdir=
861bb6c1
JL
957verbose=
958x_includes=NONE
959x_libraries=NONE
ba479fd2
NN
960
961# Installation directory options.
962# These are left unexpanded so users can "make install exec_prefix=/foo"
963# and all the variables that are supposed to be based on exec_prefix
964# by default will actually change.
965# Use braces instead of parens because sh, perl, etc. also accept them.
5213506e 966# (The list follows the same order as the GNU Coding Standards.)
861bb6c1
JL
967bindir='${exec_prefix}/bin'
968sbindir='${exec_prefix}/sbin'
969libexecdir='${exec_prefix}/libexec'
5213506e
RW
970datarootdir='${prefix}/share'
971datadir='${datarootdir}'
861bb6c1
JL
972sysconfdir='${prefix}/etc'
973sharedstatedir='${prefix}/com'
974localstatedir='${prefix}/var'
861bb6c1
JL
975includedir='${prefix}/include'
976oldincludedir='/usr/include'
5213506e
RW
977docdir='${datarootdir}/doc/${PACKAGE}'
978infodir='${datarootdir}/info'
979htmldir='${docdir}'
980dvidir='${docdir}'
981pdfdir='${docdir}'
982psdir='${docdir}'
983libdir='${exec_prefix}/lib'
984localedir='${datarootdir}/locale'
985mandir='${datarootdir}/man'
861bb6c1 986
861bb6c1 987ac_prev=
5213506e 988ac_dashdash=
861bb6c1
JL
989for ac_option
990do
861bb6c1
JL
991 # If the previous option needs an argument, assign it.
992 if test -n "$ac_prev"; then
5213506e 993 eval $ac_prev=\$ac_option
861bb6c1
JL
994 ac_prev=
995 continue
996 fi
997
5213506e
RW
998 case $ac_option in
999 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1000 *) ac_optarg=yes ;;
1001 esac
861bb6c1
JL
1002
1003 # Accept the important Cygnus configure options, so we can diagnose typos.
1004
5213506e
RW
1005 case $ac_dashdash$ac_option in
1006 --)
1007 ac_dashdash=yes ;;
861bb6c1
JL
1008
1009 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1010 ac_prev=bindir ;;
1011 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 1012 bindir=$ac_optarg ;;
861bb6c1
JL
1013
1014 -build | --build | --buil | --bui | --bu)
ba479fd2 1015 ac_prev=build_alias ;;
861bb6c1 1016 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 1017 build_alias=$ac_optarg ;;
861bb6c1
JL
1018
1019 -cache-file | --cache-file | --cache-fil | --cache-fi \
1020 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1021 ac_prev=cache_file ;;
1022 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1023 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
1024 cache_file=$ac_optarg ;;
1025
1026 --config-cache | -C)
1027 cache_file=config.cache ;;
861bb6c1 1028
5213506e 1029 -datadir | --datadir | --datadi | --datad)
861bb6c1 1030 ac_prev=datadir ;;
5213506e 1031 -datadir=* | --datadir=* | --datadi=* | --datad=*)
ba479fd2 1032 datadir=$ac_optarg ;;
861bb6c1 1033
5213506e
RW
1034 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1035 | --dataroo | --dataro | --datar)
1036 ac_prev=datarootdir ;;
1037 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1038 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1039 datarootdir=$ac_optarg ;;
1040
861bb6c1 1041 -disable-* | --disable-*)
5213506e 1042 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 1043 # Reject names that are not valid shell variable names.
5213506e
RW
1044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1045 as_fn_error "invalid feature name: $ac_useropt"
1046 ac_useropt_orig=$ac_useropt
1047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1048 case $ac_user_opts in
1049 *"
1050"enable_$ac_useropt"
1051"*) ;;
1052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1053 ac_unrecognized_sep=', ';;
1054 esac
1055 eval enable_$ac_useropt=no ;;
1056
1057 -docdir | --docdir | --docdi | --doc | --do)
1058 ac_prev=docdir ;;
1059 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1060 docdir=$ac_optarg ;;
1061
1062 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1063 ac_prev=dvidir ;;
1064 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1065 dvidir=$ac_optarg ;;
861bb6c1
JL
1066
1067 -enable-* | --enable-*)
5213506e 1068 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 1069 # Reject names that are not valid shell variable names.
5213506e
RW
1070 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1071 as_fn_error "invalid feature name: $ac_useropt"
1072 ac_useropt_orig=$ac_useropt
1073 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1074 case $ac_user_opts in
1075 *"
1076"enable_$ac_useropt"
1077"*) ;;
1078 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1079 ac_unrecognized_sep=', ';;
b61ff9c8 1080 esac
5213506e 1081 eval enable_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1082
1083 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1084 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1085 | --exec | --exe | --ex)
1086 ac_prev=exec_prefix ;;
1087 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1088 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1089 | --exec=* | --exe=* | --ex=*)
ba479fd2 1090 exec_prefix=$ac_optarg ;;
861bb6c1
JL
1091
1092 -gas | --gas | --ga | --g)
1093 # Obsolete; use --with-gas.
1094 with_gas=yes ;;
1095
ba479fd2
NN
1096 -help | --help | --hel | --he | -h)
1097 ac_init_help=long ;;
1098 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1099 ac_init_help=recursive ;;
1100 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1101 ac_init_help=short ;;
861bb6c1
JL
1102
1103 -host | --host | --hos | --ho)
ba479fd2 1104 ac_prev=host_alias ;;
861bb6c1 1105 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 1106 host_alias=$ac_optarg ;;
861bb6c1 1107
5213506e
RW
1108 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1109 ac_prev=htmldir ;;
1110 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1111 | --ht=*)
1112 htmldir=$ac_optarg ;;
1113
861bb6c1
JL
1114 -includedir | --includedir | --includedi | --included | --include \
1115 | --includ | --inclu | --incl | --inc)
1116 ac_prev=includedir ;;
1117 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1118 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 1119 includedir=$ac_optarg ;;
861bb6c1
JL
1120
1121 -infodir | --infodir | --infodi | --infod | --info | --inf)
1122 ac_prev=infodir ;;
1123 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 1124 infodir=$ac_optarg ;;
861bb6c1
JL
1125
1126 -libdir | --libdir | --libdi | --libd)
1127 ac_prev=libdir ;;
1128 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 1129 libdir=$ac_optarg ;;
861bb6c1
JL
1130
1131 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1132 | --libexe | --libex | --libe)
1133 ac_prev=libexecdir ;;
1134 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1135 | --libexe=* | --libex=* | --libe=*)
ba479fd2 1136 libexecdir=$ac_optarg ;;
861bb6c1 1137
5213506e
RW
1138 -localedir | --localedir | --localedi | --localed | --locale)
1139 ac_prev=localedir ;;
1140 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1141 localedir=$ac_optarg ;;
1142
861bb6c1 1143 -localstatedir | --localstatedir | --localstatedi | --localstated \
5213506e 1144 | --localstate | --localstat | --localsta | --localst | --locals)
861bb6c1
JL
1145 ac_prev=localstatedir ;;
1146 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
5213506e 1147 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
ba479fd2 1148 localstatedir=$ac_optarg ;;
861bb6c1
JL
1149
1150 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1151 ac_prev=mandir ;;
1152 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 1153 mandir=$ac_optarg ;;
861bb6c1
JL
1154
1155 -nfp | --nfp | --nf)
1156 # Obsolete; use --without-fp.
1157 with_fp=no ;;
1158
1159 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 1160 | --no-cr | --no-c | -n)
861bb6c1
JL
1161 no_create=yes ;;
1162
1163 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1164 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1165 no_recursion=yes ;;
1166
1167 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1168 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1169 | --oldin | --oldi | --old | --ol | --o)
1170 ac_prev=oldincludedir ;;
1171 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1172 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1173 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 1174 oldincludedir=$ac_optarg ;;
861bb6c1
JL
1175
1176 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1177 ac_prev=prefix ;;
1178 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 1179 prefix=$ac_optarg ;;
861bb6c1
JL
1180
1181 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1182 | --program-pre | --program-pr | --program-p)
1183 ac_prev=program_prefix ;;
1184 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1185 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 1186 program_prefix=$ac_optarg ;;
861bb6c1
JL
1187
1188 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1189 | --program-suf | --program-su | --program-s)
1190 ac_prev=program_suffix ;;
1191 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1192 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 1193 program_suffix=$ac_optarg ;;
861bb6c1
JL
1194
1195 -program-transform-name | --program-transform-name \
1196 | --program-transform-nam | --program-transform-na \
1197 | --program-transform-n | --program-transform- \
1198 | --program-transform | --program-transfor \
1199 | --program-transfo | --program-transf \
1200 | --program-trans | --program-tran \
1201 | --progr-tra | --program-tr | --program-t)
1202 ac_prev=program_transform_name ;;
1203 -program-transform-name=* | --program-transform-name=* \
1204 | --program-transform-nam=* | --program-transform-na=* \
1205 | --program-transform-n=* | --program-transform-=* \
1206 | --program-transform=* | --program-transfor=* \
1207 | --program-transfo=* | --program-transf=* \
1208 | --program-trans=* | --program-tran=* \
1209 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 1210 program_transform_name=$ac_optarg ;;
861bb6c1 1211
5213506e
RW
1212 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1213 ac_prev=pdfdir ;;
1214 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1215 pdfdir=$ac_optarg ;;
1216
1217 -psdir | --psdir | --psdi | --psd | --ps)
1218 ac_prev=psdir ;;
1219 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1220 psdir=$ac_optarg ;;
1221
861bb6c1
JL
1222 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1223 | -silent | --silent | --silen | --sile | --sil)
1224 silent=yes ;;
1225
1226 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1227 ac_prev=sbindir ;;
1228 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1229 | --sbi=* | --sb=*)
ba479fd2 1230 sbindir=$ac_optarg ;;
861bb6c1
JL
1231
1232 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1233 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1234 | --sharedst | --shareds | --shared | --share | --shar \
1235 | --sha | --sh)
1236 ac_prev=sharedstatedir ;;
1237 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1238 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1239 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1240 | --sha=* | --sh=*)
ba479fd2 1241 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
1242
1243 -site | --site | --sit)
1244 ac_prev=site ;;
1245 -site=* | --site=* | --sit=*)
ba479fd2 1246 site=$ac_optarg ;;
861bb6c1
JL
1247
1248 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1249 ac_prev=srcdir ;;
1250 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 1251 srcdir=$ac_optarg ;;
861bb6c1
JL
1252
1253 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1254 | --syscon | --sysco | --sysc | --sys | --sy)
1255 ac_prev=sysconfdir ;;
1256 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1257 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 1258 sysconfdir=$ac_optarg ;;
861bb6c1
JL
1259
1260 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 1261 ac_prev=target_alias ;;
861bb6c1 1262 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 1263 target_alias=$ac_optarg ;;
861bb6c1
JL
1264
1265 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1266 verbose=yes ;;
1267
ba479fd2
NN
1268 -version | --version | --versio | --versi | --vers | -V)
1269 ac_init_version=: ;;
861bb6c1
JL
1270
1271 -with-* | --with-*)
5213506e 1272 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 1273 # Reject names that are not valid shell variable names.
5213506e
RW
1274 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1275 as_fn_error "invalid package name: $ac_useropt"
1276 ac_useropt_orig=$ac_useropt
1277 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1278 case $ac_user_opts in
1279 *"
1280"with_$ac_useropt"
1281"*) ;;
1282 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1283 ac_unrecognized_sep=', ';;
b61ff9c8 1284 esac
5213506e 1285 eval with_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1286
1287 -without-* | --without-*)
5213506e 1288 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 1289 # Reject names that are not valid shell variable names.
5213506e
RW
1290 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1291 as_fn_error "invalid package name: $ac_useropt"
1292 ac_useropt_orig=$ac_useropt
1293 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1294 case $ac_user_opts in
1295 *"
1296"with_$ac_useropt"
1297"*) ;;
1298 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1299 ac_unrecognized_sep=', ';;
1300 esac
1301 eval with_$ac_useropt=no ;;
861bb6c1
JL
1302
1303 --x)
1304 # Obsolete; use --with-x.
1305 with_x=yes ;;
1306
1307 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1308 | --x-incl | --x-inc | --x-in | --x-i)
1309 ac_prev=x_includes ;;
1310 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1311 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 1312 x_includes=$ac_optarg ;;
861bb6c1
JL
1313
1314 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1315 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1316 ac_prev=x_libraries ;;
1317 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1318 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 1319 x_libraries=$ac_optarg ;;
861bb6c1 1320
5213506e
RW
1321 -*) as_fn_error "unrecognized option: \`$ac_option'
1322Try \`$0 --help' for more information."
861bb6c1
JL
1323 ;;
1324
ba479fd2
NN
1325 *=*)
1326 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1327 # Reject names that are not valid shell variable names.
5213506e
RW
1328 case $ac_envvar in #(
1329 '' | [0-9]* | *[!_$as_cr_alnum]* )
1330 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1331 esac
1332 eval $ac_envvar=\$ac_optarg
ba479fd2
NN
1333 export $ac_envvar ;;
1334
861bb6c1 1335 *)
ba479fd2 1336 # FIXME: should be removed in autoconf 3.0.
5213506e 1337 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
ba479fd2 1338 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
5213506e 1339 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
ba479fd2 1340 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
1341 ;;
1342
1343 esac
1344done
1345
1346if test -n "$ac_prev"; then
ba479fd2 1347 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
5213506e 1348 as_fn_error "missing argument to $ac_option"
63cf211a 1349fi
63cf211a 1350
5213506e
RW
1351if test -n "$ac_unrecognized_opts"; then
1352 case $enable_option_checking in
1353 no) ;;
1354 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1355 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2f41c1d6 1356 esac
5213506e 1357fi
2f41c1d6 1358
5213506e
RW
1359# Check all directory arguments for consistency.
1360for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1361 datadir sysconfdir sharedstatedir localstatedir includedir \
1362 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1363 libdir localedir mandir
b61ff9c8 1364do
5213506e
RW
1365 eval ac_val=\$$ac_var
1366 # Remove trailing slashes.
1367 case $ac_val in
1368 */ )
1369 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1370 eval $ac_var=\$ac_val;;
1371 esac
1372 # Be sure to have absolute directory names.
b61ff9c8 1373 case $ac_val in
5213506e
RW
1374 [\\/$]* | ?:[\\/]* ) continue;;
1375 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
b61ff9c8 1376 esac
5213506e 1377 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
b61ff9c8
BS
1378done
1379
1380# There might be people who depend on the old broken behavior: `$host'
1381# used to hold the argument of --host etc.
1382# FIXME: To remove some day.
1383build=$build_alias
1384host=$host_alias
ba479fd2
NN
1385target=$target_alias
1386
1387# FIXME: To remove some day.
1388if test "x$host_alias" != x; then
1389 if test "x$build_alias" = x; then
1390 cross_compiling=maybe
5213506e 1391 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
ba479fd2
NN
1392 If a cross compiler is detected then cross compile mode will be used." >&2
1393 elif test "x$build_alias" != "x$host_alias"; then
1394 cross_compiling=yes
1395 fi
1396fi
6e3f3080 1397
ba479fd2
NN
1398ac_tool_prefix=
1399test -n "$host_alias" && ac_tool_prefix=$host_alias-
1400
1401test "$silent" = yes && exec 6>/dev/null
861bb6c1 1402
861bb6c1 1403
5213506e
RW
1404ac_pwd=`pwd` && test -n "$ac_pwd" &&
1405ac_ls_di=`ls -di .` &&
1406ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1407 as_fn_error "working directory cannot be determined"
1408test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1409 as_fn_error "pwd does not report name of working directory"
1410
1411
861bb6c1
JL
1412# Find the source files, if location was not specified.
1413if test -z "$srcdir"; then
1414 ac_srcdir_defaulted=yes
5213506e
RW
1415 # Try the directory containing this script, then the parent directory.
1416 ac_confdir=`$as_dirname -- "$as_myself" ||
1417$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1418 X"$as_myself" : 'X\(//\)[^/]' \| \
1419 X"$as_myself" : 'X\(//\)$' \| \
1420 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1421$as_echo X"$as_myself" |
1422 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1423 s//\1/
1424 q
1425 }
1426 /^X\(\/\/\)[^/].*/{
1427 s//\1/
1428 q
1429 }
1430 /^X\(\/\/\)$/{
1431 s//\1/
1432 q
1433 }
1434 /^X\(\/\).*/{
1435 s//\1/
1436 q
1437 }
1438 s/.*/./; q'`
861bb6c1 1439 srcdir=$ac_confdir
5213506e 1440 if test ! -r "$srcdir/$ac_unique_file"; then
861bb6c1
JL
1441 srcdir=..
1442 fi
1443else
1444 ac_srcdir_defaulted=no
1445fi
5213506e
RW
1446if test ! -r "$srcdir/$ac_unique_file"; then
1447 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1448 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1449fi
1450ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1451ac_abs_confdir=`(
1452 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1453 pwd)`
1454# When building in place, set srcdir=.
1455if test "$ac_abs_confdir" = "$ac_pwd"; then
1456 srcdir=.
1457fi
1458# Remove unnecessary trailing slashes from srcdir.
1459# Double slashes in file names in object file debugging info
1460# mess up M-x gdb in Emacs.
1461case $srcdir in
1462*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1463esac
1464for ac_var in $ac_precious_vars; do
1465 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1466 eval ac_env_${ac_var}_value=\$${ac_var}
1467 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1468 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1469done
63cf211a 1470
ba479fd2
NN
1471#
1472# Report the --help message.
1473#
1474if test "$ac_init_help" = "long"; then
1475 # Omit some internal or obsolete options to make the list less imposing.
1476 # This message is too long to be a string in the A/UX 3.1 sh.
1477 cat <<_ACEOF
1478\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 1479
ba479fd2 1480Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 1481
ba479fd2
NN
1482To assign environment variables (e.g., CC, CFLAGS...), specify them as
1483VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 1484
ba479fd2 1485Defaults for the options are specified in brackets.
861bb6c1 1486
ba479fd2
NN
1487Configuration:
1488 -h, --help display this help and exit
1489 --help=short display options specific to this package
1490 --help=recursive display the short help of all the included packages
1491 -V, --version display version information and exit
1492 -q, --quiet, --silent do not print \`checking...' messages
1493 --cache-file=FILE cache test results in FILE [disabled]
1494 -C, --config-cache alias for \`--cache-file=config.cache'
1495 -n, --no-create do not create output files
1496 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1497
ba479fd2
NN
1498Installation directories:
1499 --prefix=PREFIX install architecture-independent files in PREFIX
5213506e 1500 [$ac_default_prefix]
ba479fd2 1501 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5213506e 1502 [PREFIX]
861bb6c1 1503
ba479fd2
NN
1504By default, \`make install' will install all the files in
1505\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1506an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1507for instance \`--prefix=\$HOME'.
13c22933 1508
ba479fd2 1509For better control, use the options below.
13c22933 1510
ba479fd2 1511Fine tuning of the installation directories:
5213506e
RW
1512 --bindir=DIR user executables [EPREFIX/bin]
1513 --sbindir=DIR system admin executables [EPREFIX/sbin]
1514 --libexecdir=DIR program executables [EPREFIX/libexec]
1515 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1516 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1517 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1518 --libdir=DIR object code libraries [EPREFIX/lib]
1519 --includedir=DIR C header files [PREFIX/include]
1520 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1521 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1522 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1523 --infodir=DIR info documentation [DATAROOTDIR/info]
1524 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1525 --mandir=DIR man documentation [DATAROOTDIR/man]
1526 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1527 --htmldir=DIR html documentation [DOCDIR]
1528 --dvidir=DIR dvi documentation [DOCDIR]
1529 --pdfdir=DIR pdf documentation [DOCDIR]
1530 --psdir=DIR ps documentation [DOCDIR]
ba479fd2 1531_ACEOF
13c22933 1532
ba479fd2 1533 cat <<\_ACEOF
13c22933 1534
ba479fd2
NN
1535Program names:
1536 --program-prefix=PREFIX prepend PREFIX to installed program names
1537 --program-suffix=SUFFIX append SUFFIX to installed program names
1538 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1539
ba479fd2
NN
1540System types:
1541 --build=BUILD configure for building on BUILD [guessed]
1542 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1543 --target=TARGET configure for building compilers for TARGET [HOST]
1544_ACEOF
13c22933
JJ
1545fi
1546
ba479fd2 1547if test -n "$ac_init_help"; then
13c22933 1548
ba479fd2 1549 cat <<\_ACEOF
13c22933 1550
ba479fd2 1551Optional Features:
5213506e 1552 --disable-option-checking ignore unrecognized --enable/--with options
ba479fd2
NN
1553 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1554 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1555 --enable-generated-files-in-srcdir
1556 put copies of generated files in source dir
1557 intended for creating source tarballs for users
1558 without texinfo bison or flex.
3bbd5a19 1559 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1560 --enable-checking=LIST
1561 enable expensive run-time checks. With LIST,
1562 enable only specific categories of checks.
cdce5c16 1563 Categories are: yes,no,all,none,release.
726a989a 1564 Flags are: assert,df,fold,gc,gcac,gimple,misc,
7e98624c 1565 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1566 --enable-coverage=LEVEL
fb38008e 1567 enable compiler's code coverage collection.
ba479fd2
NN
1568 Use to measure compiler performance and locate
1569 unused parts of the compiler. With LEVEL, specify
1570 optimization. Values are opt, noopt,
1571 default is noopt
1572 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
00020c16 1573 --enable-build-with-cxx build with C++ compiler instead of C compiler
ba479fd2
NN
1574 --enable-multilib enable library support for multiple ABIs
1575 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1576 --enable-decimal-float={no,yes,bid,dpd}
1577 enable decimal float extension to C. Selecting 'bid'
1578 or 'dpd' choses which decimal floating point format
1579 to use
ab22c1fa 1580 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1581 --enable-threads enable thread usage for target GCC
1582 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1583 --enable-tls enable or disable generation of tls code
1584 overriding the assembler check for tls support
ba479fd2
NN
1585 --enable-objc-gc enable the use of Boehm's garbage collector with
1586 the GNU Objective-C runtime
1587 --disable-shared don't provide a shared libgcc
1588 --enable-intermodule build the compiler in one step
f3c9f174 1589 --enable-languages=LIST specify which front-ends to build
dfb77e37 1590 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1591 --enable-initfini-array use .init_array/.fini_array sections
1592 --enable-sjlj-exceptions
1593 arrange to use setjmp/longjmp exception handling
7f970b70 1594 --enable-secureplt enable -msecure-plt by default for PowerPC
ad211091
KT
1595 --enable-leading-mingw64-underscores
1596 Enable leading underscores on 64 bit mingw targets
922e3e33 1597 --enable-cld enable -mcld by default for 32bit x86
ba479fd2
NN
1598 --disable-win32-registry
1599 disable lookup of installation paths in the
1600 Registry on Windows hosts
1601 --enable-win32-registry enable registry lookup (default)
1602 --enable-win32-registry=KEY
1603 use KEY instead of GCC version as the last portion
1604 of the registry key
5213506e
RW
1605 --enable-shared[=PKGS] build shared libraries [default=yes]
1606 --enable-static[=PKGS] build static libraries [default=yes]
da0f6381
PB
1607 --enable-fast-install[=PKGS]
1608 optimize for fast installation [default=yes]
1609 --disable-libtool-lock avoid locking (might break parallel builds)
55c4f715 1610 --enable-comdat enable COMDAT group support
e31bcd1b
JM
1611 --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on
1612 glibc systems
cd533689
PP
1613 --enable-linker-build-id
1614 compiler will always pass --build-id to linker
ba479fd2
NN
1615 --enable-maintainer-mode
1616 enable make rules and dependencies not useful
1617 (and sometimes confusing) to the casual installer
1618 --enable-version-specific-runtime-libs
1619 specify that runtime libraries should be
1620 installed in a compiler-specific directory
68a607d8 1621 --enable-plugin enable plugin support
093e61a6 1622
ba479fd2
NN
1623Optional Packages:
1624 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1625 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1626 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1627 --with-local-prefix=DIR specifies directory to put local include
1628 --with-gxx-include-dir=DIR
1629 specifies directory to put g++ header files
1630 --with-cpp-install-dir=DIR
1631 install the user visible C preprocessor in DIR
1632 (relative to PREFIX) as well as PREFIX/bin
1633 --with-gnu-ld arrange to work with GNU ld.
1634 --with-ld arrange to use the specified ld (full pathname)
d594623a 1635 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1636 --with-gnu-as arrange to work with GNU as
1637 --with-as arrange to use the specified as (full pathname)
1638 --with-stabs arrange to use stabs instead of host debug format
1639 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1640 --with-build-sysroot=sysroot
1641 use sysroot as the system root during the build
ba479fd2 1642 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
e11ddaf5 1643 --with-specs=SPECS add SPECS to driver command-line processing
2f41c1d6
PB
1644 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1645 --with-bugurl=URL Direct users to URL to report a bug
aca600aa 1646 --with-multilib-list Select multilibs (SH only)
dfb77e37
KC
1647 --with-gnu-ld assume the C compiler uses GNU ld default=no
1648 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1649 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1650 --with-system-libunwind use installed libunwind
da0f6381
PB
1651 --with-pic try to use only PIC/non-PIC objects [default=use
1652 both]
1653 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
5938f74d 1654 --with-plugin-ld=[ARG] specify the plugin linker
ed965309 1655 --with-long-double-128 Use 128-bit long double by default.
59415997 1656 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1657 with the compiler
1658 --with-system-zlib use installed libz
22482f74 1659 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
13c22933 1660
ba479fd2
NN
1661Some influential environment variables:
1662 CC C compiler command
1663 CFLAGS C compiler flags
1664 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1665 nonstandard directory <lib dir>
5213506e
RW
1666 LIBS libraries to pass to the linker, e.g. -l<library>
1667 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1668 you have headers in a nonstandard directory <include dir>
00020c16
ILT
1669 CXX C++ compiler command
1670 CXXFLAGS C++ compiler flags
ba479fd2 1671 CPP C preprocessor
00020c16 1672 CXXCPP C++ preprocessor
6de9cd9a
DN
1673 GMPLIBS How to link GMP
1674 GMPINC How to find GMP include files
f8bf9252
SP
1675 PPLLIBS How to link PPL
1676 PPLINC How to find PPL include files
1677 CLOOGLIBS How to link CLOOG
1678 CLOOGINC How to find CLOOG include files
d7f09764
DN
1679 LIBELFLIBS How to link libelf
1680 LIBELFINC How to find libelf include files
13c22933 1681
ba479fd2
NN
1682Use these variables to override the choices made by `configure' or to help
1683it to find libraries and programs with nonstandard names/locations.
73458fb7 1684
5213506e 1685Report bugs to the package provider.
ba479fd2 1686_ACEOF
5213506e 1687ac_status=$?
ba479fd2 1688fi
6e3f3080 1689
ba479fd2
NN
1690if test "$ac_init_help" = "recursive"; then
1691 # If there are subdirs, report their specific --help.
ba479fd2 1692 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
5213506e
RW
1693 test -d "$ac_dir" ||
1694 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1695 continue
ba479fd2
NN
1696 ac_builddir=.
1697
5213506e
RW
1698case "$ac_dir" in
1699.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1700*)
1701 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1702 # A ".." for each directory in $ac_dir_suffix.
1703 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1704 case $ac_top_builddir_sub in
1705 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1706 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1707 esac ;;
1708esac
1709ac_abs_top_builddir=$ac_pwd
1710ac_abs_builddir=$ac_pwd$ac_dir_suffix
1711# for backward compatibility:
1712ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
1713
1714case $srcdir in
5213506e 1715 .) # We are building in place.
ba479fd2 1716 ac_srcdir=.
5213506e
RW
1717 ac_top_srcdir=$ac_top_builddir_sub
1718 ac_abs_top_srcdir=$ac_pwd ;;
1719 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 1720 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
1721 ac_top_srcdir=$srcdir
1722 ac_abs_top_srcdir=$srcdir ;;
1723 *) # Relative name.
1724 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1725 ac_top_srcdir=$ac_top_build_prefix$srcdir
1726 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
86da66b5 1727esac
5213506e
RW
1728ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1729
1730 cd "$ac_dir" || { ac_status=$?; continue; }
1731 # Check for guested configure.
1732 if test -f "$ac_srcdir/configure.gnu"; then
1733 echo &&
1734 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1735 elif test -f "$ac_srcdir/configure"; then
1736 echo &&
1737 $SHELL "$ac_srcdir/configure" --help=recursive
ba479fd2 1738 else
5213506e
RW
1739 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1740 fi || ac_status=$?
1741 cd "$ac_pwd" || { ac_status=$?; break; }
ba479fd2
NN
1742 done
1743fi
1744
5213506e 1745test -n "$ac_init_help" && exit $ac_status
ba479fd2
NN
1746if $ac_init_version; then
1747 cat <<\_ACEOF
5213506e
RW
1748configure
1749generated by GNU Autoconf 2.64
ba479fd2 1750
5213506e 1751Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
1752This configure script is free software; the Free Software Foundation
1753gives unlimited permission to copy, distribute and modify it.
1754_ACEOF
5213506e 1755 exit
ba479fd2 1756fi
ba479fd2 1757
5213506e
RW
1758## ------------------------ ##
1759## Autoconf initialization. ##
1760## ------------------------ ##
ba479fd2 1761
5213506e
RW
1762# ac_fn_c_try_compile LINENO
1763# --------------------------
1764# Try to compile conftest.$ac_ext, and return whether this succeeded.
1765ac_fn_c_try_compile ()
ba479fd2 1766{
5213506e
RW
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 rm -f conftest.$ac_objext
1769 if { { ac_try="$ac_compile"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_compile") 2>conftest.err
1777 ac_status=$?
1778 if test -s conftest.err; then
1779 grep -v '^ *+' conftest.err >conftest.er1
1780 cat conftest.er1 >&5
1781 mv -f conftest.er1 conftest.err
1782 fi
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; } && {
1785 test -z "$ac_c_werror_flag" ||
1786 test ! -s conftest.err
1787 } && test -s conftest.$ac_objext; then :
1788 ac_retval=0
1789else
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1792
5213506e
RW
1793 ac_retval=1
1794fi
1795 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1796 return $ac_retval
ba479fd2 1797
5213506e 1798} # ac_fn_c_try_compile
ba479fd2 1799
5213506e
RW
1800# ac_fn_cxx_try_compile LINENO
1801# ----------------------------
1802# Try to compile conftest.$ac_ext, and return whether this succeeded.
1803ac_fn_cxx_try_compile ()
1804{
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806 rm -f conftest.$ac_objext
1807 if { { ac_try="$ac_compile"
1808case "(($ac_try" in
1809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1810 *) ac_try_echo=$ac_try;;
1811esac
1812eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1813$as_echo "$ac_try_echo"; } >&5
1814 (eval "$ac_compile") 2>conftest.err
1815 ac_status=$?
1816 if test -s conftest.err; then
1817 grep -v '^ *+' conftest.err >conftest.er1
1818 cat conftest.er1 >&5
1819 mv -f conftest.er1 conftest.err
1820 fi
1821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1822 test $ac_status = 0; } && {
1823 test -z "$ac_cxx_werror_flag" ||
1824 test ! -s conftest.err
1825 } && test -s conftest.$ac_objext; then :
1826 ac_retval=0
1827else
1828 $as_echo "$as_me: failed program was:" >&5
1829sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1830
5213506e
RW
1831 ac_retval=1
1832fi
1833 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1834 return $ac_retval
ba479fd2 1835
5213506e 1836} # ac_fn_cxx_try_compile
ba479fd2 1837
5213506e
RW
1838# ac_fn_c_try_cpp LINENO
1839# ----------------------
1840# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1841ac_fn_c_try_cpp ()
1842{
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 if { { ac_try="$ac_cpp conftest.$ac_ext"
1845case "(($ac_try" in
1846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1847 *) ac_try_echo=$ac_try;;
1848esac
1849eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1850$as_echo "$ac_try_echo"; } >&5
1851 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1852 ac_status=$?
1853 if test -s conftest.err; then
1854 grep -v '^ *+' conftest.err >conftest.er1
1855 cat conftest.er1 >&5
1856 mv -f conftest.er1 conftest.err
1857 fi
1858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1859 test $ac_status = 0; } >/dev/null && {
1860 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1861 test ! -s conftest.err
1862 }; then :
1863 ac_retval=0
1864else
1865 $as_echo "$as_me: failed program was:" >&5
1866sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1867
5213506e
RW
1868 ac_retval=1
1869fi
1870 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1871 return $ac_retval
ba479fd2 1872
5213506e 1873} # ac_fn_c_try_cpp
ba479fd2 1874
5213506e
RW
1875# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1876# -------------------------------------------------------
1877# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1878# the include files in INCLUDES and setting the cache variable VAR
1879# accordingly.
1880ac_fn_c_check_header_mongrel ()
1881{
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885$as_echo_n "checking for $2... " >&6; }
1886if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1887 $as_echo_n "(cached) " >&6
1888fi
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
1892else
1893 # Is the header compilable?
1894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1895$as_echo_n "checking $2 usability... " >&6; }
1896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$4
1899#include <$2>
ba479fd2 1900_ACEOF
5213506e
RW
1901if ac_fn_c_try_compile "$LINENO"; then :
1902 ac_header_compiler=yes
1903else
1904 ac_header_compiler=no
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1908$as_echo "$ac_header_compiler" >&6; }
ba479fd2 1909
5213506e
RW
1910# Is the header present?
1911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1912$as_echo_n "checking $2 presence... " >&6; }
1913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915#include <$2>
1916_ACEOF
1917if ac_fn_c_try_cpp "$LINENO"; then :
1918 ac_header_preproc=yes
1919else
1920 ac_header_preproc=no
1921fi
1922rm -f conftest.err conftest.$ac_ext
1923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1924$as_echo "$ac_header_preproc" >&6; }
ba479fd2 1925
5213506e
RW
1926# So? What about this header?
1927case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1928 yes:no: )
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1930$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1932$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1933 ;;
1934 no:yes:* )
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1936$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1938$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1940$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1942$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1944$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1945 ;;
1946esac
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1948$as_echo_n "checking for $2... " >&6; }
1949if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1950 $as_echo_n "(cached) " >&6
1951else
1952 eval "$3=\$ac_header_compiler"
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
1957fi
1958 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 1959
5213506e 1960} # ac_fn_c_check_header_mongrel
ba479fd2 1961
5213506e
RW
1962# ac_fn_c_try_run LINENO
1963# ----------------------
1964# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1965# that executables *can* be run.
1966ac_fn_c_try_run ()
b61ff9c8 1967{
5213506e
RW
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 if { { ac_try="$ac_link"
1970case "(($ac_try" in
1971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1972 *) ac_try_echo=$ac_try;;
1973esac
1974eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1975$as_echo "$ac_try_echo"; } >&5
1976 (eval "$ac_link") 2>&5
1977 ac_status=$?
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1980 { { case "(($ac_try" in
1981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1982 *) ac_try_echo=$ac_try;;
1983esac
1984eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1985$as_echo "$ac_try_echo"; } >&5
1986 (eval "$ac_try") 2>&5
1987 ac_status=$?
1988 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1989 test $ac_status = 0; }; }; then :
1990 ac_retval=0
1991else
1992 $as_echo "$as_me: program exited with status $ac_status" >&5
1993 $as_echo "$as_me: failed program was:" >&5
1994sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1995
5213506e
RW
1996 ac_retval=$ac_status
1997fi
1998 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1999 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2000 return $ac_retval
ba479fd2 2001
5213506e 2002} # ac_fn_c_try_run
ba479fd2 2003
5213506e
RW
2004# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2005# -------------------------------------------------------
2006# Tests whether HEADER exists and can be compiled using the include files in
2007# INCLUDES, setting the cache variable VAR accordingly.
2008ac_fn_c_check_header_compile ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2012$as_echo_n "checking for $2... " >&6; }
2013if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2014 $as_echo_n "(cached) " >&6
2015else
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019#include <$2>
ba479fd2 2020_ACEOF
5213506e
RW
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 eval "$3=yes"
2023else
2024 eval "$3=no"
2025fi
2026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2027fi
2028eval ac_res=\$$3
2029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2030$as_echo "$ac_res" >&6; }
2031 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2032
5213506e 2033} # ac_fn_c_check_header_compile
ba479fd2 2034
5213506e
RW
2035# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2036# --------------------------------------------
2037# Tries to find the compile-time value of EXPR in a program that includes
2038# INCLUDES, setting VAR accordingly. Returns whether the value could be
2039# computed
2040ac_fn_c_compute_int ()
2041{
2042 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2043 if test "$cross_compiling" = yes; then
2044 # Depending upon the size, compute the lo and hi bounds.
2045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) >= 0)];
2052test_array [0] = 0
ba479fd2 2053
5213506e
RW
2054 ;
2055 return 0;
2056}
ba479fd2 2057_ACEOF
5213506e
RW
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_lo=0 ac_mid=0
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2068test_array [0] = 0
ba479fd2 2069
5213506e
RW
2070 ;
2071 return 0;
2072}
ba479fd2 2073_ACEOF
5213506e
RW
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_hi=$ac_mid; break
2076else
2077 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2078 if test $ac_lo -le $ac_mid; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
2091main ()
2092{
2093static int test_array [1 - 2 * !(($2) < 0)];
2094test_array [0] = 0
ba479fd2 2095
5213506e
RW
2096 ;
2097 return 0;
2098}
ba479fd2 2099_ACEOF
5213506e
RW
2100if ac_fn_c_try_compile "$LINENO"; then :
2101 ac_hi=-1 ac_mid=-1
2102 while :; do
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2110test_array [0] = 0
ba479fd2 2111
5213506e
RW
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_lo=$ac_mid; break
2118else
2119 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2120 if test $ac_mid -le $ac_hi; then
2121 ac_lo= ac_hi=
2122 break
2123 fi
2124 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
ba479fd2 2125fi
5213506e
RW
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127 done
ba479fd2 2128else
5213506e 2129 ac_lo= ac_hi=
ba479fd2 2130fi
5213506e
RW
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134# Binary search between lo and hi bounds.
2135while test "x$ac_lo" != "x$ac_hi"; do
2136 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2144test_array [0] = 0
ba479fd2 2145
5213506e
RW
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=$ac_mid
2152else
2153 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
ba479fd2 2154fi
5213506e
RW
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156done
2157case $ac_lo in #((
2158?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2159'') ac_retval=1 ;;
2160esac
2161 else
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165static long int longval () { return $2; }
2166static unsigned long int ulongval () { return $2; }
2167#include <stdio.h>
2168#include <stdlib.h>
2169int
2170main ()
2171{
ba479fd2 2172
5213506e
RW
2173 FILE *f = fopen ("conftest.val", "w");
2174 if (! f)
2175 return 1;
2176 if (($2) < 0)
2177 {
2178 long int i = longval ();
2179 if (i != ($2))
2180 return 1;
2181 fprintf (f, "%ld", i);
2182 }
2183 else
2184 {
2185 unsigned long int i = ulongval ();
2186 if (i != ($2))
2187 return 1;
2188 fprintf (f, "%lu", i);
2189 }
2190 /* Do not output a trailing newline, as this causes \r\n confusion
2191 on some platforms. */
2192 return ferror (f) || fclose (f) != 0;
ba479fd2 2193
5213506e
RW
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198if ac_fn_c_try_run "$LINENO"; then :
2199 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2200else
2201 ac_retval=1
2202fi
2203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2204 conftest.$ac_objext conftest.beam conftest.$ac_ext
2205rm -f conftest.val
ba479fd2 2206
5213506e
RW
2207 fi
2208 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2209 return $ac_retval
ba479fd2 2210
5213506e 2211} # ac_fn_c_compute_int
ba479fd2 2212
5213506e
RW
2213# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2214# -------------------------------------------
2215# Tests whether TYPE exists after having included INCLUDES, setting cache
2216# variable VAR accordingly.
2217ac_fn_c_check_type ()
2218{
2219 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2221$as_echo_n "checking for $2... " >&6; }
2222if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2223 $as_echo_n "(cached) " >&6
2224else
2225 eval "$3=no"
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229int
2230main ()
2231{
2232if (sizeof ($2))
2233 return 0;
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_compile "$LINENO"; then :
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241$4
2242int
2243main ()
2244{
2245if (sizeof (($2)))
2246 return 0;
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 2252
5213506e
RW
2253else
2254 eval "$3=yes"
2255fi
2256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2257fi
2258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259fi
2260eval ac_res=\$$3
2261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2262$as_echo "$ac_res" >&6; }
2263 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2264
5213506e 2265} # ac_fn_c_check_type
ba479fd2 2266
fa802374
KT
2267# ac_fn_c_find_intX_t LINENO BITS VAR
2268# -----------------------------------
2269# Finds a signed integer type with width BITS, setting cache variable VAR
2270# accordingly.
2271ac_fn_c_find_intX_t ()
5213506e
RW
2272{
2273 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
fa802374
KT
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2275$as_echo_n "checking for int$2_t... " >&6; }
5213506e
RW
2276if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2277 $as_echo_n "(cached) " >&6
2278else
fa802374
KT
2279 eval "$3=no"
2280 for ac_type in int$2_t 'int' 'long int' \
2281 'long long int' 'short int' 'signed char'; do
2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h. */
2284$ac_includes_default
2285int
2286main ()
2287{
2288static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
2289test_array [0] = 0
2290
2291 ;
2292 return 0;
2293}
2294_ACEOF
2295if ac_fn_c_try_compile "$LINENO"; then :
5213506e
RW
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
fa802374
KT
2298$ac_includes_default
2299int
2300main ()
2301{
2302static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
2303 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
2304test_array [0] = 0
2305
2306 ;
2307 return 0;
2308}
5213506e 2309_ACEOF
fa802374
KT
2310if ac_fn_c_try_compile "$LINENO"; then :
2311
5213506e 2312else
fa802374
KT
2313 case $ac_type in #(
2314 int$2_t) :
2315 eval "$3=yes" ;; #(
2316 *) :
2317 eval "$3=\$ac_type" ;;
2318esac
5213506e 2319fi
fa802374
KT
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323 eval as_val=\$$3
2324 if test "x$as_val" = x""no; then :
2325
2326else
2327 break
2328fi
2329 done
5213506e
RW
2330fi
2331eval ac_res=\$$3
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2333$as_echo "$ac_res" >&6; }
2334 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2335
fa802374 2336} # ac_fn_c_find_intX_t
18c04407 2337
5213506e
RW
2338# ac_fn_c_try_link LINENO
2339# -----------------------
2340# Try to link conftest.$ac_ext, and return whether this succeeded.
2341ac_fn_c_try_link ()
2342{
2343 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2344 rm -f conftest.$ac_objext conftest$ac_exeext
2345 if { { ac_try="$ac_link"
2346case "(($ac_try" in
2347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2348 *) ac_try_echo=$ac_try;;
2349esac
2350eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2351$as_echo "$ac_try_echo"; } >&5
2352 (eval "$ac_link") 2>conftest.err
2353 ac_status=$?
2354 if test -s conftest.err; then
2355 grep -v '^ *+' conftest.err >conftest.er1
2356 cat conftest.er1 >&5
2357 mv -f conftest.er1 conftest.err
2358 fi
2359 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2360 test $ac_status = 0; } && {
2361 test -z "$ac_c_werror_flag" ||
2362 test ! -s conftest.err
2363 } && test -s conftest$ac_exeext && {
2364 test "$cross_compiling" = yes ||
2365 $as_test_x conftest$ac_exeext
2366 }; then :
2367 ac_retval=0
2368else
2369 $as_echo "$as_me: failed program was:" >&5
2370sed 's/^/| /' conftest.$ac_ext >&5
18c04407 2371
5213506e
RW
2372 ac_retval=1
2373fi
2374 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2375 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2376 # interfere with the next link command; also delete a directory that is
2377 # left behind by Apple's compiler. We do this before executing the actions.
2378 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2379 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2380 return $ac_retval
18c04407 2381
5213506e 2382} # ac_fn_c_try_link
ba479fd2 2383
fa802374
KT
2384# ac_fn_c_find_uintX_t LINENO BITS VAR
2385# ------------------------------------
2386# Finds an unsigned integer type with width BITS, setting cache variable VAR
2387# accordingly.
2388ac_fn_c_find_uintX_t ()
2389{
2390 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2392$as_echo_n "checking for uint$2_t... " >&6; }
2393if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2394 $as_echo_n "(cached) " >&6
2395else
2396 eval "$3=no"
2397 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2398 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400/* end confdefs.h. */
2401$ac_includes_default
2402int
2403main ()
2404{
2405static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
2406test_array [0] = 0
2407
2408 ;
2409 return 0;
2410}
2411_ACEOF
2412if ac_fn_c_try_compile "$LINENO"; then :
2413 case $ac_type in #(
2414 uint$2_t) :
2415 eval "$3=yes" ;; #(
2416 *) :
2417 eval "$3=\$ac_type" ;;
2418esac
2419fi
2420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421 eval as_val=\$$3
2422 if test "x$as_val" = x""no; then :
2423
2424else
2425 break
2426fi
2427 done
2428fi
2429eval ac_res=\$$3
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
2432 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2433
2434} # ac_fn_c_find_uintX_t
2435
2436# ac_fn_c_check_header_preproc LINENO HEADER VAR
2437# ----------------------------------------------
2438# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2439ac_fn_c_check_header_preproc ()
2440{
2441 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2443$as_echo_n "checking for $2... " >&6; }
2444if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2445 $as_echo_n "(cached) " >&6
2446else
2447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2448/* end confdefs.h. */
2449#include <$2>
2450_ACEOF
2451if ac_fn_c_try_cpp "$LINENO"; then :
2452 eval "$3=yes"
2453else
2454 eval "$3=no"
2455fi
2456rm -f conftest.err conftest.$ac_ext
2457fi
2458eval ac_res=\$$3
2459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2460$as_echo "$ac_res" >&6; }
2461 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2462
2463} # ac_fn_c_check_header_preproc
2464
5213506e
RW
2465# ac_fn_c_check_func LINENO FUNC VAR
2466# ----------------------------------
2467# Tests whether FUNC exists, setting the cache variable VAR accordingly
2468ac_fn_c_check_func ()
2469{
2470 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2472$as_echo_n "checking for $2... " >&6; }
2473if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2474 $as_echo_n "(cached) " >&6
2475else
2476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2477/* end confdefs.h. */
2478/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2479 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2480#define $2 innocuous_$2
ba479fd2 2481
5213506e
RW
2482/* System header to define __stub macros and hopefully few prototypes,
2483 which can conflict with char $2 (); below.
2484 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2485 <limits.h> exists even on freestanding compilers. */
914c5af7 2486
5213506e
RW
2487#ifdef __STDC__
2488# include <limits.h>
2489#else
2490# include <assert.h>
2491#endif
ba479fd2 2492
5213506e 2493#undef $2
ba479fd2 2494
5213506e
RW
2495/* Override any GCC internal prototype to avoid an error.
2496 Use char because int might match the return type of a GCC
2497 builtin and then its argument prototype would still apply. */
2498#ifdef __cplusplus
2499extern "C"
2500#endif
2501char $2 ();
2502/* The GNU C library defines this for functions which it implements
2503 to always fail with ENOSYS. Some functions are actually named
2504 something starting with __ and the normal name is an alias. */
2505#if defined __stub_$2 || defined __stub___$2
2506choke me
2507#endif
9f18db39 2508
5213506e
RW
2509int
2510main ()
2511{
2512return $2 ();
2513 ;
2514 return 0;
2515}
2516_ACEOF
2517if ac_fn_c_try_link "$LINENO"; then :
2518 eval "$3=yes"
2519else
2520 eval "$3=no"
ba479fd2 2521fi
5213506e
RW
2522rm -f core conftest.err conftest.$ac_objext \
2523 conftest$ac_exeext conftest.$ac_ext
2524fi
2525eval ac_res=\$$3
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2527$as_echo "$ac_res" >&6; }
2528 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
b61ff9c8 2529
5213506e 2530} # ac_fn_c_check_func
b61ff9c8 2531
5213506e
RW
2532# ac_fn_cxx_try_cpp LINENO
2533# ------------------------
2534# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2535ac_fn_cxx_try_cpp ()
2536{
2537 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2538 if { { ac_try="$ac_cpp conftest.$ac_ext"
2539case "(($ac_try" in
2540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2541 *) ac_try_echo=$ac_try;;
2542esac
2543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2544$as_echo "$ac_try_echo"; } >&5
2545 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2546 ac_status=$?
2547 if test -s conftest.err; then
2548 grep -v '^ *+' conftest.err >conftest.er1
2549 cat conftest.er1 >&5
2550 mv -f conftest.er1 conftest.err
2551 fi
2552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2553 test $ac_status = 0; } >/dev/null && {
2554 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2555 test ! -s conftest.err
2556 }; then :
2557 ac_retval=0
2558else
2559 $as_echo "$as_me: failed program was:" >&5
2560sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2561
5213506e 2562 ac_retval=1
ba479fd2 2563fi
5213506e
RW
2564 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2565 return $ac_retval
b61ff9c8 2566
5213506e 2567} # ac_fn_cxx_try_cpp
b61ff9c8 2568
5213506e
RW
2569# ac_fn_cxx_try_link LINENO
2570# -------------------------
2571# Try to link conftest.$ac_ext, and return whether this succeeded.
2572ac_fn_cxx_try_link ()
2573{
2574 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2575 rm -f conftest.$ac_objext conftest$ac_exeext
2576 if { { ac_try="$ac_link"
2577case "(($ac_try" in
2578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579 *) ac_try_echo=$ac_try;;
2580esac
2581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582$as_echo "$ac_try_echo"; } >&5
2583 (eval "$ac_link") 2>conftest.err
2584 ac_status=$?
2585 if test -s conftest.err; then
2586 grep -v '^ *+' conftest.err >conftest.er1
2587 cat conftest.er1 >&5
2588 mv -f conftest.er1 conftest.err
2589 fi
2590 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2591 test $ac_status = 0; } && {
2592 test -z "$ac_cxx_werror_flag" ||
2593 test ! -s conftest.err
2594 } && test -s conftest$ac_exeext && {
2595 test "$cross_compiling" = yes ||
2596 $as_test_x conftest$ac_exeext
2597 }; then :
2598 ac_retval=0
2599else
2600 $as_echo "$as_me: failed program was:" >&5
2601sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2602
5213506e 2603 ac_retval=1
ba479fd2 2604fi
5213506e
RW
2605 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2606 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2607 # interfere with the next link command; also delete a directory that is
2608 # left behind by Apple's compiler. We do this before executing the actions.
2609 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2610 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2611 return $ac_retval
ba479fd2 2612
5213506e
RW
2613} # ac_fn_cxx_try_link
2614cat >config.log <<_ACEOF
2615This file contains any messages produced by compilers while
2616running configure, to aid debugging if configure makes a mistake.
ba479fd2 2617
5213506e
RW
2618It was created by $as_me, which was
2619generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2 2620
5213506e 2621 $ $0 $@
18fc9bd4 2622
5213506e
RW
2623_ACEOF
2624exec 5>>config.log
2625{
2626cat <<_ASUNAME
2627## --------- ##
2628## Platform. ##
2629## --------- ##
18fc9bd4 2630
5213506e
RW
2631hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2632uname -m = `(uname -m) 2>/dev/null || echo unknown`
2633uname -r = `(uname -r) 2>/dev/null || echo unknown`
2634uname -s = `(uname -s) 2>/dev/null || echo unknown`
2635uname -v = `(uname -v) 2>/dev/null || echo unknown`
18fc9bd4 2636
5213506e
RW
2637/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2638/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
18fc9bd4 2639
5213506e
RW
2640/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2641/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2642/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2643/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2644/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2645/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2646/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
18fc9bd4 2647
5213506e 2648_ASUNAME
8f1529e6 2649
5213506e
RW
2650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2651for as_dir in $PATH
2652do
2653 IFS=$as_save_IFS
2654 test -z "$as_dir" && as_dir=.
2655 $as_echo "PATH: $as_dir"
2656 done
2657IFS=$as_save_IFS
57255173 2658
5213506e 2659} >&5
57255173 2660
5213506e 2661cat >&5 <<_ACEOF
1546bb64 2662
18fc9bd4 2663
5213506e
RW
2664## ----------- ##
2665## Core tests. ##
2666## ----------- ##
73458fb7 2667
ba479fd2 2668_ACEOF
13c22933
JJ
2669
2670
5213506e
RW
2671# Keep a trace of the command line.
2672# Strip out --no-create and --no-recursion so they do not pile up.
2673# Strip out --silent because we don't want to record it for future runs.
2674# Also quote any args containing shell meta-characters.
2675# Make two passes to allow for proper duplicate-argument suppression.
2676ac_configure_args=
2677ac_configure_args0=
2678ac_configure_args1=
2679ac_must_keep_next=false
2680for ac_pass in 1 2
00020c16 2681do
5213506e
RW
2682 for ac_arg
2683 do
2684 case $ac_arg in
2685 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2686 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2687 | -silent | --silent | --silen | --sile | --sil)
2688 continue ;;
2689 *\'*)
2690 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2691 esac
2692 case $ac_pass in
2693 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2694 2)
2695 as_fn_append ac_configure_args1 " '$ac_arg'"
2696 if test $ac_must_keep_next = true; then
2697 ac_must_keep_next=false # Got value, back to normal.
2698 else
2699 case $ac_arg in
2700 *=* | --config-cache | -C | -disable-* | --disable-* \
2701 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2702 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2703 | -with-* | --with-* | -without-* | --without-* | --x)
2704 case "$ac_configure_args0 " in
2705 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2706 esac
2707 ;;
2708 -* ) ac_must_keep_next=true ;;
2709 esac
2710 fi
2711 as_fn_append ac_configure_args " '$ac_arg'"
2712 ;;
2713 esac
2714 done
00020c16 2715done
5213506e
RW
2716{ ac_configure_args0=; unset ac_configure_args0;}
2717{ ac_configure_args1=; unset ac_configure_args1;}
60d26958 2718
5213506e
RW
2719# When interrupted or exit'd, cleanup temporary files, and complete
2720# config.log. We remove comments because anyway the quotes in there
2721# would cause problems or look ugly.
2722# WARNING: Use '\'' to represent an apostrophe within the trap.
2723# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2724trap 'exit_status=$?
2725 # Save into config.log some information that might help in debugging.
2726 {
2727 echo
1a4b763e 2728
5213506e
RW
2729 cat <<\_ASBOX
2730## ---------------- ##
2731## Cache variables. ##
2732## ---------------- ##
2733_ASBOX
2734 echo
2735 # The following way of writing the cache mishandles newlines in values,
2736(
2737 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2738 eval ac_val=\$$ac_var
2739 case $ac_val in #(
2740 *${as_nl}*)
2741 case $ac_var in #(
2742 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2743$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2744 esac
2745 case $ac_var in #(
2746 _ | IFS | as_nl) ;; #(
2747 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2748 *) { eval $ac_var=; unset $ac_var;} ;;
2749 esac ;;
2750 esac
2751 done
2752 (set) 2>&1 |
2753 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2754 *${as_nl}ac_space=\ *)
2755 sed -n \
2756 "s/'\''/'\''\\\\'\'''\''/g;
2757 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2758 ;; #(
2759 *)
2760 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2761 ;;
2762 esac |
2763 sort
2764)
2765 echo
1a4b763e 2766
5213506e
RW
2767 cat <<\_ASBOX
2768## ----------------- ##
2769## Output variables. ##
2770## ----------------- ##
2771_ASBOX
2772 echo
2773 for ac_var in $ac_subst_vars
2774 do
2775 eval ac_val=\$$ac_var
2776 case $ac_val in
2777 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778 esac
2779 $as_echo "$ac_var='\''$ac_val'\''"
2780 done | sort
2781 echo
60d26958 2782
5213506e
RW
2783 if test -n "$ac_subst_files"; then
2784 cat <<\_ASBOX
2785## ------------------- ##
2786## File substitutions. ##
2787## ------------------- ##
2788_ASBOX
2789 echo
2790 for ac_var in $ac_subst_files
2791 do
2792 eval ac_val=\$$ac_var
2793 case $ac_val in
2794 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2795 esac
2796 $as_echo "$ac_var='\''$ac_val'\''"
2797 done | sort
2798 echo
2799 fi
60d26958 2800
5213506e
RW
2801 if test -s confdefs.h; then
2802 cat <<\_ASBOX
2803## ----------- ##
2804## confdefs.h. ##
2805## ----------- ##
2806_ASBOX
2807 echo
2808 cat confdefs.h
2809 echo
2810 fi
2811 test "$ac_signal" != 0 &&
2812 $as_echo "$as_me: caught signal $ac_signal"
2813 $as_echo "$as_me: exit $exit_status"
2814 } >&5
2815 rm -f core *.core core.conftest.* &&
2816 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2817 exit $exit_status
2818' 0
2819for ac_signal in 1 2 13 15; do
2820 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
00020c16 2821done
5213506e 2822ac_signal=0
00020c16 2823
5213506e
RW
2824# confdefs.h avoids OS command line length limits that DEFS can exceed.
2825rm -f -r conftest* confdefs.h
00020c16 2826
5213506e
RW
2827$as_echo "/* confdefs.h */" > confdefs.h
2828
2829# Predefined preprocessor variables.
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_NAME "$PACKAGE_NAME"
60d26958 2833_ACEOF
60d26958 2834
5213506e
RW
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2837_ACEOF
60d26958 2838
5213506e
RW
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_VERSION "$PACKAGE_VERSION"
60d26958 2841_ACEOF
5213506e
RW
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_STRING "$PACKAGE_STRING"
60d26958 2845_ACEOF
60d26958 2846
5213506e
RW
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2849_ACEOF
60d26958 2850
5213506e
RW
2851cat >>confdefs.h <<_ACEOF
2852#define PACKAGE_URL "$PACKAGE_URL"
2853_ACEOF
00020c16 2854
60d26958 2855
5213506e
RW
2856# Let the site file select an alternate cache file if it wants to.
2857# Prefer an explicitly selected file to automatically selected ones.
2858ac_site_file1=NONE
2859ac_site_file2=NONE
2860if test -n "$CONFIG_SITE"; then
2861 ac_site_file1=$CONFIG_SITE
2862elif test "x$prefix" != xNONE; then
2863 ac_site_file1=$prefix/share/config.site
2864 ac_site_file2=$prefix/etc/config.site
2865else
2866 ac_site_file1=$ac_default_prefix/share/config.site
2867 ac_site_file2=$ac_default_prefix/etc/config.site
2868fi
2869for ac_site_file in "$ac_site_file1" "$ac_site_file2"
00020c16 2870do
5213506e
RW
2871 test "x$ac_site_file" = xNONE && continue
2872 if test -r "$ac_site_file"; then
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2874$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2875 sed 's/^/| /' "$ac_site_file" >&5
2876 . "$ac_site_file"
60d26958 2877 fi
5213506e 2878done
60d26958 2879
5213506e
RW
2880if test -r "$cache_file"; then
2881 # Some versions of bash will fail to source /dev/null (special
2882 # files actually), so we avoid doing that.
2883 if test -f "$cache_file"; then
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2885$as_echo "$as_me: loading cache $cache_file" >&6;}
2886 case $cache_file in
2887 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2888 *) . "./$cache_file";;
2889 esac
60d26958
PB
2890 fi
2891else
5213506e
RW
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2893$as_echo "$as_me: creating cache $cache_file" >&6;}
2894 >$cache_file
bf3b7cd3
JD
2895fi
2896
5213506e
RW
2897# Check that the precious variables saved in the cache have kept the same
2898# value.
2899ac_cache_corrupted=false
2900for ac_var in $ac_precious_vars; do
2901 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2902 eval ac_new_set=\$ac_env_${ac_var}_set
2903 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2904 eval ac_new_val=\$ac_env_${ac_var}_value
2905 case $ac_old_set,$ac_new_set in
2906 set,)
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2908$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2909 ac_cache_corrupted=: ;;
2910 ,set)
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2912$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2913 ac_cache_corrupted=: ;;
2914 ,);;
2915 *)
2916 if test "x$ac_old_val" != "x$ac_new_val"; then
2917 # differences in whitespace do not lead to failure.
2918 ac_old_val_w=`echo x $ac_old_val`
2919 ac_new_val_w=`echo x $ac_new_val`
2920 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2922$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2923 ac_cache_corrupted=:
2924 else
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2926$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2927 eval $ac_var=\$ac_old_val
2928 fi
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2930$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2932$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2933 fi;;
2934 esac
2935 # Pass precious variables to config.status.
2936 if test "$ac_new_set" = set; then
2937 case $ac_new_val in
2938 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2939 *) ac_arg=$ac_var=$ac_new_val ;;
2940 esac
2941 case " $ac_configure_args " in
2942 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2943 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2944 esac
2945 fi
60d26958 2946done
5213506e
RW
2947if $ac_cache_corrupted; then
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2951$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2952 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
60d26958 2953fi
5213506e
RW
2954## -------------------- ##
2955## Main body of script. ##
2956## -------------------- ##
60d26958 2957
00020c16
ILT
2958ac_ext=c
2959ac_cpp='$CPP $CPPFLAGS'
2960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2962ac_compiler_gnu=$ac_cv_c_compiler_gnu
60d26958 2963
00020c16 2964
bf3b7cd3 2965
bf3b7cd3 2966
00020c16 2967
bf3b7cd3 2968
5213506e 2969ac_config_headers="$ac_config_headers auto-host.h:config.in"
bf3b7cd3 2970
bf3b7cd3 2971
5213506e 2972gcc_version=`cat $srcdir/BASE-VER`
bf3b7cd3 2973
5213506e
RW
2974# Determine the host, build, and target systems
2975ac_aux_dir=
2976for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2977 for ac_t in install-sh install.sh shtool; do
2978 if test -f "$ac_dir/$ac_t"; then
2979 ac_aux_dir=$ac_dir
2980 ac_install_sh="$ac_aux_dir/$ac_t -c"
2981 break 2
2982 fi
2983 done
2984done
2985if test -z "$ac_aux_dir"; then
2986 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
00020c16 2987fi
5213506e
RW
2988
2989# These three variables are undocumented and unsupported,
2990# and are intended to be withdrawn in a future Autoconf release.
2991# They can cause serious problems if a builder's source tree is in a directory
2992# whose full name contains unusual characters.
2993ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2994ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2995ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2996
2997
2998# Make sure we can run config.sub.
2999$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3000 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3001
3002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3003$as_echo_n "checking build system type... " >&6; }
3004if test "${ac_cv_build+set}" = set; then :
3005 $as_echo_n "(cached) " >&6
3006else
3007 ac_build_alias=$build_alias
3008test "x$ac_build_alias" = x &&
3009 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3010test "x$ac_build_alias" = x &&
3011 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3012ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3013 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3014
3015fi
3016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3017$as_echo "$ac_cv_build" >&6; }
3018case $ac_cv_build in
3019*-*-*) ;;
3020*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3021esac
3022build=$ac_cv_build
3023ac_save_IFS=$IFS; IFS='-'
3024set x $ac_cv_build
3025shift
3026build_cpu=$1
3027build_vendor=$2
3028shift; shift
3029# Remember, the first character of IFS is used to create $*,
3030# except with old shells:
3031build_os=$*
3032IFS=$ac_save_IFS
3033case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3034
3035
3036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3037$as_echo_n "checking host system type... " >&6; }
3038if test "${ac_cv_host+set}" = set; then :
3039 $as_echo_n "(cached) " >&6
3040else
3041 if test "x$host_alias" = x; then
3042 ac_cv_host=$ac_cv_build
3043else
3044 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3045 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
00020c16 3046fi
5213506e 3047
00020c16 3048fi
5213506e
RW
3049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3050$as_echo "$ac_cv_host" >&6; }
3051case $ac_cv_host in
3052*-*-*) ;;
3053*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3054esac
3055host=$ac_cv_host
3056ac_save_IFS=$IFS; IFS='-'
3057set x $ac_cv_host
3058shift
3059host_cpu=$1
3060host_vendor=$2
3061shift; shift
3062# Remember, the first character of IFS is used to create $*,
3063# except with old shells:
3064host_os=$*
3065IFS=$ac_save_IFS
3066case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
00020c16 3067
bf3b7cd3 3068
5213506e
RW
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3070$as_echo_n "checking target system type... " >&6; }
3071if test "${ac_cv_target+set}" = set; then :
3072 $as_echo_n "(cached) " >&6
3073else
3074 if test "x$target_alias" = x; then
3075 ac_cv_target=$ac_cv_host
3076else
3077 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3078 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
bf3b7cd3
JD
3079fi
3080
5213506e
RW
3081fi
3082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3083$as_echo "$ac_cv_target" >&6; }
3084case $ac_cv_target in
3085*-*-*) ;;
3086*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
3087esac
3088target=$ac_cv_target
3089ac_save_IFS=$IFS; IFS='-'
3090set x $ac_cv_target
3091shift
3092target_cpu=$1
3093target_vendor=$2
3094shift; shift
3095# Remember, the first character of IFS is used to create $*,
3096# except with old shells:
3097target_os=$*
3098IFS=$ac_save_IFS
3099case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
60d26958 3100
bf3b7cd3 3101
5213506e
RW
3102# The aliases save the names the user supplied, while $host etc.
3103# will get canonicalized.
3104test -n "$target_alias" &&
3105 test "$program_prefix$program_suffix$program_transform_name" = \
3106 NONENONEs,x,x, &&
3107 program_prefix=${target_alias}-
bf3b7cd3 3108
5213506e
RW
3109# Determine the noncanonical target name, for directory use.
3110 case ${build_alias} in
3111 "") build_noncanonical=${build} ;;
3112 *) build_noncanonical=${build_alias} ;;
3113esac
00020c16 3114
5213506e
RW
3115 case ${host_alias} in
3116 "") host_noncanonical=${build_noncanonical} ;;
3117 *) host_noncanonical=${host_alias} ;;
3118esac
00020c16 3119
5213506e
RW
3120 case ${target_alias} in
3121 "") target_noncanonical=${host_noncanonical} ;;
3122 *) target_noncanonical=${target_alias} ;;
3123esac
00020c16
ILT
3124
3125
3126
3127
5213506e 3128# Determine the target- and build-specific subdirectories
00020c16 3129
5213506e
RW
3130# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
3131# have matching libraries, they should use host libraries: Makefile.tpl
3132# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
3133# However, they still use the build modules, because the corresponding
3134# host modules (e.g. bison) are only built for the host when bootstrap
3135# finishes. So:
3136# - build_subdir is where we find build modules, and never changes.
3137# - build_libsubdir is where we find build libraries, and can be overridden.
bf3b7cd3 3138
5213506e
RW
3139# Prefix 'build-' so this never conflicts with target_subdir.
3140build_subdir="build-${build_noncanonical}"
3141
3142# Check whether --with-build-libsubdir was given.
3143if test "${with_build_libsubdir+set}" = set; then :
3144 withval=$with_build_libsubdir; build_libsubdir="$withval"
3145else
3146 build_libsubdir="$build_subdir"
bf3b7cd3 3147fi
bf3b7cd3 3148
5213506e
RW
3149# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
3150if ( test $srcdir = . && test -d gcc ) \
3151 || test -d $srcdir/../host-${host_noncanonical}; then
3152 host_subdir="host-${host_noncanonical}"
3153else
3154 host_subdir=.
00020c16 3155fi
5213506e
RW
3156# No prefix.
3157target_subdir=${target_noncanonical}
00020c16 3158
00020c16 3159
5213506e
RW
3160# Set program_transform_name
3161test "$program_prefix" != NONE &&
3162 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3163# Use a double $ so make ignores it.
3164test "$program_suffix" != NONE &&
3165 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3166# Double any \ or $.
3167# By default was `s,x,x', remove it if useless.
3168ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3169program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
00020c16
ILT
3170
3171
5213506e
RW
3172# Check for bogus environment variables.
3173# Test if LIBRARY_PATH contains the notation for the current directory
3174# since this would lead to problems installing/building glibc.
3175# LIBRARY_PATH contains the current directory if one of the following
3176# is true:
3177# - one of the terminals (":" and ";") is the first or last sign
3178# - two terminals occur directly after each other
3179# - the path contains an element with a dot in it
3180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY_PATH variable" >&5
3181$as_echo_n "checking LIBRARY_PATH variable... " >&6; }
3182case ${LIBRARY_PATH} in
3183 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3184 library_path_setting="contains current directory"
3185 ;;
3186 *)
3187 library_path_setting="ok"
3188 ;;
3189esac
3190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $library_path_setting" >&5
3191$as_echo "$library_path_setting" >&6; }
3192if test "$library_path_setting" != "ok"; then
3193as_fn_error "
3194*** LIBRARY_PATH shouldn't contain the current directory when
3195*** building gcc. Please change the environment variable
3196*** and run configure again." "$LINENO" 5
00020c16 3197fi
00020c16 3198
5213506e
RW
3199# Test if GCC_EXEC_PREFIX contains the notation for the current directory
3200# since this would lead to problems installing/building glibc.
3201# GCC_EXEC_PREFIX contains the current directory if one of the following
3202# is true:
3203# - one of the terminals (":" and ";") is the first or last sign
3204# - two terminals occur directly after each other
3205# - the path contains an element with a dot in it
3206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GCC_EXEC_PREFIX variable" >&5
3207$as_echo_n "checking GCC_EXEC_PREFIX variable... " >&6; }
3208case ${GCC_EXEC_PREFIX} in
3209 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3210 gcc_exec_prefix_setting="contains current directory"
3211 ;;
3212 *)
3213 gcc_exec_prefix_setting="ok"
3214 ;;
3215esac
3216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_exec_prefix_setting" >&5
3217$as_echo "$gcc_exec_prefix_setting" >&6; }
3218if test "$gcc_exec_prefix_setting" != "ok"; then
3219as_fn_error "
3220*** GCC_EXEC_PREFIX shouldn't contain the current directory when
3221*** building gcc. Please change the environment variable
3222*** and run configure again." "$LINENO" 5
00020c16 3223fi
00020c16 3224
5213506e
RW
3225# -----------
3226# Directories
3227# -----------
3228
3229# Specify the local prefix
3230local_prefix=
3231
3232# Check whether --with-local-prefix was given.
3233if test "${with_local_prefix+set}" = set; then :
3234 withval=$with_local_prefix; case "${withval}" in
3235yes) as_fn_error "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;;
3236no) ;;
3237*) local_prefix=$with_local_prefix ;;
3238esac
00020c16 3239fi
bf3b7cd3 3240
5213506e
RW
3241
3242# Default local prefix if it is empty
3243if test x$local_prefix = x; then
3244 local_prefix=/usr/local
bf3b7cd3 3245fi
00020c16 3246
5213506e
RW
3247# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
3248# passed in by the toplevel make and thus we'd get different behavior
3249# depending on where we built the sources.
3250gcc_gxx_include_dir=
3251# Specify the g++ header file directory
3252
3253# Check whether --with-gxx-include-dir was given.
3254if test "${with_gxx_include_dir+set}" = set; then :
3255 withval=$with_gxx_include_dir; case "${withval}" in
3256yes) as_fn_error "bad value ${withval} given for g++ include directory" "$LINENO" 5 ;;
3257no) ;;
3258*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
00020c16 3259esac
00020c16 3260fi
bf3b7cd3 3261
5213506e
RW
3262
3263# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
3264if test x${gcc_gxx_include_dir} = x; then
3265 if test x${enable_version_specific_runtime_libs} = xyes; then
3266 gcc_gxx_include_dir='${libsubdir}/include/c++'
3267 else
3268 libstdcxx_incdir='include/c++/$(version)'
3269 if test x$host != x$target; then
3270 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
3271 fi
3272 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
3273 fi
00020c16
ILT
3274fi
3275
3276
5213506e
RW
3277# Check whether --with-cpp_install_dir was given.
3278if test "${with_cpp_install_dir+set}" = set; then :
3279 withval=$with_cpp_install_dir; if test x$withval = xyes; then
3280 as_fn_error "option --with-cpp-install-dir requires an argument" "$LINENO" 5
3281elif test x$withval != xno; then
3282 cpp_install_dir=$withval
3283fi
3284fi
00020c16 3285
00020c16 3286
5213506e
RW
3287# We would like to our source tree to be readonly. However when releases or
3288# pre-releases are generated, the flex/bison generated files as well as the
3289# various formats of manuals need to be included along with the rest of the
3290# sources. Therefore we have --enable-generated-files-in-srcdir to do
3291# just that.
00020c16 3292
5213506e
RW
3293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to place generated files in the source directory" >&5
3294$as_echo_n "checking whether to place generated files in the source directory... " >&6; }
3295 # Check whether --enable-generated-files-in-srcdir was given.
3296if test "${enable_generated_files_in_srcdir+set}" = set; then :
3297 enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval
3298else
3299 generated_files_in_srcdir=no
3300fi
00020c16
ILT
3301
3302
5213506e
RW
3303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $generated_files_in_srcdir" >&5
3304$as_echo "$generated_files_in_srcdir" >&6; }
00020c16 3305
5213506e
RW
3306if test "$generated_files_in_srcdir" = "yes"; then
3307 GENINSRC=''
3308else
3309 GENINSRC='#'
3310fi
00020c16
ILT
3311
3312
5213506e
RW
3313# -------------------
3314# Find default linker
3315# -------------------
3316
3317# With GNU ld
00020c16 3318
5213506e
RW
3319# Check whether --with-gnu-ld was given.
3320if test "${with_gnu_ld+set}" = set; then :
3321 withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld"
00020c16 3322else
5213506e
RW
3323 gnu_ld_flag=no
3324fi
00020c16 3325
bf3b7cd3 3326
5213506e 3327# With pre-defined ld
00020c16 3328
5213506e
RW
3329# Check whether --with-ld was given.
3330if test "${with_ld+set}" = set; then :
3331 withval=$with_ld; DEFAULT_LINKER="$with_ld"
00020c16 3332fi
00020c16 3333
5213506e
RW
3334if test x"${DEFAULT_LINKER+set}" = x"set"; then
3335 if test ! -x "$DEFAULT_LINKER"; then
3336 as_fn_error "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5
3337 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3338 gnu_ld_flag=yes
3339 fi
3340
3341cat >>confdefs.h <<_ACEOF
3342#define DEFAULT_LINKER "$DEFAULT_LINKER"
00020c16
ILT
3343_ACEOF
3344
5213506e 3345fi
00020c16 3346
5213506e 3347gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
00020c16 3348
5213506e
RW
3349cat >>confdefs.h <<_ACEOF
3350#define HAVE_GNU_LD $gnu_ld
00020c16
ILT
3351_ACEOF
3352
3353
5213506e
RW
3354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default linker was specified" >&5
3355$as_echo_n "checking whether a default linker was specified... " >&6; }
3356if test x"${DEFAULT_LINKER+set}" = x"set"; then
3357 if test x"$gnu_ld_flag" = x"no"; then
3358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER)" >&5
3359$as_echo "yes ($DEFAULT_LINKER)" >&6; }
00020c16 3360 else
5213506e
RW
3361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
3362$as_echo "yes ($DEFAULT_LINKER - GNU ld)" >&6; }
00020c16 3363 fi
bf3b7cd3 3364else
5213506e
RW
3365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3366$as_echo "no" >&6; }
bf3b7cd3 3367fi
bf3b7cd3 3368
5213506e 3369# With demangler in GNU ld
00020c16 3370
5213506e
RW
3371# Check whether --with-demangler-in-ld was given.
3372if test "${with_demangler_in_ld+set}" = set; then :
3373 withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld"
00020c16 3374else
5213506e 3375 demangler_in_ld=no
00020c16 3376fi
bf3b7cd3 3377
00020c16 3378
5213506e
RW
3379# ----------------------
3380# Find default assembler
3381# ----------------------
00020c16 3382
5213506e 3383# With GNU as
00020c16 3384
5213506e
RW
3385# Check whether --with-gnu-as was given.
3386if test "${with_gnu_as+set}" = set; then :
3387 withval=$with_gnu_as; gas_flag="$with_gnu_as"
00020c16 3388else
5213506e 3389 gas_flag=no
00020c16 3390fi
00020c16 3391
5213506e
RW
3392
3393
3394# Check whether --with-as was given.
3395if test "${with_as+set}" = set; then :
3396 withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
00020c16 3397fi
00020c16 3398
5213506e
RW
3399if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3400 if test ! -x "$DEFAULT_ASSEMBLER"; then
3401 as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5
3402 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3403 gas_flag=yes
3404 fi
3405
3406cat >>confdefs.h <<_ACEOF
3407#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
00020c16 3408_ACEOF
5213506e
RW
3409
3410fi
3411
3412gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
3413
3414cat >>confdefs.h <<_ACEOF
3415#define HAVE_GNU_AS $gnu_as
00020c16 3416_ACEOF
5213506e
RW
3417
3418
3419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5
3420$as_echo_n "checking whether a default assembler was specified... " >&6; }
3421if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3422 if test x"$gas_flag" = x"no"; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5
3424$as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; }
00020c16 3425 else
5213506e
RW
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
3427$as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; }
00020c16 3428 fi
bf3b7cd3 3429else
5213506e
RW
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3431$as_echo "no" >&6; }
00020c16 3432fi
bf3b7cd3 3433
5213506e
RW
3434# ---------------
3435# Find C compiler
3436# ---------------
00020c16 3437
5213506e
RW
3438# If a non-executable a.out is present (e.g. created by GNU as above even if
3439# invoked with -v only), the IRIX 6 native ld just overwrites the existing
3440# file, even when creating an executable, so an execution test fails.
3441# Remove possible default executable files to avoid this.
3442#
3443# FIXME: This really belongs into AC_PROG_CC and can be removed once
3444# Autoconf includes it.
3445rm -f a.out a.exe b.out
bf3b7cd3 3446
5213506e 3447# Find the native compiler
00020c16
ILT
3448ac_ext=c
3449ac_cpp='$CPP $CPPFLAGS'
3450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3452ac_compiler_gnu=$ac_cv_c_compiler_gnu
5213506e
RW
3453if test -n "$ac_tool_prefix"; then
3454 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3455set dummy ${ac_tool_prefix}gcc; ac_word=$2
3456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3457$as_echo_n "checking for $ac_word... " >&6; }
3458if test "${ac_cv_prog_CC+set}" = set; then :
3459 $as_echo_n "(cached) " >&6
bf3b7cd3 3460else
5213506e
RW
3461 if test -n "$CC"; then
3462 ac_cv_prog_CC="$CC" # Let the user override the test.
3463else
3464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3465for as_dir in $PATH
3466do
3467 IFS=$as_save_IFS
3468 test -z "$as_dir" && as_dir=.
3469 for ac_exec_ext in '' $ac_executable_extensions; do
3470 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3471 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3472 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3473 break 2
3474 fi
3475done
3476 done
3477IFS=$as_save_IFS
00020c16 3478
5213506e
RW
3479fi
3480fi
3481CC=$ac_cv_prog_CC
3482if test -n "$CC"; then
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3484$as_echo "$CC" >&6; }
bf3b7cd3 3485else
5213506e
RW
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3487$as_echo "no" >&6; }
3488fi
3489
bf3b7cd3 3490
bf3b7cd3 3491fi
5213506e
RW
3492if test -z "$ac_cv_prog_CC"; then
3493 ac_ct_CC=$CC
3494 # Extract the first word of "gcc", so it can be a program name with args.
3495set dummy gcc; ac_word=$2
3496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3497$as_echo_n "checking for $ac_word... " >&6; }
3498if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3499 $as_echo_n "(cached) " >&6
3500else
3501 if test -n "$ac_ct_CC"; then
3502 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3503else
3504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3505for as_dir in $PATH
3506do
3507 IFS=$as_save_IFS
3508 test -z "$as_dir" && as_dir=.
3509 for ac_exec_ext in '' $ac_executable_extensions; do
3510 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3511 ac_cv_prog_ac_ct_CC="gcc"
3512 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3513 break 2
3514 fi
00020c16 3515done
5213506e
RW
3516 done
3517IFS=$as_save_IFS
00020c16 3518
bf3b7cd3 3519fi
5213506e
RW
3520fi
3521ac_ct_CC=$ac_cv_prog_ac_ct_CC
3522if test -n "$ac_ct_CC"; then
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3524$as_echo "$ac_ct_CC" >&6; }
3525else
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3527$as_echo "no" >&6; }
3528fi
00020c16 3529
5213506e
RW
3530 if test "x$ac_ct_CC" = x; then
3531 CC=""
3532 else
3533 case $cross_compiling:$ac_tool_warned in
3534yes:)
3535{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3536$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3537ac_tool_warned=yes ;;
3538esac
3539 CC=$ac_ct_CC
3540 fi
3541else
3542 CC="$ac_cv_prog_CC"
3543fi
00020c16 3544
5213506e
RW
3545if test -z "$CC"; then
3546 if test -n "$ac_tool_prefix"; then
3547 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3548set dummy ${ac_tool_prefix}cc; ac_word=$2
3549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3550$as_echo_n "checking for $ac_word... " >&6; }
3551if test "${ac_cv_prog_CC+set}" = set; then :
3552 $as_echo_n "(cached) " >&6
bf3b7cd3 3553else
5213506e
RW
3554 if test -n "$CC"; then
3555 ac_cv_prog_CC="$CC" # Let the user override the test.
00020c16 3556else
5213506e
RW
3557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3558for as_dir in $PATH
3559do
3560 IFS=$as_save_IFS
3561 test -z "$as_dir" && as_dir=.
3562 for ac_exec_ext in '' $ac_executable_extensions; do
3563 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3564 ac_cv_prog_CC="${ac_tool_prefix}cc"
3565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3566 break 2
3567 fi
3568done
3569 done
3570IFS=$as_save_IFS
00020c16 3571
00020c16 3572fi
00020c16 3573fi
5213506e
RW
3574CC=$ac_cv_prog_CC
3575if test -n "$CC"; then
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3577$as_echo "$CC" >&6; }
00020c16 3578else
5213506e
RW
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3580$as_echo "no" >&6; }
3581fi
bf3b7cd3 3582
bf3b7cd3 3583
5213506e
RW
3584 fi
3585fi
3586if test -z "$CC"; then
3587 # Extract the first word of "cc", so it can be a program name with args.
3588set dummy cc; ac_word=$2
3589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3590$as_echo_n "checking for $ac_word... " >&6; }
3591if test "${ac_cv_prog_CC+set}" = set; then :
3592 $as_echo_n "(cached) " >&6
bf3b7cd3 3593else
5213506e
RW
3594 if test -n "$CC"; then
3595 ac_cv_prog_CC="$CC" # Let the user override the test.
3596else
3597 ac_prog_rejected=no
3598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3599for as_dir in $PATH
3600do
3601 IFS=$as_save_IFS
3602 test -z "$as_dir" && as_dir=.
3603 for ac_exec_ext in '' $ac_executable_extensions; do
3604 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3605 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3606 ac_prog_rejected=yes
3607 continue
3608 fi
3609 ac_cv_prog_CC="cc"
3610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3611 break 2
3612 fi
3613done
3614 done
3615IFS=$as_save_IFS
bf3b7cd3 3616
5213506e
RW
3617if test $ac_prog_rejected = yes; then
3618 # We found a bogon in the path, so make sure we never use it.
3619 set dummy $ac_cv_prog_CC
3620 shift
3621 if test $# != 0; then
3622 # We chose a different compiler from the bogus one.
3623 # However, it has the same basename, so the bogon will be chosen
3624 # first if we set CC to just the basename; use the full file name.
3625 shift
3626 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3627 fi
bf3b7cd3 3628fi
5213506e
RW
3629fi
3630fi
3631CC=$ac_cv_prog_CC
3632if test -n "$CC"; then
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3634$as_echo "$CC" >&6; }
bf3b7cd3 3635else
5213506e
RW
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3637$as_echo "no" >&6; }
3638fi
bf3b7cd3 3639
bf3b7cd3 3640
5213506e
RW
3641fi
3642if test -z "$CC"; then
3643 if test -n "$ac_tool_prefix"; then
3644 for ac_prog in cl.exe
3645 do
3646 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3647set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
3650if test "${ac_cv_prog_CC+set}" = set; then :
3651 $as_echo_n "(cached) " >&6
bf3b7cd3 3652else
5213506e
RW
3653 if test -n "$CC"; then
3654 ac_cv_prog_CC="$CC" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
3660 test -z "$as_dir" && as_dir=.
3661 for ac_exec_ext in '' $ac_executable_extensions; do
3662 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3663 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3664 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3665 break 2
3666 fi
3667done
3668 done
3669IFS=$as_save_IFS
bf3b7cd3 3670
bf3b7cd3 3671fi
5213506e
RW
3672fi
3673CC=$ac_cv_prog_CC
3674if test -n "$CC"; then
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3676$as_echo "$CC" >&6; }
3677else
3678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
3680fi
3681
3682
3683 test -n "$CC" && break
bf3b7cd3 3684 done
5213506e
RW
3685fi
3686if test -z "$CC"; then
3687 ac_ct_CC=$CC
3688 for ac_prog in cl.exe
3689do
3690 # Extract the first word of "$ac_prog", so it can be a program name with args.
3691set dummy $ac_prog; ac_word=$2
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3693$as_echo_n "checking for $ac_word... " >&6; }
3694if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3695 $as_echo_n "(cached) " >&6
bf3b7cd3 3696else
5213506e
RW
3697 if test -n "$ac_ct_CC"; then
3698 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3699else
3700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3701for as_dir in $PATH
3702do
3703 IFS=$as_save_IFS
3704 test -z "$as_dir" && as_dir=.
3705 for ac_exec_ext in '' $ac_executable_extensions; do
3706 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3707 ac_cv_prog_ac_ct_CC="$ac_prog"
3708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3709 break 2
3710 fi
3711done
3712 done
3713IFS=$as_save_IFS
bf3b7cd3 3714
bf3b7cd3 3715fi
bf3b7cd3 3716fi
5213506e
RW
3717ac_ct_CC=$ac_cv_prog_ac_ct_CC
3718if test -n "$ac_ct_CC"; then
3719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3720$as_echo "$ac_ct_CC" >&6; }
bf3b7cd3 3721else
5213506e
RW
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3723$as_echo "no" >&6; }
3724fi
3725
3726
3727 test -n "$ac_ct_CC" && break
3728done
3729
3730 if test "x$ac_ct_CC" = x; then
3731 CC=""
3732 else
3733 case $cross_compiling:$ac_tool_warned in
3734yes:)
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3736$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3737ac_tool_warned=yes ;;
3738esac
3739 CC=$ac_ct_CC
3740 fi
3741fi
bf3b7cd3 3742
bf3b7cd3 3743fi
5213506e
RW
3744
3745
3746test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3748as_fn_error "no acceptable C compiler found in \$PATH
3749See \`config.log' for more details." "$LINENO" 5; }
3750
3751# Provide some information about the compiler.
3752$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3753set X $ac_compile
3754ac_compiler=$2
3755for ac_option in --version -v -V -qversion; do
3756 { { ac_try="$ac_compiler $ac_option >&5"
3757case "(($ac_try" in
3758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3759 *) ac_try_echo=$ac_try;;
bf3b7cd3 3760esac
5213506e
RW
3761eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3762$as_echo "$ac_try_echo"; } >&5
3763 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3764 ac_status=$?
3765 if test -s conftest.err; then
3766 sed '10a\
3767... rest of stderr output deleted ...
3768 10q' conftest.err >conftest.er1
3769 cat conftest.er1 >&5
3770 rm -f conftest.er1 conftest.err
3771 fi
3772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3773 test $ac_status = 0; }
3774done
3775
3776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 3777/* end confdefs.h. */
5213506e 3778
bf3b7cd3
JD
3779int
3780main ()
3781{
3782
bf3b7cd3
JD
3783 ;
3784 return 0;
3785}
3786_ACEOF
5213506e
RW
3787ac_clean_files_save=$ac_clean_files
3788ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3789# Try to create an executable without -o first, disregard a.out.
3790# It will help us diagnose broken compilers, and finding out an intuition
3791# of exeext.
3792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3793$as_echo_n "checking for C compiler default output file name... " >&6; }
3794ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3795
3796# The possible output files:
3797ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3798
3799ac_rmfiles=
3800for ac_file in $ac_files
3801do
3802 case $ac_file in
3803 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3804 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3805 esac
3806done
3807rm -f $ac_rmfiles
3808
3809if { { ac_try="$ac_link_default"
3810case "(($ac_try" in
3811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3812 *) ac_try_echo=$ac_try;;
3813esac
3814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3815$as_echo "$ac_try_echo"; } >&5
3816 (eval "$ac_link_default") 2>&5
3817 ac_status=$?
3818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3819 test $ac_status = 0; }; then :
3820 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3821# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3822# in a Makefile. We should not override ac_cv_exeext if it was cached,
3823# so that the user can short-circuit this test for compilers unknown to
3824# Autoconf.
3825for ac_file in $ac_files ''
3826do
3827 test -f "$ac_file" || continue
3828 case $ac_file in
3829 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3830 ;;
3831 [ab].out )
3832 # We found the default executable, but exeext='' is most
3833 # certainly right.
3834 break;;
3835 *.* )
3836 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3837 then :; else
3838 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3839 fi
3840 # We set ac_cv_exeext here because the later test for it is not
3841 # safe: cross compilers may not add the suffix if given an `-o'
3842 # argument, so we may need to know it at that point already.
3843 # Even if this section looks crufty: it has the advantage of
3844 # actually working.
3845 break;;
3846 * )
3847 break;;
3848 esac
3849done
3850test "$ac_cv_exeext" = no && ac_cv_exeext=
3851
bf3b7cd3 3852else
5213506e
RW
3853 ac_file=''
3854fi
3855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3856$as_echo "$ac_file" >&6; }
3857if test -z "$ac_file"; then :
3858 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
3859sed 's/^/| /' conftest.$ac_ext >&5
3860
5213506e
RW
3861{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3863{ as_fn_set_status 77
3864as_fn_error "C compiler cannot create executables
3865See \`config.log' for more details." "$LINENO" 5; }; }
bf3b7cd3 3866fi
5213506e
RW
3867ac_exeext=$ac_cv_exeext
3868
3869# Check that the compiler produces executables we can run. If not, either
3870# the compiler is broken, or we cross compile.
3871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3872$as_echo_n "checking whether the C compiler works... " >&6; }
3873# If not cross compiling, check that we can run a simple program.
3874if test "$cross_compiling" != yes; then
3875 if { ac_try='./$ac_file'
3876 { { case "(($ac_try" in
3877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3878 *) ac_try_echo=$ac_try;;
3879esac
3880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3881$as_echo "$ac_try_echo"; } >&5
3882 (eval "$ac_try") 2>&5
3883 ac_status=$?
3884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3885 test $ac_status = 0; }; }; then
3886 cross_compiling=no
3887 else
3888 if test "$cross_compiling" = maybe; then
3889 cross_compiling=yes
3890 else
3891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3893as_fn_error "cannot run C compiled programs.
3894If you meant to cross compile, use \`--host'.
3895See \`config.log' for more details." "$LINENO" 5; }
3896 fi
3897 fi
bf3b7cd3 3898fi
5213506e
RW
3899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3900$as_echo "yes" >&6; }
3901
3902rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3903ac_clean_files=$ac_clean_files_save
3904# Check that the compiler produces executables we can run. If not, either
3905# the compiler is broken, or we cross compile.
3906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3907$as_echo_n "checking whether we are cross compiling... " >&6; }
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3909$as_echo "$cross_compiling" >&6; }
3910
3911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3912$as_echo_n "checking for suffix of executables... " >&6; }
3913if { { ac_try="$ac_link"
3914case "(($ac_try" in
3915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3916 *) ac_try_echo=$ac_try;;
3917esac
3918eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3919$as_echo "$ac_try_echo"; } >&5
3920 (eval "$ac_link") 2>&5
3921 ac_status=$?
3922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3923 test $ac_status = 0; }; then :
3924 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3925# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3926# work properly (i.e., refer to `conftest.exe'), while it won't with
3927# `rm'.
3928for ac_file in conftest.exe conftest conftest.*; do
3929 test -f "$ac_file" || continue
3930 case $ac_file in
3931 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3932 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3933 break;;
3934 * ) break;;
3935 esac
3936done
b61ff9c8 3937else
5213506e
RW
3938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3940as_fn_error "cannot compute suffix of executables: cannot compile and link
3941See \`config.log' for more details." "$LINENO" 5; }
b61ff9c8 3942fi
5213506e
RW
3943rm -f conftest$ac_cv_exeext
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3945$as_echo "$ac_cv_exeext" >&6; }
bf3b7cd3 3946
5213506e
RW
3947rm -f conftest.$ac_ext
3948EXEEXT=$ac_cv_exeext
3949ac_exeext=$EXEEXT
3950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3951$as_echo_n "checking for suffix of object files... " >&6; }
3952if test "${ac_cv_objext+set}" = set; then :
3953 $as_echo_n "(cached) " >&6
bf3b7cd3 3954else
5213506e 3955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 3956/* end confdefs.h. */
5213506e 3957
bf3b7cd3
JD
3958int
3959main ()
3960{
5213506e 3961
bf3b7cd3
JD
3962 ;
3963 return 0;
3964}
3965_ACEOF
5213506e
RW
3966rm -f conftest.o conftest.obj
3967if { { ac_try="$ac_compile"
3968case "(($ac_try" in
3969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3970 *) ac_try_echo=$ac_try;;
3971esac
3972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3973$as_echo "$ac_try_echo"; } >&5
3974 (eval "$ac_compile") 2>&5
3975 ac_status=$?
3976 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3977 test $ac_status = 0; }; then :
3978 for ac_file in conftest.o conftest.obj conftest.*; do
3979 test -f "$ac_file" || continue;
3980 case $ac_file in
3981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3982 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3983 break;;
3984 esac
3985done
bf3b7cd3 3986else
5213506e 3987 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
3988sed 's/^/| /' conftest.$ac_ext >&5
3989
5213506e
RW
3990{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3992as_fn_error "cannot compute suffix of object files: cannot compile
3993See \`config.log' for more details." "$LINENO" 5; }
bf3b7cd3 3994fi
5213506e 3995rm -f conftest.$ac_cv_objext conftest.$ac_ext
bf3b7cd3 3996fi
5213506e
RW
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3998$as_echo "$ac_cv_objext" >&6; }
3999OBJEXT=$ac_cv_objext
4000ac_objext=$OBJEXT
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4002$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4003if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4004 $as_echo_n "(cached) " >&6
bf3b7cd3 4005else
5213506e 4006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4007/* end confdefs.h. */
5213506e 4008
bf3b7cd3
JD
4009int
4010main ()
4011{
5213506e
RW
4012#ifndef __GNUC__
4013 choke me
4014#endif
bf3b7cd3
JD
4015
4016 ;
4017 return 0;
4018}
4019_ACEOF
5213506e
RW
4020if ac_fn_c_try_compile "$LINENO"; then :
4021 ac_compiler_gnu=yes
4022else
4023 ac_compiler_gnu=no
4024fi
4025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4026ac_cv_c_compiler_gnu=$ac_compiler_gnu
4027
4028fi
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4030$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4031if test $ac_compiler_gnu = yes; then
4032 GCC=yes
4033else
4034 GCC=
4035fi
4036ac_test_CFLAGS=${CFLAGS+set}
4037ac_save_CFLAGS=$CFLAGS
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4039$as_echo_n "checking whether $CC accepts -g... " >&6; }
4040if test "${ac_cv_prog_cc_g+set}" = set; then :
4041 $as_echo_n "(cached) " >&6
4042else
4043 ac_save_c_werror_flag=$ac_c_werror_flag
4044 ac_c_werror_flag=yes
4045 ac_cv_prog_cc_g=no
4046 CFLAGS="-g"
4047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4048/* end confdefs.h. */
5213506e 4049
bf3b7cd3
JD
4050int
4051main ()
4052{
bf3b7cd3
JD
4053
4054 ;
4055 return 0;
4056}
4057_ACEOF
5213506e
RW
4058if ac_fn_c_try_compile "$LINENO"; then :
4059 ac_cv_prog_cc_g=yes
bf3b7cd3 4060else
5213506e
RW
4061 CFLAGS=""
4062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4063/* end confdefs.h. */
5213506e 4064
bf3b7cd3
JD
4065int
4066main ()
4067{
bf3b7cd3
JD
4068
4069 ;
4070 return 0;
4071}
4072_ACEOF
5213506e
RW
4073if ac_fn_c_try_compile "$LINENO"; then :
4074
4075else
4076 ac_c_werror_flag=$ac_save_c_werror_flag
4077 CFLAGS="-g"
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4079/* end confdefs.h. */
5213506e 4080
bf3b7cd3
JD
4081int
4082main ()
4083{
bf3b7cd3
JD
4084
4085 ;
4086 return 0;
4087}
4088_ACEOF
5213506e
RW
4089if ac_fn_c_try_compile "$LINENO"; then :
4090 ac_cv_prog_cc_g=yes
bf3b7cd3 4091fi
5213506e 4092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4093fi
5213506e 4094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4095fi
5213506e
RW
4096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4097 ac_c_werror_flag=$ac_save_c_werror_flag
4098fi
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4100$as_echo "$ac_cv_prog_cc_g" >&6; }
4101if test "$ac_test_CFLAGS" = set; then
4102 CFLAGS=$ac_save_CFLAGS
4103elif test $ac_cv_prog_cc_g = yes; then
4104 if test "$GCC" = yes; then
4105 CFLAGS="-g -O2"
4106 else
4107 CFLAGS="-g"
4108 fi
4109else
4110 if test "$GCC" = yes; then
4111 CFLAGS="-O2"
4112 else
4113 CFLAGS=
4114 fi
4115fi
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4117$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4118if test "${ac_cv_prog_cc_c89+set}" = set; then :
4119 $as_echo_n "(cached) " >&6
4120else
4121 ac_cv_prog_cc_c89=no
4122ac_save_CC=$CC
4123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4124/* end confdefs.h. */
5213506e
RW
4125#include <stdarg.h>
4126#include <stdio.h>
4127#include <sys/types.h>
4128#include <sys/stat.h>
4129/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4130struct buf { int x; };
4131FILE * (*rcsopen) (struct buf *, struct stat *, int);
4132static char *e (p, i)
4133 char **p;
4134 int i;
4135{
4136 return p[i];
4137}
4138static char *f (char * (*g) (char **, int), char **p, ...)
4139{
4140 char *s;
4141 va_list v;
4142 va_start (v,p);
4143 s = g (p, va_arg (v,int));
4144 va_end (v);
4145 return s;
4146}
4147
4148/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4149 function prototypes and stuff, but not '\xHH' hex character constants.
4150 These don't provoke an error unfortunately, instead are silently treated
4151 as 'x'. The following induces an error, until -std is added to get
4152 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4153 array size at least. It's necessary to write '\x00'==0 to get something
4154 that's true only with -std. */
4155int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4156
4157/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4158 inside strings and character constants. */
4159#define FOO(x) 'x'
4160int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4161
4162int test (int i, double x);
4163struct s1 {int (*f) (int a);};
4164struct s2 {int (*f) (double a);};
4165int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4166int argc;
4167char **argv;
bf3b7cd3
JD
4168int
4169main ()
4170{
5213506e 4171return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bf3b7cd3
JD
4172 ;
4173 return 0;
4174}
4175_ACEOF
5213506e
RW
4176for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4177 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4178do
4179 CC="$ac_save_CC $ac_arg"
4180 if ac_fn_c_try_compile "$LINENO"; then :
4181 ac_cv_prog_cc_c89=$ac_arg
bf3b7cd3 4182fi
5213506e
RW
4183rm -f core conftest.err conftest.$ac_objext
4184 test "x$ac_cv_prog_cc_c89" != "xno" && break
bf3b7cd3 4185done
5213506e
RW
4186rm -f conftest.$ac_ext
4187CC=$ac_save_CC
4188
4189fi
4190# AC_CACHE_VAL
4191case "x$ac_cv_prog_cc_c89" in
4192 x)
4193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4194$as_echo "none needed" >&6; } ;;
4195 xno)
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4197$as_echo "unsupported" >&6; } ;;
4198 *)
4199 CC="$CC $ac_cv_prog_cc_c89"
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4201$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bf3b7cd3 4202esac
5213506e
RW
4203if test "x$ac_cv_prog_cc_c89" != xno; then :
4204
4205fi
4206
4207ac_ext=c
4208ac_cpp='$CPP $CPPFLAGS'
4209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4211ac_compiler_gnu=$ac_cv_c_compiler_gnu
4212
4213if test "x$CC" != xcc; then
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4215$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
b61ff9c8 4216else
5213506e
RW
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4218$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4219fi
4220set dummy $CC; ac_cc=`$as_echo "$2" |
4221 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4222if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
4223 $as_echo_n "(cached) " >&6
4224else
4225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4226/* end confdefs.h. */
5213506e 4227
bf3b7cd3
JD
4228int
4229main ()
4230{
4231
bf3b7cd3
JD
4232 ;
4233 return 0;
4234}
4235_ACEOF
5213506e
RW
4236# Make sure it works both with $CC and with simple cc.
4237# We do the test twice because some compilers refuse to overwrite an
4238# existing .o file with -o, though they will create one.
4239ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4240rm -f conftest2.*
4241if { { case "(($ac_try" in
4242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4243 *) ac_try_echo=$ac_try;;
4244esac
4245eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4246$as_echo "$ac_try_echo"; } >&5
4247 (eval "$ac_try") 2>&5
4248 ac_status=$?
4249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4250 test $ac_status = 0; } &&
4251 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4253 *) ac_try_echo=$ac_try;;
4254esac
4255eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4256$as_echo "$ac_try_echo"; } >&5
4257 (eval "$ac_try") 2>&5
bf3b7cd3 4258 ac_status=$?
5213506e
RW
4259 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4260 test $ac_status = 0; };
4261then
4262 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4263 if test "x$CC" != xcc; then
4264 # Test first that cc exists at all.
4265 if { ac_try='cc -c conftest.$ac_ext >&5'
4266 { { case "(($ac_try" in
4267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4268 *) ac_try_echo=$ac_try;;
4269esac
4270eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4271$as_echo "$ac_try_echo"; } >&5
4272 (eval "$ac_try") 2>&5
4273 ac_status=$?
4274 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4275 test $ac_status = 0; }; }; then
4276 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4277 rm -f conftest2.*
4278 if { { case "(($ac_try" in
4279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4280 *) ac_try_echo=$ac_try;;
4281esac
4282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4283$as_echo "$ac_try_echo"; } >&5
4284 (eval "$ac_try") 2>&5
4285 ac_status=$?
4286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4287 test $ac_status = 0; } &&
4288 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4290 *) ac_try_echo=$ac_try;;
4291esac
4292eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4293$as_echo "$ac_try_echo"; } >&5
4294 (eval "$ac_try") 2>&5
bf3b7cd3 4295 ac_status=$?
5213506e
RW
4296 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4297 test $ac_status = 0; };
4298 then
4299 # cc works too.
4300 :
4301 else
4302 # cc exists but doesn't like -o.
4303 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4304 fi
4305 fi
4306 fi
bf3b7cd3 4307else
5213506e
RW
4308 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4309fi
4310rm -f core conftest*
bf3b7cd3 4311
b61ff9c8 4312fi
5213506e
RW
4313if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4315$as_echo "yes" >&6; }
4316else
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4318$as_echo "no" >&6; }
4319
4320$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
4321
bf3b7cd3 4322fi
5213506e
RW
4323
4324# expand $ac_aux_dir to an absolute path
4325am_aux_dir=`cd $ac_aux_dir && pwd`
4326
4327# FIXME: we rely on the cache variable name because
4328# there is no other way.
4329set dummy $CC
4330am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4331eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
4332if test "$am_t" != yes; then
4333 # Losing compiler, so override with the script.
4334 # FIXME: It is wrong to rewrite CC.
4335 # But if we don't then we get into trouble of one sort or another.
4336 # A longer-term fix would be to have automake use am__CC in this case,
4337 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4338 CC="$am_aux_dir/compile $CC"
bf3b7cd3 4339fi
5213506e
RW
4340
4341
4342ac_ext=cpp
4343ac_cpp='$CXXCPP $CPPFLAGS'
4344ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4345ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4346ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4347if test -z "$CXX"; then
4348 if test -n "$CCC"; then
4349 CXX=$CCC
4350 else
4351 if test -n "$ac_tool_prefix"; then
4352 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4353 do
4354 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4355set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4357$as_echo_n "checking for $ac_word... " >&6; }
4358if test "${ac_cv_prog_CXX+set}" = set; then :
4359 $as_echo_n "(cached) " >&6
b61ff9c8 4360else
5213506e
RW
4361 if test -n "$CXX"; then
4362 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4363else
4364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365for as_dir in $PATH
4366do
4367 IFS=$as_save_IFS
4368 test -z "$as_dir" && as_dir=.
4369 for ac_exec_ext in '' $ac_executable_extensions; do
4370 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4371 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4372 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4373 break 2
4374 fi
4375done
4376 done
4377IFS=$as_save_IFS
4378
bf3b7cd3 4379fi
b61ff9c8 4380fi
5213506e
RW
4381CXX=$ac_cv_prog_CXX
4382if test -n "$CXX"; then
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4384$as_echo "$CXX" >&6; }
4385else
4386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387$as_echo "no" >&6; }
4388fi
bf3b7cd3
JD
4389
4390
5213506e
RW
4391 test -n "$CXX" && break
4392 done
4393fi
4394if test -z "$CXX"; then
4395 ac_ct_CXX=$CXX
4396 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4397do
4398 # Extract the first word of "$ac_prog", so it can be a program name with args.
4399set dummy $ac_prog; ac_word=$2
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
4402if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
4403 $as_echo_n "(cached) " >&6
bf3b7cd3 4404else
5213506e
RW
4405 if test -n "$ac_ct_CXX"; then
4406 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
bf3b7cd3 4407else
5213506e
RW
4408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4409for as_dir in $PATH
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4415 ac_cv_prog_ac_ct_CXX="$ac_prog"
4416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4417 break 2
4418 fi
4419done
4420 done
4421IFS=$as_save_IFS
bf3b7cd3 4422
bf3b7cd3 4423fi
bf3b7cd3 4424fi
5213506e
RW
4425ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4426if test -n "$ac_ct_CXX"; then
4427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4428$as_echo "$ac_ct_CXX" >&6; }
bf3b7cd3 4429else
5213506e
RW
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4431$as_echo "no" >&6; }
4432fi
bf3b7cd3 4433
5213506e
RW
4434
4435 test -n "$ac_ct_CXX" && break
4436done
4437
4438 if test "x$ac_ct_CXX" = x; then
4439 CXX="g++"
4440 else
4441 case $cross_compiling:$ac_tool_warned in
4442yes:)
4443{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4444$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4445ac_tool_warned=yes ;;
4446esac
4447 CXX=$ac_ct_CXX
4448 fi
4449fi
4450
4451 fi
4452fi
4453# Provide some information about the compiler.
4454$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4455set X $ac_compile
4456ac_compiler=$2
4457for ac_option in --version -v -V -qversion; do
4458 { { ac_try="$ac_compiler $ac_option >&5"
4459case "(($ac_try" in
4460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4461 *) ac_try_echo=$ac_try;;
4462esac
4463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4464$as_echo "$ac_try_echo"; } >&5
4465 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
b61ff9c8 4466 ac_status=$?
5213506e
RW
4467 if test -s conftest.err; then
4468 sed '10a\
4469... rest of stderr output deleted ...
4470 10q' conftest.err >conftest.er1
4471 cat conftest.er1 >&5
4472 rm -f conftest.er1 conftest.err
4473 fi
4474 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4475 test $ac_status = 0; }
4476done
4477
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4479$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4480if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
4481 $as_echo_n "(cached) " >&6
4482else
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4484/* end confdefs.h. */
5213506e 4485
bf3b7cd3
JD
4486int
4487main ()
4488{
5213506e
RW
4489#ifndef __GNUC__
4490 choke me
4491#endif
bf3b7cd3
JD
4492
4493 ;
4494 return 0;
4495}
4496_ACEOF
5213506e
RW
4497if ac_fn_cxx_try_compile "$LINENO"; then :
4498 ac_compiler_gnu=yes
bf3b7cd3 4499else
5213506e
RW
4500 ac_compiler_gnu=no
4501fi
4502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4503ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
bf3b7cd3 4504
bf3b7cd3 4505fi
5213506e
RW
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4507$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4508if test $ac_compiler_gnu = yes; then
4509 GXX=yes
bf3b7cd3 4510else
5213506e
RW
4511 GXX=
4512fi
4513ac_test_CXXFLAGS=${CXXFLAGS+set}
4514ac_save_CXXFLAGS=$CXXFLAGS
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4516$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4517if test "${ac_cv_prog_cxx_g+set}" = set; then :
4518 $as_echo_n "(cached) " >&6
4519else
4520 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4521 ac_cxx_werror_flag=yes
4522 ac_cv_prog_cxx_g=no
4523 CXXFLAGS="-g"
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4525/* end confdefs.h. */
5213506e 4526
bf3b7cd3
JD
4527int
4528main ()
4529{
bf3b7cd3
JD
4530
4531 ;
4532 return 0;
4533}
4534_ACEOF
5213506e
RW
4535if ac_fn_cxx_try_compile "$LINENO"; then :
4536 ac_cv_prog_cxx_g=yes
4537else
4538 CXXFLAGS=""
4539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4540/* end confdefs.h. */
5213506e 4541
bf3b7cd3
JD
4542int
4543main ()
4544{
bf3b7cd3
JD
4545
4546 ;
4547 return 0;
4548}
4549_ACEOF
5213506e 4550if ac_fn_cxx_try_compile "$LINENO"; then :
bf3b7cd3 4551
bf3b7cd3 4552else
5213506e
RW
4553 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4554 CXXFLAGS="-g"
4555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4556/* end confdefs.h. */
5213506e 4557
bf3b7cd3
JD
4558int
4559main ()
4560{
bf3b7cd3
JD
4561
4562 ;
4563 return 0;
4564}
4565_ACEOF
5213506e
RW
4566if ac_fn_cxx_try_compile "$LINENO"; then :
4567 ac_cv_prog_cxx_g=yes
4568fi
4569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4570fi
4571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4572fi
4573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4574 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4577$as_echo "$ac_cv_prog_cxx_g" >&6; }
4578if test "$ac_test_CXXFLAGS" = set; then
4579 CXXFLAGS=$ac_save_CXXFLAGS
4580elif test $ac_cv_prog_cxx_g = yes; then
4581 if test "$GXX" = yes; then
4582 CXXFLAGS="-g -O2"
4583 else
4584 CXXFLAGS="-g"
4585 fi
bf3b7cd3 4586else
5213506e
RW
4587 if test "$GXX" = yes; then
4588 CXXFLAGS="-O2"
4589 else
4590 CXXFLAGS=
4591 fi
4592fi
4593ac_ext=c
4594ac_cpp='$CPP $CPPFLAGS'
4595ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4596ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4597ac_compiler_gnu=$ac_cv_c_compiler_gnu
4598
4599
4600
4601
4602if test -n "$ac_tool_prefix"; then
4603 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
4604set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
4605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4606$as_echo_n "checking for $ac_word... " >&6; }
4607if test "${ac_cv_prog_GNATBIND+set}" = set; then :
4608 $as_echo_n "(cached) " >&6
4609else
4610 if test -n "$GNATBIND"; then
4611 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
4612else
4613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4614for as_dir in $PATH
4615do
4616 IFS=$as_save_IFS
4617 test -z "$as_dir" && as_dir=.
4618 for ac_exec_ext in '' $ac_executable_extensions; do
4619 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4620 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
4621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4622 break 2
4623 fi
4624done
4625 done
4626IFS=$as_save_IFS
4627
4628fi
4629fi
4630GNATBIND=$ac_cv_prog_GNATBIND
4631if test -n "$GNATBIND"; then
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATBIND" >&5
4633$as_echo "$GNATBIND" >&6; }
4634else
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4636$as_echo "no" >&6; }
4637fi
4638
bf3b7cd3 4639
bf3b7cd3 4640fi
5213506e
RW
4641if test -z "$ac_cv_prog_GNATBIND"; then
4642 ac_ct_GNATBIND=$GNATBIND
4643 # Extract the first word of "gnatbind", so it can be a program name with args.
4644set dummy gnatbind; ac_word=$2
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4646$as_echo_n "checking for $ac_word... " >&6; }
4647if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then :
4648 $as_echo_n "(cached) " >&6
4649else
4650 if test -n "$ac_ct_GNATBIND"; then
4651 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
4652else
4653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in $PATH
4655do
4656 IFS=$as_save_IFS
4657 test -z "$as_dir" && as_dir=.
4658 for ac_exec_ext in '' $ac_executable_extensions; do
4659 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4660 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
4661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662 break 2
4663 fi
bf3b7cd3 4664done
5213506e
RW
4665 done
4666IFS=$as_save_IFS
4667
4668fi
4669fi
4670ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
4671if test -n "$ac_ct_GNATBIND"; then
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATBIND" >&5
4673$as_echo "$ac_ct_GNATBIND" >&6; }
4674else
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4676$as_echo "no" >&6; }
4677fi
4678
4679 if test "x$ac_ct_GNATBIND" = x; then
4680 GNATBIND="no"
4681 else
4682 case $cross_compiling:$ac_tool_warned in
4683yes:)
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4685$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4686ac_tool_warned=yes ;;
bf3b7cd3 4687esac
5213506e
RW
4688 GNATBIND=$ac_ct_GNATBIND
4689 fi
b61ff9c8 4690else
5213506e
RW
4691 GNATBIND="$ac_cv_prog_GNATBIND"
4692fi
bf3b7cd3 4693
5213506e
RW
4694if test -n "$ac_tool_prefix"; then
4695 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
4696set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if test "${ac_cv_prog_GNATMAKE+set}" = set; then :
4700 $as_echo_n "(cached) " >&6
4701else
4702 if test -n "$GNATMAKE"; then
4703 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
4704else
4705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4706for as_dir in $PATH
4707do
4708 IFS=$as_save_IFS
4709 test -z "$as_dir" && as_dir=.
4710 for ac_exec_ext in '' $ac_executable_extensions; do
4711 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4712 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
4713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4714 break 2
4715 fi
4716done
4717 done
4718IFS=$as_save_IFS
4719
4720fi
4721fi
4722GNATMAKE=$ac_cv_prog_GNATMAKE
4723if test -n "$GNATMAKE"; then
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATMAKE" >&5
4725$as_echo "$GNATMAKE" >&6; }
4726else
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4728$as_echo "no" >&6; }
4729fi
4730
4731
4732fi
4733if test -z "$ac_cv_prog_GNATMAKE"; then
4734 ac_ct_GNATMAKE=$GNATMAKE
4735 # Extract the first word of "gnatmake", so it can be a program name with args.
4736set dummy gnatmake; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then :
4740 $as_echo_n "(cached) " >&6
4741else
4742 if test -n "$ac_ct_GNATMAKE"; then
4743 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
4744else
4745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746for as_dir in $PATH
4747do
4748 IFS=$as_save_IFS
4749 test -z "$as_dir" && as_dir=.
4750 for ac_exec_ext in '' $ac_executable_extensions; do
4751 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4752 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
4753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4754 break 2
4755 fi
4756done
4757 done
4758IFS=$as_save_IFS
4759
4760fi
4761fi
4762ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
4763if test -n "$ac_ct_GNATMAKE"; then
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATMAKE" >&5
4765$as_echo "$ac_ct_GNATMAKE" >&6; }
4766else
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
4769fi
4770
4771 if test "x$ac_ct_GNATMAKE" = x; then
4772 GNATMAKE="no"
bf3b7cd3 4773 else
5213506e
RW
4774 case $cross_compiling:$ac_tool_warned in
4775yes:)
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4778ac_tool_warned=yes ;;
4779esac
4780 GNATMAKE=$ac_ct_GNATMAKE
4781 fi
4782else
4783 GNATMAKE="$ac_cv_prog_GNATMAKE"
4784fi
bf3b7cd3 4785
5213506e
RW
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5
4787$as_echo_n "checking whether compiler driver understands Ada... " >&6; }
4788if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then :
4789 $as_echo_n "(cached) " >&6
bf3b7cd3 4790else
5213506e
RW
4791 cat >conftest.adb <<EOF
4792procedure conftest is begin null; end conftest;
4793EOF
4794acx_cv_cc_gcc_supports_ada=no
4795# There is a bug in old released versions of GCC which causes the
4796# driver to exit successfully when the appropriate language module
4797# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
4798# Therefore we must check for the error message as well as an
4799# unsuccessful exit.
4800# Other compilers, like HP Tru64 UNIX cc, exit successfully when
4801# given a .adb file, but produce no object file. So we must check
4802# if an object file was really produced to guard against this.
4803errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
4804if test x"$errors" = x && test -f conftest.$ac_objext; then
4805 acx_cv_cc_gcc_supports_ada=yes
4806fi
4807rm -f conftest.*
4808fi
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
4810$as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
bf3b7cd3 4811
5213506e
RW
4812if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
4813 have_gnat=yes
4814else
4815 have_gnat=no
b61ff9c8 4816fi
5213506e
RW
4817
4818
4819# autoconf is lame and doesn't give us any substitution variable for this.
4820if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
4821 NO_MINUS_C_MINUS_O=yes
4822else
4823 OUTPUT_OPTION='-o $@'
bf3b7cd3 4824fi
5213506e
RW
4825
4826
4827
4828# Remove the -O2: for historical reasons, unless bootstrapping we prefer
4829# optimizations to be activated explicitly by the toplevel.
4830case "$CC" in
4831 */prev-gcc/xgcc*) ;;
4832 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
4833esac
4834
4835
4836# -------------------------
4837# Check C compiler features
4838# -------------------------
4839
4840
4841ac_ext=c
4842ac_cpp='$CPP $CPPFLAGS'
4843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4845ac_compiler_gnu=$ac_cv_c_compiler_gnu
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4847$as_echo_n "checking how to run the C preprocessor... " >&6; }
4848# On Suns, sometimes $CPP names a directory.
4849if test -n "$CPP" && test -d "$CPP"; then
4850 CPP=
bf3b7cd3 4851fi
5213506e
RW
4852if test -z "$CPP"; then
4853 if test "${ac_cv_prog_CPP+set}" = set; then :
4854 $as_echo_n "(cached) " >&6
b61ff9c8 4855else
5213506e
RW
4856 # Double quotes because CPP needs to be expanded
4857 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4858 do
4859 ac_preproc_ok=false
4860for ac_c_preproc_warn_flag in '' yes
4861do
4862 # Use a header file that comes with gcc, so configuring glibc
4863 # with a fresh cross-compiler works.
4864 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4865 # <limits.h> exists even on freestanding compilers.
4866 # On the NeXT, cc -E runs the code through the compiler's parser,
4867 # not just through cpp. "Syntax error" is here to catch this case.
4868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4869/* end confdefs.h. */
4870#ifdef __STDC__
4871# include <limits.h>
4872#else
4873# include <assert.h>
4874#endif
4875 Syntax error
bf3b7cd3 4876_ACEOF
5213506e 4877if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 4878
bf3b7cd3 4879else
5213506e
RW
4880 # Broken: fails on valid input.
4881continue
4882fi
4883rm -f conftest.err conftest.$ac_ext
4884
4885 # OK, works on sane cases. Now check whether nonexistent headers
4886 # can be detected and how.
4887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4888/* end confdefs.h. */
5213506e 4889#include <ac_nonexistent.h>
bf3b7cd3 4890_ACEOF
5213506e
RW
4891if ac_fn_c_try_cpp "$LINENO"; then :
4892 # Broken: success on invalid input.
4893continue
b61ff9c8 4894else
5213506e
RW
4895 # Passes both tests.
4896ac_preproc_ok=:
4897break
bf3b7cd3 4898fi
5213506e 4899rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4900
5213506e
RW
4901done
4902# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4903rm -f conftest.err conftest.$ac_ext
4904if $ac_preproc_ok; then :
4905 break
4906fi
bf3b7cd3 4907
5213506e
RW
4908 done
4909 ac_cv_prog_CPP=$CPP
bf3b7cd3 4910
8b1f719a 4911fi
5213506e 4912 CPP=$ac_cv_prog_CPP
8b1f719a 4913else
5213506e
RW
4914 ac_cv_prog_CPP=$CPP
4915fi
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4917$as_echo "$CPP" >&6; }
4918ac_preproc_ok=false
4919for ac_c_preproc_warn_flag in '' yes
4920do
4921 # Use a header file that comes with gcc, so configuring glibc
4922 # with a fresh cross-compiler works.
4923 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4924 # <limits.h> exists even on freestanding compilers.
4925 # On the NeXT, cc -E runs the code through the compiler's parser,
4926 # not just through cpp. "Syntax error" is here to catch this case.
4927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4928/* end confdefs.h. */
5213506e
RW
4929#ifdef __STDC__
4930# include <limits.h>
4931#else
4932# include <assert.h>
4933#endif
4934 Syntax error
bf3b7cd3 4935_ACEOF
5213506e 4936if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 4937
bf3b7cd3 4938else
5213506e
RW
4939 # Broken: fails on valid input.
4940continue
bf3b7cd3 4941fi
5213506e 4942rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4943
5213506e
RW
4944 # OK, works on sane cases. Now check whether nonexistent headers
4945 # can be detected and how.
4946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4947/* end confdefs.h. */
5213506e 4948#include <ac_nonexistent.h>
bf3b7cd3 4949_ACEOF
5213506e
RW
4950if ac_fn_c_try_cpp "$LINENO"; then :
4951 # Broken: success on invalid input.
4952continue
bf3b7cd3 4953else
5213506e
RW
4954 # Passes both tests.
4955ac_preproc_ok=:
4956break
bf3b7cd3 4957fi
5213506e
RW
4958rm -f conftest.err conftest.$ac_ext
4959
bf3b7cd3 4960done
5213506e
RW
4961# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4962rm -f conftest.err conftest.$ac_ext
4963if $ac_preproc_ok; then :
4964
b61ff9c8 4965else
5213506e
RW
4966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4968as_fn_error "C preprocessor \"$CPP\" fails sanity check
4969See \`config.log' for more details." "$LINENO" 5; }
4970fi
bf3b7cd3 4971
5213506e
RW
4972ac_ext=c
4973ac_cpp='$CPP $CPPFLAGS'
4974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4976ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4977
bf3b7cd3 4978
5213506e
RW
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4980$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4981if test "${ac_cv_path_GREP+set}" = set; then :
4982 $as_echo_n "(cached) " >&6
4983else
4984 if test -z "$GREP"; then
4985 ac_path_GREP_found=false
4986 # Loop through the user's path and test for each of PROGNAME-LIST
4987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4989do
4990 IFS=$as_save_IFS
4991 test -z "$as_dir" && as_dir=.
4992 for ac_prog in grep ggrep; do
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4995 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4996# Check for GNU ac_path_GREP and select it if it is found.
4997 # Check for GNU $ac_path_GREP
4998case `"$ac_path_GREP" --version 2>&1` in
4999*GNU*)
5000 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5001*)
5002 ac_count=0
5003 $as_echo_n 0123456789 >"conftest.in"
5004 while :
5005 do
5006 cat "conftest.in" "conftest.in" >"conftest.tmp"
5007 mv "conftest.tmp" "conftest.in"
5008 cp "conftest.in" "conftest.nl"
5009 $as_echo 'GREP' >> "conftest.nl"
5010 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5011 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5012 as_fn_arith $ac_count + 1 && ac_count=$as_val
5013 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5014 # Best one so far, save it but keep looking for a better one
5015 ac_cv_path_GREP="$ac_path_GREP"
5016 ac_path_GREP_max=$ac_count
5017 fi
5018 # 10*(2^10) chars as input seems more than enough
5019 test $ac_count -gt 10 && break
5020 done
5021 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5022esac
5023
5024 $ac_path_GREP_found && break 3
5025 done
5026 done
5027 done
5028IFS=$as_save_IFS
5029 if test -z "$ac_cv_path_GREP"; then
5030 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5031 fi
b61ff9c8 5032else
5213506e 5033 ac_cv_path_GREP=$GREP
2f41c1d6 5034fi
5213506e 5035
b61ff9c8 5036fi
5213506e
RW
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5038$as_echo "$ac_cv_path_GREP" >&6; }
5039 GREP="$ac_cv_path_GREP"
bf3b7cd3
JD
5040
5041
5213506e
RW
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5043$as_echo_n "checking for egrep... " >&6; }
5044if test "${ac_cv_path_EGREP+set}" = set; then :
5045 $as_echo_n "(cached) " >&6
5ec1c5e6 5046else
5213506e
RW
5047 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5048 then ac_cv_path_EGREP="$GREP -E"
5049 else
5050 if test -z "$EGREP"; then
5051 ac_path_EGREP_found=false
5052 # Loop through the user's path and test for each of PROGNAME-LIST
5053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
5058 for ac_prog in egrep; do
5059 for ac_exec_ext in '' $ac_executable_extensions; do
5060 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5061 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5062# Check for GNU ac_path_EGREP and select it if it is found.
5063 # Check for GNU $ac_path_EGREP
5064case `"$ac_path_EGREP" --version 2>&1` in
5065*GNU*)
5066 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5067*)
5068 ac_count=0
5069 $as_echo_n 0123456789 >"conftest.in"
5070 while :
5071 do
5072 cat "conftest.in" "conftest.in" >"conftest.tmp"
5073 mv "conftest.tmp" "conftest.in"
5074 cp "conftest.in" "conftest.nl"
5075 $as_echo 'EGREP' >> "conftest.nl"
5076 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5077 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5078 as_fn_arith $ac_count + 1 && ac_count=$as_val
5079 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5080 # Best one so far, save it but keep looking for a better one
5081 ac_cv_path_EGREP="$ac_path_EGREP"
5082 ac_path_EGREP_max=$ac_count
5083 fi
5084 # 10*(2^10) chars as input seems more than enough
5085 test $ac_count -gt 10 && break
5086 done
5087 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5088esac
5ec1c5e6 5089
5213506e
RW
5090 $ac_path_EGREP_found && break 3
5091 done
5092 done
5093 done
5094IFS=$as_save_IFS
5095 if test -z "$ac_cv_path_EGREP"; then
5096 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5097 fi
5098else
5099 ac_cv_path_EGREP=$EGREP
5ec1c5e6 5100fi
5213506e
RW
5101
5102 fi
5ec1c5e6 5103fi
5213506e
RW
5104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5105$as_echo "$ac_cv_path_EGREP" >&6; }
5106 EGREP="$ac_cv_path_EGREP"
5ec1c5e6 5107
5ec1c5e6 5108
5213506e
RW
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5110$as_echo_n "checking for ANSI C header files... " >&6; }
5111if test "${ac_cv_header_stdc+set}" = set; then :
5112 $as_echo_n "(cached) " >&6
bf3b7cd3 5113else
5213506e 5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5115/* end confdefs.h. */
5213506e
RW
5116#include <stdlib.h>
5117#include <stdarg.h>
5118#include <string.h>
5119#include <float.h>
5120
ba479fd2
NN
5121int
5122main ()
5123{
5213506e 5124
ba479fd2
NN
5125 ;
5126 return 0;
5127}
5128_ACEOF
5213506e
RW
5129if ac_fn_c_try_compile "$LINENO"; then :
5130 ac_cv_header_stdc=yes
75b6f3fd 5131else
5213506e 5132 ac_cv_header_stdc=no
75b6f3fd 5133fi
5213506e 5134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5135
5213506e
RW
5136if test $ac_cv_header_stdc = yes; then
5137 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5139/* end confdefs.h. */
5213506e 5140#include <string.h>
bf3b7cd3 5141
ba479fd2 5142_ACEOF
5213506e
RW
5143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5144 $EGREP "memchr" >/dev/null 2>&1; then :
bf3b7cd3 5145
75e93faa 5146else
5213506e
RW
5147 ac_cv_header_stdc=no
5148fi
5149rm -f conftest*
ba479fd2 5150
75e93faa 5151fi
bf3b7cd3 5152
5213506e
RW
5153if test $ac_cv_header_stdc = yes; then
5154 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5156/* end confdefs.h. */
5213506e 5157#include <stdlib.h>
bf3b7cd3 5158
ba479fd2 5159_ACEOF
5213506e
RW
5160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5161 $EGREP "free" >/dev/null 2>&1; then :
bf3b7cd3 5162
04cabffc 5163else
5213506e 5164 ac_cv_header_stdc=no
04cabffc 5165fi
5213506e 5166rm -f conftest*
04cabffc 5167
414d23ae 5168fi
ba479fd2 5169
5213506e
RW
5170if test $ac_cv_header_stdc = yes; then
5171 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5172 if test "$cross_compiling" = yes; then :
5173 :
b61ff9c8 5174else
5213506e 5175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 5176/* end confdefs.h. */
5213506e 5177#include <ctype.h>
bf3b7cd3 5178#include <stdlib.h>
5213506e
RW
5179#if ((' ' & 0x0FF) == 0x020)
5180# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5181# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5182#else
5183# define ISLOWER(c) \
5184 (('a' <= (c) && (c) <= 'i') \
5185 || ('j' <= (c) && (c) <= 'r') \
5186 || ('s' <= (c) && (c) <= 'z'))
5187# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5188#endif
5189
5190#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bf3b7cd3
JD
5191int
5192main ()
5193{
5213506e
RW
5194 int i;
5195 for (i = 0; i < 256; i++)
5196 if (XOR (islower (i), ISLOWER (i))
5197 || toupper (i) != TOUPPER (i))
5198 return 2;
bf3b7cd3
JD
5199 return 0;
5200}
5201_ACEOF
5213506e 5202if ac_fn_c_try_run "$LINENO"; then :
75e93faa 5203
5213506e
RW
5204else
5205 ac_cv_header_stdc=no
b61ff9c8 5206fi
5213506e
RW
5207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5208 conftest.$ac_objext conftest.beam conftest.$ac_ext
bf3b7cd3 5209fi
5213506e 5210
bf3b7cd3 5211fi
bf3b7cd3 5212fi
5213506e
RW
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5214$as_echo "$ac_cv_header_stdc" >&6; }
5215if test $ac_cv_header_stdc = yes; then
5216
5217$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5218
b61ff9c8 5219fi
5213506e
RW
5220
5221# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5222for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5223 inttypes.h stdint.h unistd.h
5224do :
5225 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5226ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5227"
5228eval as_val=\$$as_ac_Header
5229 if test "x$as_val" = x""yes; then :
5230 cat >>confdefs.h <<_ACEOF
5231#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2 5232_ACEOF
414d23ae 5233
5213506e
RW
5234fi
5235
5236done
5237
5238
cafe096b 5239
5213506e
RW
5240 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5241if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5242 MINIX=yes
5243else
5244 MINIX=
414d23ae
HPN
5245fi
5246
5213506e
RW
5247
5248 if test "$MINIX" = yes; then
5249
5250$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5251
5252
5253$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5254
5255
5256$as_echo "#define _MINIX 1" >>confdefs.h
5257
5258 fi
5259
5260
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5262$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5263if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5264 $as_echo_n "(cached) " >&6
b5472e1d 5265else
5213506e 5266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b5472e1d 5267/* end confdefs.h. */
5213506e
RW
5268
5269# define __EXTENSIONS__ 1
5270 $ac_includes_default
3bbd5a19
PB
5271int
5272main ()
5273{
5213506e 5274
3bbd5a19
PB
5275 ;
5276 return 0;
5277}
b5472e1d 5278_ACEOF
5213506e
RW
5279if ac_fn_c_try_compile "$LINENO"; then :
5280 ac_cv_safe_to_define___extensions__=yes
b5472e1d 5281else
5213506e 5282 ac_cv_safe_to_define___extensions__=no
b5472e1d 5283fi
5213506e 5284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 5285fi
5213506e
RW
5286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5287$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5288 test $ac_cv_safe_to_define___extensions__ = yes &&
5289 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3bbd5a19 5290
5213506e
RW
5291 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5292
5293 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3bbd5a19 5294
5213506e
RW
5295 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5296
5297 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5298
5299
5300ac_ext=c
5301ac_cpp='$CPP $CPPFLAGS'
5302ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5303ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5304ac_compiler_gnu=$ac_cv_c_compiler_gnu
5305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5306$as_echo_n "checking how to run the C preprocessor... " >&6; }
5307# On Suns, sometimes $CPP names a directory.
5308if test -n "$CPP" && test -d "$CPP"; then
5309 CPP=
5310fi
5311if test -z "$CPP"; then
5312 if test "${ac_cv_prog_CPP+set}" = set; then :
5313 $as_echo_n "(cached) " >&6
89a42ac8 5314else
5213506e
RW
5315 # Double quotes because CPP needs to be expanded
5316 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5317 do
5318 ac_preproc_ok=false
5319for ac_c_preproc_warn_flag in '' yes
5320do
5321 # Use a header file that comes with gcc, so configuring glibc
5322 # with a fresh cross-compiler works.
5323 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5324 # <limits.h> exists even on freestanding compilers.
5325 # On the NeXT, cc -E runs the code through the compiler's parser,
5326 # not just through cpp. "Syntax error" is here to catch this case.
5327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
89a42ac8 5328/* end confdefs.h. */
5213506e
RW
5329#ifdef __STDC__
5330# include <limits.h>
5331#else
5332# include <assert.h>
5333#endif
5334 Syntax error
89a42ac8 5335_ACEOF
5213506e
RW
5336if ac_fn_c_try_cpp "$LINENO"; then :
5337
89a42ac8 5338else
5213506e
RW
5339 # Broken: fails on valid input.
5340continue
5341fi
5342rm -f conftest.err conftest.$ac_ext
89a42ac8 5343
5213506e
RW
5344 # OK, works on sane cases. Now check whether nonexistent headers
5345 # can be detected and how.
5346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5347/* end confdefs.h. */
5348#include <ac_nonexistent.h>
5349_ACEOF
5350if ac_fn_c_try_cpp "$LINENO"; then :
5351 # Broken: success on invalid input.
5352continue
5353else
5354 # Passes both tests.
5355ac_preproc_ok=:
5356break
89a42ac8 5357fi
5213506e
RW
5358rm -f conftest.err conftest.$ac_ext
5359
5360done
5361# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5362rm -f conftest.err conftest.$ac_ext
5363if $ac_preproc_ok; then :
5364 break
34a86c2b
NN
5365fi
5366
5213506e
RW
5367 done
5368 ac_cv_prog_CPP=$CPP
5369
5370fi
5371 CPP=$ac_cv_prog_CPP
643d3bd2 5372else
5213506e
RW
5373 ac_cv_prog_CPP=$CPP
5374fi
5375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5376$as_echo "$CPP" >&6; }
5377ac_preproc_ok=false
5378for ac_c_preproc_warn_flag in '' yes
5379do
5380 # Use a header file that comes with gcc, so configuring glibc
5381 # with a fresh cross-compiler works.
5382 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5383 # <limits.h> exists even on freestanding compilers.
5384 # On the NeXT, cc -E runs the code through the compiler's parser,
5385 # not just through cpp. "Syntax error" is here to catch this case.
5386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
643d3bd2 5387/* end confdefs.h. */
5213506e
RW
5388#ifdef __STDC__
5389# include <limits.h>
5390#else
5391# include <assert.h>
5392#endif
5393 Syntax error
00020c16 5394_ACEOF
5213506e 5395if ac_fn_c_try_cpp "$LINENO"; then :
3bbd5a19 5396
643d3bd2 5397else
5213506e
RW
5398 # Broken: fails on valid input.
5399continue
5400fi
5401rm -f conftest.err conftest.$ac_ext
643d3bd2 5402
5213506e
RW
5403 # OK, works on sane cases. Now check whether nonexistent headers
5404 # can be detected and how.
5405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5406/* end confdefs.h. */
5407#include <ac_nonexistent.h>
5408_ACEOF
5409if ac_fn_c_try_cpp "$LINENO"; then :
5410 # Broken: success on invalid input.
5411continue
5412else
5413 # Passes both tests.
5414ac_preproc_ok=:
5415break
643d3bd2 5416fi
5213506e
RW
5417rm -f conftest.err conftest.$ac_ext
5418
5419done
5420# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5421rm -f conftest.err conftest.$ac_ext
5422if $ac_preproc_ok; then :
5423
09a9c095 5424else
5213506e
RW
5425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5427as_fn_error "C preprocessor \"$CPP\" fails sanity check
5428See \`config.log' for more details." "$LINENO" 5; }
5429fi
373477bb 5430
5213506e
RW
5431ac_ext=c
5432ac_cpp='$CPP $CPPFLAGS'
5433ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5434ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5435ac_compiler_gnu=$ac_cv_c_compiler_gnu
5436
5437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5438$as_echo_n "checking for inline... " >&6; }
5439if test "${ac_cv_c_inline+set}" = set; then :
5440 $as_echo_n "(cached) " >&6
5441else
5442 ac_cv_c_inline=no
5443for ac_kw in inline __inline__ __inline; do
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 5445/* end confdefs.h. */
5213506e
RW
5446#ifndef __cplusplus
5447typedef int foo_t;
5448static $ac_kw foo_t static_foo () {return 0; }
5449$ac_kw foo_t foo () {return 0; }
5450#endif
373477bb 5451
00020c16 5452_ACEOF
5213506e
RW
5453if ac_fn_c_try_compile "$LINENO"; then :
5454 ac_cv_c_inline=$ac_kw
5455fi
5456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5457 test "$ac_cv_c_inline" != no && break
5458done
5459
5460fi
5461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5462$as_echo "$ac_cv_c_inline" >&6; }
5463
5464case $ac_cv_c_inline in
5465 inline | yes) ;;
5466 *)
5467 case $ac_cv_c_inline in
5468 no) ac_val=;;
5469 *) ac_val=$ac_cv_c_inline;;
5470 esac
5471 cat >>confdefs.h <<_ACEOF
5472#ifndef __cplusplus
5473#define inline $ac_val
5474#endif
00020c16 5475_ACEOF
5213506e
RW
5476 ;;
5477esac
5478
5479
5480# sizeof(char) is 1 by definition.
5481# The cast to long int works around a bug in the HP C Compiler
5482# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5483# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5484# This bug is HP SR number 8606223364.
5485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
5486$as_echo_n "checking size of void *... " >&6; }
5487if test "${ac_cv_sizeof_void_p+set}" = set; then :
5488 $as_echo_n "(cached) " >&6
5489else
5490 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
5491
5492else
5493 if test "$ac_cv_type_void_p" = yes; then
5494 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5496{ as_fn_set_status 77
5497as_fn_error "cannot compute sizeof (void *)
5498See \`config.log' for more details." "$LINENO" 5; }; }
5499 else
5500 ac_cv_sizeof_void_p=0
5501 fi
5502fi
5503
5504fi
5505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
5506$as_echo "$ac_cv_sizeof_void_p" >&6; }
414d23ae 5507
5213506e
RW
5508
5509
5510cat >>confdefs.h <<_ACEOF
5511#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
00020c16 5512_ACEOF
5213506e
RW
5513
5514
5515# The cast to long int works around a bug in the HP C Compiler
5516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5518# This bug is HP SR number 8606223364.
5519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
5520$as_echo_n "checking size of short... " >&6; }
5521if test "${ac_cv_sizeof_short+set}" = set; then :
5522 $as_echo_n "(cached) " >&6
00020c16 5523else
5213506e
RW
5524 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
5525
5526else
5527 if test "$ac_cv_type_short" = yes; then
5528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5530{ as_fn_set_status 77
5531as_fn_error "cannot compute sizeof (short)
5532See \`config.log' for more details." "$LINENO" 5; }; }
5533 else
5534 ac_cv_sizeof_short=0
5535 fi
5536fi
414d23ae 5537
a1286ef5 5538fi
5213506e
RW
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
5540$as_echo "$ac_cv_sizeof_short" >&6; }
5541
5542
5543
5544cat >>confdefs.h <<_ACEOF
5545#define SIZEOF_SHORT $ac_cv_sizeof_short
5546_ACEOF
5547
5548
5549# The cast to long int works around a bug in the HP C Compiler
5550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5552# This bug is HP SR number 8606223364.
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
5554$as_echo_n "checking size of int... " >&6; }
5555if test "${ac_cv_sizeof_int+set}" = set; then :
5556 $as_echo_n "(cached) " >&6
e1bbfc5c 5557else
5213506e 5558 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
e1bbfc5c 5559
5213506e
RW
5560else
5561 if test "$ac_cv_type_int" = yes; then
5562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5564{ as_fn_set_status 77
5565as_fn_error "cannot compute sizeof (int)
5566See \`config.log' for more details." "$LINENO" 5; }; }
5567 else
5568 ac_cv_sizeof_int=0
5569 fi
e1bbfc5c 5570fi
5213506e 5571
ba479fd2 5572fi
5213506e
RW
5573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
5574$as_echo "$ac_cv_sizeof_int" >&6; }
00020c16 5575
5213506e
RW
5576
5577
5578cat >>confdefs.h <<_ACEOF
5579#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 5580_ACEOF
5213506e
RW
5581
5582
5583# The cast to long int works around a bug in the HP C Compiler
5584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5586# This bug is HP SR number 8606223364.
5587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5588$as_echo_n "checking size of long... " >&6; }
5589if test "${ac_cv_sizeof_long+set}" = set; then :
5590 $as_echo_n "(cached) " >&6
ba479fd2 5591else
5213506e 5592 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
ba479fd2 5593
00020c16 5594else
5213506e
RW
5595 if test "$ac_cv_type_long" = yes; then
5596 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5598{ as_fn_set_status 77
5599as_fn_error "cannot compute sizeof (long)
5600See \`config.log' for more details." "$LINENO" 5; }; }
5601 else
5602 ac_cv_sizeof_long=0
5603 fi
5604fi
5605
5606fi
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5608$as_echo "$ac_cv_sizeof_long" >&6; }
5609
5610
5611
5612cat >>confdefs.h <<_ACEOF
5613#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 5614_ACEOF
00020c16 5615
00020c16 5616
5213506e
RW
5617ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
5618if test "x$ac_cv_type_long_long" = x""yes; then :
5619
5620cat >>confdefs.h <<_ACEOF
5621#define HAVE_LONG_LONG 1
ba479fd2 5622_ACEOF
5213506e
RW
5623
5624# The cast to long int works around a bug in the HP C Compiler
5625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5627# This bug is HP SR number 8606223364.
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
5629$as_echo_n "checking size of long long... " >&6; }
5630if test "${ac_cv_sizeof_long_long+set}" = set; then :
5631 $as_echo_n "(cached) " >&6
b61ff9c8 5632else
5213506e 5633 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
ba479fd2 5634
5213506e
RW
5635else
5636 if test "$ac_cv_type_long_long" = yes; then
5637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5639{ as_fn_set_status 77
5640as_fn_error "cannot compute sizeof (long long)
5641See \`config.log' for more details." "$LINENO" 5; }; }
5642 else
5643 ac_cv_sizeof_long_long=0
5644 fi
ba479fd2 5645fi
5213506e 5646
6938ec6c 5647fi
5213506e
RW
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
5649$as_echo "$ac_cv_sizeof_long_long" >&6; }
5650
5651
5652
5653cat >>confdefs.h <<_ACEOF
5654#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5655_ACEOF
5656
5657
6e3f3080 5658fi
5213506e
RW
5659
5660ac_fn_c_check_type "$LINENO" "__int64" "ac_cv_type___int64" "$ac_includes_default"
5661if test "x$ac_cv_type___int64" = x""yes; then :
5662
5663cat >>confdefs.h <<_ACEOF
5664#define HAVE___INT64 1
5665_ACEOF
5666
5667# The cast to long int works around a bug in the HP C Compiler
5668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5670# This bug is HP SR number 8606223364.
5671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5
5672$as_echo_n "checking size of __int64... " >&6; }
5673if test "${ac_cv_sizeof___int64+set}" = set; then :
5674 $as_echo_n "(cached) " >&6
5675else
5676 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then :
5677
6938ec6c 5678else
5213506e
RW
5679 if test "$ac_cv_type___int64" = yes; then
5680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5682{ as_fn_set_status 77
5683as_fn_error "cannot compute sizeof (__int64)
5684See \`config.log' for more details." "$LINENO" 5; }; }
5685 else
5686 ac_cv_sizeof___int64=0
5687 fi
6938ec6c 5688fi
5213506e 5689
00020c16 5690fi
5213506e
RW
5691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5
5692$as_echo "$ac_cv_sizeof___int64" >&6; }
5693
5694
5695
00020c16
ILT
5696cat >>confdefs.h <<_ACEOF
5697#define SIZEOF___INT64 $ac_cv_sizeof___int64
5698_ACEOF
6938ec6c
NN
5699
5700
00020c16 5701fi
ba479fd2 5702
fa802374
KT
5703ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
5704case $ac_cv_c_int8_t in #(
5705 no|yes) ;; #(
5706 *)
5707
5708cat >>confdefs.h <<_ACEOF
5709#define int8_t $ac_cv_c_int8_t
5710_ACEOF
5711;;
5712esac
5713
5714ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
5715case $ac_cv_c_int16_t in #(
5716 no|yes) ;; #(
5717 *)
5718
5719cat >>confdefs.h <<_ACEOF
5720#define int16_t $ac_cv_c_int16_t
5721_ACEOF
5722;;
5723esac
5724
5725ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
5726case $ac_cv_c_int32_t in #(
5727 no|yes) ;; #(
5728 *)
5729
5730cat >>confdefs.h <<_ACEOF
5731#define int32_t $ac_cv_c_int32_t
5732_ACEOF
5733;;
5734esac
5735
5736ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
5737case $ac_cv_c_int64_t in #(
5738 no|yes) ;; #(
5739 *)
5740
5741cat >>confdefs.h <<_ACEOF
5742#define int64_t $ac_cv_c_int64_t
5743_ACEOF
5744;;
5745esac
5746
5747
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5749$as_echo_n "checking for long long int... " >&6; }
5750if test "${ac_cv_type_long_long_int+set}" = set; then :
5751 $as_echo_n "(cached) " >&6
5752else
5753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754/* end confdefs.h. */
5755
5756 /* For now, do not test the preprocessor; as of 2007 there are too many
5757 implementations with broken preprocessors. Perhaps this can
5758 be revisited in 2012. In the meantime, code should not expect
5759 #if to work with literals wider than 32 bits. */
5760 /* Test literals. */
5761 long long int ll = 9223372036854775807ll;
5762 long long int nll = -9223372036854775807LL;
5763 unsigned long long int ull = 18446744073709551615ULL;
5764 /* Test constant expressions. */
5765 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5766 ? 1 : -1)];
5767 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5768 ? 1 : -1)];
5769 int i = 63;
5770int
5771main ()
5772{
5773/* Test availability of runtime routines for shift and division. */
5774 long long int llmax = 9223372036854775807ll;
5775 unsigned long long int ullmax = 18446744073709551615ull;
5776 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5777 | (llmax / ll) | (llmax % ll)
5778 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5779 | (ullmax / ull) | (ullmax % ull));
5780 ;
5781 return 0;
5782}
5783
5784_ACEOF
5785if ac_fn_c_try_link "$LINENO"; then :
5786 if test "$cross_compiling" = yes; then :
5787 ac_cv_type_long_long_int=yes
5788else
5789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5790/* end confdefs.h. */
5791#include <limits.h>
5792 #ifndef LLONG_MAX
5793 # define HALF \
5794 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5795 # define LLONG_MAX (HALF - 1 + HALF)
5796 #endif
5797int
5798main ()
5799{
5800long long int n = 1;
5801 int i;
5802 for (i = 0; ; i++)
5803 {
5804 long long int m = n << i;
5805 if (m >> i != n)
5806 return 1;
5807 if (LLONG_MAX / 2 < m)
5808 break;
5809 }
5810 return 0;
5811 ;
5812 return 0;
5813}
5814_ACEOF
5815if ac_fn_c_try_run "$LINENO"; then :
5816 ac_cv_type_long_long_int=yes
5817else
5818 ac_cv_type_long_long_int=no
5819fi
5820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5821 conftest.$ac_objext conftest.beam conftest.$ac_ext
5822fi
5823
5824else
5825 ac_cv_type_long_long_int=no
5826fi
5827rm -f core conftest.err conftest.$ac_objext \
5828 conftest$ac_exeext conftest.$ac_ext
5829fi
5830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5831$as_echo "$ac_cv_type_long_long_int" >&6; }
5832 if test $ac_cv_type_long_long_int = yes; then
5833
5834$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
5835
5836 fi
5837
5838
5839
5840 ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
5841if test "x$ac_cv_type_intmax_t" = x""yes; then :
5842
5843$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
5844
5845else
5846 test $ac_cv_type_long_long_int = yes \
5847 && ac_type='long long int' \
5848 || ac_type='long int'
5849
5850cat >>confdefs.h <<_ACEOF
5851#define intmax_t $ac_type
5852_ACEOF
5853
5854fi
5855
5856
5857
5858 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
5859if test "x$ac_cv_type_intptr_t" = x""yes; then :
5860
5861$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
5862
5863else
5864 for ac_type in 'int' 'long int' 'long long int'; do
5865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5866/* end confdefs.h. */
5867$ac_includes_default
5868int
5869main ()
5870{
5871static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
5872test_array [0] = 0
5873
5874 ;
5875 return 0;
5876}
5877_ACEOF
5878if ac_fn_c_try_compile "$LINENO"; then :
5879
5880cat >>confdefs.h <<_ACEOF
5881#define intptr_t $ac_type
5882_ACEOF
5883
5884 ac_type=
5885fi
5886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5887 test -z "$ac_type" && break
5888 done
5889fi
5890
5891
5892ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
5893case $ac_cv_c_uint8_t in #(
5894 no|yes) ;; #(
5895 *)
5896
5897$as_echo "#define _UINT8_T 1" >>confdefs.h
5898
5899
5900cat >>confdefs.h <<_ACEOF
5901#define uint8_t $ac_cv_c_uint8_t
5902_ACEOF
5903;;
5904 esac
5905
5906ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
5907case $ac_cv_c_uint16_t in #(
5908 no|yes) ;; #(
5909 *)
5910
5911
5912cat >>confdefs.h <<_ACEOF
5913#define uint16_t $ac_cv_c_uint16_t
5914_ACEOF
5915;;
5916 esac
5917
5918ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
5919case $ac_cv_c_uint32_t in #(
5920 no|yes) ;; #(
5921 *)
5922
5923$as_echo "#define _UINT32_T 1" >>confdefs.h
5924
5925
5926cat >>confdefs.h <<_ACEOF
5927#define uint32_t $ac_cv_c_uint32_t
5928_ACEOF
5929;;
5930 esac
5931
5932ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
5933case $ac_cv_c_uint64_t in #(
5934 no|yes) ;; #(
5935 *)
5936
5937$as_echo "#define _UINT64_T 1" >>confdefs.h
5938
5939
5940cat >>confdefs.h <<_ACEOF
5941#define uint64_t $ac_cv_c_uint64_t
5942_ACEOF
5943;;
5944 esac
5945
5946
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5948$as_echo_n "checking for unsigned long long int... " >&6; }
5949if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5950 $as_echo_n "(cached) " >&6
5951else
5952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5953/* end confdefs.h. */
5954
5955 /* For now, do not test the preprocessor; as of 2007 there are too many
5956 implementations with broken preprocessors. Perhaps this can
5957 be revisited in 2012. In the meantime, code should not expect
5958 #if to work with literals wider than 32 bits. */
5959 /* Test literals. */
5960 long long int ll = 9223372036854775807ll;
5961 long long int nll = -9223372036854775807LL;
5962 unsigned long long int ull = 18446744073709551615ULL;
5963 /* Test constant expressions. */
5964 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5965 ? 1 : -1)];
5966 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5967 ? 1 : -1)];
5968 int i = 63;
5969int
5970main ()
5971{
5972/* Test availability of runtime routines for shift and division. */
5973 long long int llmax = 9223372036854775807ll;
5974 unsigned long long int ullmax = 18446744073709551615ull;
5975 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5976 | (llmax / ll) | (llmax % ll)
5977 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5978 | (ullmax / ull) | (ullmax % ull));
5979 ;
5980 return 0;
5981}
5982
5983_ACEOF
5984if ac_fn_c_try_link "$LINENO"; then :
5985 ac_cv_type_unsigned_long_long_int=yes
5986else
5987 ac_cv_type_unsigned_long_long_int=no
5988fi
5989rm -f core conftest.err conftest.$ac_objext \
5990 conftest$ac_exeext conftest.$ac_ext
5991fi
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5993$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
5994 if test $ac_cv_type_unsigned_long_long_int = yes; then
5995
5996$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
5997
5998 fi
5999
6000
6001
6002 ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
6003if test "x$ac_cv_type_uintmax_t" = x""yes; then :
6004
6005$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
6006
6007else
6008 test $ac_cv_type_unsigned_long_long_int = yes \
6009 && ac_type='unsigned long long int' \
6010 || ac_type='unsigned long int'
6011
6012cat >>confdefs.h <<_ACEOF
6013#define uintmax_t $ac_type
6014_ACEOF
6015
6016fi
6017
6018
6019
6020 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
6021if test "x$ac_cv_type_uintptr_t" = x""yes; then :
6022
6023$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
6024
6025else
6026 for ac_type in 'unsigned int' 'unsigned long int' \
6027 'unsigned long long int'; do
6028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6029/* end confdefs.h. */
6030$ac_includes_default
6031int
6032main ()
6033{
6034static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6035test_array [0] = 0
6036
6037 ;
6038 return 0;
6039}
6040_ACEOF
6041if ac_fn_c_try_compile "$LINENO"; then :
6042
6043cat >>confdefs.h <<_ACEOF
6044#define uintptr_t $ac_type
6045_ACEOF
6046
6047 ac_type=
6048fi
6049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6050 test -z "$ac_type" && break
6051 done
6052fi
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
00020c16
ILT
6067
6068# ---------------------
6069# Warnings and checking
6070# ---------------------
6071
6072# Check $CC warning features (if it's GCC).
6073# We want to use -pedantic, but we don't want warnings about
6074# * 'long long'
6075# * variadic macros
6076# * overlong strings
6077# So, we only use -pedantic if we can disable those warnings.
6078
6079loose_warn=
6080save_CFLAGS="$CFLAGS"
6081for option in -W -Wall -Wwrite-strings -Wcast-qual; do
5213506e 6082 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6083
5213506e
RW
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6085$as_echo_n "checking whether $CC supports $option... " >&6; }
6086if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6087 $as_echo_n "(cached) " >&6
00020c16
ILT
6088else
6089 CFLAGS="$option"
5213506e 6090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6091/* end confdefs.h. */
00020c16
ILT
6092
6093int
6094main ()
6095{
6096
6097 ;
6098 return 0;
6099}
ba479fd2 6100_ACEOF
5213506e 6101if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6102 eval "$as_acx_Woption=yes"
a207b594 6103else
5213506e 6104 eval "$as_acx_Woption=no"
a207b594 6105fi
5213506e 6106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6107
6108fi
5213506e
RW
6109eval ac_res=\$$as_acx_Woption
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6111$as_echo "$ac_res" >&6; }
6112 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6113 loose_warn="$loose_warn${loose_warn:+ }$option"
6114fi
00020c16
ILT
6115 done
6116CFLAGS="$save_CFLAGS"
6117
6118c_loose_warn=
6119save_CFLAGS="$CFLAGS"
6120for option in -Wstrict-prototypes -Wmissing-prototypes; do
5213506e 6121 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6122
5213506e
RW
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6124$as_echo_n "checking whether $CC supports $option... " >&6; }
6125if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6126 $as_echo_n "(cached) " >&6
00020c16
ILT
6127else
6128 CFLAGS="$option"
5213506e 6129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6130/* end confdefs.h. */
00020c16
ILT
6131
6132int
6133main ()
6134{
6135
6136 ;
6137 return 0;
6138}
ba479fd2 6139_ACEOF
5213506e 6140if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6141 eval "$as_acx_Woption=yes"
14011ca4 6142else
5213506e 6143 eval "$as_acx_Woption=no"
cafe096b 6144fi
5213506e 6145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 6146
56694dd9 6147fi
5213506e
RW
6148eval ac_res=\$$as_acx_Woption
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6150$as_echo "$ac_res" >&6; }
6151 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16 6152 c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option"
56694dd9 6153fi
00020c16
ILT
6154 done
6155CFLAGS="$save_CFLAGS"
6156
6157strict_warn=
6158save_CFLAGS="$CFLAGS"
6159for option in -Wmissing-format-attribute; do
5213506e 6160 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6161
5213506e
RW
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6163$as_echo_n "checking whether $CC supports $option... " >&6; }
6164if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6165 $as_echo_n "(cached) " >&6
414d23ae 6166else
00020c16 6167 CFLAGS="$option"
5213506e 6168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6169/* end confdefs.h. */
6170
6171int
6172main ()
6173{
6174
6175 ;
6176 return 0;
6177}
6178_ACEOF
5213506e 6179if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6180 eval "$as_acx_Woption=yes"
414d23ae 6181else
5213506e 6182 eval "$as_acx_Woption=no"
414d23ae 6183fi
5213506e 6184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6185
00020c16 6186fi
5213506e
RW
6187eval ac_res=\$$as_acx_Woption
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6189$as_echo "$ac_res" >&6; }
6190 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6191 strict_warn="$strict_warn${strict_warn:+ }$option"
6192fi
00020c16
ILT
6193 done
6194CFLAGS="$save_CFLAGS"
75e93faa 6195
00020c16
ILT
6196c_strict_warn=
6197save_CFLAGS="$CFLAGS"
6198for option in -Wold-style-definition -Wc++-compat; do
5213506e 6199 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
ba479fd2 6200
5213506e
RW
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6202$as_echo_n "checking whether $CC supports $option... " >&6; }
6203if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6204 $as_echo_n "(cached) " >&6
00020c16
ILT
6205else
6206 CFLAGS="$option"
5213506e 6207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6208/* end confdefs.h. */
a207b594 6209
00020c16
ILT
6210int
6211main ()
6212{
ba479fd2 6213
00020c16
ILT
6214 ;
6215 return 0;
6216}
ba479fd2 6217_ACEOF
5213506e 6218if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
6219 eval "$as_acx_Woption=yes"
6220else
5213506e 6221 eval "$as_acx_Woption=no"
414d23ae 6222fi
5213506e 6223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa 6224
00020c16 6225fi
5213506e
RW
6226eval ac_res=\$$as_acx_Woption
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6228$as_echo "$ac_res" >&6; }
6229 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6230 c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option"
6231fi
00020c16
ILT
6232 done
6233CFLAGS="$save_CFLAGS"
75e93faa 6234
5213506e
RW
6235if test "$GCC" = yes; then :
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
6237$as_echo_n "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... " >&6; }
6238if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then :
6239 $as_echo_n "(cached) " >&6
75e93faa 6240else
00020c16
ILT
6241 save_CFLAGS="$CFLAGS"
6242CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
5213506e 6243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6244/* end confdefs.h. */
2f41c1d6 6245
00020c16
ILT
6246int
6247main ()
6248{
b61ff9c8 6249
00020c16
ILT
6250 ;
6251 return 0;
6252}
6253_ACEOF
5213506e 6254if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6255 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes
439a7e54 6256else
5213506e 6257 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no
00020c16 6258fi
5213506e 6259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6260CFLAGS="$save_CFLAGS"
6261fi
5213506e
RW
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5
6263$as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6; }
6264if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then :
00020c16
ILT
6265 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
6266fi
ba479fd2 6267
439a7e54
DN
6268fi
6269
5213506e
RW
6270# Check whether --enable-werror-always was given.
6271if test "${enable_werror_always+set}" = set; then :
6272 enableval=$enable_werror_always;
34a86c2b 6273else
00020c16 6274 enable_werror_always=no
00020c16 6275fi
cafe096b 6276
5213506e
RW
6277if test $enable_werror_always = yes; then :
6278 strict_warn="$strict_warn${strict_warn:+ }-Werror"
6279fi
b61ff9c8 6280
75e93faa 6281
34a86c2b 6282
00020c16
ILT
6283# The above macros do nothing if the compiler is not GCC. However, the
6284# Makefile has more goo to add other flags, so these variables are used
6285# to enable warnings only for GCC.
6286warn_cflags=
6287warn_cxxflags=
6288if test "x$GCC" = "xyes"; then
6289 warn_cflags='$(GCC_WARN_CFLAGS)'
6290 warn_cxxflags='$(GCC_WARN_CXXFLAGS)'
6291fi
75e93faa
ZW
6292
6293
b61ff9c8 6294
00020c16
ILT
6295# Enable expensive internal checks
6296is_release=
6297if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6298 is_release=yes
6299fi
79b87c74 6300
5213506e
RW
6301# Check whether --enable-checking was given.
6302if test "${enable_checking+set}" = set; then :
6303 enableval=$enable_checking; ac_checking_flags="${enableval}"
79b87c74
MM
6304else
6305
00020c16
ILT
6306# Determine the default checks.
6307if test x$is_release = x ; then
6308 ac_checking_flags=yes
6309else
6310 ac_checking_flags=release
6311fi
5213506e
RW
6312fi
6313
00020c16
ILT
6314IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6315for check in release $ac_checking_flags
6316do
6317 case $check in
6318 # these set all the flags to specific states
6319 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
6320 ac_fold_checking= ; ac_gc_checking=1 ;
6321 ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
6322 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6323 ac_tree_checking=1 ; ac_valgrind_checking= ;
6324 ac_types_checking=1 ;;
6325 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
6326 ac_fold_checking= ; ac_gc_checking= ;
6327 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6328 ac_rtlflag_checking= ; ac_runtime_checking= ;
6329 ac_tree_checking= ; ac_valgrind_checking= ;
6330 ac_types_checking= ;;
6331 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
6332 ac_fold_checking=1 ; ac_gc_checking=1 ;
6333 ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
6334 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6335 ac_tree_checking=1 ; ac_valgrind_checking= ;
6336 ac_types_checking=1 ;;
6337 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
6338 ac_fold_checking= ; ac_gc_checking= ;
6339 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6340 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6341 ac_tree_checking= ; ac_valgrind_checking= ;
6342 ac_types_checking= ;;
6343 # these enable particular checks
6344 assert) ac_assert_checking=1 ;;
6345 df) ac_df_checking=1 ;;
6346 fold) ac_fold_checking=1 ;;
6347 gc) ac_gc_checking=1 ;;
6348 gcac) ac_gc_always_collect=1 ;;
6349 gimple) ac_gimple_checking=1 ;;
6350 misc) ac_checking=1 ;;
6351 rtl) ac_rtl_checking=1 ;;
6352 rtlflag) ac_rtlflag_checking=1 ;;
6353 runtime) ac_runtime_checking=1 ;;
6354 tree) ac_tree_checking=1 ;;
6355 types) ac_types_checking=1 ;;
6356 valgrind) ac_valgrind_checking=1 ;;
5213506e 6357 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
00020c16
ILT
6358 esac
6359done
6360IFS="$ac_save_IFS"
486aa804 6361
00020c16
ILT
6362nocommon_flag=""
6363if test x$ac_checking != x ; then
79b87c74 6364
5213506e 6365$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
79b87c74 6366
00020c16
ILT
6367 nocommon_flag=-fno-common
6368fi
79b87c74 6369
00020c16 6370if test x$ac_df_checking != x ; then
486aa804 6371
5213506e 6372$as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h
486aa804 6373
00020c16
ILT
6374fi
6375if test x$ac_assert_checking != x ; then
486aa804 6376
5213506e 6377$as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h
486aa804 6378
00020c16
ILT
6379fi
6380if test x$ac_gimple_checking != x ; then
486aa804 6381
5213506e 6382$as_echo "#define ENABLE_GIMPLE_CHECKING 1" >>confdefs.h
b61ff9c8 6383
00020c16 6384fi
ab22c1fa 6385
00020c16 6386if test x$ac_runtime_checking != x ; then
ab22c1fa 6387
5213506e 6388$as_echo "#define ENABLE_RUNTIME_CHECKING 1" >>confdefs.h
ab22c1fa 6389
00020c16
ILT
6390fi
6391if test x$ac_tree_checking != x ; then
ab22c1fa 6392
5213506e 6393$as_echo "#define ENABLE_TREE_CHECKING 1" >>confdefs.h
ab22c1fa 6394
00020c16
ILT
6395 TREEBROWSER=tree-browser.o
6396fi
6397if test x$ac_types_checking != x ; then
ab22c1fa 6398
5213506e 6399$as_echo "#define ENABLE_TYPES_CHECKING 1" >>confdefs.h
ab22c1fa 6400
00020c16 6401fi
ab22c1fa 6402
00020c16 6403if test x$ac_rtl_checking != x ; then
2f41c1d6 6404
5213506e
RW
6405$as_echo "#define ENABLE_RTL_CHECKING 1" >>confdefs.h
6406
00020c16 6407fi
5213506e
RW
6408if test x$ac_rtlflag_checking != x ; then
6409
6410$as_echo "#define ENABLE_RTL_FLAG_CHECKING 1" >>confdefs.h
4977bab6 6411
00020c16 6412fi
5213506e
RW
6413if test x$ac_gc_checking != x ; then
6414
6415$as_echo "#define ENABLE_GC_CHECKING 1" >>confdefs.h
6416
6417fi
6418if test x$ac_gc_always_collect != x ; then
6419
6420$as_echo "#define ENABLE_GC_ALWAYS_COLLECT 1" >>confdefs.h
4977bab6 6421
00020c16 6422fi
5213506e
RW
6423if test x$ac_fold_checking != x ; then
6424
6425$as_echo "#define ENABLE_FOLD_CHECKING 1" >>confdefs.h
2f41c1d6 6426
00020c16 6427fi
5213506e
RW
6428valgrind_path_defines=
6429valgrind_command=
6430
6431ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
6432if test "x$ac_cv_header_valgrind_h" = x""yes; then :
00020c16 6433 have_valgrind_h=yes
2f41c1d6 6434else
00020c16
ILT
6435 have_valgrind_h=no
6436fi
2f41c1d6 6437
1a4b763e 6438
2f41c1d6 6439
00020c16
ILT
6440if test x$ac_valgrind_checking != x ; then
6441 # It is certainly possible that there's valgrind but no valgrind.h.
6442 # GCC relies on making annotations so we must have both.
5213506e
RW
6443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6444$as_echo_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... " >&6; }
6445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6446/* end confdefs.h. */
6447#include <valgrind/memcheck.h>
6448#ifndef VALGRIND_DISCARD
6449#error VALGRIND_DISCARD not defined
6450#endif
6451_ACEOF
5213506e 6452if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6453 gcc_cv_header_valgrind_memcheck_h=yes
aca600aa 6454else
00020c16
ILT
6455 gcc_cv_header_valgrind_memcheck_h=no
6456fi
6457rm -f conftest.err conftest.$ac_ext
5213506e
RW
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6459$as_echo "$gcc_cv_header_valgrind_memcheck_h" >&6; }
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6461$as_echo_n "checking for VALGRIND_DISCARD in <memcheck.h>... " >&6; }
6462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6463/* end confdefs.h. */
6464#include <memcheck.h>
6465#ifndef VALGRIND_DISCARD
6466#error VALGRIND_DISCARD not defined
6467#endif
6468_ACEOF
5213506e 6469if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6470 gcc_cv_header_memcheck_h=yes
e9a25f70 6471else
00020c16
ILT
6472 gcc_cv_header_memcheck_h=no
6473fi
6474rm -f conftest.err conftest.$ac_ext
5213506e
RW
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_memcheck_h" >&5
6476$as_echo "$gcc_cv_header_memcheck_h" >&6; }
00020c16
ILT
6477
6478# Prepare PATH_SEPARATOR.
6479# The user is always right.
6480if test "${PATH_SEPARATOR+set}" != set; then
6481 echo "#! /bin/sh" >conf$$.sh
6482 echo "exit 0" >>conf$$.sh
6483 chmod +x conf$$.sh
6484 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6485 PATH_SEPARATOR=';'
6486 else
6487 PATH_SEPARATOR=:
6488 fi
6489 rm -f conf$$.sh
e9a25f70
JL
6490fi
6491
00020c16
ILT
6492# Find out how to test for executable files. Don't use a zero-byte file,
6493# as systems may use methods other than mode bits to determine executability.
6494cat >conf$$.file <<_ASEOF
6495#! /bin/sh
6496exit 0
6497_ASEOF
6498chmod +x conf$$.file
6499if test -x conf$$.file >/dev/null 2>&1; then
6500 ac_executable_p="test -x"
6501else
6502 ac_executable_p="test -f"
6503fi
6504rm -f conf$$.file
e9a25f70 6505
00020c16
ILT
6506# Extract the first word of "valgrind", so it can be a program name with args.
6507set dummy valgrind; ac_word=$2
5213506e
RW
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6509$as_echo_n "checking for $ac_word... " >&6; }
6510if test "${ac_cv_path_valgrind_path+set}" = set; then :
6511 $as_echo_n "(cached) " >&6
861bb6c1 6512else
00020c16
ILT
6513 case "$valgrind_path" in
6514 [\\/]* | ?:[\\/]*)
6515 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6516 ;;
6517 *)
6518 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6519 for ac_dir in $PATH; do
6520 IFS="$ac_save_IFS"
6521 test -z "$ac_dir" && ac_dir=.
6522 for ac_exec_ext in '' $ac_executable_extensions; do
6523 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6524 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6525 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6526 break 2
6527 fi
6528 fi
6529 done
6530 done
6531 IFS="$ac_save_IFS"
6532 ;;
6533esac
861bb6c1 6534fi
00020c16
ILT
6535valgrind_path="$ac_cv_path_valgrind_path"
6536if test -n "$valgrind_path"; then
5213506e
RW
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $valgrind_path" >&5
6538$as_echo "$valgrind_path" >&6; }
861bb6c1 6539else
5213506e
RW
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; }
861bb6c1
JL
6542fi
6543
00020c16
ILT
6544 if test "x$valgrind_path" = "x" \
6545 || (test $have_valgrind_h = no \
6546 && test $gcc_cv_header_memcheck_h = no \
6547 && test $gcc_cv_header_valgrind_memcheck_h = no); then
5213506e 6548 as_fn_error "*** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5
00020c16
ILT
6549 fi
6550 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6551 valgrind_command="$valgrind_path -q"
861bb6c1 6552
5213506e 6553$as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h
00020c16
ILT
6554
6555 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
6556
5213506e 6557$as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h
2c4902b9 6558
0a4b6309 6559 fi
00020c16
ILT
6560 if test $gcc_cv_header_memcheck_h = yes; then
6561
5213506e 6562$as_echo "#define HAVE_MEMCHECK_H 1" >>confdefs.h
0a4b6309 6563
0a4b6309
RL
6564 fi
6565fi
6566
18fc9bd4 6567
18fc9bd4 6568
00020c16 6569# Enable code coverage collection
5213506e
RW
6570# Check whether --enable-coverage was given.
6571if test "${enable_coverage+set}" = set; then :
6572 enableval=$enable_coverage; case "${enableval}" in
00020c16
ILT
6573 yes|noopt)
6574 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6575 ;;
6576 opt)
6577 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6578 ;;
6579 no)
6580 # a.k.a. --disable-coverage
6581 coverage_flags=""
6582 ;;
6583 *)
5213506e 6584 as_fn_error "unknown coverage setting $enableval" "$LINENO" 5
00020c16
ILT
6585 ;;
6586esac
861bb6c1 6587else
00020c16 6588 coverage_flags=""
5213506e 6589fi
00020c16
ILT
6590
6591
ba479fd2 6592
5213506e
RW
6593# Check whether --enable-gather-detailed-mem-stats was given.
6594if test "${enable_gather_detailed_mem_stats+set}" = set; then :
6595 enableval=$enable_gather_detailed_mem_stats;
ba479fd2 6596else
00020c16 6597 enable_gather_detailed_mem_stats=no
5213506e
RW
6598fi
6599
00020c16
ILT
6600if test x$enable_gather_detailed_mem_stats = xyes ; then
6601
5213506e 6602$as_echo "#define GATHER_STATISTICS 1" >>confdefs.h
ba479fd2
NN
6603
6604fi
00020c16
ILT
6605
6606# -------------------------------
6607# Miscenalleous configure options
6608# -------------------------------
6609
6610# See if we are building gcc with C++.
5213506e
RW
6611# Check whether --enable-build-with-cxx was given.
6612if test "${enable_build_with_cxx+set}" = set; then :
6613 enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval
ba479fd2 6614else
00020c16 6615 ENABLE_BUILD_WITH_CXX=no
5213506e
RW
6616fi
6617
ba479fd2 6618
00020c16
ILT
6619
6620# With stabs
6621
5213506e
RW
6622# Check whether --with-stabs was given.
6623if test "${with_stabs+set}" = set; then :
6624 withval=$with_stabs; stabs="$with_stabs"
6e3f3080 6625else
00020c16 6626 stabs=no
5213506e 6627fi
00020c16 6628
ba479fd2 6629
5213506e
RW
6630# Determine whether or not multilibs are enabled.
6631# Check whether --enable-multilib was given.
6632if test "${enable_multilib+set}" = set; then :
6633 enableval=$enable_multilib;
ba479fd2 6634else
00020c16 6635 enable_multilib=yes
5213506e
RW
6636fi
6637
861bb6c1 6638
343a6100 6639
00020c16 6640# Enable __cxa_atexit for C++.
5213506e
RW
6641# Check whether --enable-__cxa_atexit was given.
6642if test "${enable___cxa_atexit+set}" = set; then :
6643 enableval=$enable___cxa_atexit;
6644fi
00020c16 6645
00020c16
ILT
6646
6647# Enable C extension for decimal float if target supports it.
5213506e
RW
6648# Check whether --enable-decimal-float was given.
6649if test "${enable_decimal_float+set}" = set; then :
6650 enableval=$enable_decimal_float;
00020c16
ILT
6651 case $enable_decimal_float in
6652 yes | no | bid | dpd) ;;
5213506e
RW
6653 *) as_fn_error "'$enable_decimal_float' is an invalid value for --enable-decimal-float.
6654Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;;
00020c16 6655 esac
343a6100 6656
0a4b6309 6657else
00020c16
ILT
6658
6659 case $target in
6660 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
6661 enable_decimal_float=yes
0a4b6309 6662 ;;
00020c16 6663 *)
5213506e
RW
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5
6665$as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
00020c16
ILT
6666 enable_decimal_float=no
6667 ;;
6668 esac
6669
5213506e
RW
6670fi
6671
00020c16
ILT
6672
6673dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
6674
6675cat >>confdefs.h <<_ACEOF
6676#define ENABLE_DECIMAL_FLOAT $dfp
6677_ACEOF
6678
6679
6680# x86's use BID format instead of DPD
6681case x$enable_decimal_float in
6682 xyes)
6683 case $target in
6684 i?86*-*-linux* | x86_64*-*-linux*)
6685 enable_decimal_float=bid
6686 ;;
6687 *)
6688 enable_decimal_float=dpd
6689 ;;
0a4b6309 6690 esac
00020c16
ILT
6691 ;;
6692 xno)
6693 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
6694 # dependency on libdecnumber.
6695 enable_decimal_float=dpd
6696 ;;
6697esac
0a4b6309 6698
0a4b6309 6699
00020c16 6700bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
0a4b6309 6701
00020c16
ILT
6702cat >>confdefs.h <<_ACEOF
6703#define ENABLE_DECIMAL_BID_FORMAT $bid
6704_ACEOF
6705
6706
6707# Enable C extension for fixed-point arithmetic.
5213506e
RW
6708# Check whether --enable-fixed-point was given.
6709if test "${enable_fixed_point+set}" = set; then :
6710 enableval=$enable_fixed_point;
861bb6c1 6711
3a000df0 6712else
3a000df0 6713
00020c16
ILT
6714 case $target in
6715 mips*-*-*)
6716 case $host in
6717 mips*-sgi-irix*)
5213506e
RW
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported on IRIX" >&5
6719$as_echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;}
00020c16
ILT
6720 enable_fixed_point=no
6721 ;;
6722 *)
6723 enable_fixed_point=yes
6724 ;;
6725 esac
6726 ;;
6727 *)
5213506e
RW
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported for this target" >&5
6729$as_echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
00020c16
ILT
6730 enable_fixed_point=no
6731 ;;
6732 esac
3a000df0 6733
5213506e
RW
6734fi
6735
3a000df0
KC
6736
6737
00020c16 6738fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
ba479fd2 6739
00020c16
ILT
6740cat >>confdefs.h <<_ACEOF
6741#define ENABLE_FIXED_POINT $fixedpoint
6742_ACEOF
73458fb7
NN
6743
6744
00020c16
ILT
6745# Enable threads
6746# Pass with no value to take the default
6747# Pass with a value to specify a thread package
5213506e
RW
6748# Check whether --enable-threads was given.
6749if test "${enable_threads+set}" = set; then :
6750 enableval=$enable_threads;
73458fb7 6751else
00020c16 6752 enable_threads=''
5213506e 6753fi
00020c16 6754
00020c16 6755
5213506e
RW
6756# Check whether --enable-tls was given.
6757if test "${enable_tls+set}" = set; then :
6758 enableval=$enable_tls;
00020c16
ILT
6759 case $enable_tls in
6760 yes | no) ;;
5213506e
RW
6761 *) as_fn_error "'$enable_tls' is an invalid value for --enable-tls.
6762Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
00020c16
ILT
6763 esac
6764
73458fb7 6765else
00020c16 6766 enable_tls=''
5213506e 6767fi
ba479fd2 6768
5213506e
RW
6769
6770# Check whether --enable-objc-gc was given.
6771if test "${enable_objc_gc+set}" = set; then :
6772 enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
00020c16 6773 objc_boehm_gc=''
73458fb7 6774else
00020c16 6775 objc_boehm_gc=1
73458fb7 6776fi
00020c16
ILT
6777else
6778 objc_boehm_gc=''
5213506e
RW
6779fi
6780
73458fb7 6781
00020c16 6782
5213506e
RW
6783# Check whether --with-dwarf2 was given.
6784if test "${with_dwarf2+set}" = set; then :
6785 withval=$with_dwarf2; dwarf2="$with_dwarf2"
73458fb7 6786else
00020c16 6787 dwarf2=no
5213506e 6788fi
3bbd5a19 6789
73458fb7 6790
5213506e
RW
6791# Check whether --enable-shared was given.
6792if test "${enable_shared+set}" = set; then :
6793 enableval=$enable_shared;
00020c16
ILT
6794 case $enable_shared in
6795 yes | no) ;;
6796 *)
6797 enable_shared=no
6798 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6799 for pkg in $enableval; do
6800 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6801 enable_shared=yes
6802 fi
6803 done
6804 IFS="$ac_save_ifs"
6805 ;;
6806 esac
73458fb7 6807
73458fb7 6808else
00020c16 6809 enable_shared=yes
5213506e 6810fi
73458fb7 6811
7c27e184 6812
00020c16 6813
00020c16 6814
5213506e
RW
6815# Check whether --with-build-sysroot was given.
6816if test "${with_build_sysroot+set}" = set; then :
6817 withval=$with_build_sysroot;
6818fi
00020c16
ILT
6819
6820
00020c16 6821
5213506e
RW
6822# Check whether --with-sysroot was given.
6823if test "${with_sysroot+set}" = set; then :
6824 withval=$with_sysroot;
00020c16
ILT
6825 case ${with_sysroot} in
6826 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
6827 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6828 esac
6829
6830 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6831 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
6832
6833 if test "x$prefix" = xNONE; then
6834 test_prefix=/usr/local
6835 else
6836 test_prefix=$prefix
6837 fi
6838 if test "x$exec_prefix" = xNONE; then
6839 test_exec_prefix=$test_prefix
6840 else
6841 test_exec_prefix=$exec_prefix
6842 fi
6843 case ${TARGET_SYSTEM_ROOT} in
6844 "${test_prefix}"|"${test_prefix}/"*|\
6845 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
6846 '${prefix}'|'${prefix}/'*|\
6847 '${exec_prefix}'|'${exec_prefix}/'*)
6848 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6849 TARGET_SYSTEM_ROOT_DEFINE="$t"
6850 ;;
6851 esac
6852
6853else
6854
6855 TARGET_SYSTEM_ROOT=
6856 TARGET_SYSTEM_ROOT_DEFINE=
6857 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6858
5213506e
RW
6859fi
6860
00020c16
ILT
6861
6862
6863
6864
e11ddaf5
NS
6865
6866# Check whether --with-specs was given.
6867if test "${with_specs+set}" = set; then :
6868 withval=$with_specs; CONFIGURE_SPECS=$withval
6869else
6870 CONFIGURE_SPECS=
6871
6872fi
6873
6874
6875
00020c16 6876# Build with intermodule optimisations
5213506e
RW
6877# Check whether --enable-intermodule was given.
6878if test "${enable_intermodule+set}" = set; then :
6879 enableval=$enable_intermodule; case ${enable_intermodule} in
00020c16
ILT
6880 yes) onestep="-onestep";;
6881 *) onestep="";;
6882esac
6883else
6884 onestep=""
5213506e
RW
6885fi
6886
00020c16
ILT
6887
6888
6889
6890
5213506e
RW
6891# Check whether --with-pkgversion was given.
6892if test "${with_pkgversion+set}" = set; then :
6893 withval=$with_pkgversion; case "$withval" in
6894 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
00020c16
ILT
6895 no) PKGVERSION= ;;
6896 *) PKGVERSION="($withval) " ;;
6897 esac
6898else
6899 PKGVERSION="(GCC) "
6900
5213506e 6901fi
00020c16
ILT
6902
6903
6904
6905
5213506e
RW
6906
6907# Check whether --with-bugurl was given.
6908if test "${with_bugurl+set}" = set; then :
6909 withval=$with_bugurl; case "$withval" in
6910 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
00020c16
ILT
6911 no) BUGURL=
6912 ;;
6913 *) BUGURL="$withval"
6914 ;;
6915 esac
6916else
6917 BUGURL="http://gcc.gnu.org/bugs.html"
6918
5213506e
RW
6919fi
6920
00020c16
ILT
6921 case ${BUGURL} in
6922 "")
6923 REPORT_BUGS_TO=
6924 REPORT_BUGS_TEXI=
6925 ;;
6926 *)
6927 REPORT_BUGS_TO="<$BUGURL>"
6928 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6929 ;;
6930 esac;
6931
6932
6933
6934
6935# Sanity check enable_languages in case someone does not run the toplevel
6936# configure # script.
5213506e
RW
6937# Check whether --enable-languages was given.
6938if test "${enable_languages+set}" = set; then :
6939 enableval=$enable_languages; case ,${enable_languages}, in
00020c16
ILT
6940 ,,|,yes,)
6941 # go safe -- we cannot be much sure without the toplevel
6942 # configure's
6943 # analysis of which target libs are present and usable
6944 enable_languages=c
6945 ;;
6946 *,all,*)
5213506e 6947 as_fn_error "only the toplevel supports --enable-languages=all" "$LINENO" 5
00020c16
ILT
6948 ;;
6949 *,c,*)
6950 ;;
6951 *)
6952 enable_languages=c,${enable_languages}
6953 ;;
6954esac
6955else
6956 enable_languages=c
5213506e
RW
6957fi
6958
00020c16 6959
00020c16 6960
5213506e
RW
6961# Check whether --with-multilib-list was given.
6962if test "${with_multilib_list+set}" = set; then :
6963 withval=$with_multilib_list; :
00020c16
ILT
6964else
6965 with_multilib_list=default
5213506e
RW
6966fi
6967
00020c16
ILT
6968
6969# -------------------------
6970# Checks for other programs
6971# -------------------------
6972
5213506e
RW
6973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6974$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6975set x ${MAKE-make}
6976ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6977if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
6978 $as_echo_n "(cached) " >&6
00020c16
ILT
6979else
6980 cat >conftest.make <<\_ACEOF
5213506e 6981SHELL = /bin/sh
00020c16 6982all:
5213506e 6983 @echo '@@@%%%=$(MAKE)=@@@%%%'
00020c16
ILT
6984_ACEOF
6985# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5213506e
RW
6986case `${MAKE-make} -f conftest.make 2>/dev/null` in
6987 *@@@%%%=?*=@@@%%%*)
6988 eval ac_cv_prog_make_${ac_make}_set=yes;;
6989 *)
6990 eval ac_cv_prog_make_${ac_make}_set=no;;
6991esac
00020c16
ILT
6992rm -f conftest.make
6993fi
5213506e
RW
6994if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6996$as_echo "yes" >&6; }
00020c16 6997 SET_MAKE=
73458fb7 6998else
5213506e
RW
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7000$as_echo "no" >&6; }
00020c16 7001 SET_MAKE="MAKE=${MAKE-make}"
73458fb7
NN
7002fi
7003
7c27e184 7004
00020c16
ILT
7005# Find some useful tools
7006for ac_prog in gawk mawk nawk awk
7c27e184
PB
7007do
7008 # Extract the first word of "$ac_prog", so it can be a program name with args.
7009set dummy $ac_prog; ac_word=$2
5213506e
RW
7010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7011$as_echo_n "checking for $ac_word... " >&6; }
7012if test "${ac_cv_prog_AWK+set}" = set; then :
7013 $as_echo_n "(cached) " >&6
73458fb7 7014else
00020c16
ILT
7015 if test -n "$AWK"; then
7016 ac_cv_prog_AWK="$AWK" # Let the user override the test.
73458fb7 7017else
ba479fd2
NN
7018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7019for as_dir in $PATH
7020do
7021 IFS=$as_save_IFS
7022 test -z "$as_dir" && as_dir=.
5213506e
RW
7023 for ac_exec_ext in '' $ac_executable_extensions; do
7024 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7025 ac_cv_prog_AWK="$ac_prog"
5213506e 7026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7027 break 2
7028 fi
7029done
5213506e
RW
7030 done
7031IFS=$as_save_IFS
ba479fd2 7032
73458fb7
NN
7033fi
7034fi
00020c16
ILT
7035AWK=$ac_cv_prog_AWK
7036if test -n "$AWK"; then
5213506e
RW
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7038$as_echo "$AWK" >&6; }
73458fb7 7039else
5213506e
RW
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7041$as_echo "no" >&6; }
73458fb7
NN
7042fi
7043
5213506e 7044
00020c16 7045 test -n "$AWK" && break
7c27e184 7046done
7c27e184 7047
00020c16
ILT
7048# We need awk to create options.c and options.h.
7049# Bail out if it's missing.
7050case ${AWK} in
5213506e 7051 "") as_fn_error "can't build without awk, bailing out" "$LINENO" 5 ;;
00020c16 7052esac
73458fb7 7053
5213506e
RW
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7055$as_echo_n "checking whether ln -s works... " >&6; }
7056if test "${gcc_cv_prog_LN_S+set}" = set; then :
7057 $as_echo_n "(cached) " >&6
00020c16
ILT
7058else
7059 rm -f conftestdata_t
7060echo >conftestdata_f
7061if ln -s conftestdata_f conftestdata_t 2>/dev/null
7062then
7063 gcc_cv_prog_LN_S="ln -s"
7064else
7065 if ln conftestdata_f conftestdata_t 2>/dev/null
7066 then
7067 gcc_cv_prog_LN_S=ln
7068 else
7069 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7070 then
7071 gcc_cv_prog_LN_S="cp -p"
7072 else
7073 gcc_cv_prog_LN_S=cp
7074 fi
7075 fi
7076fi
7077rm -f conftestdata_f conftestdata_t
7078
7079fi
7080LN_S="$gcc_cv_prog_LN_S"
7081if test "$gcc_cv_prog_LN_S" = "ln -s"; then
5213506e
RW
7082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7083$as_echo "yes" >&6; }
00020c16
ILT
7084else
7085 if test "$gcc_cv_prog_LN_S" = "ln"; then
5213506e
RW
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using ln" >&5
7087$as_echo "no, using ln" >&6; }
00020c16 7088 else
5213506e
RW
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7090$as_echo "no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; }
00020c16
ILT
7091 fi
7092fi
7093
5213506e
RW
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5
7095$as_echo_n "checking whether ln works... " >&6; }
7096if test "${acx_cv_prog_LN+set}" = set; then :
7097 $as_echo_n "(cached) " >&6
00020c16
ILT
7098else
7099 rm -f conftestdata_t
7100echo >conftestdata_f
7101if ln conftestdata_f conftestdata_t 2>/dev/null
7102then
7103 acx_cv_prog_LN=ln
7104else
7105 acx_cv_prog_LN=no
7106fi
7107rm -f conftestdata_f conftestdata_t
7108
7109fi
7110if test $acx_cv_prog_LN = no; then
7111 LN="$LN_S"
5213506e
RW
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN" >&5
7113$as_echo "no, using $LN" >&6; }
00020c16
ILT
7114else
7115 LN="$acx_cv_prog_LN"
5213506e
RW
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7117$as_echo "yes" >&6; }
00020c16
ILT
7118fi
7119
7120if test -n "$ac_tool_prefix"; then
7121 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7122set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
7123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7124$as_echo_n "checking for $ac_word... " >&6; }
7125if test "${ac_cv_prog_RANLIB+set}" = set; then :
7126 $as_echo_n "(cached) " >&6
73458fb7 7127else
00020c16
ILT
7128 if test -n "$RANLIB"; then
7129 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
73458fb7 7130else
ba479fd2
NN
7131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132for as_dir in $PATH
7133do
7134 IFS=$as_save_IFS
7135 test -z "$as_dir" && as_dir=.
5213506e
RW
7136 for ac_exec_ext in '' $ac_executable_extensions; do
7137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7138 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 7139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7140 break 2
7141 fi
7142done
5213506e
RW
7143 done
7144IFS=$as_save_IFS
ba479fd2 7145
73458fb7
NN
7146fi
7147fi
00020c16
ILT
7148RANLIB=$ac_cv_prog_RANLIB
7149if test -n "$RANLIB"; then
5213506e
RW
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7151$as_echo "$RANLIB" >&6; }
73458fb7 7152else
5213506e
RW
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154$as_echo "no" >&6; }
73458fb7
NN
7155fi
7156
5213506e 7157
00020c16
ILT
7158fi
7159if test -z "$ac_cv_prog_RANLIB"; then
7160 ac_ct_RANLIB=$RANLIB
7161 # Extract the first word of "ranlib", so it can be a program name with args.
7162set dummy ranlib; ac_word=$2
5213506e
RW
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7164$as_echo_n "checking for $ac_word... " >&6; }
7165if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7166 $as_echo_n "(cached) " >&6
f6a874ac 7167else
00020c16
ILT
7168 if test -n "$ac_ct_RANLIB"; then
7169 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
f6a874ac
JW
7170else
7171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172for as_dir in $PATH
7173do
7174 IFS=$as_save_IFS
7175 test -z "$as_dir" && as_dir=.
5213506e
RW
7176 for ac_exec_ext in '' $ac_executable_extensions; do
7177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7178 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 7179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7180 break 2
7181 fi
7182done
5213506e
RW
7183 done
7184IFS=$as_save_IFS
f6a874ac 7185
f6a874ac
JW
7186fi
7187fi
00020c16
ILT
7188ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7189if test -n "$ac_ct_RANLIB"; then
5213506e
RW
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7191$as_echo "$ac_ct_RANLIB" >&6; }
f6a874ac 7192else
5213506e
RW
7193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194$as_echo "no" >&6; }
f6a874ac
JW
7195fi
7196
5213506e
RW
7197 if test "x$ac_ct_RANLIB" = x; then
7198 RANLIB=":"
7199 else
7200 case $cross_compiling:$ac_tool_warned in
7201yes:)
7202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7204ac_tool_warned=yes ;;
7205esac
7206 RANLIB=$ac_ct_RANLIB
7207 fi
00020c16
ILT
7208else
7209 RANLIB="$ac_cv_prog_RANLIB"
f6a874ac
JW
7210fi
7211
00020c16
ILT
7212case "${host}" in
7213*-*-darwin*)
7214 # By default, the Darwin ranlib will not treat common symbols as
7215 # definitions when building the archive table of contents. Other
7216 # ranlibs do that; pass an option to the Darwin ranlib that makes
7217 # it behave similarly.
7218 ranlib_flags="-c"
7219 ;;
7220*)
7221 ranlib_flags=""
7222esac
7223
7224
7225# Find a good install program. We prefer a C program (faster),
7226# so one script is as good as another. But avoid the broken or
7227# incompatible versions:
7228# SysV /etc/install, /usr/sbin/install
7229# SunOS /usr/etc/install
7230# IRIX /sbin/install
7231# AIX /bin/install
7232# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7233# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7234# ./install, which can be erroneously created by make from ./install.sh.
5213506e
RW
7235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD compatible install" >&5
7236$as_echo_n "checking for a BSD compatible install... " >&6; }
00020c16 7237if test -z "$INSTALL"; then
5213506e
RW
7238if test "${ac_cv_path_install+set}" = set; then :
7239 $as_echo_n "(cached) " >&6
f6a874ac 7240else
00020c16
ILT
7241 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7242 for ac_dir in $PATH; do
7243 # Account for people who put trailing slashes in PATH elements.
7244 case "$ac_dir/" in
7245 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7246 *)
7247 # OSF1 and SCO ODT 3.0 have their own names for install.
7248 for ac_prog in ginstall scoinst install; do
7249 if test -f $ac_dir/$ac_prog; then
7250 if test $ac_prog = install &&
7251 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7252 # AIX install. It has an incompatible calling convention.
7253 # OSF/1 installbsd also uses dspmsg, but is usable.
7254 :
7255 else
7256 ac_cv_path_install="$ac_dir/$ac_prog -c"
7257 break 2
7258 fi
7259 fi
7260 done
7261 ;;
7262 esac
7263 done
7264 IFS="$ac_save_IFS"
7265
7266fi
7267 if test "${ac_cv_path_install+set}" = set; then
7268 INSTALL="$ac_cv_path_install"
7269 else
7270 # As a last resort, use the slow shell script. We don't cache a
7271 # path for INSTALL within a source directory, because that will
7272 # break other packages using the cache if that directory is
7273 # removed, or if the path is relative.
7274 INSTALL="$ac_install_sh"
7275 fi
7276fi
5213506e
RW
7277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7278$as_echo "$INSTALL" >&6; }
00020c16
ILT
7279
7280# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7281# It thinks the first close brace ends the variable substitution.
7282test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7283
7284test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7285
7286
7287# See if cmp has --ignore-initial.
5213506e
RW
7288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmp's capabilities" >&5
7289$as_echo_n "checking for cmp's capabilities... " >&6; }
7290if test "${gcc_cv_prog_cmp_skip+set}" = set; then :
7291 $as_echo_n "(cached) " >&6
00020c16
ILT
7292else
7293 echo abfoo >t1
7294 echo cdfoo >t2
7295 gcc_cv_prog_cmp_skip=slowcompare
7296 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7297 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
7298 :
7299 else
7300 gcc_cv_prog_cmp_skip=gnucompare
7301 fi
7302 fi
7303 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7304 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7305 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7306 :
7307 else
7308 gcc_cv_prog_cmp_skip=fastcompare
7309 fi
7310 fi
7311 fi
7312 rm t1 t2
7313
7314fi
5213506e
RW
7315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
7316$as_echo "$gcc_cv_prog_cmp_skip" >&6; }
00020c16
ILT
7317make_compare_target=$gcc_cv_prog_cmp_skip
7318
7319
7320
7321# See if we have the mktemp command.
7322# Extract the first word of "mktemp", so it can be a program name with args.
7323set dummy mktemp; ac_word=$2
5213506e
RW
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7325$as_echo_n "checking for $ac_word... " >&6; }
7326if test "${ac_cv_prog_have_mktemp_command+set}" = set; then :
7327 $as_echo_n "(cached) " >&6
f6a874ac 7328else
00020c16
ILT
7329 if test -n "$have_mktemp_command"; then
7330 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
f6a874ac
JW
7331else
7332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335 IFS=$as_save_IFS
7336 test -z "$as_dir" && as_dir=.
5213506e
RW
7337 for ac_exec_ext in '' $ac_executable_extensions; do
7338 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7339 ac_cv_prog_have_mktemp_command="yes"
5213506e 7340 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7341 break 2
7342 fi
7343done
5213506e
RW
7344 done
7345IFS=$as_save_IFS
f6a874ac 7346
00020c16 7347 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
f6a874ac
JW
7348fi
7349fi
00020c16
ILT
7350have_mktemp_command=$ac_cv_prog_have_mktemp_command
7351if test -n "$have_mktemp_command"; then
5213506e
RW
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mktemp_command" >&5
7353$as_echo "$have_mktemp_command" >&6; }
f6a874ac 7354else
5213506e
RW
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
f6a874ac
JW
7357fi
7358
f6a874ac 7359
5213506e 7360
00020c16
ILT
7361# See if makeinfo has been installed and is modern enough
7362# that we can use it.
ca9bc441 7363
00020c16
ILT
7364 # Extract the first word of "makeinfo", so it can be a program name with args.
7365set dummy makeinfo; ac_word=$2
5213506e
RW
7366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7367$as_echo_n "checking for $ac_word... " >&6; }
7368if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7369 $as_echo_n "(cached) " >&6
956d6950 7370else
00020c16
ILT
7371 if test -n "$MAKEINFO"; then
7372 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
956d6950 7373else
00020c16
ILT
7374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375for as_dir in $PATH
7376do
7377 IFS=$as_save_IFS
7378 test -z "$as_dir" && as_dir=.
5213506e
RW
7379 for ac_exec_ext in '' $ac_executable_extensions; do
7380 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7381 ac_cv_prog_MAKEINFO="makeinfo"
5213506e 7382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7383 break 2
7384 fi
7385done
5213506e
RW
7386 done
7387IFS=$as_save_IFS
ba479fd2 7388
956d6950 7389fi
00020c16
ILT
7390fi
7391MAKEINFO=$ac_cv_prog_MAKEINFO
7392if test -n "$MAKEINFO"; then
5213506e
RW
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7394$as_echo "$MAKEINFO" >&6; }
956d6950 7395else
5213506e
RW
7396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7397$as_echo "no" >&6; }
956d6950 7398fi
956d6950 7399
5213506e 7400
00020c16
ILT
7401 if test -n "$MAKEINFO"; then
7402 # Found it, now check the version.
5213506e
RW
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern makeinfo" >&5
7404$as_echo_n "checking for modern makeinfo... " >&6; }
7405if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then :
7406 $as_echo_n "(cached) " >&6
00020c16
ILT
7407else
7408 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
7409 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
956d6950 7410
00020c16
ILT
7411 case $ac_prog_version in
7412 '') gcc_cv_prog_makeinfo_modern=no;;
7413 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
7414 *) gcc_cv_prog_makeinfo_modern=no;;
7415 esac
ba479fd2 7416
956d6950 7417fi
5213506e
RW
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_makeinfo_modern" >&5
7419$as_echo "$gcc_cv_prog_makeinfo_modern" >&6; }
00020c16
ILT
7420 else
7421 gcc_cv_prog_makeinfo_modern=no
7422 fi
7423 if test $gcc_cv_prog_makeinfo_modern = no; then
7424 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
7425 fi
956d6950 7426
00020c16 7427if test $gcc_cv_prog_makeinfo_modern = no; then
5213506e 7428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
00020c16
ILT
7429*** Makeinfo is missing or too old.
7430*** Info documentation will not be built." >&5
5213506e 7431$as_echo "$as_me: WARNING:
00020c16
ILT
7432*** Makeinfo is missing or too old.
7433*** Info documentation will not be built." >&2;}
7434 BUILD_INFO=
7435else
7436 BUILD_INFO=info
956d6950
JL
7437fi
7438
63cf211a 7439
00020c16 7440# Is pod2man recent enough to regenerate manpages?
5213506e
RW
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent Pod::Man" >&5
7442$as_echo_n "checking for recent Pod::Man... " >&6; }
00020c16 7443if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
5213506e
RW
7444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7445$as_echo "yes" >&6; }
00020c16 7446 GENERATED_MANPAGES=generated-manpages
956d6950 7447else
5213506e
RW
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7449$as_echo "no" >&6; }
00020c16 7450 GENERATED_MANPAGES=
956d6950 7451fi
ba479fd2 7452
956d6950 7453
00020c16 7454MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
956d6950 7455
00020c16
ILT
7456# How about lex?
7457for ac_prog in flex
7458do
7459 # Extract the first word of "$ac_prog", so it can be a program name with args.
7460set dummy $ac_prog; ac_word=$2
5213506e
RW
7461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7462$as_echo_n "checking for $ac_word... " >&6; }
7463if test "${ac_cv_prog_FLEX+set}" = set; then :
7464 $as_echo_n "(cached) " >&6
956d6950 7465else
00020c16
ILT
7466 if test -n "$FLEX"; then
7467 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
956d6950 7468else
00020c16
ILT
7469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7470for as_dir in $PATH
7471do
7472 IFS=$as_save_IFS
7473 test -z "$as_dir" && as_dir=.
5213506e
RW
7474 for ac_exec_ext in '' $ac_executable_extensions; do
7475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7476 ac_cv_prog_FLEX="$ac_prog"
5213506e 7477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7478 break 2
7479 fi
7480done
5213506e
RW
7481 done
7482IFS=$as_save_IFS
ba479fd2 7483
956d6950 7484fi
956d6950 7485fi
00020c16
ILT
7486FLEX=$ac_cv_prog_FLEX
7487if test -n "$FLEX"; then
5213506e
RW
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
7489$as_echo "$FLEX" >&6; }
00020c16 7490else
5213506e
RW
7491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7492$as_echo "no" >&6; }
00020c16 7493fi
ba479fd2 7494
5213506e 7495
00020c16
ILT
7496 test -n "$FLEX" && break
7497done
7498test -n "$FLEX" || FLEX="$MISSING flex"
7499
7500
7501# Bison?
7502for ac_prog in bison
7503do
7504 # Extract the first word of "$ac_prog", so it can be a program name with args.
7505set dummy $ac_prog; ac_word=$2
5213506e
RW
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7507$as_echo_n "checking for $ac_word... " >&6; }
7508if test "${ac_cv_prog_BISON+set}" = set; then :
7509 $as_echo_n "(cached) " >&6
00020c16
ILT
7510else
7511 if test -n "$BISON"; then
7512 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7513else
7514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7515for as_dir in $PATH
7516do
7517 IFS=$as_save_IFS
7518 test -z "$as_dir" && as_dir=.
5213506e
RW
7519 for ac_exec_ext in '' $ac_executable_extensions; do
7520 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7521 ac_cv_prog_BISON="$ac_prog"
5213506e 7522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7523 break 2
7524 fi
7525done
5213506e
RW
7526 done
7527IFS=$as_save_IFS
956d6950 7528
00020c16
ILT
7529fi
7530fi
7531BISON=$ac_cv_prog_BISON
7532if test -n "$BISON"; then
5213506e
RW
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7534$as_echo "$BISON" >&6; }
00020c16 7535else
5213506e
RW
7536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537$as_echo "no" >&6; }
956d6950
JL
7538fi
7539
5213506e 7540
00020c16
ILT
7541 test -n "$BISON" && break
7542done
7543test -n "$BISON" || BISON="$MISSING bison"
7544
7545
7546# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7547# check for build == host before using them.
7548
7549# NM
7550if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7551 && test -d ../binutils ; then
bfa912a8 7552 NM='${objdir}/../binutils/nm-new'
00020c16
ILT
7553else
7554 # Extract the first word of "nm", so it can be a program name with args.
7555set dummy nm; ac_word=$2
5213506e
RW
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7557$as_echo_n "checking for $ac_word... " >&6; }
7558if test "${ac_cv_prog_NM+set}" = set; then :
7559 $as_echo_n "(cached) " >&6
00020c16
ILT
7560else
7561 if test -n "$NM"; then
7562 ac_cv_prog_NM="$NM" # Let the user override the test.
7563else
7564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7565for as_dir in $PATH
7566do
7567 IFS=$as_save_IFS
7568 test -z "$as_dir" && as_dir=.
5213506e
RW
7569 for ac_exec_ext in '' $ac_executable_extensions; do
7570 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7571 ac_cv_prog_NM="nm"
5213506e 7572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7573 break 2
7574 fi
7575done
5213506e
RW
7576 done
7577IFS=$as_save_IFS
00020c16
ILT
7578
7579 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7580fi
7581fi
7582NM=$ac_cv_prog_NM
7583if test -n "$NM"; then
5213506e
RW
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
7585$as_echo "$NM" >&6; }
00020c16 7586else
5213506e
RW
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7588$as_echo "no" >&6; }
00020c16
ILT
7589fi
7590
5213506e 7591
00020c16
ILT
7592fi
7593
7594# AR
7595if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7596 && test -d ../binutils ; then
bfa912a8 7597 AR='${objdir}/../binutils/ar'
00020c16
ILT
7598else
7599 # Extract the first word of "ar", so it can be a program name with args.
7600set dummy ar; ac_word=$2
5213506e
RW
7601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7602$as_echo_n "checking for $ac_word... " >&6; }
7603if test "${ac_cv_prog_AR+set}" = set; then :
7604 $as_echo_n "(cached) " >&6
00020c16
ILT
7605else
7606 if test -n "$AR"; then
7607 ac_cv_prog_AR="$AR" # Let the user override the test.
7608else
7609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7610for as_dir in $PATH
7611do
7612 IFS=$as_save_IFS
7613 test -z "$as_dir" && as_dir=.
5213506e
RW
7614 for ac_exec_ext in '' $ac_executable_extensions; do
7615 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7616 ac_cv_prog_AR="ar"
5213506e 7617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7618 break 2
7619 fi
7620done
5213506e
RW
7621 done
7622IFS=$as_save_IFS
00020c16
ILT
7623
7624 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7625fi
7626fi
7627AR=$ac_cv_prog_AR
7628if test -n "$AR"; then
5213506e
RW
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7630$as_echo "$AR" >&6; }
00020c16 7631else
5213506e
RW
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
00020c16
ILT
7634fi
7635
5213506e 7636
00020c16
ILT
7637fi
7638
7639
7640# --------------------
7641# Checks for C headers
7642# --------------------
7643
7644# Need to reject headers which give warnings, so that the -Werror bootstrap
7645# works later. *sigh* This needs to come before all header checks.
7646
7647ac_c_preproc_warn_flag=yes
7648
5213506e
RW
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7650$as_echo_n "checking for ANSI C header files... " >&6; }
7651if test "${ac_cv_header_stdc+set}" = set; then :
7652 $as_echo_n "(cached) " >&6
18fc9bd4 7653else
5213506e 7654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4 7655/* end confdefs.h. */
00020c16
ILT
7656#include <stdlib.h>
7657#include <stdarg.h>
18fc9bd4 7658#include <string.h>
00020c16
ILT
7659#include <float.h>
7660
18fc9bd4
RG
7661int
7662main ()
7663{
7664
7665 ;
7666 return 0;
7667}
7668_ACEOF
5213506e 7669if ac_fn_c_try_compile "$LINENO"; then :
00020c16 7670 ac_cv_header_stdc=yes
18fc9bd4 7671else
5213506e 7672 ac_cv_header_stdc=no
18fc9bd4 7673fi
5213506e 7674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 7675
00020c16
ILT
7676if test $ac_cv_header_stdc = yes; then
7677 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5213506e 7678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7679/* end confdefs.h. */
7680#include <string.h>
7681
18fc9bd4 7682_ACEOF
00020c16 7683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7684 $EGREP "memchr" >/dev/null 2>&1; then :
7685
00020c16
ILT
7686else
7687 ac_cv_header_stdc=no
7688fi
7689rm -f conftest*
18fc9bd4
RG
7690
7691fi
7692
00020c16
ILT
7693if test $ac_cv_header_stdc = yes; then
7694 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5213506e 7695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 7696/* end confdefs.h. */
00020c16
ILT
7697#include <stdlib.h>
7698
7699_ACEOF
7700if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7701 $EGREP "free" >/dev/null 2>&1; then :
7702
00020c16
ILT
7703else
7704 ac_cv_header_stdc=no
7705fi
7706rm -f conftest*
7707
7708fi
7709
7710if test $ac_cv_header_stdc = yes; then
7711 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213506e 7712 if test "$cross_compiling" = yes; then :
00020c16
ILT
7713 :
7714else
5213506e 7715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7716/* end confdefs.h. */
7717#include <ctype.h>
5213506e 7718#include <stdlib.h>
00020c16
ILT
7719#if ((' ' & 0x0FF) == 0x020)
7720# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7721# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7722#else
7723# define ISLOWER(c) \
7724 (('a' <= (c) && (c) <= 'i') \
7725 || ('j' <= (c) && (c) <= 'r') \
7726 || ('s' <= (c) && (c) <= 'z'))
7727# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7728#endif
7729
7730#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7731int
7732main ()
7733{
7734 int i;
7735 for (i = 0; i < 256; i++)
7736 if (XOR (islower (i), ISLOWER (i))
7737 || toupper (i) != TOUPPER (i))
5213506e
RW
7738 return 2;
7739 return 0;
00020c16
ILT
7740}
7741_ACEOF
5213506e 7742if ac_fn_c_try_run "$LINENO"; then :
00020c16 7743
5213506e
RW
7744else
7745 ac_cv_header_stdc=no
00020c16 7746fi
5213506e
RW
7747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7748 conftest.$ac_objext conftest.beam conftest.$ac_ext
00020c16 7749fi
5213506e 7750
00020c16
ILT
7751fi
7752fi
5213506e
RW
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7754$as_echo "$ac_cv_header_stdc" >&6; }
00020c16
ILT
7755if test $ac_cv_header_stdc = yes; then
7756
5213506e 7757$as_echo "#define STDC_HEADERS 1" >>confdefs.h
00020c16
ILT
7758
7759fi
7760
5213506e
RW
7761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7762$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7763if test "${ac_cv_header_time+set}" = set; then :
7764 $as_echo_n "(cached) " >&6
00020c16 7765else
5213506e 7766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7767/* end confdefs.h. */
7768#include <sys/types.h>
7769#include <sys/time.h>
7770#include <time.h>
7771
7772int
7773main ()
7774{
7775if ((struct tm *) 0)
7776return 0;
7777 ;
7778 return 0;
7779}
7780_ACEOF
5213506e 7781if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7782 ac_cv_header_time=yes
7783else
5213506e 7784 ac_cv_header_time=no
00020c16 7785fi
5213506e 7786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7787fi
5213506e
RW
7788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7789$as_echo "$ac_cv_header_time" >&6; }
00020c16
ILT
7790if test $ac_cv_header_time = yes; then
7791
5213506e 7792$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
00020c16
ILT
7793
7794fi
7795
5213506e
RW
7796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
7797$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
7798if test "${gcc_cv_header_string+set}" = set; then :
7799 $as_echo_n "(cached) " >&6
00020c16 7800else
5213506e 7801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7802/* end confdefs.h. */
7803#include <string.h>
7804#include <strings.h>
7805int
7806main ()
7807{
7808
7809 ;
7810 return 0;
7811}
7812_ACEOF
5213506e 7813if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7814 gcc_cv_header_string=yes
7815else
5213506e 7816 gcc_cv_header_string=no
00020c16 7817fi
5213506e 7818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7819fi
5213506e
RW
7820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5
7821$as_echo "$gcc_cv_header_string" >&6; }
00020c16
ILT
7822if test $gcc_cv_header_string = yes; then
7823
5213506e 7824$as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h
00020c16
ILT
7825
7826fi
7827
5213506e
RW
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7829$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7830if test "${ac_cv_header_sys_wait_h+set}" = set; then :
7831 $as_echo_n "(cached) " >&6
00020c16 7832else
5213506e 7833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7834/* end confdefs.h. */
7835#include <sys/types.h>
7836#include <sys/wait.h>
7837#ifndef WEXITSTATUS
5213506e 7838# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
e9831ca0
KG
7839#endif
7840#ifndef WIFEXITED
ba479fd2 7841# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 7842#endif
ba479fd2
NN
7843
7844int
7845main ()
7846{
7847 int s;
7848 wait (&s);
5213506e
RW
7849 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7850 ;
7851 return 0;
7852}
7853_ACEOF
7854if ac_fn_c_try_compile "$LINENO"; then :
7855 ac_cv_header_sys_wait_h=yes
7856else
7857 ac_cv_header_sys_wait_h=no
7858fi
7859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7860fi
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7862$as_echo "$ac_cv_header_sys_wait_h" >&6; }
7863if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2 7864
5213506e 7865$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
ba479fd2 7866
5213506e 7867fi
dfb77e37
KC
7868
7869for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 7870 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 7871 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 7872 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
5213506e
RW
7873do :
7874 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7875ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
7876eval as_val=\$$as_ac_Header
7877 if test "x$as_val" = x""yes; then :
ba479fd2 7878 cat >>confdefs.h <<_ACEOF
5213506e 7879#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2
NN
7880_ACEOF
7881
956d6950
JL
7882fi
7883done
7884
7885
f24af81b 7886# Check for thread headers.
5213506e
RW
7887ac_fn_c_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h"
7888if test "x$ac_cv_header_thread_h" = x""yes; then :
f24af81b
TT
7889 have_thread_h=yes
7890else
ba479fd2 7891 have_thread_h=
f24af81b
TT
7892fi
7893
5213506e
RW
7894ac_fn_c_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h"
7895if test "x$ac_cv_header_pthread_h" = x""yes; then :
f24af81b
TT
7896 have_pthread_h=yes
7897else
ba479fd2 7898 have_pthread_h=
f24af81b
TT
7899fi
7900
7901
84c041a1 7902# These tests can't be done till we know if we have limits.h.
5213506e
RW
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHAR_BIT" >&5
7904$as_echo_n "checking for CHAR_BIT... " >&6; }
7905if test "${gcc_cv_decl_char_bit+set}" = set; then :
7906 $as_echo_n "(cached) " >&6
ba479fd2 7907else
5213506e 7908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 7909/* end confdefs.h. */
75e93faa
ZW
7910#ifdef HAVE_LIMITS_H
7911#include <limits.h>
7912#endif
7913#ifdef CHAR_BIT
7914found
7915#endif
ba479fd2 7916_ACEOF
75e93faa 7917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e 7918 $EGREP "found" >/dev/null 2>&1; then :
75e93faa
ZW
7919 gcc_cv_decl_char_bit=yes
7920else
75e93faa
ZW
7921 gcc_cv_decl_char_bit=no
7922fi
7923rm -f conftest*
7924
7925
7926fi
5213506e
RW
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_char_bit" >&5
7928$as_echo "$gcc_cv_decl_char_bit" >&6; }
75e93faa 7929if test $gcc_cv_decl_char_bit = no; then
5213506e
RW
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of bits in a byte" >&5
7931$as_echo_n "checking number of bits in a byte... " >&6; }
7932if test "${gcc_cv_c_nbby+set}" = set; then :
7933 $as_echo_n "(cached) " >&6
75e93faa
ZW
7934else
7935 i=8
7936 gcc_cv_c_nbby=
7937 while test $i -lt 65; do
5213506e 7938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
7939/* end confdefs.h. */
7940
7941int
7942main ()
7943{
4e70264f
ZW
7944switch(0) {
7945 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
7946 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
7947 ; }
ba479fd2
NN
7948 ;
7949 return 0;
7950}
7951_ACEOF
5213506e 7952if ac_fn_c_try_compile "$LINENO"; then :
4e70264f 7953 gcc_cv_c_nbby=$i; break
75e93faa 7954fi
5213506e 7955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
7956 i=`expr $i + 1`
7957 done
7958 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
7959
7960fi
5213506e
RW
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_nbby" >&5
7962$as_echo "$gcc_cv_c_nbby" >&6; }
75e93faa 7963if test $gcc_cv_c_nbby = failed; then
5213506e 7964 as_fn_error "cannot determine number of bits in a byte" "$LINENO" 5
75e93faa 7965else
ba479fd2
NN
7966
7967cat >>confdefs.h <<_ACEOF
75e93faa 7968#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 7969_ACEOF
75e93faa
ZW
7970
7971fi
7972fi
5213506e
RW
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7974$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
7975if test "${ac_cv_c_bigendian+set}" = set; then :
7976 $as_echo_n "(cached) " >&6
84c041a1 7977else
5213506e
RW
7978 ac_cv_c_bigendian=unknown
7979 # See if we're dealing with a universal compiler.
7980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7981/* end confdefs.h. */
7982#ifndef __APPLE_CC__
7983 not a universal capable compiler
7984 #endif
7985 typedef int dummy;
7986
7987_ACEOF
7988if ac_fn_c_try_compile "$LINENO"; then :
7989
7990 # Check for potential -arch flags. It is not universal unless
7991 # there are at least two -arch flags with different values.
7992 ac_arch=
7993 ac_prev=
7994 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7995 if test -n "$ac_prev"; then
7996 case $ac_word in
7997 i?86 | x86_64 | ppc | ppc64)
7998 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
7999 ac_arch=$ac_word
8000 else
8001 ac_cv_c_bigendian=universal
8002 break
8003 fi
8004 ;;
8005 esac
8006 ac_prev=
8007 elif test "x$ac_word" = "x-arch"; then
8008 ac_prev=arch
8009 fi
8010 done
8011fi
8012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8013 if test $ac_cv_c_bigendian = unknown; then
8014 # See if sys/param.h defines the BYTE_ORDER macro.
8015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8016/* end confdefs.h. */
4977bab6 8017#include <sys/types.h>
5213506e 8018 #include <sys/param.h>
9791c75c 8019
ba479fd2
NN
8020int
8021main ()
8022{
5213506e
RW
8023#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8024 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8025 && LITTLE_ENDIAN)
8026 bogus endian macros
8027 #endif
9791c75c 8028
ba479fd2
NN
8029 ;
8030 return 0;
8031}
8032_ACEOF
5213506e 8033if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6 8034 # It does; now see whether it defined to BIG_ENDIAN or not.
5213506e 8035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8036/* end confdefs.h. */
4977bab6 8037#include <sys/types.h>
5213506e 8038 #include <sys/param.h>
9791c75c 8039
ba479fd2
NN
8040int
8041main ()
8042{
4977bab6 8043#if BYTE_ORDER != BIG_ENDIAN
5213506e
RW
8044 not big endian
8045 #endif
9791c75c 8046
ba479fd2
NN
8047 ;
8048 return 0;
8049}
8050_ACEOF
5213506e 8051if ac_fn_c_try_compile "$LINENO"; then :
b61ff9c8
BS
8052 ac_cv_c_bigendian=yes
8053else
5213506e 8054 ac_cv_c_bigendian=no
4977bab6 8055fi
5213506e
RW
8056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8057fi
8058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8059 fi
8060 if test $ac_cv_c_bigendian = unknown; then
8061 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8063/* end confdefs.h. */
8064#include <limits.h>
ba479fd2 8065
5213506e
RW
8066int
8067main ()
8068{
8069#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8070 bogus endian macros
8071 #endif
8072
8073 ;
8074 return 0;
8075}
9791c75c 8076_ACEOF
5213506e
RW
8077if ac_fn_c_try_compile "$LINENO"; then :
8078 # It does; now see whether it defined to _BIG_ENDIAN or not.
8079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791c75c 8080/* end confdefs.h. */
5213506e
RW
8081#include <limits.h>
8082
9791c75c
KC
8083int
8084main ()
8085{
5213506e
RW
8086#ifndef _BIG_ENDIAN
8087 not big endian
8088 #endif
8089
9791c75c
KC
8090 ;
8091 return 0;
8092}
8093_ACEOF
5213506e 8094if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a 8095 ac_cv_c_bigendian=yes
5213506e
RW
8096else
8097 ac_cv_c_bigendian=no
8b1f719a 8098fi
5213506e 8099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9791c75c 8100fi
5213506e
RW
8101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8102 fi
8103 if test $ac_cv_c_bigendian = unknown; then
8104 # Compile a test program.
8105 if test "$cross_compiling" = yes; then :
8106 # Try to guess by grepping values from an object file.
8107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108/* end confdefs.h. */
8109short int ascii_mm[] =
8110 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8111 short int ascii_ii[] =
8112 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8113 int use_ascii (int i) {
8114 return ascii_mm[i] + ascii_ii[i];
8115 }
8116 short int ebcdic_ii[] =
8117 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8118 short int ebcdic_mm[] =
8119 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8120 int use_ebcdic (int i) {
8121 return ebcdic_mm[i] + ebcdic_ii[i];
8122 }
8123 extern int foo;
9791c75c 8124
5213506e
RW
8125int
8126main ()
8127{
8128return use_ascii (foo) == use_ebcdic (foo);
8129 ;
8130 return 0;
8131}
8132_ACEOF
8133if ac_fn_c_try_compile "$LINENO"; then :
8134 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8135 ac_cv_c_bigendian=yes
8136 fi
8137 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8138 if test "$ac_cv_c_bigendian" = unknown; then
8139 ac_cv_c_bigendian=no
8140 else
8141 # finding both strings is unlikely to happen, but who knows?
8142 ac_cv_c_bigendian=unknown
8143 fi
8144 fi
4977bab6 8145fi
5213506e 8146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 8147else
5213506e 8148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8149/* end confdefs.h. */
5213506e 8150$ac_includes_default
9791c75c
KC
8151int
8152main ()
8153{
5213506e
RW
8154
8155 /* Are we little or big endian? From Harbison&Steele. */
8156 union
8157 {
8158 long int l;
8159 char c[sizeof (long int)];
8160 } u;
8161 u.l = 1;
8162 return u.c[sizeof (long int) - 1] == 1;
8163
8164 ;
8165 return 0;
4977bab6 8166}
ba479fd2 8167_ACEOF
5213506e 8168if ac_fn_c_try_run "$LINENO"; then :
4977bab6
ZW
8169 ac_cv_c_bigendian=no
8170else
5213506e 8171 ac_cv_c_bigendian=yes
4977bab6 8172fi
5213506e
RW
8173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8174 conftest.$ac_objext conftest.beam conftest.$ac_ext
4977bab6 8175fi
ba479fd2 8176
5213506e
RW
8177 fi
8178fi
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
8180$as_echo "$ac_cv_c_bigendian" >&6; }
8181 case $ac_cv_c_bigendian in #(
8182 yes)
8183 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
8184;; #(
8185 no)
8186 ;; #(
8187 universal)
8188
8189$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8190
8191 ;; #(
8192 *)
8193 as_fn_error "unknown endianness
8194 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8195 esac
84c041a1 8196
75e93faa 8197
73458fb7
NN
8198# --------
8199# UNSORTED
8200# --------
1e608388 8201
1e608388 8202
4e70264f
ZW
8203# These libraries may be used by collect2.
8204# We may need a special search path to get them linked.
5213506e
RW
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5
8206$as_echo_n "checking for collect2 libraries... " >&6; }
8207if test "${gcc_cv_collect2_libs+set}" = set; then :
8208 $as_echo_n "(cached) " >&6
4e70264f
ZW
8209else
8210 save_LIBS="$LIBS"
7f2749d4 8211for libs in '' -lld -lmld \
4e70264f
ZW
8212 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8213 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8214do
8215 LIBS="$libs"
5213506e 8216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
8217/* end confdefs.h. */
8218
5213506e
RW
8219/* Override any GCC internal prototype to avoid an error.
8220 Use char because int might match the return type of a GCC
8221 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8222#ifdef __cplusplus
8223extern "C"
8224#endif
ba479fd2
NN
8225char ldopen ();
8226int
8227main ()
8228{
5213506e 8229return ldopen ();
ba479fd2
NN
8230 ;
8231 return 0;
8232}
8233_ACEOF
5213506e 8234if ac_fn_c_try_link "$LINENO"; then :
4e70264f 8235 gcc_cv_collect2_libs="$libs"; break
4e70264f 8236fi
5213506e
RW
8237rm -f core conftest.err conftest.$ac_objext \
8238 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8239done
8240LIBS="$save_LIBS"
8241test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8242fi
5213506e
RW
8243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_collect2_libs" >&5
8244$as_echo "$gcc_cv_collect2_libs" >&6; }
4e70264f
ZW
8245case $gcc_cv_collect2_libs in
8246 "none required") ;;
8247 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8248esac
8249
8250
7f2749d4
RK
8251# When building Ada code on Alpha, we need exc_resume which is usually in
8252# -lexc. So test for it.
8253save_LIBS="$LIBS"
8254LIBS=
5213506e
RW
8255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing exc_resume" >&5
8256$as_echo_n "checking for library containing exc_resume... " >&6; }
8257if test "${ac_cv_search_exc_resume+set}" = set; then :
8258 $as_echo_n "(cached) " >&6
ba479fd2
NN
8259else
8260 ac_func_search_save_LIBS=$LIBS
5213506e 8261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8262/* end confdefs.h. */
7f2749d4 8263
5213506e
RW
8264/* Override any GCC internal prototype to avoid an error.
8265 Use char because int might match the return type of a GCC
b61ff9c8 8266 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8267#ifdef __cplusplus
8268extern "C"
8269#endif
b61ff9c8
BS
8270char exc_resume ();
8271int
8272main ()
8273{
5213506e 8274return exc_resume ();
b61ff9c8
BS
8275 ;
8276 return 0;
8277}
8278_ACEOF
5213506e
RW
8279for ac_lib in '' exc; do
8280 if test -z "$ac_lib"; then
8281 ac_res="none required"
8282 else
8283 ac_res=-l$ac_lib
8284 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8285 fi
8286 if ac_fn_c_try_link "$LINENO"; then :
8287 ac_cv_search_exc_resume=$ac_res
b8ec3cc8 8288fi
5213506e
RW
8289rm -f core conftest.err conftest.$ac_objext \
8290 conftest$ac_exeext
8291 if test "${ac_cv_search_exc_resume+set}" = set; then :
8292 break
b8ec3cc8 8293fi
5213506e
RW
8294done
8295if test "${ac_cv_search_exc_resume+set}" = set; then :
8296
dd7f7a6e 8297else
5213506e
RW
8298 ac_cv_search_exc_resume=no
8299fi
8300rm conftest.$ac_ext
8301LIBS=$ac_func_search_save_LIBS
8302fi
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_exc_resume" >&5
8304$as_echo "$ac_cv_search_exc_resume" >&6; }
8305ac_res=$ac_cv_search_exc_resume
8306if test "$ac_res" != no; then :
8307 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e 8308
1a4b763e 8309fi
5213506e
RW
8310
8311GNAT_LIBEXC="$LIBS"
8312LIBS="$save_LIBS"
8313
8314
8315# Some systems put ldexp and frexp in libm instead of libc; assume
8316# they're both in the same place. jcf-dump needs them.
8317save_LIBS="$LIBS"
8318LIBS=
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5
8320$as_echo_n "checking for library containing ldexp... " >&6; }
8321if test "${ac_cv_search_ldexp+set}" = set; then :
8322 $as_echo_n "(cached) " >&6
8323else
8324 ac_func_search_save_LIBS=$LIBS
8325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b61ff9c8 8326/* end confdefs.h. */
2f41c1d6 8327
5213506e
RW
8328/* Override any GCC internal prototype to avoid an error.
8329 Use char because int might match the return type of a GCC
8330 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8331#ifdef __cplusplus
8332extern "C"
8333#endif
b61ff9c8
BS
8334char ldexp ();
8335int
8336main ()
8337{
5213506e 8338return ldexp ();
b61ff9c8
BS
8339 ;
8340 return 0;
8341}
8342_ACEOF
5213506e
RW
8343for ac_lib in '' m; do
8344 if test -z "$ac_lib"; then
8345 ac_res="none required"
8346 else
8347 ac_res=-l$ac_lib
8348 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8349 fi
8350 if ac_fn_c_try_link "$LINENO"; then :
8351 ac_cv_search_ldexp=$ac_res
b61ff9c8 8352fi
5213506e
RW
8353rm -f core conftest.err conftest.$ac_objext \
8354 conftest$ac_exeext
8355 if test "${ac_cv_search_ldexp+set}" = set; then :
8356 break
8357fi
8358done
8359if test "${ac_cv_search_ldexp+set}" = set; then :
8360
8361else
8362 ac_cv_search_ldexp=no
dd7f7a6e 8363fi
5213506e 8364rm conftest.$ac_ext
dd7f7a6e
EC
8365LIBS=$ac_func_search_save_LIBS
8366fi
5213506e
RW
8367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5
8368$as_echo "$ac_cv_search_ldexp" >&6; }
8369ac_res=$ac_cv_search_ldexp
8370if test "$ac_res" != no; then :
8371 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
8372
8373fi
8374
8375LDEXP_LIB="$LIBS"
8376LIBS="$save_LIBS"
8377
8378
8379# Use <inttypes.h> only if it exists,
8380# doesn't clash with <sys/types.h>, and declares intmax_t.
5213506e
RW
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8382$as_echo_n "checking for inttypes.h... " >&6; }
8383if test "${gcc_cv_header_inttypes_h+set}" = set; then :
8384 $as_echo_n "(cached) " >&6
dd7f7a6e 8385else
5213506e 8386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd7f7a6e
EC
8387/* end confdefs.h. */
8388#include <sys/types.h>
8389#include <inttypes.h>
8390int
8391main ()
8392{
8393intmax_t i = -1;
8394 ;
8395 return 0;
8396}
8397_ACEOF
5213506e 8398if ac_fn_c_try_compile "$LINENO"; then :
dd7f7a6e
EC
8399 gcc_cv_header_inttypes_h=yes
8400else
5213506e 8401 gcc_cv_header_inttypes_h=no
dd7f7a6e 8402fi
5213506e 8403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
8404fi
8405
5213506e
RW
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_inttypes_h" >&5
8407$as_echo "$gcc_cv_header_inttypes_h" >&6; }
dd7f7a6e
EC
8408if test $gcc_cv_header_inttypes_h = yes; then
8409
5213506e 8410$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h
dd7f7a6e 8411
0056a9b5 8412fi
956d6950 8413
c149cc37 8414
ba479fd2 8415
52a6edcc 8416for ac_func in times clock kill getrlimit setrlimit atoll atoq \
d2e506f2 8417 sysconf strsignal getrusage nl_langinfo \
0d667716
KG
8418 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
8419 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
8420do :
8421 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8422ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8423eval as_val=\$$as_ac_var
8424 if test "x$as_val" = x""yes; then :
ba479fd2 8425 cat >>confdefs.h <<_ACEOF
5213506e 8426#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2 8427_ACEOF
956d6950 8428
956d6950
JL
8429fi
8430done
8431
6885fc87 8432
8ccb78f2
RO
8433save_CPPFLAGS="$CPPFLAGS"
8434save_LIBS="$LIBS"
8435LIBS="$LIBS $LIBELFLIBS"
8436for ac_func in elf_getshdrstrndx
8437do :
8438 ac_fn_c_check_func "$LINENO" "elf_getshdrstrndx" "ac_cv_func_elf_getshdrstrndx"
8439if test "x$ac_cv_func_elf_getshdrstrndx" = x""yes; then :
8440 cat >>confdefs.h <<_ACEOF
8441#define HAVE_ELF_GETSHDRSTRNDX 1
8442_ACEOF
8443
8444else
8445 for ac_func in elf_getshstrndx
8446do :
8447 ac_fn_c_check_func "$LINENO" "elf_getshstrndx" "ac_cv_func_elf_getshstrndx"
8448if test "x$ac_cv_func_elf_getshstrndx" = x""yes; then :
8449 cat >>confdefs.h <<_ACEOF
8450#define HAVE_ELF_GETSHSTRNDX 1
8451_ACEOF
8452 if test "$cross_compiling" = yes; then :
8453 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8454$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8455as_fn_error "cannot run test program while cross compiling
8456See \`config.log' for more details." "$LINENO" 5; }
8457else
8458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8459/* end confdefs.h. */
8460#include <stdlib.h>
8461#include <libelf.h>
8462int main()
8463{
8464 return elf_getshstrndx (NULL, 0) == 0;
479881c3 8465}
8ccb78f2
RO
8466_ACEOF
8467if ac_fn_c_try_run "$LINENO"; then :
8468
479881c3
RG
8469$as_echo "#define HAVE_ELF_GETSHSTRNDX_GABI 1" >>confdefs.h
8470
8ccb78f2
RO
8471fi
8472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8473 conftest.$ac_objext conftest.beam conftest.$ac_ext
8474fi
8475
8476fi
8477done
8478
8479
8480fi
8481done
8482
8483LIBS="$save_LIBS"
8484CPPFLAGS="$save_CPPFLAGS"
8485
39f6c4c8 8486if test x$ac_cv_func_mbstowcs = xyes; then
5213506e
RW
8487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbstowcs works" >&5
8488$as_echo_n "checking whether mbstowcs works... " >&6; }
8489if test "${gcc_cv_func_mbstowcs_works+set}" = set; then :
8490 $as_echo_n "(cached) " >&6
39f6c4c8 8491else
5213506e 8492 if test "$cross_compiling" = yes; then :
39f6c4c8
KW
8493 gcc_cv_func_mbstowcs_works=yes
8494else
5213506e 8495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8496/* end confdefs.h. */
39f6c4c8
KW
8497#include <stdlib.h>
8498int main()
8499{
8500 mbstowcs(0, "", 0);
8501 return 0;
8502}
ba479fd2 8503_ACEOF
5213506e 8504if ac_fn_c_try_run "$LINENO"; then :
39f6c4c8
KW
8505 gcc_cv_func_mbstowcs_works=yes
8506else
5213506e 8507 gcc_cv_func_mbstowcs_works=no
39f6c4c8 8508fi
5213506e
RW
8509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8510 conftest.$ac_objext conftest.beam conftest.$ac_ext
39f6c4c8 8511fi
5213506e 8512
39f6c4c8 8513fi
5213506e
RW
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mbstowcs_works" >&5
8515$as_echo "$gcc_cv_func_mbstowcs_works" >&6; }
63cf211a 8516 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2 8517
5213506e 8518$as_echo "#define HAVE_WORKING_MBSTOWCS 1" >>confdefs.h
39f6c4c8
KW
8519
8520 fi
8521fi
8522
5213506e
RW
8523ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
8524if test "x$ac_cv_type_ssize_t" = x""yes; then :
6e3f3080 8525
8b4fc07a 8526else
ba479fd2 8527
8b4fc07a 8528cat >>confdefs.h <<_ACEOF
f12bc141 8529#define ssize_t int
ba479fd2 8530_ACEOF
f12bc141
ZW
8531
8532fi
8533
5213506e
RW
8534ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
8535if test "x$ac_cv_type_caddr_t" = x""yes; then :
bba09b5a 8536
bba09b5a
AT
8537else
8538
8539cat >>confdefs.h <<_ACEOF
8540#define caddr_t char *
8541_ACEOF
8542
8543fi
8544
0b9d02c6 8545
3b0727a0 8546
5213506e
RW
8547ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h"
8548if test "x$ac_cv_header_sys_mman_h" = x""yes; then :
3b0727a0
MR
8549 gcc_header_sys_mman_h=yes
8550else
8551 gcc_header_sys_mman_h=no
8552fi
5213506e
RW
8553
8554ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
8555if test "x$ac_cv_func_mmap" = x""yes; then :
3b0727a0
MR
8556 gcc_func_mmap=yes
8557else
8558 gcc_func_mmap=no
8559fi
8560
8561if test "$gcc_header_sys_mman_h" != yes \
8562 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
8563 gcc_cv_func_mmap_file=no
8564 gcc_cv_func_mmap_dev_zero=no
8565 gcc_cv_func_mmap_anon=no
8566else
5213506e
RW
8567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read-only mmap of a plain file works" >&5
8568$as_echo_n "checking whether read-only mmap of a plain file works... " >&6; }
8569if test "${gcc_cv_func_mmap_file+set}" = set; then :
8570 $as_echo_n "(cached) " >&6
1072ec3f 8571else
ba479fd2 8572 # Add a system to this blacklist if
1072ec3f
ZW
8573 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
8574 # memory area containing the same data that you'd get if you applied
8575 # read() to the same fd. The only system known to have a problem here
8576 # is VMS, where text files have record structure.
8577 case "$host_os" in
ba479fd2 8578 vms* | ultrix*)
1072ec3f
ZW
8579 gcc_cv_func_mmap_file=no ;;
8580 *)
8581 gcc_cv_func_mmap_file=yes;;
8582 esac
8583fi
5213506e
RW
8584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_file" >&5
8585$as_echo "$gcc_cv_func_mmap_file" >&6; }
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap from /dev/zero works" >&5
8587$as_echo_n "checking whether mmap from /dev/zero works... " >&6; }
8588if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then :
8589 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8590else
8591 # Add a system to this blacklist if it has mmap() but /dev/zero
8592 # does not exist, or if mmapping /dev/zero does not give anonymous
8593 # zeroed pages with both the following properties:
8594 # 1. If you map N consecutive pages in with one call, and then
8595 # unmap any subset of those pages, the pages that were not
8596 # explicitly unmapped remain accessible.
8597 # 2. If you map two adjacent blocks of memory and then unmap them
8598 # both at once, they must both go away.
8599 # Systems known to be in this category are Windows (all variants),
8600 # VMS, and Darwin.
8601 case "$host_os" in
2ce240d3 8602 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
8603 gcc_cv_func_mmap_dev_zero=no ;;
8604 *)
8605 gcc_cv_func_mmap_dev_zero=yes;;
8606 esac
8607fi
5213506e
RW
8608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_dev_zero" >&5
8609$as_echo "$gcc_cv_func_mmap_dev_zero" >&6; }
1072ec3f
ZW
8610
8611 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
5213506e
RW
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5
8613$as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; }
8614if test "${gcc_cv_decl_map_anon+set}" = set; then :
8615 $as_echo_n "(cached) " >&6
ba479fd2 8616else
5213506e 8617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8618/* end confdefs.h. */
1072ec3f
ZW
8619#include <sys/types.h>
8620#include <sys/mman.h>
8621#include <unistd.h>
8622
8623#ifndef MAP_ANONYMOUS
8624#define MAP_ANONYMOUS MAP_ANON
8625#endif
8626
ba479fd2
NN
8627int
8628main ()
8629{
1072ec3f 8630int n = MAP_ANONYMOUS;
ba479fd2
NN
8631 ;
8632 return 0;
8633}
8634_ACEOF
5213506e 8635if ac_fn_c_try_compile "$LINENO"; then :
1072ec3f
ZW
8636 gcc_cv_decl_map_anon=yes
8637else
5213506e 8638 gcc_cv_decl_map_anon=no
1072ec3f 8639fi
5213506e 8640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 8641fi
5213506e
RW
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_map_anon" >&5
8643$as_echo "$gcc_cv_decl_map_anon" >&6; }
1072ec3f
ZW
8644
8645 if test $gcc_cv_decl_map_anon = no; then
8646 gcc_cv_func_mmap_anon=no
8647 else
5213506e
RW
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5
8649$as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; }
8650if test "${gcc_cv_func_mmap_anon+set}" = set; then :
8651 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8652else
8653 # Add a system to this blacklist if it has mmap() and MAP_ANON or
8654 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
8655 # doesn't give anonymous zeroed pages with the same properties listed
8656 # above for use of /dev/zero.
8657 # Systems known to be in this category are Windows, VMS, and SCO Unix.
8658 case "$host_os" in
8659 vms* | cygwin* | pe | mingw* | sco* | udk* )
8660 gcc_cv_func_mmap_anon=no ;;
8661 *)
8662 gcc_cv_func_mmap_anon=yes;;
8663 esac
8664fi
5213506e
RW
8665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_anon" >&5
8666$as_echo "$gcc_cv_func_mmap_anon" >&6; }
1072ec3f
ZW
8667 fi
8668fi
8669
8670if test $gcc_cv_func_mmap_file = yes; then
ba479fd2 8671
5213506e 8672$as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h
1072ec3f
ZW
8673
8674fi
8675if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2 8676
5213506e 8677$as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h
1072ec3f
ZW
8678
8679fi
8680if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2 8681
5213506e 8682$as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h
1072ec3f
ZW
8683
8684fi
8685
b27d2bd5
MK
8686
8687case "${host}" in
ee262b6f 8688*-*-*vms*)
ba479fd2 8689 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
8690 # won't work, and it isn't easily adaptable. It makes more sense to
8691 # just force it.
8692 ac_cv_func_vfork_works=yes
8693 ;;
b27d2bd5 8694esac
5213506e
RW
8695ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8696if test "x$ac_cv_type_pid_t" = x""yes; then :
6e3f3080 8697
ba479fd2
NN
8698else
8699
8700cat >>confdefs.h <<_ACEOF
c375c43b 8701#define pid_t int
ba479fd2 8702_ACEOF
c375c43b
KG
8703
8704fi
8705
5213506e
RW
8706for ac_header in vfork.h
8707do :
8708 ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h"
8709if test "x$ac_cv_header_vfork_h" = x""yes; then :
ba479fd2 8710 cat >>confdefs.h <<_ACEOF
5213506e 8711#define HAVE_VFORK_H 1
ba479fd2 8712_ACEOF
6e3f3080
NN
8713
8714fi
ba479fd2
NN
8715done
8716
ba479fd2 8717for ac_func in fork vfork
5213506e
RW
8718do :
8719 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8720ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8721eval as_val=\$$as_ac_var
8722 if test "x$as_val" = x""yes; then :
ba479fd2 8723 cat >>confdefs.h <<_ACEOF
5213506e 8724#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2
NN
8725_ACEOF
8726
c375c43b 8727fi
ba479fd2 8728done
c375c43b 8729
ba479fd2 8730if test "x$ac_cv_func_fork" = xyes; then
5213506e
RW
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8732$as_echo_n "checking for working fork... " >&6; }
8733if test "${ac_cv_func_fork_works+set}" = set; then :
8734 $as_echo_n "(cached) " >&6
c375c43b 8735else
5213506e 8736 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8737 ac_cv_func_fork_works=cross
8738else
5213506e
RW
8739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8740/* end confdefs.h. */
8741$ac_includes_default
8742int
8743main ()
8744{
8745
8746 /* By Ruediger Kuhlmann. */
8747 return fork () < 0;
8748
8749 ;
8750 return 0;
8751}
1a4b763e 8752_ACEOF
5213506e 8753if ac_fn_c_try_run "$LINENO"; then :
ba479fd2
NN
8754 ac_cv_func_fork_works=yes
8755else
5213506e 8756 ac_cv_func_fork_works=no
ba479fd2 8757fi
5213506e
RW
8758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8759 conftest.$ac_objext conftest.beam conftest.$ac_ext
ba479fd2 8760fi
5213506e 8761
ba479fd2 8762fi
5213506e
RW
8763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8764$as_echo "$ac_cv_func_fork_works" >&6; }
ba479fd2
NN
8765
8766else
8767 ac_cv_func_fork_works=$ac_cv_func_fork
8768fi
8769if test "x$ac_cv_func_fork_works" = xcross; then
8770 case $host in
8771 *-*-amigaos* | *-*-msdosdjgpp*)
8772 # Override, as these systems have only a dummy fork() stub
8773 ac_cv_func_fork_works=no
8774 ;;
8775 *)
8776 ac_cv_func_fork_works=yes
8777 ;;
8778 esac
5213506e
RW
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8780$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 8781fi
c375c43b 8782ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 8783if test "x$ac_cv_func_vfork" = xyes; then
5213506e
RW
8784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8785$as_echo_n "checking for working vfork... " >&6; }
8786if test "${ac_cv_func_vfork_works+set}" = set; then :
8787 $as_echo_n "(cached) " >&6
c375c43b 8788else
5213506e 8789 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8790 ac_cv_func_vfork_works=cross
8791else
5213506e 8792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8793/* end confdefs.h. */
c375c43b 8794/* Thanks to Paul Eggert for this test. */
5213506e 8795$ac_includes_default
ba479fd2 8796#include <sys/wait.h>
5213506e 8797#ifdef HAVE_VFORK_H
ba479fd2 8798# include <vfork.h>
c375c43b
KG
8799#endif
8800/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
8801 argument registers are propagated back to the parent. The compiler
8802 is told about this with #include <vfork.h>, but some compilers
8803 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8804 static variable whose address is put into a register that is
8805 clobbered by the vfork. */
8806static void
c375c43b
KG
8807#ifdef __cplusplus
8808sparc_address_test (int arg)
ba479fd2 8809# else
c375c43b
KG
8810sparc_address_test (arg) int arg;
8811#endif
8812{
8813 static pid_t child;
8814 if (!child) {
8815 child = vfork ();
8816 if (child < 0) {
8817 perror ("vfork");
8818 _exit(2);
8819 }
8820 if (!child) {
8821 arg = getpid();
8822 write(-1, "", 0);
8823 _exit (arg);
8824 }
8825 }
8826}
ba479fd2
NN
8827
8828int
8829main ()
8830{
c375c43b
KG
8831 pid_t parent = getpid ();
8832 pid_t child;
8833
ba479fd2 8834 sparc_address_test (0);
c375c43b
KG
8835
8836 child = vfork ();
8837
8838 if (child == 0) {
ba479fd2
NN
8839 /* Here is another test for sparc vfork register problems. This
8840 test uses lots of local variables, at least as many local
8841 variables as main has allocated so far including compiler
8842 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8843 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8844 reuse the register of parent for one of the local variables,
8845 since it will think that parent can't possibly be used any more
8846 in this routine. Assigning to the local variable will thus
8847 munge parent in the parent process. */
c375c43b
KG
8848 pid_t
8849 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8850 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8851 /* Convince the compiler that p..p7 are live; otherwise, it might
8852 use the same hardware register for all 8 local variables. */
8853 if (p != p1 || p != p2 || p != p3 || p != p4
8854 || p != p5 || p != p6 || p != p7)
8855 _exit(1);
8856
ba479fd2
NN
8857 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8858 from child file descriptors. If the child closes a descriptor
8859 before it execs or exits, this munges the parent's descriptor
8860 as well. Test for this by closing stdout in the child. */
c375c43b
KG
8861 _exit(close(fileno(stdout)) != 0);
8862 } else {
8863 int status;
8864 struct stat st;
8865
8866 while (wait(&status) != child)
8867 ;
5213506e 8868 return (
c375c43b
KG
8869 /* Was there some problem with vforking? */
8870 child < 0
8871
8872 /* Did the child fail? (This shouldn't happen.) */
8873 || status
8874
8875 /* Did the vfork/compiler bug occur? */
8876 || parent != getpid()
8877
8878 /* Did the file descriptor bug occur? */
8879 || fstat(fileno(stdout), &st) != 0
8880 );
8881 }
8882}
ba479fd2 8883_ACEOF
5213506e 8884if ac_fn_c_try_run "$LINENO"; then :
c375c43b
KG
8885 ac_cv_func_vfork_works=yes
8886else
5213506e 8887 ac_cv_func_vfork_works=no
cafe096b 8888fi
5213506e
RW
8889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8890 conftest.$ac_objext conftest.beam conftest.$ac_ext
6e3f3080 8891fi
5213506e 8892
ba479fd2 8893fi
5213506e
RW
8894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8895$as_echo "$ac_cv_func_vfork_works" >&6; }
c375c43b 8896
ba479fd2
NN
8897fi;
8898if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 8899 ac_cv_func_vfork_works=$ac_cv_func_vfork
5213506e
RW
8900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8901$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
8902fi
8903
ba479fd2
NN
8904if test "x$ac_cv_func_vfork_works" = xyes; then
8905
5213506e 8906$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
ba479fd2
NN
8907
8908else
8909
5213506e 8910$as_echo "#define vfork fork" >>confdefs.h
c375c43b
KG
8911
8912fi
ba479fd2
NN
8913if test "x$ac_cv_func_fork_works" = xyes; then
8914
5213506e 8915$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
ba479fd2
NN
8916
8917fi
8918
c375c43b 8919
81bf3d9e 8920
dfb77e37
KC
8921 if test "X$prefix" = "XNONE"; then
8922 acl_final_prefix="$ac_default_prefix"
8923 else
8924 acl_final_prefix="$prefix"
8925 fi
8926 if test "X$exec_prefix" = "XNONE"; then
8927 acl_final_exec_prefix='${prefix}'
8928 else
8929 acl_final_exec_prefix="$exec_prefix"
8930 fi
8931 acl_save_prefix="$prefix"
8932 prefix="$acl_final_prefix"
8933 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8934 prefix="$acl_save_prefix"
f91abfce
TT
8935
8936
5213506e
RW
8937# Check whether --with-gnu-ld was given.
8938if test "${with_gnu_ld+set}" = set; then :
8939 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
ba479fd2 8940else
dfb77e37 8941 with_gnu_ld=no
5213506e
RW
8942fi
8943
dfb77e37
KC
8944# Prepare PATH_SEPARATOR.
8945# The user is always right.
8946if test "${PATH_SEPARATOR+set}" != set; then
8947 echo "#! /bin/sh" >conf$$.sh
8948 echo "exit 0" >>conf$$.sh
8949 chmod +x conf$$.sh
8950 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8951 PATH_SEPARATOR=';'
ba479fd2 8952 else
dfb77e37 8953 PATH_SEPARATOR=:
ba479fd2 8954 fi
dfb77e37
KC
8955 rm -f conf$$.sh
8956fi
8957ac_prog=ld
8958if test "$GCC" = yes; then
8959 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8961$as_echo_n "checking for ld used by GCC... " >&6; }
dfb77e37
KC
8962 case $host in
8963 *-*-mingw*)
8964 # gcc leaves a trailing carriage return which upsets mingw
8965 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8966 *)
8967 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8968 esac
8969 case $ac_prog in
8970 # Accept absolute paths.
8971 [\\/]* | [A-Za-z]:[\\/]*)
8972 re_direlt='/[^/][^/]*/\.\./'
8973 # Canonicalize the path of ld
8974 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8975 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8976 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8977 done
8978 test -z "$LD" && LD="$ac_prog"
8979 ;;
8980 "")
8981 # If it fails, then pretend we aren't using GCC.
8982 ac_prog=ld
8983 ;;
8984 *)
8985 # If it is relative, then search for the first ld in PATH.
8986 with_gnu_ld=unknown
8987 ;;
8988 esac
8989elif test "$with_gnu_ld" = yes; then
5213506e
RW
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8991$as_echo_n "checking for GNU ld... " >&6; }
ba479fd2 8992else
5213506e
RW
8993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8994$as_echo_n "checking for non-GNU ld... " >&6; }
ba479fd2 8995fi
5213506e
RW
8996if test "${acl_cv_path_LD+set}" = set; then :
8997 $as_echo_n "(cached) " >&6
ba479fd2 8998else
dfb77e37
KC
8999 if test -z "$LD"; then
9000 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9001 for ac_dir in $PATH; do
9002 test -z "$ac_dir" && ac_dir=.
9003 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9004 acl_cv_path_LD="$ac_dir/$ac_prog"
9005 # Check to see if the program is GNU ld. I'd rather use --version,
9006 # but apparently some GNU ld's only accept -v.
9007 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
9008 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9009 test "$with_gnu_ld" != no && break
9010 else
9011 test "$with_gnu_ld" != yes && break
9012 fi
dfb77e37
KC
9013 fi
9014 done
9015 IFS="$ac_save_ifs"
9016else
9017 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9018fi
9019fi
ba479fd2 9020
dfb77e37
KC
9021LD="$acl_cv_path_LD"
9022if test -n "$LD"; then
5213506e
RW
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9024$as_echo "$LD" >&6; }
dfb77e37 9025else
5213506e
RW
9026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9027$as_echo "no" >&6; }
ba479fd2 9028fi
5213506e
RW
9029test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9031$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9032if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9033 $as_echo_n "(cached) " >&6
dfb77e37
KC
9034else
9035 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
9036if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9037 acl_cv_prog_gnu_ld=yes
9038else
9039 acl_cv_prog_gnu_ld=no
9040fi
dfb77e37 9041fi
5213506e
RW
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9043$as_echo "$acl_cv_prog_gnu_ld" >&6; }
dfb77e37
KC
9044with_gnu_ld=$acl_cv_prog_gnu_ld
9045
9046
9047
5213506e
RW
9048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9049$as_echo_n "checking for shared library run path origin... " >&6; }
9050if test "${acl_cv_rpath+set}" = set; then :
9051 $as_echo_n "(cached) " >&6
dfb77e37
KC
9052else
9053
9054 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9055 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9056 . ./conftest.sh
9057 rm -f ./conftest.sh
9058 acl_cv_rpath=done
ba479fd2 9059
eb158727 9060fi
5213506e
RW
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9062$as_echo "$acl_cv_rpath" >&6; }
dfb77e37
KC
9063 wl="$acl_cv_wl"
9064 libext="$acl_cv_libext"
9065 shlibext="$acl_cv_shlibext"
9066 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9067 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9068 hardcode_direct="$acl_cv_hardcode_direct"
9069 hardcode_minus_L="$acl_cv_hardcode_minus_L"
5213506e
RW
9070 # Check whether --enable-rpath was given.
9071if test "${enable_rpath+set}" = set; then :
9072 enableval=$enable_rpath; :
dfb77e37
KC
9073else
9074 enable_rpath=yes
5213506e
RW
9075fi
9076
8b1f719a 9077
a6ccdbab 9078
dfb77e37
KC
9079
9080
9081
9082
9083
b639c3c2
JJ
9084 use_additional=yes
9085
9086 acl_save_prefix="$prefix"
9087 prefix="$acl_final_prefix"
9088 acl_save_exec_prefix="$exec_prefix"
9089 exec_prefix="$acl_final_exec_prefix"
9090
9091 eval additional_includedir=\"$includedir\"
9092 eval additional_libdir=\"$libdir\"
9093
9094 exec_prefix="$acl_save_exec_prefix"
9095 prefix="$acl_save_prefix"
dfb77e37
KC
9096
9097
5213506e
RW
9098# Check whether --with-libiconv-prefix was given.
9099if test "${with_libiconv_prefix+set}" = set; then :
9100 withval=$with_libiconv_prefix;
8b1f719a 9101 if test "X$withval" = "Xno"; then
b639c3c2 9102 use_additional=no
8b1f719a
PB
9103 else
9104 if test "X$withval" = "X"; then
dfb77e37
KC
9105
9106 acl_save_prefix="$prefix"
9107 prefix="$acl_final_prefix"
9108 acl_save_exec_prefix="$exec_prefix"
9109 exec_prefix="$acl_final_exec_prefix"
9110
b639c3c2
JJ
9111 eval additional_includedir=\"$includedir\"
9112 eval additional_libdir=\"$libdir\"
dfb77e37
KC
9113
9114 exec_prefix="$acl_save_exec_prefix"
9115 prefix="$acl_save_prefix"
9116
8b1f719a 9117 else
b639c3c2
JJ
9118 additional_includedir="$withval/include"
9119 additional_libdir="$withval/lib"
8b1f719a
PB
9120 fi
9121 fi
9122
5213506e
RW
9123fi
9124
dfb77e37
KC
9125 LIBICONV=
9126 LTLIBICONV=
9127 INCICONV=
9128 rpathdirs=
9129 ltrpathdirs=
9130 names_already_handled=
9131 names_next_round='iconv '
9132 while test -n "$names_next_round"; do
9133 names_this_round="$names_next_round"
9134 names_next_round=
9135 for name in $names_this_round; do
9136 already_handled=
9137 for n in $names_already_handled; do
9138 if test "$n" = "$name"; then
9139 already_handled=yes
9140 break
9141 fi
9142 done
9143 if test -z "$already_handled"; then
9144 names_already_handled="$names_already_handled $name"
9145 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9146 eval value=\"\$HAVE_LIB$uppername\"
9147 if test -n "$value"; then
9148 if test "$value" = yes; then
9149 eval value=\"\$LIB$uppername\"
9150 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
9151 eval value=\"\$LTLIB$uppername\"
9152 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
9153 else
9154 :
9155 fi
9156 else
9157 found_dir=
9158 found_la=
9159 found_so=
9160 found_a=
b639c3c2
JJ
9161 if test $use_additional = yes; then
9162 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9163 found_dir="$additional_libdir"
9164 found_so="$additional_libdir/lib$name.$shlibext"
9165 if test -f "$additional_libdir/lib$name.la"; then
9166 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9167 fi
9168 else
b639c3c2
JJ
9169 if test -f "$additional_libdir/lib$name.$libext"; then
9170 found_dir="$additional_libdir"
9171 found_a="$additional_libdir/lib$name.$libext"
9172 if test -f "$additional_libdir/lib$name.la"; then
9173 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9174 fi
9175 fi
9176 fi
9177 fi
9178 if test "X$found_dir" = "X"; then
9179 for x in $LDFLAGS $LTLIBICONV; do
9180
9181 acl_save_prefix="$prefix"
9182 prefix="$acl_final_prefix"
9183 acl_save_exec_prefix="$exec_prefix"
9184 exec_prefix="$acl_final_exec_prefix"
9185 eval x=\"$x\"
9186 exec_prefix="$acl_save_exec_prefix"
9187 prefix="$acl_save_prefix"
9188
9189 case "$x" in
9190 -L*)
9191 dir=`echo "X$x" | sed -e 's/^X-L//'`
9192 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9193 found_dir="$dir"
9194 found_so="$dir/lib$name.$shlibext"
9195 if test -f "$dir/lib$name.la"; then
9196 found_la="$dir/lib$name.la"
9197 fi
9198 else
9199 if test -f "$dir/lib$name.$libext"; then
9200 found_dir="$dir"
9201 found_a="$dir/lib$name.$libext"
9202 if test -f "$dir/lib$name.la"; then
9203 found_la="$dir/lib$name.la"
9204 fi
9205 fi
9206 fi
9207 ;;
9208 esac
9209 if test "X$found_dir" != "X"; then
9210 break
9211 fi
9212 done
9213 fi
9214 if test "X$found_dir" != "X"; then
9215 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
9216 if test "X$found_so" != "X"; then
9217 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9218 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9219 else
9220 haveit=
9221 for x in $ltrpathdirs; do
9222 if test "X$x" = "X$found_dir"; then
9223 haveit=yes
9224 break
9225 fi
9226 done
9227 if test -z "$haveit"; then
9228 ltrpathdirs="$ltrpathdirs $found_dir"
9229 fi
9230 if test "$hardcode_direct" = yes; then
9231 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9232 else
9233 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9234 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9235 haveit=
9236 for x in $rpathdirs; do
9237 if test "X$x" = "X$found_dir"; then
9238 haveit=yes
9239 break
9240 fi
9241 done
9242 if test -z "$haveit"; then
9243 rpathdirs="$rpathdirs $found_dir"
9244 fi
9245 else
9246 haveit=
9247 for x in $LDFLAGS $LIBICONV; do
9248
9249 acl_save_prefix="$prefix"
9250 prefix="$acl_final_prefix"
9251 acl_save_exec_prefix="$exec_prefix"
9252 exec_prefix="$acl_final_exec_prefix"
9253 eval x=\"$x\"
9254 exec_prefix="$acl_save_exec_prefix"
9255 prefix="$acl_save_prefix"
9256
9257 if test "X$x" = "X-L$found_dir"; then
9258 haveit=yes
9259 break
9260 fi
9261 done
9262 if test -z "$haveit"; then
9263 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
9264 fi
9265 if test "$hardcode_minus_L" != no; then
9266 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9267 else
9268 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9269 fi
9270 fi
9271 fi
9272 fi
9273 else
9274 if test "X$found_a" != "X"; then
9275 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
9276 else
9277 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
9278 fi
9279 fi
9280 additional_includedir=
9281 case "$found_dir" in
9282 */lib | */lib/)
9283 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9284 additional_includedir="$basedir/include"
9285 ;;
9286 esac
9287 if test "X$additional_includedir" != "X"; then
9288 if test "X$additional_includedir" != "X/usr/include"; then
9289 haveit=
9290 if test "X$additional_includedir" = "X/usr/local/include"; then
9291 if test -n "$GCC"; then
9292 case $host_os in
18fc9bd4 9293 linux*) haveit=yes;;
dfb77e37
KC
9294 esac
9295 fi
9296 fi
9297 if test -z "$haveit"; then
9298 for x in $CPPFLAGS $INCICONV; do
9299
9300 acl_save_prefix="$prefix"
9301 prefix="$acl_final_prefix"
9302 acl_save_exec_prefix="$exec_prefix"
9303 exec_prefix="$acl_final_exec_prefix"
9304 eval x=\"$x\"
9305 exec_prefix="$acl_save_exec_prefix"
9306 prefix="$acl_save_prefix"
9307
9308 if test "X$x" = "X-I$additional_includedir"; then
9309 haveit=yes
9310 break
9311 fi
9312 done
9313 if test -z "$haveit"; then
9314 if test -d "$additional_includedir"; then
9315 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
9316 fi
9317 fi
9318 fi
9319 fi
9320 fi
9321 if test -n "$found_la"; then
9322 save_libdir="$libdir"
9323 case "$found_la" in
9324 */* | *\\*) . "$found_la" ;;
9325 *) . "./$found_la" ;;
9326 esac
9327 libdir="$save_libdir"
9328 for dep in $dependency_libs; do
9329 case "$dep" in
9330 -L*)
9331 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9332 if test "X$additional_libdir" != "X/usr/lib"; then
9333 haveit=
9334 if test "X$additional_libdir" = "X/usr/local/lib"; then
9335 if test -n "$GCC"; then
9336 case $host_os in
18fc9bd4 9337 linux*) haveit=yes;;
dfb77e37
KC
9338 esac
9339 fi
9340 fi
9341 if test -z "$haveit"; then
9342 haveit=
9343 for x in $LDFLAGS $LIBICONV; do
9344
9345 acl_save_prefix="$prefix"
9346 prefix="$acl_final_prefix"
9347 acl_save_exec_prefix="$exec_prefix"
9348 exec_prefix="$acl_final_exec_prefix"
9349 eval x=\"$x\"
9350 exec_prefix="$acl_save_exec_prefix"
9351 prefix="$acl_save_prefix"
9352
9353 if test "X$x" = "X-L$additional_libdir"; then
9354 haveit=yes
9355 break
9356 fi
9357 done
9358 if test -z "$haveit"; then
9359 if test -d "$additional_libdir"; then
9360 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
9361 fi
9362 fi
9363 haveit=
9364 for x in $LDFLAGS $LTLIBICONV; do
9365
9366 acl_save_prefix="$prefix"
9367 prefix="$acl_final_prefix"
9368 acl_save_exec_prefix="$exec_prefix"
9369 exec_prefix="$acl_final_exec_prefix"
9370 eval x=\"$x\"
9371 exec_prefix="$acl_save_exec_prefix"
9372 prefix="$acl_save_prefix"
9373
9374 if test "X$x" = "X-L$additional_libdir"; then
9375 haveit=yes
9376 break
9377 fi
9378 done
9379 if test -z "$haveit"; then
9380 if test -d "$additional_libdir"; then
9381 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
9382 fi
9383 fi
9384 fi
9385 fi
9386 ;;
9387 -R*)
9388 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9389 if test "$enable_rpath" != no; then
9390 haveit=
9391 for x in $rpathdirs; do
9392 if test "X$x" = "X$dir"; then
9393 haveit=yes
9394 break
9395 fi
9396 done
9397 if test -z "$haveit"; then
9398 rpathdirs="$rpathdirs $dir"
9399 fi
9400 haveit=
9401 for x in $ltrpathdirs; do
9402 if test "X$x" = "X$dir"; then
9403 haveit=yes
9404 break
9405 fi
9406 done
9407 if test -z "$haveit"; then
9408 ltrpathdirs="$ltrpathdirs $dir"
9409 fi
9410 fi
9411 ;;
9412 -l*)
9413 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9414 ;;
9415 *.la)
9416 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9417 ;;
9418 *)
9419 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
9420 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
9421 ;;
9422 esac
9423 done
9424 fi
9425 else
9426 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9427 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
9428 fi
9429 fi
9430 fi
9431 done
9432 done
9433 if test "X$rpathdirs" != "X"; then
9434 if test -n "$hardcode_libdir_separator"; then
9435 alldirs=
9436 for found_dir in $rpathdirs; do
9437 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9438 done
9439 acl_save_libdir="$libdir"
9440 libdir="$alldirs"
9441 eval flag=\"$hardcode_libdir_flag_spec\"
9442 libdir="$acl_save_libdir"
9443 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9444 else
9445 for found_dir in $rpathdirs; do
9446 acl_save_libdir="$libdir"
9447 libdir="$found_dir"
9448 eval flag=\"$hardcode_libdir_flag_spec\"
9449 libdir="$acl_save_libdir"
9450 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9451 done
9452 fi
9453 fi
9454 if test "X$ltrpathdirs" != "X"; then
9455 for found_dir in $ltrpathdirs; do
9456 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
9457 done
9458 fi
9459
9460
9461
9462
9463
9464
9465
9466 am_save_CPPFLAGS="$CPPFLAGS"
9467
9468 for element in $INCICONV; do
9469 haveit=
9470 for x in $CPPFLAGS; do
9471
9472 acl_save_prefix="$prefix"
9473 prefix="$acl_final_prefix"
9474 acl_save_exec_prefix="$exec_prefix"
9475 exec_prefix="$acl_final_exec_prefix"
9476 eval x=\"$x\"
9477 exec_prefix="$acl_save_exec_prefix"
9478 prefix="$acl_save_prefix"
9479
9480 if test "X$x" = "X$element"; then
9481 haveit=yes
9482 break
9483 fi
9484 done
9485 if test -z "$haveit"; then
9486 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9487 fi
9488 done
eb158727
ZW
9489
9490
5213506e
RW
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9492$as_echo_n "checking for iconv... " >&6; }
9493if test "${am_cv_func_iconv+set}" = set; then :
9494 $as_echo_n "(cached) " >&6
f91abfce 9495else
ba479fd2 9496
f91abfce
TT
9497 am_cv_func_iconv="no, consider installing GNU libiconv"
9498 am_cv_lib_iconv=no
5213506e 9499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9500/* end confdefs.h. */
f91abfce
TT
9501#include <stdlib.h>
9502#include <iconv.h>
ba479fd2
NN
9503int
9504main ()
9505{
f91abfce
TT
9506iconv_t cd = iconv_open("","");
9507 iconv(cd,NULL,NULL,NULL,NULL);
9508 iconv_close(cd);
ba479fd2
NN
9509 ;
9510 return 0;
9511}
9512_ACEOF
5213506e 9513if ac_fn_c_try_link "$LINENO"; then :
f91abfce 9514 am_cv_func_iconv=yes
f91abfce 9515fi
5213506e
RW
9516rm -f core conftest.err conftest.$ac_objext \
9517 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9518 if test "$am_cv_func_iconv" != yes; then
9519 am_save_LIBS="$LIBS"
dfb77e37 9520 LIBS="$LIBS $LIBICONV"
5213506e 9521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9522/* end confdefs.h. */
f91abfce
TT
9523#include <stdlib.h>
9524#include <iconv.h>
ba479fd2
NN
9525int
9526main ()
9527{
f91abfce
TT
9528iconv_t cd = iconv_open("","");
9529 iconv(cd,NULL,NULL,NULL,NULL);
9530 iconv_close(cd);
ba479fd2
NN
9531 ;
9532 return 0;
9533}
9534_ACEOF
5213506e 9535if ac_fn_c_try_link "$LINENO"; then :
f91abfce
TT
9536 am_cv_lib_iconv=yes
9537 am_cv_func_iconv=yes
f91abfce 9538fi
5213506e
RW
9539rm -f core conftest.err conftest.$ac_objext \
9540 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9541 LIBS="$am_save_LIBS"
9542 fi
6e3f3080 9543
ba479fd2 9544fi
5213506e
RW
9545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9546$as_echo "$am_cv_func_iconv" >&6; }
63cf211a 9547 if test "$am_cv_func_iconv" = yes; then
ba479fd2 9548
5213506e 9549$as_echo "#define HAVE_ICONV 1" >>confdefs.h
f91abfce 9550
dfb77e37
KC
9551 fi
9552 if test "$am_cv_lib_iconv" = yes; then
5213506e
RW
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
9554$as_echo_n "checking how to link with libiconv... " >&6; }
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
9556$as_echo "$LIBICONV" >&6; }
dfb77e37
KC
9557 else
9558 CPPFLAGS="$am_save_CPPFLAGS"
9559 LIBICONV=
9560 LTLIBICONV=
9561 fi
9562
9563
9564
9565 if test "$am_cv_func_iconv" = yes; then
5213506e
RW
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9567$as_echo_n "checking for iconv declaration... " >&6; }
9568 if test "${am_cv_proto_iconv+set}" = set; then :
9569 $as_echo_n "(cached) " >&6
f91abfce 9570else
ba479fd2 9571
5213506e 9572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9573/* end confdefs.h. */
f91abfce
TT
9574
9575#include <stdlib.h>
9576#include <iconv.h>
9577extern
9578#ifdef __cplusplus
9579"C"
9580#endif
9581#if defined(__STDC__) || defined(__cplusplus)
9582size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9583#else
9584size_t iconv();
9585#endif
9586
ba479fd2
NN
9587int
9588main ()
9589{
f91abfce 9590
ba479fd2
NN
9591 ;
9592 return 0;
9593}
9594_ACEOF
5213506e 9595if ac_fn_c_try_compile "$LINENO"; then :
f91abfce
TT
9596 am_cv_proto_iconv_arg1=""
9597else
5213506e 9598 am_cv_proto_iconv_arg1="const"
f91abfce 9599fi
5213506e 9600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
9601 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);"
9602fi
9603
9604 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5213506e 9605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
ba479fd2 9606 }$am_cv_proto_iconv" >&5
5213506e
RW
9607$as_echo "${ac_t:-
9608 }$am_cv_proto_iconv" >&6; }
ba479fd2
NN
9609
9610cat >>confdefs.h <<_ACEOF
f91abfce 9611#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 9612_ACEOF
f91abfce
TT
9613
9614 fi
f91abfce 9615
56694dd9
ZW
9616# Until we have in-tree GNU iconv:
9617LIBICONV_DEP=
9618
9619
18fc9bd4 9620
5213506e
RW
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9622$as_echo_n "checking for LC_MESSAGES... " >&6; }
9623if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9624 $as_echo_n "(cached) " >&6
18fc9bd4 9625else
5213506e 9626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4
RG
9627/* end confdefs.h. */
9628#include <locale.h>
9629int
9630main ()
9631{
9632return LC_MESSAGES
9633 ;
9634 return 0;
9635}
9636_ACEOF
5213506e 9637if ac_fn_c_try_link "$LINENO"; then :
18fc9bd4
RG
9638 am_cv_val_LC_MESSAGES=yes
9639else
5213506e 9640 am_cv_val_LC_MESSAGES=no
18fc9bd4 9641fi
5213506e
RW
9642rm -f core conftest.err conftest.$ac_objext \
9643 conftest$ac_exeext conftest.$ac_ext
18fc9bd4 9644fi
5213506e
RW
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9646$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
18fc9bd4
RG
9647 if test $am_cv_val_LC_MESSAGES = yes; then
9648
5213506e 9649$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
18fc9bd4
RG
9650
9651 fi
9652
f91abfce 9653
a03ea89b 9654
5213506e
RW
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9656$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9657if test "${am_cv_langinfo_codeset+set}" = set; then :
9658 $as_echo_n "(cached) " >&6
a03ea89b 9659else
5213506e 9660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a03ea89b
BM
9661/* end confdefs.h. */
9662#include <langinfo.h>
9663int
9664main ()
9665{
9666char* cs = nl_langinfo(CODESET);
9667 ;
9668 return 0;
9669}
9670_ACEOF
5213506e 9671if ac_fn_c_try_link "$LINENO"; then :
a03ea89b
BM
9672 am_cv_langinfo_codeset=yes
9673else
5213506e 9674 am_cv_langinfo_codeset=no
a03ea89b 9675fi
5213506e
RW
9676rm -f core conftest.err conftest.$ac_objext \
9677 conftest$ac_exeext conftest.$ac_ext
a03ea89b
BM
9678
9679fi
5213506e
RW
9680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9681$as_echo "$am_cv_langinfo_codeset" >&6; }
a03ea89b
BM
9682 if test $am_cv_langinfo_codeset = yes; then
9683
5213506e 9684$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a03ea89b
BM
9685
9686 fi
9687
9688
86cf1cbd
KG
9689# We will need to find libiberty.h and ansidecl.h
9690saved_CFLAGS="$CFLAGS"
9691CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ed5b9f96
GK
9692for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
9693 strsignal strstr strverscmp \
9694 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 9695 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 9696do
5213506e
RW
9697 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9699$as_echo_n "checking whether $ac_func is declared... " >&6; }
9700if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9701 $as_echo_n "(cached) " >&6
9702else
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9704/* end confdefs.h. */
7afe8c41
KG
9705#undef $ac_tr_decl
9706#define $ac_tr_decl 1
ba479fd2 9707
d02af173 9708#include "ansidecl.h"
86cf1cbd 9709#include "system.h"
f31e826b 9710
ba479fd2
NN
9711int
9712main ()
9713{
86cf1cbd
KG
9714#ifndef $ac_func
9715char *(*pfn) = (char *(*)) $ac_func ;
9716#endif
ba479fd2 9717 ;
5213506e
RW
9718 return 0;
9719}
9720_ACEOF
9721if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9722 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9723else
5213506e 9724 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9725fi
5213506e 9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9727fi
9728
f31e826b 9729if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9731$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9732#define $ac_tr_decl 1
ba479fd2
NN
9733_ACEOF
9734
81bf3d9e 9735else
5213506e
RW
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9737$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9738#define $ac_tr_decl 0
ba479fd2
NN
9739_ACEOF
9740
81bf3d9e
RH
9741fi
9742
9743done
ba479fd2 9744
ba479fd2 9745
81bf3d9e
RH
9746for ac_func in getrlimit setrlimit getrusage
9747do
5213506e
RW
9748 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9750$as_echo_n "checking whether $ac_func is declared... " >&6; }
9751if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9752 $as_echo_n "(cached) " >&6
9753else
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9755/* end confdefs.h. */
7afe8c41
KG
9756#undef $ac_tr_decl
9757#define $ac_tr_decl 1
ba479fd2 9758
d02af173 9759#include "ansidecl.h"
86cf1cbd 9760#include "system.h"
81bf3d9e
RH
9761#ifdef HAVE_SYS_RESOURCE_H
9762#include <sys/resource.h>
9763#endif
9764
f31e826b 9765
ba479fd2
NN
9766int
9767main ()
9768{
86cf1cbd
KG
9769#ifndef $ac_func
9770char *(*pfn) = (char *(*)) $ac_func ;
9771#endif
ba479fd2
NN
9772 ;
9773 return 0;
9774}
9775_ACEOF
5213506e 9776if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9777 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9778else
5213506e 9779 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9780fi
5213506e 9781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9782fi
9783
f31e826b 9784if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9786$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9787#define $ac_tr_decl 1
ba479fd2
NN
9788_ACEOF
9789
81bf3d9e 9790else
5213506e
RW
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9793#define $ac_tr_decl 0
ba479fd2
NN
9794_ACEOF
9795
81bf3d9e
RH
9796fi
9797
9798done
86cf1cbd 9799
81bf3d9e 9800
5213506e 9801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9802/* end confdefs.h. */
b2522d2b
HPN
9803
9804#include "ansidecl.h"
9805#include "system.h"
9806#ifdef HAVE_SYS_RESOURCE_H
9807#include <sys/resource.h>
9808#endif
9809
ba479fd2
NN
9810int
9811main ()
9812{
b2522d2b 9813rlim_t l = 0;
ba479fd2
NN
9814 ;
9815 return 0;
9816}
9817_ACEOF
5213506e 9818if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 9819
5213506e 9820else
ba479fd2 9821
5213506e 9822$as_echo "#define rlim_t long" >>confdefs.h
b2522d2b
HPN
9823
9824fi
5213506e 9825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 9826
2102b2fe
RS
9827# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
9828# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
9829# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
9830# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
351df804 9831for ac_func in ldgetname
c1800ec8 9832do
5213506e
RW
9833 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9835$as_echo_n "checking whether $ac_func is declared... " >&6; }
9836if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9837 $as_echo_n "(cached) " >&6
9838else
9839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9840/* end confdefs.h. */
c1800ec8
ZW
9841#undef $ac_tr_decl
9842#define $ac_tr_decl 1
ba479fd2 9843
351df804
KG
9844#include "ansidecl.h"
9845#include "system.h"
9846#ifdef HAVE_LDFCN_H
2102b2fe
RS
9847#undef FREAD
9848#undef FWRITE
351df804
KG
9849#include <ldfcn.h>
9850#endif
9851
9852
ba479fd2
NN
9853int
9854main ()
9855{
351df804
KG
9856#ifndef $ac_func
9857char *(*pfn) = (char *(*)) $ac_func ;
9858#endif
ba479fd2
NN
9859 ;
9860 return 0;
9861}
9862_ACEOF
5213506e 9863if ac_fn_c_try_compile "$LINENO"; then :
351df804
KG
9864 eval "gcc_cv_have_decl_$ac_func=yes"
9865else
5213506e 9866 eval "gcc_cv_have_decl_$ac_func=no"
351df804 9867fi
5213506e 9868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
9869fi
9870
9871if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9873$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9874#define $ac_tr_decl 1
ba479fd2
NN
9875_ACEOF
9876
351df804 9877else
5213506e
RW
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9879$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9880#define $ac_tr_decl 0
ba479fd2
NN
9881_ACEOF
9882
351df804
KG
9883fi
9884
9885done
ba479fd2 9886
351df804 9887
351df804
KG
9888for ac_func in times
9889do
5213506e
RW
9890 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9892$as_echo_n "checking whether $ac_func is declared... " >&6; }
9893if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9894 $as_echo_n "(cached) " >&6
9895else
9896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9897/* end confdefs.h. */
351df804
KG
9898#undef $ac_tr_decl
9899#define $ac_tr_decl 1
ba479fd2 9900
c1800ec8
ZW
9901#include "ansidecl.h"
9902#include "system.h"
9903#ifdef HAVE_SYS_TIMES_H
9904#include <sys/times.h>
9905#endif
9906
9907
ba479fd2
NN
9908int
9909main ()
9910{
c1800ec8
ZW
9911#ifndef $ac_func
9912char *(*pfn) = (char *(*)) $ac_func ;
9913#endif
ba479fd2
NN
9914 ;
9915 return 0;
9916}
9917_ACEOF
5213506e 9918if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6
PB
9919 eval "gcc_cv_have_decl_$ac_func=yes"
9920else
5213506e 9921 eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 9922fi
5213506e 9923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
9924fi
9925
9926if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9928$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9929#define $ac_tr_decl 1
ba479fd2
NN
9930_ACEOF
9931
c1800ec8 9932else
5213506e
RW
9933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9934$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9935#define $ac_tr_decl 0
ba479fd2
NN
9936_ACEOF
9937
c1800ec8
ZW
9938fi
9939
9940done
c1800ec8
ZW
9941
9942
4f6d8cc8
GK
9943for ac_func in sigaltstack
9944do
5213506e
RW
9945 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9947$as_echo_n "checking whether $ac_func is declared... " >&6; }
9948if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9949 $as_echo_n "(cached) " >&6
9950else
9951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4f6d8cc8
GK
9952/* end confdefs.h. */
9953#undef $ac_tr_decl
9954#define $ac_tr_decl 1
9955
9956#include "ansidecl.h"
9957#include "system.h"
9958#include <signal.h>
9959
9960
9961int
9962main ()
9963{
9964#ifndef $ac_func
9965char *(*pfn) = (char *(*)) $ac_func ;
9966#endif
9967 ;
9968 return 0;
9969}
9970_ACEOF
5213506e 9971if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a
PB
9972 eval "gcc_cv_have_decl_$ac_func=yes"
9973else
5213506e 9974 eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 9975fi
5213506e 9976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
9977fi
9978
9979if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9981$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
9982#define $ac_tr_decl 1
9983_ACEOF
9984
9985else
5213506e
RW
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9987$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
9988#define $ac_tr_decl 0
9989_ACEOF
9990
9991fi
9992
9993done
9994
9995
c1800ec8 9996# More time-related stuff.
5213506e
RW
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5
9998$as_echo_n "checking for struct tms... " >&6; }
9999if test "${ac_cv_struct_tms+set}" = set; then :
10000 $as_echo_n "(cached) " >&6
ba479fd2
NN
10001else
10002
5213506e 10003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10004/* end confdefs.h. */
c1800ec8
ZW
10005
10006#include "ansidecl.h"
10007#include "system.h"
10008#ifdef HAVE_SYS_TIMES_H
10009#include <sys/times.h>
10010#endif
10011
ba479fd2
NN
10012int
10013main ()
10014{
c1800ec8 10015struct tms tms;
ba479fd2
NN
10016 ;
10017 return 0;
10018}
10019_ACEOF
5213506e 10020if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10021 ac_cv_struct_tms=yes
10022else
5213506e 10023 ac_cv_struct_tms=no
c1800ec8 10024fi
5213506e 10025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10026fi
5213506e
RW
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tms" >&5
10028$as_echo "$ac_cv_struct_tms" >&6; }
63cf211a 10029if test $ac_cv_struct_tms = yes; then
ba479fd2 10030
5213506e 10031$as_echo "#define HAVE_STRUCT_TMS 1" >>confdefs.h
c1800ec8
ZW
10032
10033fi
10034
10035# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
10036# revisit after autoconf 2.50.
5213506e
RW
10037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
10038$as_echo_n "checking for clock_t... " >&6; }
10039if test "${gcc_cv_type_clock_t+set}" = set; then :
10040 $as_echo_n "(cached) " >&6
ba479fd2
NN
10041else
10042
5213506e 10043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10044/* end confdefs.h. */
c1800ec8
ZW
10045
10046#include "ansidecl.h"
10047#include "system.h"
10048
ba479fd2
NN
10049int
10050main ()
10051{
c1800ec8 10052clock_t x;
ba479fd2
NN
10053 ;
10054 return 0;
10055}
10056_ACEOF
5213506e 10057if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10058 gcc_cv_type_clock_t=yes
10059else
5213506e 10060 gcc_cv_type_clock_t=no
c1800ec8 10061fi
5213506e 10062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10063fi
5213506e
RW
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_type_clock_t" >&5
10065$as_echo "$gcc_cv_type_clock_t" >&6; }
63cf211a 10066if test $gcc_cv_type_clock_t = yes; then
ba479fd2 10067
5213506e 10068$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
c1800ec8
ZW
10069
10070fi
10071
eb70d86d
AS
10072# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
10073CFLAGS="$saved_CFLAGS"
10074
5213506e
RW
10075# Check whether --enable-initfini-array was given.
10076if test "${enable_initfini_array+set}" = set; then :
10077 enableval=$enable_initfini_array;
07cf4226 10078else
ba479fd2 10079
5213506e
RW
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5
10081$as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; }
10082if test "${gcc_cv_initfini_array+set}" = set; then :
10083 $as_echo_n "(cached) " >&6
07cf4226 10084else
5213506e 10085 if test "$cross_compiling" = yes; then :
918c4fe4 10086 gcc_cv_initfini_array=no
eb70d86d 10087else
5213506e 10088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10089/* end confdefs.h. */
eb70d86d 10090
07cf4226
DM
10091static int x = -1;
10092int main (void) { return x; }
10093int foo (void) { x = 0; }
10094int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2 10095_ACEOF
5213506e 10096if ac_fn_c_try_run "$LINENO"; then :
918c4fe4 10097 gcc_cv_initfini_array=yes
eb70d86d 10098else
5213506e 10099 gcc_cv_initfini_array=no
eb70d86d 10100fi
5213506e
RW
10101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10102 conftest.$ac_objext conftest.beam conftest.$ac_ext
eb70d86d 10103fi
5213506e 10104
07cf4226 10105fi
5213506e
RW
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5
10107$as_echo "$gcc_cv_initfini_array" >&6; }
eb70d86d 10108 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 10109
5213506e
RW
10110fi
10111
63cf211a 10112if test $enable_initfini_array = yes; then
ba479fd2 10113
5213506e 10114$as_echo "#define HAVE_INITFINI_ARRAY 1" >>confdefs.h
07cf4226 10115
eb70d86d 10116fi
81bf3d9e 10117
ba479fd2 10118# mkdir takes a single argument on some systems.
5213506e
RW
10119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if mkdir takes one argument" >&5
10120$as_echo_n "checking if mkdir takes one argument... " >&6; }
10121if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then :
10122 $as_echo_n "(cached) " >&6
75923b2f 10123else
5213506e 10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10125/* end confdefs.h. */
75923b2f
MK
10126
10127#include <sys/types.h>
10128#ifdef HAVE_SYS_STAT_H
10129# include <sys/stat.h>
10130#endif
10131#ifdef HAVE_UNISTD_H
10132# include <unistd.h>
10133#endif
10134#ifdef HAVE_DIRECT_H
10135# include <direct.h>
10136#endif
ba479fd2
NN
10137int
10138main ()
10139{
75923b2f 10140mkdir ("foo", 0);
ba479fd2
NN
10141 ;
10142 return 0;
10143}
10144_ACEOF
5213506e 10145if ac_fn_c_try_compile "$LINENO"; then :
75923b2f
MK
10146 gcc_cv_mkdir_takes_one_arg=no
10147else
5213506e 10148 gcc_cv_mkdir_takes_one_arg=yes
75923b2f 10149fi
5213506e 10150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 10151fi
5213506e
RW
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mkdir_takes_one_arg" >&5
10153$as_echo "$gcc_cv_mkdir_takes_one_arg" >&6; }
63cf211a 10154if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2 10155
5213506e 10156$as_echo "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h
75923b2f
MK
10157
10158fi
10159
10160
861bb6c1
JL
10161# File extensions
10162manext='.1'
10163objext='.o'
10164
10165
10166
4977bab6 10167# With Setjmp/Longjmp based exception handling.
5213506e
RW
10168# Check whether --enable-sjlj-exceptions was given.
10169if test "${enable_sjlj_exceptions+set}" = set; then :
10170 enableval=$enable_sjlj_exceptions; case $target in
399fe3e1
JDA
10171 *-*-hpux10*)
10172 if test $enableval != yes; then
5213506e
RW
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
10174$as_echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
399fe3e1
JDA
10175 enableval=yes
10176 fi
10177 ;;
10178esac
10179force_sjlj_exceptions=yes
10180else
10181 case $target in
10182 *-*-hpux10*)
10183 force_sjlj_exceptions=yes
10184 enableval=yes
10185 ;;
10186 *)
10187 force_sjlj_exceptions=no
10188 ;;
10189esac
5213506e
RW
10190fi
10191
399fe3e1 10192if test $force_sjlj_exceptions = yes; then
b61ff9c8 10193 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 10194
ba479fd2
NN
10195cat >>confdefs.h <<_ACEOF
10196#define CONFIG_SJLJ_EXCEPTIONS $sjlj
10197_ACEOF
4977bab6 10198
399fe3e1 10199fi
4977bab6 10200
443728bb
L
10201# For platforms with the unwind ABI which includes an unwind library,
10202# libunwind, we can choose to use the system libunwind.
e61c76c9
SE
10203# config.gcc also contains tests of with_system_libunwind.
10204
4977bab6 10205
5213506e
RW
10206# Check whether --with-system-libunwind was given.
10207if test "${with_system_libunwind+set}" = set; then :
10208 withval=$with_system_libunwind;
10209fi
4977bab6 10210
e61c76c9
SE
10211 # If system-libunwind was not specifically set, pick a default setting.
10212 if test x$with_system_libunwind = x; then
10213 case ${target} in
10214 ia64-*-hpux*) with_system_libunwind=yes ;;
10215 *) with_system_libunwind=no ;;
10216 esac
10217 fi
10218 # Based on system-libunwind and target, do we have ipinfo?
10219 if test x$with_system_libunwind = xyes; then
10220 case ${target} in
10221 ia64-*-*) have_unwind_getipinfo=no ;;
10222 *) have_unwind_getipinfo=yes ;;
10223 esac
10224 else
a0e02041
AP
10225 # Darwin before version 9 does not have _Unwind_GetIPInfo.
10226
10227 case ${target} in
10228 *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
10229 *) have_unwind_getipinfo=yes ;;
10230 esac
10231
e61c76c9 10232 fi
4977bab6 10233
e61c76c9 10234 if test x$have_unwind_getipinfo = xyes; then
e64f5acf 10235
5213506e 10236$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
e64f5acf 10237
e61c76c9
SE
10238 fi
10239
e64f5acf 10240
34a86c2b
NN
10241# --------------------------------------------------------
10242# Build, host, and target specific configuration fragments
10243# --------------------------------------------------------
10244
5b28c537
NN
10245# Collect build-machine-specific information.
10246. ${srcdir}/config.build
10247
a89ea0df
NN
10248# Collect host-machine-specific information.
10249. ${srcdir}/config.host
10250
ef69da62 10251target_gtfiles=
a89ea0df
NN
10252
10253# Collect target-machine-specific information.
8ad9fb33 10254. ${srcdir}/config.gcc
861bb6c1
JL
10255
10256extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 10257extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
10258
10259# Default the target-machine variables that were not explicitly set.
75bffa71 10260if test x"$tm_file" = x
861bb6c1
JL
10261then tm_file=$cpu_type/$cpu_type.h; fi
10262
6b2adea9 10263if test x"$extra_headers" = x
861bb6c1
JL
10264then extra_headers=; fi
10265
75bffa71 10266if test x$md_file = x
e98e406f 10267then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 10268
75bffa71 10269if test x$out_file = x
861bb6c1
JL
10270then out_file=$cpu_type/$cpu_type.c; fi
10271
75bffa71 10272if test x"$tmake_file" = x
861bb6c1
JL
10273then tmake_file=$cpu_type/t-$cpu_type
10274fi
10275
90e6a802 10276if test x"$dwarf2" = xyes
756ee602 10277then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
10278fi
10279
861bb6c1 10280# Say what files are being used for the output code and MD file.
11642c3a 10281echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
10282echo "Using \`$srcdir/config/$md_file' as machine description file."
10283
11642c3a 10284# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
10285# about them and drop them.
10286
11642c3a
ZW
10287bx=
10288for x in $build_xm_file; do
10289 if test -f $srcdir/config/$x
10290 then bx="$bx $x"
5213506e
RW
10291 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10292$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10293 fi
10294done
10295build_xm_file="$bx"
10296
10297hx=
10298for x in $host_xm_file; do
10299 if test -f $srcdir/config/$x
10300 then hx="$hx $x"
5213506e
RW
10301 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10302$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10303 fi
10304done
10305host_xm_file="$hx"
10306
10307tx=
10308for x in $xm_file; do
10309 if test -f $srcdir/config/$x
10310 then tx="$tx $x"
5213506e
RW
10311 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10312$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10313 fi
10314done
10315xm_file="$tx"
10316
861bb6c1
JL
10317count=a
10318for f in $tm_file; do
10319 count=${count}x
10320done
75bffa71 10321if test $count = ax; then
861bb6c1
JL
10322 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
10323else
10324 echo "Using the following target machine macro files:"
10325 for f in $tm_file; do
10326 echo " $srcdir/config/$f"
10327 done
10328fi
10329
4977bab6 10330if test x$need_64bit_hwint = xyes; then
ba479fd2 10331
5213506e 10332$as_echo "#define NEED_64BIT_HOST_WIDE_INT 1" >>confdefs.h
4977bab6
ZW
10333
10334fi
10335
99fa8911
AP
10336if test x$use_long_long_for_widest_fast_int = xyes; then
10337
5213506e 10338$as_echo "#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1" >>confdefs.h
99fa8911
AP
10339
10340fi
10341
861bb6c1
JL
10342count=a
10343for f in $host_xm_file; do
10344 count=${count}x
10345done
11642c3a
ZW
10346if test $count = a; then
10347 :
10348elif test $count = ax; then
861bb6c1
JL
10349 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
10350else
10351 echo "Using the following host machine macro files:"
10352 for f in $host_xm_file; do
10353 echo " $srcdir/config/$f"
10354 done
10355fi
476d9098 10356echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 10357
75bffa71 10358if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
10359 count=a
10360 for f in $build_xm_file; do
10361 count=${count}x
10362 done
11642c3a
ZW
10363 if test $count = a; then
10364 :
10365 elif test $count = ax; then
861bb6c1
JL
10366 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
10367 else
10368 echo "Using the following build machine macro files:"
10369 for f in $build_xm_file; do
10370 echo " $srcdir/config/$f"
10371 done
10372 fi
10373fi
10374
4f6d8cc8 10375case ${host} in
b8ec3cc8 10376 powerpc*-*-darwin*)
5213506e
RW
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5
10378$as_echo_n "checking whether mcontext_t fields have underscores... " >&6; }
10379if test "${gcc_cv_mcontext_underscores+set}" = set; then :
10380 $as_echo_n "(cached) " >&6
4f6d8cc8 10381else
5213506e
RW
10382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10383/* end confdefs.h. */
4f6d8cc8 10384
ba7da42a 10385#include <sys/cdefs.h>
de4fb767 10386#include <sys/signal.h>
4f6d8cc8
GK
10387#include <ucontext.h>
10388int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
10389
10390_ACEOF
5213506e 10391if ac_fn_c_try_compile "$LINENO"; then :
4f6d8cc8
GK
10392 gcc_cv_mcontext_underscores=no
10393else
5213506e 10394 gcc_cv_mcontext_underscores=yes
4f6d8cc8 10395fi
5213506e 10396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 10397fi
5213506e
RW
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mcontext_underscores" >&5
10399$as_echo "$gcc_cv_mcontext_underscores" >&6; }
4f6d8cc8
GK
10400 if test $gcc_cv_mcontext_underscores = yes; then
10401
5213506e 10402$as_echo "#define HAS_MCONTEXT_T_UNDERSCORES /**/" >>confdefs.h
4f6d8cc8
GK
10403
10404 fi
10405 ;;
10406esac
10407
8bb915b6
NN
10408# ---------
10409# Threading
10410# ---------
10411
c2e494a8 10412# Check if a valid thread package
615be2cf 10413case ${enable_threads} in
c2e494a8
NN
10414 "" | no)
10415 # No threads
10416 target_thread_file='single'
10417 ;;
10418 yes)
10419 # default
10420 target_thread_file='single'
10421 ;;
18167442 10422 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 10423 single | solaris | vxworks | win32 | mipssde)
615be2cf 10424 target_thread_file=${enable_threads}
c2e494a8
NN
10425 ;;
10426 *)
615be2cf 10427 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
10428 exit 1
10429 ;;
10430esac
10431
10432if test x${thread_file} = x; then
10433 # No thread file set by target-specific clauses in config.gcc,
10434 # so use file chosen by default logic above
10435 thread_file=${target_thread_file}
861bb6c1
JL
10436fi
10437
8bb915b6
NN
10438# Make gthr-default.h if we have a thread file.
10439gthread_flags=
10440if test $thread_file != single; then
b15a9f63
RW
10441 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
10442 if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
10443 rm -f gthr-default.h-t
10444 else
10445 mv -f gthr-default.h-t gthr-default.h
10446 fi
8bb915b6
NN
10447 gthread_flags=-DHAVE_GTHR_DEFAULT
10448fi
10449
10450
10451# --------
10452# UNSORTED
10453# --------
10454
18fbf599 10455use_cxa_atexit=no
2121a768
JT
10456if test x$enable___cxa_atexit = xyes || \
10457 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 10458 if test x$host = x$target; then
97388150
DS
10459 case $host in
10460 # mingw32 doesn't have __cxa_atexit but uses atexit registration
10461 # keyed to flag_use_cxa_atexit
10462 *-*-mingw32*)
10463 use_cxa_atexit=yes
10464 ;;
10465 *)
5213506e
RW
10466 ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit"
10467if test "x$ac_cv_func___cxa_atexit" = x""yes; then :
18fbf599
PB
10468 use_cxa_atexit=yes
10469else
10470 echo "__cxa_atexit can't be enabled on this target"
10471fi
10472
5f60e48f 10473 ;;
97388150 10474 esac
18fbf599
PB
10475 else
10476 # We can't check for __cxa_atexit when building a cross, so assume
10477 # it is available
10478 use_cxa_atexit=yes
10479 fi
10480 if test x$use_cxa_atexit = xyes; then
ba479fd2 10481
5213506e 10482$as_echo "#define DEFAULT_USE_CXA_ATEXIT 2" >>confdefs.h
2121a768 10483
18fbf599 10484 fi
2121a768
JT
10485fi
10486
a5381466 10487# Look for a file containing extra machine modes.
1c0ca89d
ZW
10488if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
10489 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
10490
10491
10492cat >>confdefs.h <<_ACEOF
e22340b0 10493#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 10494_ACEOF
a5381466
ZW
10495
10496fi
10497
75685792
RS
10498# Convert extra_options into a form suitable for Makefile use.
10499extra_opt_files=
10500for f in $extra_options; do
10501 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
10502done
10503
10504
b7cb92ad 10505# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 10506# the first file included by config.h.
4977bab6 10507# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 10508# as well. If host!=build, we are in error and need to do more
db81d74a 10509# work to find out the build config parameters.
75bffa71 10510if test x$host = x$build
db81d74a 10511then
eaf4e618 10512 build_auto=auto-host.h
b7cb92ad
JL
10513else
10514 # We create a subdir, then run autoconf in the subdir.
10515 # To prevent recursion we set host and build for the new
10516 # invocation of configure to the build for this invocation
ba479fd2 10517 # of configure.
b7cb92ad
JL
10518 tempdir=build.$$
10519 rm -rf $tempdir
10520 mkdir $tempdir
10521 cd $tempdir
10522 case ${srcdir} in
255b8a49 10523 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
10524 *) realsrcdir=../${srcdir};;
10525 esac
d920e825
L
10526 saved_CFLAGS="${CFLAGS}"
10527 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 10528 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 10529 ${realsrcdir}/configure \
33e70558 10530 --enable-languages=${enable_languages-all} \
534d0cc0 10531 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 10532 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
10533
10534 # We just finished tests for the build machine, so rename
10535 # the file auto-build.h in the gcc directory.
10536 mv auto-host.h ../auto-build.h
10537 cd ..
10538 rm -rf $tempdir
eaf4e618 10539 build_auto=auto-build.h
db81d74a
RH
10540fi
10541
06f0b04c 10542
eaf4e618 10543tm_file="${tm_file} defaults.h"
4977bab6
ZW
10544tm_p_file="${tm_p_file} tm-preds.h"
10545host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
10546build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 10547# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 10548# put this back in temporarily.
232b67d9 10549xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 10550
34a86c2b
NN
10551# --------
10552# UNSORTED
10553# --------
10554
cc1e60ea 10555# Compile in configure arguments.
8105825d 10556if test -f configargs.h ; then
cc1e60ea 10557 # Being re-configured.
022dae81 10558 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
10559 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
10560else
10561 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
10562fi
eeae7b41
DJ
10563
10564# Double all backslashes and backslash all quotes to turn
10565# gcc_config_arguments into a C string.
10566sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
10567$gcc_config_arguments
10568EOF
10569gcc_config_arguments_str=`cat conftest.out`
10570rm -f conftest.out
10571
cc1e60ea
JM
10572cat > configargs.h <<EOF
10573/* Generated automatically. */
eeae7b41 10574static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 10575static const char thread_model[] = "$thread_file";
7816bea0
DJ
10576
10577static const struct {
10578 const char *name, *value;
10579} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
10580EOF
10581
40540e68
RAE
10582gcc_BASEVER=`cat $srcdir/BASE-VER`
10583gcc_DEVPHASE=`cat $srcdir/DEV-PHASE`
10584gcc_DATESTAMP=`cat $srcdir/DATESTAMP`
0c463e16 10585if test -f $srcdir/REVISION ; then
40540e68 10586 gcc_REVISION=`cat $srcdir/REVISION`
0c463e16
RAE
10587else
10588 gcc_REVISION=""
10589fi
10590cat > plugin-version.h <<EOF
10591#include "configargs.h"
10592
10593static char basever[] = "$gcc_BASEVER";
10594static char datestamp[] = "$gcc_DATESTAMP";
10595static char devphase[] = "$gcc_DEVPHASE";
10596static char revision[] = "$gcc_REVISION";
10597
10598/* FIXME plugins: We should make the version information more precise.
10599 One way to do is to add a checksum. */
10600
10601static struct plugin_gcc_version gcc_version = {basever, datestamp,
10602 devphase, revision,
10603 configuration_arguments};
10604EOF
10605
ab87f8c8 10606# Internationalization
18fc9bd4
RG
10607# If we haven't got the data from the intl directory,
10608# assume NLS is disabled.
10609USE_NLS=no
10610LIBINTL=
10611LIBINTL_DEP=
10612INCINTL=
10613XGETTEXT=
10614GMSGFMT=
10615POSUB=
10616
10617if test -f ../intl/config.intl; then
10618 . ../intl/config.intl
10619fi
5213506e
RW
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
10621$as_echo_n "checking whether NLS is requested... " >&6; }
18fc9bd4 10622if test x"$USE_NLS" != xyes; then
5213506e
RW
10623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
18fc9bd4 10625else
5213506e
RW
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10627$as_echo "yes" >&6; }
18fc9bd4 10628
5213506e 10629$as_echo "#define ENABLE_NLS 1" >>confdefs.h
18fc9bd4
RG
10630
10631
5213506e
RW
10632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
10633$as_echo_n "checking for catalogs to be installed... " >&6; }
18fc9bd4
RG
10634 # Look for .po and .gmo files in the source directory.
10635 CATALOGS=
10636 XLINGUAS=
10637 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
10638 # If there aren't any .gmo files the shell will give us the
10639 # literal string "../path/to/srcdir/po/*.gmo" which has to be
10640 # weeded out.
10641 case "$cat" in *\**)
10642 continue;;
10643 esac
10644 # The quadruple backslash is collapsed to a double backslash
10645 # by the backticks, then collapsed again by the double quotes,
10646 # leaving us with one backslash in the sed expression (right
10647 # before the dot that mustn't act as a wildcard).
10648 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
10649 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
10650 # The user is allowed to set LINGUAS to a list of languages to
10651 # install catalogs for. If it's empty that means "all of them."
10652 if test "x$LINGUAS" = x; then
10653 CATALOGS="$CATALOGS $cat"
10654 XLINGUAS="$XLINGUAS $lang"
10655 else
10656 case "$LINGUAS" in *$lang*)
10657 CATALOGS="$CATALOGS $cat"
10658 XLINGUAS="$XLINGUAS $lang"
10659 ;;
10660 esac
10661 fi
10662 done
10663 LINGUAS="$XLINGUAS"
5213506e
RW
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
10665$as_echo "$LINGUAS" >&6; }
18fc9bd4
RG
10666
10667
10668 DATADIRNAME=share
10669
10670 INSTOBJEXT=.mo
10671
10672 GENCAT=gencat
10673
10674 CATOBJEXT=.gmo
10675
10676fi
861bb6c1 10677
56694dd9
ZW
10678# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
10679# -liconv on the link line twice.
10680case "$LIBINTL" in *$LIBICONV*)
10681 LIBICONV= ;;
10682esac
dc6746e7 10683
5213506e
RW
10684# Check whether --enable-secureplt was given.
10685if test "${enable_secureplt+set}" = set; then :
10686 enableval=$enable_secureplt;
10687fi
7f970b70 10688
922e3e33 10689
ad211091
KT
10690# Check whether --enable-leading-mingw64-underscores was given.
10691if test "${enable_leading_mingw64_underscores+set}" = set; then :
10692 enableval=$enable_leading_mingw64_underscores;
10693fi
10694
10695if test x"$enable_leading_mingw64_underscores" = xyes ; then :
10696
10697$as_echo "#define USE_MINGW64_LEADING_UNDERSCORES 1" >>confdefs.h
10698
10699fi
10700
5213506e
RW
10701# Check whether --enable-cld was given.
10702if test "${enable_cld+set}" = set; then :
10703 enableval=$enable_cld;
922e3e33
UB
10704else
10705 enable_cld=no
5213506e
RW
10706fi
10707
922e3e33 10708
56694dd9 10709# Windows32 Registry support for specifying GCC installation paths.
5213506e
RW
10710# Check whether --enable-win32-registry was given.
10711if test "${enable_win32_registry+set}" = set; then :
10712 enableval=$enable_win32_registry;
10713fi
dc6746e7 10714
ba479fd2 10715
a1286ef5
ZW
10716case $host_os in
10717 win32 | pe | cygwin* | mingw32* | uwin*)
10718 if test "x$enable_win32_registry" != xno; then
5213506e
RW
10719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RegOpenKeyExA" >&5
10720$as_echo_n "checking for library containing RegOpenKeyExA... " >&6; }
10721if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10722 $as_echo_n "(cached) " >&6
ba479fd2
NN
10723else
10724 ac_func_search_save_LIBS=$LIBS
5213506e 10725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10726/* end confdefs.h. */
861bb6c1 10727
5213506e
RW
10728/* Override any GCC internal prototype to avoid an error.
10729 Use char because int might match the return type of a GCC
10730 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10731#ifdef __cplusplus
10732extern "C"
10733#endif
ba479fd2
NN
10734char RegOpenKeyExA ();
10735int
10736main ()
10737{
5213506e 10738return RegOpenKeyExA ();
ba479fd2
NN
10739 ;
10740 return 0;
10741}
10742_ACEOF
5213506e
RW
10743for ac_lib in '' advapi32; do
10744 if test -z "$ac_lib"; then
10745 ac_res="none required"
10746 else
10747 ac_res=-l$ac_lib
b61ff9c8 10748 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5213506e
RW
10749 fi
10750 if ac_fn_c_try_link "$LINENO"; then :
10751 ac_cv_search_RegOpenKeyExA=$ac_res
10752fi
10753rm -f core conftest.err conftest.$ac_objext \
10754 conftest$ac_exeext
10755 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10756 break
10757fi
10758done
10759if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
2f41c1d6 10760
1a4b763e 10761else
5213506e 10762 ac_cv_search_RegOpenKeyExA=no
dd7f7a6e 10763fi
5213506e 10764rm conftest.$ac_ext
dd7f7a6e
EC
10765LIBS=$ac_func_search_save_LIBS
10766fi
5213506e
RW
10767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RegOpenKeyExA" >&5
10768$as_echo "$ac_cv_search_RegOpenKeyExA" >&6; }
10769ac_res=$ac_cv_search_RegOpenKeyExA
10770if test "$ac_res" != no; then :
10771 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
10772
10773else
10774 enable_win32_registry=no
10775fi
10776
10777 fi
10778
10779 if test "x$enable_win32_registry" != xno; then
10780
5213506e 10781$as_echo "#define ENABLE_WIN32_REGISTRY 1" >>confdefs.h
dd7f7a6e
EC
10782
10783
10784 if test "x$enable_win32_registry" != xyes \
10785 && test "x$enable_win32_registry" != x; then
10786
10787cat >>confdefs.h <<_ACEOF
10788#define WIN32_REGISTRY_KEY "$enable_win32_registry"
10789_ACEOF
10790
10791 fi
10792 fi
10793 ;;
10794esac
ab87f8c8 10795
56694dd9
ZW
10796# Get an absolute path to the GCC top-level source directory
10797holddir=`${PWDCMD-pwd}`
10798cd $srcdir
10799topdir=`${PWDCMD-pwd}`
10800cd $holddir
ab87f8c8 10801
56694dd9 10802# Conditionalize the makefile for this host machine.
2ed26f6b 10803xmake_file=
c406e779 10804for f in ${host_xmake_file}
56694dd9
ZW
10805do
10806 if test -f ${srcdir}/config/$f
10807 then
2ed26f6b 10808 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
10809 fi
10810done
093e61a6 10811
56694dd9 10812# Conditionalize the makefile for this target machine.
2ed26f6b 10813tmake_file_=
c406e779 10814for f in ${tmake_file}
56694dd9
ZW
10815do
10816 if test -f ${srcdir}/config/$f
10817 then
2ed26f6b 10818 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
10819 fi
10820done
2ed26f6b 10821tmake_file="${tmake_file_}"
71a94577 10822
ab87f8c8
JL
10823out_object_file=`basename $out_file .c`.o
10824
75685792 10825tm_file_list="options.h"
c513ce77 10826tm_include_list="options.h insn-constants.h"
ab87f8c8 10827for f in $tm_file; do
64ccbc99 10828 case $f in
3ca43df7
RS
10829 ./* )
10830 f=`echo $f | sed 's/^..//'`
10831 tm_file_list="${tm_file_list} $f"
10832 tm_include_list="${tm_include_list} $f"
10833 ;;
d02af173 10834 defaults.h )
e22340b0
ZW
10835 tm_file_list="${tm_file_list} \$(srcdir)/$f"
10836 tm_include_list="${tm_include_list} $f"
10837 ;;
10838 * )
10839 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
10840 tm_include_list="${tm_include_list} config/$f"
10841 ;;
64ccbc99 10842 esac
ab87f8c8
JL
10843done
10844
11642c3a 10845tm_p_file_list=
e22340b0 10846tm_p_include_list=
11642c3a 10847for f in $tm_p_file; do
4977bab6
ZW
10848 case $f in
10849 tm-preds.h )
e22340b0
ZW
10850 tm_p_file_list="${tm_p_file_list} $f"
10851 tm_p_include_list="${tm_p_include_list} $f"
10852 ;;
10853 * )
10854 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
10855 tm_p_include_list="${tm_p_include_list} config/$f"
10856 esac
10857done
10858
10859xm_file_list=
10860xm_include_list=
10861for f in $xm_file; do
10862 case $f in
10863 ansidecl.h )
10864 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
10865 xm_include_list="${xm_include_list} $f"
10866 ;;
10867 auto-host.h )
10868 xm_file_list="${xm_file_list} $f"
10869 xm_include_list="${xm_include_list} $f"
10870 ;;
10871 * )
10872 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
10873 xm_include_list="${xm_include_list} config/$f"
10874 ;;
4977bab6 10875 esac
11642c3a
ZW
10876done
10877
ab87f8c8 10878host_xm_file_list=
e22340b0 10879host_xm_include_list=
ab87f8c8 10880for f in $host_xm_file; do
64ccbc99 10881 case $f in
d02af173 10882 ansidecl.h )
e22340b0
ZW
10883 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
10884 host_xm_include_list="${host_xm_include_list} $f"
10885 ;;
e2500fed 10886 auto-host.h )
e22340b0
ZW
10887 host_xm_file_list="${host_xm_file_list} $f"
10888 host_xm_include_list="${host_xm_include_list} $f"
10889 ;;
10890 * )
10891 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
10892 host_xm_include_list="${host_xm_include_list} config/$f"
10893 ;;
64ccbc99 10894 esac
ab87f8c8
JL
10895done
10896
10897build_xm_file_list=
10898for f in $build_xm_file; do
64ccbc99 10899 case $f in
d02af173 10900 ansidecl.h )
e22340b0
ZW
10901 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
10902 build_xm_include_list="${build_xm_include_list} $f"
10903 ;;
e2500fed 10904 auto-build.h | auto-host.h )
e22340b0
ZW
10905 build_xm_file_list="${build_xm_file_list} $f"
10906 build_xm_include_list="${build_xm_include_list} $f"
10907 ;;
10908 * )
10909 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
10910 build_xm_include_list="${build_xm_include_list} config/$f"
10911 ;;
64ccbc99 10912 esac
ab87f8c8
JL
10913done
10914
2989d30c
GK
10915# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
10916# cross-compiler which does not use the native headers and libraries.
a078a589 10917# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
10918CROSS=
10919ALL=all.internal
10920SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10921
10922if test "x$with_build_sysroot" != x; then
14da6073 10923 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10924else
10925 # This value is used, even on a native system, because
10926 # CROSS_SYSTEM_HEADER_DIR is just
10927 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
10928 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
10929fi
10930
ab87f8c8
JL
10931if test x$host != x$target
10932then
2989d30c 10933 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 10934 ALL=all.cross
160633c6 10935 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 10936 case "$host","$target" in
3a7e8b87
GK
10937 # Darwin crosses can use the host system's libraries and headers,
10938 # because of the fat library support. Of course, it must be the
10939 # same version of Darwin on both sides. Allow the user to
10940 # just say --target=foo-darwin without a version number to mean
10941 # "the version on this system".
10942 *-*-darwin*,*-*-darwin*)
10943 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
10944 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
10945 if test $hostos = $targetos -o $targetos = darwin ; then
10946 CROSS=
10947 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
10948 with_headers=yes
10949 fi
10950 ;;
10951
343f59d9
AM
10952 i?86-*-*,x86_64-*-* \
10953 | powerpc*-*-*,powerpc64*-*-*)
10954 CROSS="$CROSS -DNATIVE_CROSS" ;;
10955 esac
7a615b25 10956elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 10957 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
10958fi
10959
b39d221a
EC
10960# If this is a cross-compiler that does not
10961# have its own set of headers then define
10962# inhibit_libc
10963
dc06db20
R
10964# If this is using newlib, without having the headers available now,
10965# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
10966# This prevents libgcc2 from containing any code which requires libc
10967# support.
a929bc28 10968: ${inhibit_libc=false}
dc06db20
R
10969if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
10970 test x$with_newlib = xyes ; } &&
e50084fa 10971 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 10972 inhibit_libc=true
b39d221a
EC
10973fi
10974
10975
a078a589
ZW
10976# When building gcc with a cross-compiler, we need to adjust things so
10977# that the generator programs are still built with the native compiler.
52c0e446 10978# Also, we cannot run fixincludes.
a078a589
ZW
10979
10980# These are the normal (build=host) settings:
ba479fd2
NN
10981CC_FOR_BUILD='$(CC)'
10982BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 10983BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 10984STMP_FIXINC=stmp-fixinc
8ad9fb33 10985
83599948
NS
10986# And these apply if build != host, or we are generating coverage data
10987if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 10988then
b11e4747 10989 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 10990 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
ab87f8c8
JL
10991fi
10992
10993# Expand extra_headers to include complete path.
10994# This substitutes for lots of t-* files.
10995extra_headers_list=
b1ef58c8
NN
10996# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
10997for file in ${extra_headers} ; do
10998 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
10999done
ab87f8c8 11000
1617e5ee
GK
11001# If use_gcc_tgmath is set, append ginclude/tgmath.h.
11002if test x"$use_gcc_tgmath" = xyes
11003then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
11004fi
11005
c38f02df
ILT
11006# Define collect2 in Makefile.
11007case $host_can_use_collect2 in
11008 no) collect2= ;;
11009 *) collect2='collect2$(exeext)' ;;
11010esac
11011
11012
ab87f8c8 11013# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
11014case $use_collect2 in
11015 no) use_collect2= ;;
11016 "") ;;
ba479fd2 11017 *)
34a86c2b
NN
11018 host_xm_defines="${host_xm_defines} USE_COLLECT2"
11019 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
11020 case $host_can_use_collect2 in
11021 no)
5213506e 11022 as_fn_error "collect2 is required but cannot be built on this system" "$LINENO" 5
c38f02df
ILT
11023 ;;
11024 esac
34a86c2b
NN
11025 ;;
11026esac
ab87f8c8 11027
8bb915b6
NN
11028# ---------------------------
11029# Assembler & linker features
11030# ---------------------------
11031
da0f6381
PB
11032# During stage 2, ld is actually gcc/collect-ld, which is a small script to
11033# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
11034# However when ld-new is first executed from the build tree, libtool will
11035# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
11036# to the build tree. While doing this we need to use the previous-stage
11037# linker, or we have an infinite loop. The presence of a shell script as
11038# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
11039# the gcc/collect-ld script. So we need to know how libtool works, or
11040# exec-tool will fail.
e8b05380 11041
da0f6381 11042
5d47bb02
PG
11043case `pwd` in
11044 *\ * | *\ *)
5213506e
RW
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
11046$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5d47bb02 11047esac
da0f6381
PB
11048
11049
da0f6381 11050
43e02a8a
RW
11051macro_version='2.2.7a'
11052macro_revision='1.3134'
da0f6381
PB
11053
11054
11055
11056
11057
11058
da0f6381
PB
11059
11060
11061
11062
11063
11064
11065
5d47bb02 11066ltmain="$ac_aux_dir/ltmain.sh"
da0f6381 11067
43e02a8a
RW
11068# Backslashify metacharacters that are still active within
11069# double-quoted strings.
11070sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
11071
11072# Same as above, but do not quote variable references.
11073double_quote_subst='s/\(["`\\]\)/\\\1/g'
11074
11075# Sed substitution to delay expansion of an escaped shell variable in a
11076# double_quote_subst'ed string.
11077delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
11078
11079# Sed substitution to delay expansion of an escaped single quote.
11080delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
11081
11082# Sed substitution to avoid accidental globbing in evaled expressions
11083no_glob_subst='s/\*/\\\*/g'
11084
11085ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11086ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11087ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11088
11089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
11090$as_echo_n "checking how to print strings... " >&6; }
11091# Test print first, because it will be a builtin if present.
11092if test "X`print -r -- -n 2>/dev/null`" = X-n && \
11093 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
11094 ECHO='print -r --'
11095elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
11096 ECHO='printf %s\n'
11097else
11098 # Use this function as a fallback that always works.
11099 func_fallback_echo ()
11100 {
11101 eval 'cat <<_LTECHO_EOF
11102$1
11103_LTECHO_EOF'
11104 }
11105 ECHO='func_fallback_echo'
11106fi
11107
11108# func_echo_all arg...
11109# Invoke $ECHO with all args, space-separated.
11110func_echo_all ()
11111{
11112 $ECHO ""
11113}
11114
11115case "$ECHO" in
11116 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
11117$as_echo "printf" >&6; } ;;
11118 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
11119$as_echo "print -r" >&6; } ;;
11120 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
11121$as_echo "cat" >&6; } ;;
11122esac
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
5213506e
RW
11137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
11138$as_echo_n "checking for a sed that does not truncate output... " >&6; }
11139if test "${ac_cv_path_SED+set}" = set; then :
11140 $as_echo_n "(cached) " >&6
11141else
11142 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
11143 for ac_i in 1 2 3 4 5 6 7; do
11144 ac_script="$ac_script$as_nl$ac_script"
11145 done
11146 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
11147 { ac_script=; unset ac_script;}
11148 if test -z "$SED"; then
11149 ac_path_SED_found=false
11150 # Loop through the user's path and test for each of PROGNAME-LIST
11151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
11152for as_dir in $PATH
11153do
11154 IFS=$as_save_IFS
11155 test -z "$as_dir" && as_dir=.
5213506e 11156 for ac_prog in sed gsed; do
da0f6381 11157 for ac_exec_ext in '' $ac_executable_extensions; do
5213506e
RW
11158 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
11159 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
11160# Check for GNU ac_path_SED and select it if it is found.
11161 # Check for GNU $ac_path_SED
11162case `"$ac_path_SED" --version 2>&1` in
11163*GNU*)
11164 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
11165*)
11166 ac_count=0
11167 $as_echo_n 0123456789 >"conftest.in"
11168 while :
11169 do
11170 cat "conftest.in" "conftest.in" >"conftest.tmp"
11171 mv "conftest.tmp" "conftest.in"
11172 cp "conftest.in" "conftest.nl"
11173 $as_echo '' >> "conftest.nl"
11174 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
11175 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11176 as_fn_arith $ac_count + 1 && ac_count=$as_val
11177 if test $ac_count -gt ${ac_path_SED_max-0}; then
11178 # Best one so far, save it but keep looking for a better one
11179 ac_cv_path_SED="$ac_path_SED"
11180 ac_path_SED_max=$ac_count
11181 fi
11182 # 10*(2^10) chars as input seems more than enough
11183 test $ac_count -gt 10 && break
11184 done
11185 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11186esac
11187
11188 $ac_path_SED_found && break 3
da0f6381
PB
11189 done
11190 done
5213506e 11191 done
da0f6381 11192IFS=$as_save_IFS
5213506e
RW
11193 if test -z "$ac_cv_path_SED"; then
11194 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
da0f6381 11195 fi
5213506e
RW
11196else
11197 ac_cv_path_SED=$SED
e8b05380 11198fi
b61ff9c8 11199
5213506e
RW
11200fi
11201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
11202$as_echo "$ac_cv_path_SED" >&6; }
11203 SED="$ac_cv_path_SED"
11204 rm -f conftest.sed
e8b05380 11205
da0f6381
PB
11206test -z "$SED" && SED=sed
11207Xsed="$SED -e 1s/^X//"
e8b05380 11208
e8b05380
PB
11209
11210
ad9c4d9f 11211
da0f6381
PB
11212
11213
11214
11215
11216
11217
11218
5213506e
RW
11219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11220$as_echo_n "checking for fgrep... " >&6; }
11221if test "${ac_cv_path_FGREP+set}" = set; then :
11222 $as_echo_n "(cached) " >&6
11223else
11224 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11225 then ac_cv_path_FGREP="$GREP -F"
11226 else
11227 if test -z "$FGREP"; then
11228 ac_path_FGREP_found=false
11229 # Loop through the user's path and test for each of PROGNAME-LIST
11230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11231for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11232do
11233 IFS=$as_save_IFS
11234 test -z "$as_dir" && as_dir=.
11235 for ac_prog in fgrep; do
11236 for ac_exec_ext in '' $ac_executable_extensions; do
11237 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11238 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
11239# Check for GNU ac_path_FGREP and select it if it is found.
11240 # Check for GNU $ac_path_FGREP
11241case `"$ac_path_FGREP" --version 2>&1` in
11242*GNU*)
11243 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11244*)
11245 ac_count=0
11246 $as_echo_n 0123456789 >"conftest.in"
11247 while :
11248 do
11249 cat "conftest.in" "conftest.in" >"conftest.tmp"
11250 mv "conftest.tmp" "conftest.in"
11251 cp "conftest.in" "conftest.nl"
11252 $as_echo 'FGREP' >> "conftest.nl"
11253 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11254 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11255 as_fn_arith $ac_count + 1 && ac_count=$as_val
11256 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11257 # Best one so far, save it but keep looking for a better one
11258 ac_cv_path_FGREP="$ac_path_FGREP"
11259 ac_path_FGREP_max=$ac_count
11260 fi
11261 # 10*(2^10) chars as input seems more than enough
11262 test $ac_count -gt 10 && break
11263 done
11264 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11265esac
11266
11267 $ac_path_FGREP_found && break 3
11268 done
11269 done
11270 done
11271IFS=$as_save_IFS
11272 if test -z "$ac_cv_path_FGREP"; then
11273 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11274 fi
e8b05380 11275else
5213506e
RW
11276 ac_cv_path_FGREP=$FGREP
11277fi
11278
11279 fi
981d4858 11280fi
5213506e
RW
11281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11282$as_echo "$ac_cv_path_FGREP" >&6; }
11283 FGREP="$ac_cv_path_FGREP"
9e423e6d 11284
9f18db39 11285
da0f6381 11286test -z "$GREP" && GREP=grep
9f18db39 11287
da0f6381
PB
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
5213506e
RW
11306# Check whether --with-gnu-ld was given.
11307if test "${with_gnu_ld+set}" = set; then :
11308 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
da0f6381
PB
11309else
11310 with_gnu_ld=no
5213506e
RW
11311fi
11312
da0f6381
PB
11313ac_prog=ld
11314if test "$GCC" = yes; then
11315 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
11317$as_echo_n "checking for ld used by $CC... " >&6; }
da0f6381
PB
11318 case $host in
11319 *-*-mingw*)
11320 # gcc leaves a trailing carriage return which upsets mingw
11321 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11322 *)
11323 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11324 esac
11325 case $ac_prog in
11326 # Accept absolute paths.
11327 [\\/]* | ?:[\\/]*)
11328 re_direlt='/[^/][^/]*/\.\./'
11329 # Canonicalize the pathname of ld
11330 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
11331 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
11332 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
11333 done
11334 test -z "$LD" && LD="$ac_prog"
11335 ;;
11336 "")
11337 # If it fails, then pretend we aren't using GCC.
11338 ac_prog=ld
11339 ;;
11340 *)
11341 # If it is relative, then search for the first ld in PATH.
11342 with_gnu_ld=unknown
11343 ;;
11344 esac
11345elif test "$with_gnu_ld" = yes; then
5213506e
RW
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
11347$as_echo_n "checking for GNU ld... " >&6; }
da0f6381 11348else
5213506e
RW
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
11350$as_echo_n "checking for non-GNU ld... " >&6; }
da0f6381 11351fi
5213506e
RW
11352if test "${lt_cv_path_LD+set}" = set; then :
11353 $as_echo_n "(cached) " >&6
da0f6381
PB
11354else
11355 if test -z "$LD"; then
11356 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11357 for ac_dir in $PATH; do
11358 IFS="$lt_save_ifs"
11359 test -z "$ac_dir" && ac_dir=.
11360 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11361 lt_cv_path_LD="$ac_dir/$ac_prog"
11362 # Check to see if the program is GNU ld. I'd rather use --version,
11363 # but apparently some variants of GNU ld only accept -v.
11364 # Break only if it was the GNU/non-GNU ld that we prefer.
11365 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
11366 *GNU* | *'with BFD'*)
11367 test "$with_gnu_ld" != no && break
11368 ;;
11369 *)
11370 test "$with_gnu_ld" != yes && break
11371 ;;
11372 esac
11373 fi
11374 done
11375 IFS="$lt_save_ifs"
11376else
11377 lt_cv_path_LD="$LD" # Let the user override the test with a path.
11378fi
11379fi
11380
11381LD="$lt_cv_path_LD"
11382if test -n "$LD"; then
5213506e
RW
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11384$as_echo "$LD" >&6; }
da0f6381 11385else
5213506e
RW
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11387$as_echo "no" >&6; }
da0f6381 11388fi
5213506e
RW
11389test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
11390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
11391$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
11392if test "${lt_cv_prog_gnu_ld+set}" = set; then :
11393 $as_echo_n "(cached) " >&6
da0f6381
PB
11394else
11395 # I'd rather use --version here, but apparently some GNU lds only accept -v.
11396case `$LD -v 2>&1 </dev/null` in
11397*GNU* | *'with BFD'*)
11398 lt_cv_prog_gnu_ld=yes
11399 ;;
11400*)
11401 lt_cv_prog_gnu_ld=no
11402 ;;
11403esac
11404fi
5213506e
RW
11405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
11406$as_echo "$lt_cv_prog_gnu_ld" >&6; }
da0f6381
PB
11407with_gnu_ld=$lt_cv_prog_gnu_ld
11408
11409
11410
11411
11412
11413
11414
11415
11416
5213506e
RW
11417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
11418$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
11419if test "${lt_cv_path_NM+set}" = set; then :
11420 $as_echo_n "(cached) " >&6
da0f6381
PB
11421else
11422 if test -n "$NM"; then
11423 # Let the user override the test.
11424 lt_cv_path_NM="$NM"
11425else
11426 lt_nm_to_check="${ac_tool_prefix}nm"
11427 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
11428 lt_nm_to_check="$lt_nm_to_check nm"
11429 fi
11430 for lt_tmp_nm in $lt_nm_to_check; do
11431 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11432 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
11433 IFS="$lt_save_ifs"
11434 test -z "$ac_dir" && ac_dir=.
11435 tmp_nm="$ac_dir/$lt_tmp_nm"
11436 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
11437 # Check to see if the nm accepts a BSD-compat flag.
11438 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
11439 # nm: unknown option "B" ignored
11440 # Tru64's nm complains that /dev/null is an invalid object file
11441 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
11442 */dev/null* | *'Invalid file or object type'*)
11443 lt_cv_path_NM="$tmp_nm -B"
11444 break
11445 ;;
11446 *)
11447 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
11448 */dev/null*)
11449 lt_cv_path_NM="$tmp_nm -p"
11450 break
11451 ;;
11452 *)
11453 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
11454 continue # so that we can try to find one that supports BSD flags
11455 ;;
11456 esac
11457 ;;
11458 esac
11459 fi
11460 done
11461 IFS="$lt_save_ifs"
11462 done
11463 : ${lt_cv_path_NM=no}
11464fi
11465fi
5213506e
RW
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
11467$as_echo "$lt_cv_path_NM" >&6; }
da0f6381
PB
11468if test "$lt_cv_path_NM" != "no"; then
11469 NM="$lt_cv_path_NM"
11470else
11471 # Didn't find any BSD compatible name lister, look for dumpbin.
43e02a8a
RW
11472 if test -n "$DUMPBIN"; then :
11473 # Let the user override the test.
11474 else
11475 if test -n "$ac_tool_prefix"; then
11476 for ac_prog in dumpbin "link -dump"
da0f6381
PB
11477 do
11478 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11479set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11481$as_echo_n "checking for $ac_word... " >&6; }
11482if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
11483 $as_echo_n "(cached) " >&6
da0f6381
PB
11484else
11485 if test -n "$DUMPBIN"; then
11486 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
11487else
11488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11489for as_dir in $PATH
11490do
11491 IFS=$as_save_IFS
11492 test -z "$as_dir" && as_dir=.
5213506e
RW
11493 for ac_exec_ext in '' $ac_executable_extensions; do
11494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11495 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5213506e 11496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11497 break 2
11498 fi
11499done
5213506e
RW
11500 done
11501IFS=$as_save_IFS
da0f6381
PB
11502
11503fi
11504fi
11505DUMPBIN=$ac_cv_prog_DUMPBIN
11506if test -n "$DUMPBIN"; then
5213506e
RW
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
11508$as_echo "$DUMPBIN" >&6; }
da0f6381 11509else
5213506e
RW
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11511$as_echo "no" >&6; }
da0f6381
PB
11512fi
11513
5213506e 11514
da0f6381
PB
11515 test -n "$DUMPBIN" && break
11516 done
11517fi
11518if test -z "$DUMPBIN"; then
11519 ac_ct_DUMPBIN=$DUMPBIN
43e02a8a 11520 for ac_prog in dumpbin "link -dump"
da0f6381
PB
11521do
11522 # Extract the first word of "$ac_prog", so it can be a program name with args.
11523set dummy $ac_prog; ac_word=$2
5213506e
RW
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11525$as_echo_n "checking for $ac_word... " >&6; }
11526if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
11527 $as_echo_n "(cached) " >&6
da0f6381
PB
11528else
11529 if test -n "$ac_ct_DUMPBIN"; then
11530 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
11531else
11532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11533for as_dir in $PATH
11534do
11535 IFS=$as_save_IFS
11536 test -z "$as_dir" && as_dir=.
5213506e
RW
11537 for ac_exec_ext in '' $ac_executable_extensions; do
11538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11539 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5213506e 11540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11541 break 2
11542 fi
11543done
5213506e
RW
11544 done
11545IFS=$as_save_IFS
da0f6381
PB
11546
11547fi
11548fi
11549ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
11550if test -n "$ac_ct_DUMPBIN"; then
5213506e
RW
11551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
11552$as_echo "$ac_ct_DUMPBIN" >&6; }
da0f6381 11553else
5213506e
RW
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11555$as_echo "no" >&6; }
da0f6381
PB
11556fi
11557
5213506e 11558
da0f6381
PB
11559 test -n "$ac_ct_DUMPBIN" && break
11560done
da0f6381 11561
5213506e
RW
11562 if test "x$ac_ct_DUMPBIN" = x; then
11563 DUMPBIN=":"
11564 else
11565 case $cross_compiling:$ac_tool_warned in
11566yes:)
11567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11569ac_tool_warned=yes ;;
11570esac
11571 DUMPBIN=$ac_ct_DUMPBIN
11572 fi
da0f6381
PB
11573fi
11574
43e02a8a
RW
11575 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
11576 *COFF*)
11577 DUMPBIN="$DUMPBIN -symbols"
11578 ;;
11579 *)
11580 DUMPBIN=:
11581 ;;
11582 esac
11583 fi
da0f6381
PB
11584
11585 if test "$DUMPBIN" != ":"; then
11586 NM="$DUMPBIN"
11587 fi
11588fi
11589test -z "$NM" && NM=nm
11590
11591
11592
11593
11594
11595
5213506e
RW
11596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
11597$as_echo_n "checking the name lister ($NM) interface... " >&6; }
11598if test "${lt_cv_nm_interface+set}" = set; then :
11599 $as_echo_n "(cached) " >&6
da0f6381
PB
11600else
11601 lt_cv_nm_interface="BSD nm"
11602 echo "int some_variable = 0;" > conftest.$ac_ext
43e02a8a 11603 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
da0f6381
PB
11604 (eval "$ac_compile" 2>conftest.err)
11605 cat conftest.err >&5
43e02a8a 11606 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
11607 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
11608 cat conftest.err >&5
43e02a8a 11609 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
da0f6381
PB
11610 cat conftest.out >&5
11611 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
11612 lt_cv_nm_interface="MS dumpbin"
11613 fi
11614 rm -f conftest*
11615fi
5213506e
RW
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
11617$as_echo "$lt_cv_nm_interface" >&6; }
da0f6381 11618
5213506e
RW
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
11620$as_echo_n "checking whether ln -s works... " >&6; }
da0f6381
PB
11621LN_S=$as_ln_s
11622if test "$LN_S" = "ln -s"; then
5213506e
RW
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11624$as_echo "yes" >&6; }
da0f6381 11625else
5213506e
RW
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
11627$as_echo "no, using $LN_S" >&6; }
da0f6381
PB
11628fi
11629
11630# find the maximum length of command line arguments
5213506e
RW
11631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
11632$as_echo_n "checking the maximum length of command line arguments... " >&6; }
11633if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
11634 $as_echo_n "(cached) " >&6
da0f6381
PB
11635else
11636 i=0
11637 teststring="ABCD"
11638
11639 case $build_os in
11640 msdosdjgpp*)
11641 # On DJGPP, this test can blow up pretty badly due to problems in libc
11642 # (any single argument exceeding 2000 bytes causes a buffer overrun
11643 # during glob expansion). Even if it were fixed, the result of this
11644 # check would be larger than it should be.
11645 lt_cv_sys_max_cmd_len=12288; # 12K is about right
11646 ;;
11647
11648 gnu*)
11649 # Under GNU Hurd, this test is not required because there is
11650 # no limit to the length of command line arguments.
11651 # Libtool will interpret -1 as no limit whatsoever
11652 lt_cv_sys_max_cmd_len=-1;
11653 ;;
11654
5d47bb02 11655 cygwin* | mingw* | cegcc*)
da0f6381
PB
11656 # On Win9x/ME, this test blows up -- it succeeds, but takes
11657 # about 5 minutes as the teststring grows exponentially.
11658 # Worse, since 9x/ME are not pre-emptively multitasking,
11659 # you end up with a "frozen" computer, even though with patience
11660 # the test eventually succeeds (with a max line length of 256k).
11661 # Instead, let's just punt: use the minimum linelength reported by
11662 # all of the supported platforms: 8192 (on NT/2K/XP).
11663 lt_cv_sys_max_cmd_len=8192;
11664 ;;
11665
43e02a8a
RW
11666 mint*)
11667 # On MiNT this can take a long time and run out of memory.
11668 lt_cv_sys_max_cmd_len=8192;
11669 ;;
11670
da0f6381
PB
11671 amigaos*)
11672 # On AmigaOS with pdksh, this test takes hours, literally.
11673 # So we just punt and use a minimum line length of 8192.
11674 lt_cv_sys_max_cmd_len=8192;
11675 ;;
11676
11677 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
11678 # This has been around since 386BSD, at least. Likely further.
11679 if test -x /sbin/sysctl; then
11680 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
11681 elif test -x /usr/sbin/sysctl; then
11682 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
11683 else
11684 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
11685 fi
11686 # And add a safety zone
11687 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11688 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11689 ;;
11690
11691 interix*)
11692 # We know the value 262144 and hardcode it with a safety zone (like BSD)
11693 lt_cv_sys_max_cmd_len=196608
11694 ;;
11695
11696 osf*)
11697 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
11698 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
11699 # nice to cause kernel panics so lets avoid the loop below.
11700 # First set a reasonable default.
11701 lt_cv_sys_max_cmd_len=16384
11702 #
11703 if test -x /sbin/sysconfig; then
11704 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
11705 *1*) lt_cv_sys_max_cmd_len=-1 ;;
11706 esac
11707 fi
11708 ;;
11709 sco3.2v5*)
11710 lt_cv_sys_max_cmd_len=102400
11711 ;;
11712 sysv5* | sco5v6* | sysv4.2uw2*)
11713 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
11714 if test -n "$kargmax"; then
11715 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
11716 else
11717 lt_cv_sys_max_cmd_len=32768
11718 fi
11719 ;;
11720 *)
5d47bb02
PG
11721 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
11722 if test -n "$lt_cv_sys_max_cmd_len"; then
da0f6381
PB
11723 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11724 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11725 else
11726 # Make teststring a little bigger before we do anything with it.
11727 # a 1K string should be a reasonable start.
11728 for i in 1 2 3 4 5 6 7 8 ; do
11729 teststring=$teststring$teststring
11730 done
11731 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
11732 # If test is not a shell built-in, we'll probably end up computing a
11733 # maximum length that is only half of the actual maximum length, but
11734 # we can't tell.
43e02a8a
RW
11735 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
11736 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
da0f6381
PB
11737 test $i != 17 # 1/2 MB should be enough
11738 do
11739 i=`expr $i + 1`
11740 teststring=$teststring$teststring
11741 done
11742 # Only check the string length outside the loop.
11743 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
11744 teststring=
11745 # Add a significant safety factor because C++ compilers can tack on
11746 # massive amounts of additional arguments before passing them to the
11747 # linker. It appears as though 1/2 is a usable value.
11748 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
11749 fi
11750 ;;
11751 esac
11752
11753fi
11754
11755if test -n $lt_cv_sys_max_cmd_len ; then
5213506e
RW
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
11757$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
da0f6381 11758else
5213506e
RW
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11760$as_echo "none" >&6; }
da0f6381
PB
11761fi
11762max_cmd_len=$lt_cv_sys_max_cmd_len
11763
11764
11765
11766
11767
11768
da0f6381
PB
11769: ${CP="cp -f"}
11770: ${MV="mv -f"}
11771: ${RM="rm -f"}
11772
5213506e
RW
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
11774$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
da0f6381
PB
11775# Try some XSI features
11776xsi_shell=no
11777( _lt_dummy="a/b/c"
11778 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5d47bb02
PG
11779 = c,a/b,, \
11780 && eval 'test $(( 1 + 1 )) -eq 2 \
11781 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
da0f6381 11782 && xsi_shell=yes
5213506e
RW
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
11784$as_echo "$xsi_shell" >&6; }
da0f6381
PB
11785
11786
5213506e
RW
11787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
11788$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
da0f6381
PB
11789lt_shell_append=no
11790( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
11791 >/dev/null 2>&1 \
11792 && lt_shell_append=yes
5213506e
RW
11793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
11794$as_echo "$lt_shell_append" >&6; }
da0f6381
PB
11795
11796
11797if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11798 lt_unset=unset
11799else
11800 lt_unset=false
11801fi
11802
11803
11804
11805
11806
11807# test EBCDIC or ASCII
11808case `echo X|tr X '\101'` in
11809 A) # ASCII based system
11810 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
11811 lt_SP2NL='tr \040 \012'
11812 lt_NL2SP='tr \015\012 \040\040'
11813 ;;
11814 *) # EBCDIC based system
11815 lt_SP2NL='tr \100 \n'
11816 lt_NL2SP='tr \r\n \100\100'
11817 ;;
11818esac
11819
11820
11821
11822
11823
11824
11825
11826
11827
5213506e
RW
11828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
11829$as_echo_n "checking for $LD option to reload object files... " >&6; }
11830if test "${lt_cv_ld_reload_flag+set}" = set; then :
11831 $as_echo_n "(cached) " >&6
da0f6381
PB
11832else
11833 lt_cv_ld_reload_flag='-r'
11834fi
5213506e
RW
11835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
11836$as_echo "$lt_cv_ld_reload_flag" >&6; }
da0f6381
PB
11837reload_flag=$lt_cv_ld_reload_flag
11838case $reload_flag in
11839"" | " "*) ;;
11840*) reload_flag=" $reload_flag" ;;
11841esac
11842reload_cmds='$LD$reload_flag -o $output$reload_objs'
11843case $host_os in
11844 darwin*)
11845 if test "$GCC" = yes; then
11846 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
11847 else
11848 reload_cmds='$LD$reload_flag -o $output$reload_objs'
11849 fi
11850 ;;
11851esac
11852
11853
11854
11855
11856
11857
11858
11859
11860
5d47bb02
PG
11861if test -n "$ac_tool_prefix"; then
11862 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
11863set dummy ${ac_tool_prefix}objdump; ac_word=$2
5213506e
RW
11864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11865$as_echo_n "checking for $ac_word... " >&6; }
11866if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
11867 $as_echo_n "(cached) " >&6
5d47bb02
PG
11868else
11869 if test -n "$OBJDUMP"; then
11870 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
11871else
11872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11873for as_dir in $PATH
11874do
11875 IFS=$as_save_IFS
11876 test -z "$as_dir" && as_dir=.
5213506e
RW
11877 for ac_exec_ext in '' $ac_executable_extensions; do
11878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11879 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5213506e 11880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11881 break 2
11882 fi
11883done
5213506e
RW
11884 done
11885IFS=$as_save_IFS
5d47bb02
PG
11886
11887fi
11888fi
11889OBJDUMP=$ac_cv_prog_OBJDUMP
11890if test -n "$OBJDUMP"; then
5213506e
RW
11891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
11892$as_echo "$OBJDUMP" >&6; }
5d47bb02 11893else
5213506e
RW
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
5d47bb02
PG
11896fi
11897
5213506e 11898
5d47bb02
PG
11899fi
11900if test -z "$ac_cv_prog_OBJDUMP"; then
11901 ac_ct_OBJDUMP=$OBJDUMP
11902 # Extract the first word of "objdump", so it can be a program name with args.
11903set dummy objdump; ac_word=$2
5213506e
RW
11904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11905$as_echo_n "checking for $ac_word... " >&6; }
11906if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
11907 $as_echo_n "(cached) " >&6
5d47bb02
PG
11908else
11909 if test -n "$ac_ct_OBJDUMP"; then
11910 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
11911else
11912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11913for as_dir in $PATH
11914do
11915 IFS=$as_save_IFS
11916 test -z "$as_dir" && as_dir=.
5213506e
RW
11917 for ac_exec_ext in '' $ac_executable_extensions; do
11918 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11919 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5213506e 11920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11921 break 2
11922 fi
11923done
5213506e
RW
11924 done
11925IFS=$as_save_IFS
5d47bb02 11926
5d47bb02
PG
11927fi
11928fi
11929ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
11930if test -n "$ac_ct_OBJDUMP"; then
5213506e
RW
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
11932$as_echo "$ac_ct_OBJDUMP" >&6; }
5d47bb02 11933else
5213506e
RW
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11935$as_echo "no" >&6; }
5d47bb02
PG
11936fi
11937
5213506e
RW
11938 if test "x$ac_ct_OBJDUMP" = x; then
11939 OBJDUMP="false"
11940 else
11941 case $cross_compiling:$ac_tool_warned in
11942yes:)
11943{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11944$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11945ac_tool_warned=yes ;;
11946esac
11947 OBJDUMP=$ac_ct_OBJDUMP
11948 fi
5d47bb02
PG
11949else
11950 OBJDUMP="$ac_cv_prog_OBJDUMP"
11951fi
11952
11953test -z "$OBJDUMP" && OBJDUMP=objdump
11954
11955
11956
11957
11958
11959
11960
11961
da0f6381 11962
5213506e
RW
11963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
11964$as_echo_n "checking how to recognize dependent libraries... " >&6; }
11965if test "${lt_cv_deplibs_check_method+set}" = set; then :
11966 $as_echo_n "(cached) " >&6
da0f6381
PB
11967else
11968 lt_cv_file_magic_cmd='$MAGIC_CMD'
11969lt_cv_file_magic_test_file=
11970lt_cv_deplibs_check_method='unknown'
11971# Need to set the preceding variable on all platforms that support
11972# interlibrary dependencies.
11973# 'none' -- dependencies not supported.
11974# `unknown' -- same as none, but documents that we really don't know.
11975# 'pass_all' -- all dependencies passed with no checks.
11976# 'test_compile' -- check by making test program.
11977# 'file_magic [[regex]]' -- check by looking for files in library path
11978# which responds to the $file_magic_cmd with a given extended regex.
11979# If you have `file' or equivalent on your system and you're not sure
11980# whether `pass_all' will *always* work, you probably want this one.
11981
11982case $host_os in
11983aix[4-9]*)
11984 lt_cv_deplibs_check_method=pass_all
11985 ;;
11986
11987beos*)
11988 lt_cv_deplibs_check_method=pass_all
11989 ;;
11990
11991bsdi[45]*)
11992 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
11993 lt_cv_file_magic_cmd='/usr/bin/file -L'
11994 lt_cv_file_magic_test_file=/shlib/libc.so
11995 ;;
11996
11997cygwin*)
11998 # func_win32_libid is a shell function defined in ltmain.sh
11999 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
12000 lt_cv_file_magic_cmd='func_win32_libid'
12001 ;;
12002
12003mingw* | pw32*)
12004 # Base MSYS/MinGW do not provide the 'file' command needed by
12005 # func_win32_libid shell function, so use a weaker test based on 'objdump',
12006 # unless we find 'file', for example because we are cross-compiling.
43e02a8a
RW
12007 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
12008 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
da0f6381
PB
12009 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
12010 lt_cv_file_magic_cmd='func_win32_libid'
12011 else
12012 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
12013 lt_cv_file_magic_cmd='$OBJDUMP -f'
12014 fi
12015 ;;
12016
43e02a8a 12017cegcc*)
5d47bb02
PG
12018 # use the weaker test based on 'objdump'. See mingw*.
12019 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
12020 lt_cv_file_magic_cmd='$OBJDUMP -f'
12021 ;;
12022
da0f6381
PB
12023darwin* | rhapsody*)
12024 lt_cv_deplibs_check_method=pass_all
12025 ;;
12026
12027freebsd* | dragonfly*)
12028 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
12029 case $host_cpu in
12030 i*86 )
12031 # Not sure whether the presence of OpenBSD here was a mistake.
12032 # Let's accept both of them until this is cleared up.
12033 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
12034 lt_cv_file_magic_cmd=/usr/bin/file
12035 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
12036 ;;
12037 esac
12038 else
12039 lt_cv_deplibs_check_method=pass_all
12040 fi
12041 ;;
12042
12043gnu*)
12044 lt_cv_deplibs_check_method=pass_all
12045 ;;
12046
43e02a8a
RW
12047haiku*)
12048 lt_cv_deplibs_check_method=pass_all
12049 ;;
12050
da0f6381
PB
12051hpux10.20* | hpux11*)
12052 lt_cv_file_magic_cmd=/usr/bin/file
12053 case $host_cpu in
12054 ia64*)
12055 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
12056 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
12057 ;;
12058 hppa*64*)
43e02a8a 12059 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
da0f6381
PB
12060 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
12061 ;;
12062 *)
43e02a8a 12063 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
da0f6381
PB
12064 lt_cv_file_magic_test_file=/usr/lib/libc.sl
12065 ;;
12066 esac
12067 ;;
12068
12069interix[3-9]*)
12070 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
12071 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
12072 ;;
12073
12074irix5* | irix6* | nonstopux*)
12075 case $LD in
12076 *-32|*"-32 ") libmagic=32-bit;;
12077 *-n32|*"-n32 ") libmagic=N32;;
12078 *-64|*"-64 ") libmagic=64-bit;;
12079 *) libmagic=never-match;;
12080 esac
12081 lt_cv_deplibs_check_method=pass_all
12082 ;;
12083
12084# This must be Linux ELF.
7a9d3fe8 12085linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
12086 lt_cv_deplibs_check_method=pass_all
12087 ;;
12088
12089netbsd*)
12090 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
12091 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12092 else
12093 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
12094 fi
12095 ;;
12096
12097newos6*)
12098 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
12099 lt_cv_file_magic_cmd=/usr/bin/file
12100 lt_cv_file_magic_test_file=/usr/lib/libnls.so
12101 ;;
12102
12103*nto* | *qnx*)
12104 lt_cv_deplibs_check_method=pass_all
12105 ;;
12106
12107openbsd*)
12108 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12109 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
12110 else
12111 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12112 fi
12113 ;;
12114
12115osf3* | osf4* | osf5*)
12116 lt_cv_deplibs_check_method=pass_all
12117 ;;
12118
12119rdos*)
12120 lt_cv_deplibs_check_method=pass_all
12121 ;;
12122
12123solaris*)
12124 lt_cv_deplibs_check_method=pass_all
12125 ;;
12126
12127sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12128 lt_cv_deplibs_check_method=pass_all
12129 ;;
12130
12131sysv4 | sysv4.3*)
12132 case $host_vendor in
12133 motorola)
12134 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]'
12135 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
12136 ;;
12137 ncr)
12138 lt_cv_deplibs_check_method=pass_all
12139 ;;
12140 sequent)
12141 lt_cv_file_magic_cmd='/bin/file'
12142 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
12143 ;;
12144 sni)
12145 lt_cv_file_magic_cmd='/bin/file'
12146 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
12147 lt_cv_file_magic_test_file=/lib/libc.so
12148 ;;
12149 siemens)
12150 lt_cv_deplibs_check_method=pass_all
12151 ;;
12152 pc)
12153 lt_cv_deplibs_check_method=pass_all
12154 ;;
12155 esac
12156 ;;
12157
12158tpf*)
12159 lt_cv_deplibs_check_method=pass_all
12160 ;;
12161esac
12162
12163fi
5213506e
RW
12164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
12165$as_echo "$lt_cv_deplibs_check_method" >&6; }
da0f6381
PB
12166file_magic_cmd=$lt_cv_file_magic_cmd
12167deplibs_check_method=$lt_cv_deplibs_check_method
12168test -z "$deplibs_check_method" && deplibs_check_method=unknown
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181if test -n "$ac_tool_prefix"; then
12182 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
12183set dummy ${ac_tool_prefix}ar; ac_word=$2
5213506e
RW
12184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185$as_echo_n "checking for $ac_word... " >&6; }
12186if test "${ac_cv_prog_AR+set}" = set; then :
12187 $as_echo_n "(cached) " >&6
da0f6381
PB
12188else
12189 if test -n "$AR"; then
12190 ac_cv_prog_AR="$AR" # Let the user override the test.
12191else
12192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12193for as_dir in $PATH
12194do
12195 IFS=$as_save_IFS
12196 test -z "$as_dir" && as_dir=.
5213506e
RW
12197 for ac_exec_ext in '' $ac_executable_extensions; do
12198 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12199 ac_cv_prog_AR="${ac_tool_prefix}ar"
5213506e 12200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12201 break 2
12202 fi
12203done
5213506e
RW
12204 done
12205IFS=$as_save_IFS
da0f6381
PB
12206
12207fi
12208fi
12209AR=$ac_cv_prog_AR
12210if test -n "$AR"; then
5213506e
RW
12211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
12212$as_echo "$AR" >&6; }
da0f6381 12213else
5213506e
RW
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12215$as_echo "no" >&6; }
da0f6381
PB
12216fi
12217
5213506e 12218
da0f6381
PB
12219fi
12220if test -z "$ac_cv_prog_AR"; then
12221 ac_ct_AR=$AR
12222 # Extract the first word of "ar", so it can be a program name with args.
12223set dummy ar; ac_word=$2
5213506e
RW
12224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12225$as_echo_n "checking for $ac_word... " >&6; }
12226if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
12227 $as_echo_n "(cached) " >&6
da0f6381
PB
12228else
12229 if test -n "$ac_ct_AR"; then
12230 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
12231else
12232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12233for as_dir in $PATH
12234do
12235 IFS=$as_save_IFS
12236 test -z "$as_dir" && as_dir=.
5213506e
RW
12237 for ac_exec_ext in '' $ac_executable_extensions; do
12238 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12239 ac_cv_prog_ac_ct_AR="ar"
5213506e 12240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12241 break 2
12242 fi
12243done
5213506e
RW
12244 done
12245IFS=$as_save_IFS
da0f6381 12246
da0f6381
PB
12247fi
12248fi
12249ac_ct_AR=$ac_cv_prog_ac_ct_AR
12250if test -n "$ac_ct_AR"; then
5213506e
RW
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
12252$as_echo "$ac_ct_AR" >&6; }
da0f6381 12253else
5213506e
RW
12254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12255$as_echo "no" >&6; }
da0f6381
PB
12256fi
12257
5213506e
RW
12258 if test "x$ac_ct_AR" = x; then
12259 AR="false"
12260 else
12261 case $cross_compiling:$ac_tool_warned in
12262yes:)
12263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12265ac_tool_warned=yes ;;
12266esac
12267 AR=$ac_ct_AR
12268 fi
da0f6381
PB
12269else
12270 AR="$ac_cv_prog_AR"
12271fi
12272
12273test -z "$AR" && AR=ar
12274test -z "$AR_FLAGS" && AR_FLAGS=cru
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286if test -n "$ac_tool_prefix"; then
12287 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
12288set dummy ${ac_tool_prefix}strip; ac_word=$2
5213506e
RW
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12290$as_echo_n "checking for $ac_word... " >&6; }
12291if test "${ac_cv_prog_STRIP+set}" = set; then :
12292 $as_echo_n "(cached) " >&6
da0f6381
PB
12293else
12294 if test -n "$STRIP"; then
12295 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
12296else
12297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12298for as_dir in $PATH
12299do
12300 IFS=$as_save_IFS
12301 test -z "$as_dir" && as_dir=.
5213506e
RW
12302 for ac_exec_ext in '' $ac_executable_extensions; do
12303 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12304 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5213506e 12305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12306 break 2
12307 fi
12308done
5213506e
RW
12309 done
12310IFS=$as_save_IFS
da0f6381
PB
12311
12312fi
12313fi
12314STRIP=$ac_cv_prog_STRIP
12315if test -n "$STRIP"; then
5213506e
RW
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
12317$as_echo "$STRIP" >&6; }
da0f6381 12318else
5213506e
RW
12319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12320$as_echo "no" >&6; }
da0f6381
PB
12321fi
12322
5213506e 12323
da0f6381
PB
12324fi
12325if test -z "$ac_cv_prog_STRIP"; then
12326 ac_ct_STRIP=$STRIP
12327 # Extract the first word of "strip", so it can be a program name with args.
12328set dummy strip; ac_word=$2
5213506e
RW
12329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12330$as_echo_n "checking for $ac_word... " >&6; }
12331if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
12332 $as_echo_n "(cached) " >&6
da0f6381
PB
12333else
12334 if test -n "$ac_ct_STRIP"; then
12335 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
12336else
12337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12338for as_dir in $PATH
12339do
12340 IFS=$as_save_IFS
12341 test -z "$as_dir" && as_dir=.
5213506e
RW
12342 for ac_exec_ext in '' $ac_executable_extensions; do
12343 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12344 ac_cv_prog_ac_ct_STRIP="strip"
5213506e 12345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12346 break 2
12347 fi
12348done
5213506e
RW
12349 done
12350IFS=$as_save_IFS
da0f6381 12351
da0f6381
PB
12352fi
12353fi
12354ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
12355if test -n "$ac_ct_STRIP"; then
5213506e
RW
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
12357$as_echo "$ac_ct_STRIP" >&6; }
da0f6381 12358else
5213506e
RW
12359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12360$as_echo "no" >&6; }
da0f6381
PB
12361fi
12362
5213506e
RW
12363 if test "x$ac_ct_STRIP" = x; then
12364 STRIP=":"
12365 else
12366 case $cross_compiling:$ac_tool_warned in
12367yes:)
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12369$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12370ac_tool_warned=yes ;;
12371esac
12372 STRIP=$ac_ct_STRIP
12373 fi
da0f6381
PB
12374else
12375 STRIP="$ac_cv_prog_STRIP"
12376fi
12377
12378test -z "$STRIP" && STRIP=:
12379
12380
12381
12382
12383
12384
12385if test -n "$ac_tool_prefix"; then
12386 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
12387set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
12388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12389$as_echo_n "checking for $ac_word... " >&6; }
12390if test "${ac_cv_prog_RANLIB+set}" = set; then :
12391 $as_echo_n "(cached) " >&6
da0f6381
PB
12392else
12393 if test -n "$RANLIB"; then
12394 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
12395else
12396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12397for as_dir in $PATH
12398do
12399 IFS=$as_save_IFS
12400 test -z "$as_dir" && as_dir=.
5213506e
RW
12401 for ac_exec_ext in '' $ac_executable_extensions; do
12402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12403 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 12404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12405 break 2
12406 fi
12407done
5213506e
RW
12408 done
12409IFS=$as_save_IFS
da0f6381
PB
12410
12411fi
12412fi
12413RANLIB=$ac_cv_prog_RANLIB
12414if test -n "$RANLIB"; then
5213506e
RW
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
12416$as_echo "$RANLIB" >&6; }
da0f6381 12417else
5213506e
RW
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12419$as_echo "no" >&6; }
da0f6381
PB
12420fi
12421
5213506e 12422
da0f6381
PB
12423fi
12424if test -z "$ac_cv_prog_RANLIB"; then
12425 ac_ct_RANLIB=$RANLIB
12426 # Extract the first word of "ranlib", so it can be a program name with args.
12427set dummy ranlib; ac_word=$2
5213506e
RW
12428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12429$as_echo_n "checking for $ac_word... " >&6; }
12430if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
12431 $as_echo_n "(cached) " >&6
da0f6381
PB
12432else
12433 if test -n "$ac_ct_RANLIB"; then
12434 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
12435else
12436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12437for as_dir in $PATH
12438do
12439 IFS=$as_save_IFS
12440 test -z "$as_dir" && as_dir=.
5213506e
RW
12441 for ac_exec_ext in '' $ac_executable_extensions; do
12442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12443 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 12444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12445 break 2
12446 fi
12447done
5213506e
RW
12448 done
12449IFS=$as_save_IFS
da0f6381 12450
da0f6381
PB
12451fi
12452fi
12453ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
12454if test -n "$ac_ct_RANLIB"; then
5213506e
RW
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
12456$as_echo "$ac_ct_RANLIB" >&6; }
da0f6381 12457else
5213506e
RW
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
da0f6381
PB
12460fi
12461
5213506e
RW
12462 if test "x$ac_ct_RANLIB" = x; then
12463 RANLIB=":"
12464 else
12465 case $cross_compiling:$ac_tool_warned in
12466yes:)
12467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12469ac_tool_warned=yes ;;
12470esac
12471 RANLIB=$ac_ct_RANLIB
12472 fi
da0f6381
PB
12473else
12474 RANLIB="$ac_cv_prog_RANLIB"
12475fi
12476
12477test -z "$RANLIB" && RANLIB=:
12478
12479
12480
12481
12482
12483
12484# Determine commands to create old-style static archives.
5d47bb02 12485old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
da0f6381
PB
12486old_postinstall_cmds='chmod 644 $oldlib'
12487old_postuninstall_cmds=
12488
12489if test -n "$RANLIB"; then
12490 case $host_os in
12491 openbsd*)
12492 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
12493 ;;
12494 *)
12495 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
12496 ;;
12497 esac
12498 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
12499fi
12500
43e02a8a
RW
12501case $host_os in
12502 darwin*)
12503 lock_old_archive_extraction=yes ;;
12504 *)
12505 lock_old_archive_extraction=no ;;
12506esac
12507
12508
12509
12510
12511
12512
da0f6381
PB
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546# If no C compiler was specified, use CC.
12547LTCC=${LTCC-"$CC"}
12548
12549# If no C compiler flags were specified, use CFLAGS.
12550LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12551
12552# Allow CC to be a program name with arguments.
12553compiler=$CC
12554
12555
12556# Check for command to grab the raw symbol name followed by C symbol from nm.
5213506e
RW
12557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
12558$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
12559if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
12560 $as_echo_n "(cached) " >&6
da0f6381
PB
12561else
12562
12563# These are sane defaults that work on at least a few old systems.
12564# [They come from Ultrix. What could be older than Ultrix?!! ;)]
12565
12566# Character class describing NM global symbol codes.
12567symcode='[BCDEGRST]'
12568
12569# Regexp to match symbols that can be accessed directly from C.
12570sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
12571
12572# Define system-specific variables.
12573case $host_os in
12574aix*)
12575 symcode='[BCDT]'
12576 ;;
5d47bb02 12577cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
12578 symcode='[ABCDGISTW]'
12579 ;;
12580hpux*)
12581 if test "$host_cpu" = ia64; then
12582 symcode='[ABCDEGRST]'
12583 fi
12584 ;;
12585irix* | nonstopux*)
12586 symcode='[BCDEGRST]'
12587 ;;
12588osf*)
12589 symcode='[BCDEGQRST]'
12590 ;;
12591solaris*)
12592 symcode='[BDRT]'
12593 ;;
12594sco3.2v5*)
12595 symcode='[DT]'
12596 ;;
12597sysv4.2uw2*)
12598 symcode='[DT]'
12599 ;;
12600sysv5* | sco5v6* | unixware* | OpenUNIX*)
12601 symcode='[ABDT]'
12602 ;;
12603sysv4)
12604 symcode='[DFNSTU]'
12605 ;;
12606esac
12607
12608# If we're using GNU nm, then use its standard symbol codes.
12609case `$NM -V 2>&1` in
12610*GNU* | *'with BFD'*)
12611 symcode='[ABCDGIRSTW]' ;;
12612esac
12613
12614# Transform an extracted symbol line into a proper C declaration.
12615# Some systems (esp. on ia64) link data and code symbols differently,
12616# so use this general approach.
12617lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
12618
12619# Transform an extracted symbol line into symbol name and symbol address
12620lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5d47bb02 12621lt_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
12622
12623# Handle CRLF in mingw tool chain
12624opt_cr=
12625case $build_os in
12626mingw*)
12627 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
12628 ;;
12629esac
12630
12631# Try without a prefix underscore, then with it.
12632for ac_symprfx in "" "_"; do
12633
12634 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
12635 symxfrm="\\1 $ac_symprfx\\2 \\2"
12636
12637 # Write the raw and C identifiers.
12638 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
12639 # Fake it for dumpbin and say T for any non-static function
12640 # and D for any global variable.
12641 # Also find C++ and __fastcall symbols from MSVC++,
12642 # which start with @ or ?.
12643 lt_cv_sys_global_symbol_pipe="$AWK '"\
12644" {last_section=section; section=\$ 3};"\
12645" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
12646" \$ 0!~/External *\|/{next};"\
12647" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
12648" {if(hide[section]) next};"\
12649" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
12650" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
12651" s[1]~/^[@?]/{print s[1], s[1]; next};"\
12652" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
12653" ' prfx=^$ac_symprfx"
12654 else
12655 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
12656 fi
12657
12658 # Check to see that the pipe works correctly.
12659 pipe_works=no
12660
12661 rm -f conftest*
12662 cat > conftest.$ac_ext <<_LT_EOF
12663#ifdef __cplusplus
12664extern "C" {
12665#endif
12666char nm_test_var;
12667void nm_test_func(void);
12668void nm_test_func(void){}
12669#ifdef __cplusplus
12670}
12671#endif
12672int main(){nm_test_var='a';nm_test_func();return(0);}
12673_LT_EOF
12674
5213506e 12675 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12676 (eval $ac_compile) 2>&5
12677 ac_status=$?
5213506e
RW
12678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12679 test $ac_status = 0; }; then
da0f6381
PB
12680 # Now try to grab the symbols.
12681 nlist=conftest.nm
43e02a8a
RW
12682 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
12683 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
da0f6381 12684 ac_status=$?
5213506e
RW
12685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12686 test $ac_status = 0; } && test -s "$nlist"; then
da0f6381
PB
12687 # Try sorting and uniquifying the output.
12688 if sort "$nlist" | uniq > "$nlist"T; then
12689 mv -f "$nlist"T "$nlist"
12690 else
12691 rm -f "$nlist"T
12692 fi
12693
12694 # Make sure that we snagged all the symbols we need.
12695 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
12696 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
12697 cat <<_LT_EOF > conftest.$ac_ext
12698#ifdef __cplusplus
12699extern "C" {
12700#endif
12701
12702_LT_EOF
12703 # Now generate the symbol file.
12704 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
12705
12706 cat <<_LT_EOF >> conftest.$ac_ext
12707
12708/* The mapping between symbol names and symbols. */
12709const struct {
12710 const char *name;
12711 void *address;
12712}
12713lt__PROGRAM__LTX_preloaded_symbols[] =
12714{
12715 { "@PROGRAM@", (void *) 0 },
12716_LT_EOF
12717 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
12718 cat <<\_LT_EOF >> conftest.$ac_ext
12719 {0, (void *) 0}
12720};
12721
12722/* This works around a problem in FreeBSD linker */
12723#ifdef FREEBSD_WORKAROUND
12724static const void *lt_preloaded_setup() {
12725 return lt__PROGRAM__LTX_preloaded_symbols;
12726}
12727#endif
12728
12729#ifdef __cplusplus
12730}
12731#endif
12732_LT_EOF
12733 # Now try linking the two files.
12734 mv conftest.$ac_objext conftstm.$ac_objext
12735 lt_save_LIBS="$LIBS"
12736 lt_save_CFLAGS="$CFLAGS"
12737 LIBS="conftstm.$ac_objext"
12738 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
5213506e 12739 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
da0f6381
PB
12740 (eval $ac_link) 2>&5
12741 ac_status=$?
5213506e
RW
12742 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12743 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
da0f6381
PB
12744 pipe_works=yes
12745 fi
12746 LIBS="$lt_save_LIBS"
12747 CFLAGS="$lt_save_CFLAGS"
12748 else
12749 echo "cannot find nm_test_func in $nlist" >&5
12750 fi
12751 else
12752 echo "cannot find nm_test_var in $nlist" >&5
12753 fi
12754 else
12755 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
12756 fi
12757 else
12758 echo "$progname: failed program was:" >&5
12759 cat conftest.$ac_ext >&5
12760 fi
5d47bb02 12761 rm -rf conftest* conftst*
da0f6381
PB
12762
12763 # Do not use the global_symbol_pipe unless it works.
12764 if test "$pipe_works" = yes; then
12765 break
12766 else
12767 lt_cv_sys_global_symbol_pipe=
12768 fi
12769done
12770
12771fi
12772
12773if test -z "$lt_cv_sys_global_symbol_pipe"; then
12774 lt_cv_sys_global_symbol_to_cdecl=
12775fi
12776if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5213506e
RW
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12778$as_echo "failed" >&6; }
da0f6381 12779else
5213506e
RW
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12781$as_echo "ok" >&6; }
da0f6381
PB
12782fi
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
5d47bb02
PG
12798
12799
12800
12801
12802
da0f6381
PB
12803
12804
5213506e
RW
12805# Check whether --enable-libtool-lock was given.
12806if test "${enable_libtool_lock+set}" = set; then :
12807 enableval=$enable_libtool_lock;
12808fi
da0f6381 12809
da0f6381
PB
12810test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
12811
12812# Some flags need to be propagated to the compiler or linker for good
12813# libtool support.
12814case $host in
12815ia64-*-hpux*)
12816 # Find out which ABI we are using.
12817 echo 'int i;' > conftest.$ac_ext
5213506e 12818 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12819 (eval $ac_compile) 2>&5
12820 ac_status=$?
5213506e
RW
12821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12822 test $ac_status = 0; }; then
da0f6381
PB
12823 case `/usr/bin/file conftest.$ac_objext` in
12824 *ELF-32*)
12825 HPUX_IA64_MODE="32"
12826 ;;
12827 *ELF-64*)
12828 HPUX_IA64_MODE="64"
12829 ;;
12830 esac
12831 fi
12832 rm -rf conftest*
12833 ;;
12834*-*-irix6*)
12835 # Find out which ABI we are using.
43e02a8a 12836 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
5213506e 12837 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12838 (eval $ac_compile) 2>&5
12839 ac_status=$?
5213506e
RW
12840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12841 test $ac_status = 0; }; then
da0f6381
PB
12842 if test "$lt_cv_prog_gnu_ld" = yes; then
12843 case `/usr/bin/file conftest.$ac_objext` in
12844 *32-bit*)
12845 LD="${LD-ld} -melf32bsmip"
12846 ;;
12847 *N32*)
12848 LD="${LD-ld} -melf32bmipn32"
12849 ;;
12850 *64-bit*)
12851 LD="${LD-ld} -melf64bmip"
12852 ;;
12853 esac
12854 else
12855 case `/usr/bin/file conftest.$ac_objext` in
12856 *32-bit*)
12857 LD="${LD-ld} -32"
12858 ;;
12859 *N32*)
12860 LD="${LD-ld} -n32"
12861 ;;
12862 *64-bit*)
12863 LD="${LD-ld} -64"
12864 ;;
12865 esac
12866 fi
12867 fi
12868 rm -rf conftest*
12869 ;;
12870
12871x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
12872s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
12873 # Find out which ABI we are using.
12874 echo 'int i;' > conftest.$ac_ext
5213506e 12875 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12876 (eval $ac_compile) 2>&5
12877 ac_status=$?
5213506e
RW
12878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12879 test $ac_status = 0; }; then
da0f6381
PB
12880 case `/usr/bin/file conftest.o` in
12881 *32-bit*)
12882 case $host in
12883 x86_64-*kfreebsd*-gnu)
12884 LD="${LD-ld} -m elf_i386_fbsd"
12885 ;;
12886 x86_64-*linux*)
12887 LD="${LD-ld} -m elf_i386"
12888 ;;
12889 ppc64-*linux*|powerpc64-*linux*)
12890 LD="${LD-ld} -m elf32ppclinux"
12891 ;;
12892 s390x-*linux*)
12893 LD="${LD-ld} -m elf_s390"
12894 ;;
12895 sparc64-*linux*)
12896 LD="${LD-ld} -m elf32_sparc"
12897 ;;
12898 esac
12899 ;;
12900 *64-bit*)
12901 case $host in
12902 x86_64-*kfreebsd*-gnu)
12903 LD="${LD-ld} -m elf_x86_64_fbsd"
12904 ;;
12905 x86_64-*linux*)
12906 LD="${LD-ld} -m elf_x86_64"
12907 ;;
12908 ppc*-*linux*|powerpc*-*linux*)
12909 LD="${LD-ld} -m elf64ppc"
12910 ;;
12911 s390*-*linux*|s390*-*tpf*)
12912 LD="${LD-ld} -m elf64_s390"
12913 ;;
12914 sparc*-*linux*)
12915 LD="${LD-ld} -m elf64_sparc"
12916 ;;
12917 esac
12918 ;;
12919 esac
12920 fi
12921 rm -rf conftest*
12922 ;;
12923
12924*-*-sco3.2v5*)
12925 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
12926 SAVE_CFLAGS="$CFLAGS"
12927 CFLAGS="$CFLAGS -belf"
5213506e
RW
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
12929$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
12930if test "${lt_cv_cc_needs_belf+set}" = set; then :
12931 $as_echo_n "(cached) " >&6
da0f6381
PB
12932else
12933 ac_ext=c
12934ac_cpp='$CPP $CPPFLAGS'
12935ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12936ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12937ac_compiler_gnu=$ac_cv_c_compiler_gnu
12938
5213506e 12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
12940/* end confdefs.h. */
12941
12942int
12943main ()
12944{
12945
12946 ;
12947 return 0;
12948}
12949_ACEOF
5213506e 12950if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
12951 lt_cv_cc_needs_belf=yes
12952else
5213506e 12953 lt_cv_cc_needs_belf=no
da0f6381 12954fi
5213506e
RW
12955rm -f core conftest.err conftest.$ac_objext \
12956 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
12957 ac_ext=c
12958ac_cpp='$CPP $CPPFLAGS'
12959ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12960ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12961ac_compiler_gnu=$ac_cv_c_compiler_gnu
12962
12963fi
5213506e
RW
12964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
12965$as_echo "$lt_cv_cc_needs_belf" >&6; }
da0f6381
PB
12966 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
12967 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
12968 CFLAGS="$SAVE_CFLAGS"
12969 fi
12970 ;;
12971sparc*-*solaris*)
12972 # Find out which ABI we are using.
12973 echo 'int i;' > conftest.$ac_ext
5213506e 12974 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12975 (eval $ac_compile) 2>&5
12976 ac_status=$?
5213506e
RW
12977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12978 test $ac_status = 0; }; then
da0f6381
PB
12979 case `/usr/bin/file conftest.o` in
12980 *64-bit*)
12981 case $lt_cv_prog_gnu_ld in
12982 yes*) LD="${LD-ld} -m elf64_sparc" ;;
5d47bb02
PG
12983 *)
12984 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
12985 LD="${LD-ld} -64"
12986 fi
12987 ;;
da0f6381
PB
12988 esac
12989 ;;
12990 esac
12991 fi
12992 rm -rf conftest*
12993 ;;
12994esac
12995
5d47bb02
PG
12996need_locks="$enable_libtool_lock"
12997
12998
12999 case $host_os in
13000 rhapsody* | darwin*)
13001 if test -n "$ac_tool_prefix"; then
13002 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
13003set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
5213506e
RW
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13005$as_echo_n "checking for $ac_word... " >&6; }
13006if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
13007 $as_echo_n "(cached) " >&6
5d47bb02
PG
13008else
13009 if test -n "$DSYMUTIL"; then
13010 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
13011else
13012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13013for as_dir in $PATH
13014do
13015 IFS=$as_save_IFS
13016 test -z "$as_dir" && as_dir=.
5213506e
RW
13017 for ac_exec_ext in '' $ac_executable_extensions; do
13018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13019 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
5213506e 13020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13021 break 2
13022 fi
13023done
5213506e
RW
13024 done
13025IFS=$as_save_IFS
5d47bb02
PG
13026
13027fi
13028fi
13029DSYMUTIL=$ac_cv_prog_DSYMUTIL
13030if test -n "$DSYMUTIL"; then
5213506e
RW
13031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
13032$as_echo "$DSYMUTIL" >&6; }
5d47bb02 13033else
5213506e
RW
13034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13035$as_echo "no" >&6; }
5d47bb02
PG
13036fi
13037
5213506e 13038
5d47bb02
PG
13039fi
13040if test -z "$ac_cv_prog_DSYMUTIL"; then
13041 ac_ct_DSYMUTIL=$DSYMUTIL
13042 # Extract the first word of "dsymutil", so it can be a program name with args.
13043set dummy dsymutil; ac_word=$2
5213506e
RW
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
13047 $as_echo_n "(cached) " >&6
5d47bb02
PG
13048else
13049 if test -n "$ac_ct_DSYMUTIL"; then
13050 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
13051else
13052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13053for as_dir in $PATH
13054do
13055 IFS=$as_save_IFS
13056 test -z "$as_dir" && as_dir=.
5213506e
RW
13057 for ac_exec_ext in '' $ac_executable_extensions; do
13058 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13059 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
5213506e 13060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13061 break 2
13062 fi
13063done
5213506e
RW
13064 done
13065IFS=$as_save_IFS
5d47bb02 13066
5d47bb02
PG
13067fi
13068fi
13069ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
13070if test -n "$ac_ct_DSYMUTIL"; then
5213506e
RW
13071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
13072$as_echo "$ac_ct_DSYMUTIL" >&6; }
5d47bb02 13073else
5213506e
RW
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13075$as_echo "no" >&6; }
5d47bb02
PG
13076fi
13077
5213506e
RW
13078 if test "x$ac_ct_DSYMUTIL" = x; then
13079 DSYMUTIL=":"
13080 else
13081 case $cross_compiling:$ac_tool_warned in
13082yes:)
13083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13085ac_tool_warned=yes ;;
13086esac
13087 DSYMUTIL=$ac_ct_DSYMUTIL
13088 fi
5d47bb02
PG
13089else
13090 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
13091fi
13092
13093 if test -n "$ac_tool_prefix"; then
13094 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
13095set dummy ${ac_tool_prefix}nmedit; ac_word=$2
5213506e
RW
13096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13097$as_echo_n "checking for $ac_word... " >&6; }
13098if test "${ac_cv_prog_NMEDIT+set}" = set; then :
13099 $as_echo_n "(cached) " >&6
5d47bb02
PG
13100else
13101 if test -n "$NMEDIT"; then
13102 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
13103else
13104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13105for as_dir in $PATH
13106do
13107 IFS=$as_save_IFS
13108 test -z "$as_dir" && as_dir=.
5213506e
RW
13109 for ac_exec_ext in '' $ac_executable_extensions; do
13110 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13111 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
5213506e 13112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13113 break 2
13114 fi
13115done
5213506e
RW
13116 done
13117IFS=$as_save_IFS
5d47bb02
PG
13118
13119fi
13120fi
13121NMEDIT=$ac_cv_prog_NMEDIT
13122if test -n "$NMEDIT"; then
5213506e
RW
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
13124$as_echo "$NMEDIT" >&6; }
5d47bb02 13125else
5213506e
RW
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13127$as_echo "no" >&6; }
5d47bb02
PG
13128fi
13129
5213506e 13130
5d47bb02
PG
13131fi
13132if test -z "$ac_cv_prog_NMEDIT"; then
13133 ac_ct_NMEDIT=$NMEDIT
13134 # Extract the first word of "nmedit", so it can be a program name with args.
13135set dummy nmedit; ac_word=$2
5213506e
RW
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137$as_echo_n "checking for $ac_word... " >&6; }
13138if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
13139 $as_echo_n "(cached) " >&6
5d47bb02
PG
13140else
13141 if test -n "$ac_ct_NMEDIT"; then
13142 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
13143else
13144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13145for as_dir in $PATH
13146do
13147 IFS=$as_save_IFS
13148 test -z "$as_dir" && as_dir=.
5213506e
RW
13149 for ac_exec_ext in '' $ac_executable_extensions; do
13150 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13151 ac_cv_prog_ac_ct_NMEDIT="nmedit"
5213506e 13152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13153 break 2
13154 fi
13155done
5213506e
RW
13156 done
13157IFS=$as_save_IFS
5d47bb02 13158
5d47bb02
PG
13159fi
13160fi
13161ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
13162if test -n "$ac_ct_NMEDIT"; then
5213506e
RW
13163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
13164$as_echo "$ac_ct_NMEDIT" >&6; }
5d47bb02 13165else
5213506e
RW
13166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13167$as_echo "no" >&6; }
5d47bb02
PG
13168fi
13169
5213506e
RW
13170 if test "x$ac_ct_NMEDIT" = x; then
13171 NMEDIT=":"
13172 else
13173 case $cross_compiling:$ac_tool_warned in
13174yes:)
13175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13177ac_tool_warned=yes ;;
13178esac
13179 NMEDIT=$ac_ct_NMEDIT
13180 fi
5d47bb02
PG
13181else
13182 NMEDIT="$ac_cv_prog_NMEDIT"
13183fi
13184
13185 if test -n "$ac_tool_prefix"; then
13186 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
13187set dummy ${ac_tool_prefix}lipo; ac_word=$2
5213506e
RW
13188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13189$as_echo_n "checking for $ac_word... " >&6; }
13190if test "${ac_cv_prog_LIPO+set}" = set; then :
13191 $as_echo_n "(cached) " >&6
5d47bb02
PG
13192else
13193 if test -n "$LIPO"; then
13194 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
13195else
13196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13197for as_dir in $PATH
13198do
13199 IFS=$as_save_IFS
13200 test -z "$as_dir" && as_dir=.
5213506e
RW
13201 for ac_exec_ext in '' $ac_executable_extensions; do
13202 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13203 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
5213506e 13204 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13205 break 2
13206 fi
13207done
5213506e
RW
13208 done
13209IFS=$as_save_IFS
5d47bb02
PG
13210
13211fi
13212fi
13213LIPO=$ac_cv_prog_LIPO
13214if test -n "$LIPO"; then
5213506e
RW
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
13216$as_echo "$LIPO" >&6; }
5d47bb02 13217else
5213506e
RW
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13219$as_echo "no" >&6; }
5d47bb02
PG
13220fi
13221
5213506e 13222
5d47bb02
PG
13223fi
13224if test -z "$ac_cv_prog_LIPO"; then
13225 ac_ct_LIPO=$LIPO
13226 # Extract the first word of "lipo", so it can be a program name with args.
13227set dummy lipo; ac_word=$2
5213506e
RW
13228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13229$as_echo_n "checking for $ac_word... " >&6; }
13230if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
13231 $as_echo_n "(cached) " >&6
5d47bb02
PG
13232else
13233 if test -n "$ac_ct_LIPO"; then
13234 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
13235else
13236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13237for as_dir in $PATH
13238do
13239 IFS=$as_save_IFS
13240 test -z "$as_dir" && as_dir=.
5213506e
RW
13241 for ac_exec_ext in '' $ac_executable_extensions; do
13242 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13243 ac_cv_prog_ac_ct_LIPO="lipo"
5213506e 13244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13245 break 2
13246 fi
13247done
5213506e
RW
13248 done
13249IFS=$as_save_IFS
5d47bb02 13250
5d47bb02
PG
13251fi
13252fi
13253ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
13254if test -n "$ac_ct_LIPO"; then
5213506e
RW
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
13256$as_echo "$ac_ct_LIPO" >&6; }
5d47bb02 13257else
5213506e
RW
13258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13259$as_echo "no" >&6; }
5d47bb02
PG
13260fi
13261
5213506e
RW
13262 if test "x$ac_ct_LIPO" = x; then
13263 LIPO=":"
13264 else
13265 case $cross_compiling:$ac_tool_warned in
13266yes:)
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13268$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13269ac_tool_warned=yes ;;
13270esac
13271 LIPO=$ac_ct_LIPO
13272 fi
5d47bb02
PG
13273else
13274 LIPO="$ac_cv_prog_LIPO"
13275fi
13276
13277 if test -n "$ac_tool_prefix"; then
13278 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
13279set dummy ${ac_tool_prefix}otool; ac_word=$2
5213506e
RW
13280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13281$as_echo_n "checking for $ac_word... " >&6; }
13282if test "${ac_cv_prog_OTOOL+set}" = set; then :
13283 $as_echo_n "(cached) " >&6
5d47bb02
PG
13284else
13285 if test -n "$OTOOL"; then
13286 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
13287else
13288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13289for as_dir in $PATH
13290do
13291 IFS=$as_save_IFS
13292 test -z "$as_dir" && as_dir=.
5213506e
RW
13293 for ac_exec_ext in '' $ac_executable_extensions; do
13294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13295 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
5213506e 13296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13297 break 2
13298 fi
13299done
5213506e
RW
13300 done
13301IFS=$as_save_IFS
5d47bb02
PG
13302
13303fi
13304fi
13305OTOOL=$ac_cv_prog_OTOOL
13306if test -n "$OTOOL"; then
5213506e
RW
13307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
13308$as_echo "$OTOOL" >&6; }
5d47bb02 13309else
5213506e
RW
13310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
5d47bb02
PG
13312fi
13313
5213506e 13314
5d47bb02
PG
13315fi
13316if test -z "$ac_cv_prog_OTOOL"; then
13317 ac_ct_OTOOL=$OTOOL
13318 # Extract the first word of "otool", so it can be a program name with args.
13319set dummy otool; ac_word=$2
5213506e
RW
13320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13321$as_echo_n "checking for $ac_word... " >&6; }
13322if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
13323 $as_echo_n "(cached) " >&6
5d47bb02
PG
13324else
13325 if test -n "$ac_ct_OTOOL"; then
13326 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
13327else
13328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13329for as_dir in $PATH
13330do
13331 IFS=$as_save_IFS
13332 test -z "$as_dir" && as_dir=.
5213506e
RW
13333 for ac_exec_ext in '' $ac_executable_extensions; do
13334 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13335 ac_cv_prog_ac_ct_OTOOL="otool"
5213506e 13336 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13337 break 2
13338 fi
13339done
5213506e
RW
13340 done
13341IFS=$as_save_IFS
5d47bb02 13342
5d47bb02
PG
13343fi
13344fi
13345ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
13346if test -n "$ac_ct_OTOOL"; then
5213506e
RW
13347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
13348$as_echo "$ac_ct_OTOOL" >&6; }
5d47bb02 13349else
5213506e
RW
13350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13351$as_echo "no" >&6; }
5d47bb02
PG
13352fi
13353
5213506e
RW
13354 if test "x$ac_ct_OTOOL" = x; then
13355 OTOOL=":"
13356 else
13357 case $cross_compiling:$ac_tool_warned in
13358yes:)
13359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13361ac_tool_warned=yes ;;
13362esac
13363 OTOOL=$ac_ct_OTOOL
13364 fi
5d47bb02
PG
13365else
13366 OTOOL="$ac_cv_prog_OTOOL"
13367fi
13368
13369 if test -n "$ac_tool_prefix"; then
13370 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
13371set dummy ${ac_tool_prefix}otool64; ac_word=$2
5213506e
RW
13372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13373$as_echo_n "checking for $ac_word... " >&6; }
13374if test "${ac_cv_prog_OTOOL64+set}" = set; then :
13375 $as_echo_n "(cached) " >&6
5d47bb02
PG
13376else
13377 if test -n "$OTOOL64"; then
13378 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
13379else
13380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13381for as_dir in $PATH
13382do
13383 IFS=$as_save_IFS
13384 test -z "$as_dir" && as_dir=.
5213506e
RW
13385 for ac_exec_ext in '' $ac_executable_extensions; do
13386 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13387 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
5213506e 13388 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13389 break 2
13390 fi
13391done
5213506e
RW
13392 done
13393IFS=$as_save_IFS
5d47bb02
PG
13394
13395fi
13396fi
13397OTOOL64=$ac_cv_prog_OTOOL64
13398if test -n "$OTOOL64"; then
5213506e
RW
13399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
13400$as_echo "$OTOOL64" >&6; }
5d47bb02 13401else
5213506e
RW
13402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13403$as_echo "no" >&6; }
5d47bb02
PG
13404fi
13405
5213506e 13406
5d47bb02
PG
13407fi
13408if test -z "$ac_cv_prog_OTOOL64"; then
13409 ac_ct_OTOOL64=$OTOOL64
13410 # Extract the first word of "otool64", so it can be a program name with args.
13411set dummy otool64; ac_word=$2
5213506e
RW
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13413$as_echo_n "checking for $ac_word... " >&6; }
13414if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
13415 $as_echo_n "(cached) " >&6
5d47bb02
PG
13416else
13417 if test -n "$ac_ct_OTOOL64"; then
13418 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
13419else
13420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13421for as_dir in $PATH
13422do
13423 IFS=$as_save_IFS
13424 test -z "$as_dir" && as_dir=.
5213506e
RW
13425 for ac_exec_ext in '' $ac_executable_extensions; do
13426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13427 ac_cv_prog_ac_ct_OTOOL64="otool64"
5213506e 13428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13429 break 2
13430 fi
13431done
5213506e
RW
13432 done
13433IFS=$as_save_IFS
5d47bb02 13434
5d47bb02
PG
13435fi
13436fi
13437ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
13438if test -n "$ac_ct_OTOOL64"; then
5213506e
RW
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
13440$as_echo "$ac_ct_OTOOL64" >&6; }
5d47bb02 13441else
5213506e
RW
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13443$as_echo "no" >&6; }
5d47bb02
PG
13444fi
13445
5213506e
RW
13446 if test "x$ac_ct_OTOOL64" = x; then
13447 OTOOL64=":"
13448 else
13449 case $cross_compiling:$ac_tool_warned in
13450yes:)
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13452$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13453ac_tool_warned=yes ;;
13454esac
13455 OTOOL64=$ac_ct_OTOOL64
13456 fi
5d47bb02
PG
13457else
13458 OTOOL64="$ac_cv_prog_OTOOL64"
13459fi
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
5213506e
RW
13487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
13488$as_echo_n "checking for -single_module linker flag... " >&6; }
13489if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
13490 $as_echo_n "(cached) " >&6
5d47bb02
PG
13491else
13492 lt_cv_apple_cc_single_mod=no
13493 if test -z "${LT_MULTI_MODULE}"; then
13494 # By default we will add the -single_module flag. You can override
13495 # by either setting the environment variable LT_MULTI_MODULE
13496 # non-empty at configure time, or by adding -multi_module to the
13497 # link flags.
13498 rm -rf libconftest.dylib*
13499 echo "int foo(void){return 1;}" > conftest.c
13500 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13501-dynamiclib -Wl,-single_module conftest.c" >&5
13502 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13503 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
13504 _lt_result=$?
13505 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
13506 lt_cv_apple_cc_single_mod=yes
13507 else
13508 cat conftest.err >&5
13509 fi
13510 rm -rf libconftest.dylib*
13511 rm -f conftest.*
13512 fi
13513fi
5213506e
RW
13514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
13515$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
13516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
13517$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
13518if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
13519 $as_echo_n "(cached) " >&6
5d47bb02
PG
13520else
13521 lt_cv_ld_exported_symbols_list=no
13522 save_LDFLAGS=$LDFLAGS
13523 echo "_main" > conftest.sym
13524 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
5213506e 13525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d47bb02
PG
13526/* end confdefs.h. */
13527
13528int
13529main ()
13530{
13531
13532 ;
13533 return 0;
13534}
13535_ACEOF
5213506e 13536if ac_fn_c_try_link "$LINENO"; then :
5d47bb02
PG
13537 lt_cv_ld_exported_symbols_list=yes
13538else
5213506e 13539 lt_cv_ld_exported_symbols_list=no
5d47bb02 13540fi
5213506e
RW
13541rm -f core conftest.err conftest.$ac_objext \
13542 conftest$ac_exeext conftest.$ac_ext
5d47bb02
PG
13543 LDFLAGS="$save_LDFLAGS"
13544
13545fi
5213506e
RW
13546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
13547$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
43e02a8a
RW
13548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
13549$as_echo_n "checking for -force_load linker flag... " >&6; }
13550if test "${lt_cv_ld_force_load+set}" = set; then :
13551 $as_echo_n "(cached) " >&6
13552else
13553 lt_cv_ld_force_load=no
13554 cat > conftest.c << _LT_EOF
13555int forced_loaded() { return 2;}
13556_LT_EOF
13557 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
13558 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
13559 echo "$AR cru libconftest.a conftest.o" >&5
13560 $AR cru libconftest.a conftest.o 2>&5
13561 cat > conftest.c << _LT_EOF
13562int main() { return 0;}
13563_LT_EOF
13564 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
13565 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
13566 _lt_result=$?
13567 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
13568 lt_cv_ld_force_load=yes
13569 else
13570 cat conftest.err >&5
13571 fi
13572 rm -f conftest.err libconftest.a conftest conftest.c
13573 rm -rf conftest.dSYM
13574
13575fi
13576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
13577$as_echo "$lt_cv_ld_force_load" >&6; }
5d47bb02
PG
13578 case $host_os in
13579 rhapsody* | darwin1.[012])
13580 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
13581 darwin1.*)
13582 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13583 darwin*) # darwin 5.x on
13584 # if running on 10.5 or later, the deployment target defaults
13585 # to the OS version, if on x86, and 10.4, the deployment
13586 # target defaults to 10.4. Don't you love it?
13587 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
13588 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
13589 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13590 10.[012]*)
13591 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13592 10.*)
13593 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13594 esac
13595 ;;
13596 esac
13597 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
13598 _lt_dar_single_mod='$single_module'
13599 fi
13600 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
13601 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
13602 else
13603 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
13604 fi
43e02a8a 13605 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
5d47bb02
PG
13606 _lt_dsymutil='~$DSYMUTIL $lib || :'
13607 else
13608 _lt_dsymutil=
13609 fi
13610 ;;
13611 esac
da0f6381 13612
da0f6381 13613for ac_header in dlfcn.h
5213506e
RW
13614do :
13615 ac_fn_c_check_header_preproc "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h"
13616if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
da0f6381 13617 cat >>confdefs.h <<_ACEOF
5213506e 13618#define HAVE_DLFCN_H 1
da0f6381
PB
13619_ACEOF
13620
13621fi
13622done
13623
13624
13625
5d47bb02
PG
13626
13627
5213506e 13628
43e02a8a 13629# Set options
5d47bb02 13630
43e02a8a
RW
13631
13632
13633 enable_dlopen=no
13634
13635
13636 enable_win32_dll=no
13637
13638
13639 # Check whether --enable-shared was given.
13640if test "${enable_shared+set}" = set; then :
13641 enableval=$enable_shared; p=${PACKAGE-default}
13642 case $enableval in
13643 yes) enable_shared=yes ;;
13644 no) enable_shared=no ;;
13645 *)
13646 enable_shared=no
13647 # Look at the argument we got. We use all the common list separators.
13648 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13649 for pkg in $enableval; do
13650 IFS="$lt_save_ifs"
13651 if test "X$pkg" = "X$p"; then
13652 enable_shared=yes
13653 fi
13654 done
13655 IFS="$lt_save_ifs"
13656 ;;
13657 esac
5d47bb02 13658else
43e02a8a 13659 enable_shared=yes
5213506e
RW
13660fi
13661
da0f6381
PB
13662
13663
13664
13665
13666
da0f6381 13667
da0f6381 13668
da0f6381 13669
5213506e
RW
13670 # Check whether --enable-static was given.
13671if test "${enable_static+set}" = set; then :
13672 enableval=$enable_static; p=${PACKAGE-default}
00020c16
ILT
13673 case $enableval in
13674 yes) enable_static=yes ;;
13675 no) enable_static=no ;;
13676 *)
13677 enable_static=no
13678 # Look at the argument we got. We use all the common list separators.
13679 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13680 for pkg in $enableval; do
13681 IFS="$lt_save_ifs"
13682 if test "X$pkg" = "X$p"; then
13683 enable_static=yes
13684 fi
13685 done
13686 IFS="$lt_save_ifs"
13687 ;;
13688 esac
da0f6381 13689else
00020c16 13690 enable_static=yes
5213506e 13691fi
da0f6381
PB
13692
13693
da0f6381 13694
da0f6381 13695
da0f6381 13696
da0f6381
PB
13697
13698
da0f6381 13699
da0f6381 13700
5213506e
RW
13701
13702# Check whether --with-pic was given.
13703if test "${with_pic+set}" = set; then :
13704 withval=$with_pic; pic_mode="$withval"
00020c16
ILT
13705else
13706 pic_mode=default
5213506e
RW
13707fi
13708
da0f6381 13709
00020c16 13710test -z "$pic_mode" && pic_mode=default
da0f6381
PB
13711
13712
13713
13714
13715
13716
13717
5213506e
RW
13718 # Check whether --enable-fast-install was given.
13719if test "${enable_fast_install+set}" = set; then :
13720 enableval=$enable_fast_install; p=${PACKAGE-default}
00020c16
ILT
13721 case $enableval in
13722 yes) enable_fast_install=yes ;;
13723 no) enable_fast_install=no ;;
13724 *)
13725 enable_fast_install=no
13726 # Look at the argument we got. We use all the common list separators.
13727 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13728 for pkg in $enableval; do
13729 IFS="$lt_save_ifs"
13730 if test "X$pkg" = "X$p"; then
13731 enable_fast_install=yes
13732 fi
13733 done
13734 IFS="$lt_save_ifs"
13735 ;;
13736 esac
13737else
13738 enable_fast_install=yes
5213506e
RW
13739fi
13740
da0f6381 13741
da0f6381 13742
da0f6381 13743
da0f6381 13744
da0f6381 13745
da0f6381
PB
13746
13747
da0f6381 13748
da0f6381 13749
da0f6381 13750
00020c16
ILT
13751# This can be used to rebuild libtool when needed
13752LIBTOOL_DEPS="$ltmain"
da0f6381 13753
00020c16
ILT
13754# Always use our own libtool.
13755LIBTOOL='$(SHELL) $(top_builddir)/libtool'
da0f6381 13756
da0f6381 13757
da0f6381
PB
13758
13759
13760
13761
13762
13763
da0f6381 13764
da0f6381 13765
da0f6381 13766
da0f6381 13767
da0f6381 13768
da0f6381 13769
da0f6381 13770
da0f6381 13771
da0f6381 13772
da0f6381 13773
da0f6381 13774
da0f6381 13775
da0f6381 13776
da0f6381 13777
da0f6381 13778
43e02a8a 13779
da0f6381 13780
da0f6381 13781
00020c16 13782test -z "$LN_S" && LN_S="ln -s"
da0f6381 13783
da0f6381 13784
da0f6381 13785
da0f6381 13786
da0f6381 13787
da0f6381 13788
da0f6381 13789
da0f6381 13790
da0f6381 13791
da0f6381 13792
da0f6381 13793
da0f6381 13794
da0f6381 13795
da0f6381 13796
00020c16
ILT
13797if test -n "${ZSH_VERSION+set}" ; then
13798 setopt NO_GLOB_SUBST
13799fi
da0f6381 13800
5213506e
RW
13801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
13802$as_echo_n "checking for objdir... " >&6; }
13803if test "${lt_cv_objdir+set}" = set; then :
13804 $as_echo_n "(cached) " >&6
00020c16
ILT
13805else
13806 rm -f .libs 2>/dev/null
13807mkdir .libs 2>/dev/null
13808if test -d .libs; then
13809 lt_cv_objdir=.libs
13810else
13811 # MS-DOS does not allow filenames that begin with a dot.
13812 lt_cv_objdir=_libs
13813fi
13814rmdir .libs 2>/dev/null
13815fi
5213506e
RW
13816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
13817$as_echo "$lt_cv_objdir" >&6; }
00020c16 13818objdir=$lt_cv_objdir
da0f6381
PB
13819
13820
13821
13822
da0f6381 13823
00020c16
ILT
13824cat >>confdefs.h <<_ACEOF
13825#define LT_OBJDIR "$lt_cv_objdir/"
13826_ACEOF
da0f6381 13827
da0f6381 13828
da0f6381
PB
13829
13830
00020c16
ILT
13831case $host_os in
13832aix3*)
13833 # AIX sometimes has problems with the GCC collect2 program. For some
13834 # reason, if we set the COLLECT_NAMES environment variable, the problems
13835 # vanish in a puff of smoke.
13836 if test "X${COLLECT_NAMES+set}" != Xset; then
13837 COLLECT_NAMES=
13838 export COLLECT_NAMES
13839 fi
13840 ;;
13841esac
da0f6381 13842
00020c16
ILT
13843# Global variables:
13844ofile=libtool
13845can_build_shared=yes
da0f6381 13846
00020c16
ILT
13847# All known linkers require a `.a' archive for static linking (except MSVC,
13848# which needs '.lib').
13849libext=a
da0f6381 13850
00020c16 13851with_gnu_ld="$lt_cv_prog_gnu_ld"
da0f6381 13852
00020c16
ILT
13853old_CC="$CC"
13854old_CFLAGS="$CFLAGS"
da0f6381 13855
00020c16
ILT
13856# Set sane defaults for various variables
13857test -z "$CC" && CC=cc
13858test -z "$LTCC" && LTCC=$CC
13859test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13860test -z "$LD" && LD=ld
13861test -z "$ac_objext" && ac_objext=o
da0f6381 13862
00020c16
ILT
13863for cc_temp in $compiler""; do
13864 case $cc_temp in
13865 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13866 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13867 \-*) ;;
13868 *) break;;
13869 esac
13870done
43e02a8a 13871cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
da0f6381
PB
13872
13873
00020c16
ILT
13874# Only perform the check for file, if the check method requires it
13875test -z "$MAGIC_CMD" && MAGIC_CMD=file
13876case $deplibs_check_method in
13877file_magic*)
13878 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5213506e
RW
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
13880$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
13881if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
13882 $as_echo_n "(cached) " >&6
da0f6381 13883else
00020c16
ILT
13884 case $MAGIC_CMD in
13885[\\/*] | ?:[\\/]*)
13886 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
13887 ;;
13888*)
13889 lt_save_MAGIC_CMD="$MAGIC_CMD"
13890 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13891 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13892 for ac_dir in $ac_dummy; do
13893 IFS="$lt_save_ifs"
13894 test -z "$ac_dir" && ac_dir=.
13895 if test -f $ac_dir/${ac_tool_prefix}file; then
13896 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
13897 if test -n "$file_magic_test_file"; then
13898 case $deplibs_check_method in
13899 "file_magic "*)
13900 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13901 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13902 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13903 $EGREP "$file_magic_regex" > /dev/null; then
13904 :
13905 else
13906 cat <<_LT_EOF 1>&2
da0f6381 13907
00020c16
ILT
13908*** Warning: the command libtool uses to detect shared libraries,
13909*** $file_magic_cmd, produces output that libtool cannot recognize.
13910*** The result is that libtool may fail to recognize shared libraries
13911*** as such. This will affect the creation of libtool libraries that
13912*** depend on shared libraries, but programs linked with such libtool
13913*** libraries will work regardless of this problem. Nevertheless, you
13914*** may want to report the problem to your system manager and/or to
13915*** bug-libtool@gnu.org
da0f6381 13916
00020c16
ILT
13917_LT_EOF
13918 fi ;;
13919 esac
13920 fi
13921 break
13922 fi
13923 done
13924 IFS="$lt_save_ifs"
13925 MAGIC_CMD="$lt_save_MAGIC_CMD"
13926 ;;
13927esac
13928fi
da0f6381 13929
00020c16
ILT
13930MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13931if test -n "$MAGIC_CMD"; then
5213506e
RW
13932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
13933$as_echo "$MAGIC_CMD" >&6; }
00020c16 13934else
5213506e
RW
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13936$as_echo "no" >&6; }
00020c16 13937fi
da0f6381
PB
13938
13939
13940
da0f6381 13941
da0f6381 13942
00020c16
ILT
13943if test -z "$lt_cv_path_MAGIC_CMD"; then
13944 if test -n "$ac_tool_prefix"; then
5213506e
RW
13945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
13946$as_echo_n "checking for file... " >&6; }
13947if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
13948 $as_echo_n "(cached) " >&6
00020c16
ILT
13949else
13950 case $MAGIC_CMD in
13951[\\/*] | ?:[\\/]*)
13952 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
13953 ;;
13954*)
13955 lt_save_MAGIC_CMD="$MAGIC_CMD"
13956 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13957 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13958 for ac_dir in $ac_dummy; do
13959 IFS="$lt_save_ifs"
13960 test -z "$ac_dir" && ac_dir=.
13961 if test -f $ac_dir/file; then
13962 lt_cv_path_MAGIC_CMD="$ac_dir/file"
13963 if test -n "$file_magic_test_file"; then
13964 case $deplibs_check_method in
13965 "file_magic "*)
13966 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13967 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13968 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13969 $EGREP "$file_magic_regex" > /dev/null; then
13970 :
13971 else
13972 cat <<_LT_EOF 1>&2
da0f6381 13973
00020c16
ILT
13974*** Warning: the command libtool uses to detect shared libraries,
13975*** $file_magic_cmd, produces output that libtool cannot recognize.
13976*** The result is that libtool may fail to recognize shared libraries
13977*** as such. This will affect the creation of libtool libraries that
13978*** depend on shared libraries, but programs linked with such libtool
13979*** libraries will work regardless of this problem. Nevertheless, you
13980*** may want to report the problem to your system manager and/or to
13981*** bug-libtool@gnu.org
da0f6381 13982
00020c16
ILT
13983_LT_EOF
13984 fi ;;
13985 esac
13986 fi
13987 break
da0f6381 13988 fi
00020c16
ILT
13989 done
13990 IFS="$lt_save_ifs"
13991 MAGIC_CMD="$lt_save_MAGIC_CMD"
13992 ;;
13993esac
13994fi
da0f6381 13995
00020c16
ILT
13996MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13997if test -n "$MAGIC_CMD"; then
5213506e
RW
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
13999$as_echo "$MAGIC_CMD" >&6; }
00020c16 14000else
5213506e
RW
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14002$as_echo "no" >&6; }
00020c16 14003fi
da0f6381 14004
da0f6381 14005
00020c16
ILT
14006 else
14007 MAGIC_CMD=:
14008 fi
14009fi
da0f6381 14010
00020c16
ILT
14011 fi
14012 ;;
14013esac
da0f6381 14014
00020c16 14015# Use C for the default configuration in the libtool script
da0f6381 14016
00020c16
ILT
14017lt_save_CC="$CC"
14018ac_ext=c
14019ac_cpp='$CPP $CPPFLAGS'
14020ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14021ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14022ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 14023
da0f6381 14024
00020c16
ILT
14025# Source file extension for C test sources.
14026ac_ext=c
da0f6381 14027
00020c16
ILT
14028# Object file extension for compiled C test sources.
14029objext=o
14030objext=$objext
da0f6381 14031
00020c16
ILT
14032# Code to be used in simple compile tests
14033lt_simple_compile_test_code="int some_variable = 0;"
5d47bb02 14034
00020c16
ILT
14035# Code to be used in simple link tests
14036lt_simple_link_test_code='int main(){return(0);}'
da0f6381 14037
da0f6381 14038
da0f6381 14039
da0f6381 14040
00020c16
ILT
14041
14042
14043
14044# If no C compiler was specified, use CC.
14045LTCC=${LTCC-"$CC"}
14046
14047# If no C compiler flags were specified, use CFLAGS.
14048LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
14049
14050# Allow CC to be a program name with arguments.
14051compiler=$CC
14052
14053# Save the default compiler, since it gets overwritten when the other
14054# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
14055compiler_DEFAULT=$CC
14056
14057# save warnings/boilerplate of simple test code
14058ac_outfile=conftest.$ac_objext
14059echo "$lt_simple_compile_test_code" >conftest.$ac_ext
14060eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14061_lt_compiler_boilerplate=`cat conftest.err`
14062$RM conftest*
14063
14064ac_outfile=conftest.$ac_objext
14065echo "$lt_simple_link_test_code" >conftest.$ac_ext
14066eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14067_lt_linker_boilerplate=`cat conftest.err`
14068$RM -r conftest*
14069
14070
14071## CAVEAT EMPTOR:
14072## There is no encapsulation within the following macros, do not change
14073## the running order or otherwise move them around unless you know exactly
14074## what you are doing...
14075if test -n "$compiler"; then
14076
14077lt_prog_compiler_no_builtin_flag=
14078
14079if test "$GCC" = yes; then
43e02a8a
RW
14080 case $cc_basename in
14081 nvcc*)
14082 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
14083 *)
14084 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
14085 esac
00020c16 14086
5213506e
RW
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
14088$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
14089if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
14090 $as_echo_n "(cached) " >&6
00020c16
ILT
14091else
14092 lt_cv_prog_compiler_rtti_exceptions=no
14093 ac_outfile=conftest.$ac_objext
14094 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14095 lt_compiler_flag="-fno-rtti -fno-exceptions"
14096 # Insert the option either (1) after the last *FLAGS variable, or
14097 # (2) before a word containing "conftest.", or (3) at the end.
14098 # Note that $ac_compile itself does not contain backslashes and begins
14099 # with a dollar sign (not a hyphen), so the echo should work correctly.
14100 # The option is referenced via a variable to avoid confusing sed.
14101 lt_compile=`echo "$ac_compile" | $SED \
14102 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14103 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14104 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14105 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14106 (eval "$lt_compile" 2>conftest.err)
14107 ac_status=$?
14108 cat conftest.err >&5
43e02a8a 14109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14110 if (exit $ac_status) && test -s "$ac_outfile"; then
14111 # The compiler can only warn and ignore the option if not recognized
14112 # So say no if there are warnings other than the usual output.
43e02a8a 14113 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
14114 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14115 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14116 lt_cv_prog_compiler_rtti_exceptions=yes
14117 fi
14118 fi
14119 $RM conftest*
14120
14121fi
5213506e
RW
14122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
14123$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
00020c16
ILT
14124
14125if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
14126 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
14127else
14128 :
14129fi
14130
14131fi
14132
14133
14134
14135
14136
14137
14138 lt_prog_compiler_wl=
14139lt_prog_compiler_pic=
14140lt_prog_compiler_static=
14141
5213506e
RW
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
14143$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
14144
14145 if test "$GCC" = yes; then
14146 lt_prog_compiler_wl='-Wl,'
14147 lt_prog_compiler_static='-static'
14148
14149 case $host_os in
14150 aix*)
14151 # All AIX code is PIC.
14152 if test "$host_cpu" = ia64; then
14153 # AIX 5 now supports IA64 processor
14154 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14155 fi
14156 ;;
14157
00020c16
ILT
14158 amigaos*)
14159 case $host_cpu in
14160 powerpc)
14161 # see comment about AmigaOS4 .so support
14162 lt_prog_compiler_pic='-fPIC'
14163 ;;
14164 m68k)
14165 # FIXME: we need at least 68020 code to build shared libraries, but
14166 # adding the `-m68020' flag to GCC prevents building anything better,
14167 # like `-m68040'.
14168 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
14169 ;;
14170 esac
14171 ;;
da0f6381 14172
00020c16
ILT
14173 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14174 # PIC is the default for these OSes.
14175 ;;
da0f6381 14176
00020c16
ILT
14177 mingw* | cygwin* | pw32* | os2* | cegcc*)
14178 # This hack is so that the source file can tell whether it is being
14179 # built for inclusion in a dll (and should export symbols for example).
14180 # Although the cygwin gcc ignores -fPIC, still need this for old-style
14181 # (--disable-auto-import) libraries
14182 lt_prog_compiler_pic='-DDLL_EXPORT'
14183 ;;
14184
14185 darwin* | rhapsody*)
14186 # PIC is the default on this platform
14187 # Common symbols not allowed in MH_DYLIB files
14188 lt_prog_compiler_pic='-fno-common'
14189 ;;
14190
43e02a8a
RW
14191 haiku*)
14192 # PIC is the default for Haiku.
14193 # The "-static" flag exists, but is broken.
14194 lt_prog_compiler_static=
14195 ;;
14196
00020c16
ILT
14197 hpux*)
14198 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
14199 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
14200 # sets the default TLS model and affects inlining.
14201 case $host_cpu in
14202 hppa*64*)
14203 # +Z the default
da0f6381 14204 ;;
00020c16
ILT
14205 *)
14206 lt_prog_compiler_pic='-fPIC'
da0f6381
PB
14207 ;;
14208 esac
14209 ;;
14210
00020c16
ILT
14211 interix[3-9]*)
14212 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14213 # Instead, we relocate shared libraries at runtime.
da0f6381
PB
14214 ;;
14215
00020c16
ILT
14216 msdosdjgpp*)
14217 # Just because we use GCC doesn't mean we suddenly get shared libraries
14218 # on systems that don't support them.
14219 lt_prog_compiler_can_build_shared=no
14220 enable_shared=no
da0f6381 14221 ;;
da0f6381 14222
00020c16
ILT
14223 *nto* | *qnx*)
14224 # QNX uses GNU C++, but need to define -shared option too, otherwise
14225 # it will coredump.
14226 lt_prog_compiler_pic='-fPIC -shared'
14227 ;;
14228
14229 sysv4*MP*)
14230 if test -d /usr/nec; then
14231 lt_prog_compiler_pic=-Kconform_pic
da0f6381
PB
14232 fi
14233 ;;
14234
43e02a8a
RW
14235 *)
14236 lt_prog_compiler_pic='-fPIC'
14237 ;;
14238 esac
14239
14240 case $cc_basename in
14241 nvcc*) # Cuda Compiler Driver 2.2
14242 lt_prog_compiler_wl='-Xlinker '
14243 lt_prog_compiler_pic='-Xcompiler -fPIC'
00020c16
ILT
14244 ;;
14245 esac
14246 else
14247 # PORTME Check for flag to pass linker flags through the system compiler.
14248 case $host_os in
14249 aix*)
14250 lt_prog_compiler_wl='-Wl,'
da0f6381 14251 if test "$host_cpu" = ia64; then
00020c16
ILT
14252 # AIX 5 now supports IA64 processor
14253 lt_prog_compiler_static='-Bstatic'
da0f6381 14254 else
00020c16 14255 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
da0f6381 14256 fi
00020c16 14257 ;;
da0f6381 14258
00020c16
ILT
14259 mingw* | cygwin* | pw32* | os2* | cegcc*)
14260 # This hack is so that the source file can tell whether it is being
14261 # built for inclusion in a dll (and should export symbols for example).
14262 lt_prog_compiler_pic='-DDLL_EXPORT'
14263 ;;
da0f6381 14264
00020c16
ILT
14265 hpux9* | hpux10* | hpux11*)
14266 lt_prog_compiler_wl='-Wl,'
14267 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14268 # not for PA HP-UX.
14269 case $host_cpu in
14270 hppa*64*|ia64*)
14271 # +Z the default
14272 ;;
14273 *)
14274 lt_prog_compiler_pic='+Z'
14275 ;;
14276 esac
14277 # Is there a better lt_prog_compiler_static that works with the bundled CC?
14278 lt_prog_compiler_static='${wl}-a ${wl}archive'
14279 ;;
da0f6381 14280
00020c16
ILT
14281 irix5* | irix6* | nonstopux*)
14282 lt_prog_compiler_wl='-Wl,'
14283 # PIC (with -KPIC) is the default.
14284 lt_prog_compiler_static='-non_shared'
14285 ;;
14286
14287 linux* | k*bsd*-gnu | kopensolaris*-gnu)
14288 case $cc_basename in
14289 # old Intel for x86_64 which still supported -KPIC.
14290 ecc*)
14291 lt_prog_compiler_wl='-Wl,'
14292 lt_prog_compiler_pic='-KPIC'
14293 lt_prog_compiler_static='-static'
14294 ;;
14295 # icc used to be incompatible with GCC.
14296 # ICC 10 doesn't accept -KPIC any more.
14297 icc* | ifort*)
14298 lt_prog_compiler_wl='-Wl,'
14299 lt_prog_compiler_pic='-fPIC'
14300 lt_prog_compiler_static='-static'
14301 ;;
14302 # Lahey Fortran 8.1.
14303 lf95*)
14304 lt_prog_compiler_wl='-Wl,'
14305 lt_prog_compiler_pic='--shared'
14306 lt_prog_compiler_static='--static'
14307 ;;
43e02a8a 14308 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
00020c16
ILT
14309 # Portland Group compilers (*not* the Pentium gcc compiler,
14310 # which looks to be a dead project)
14311 lt_prog_compiler_wl='-Wl,'
14312 lt_prog_compiler_pic='-fpic'
14313 lt_prog_compiler_static='-Bstatic'
14314 ;;
14315 ccc*)
14316 lt_prog_compiler_wl='-Wl,'
14317 # All Alpha code is PIC.
14318 lt_prog_compiler_static='-non_shared'
14319 ;;
43e02a8a
RW
14320 xl* | bgxl* | bgf* | mpixl*)
14321 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
00020c16
ILT
14322 lt_prog_compiler_wl='-Wl,'
14323 lt_prog_compiler_pic='-qpic'
14324 lt_prog_compiler_static='-qstaticlink'
14325 ;;
14326 *)
14327 case `$CC -V 2>&1 | sed 5q` in
43e02a8a
RW
14328 *Sun\ F* | *Sun*Fortran*)
14329 # Sun Fortran 8.3 passes all unrecognized flags to the linker
00020c16
ILT
14330 lt_prog_compiler_pic='-KPIC'
14331 lt_prog_compiler_static='-Bstatic'
43e02a8a 14332 lt_prog_compiler_wl=''
00020c16 14333 ;;
43e02a8a
RW
14334 *Sun\ C*)
14335 # Sun C 5.9
00020c16
ILT
14336 lt_prog_compiler_pic='-KPIC'
14337 lt_prog_compiler_static='-Bstatic'
43e02a8a 14338 lt_prog_compiler_wl='-Wl,'
da0f6381
PB
14339 ;;
14340 esac
00020c16
ILT
14341 ;;
14342 esac
14343 ;;
da0f6381 14344
00020c16
ILT
14345 newsos6)
14346 lt_prog_compiler_pic='-KPIC'
14347 lt_prog_compiler_static='-Bstatic'
14348 ;;
da0f6381 14349
00020c16
ILT
14350 *nto* | *qnx*)
14351 # QNX uses GNU C++, but need to define -shared option too, otherwise
14352 # it will coredump.
14353 lt_prog_compiler_pic='-fPIC -shared'
14354 ;;
da0f6381 14355
00020c16
ILT
14356 osf3* | osf4* | osf5*)
14357 lt_prog_compiler_wl='-Wl,'
14358 # All OSF/1 code is PIC.
14359 lt_prog_compiler_static='-non_shared'
14360 ;;
da0f6381 14361
00020c16
ILT
14362 rdos*)
14363 lt_prog_compiler_static='-non_shared'
da0f6381
PB
14364 ;;
14365
00020c16
ILT
14366 solaris*)
14367 lt_prog_compiler_pic='-KPIC'
14368 lt_prog_compiler_static='-Bstatic'
14369 case $cc_basename in
14370 f77* | f90* | f95*)
14371 lt_prog_compiler_wl='-Qoption ld ';;
14372 *)
14373 lt_prog_compiler_wl='-Wl,';;
5d47bb02 14374 esac
da0f6381
PB
14375 ;;
14376
00020c16
ILT
14377 sunos4*)
14378 lt_prog_compiler_wl='-Qoption ld '
14379 lt_prog_compiler_pic='-PIC'
14380 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14381 ;;
14382
00020c16
ILT
14383 sysv4 | sysv4.2uw2* | sysv4.3*)
14384 lt_prog_compiler_wl='-Wl,'
14385 lt_prog_compiler_pic='-KPIC'
14386 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14387 ;;
14388
00020c16
ILT
14389 sysv4*MP*)
14390 if test -d /usr/nec ;then
14391 lt_prog_compiler_pic='-Kconform_pic'
14392 lt_prog_compiler_static='-Bstatic'
14393 fi
da0f6381
PB
14394 ;;
14395
00020c16
ILT
14396 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14397 lt_prog_compiler_wl='-Wl,'
14398 lt_prog_compiler_pic='-KPIC'
14399 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14400 ;;
14401
00020c16
ILT
14402 unicos*)
14403 lt_prog_compiler_wl='-Wl,'
14404 lt_prog_compiler_can_build_shared=no
da0f6381
PB
14405 ;;
14406
00020c16
ILT
14407 uts4*)
14408 lt_prog_compiler_pic='-pic'
14409 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14410 ;;
14411
00020c16
ILT
14412 *)
14413 lt_prog_compiler_can_build_shared=no
da0f6381 14414 ;;
00020c16
ILT
14415 esac
14416 fi
da0f6381 14417
00020c16
ILT
14418case $host_os in
14419 # For platforms which do not support PIC, -DPIC is meaningless:
14420 *djgpp*)
14421 lt_prog_compiler_pic=
14422 ;;
14423 *)
14424 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
14425 ;;
14426esac
5213506e
RW
14427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
14428$as_echo "$lt_prog_compiler_pic" >&6; }
da0f6381 14429
da0f6381 14430
da0f6381 14431
da0f6381 14432
da0f6381 14433
da0f6381 14434
00020c16
ILT
14435#
14436# Check to make sure the PIC flag actually works.
14437#
14438if test -n "$lt_prog_compiler_pic"; then
5213506e
RW
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
14440$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
14441if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
14442 $as_echo_n "(cached) " >&6
00020c16
ILT
14443else
14444 lt_cv_prog_compiler_pic_works=no
14445 ac_outfile=conftest.$ac_objext
14446 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14447 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
14448 # Insert the option either (1) after the last *FLAGS variable, or
14449 # (2) before a word containing "conftest.", or (3) at the end.
14450 # Note that $ac_compile itself does not contain backslashes and begins
14451 # with a dollar sign (not a hyphen), so the echo should work correctly.
14452 # The option is referenced via a variable to avoid confusing sed.
14453 lt_compile=`echo "$ac_compile" | $SED \
14454 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14455 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14456 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14457 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14458 (eval "$lt_compile" 2>conftest.err)
14459 ac_status=$?
14460 cat conftest.err >&5
43e02a8a 14461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14462 if (exit $ac_status) && test -s "$ac_outfile"; then
14463 # The compiler can only warn and ignore the option if not recognized
14464 # So say no if there are warnings other than the usual output.
43e02a8a 14465 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
14466 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14467 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14468 lt_cv_prog_compiler_pic_works=yes
14469 fi
14470 fi
14471 $RM conftest*
da0f6381 14472
00020c16 14473fi
5213506e
RW
14474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
14475$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
da0f6381 14476
00020c16
ILT
14477if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
14478 case $lt_prog_compiler_pic in
14479 "" | " "*) ;;
14480 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
14481 esac
da0f6381 14482else
00020c16
ILT
14483 lt_prog_compiler_pic=
14484 lt_prog_compiler_can_build_shared=no
da0f6381 14485fi
da0f6381 14486
00020c16 14487fi
da0f6381 14488
da0f6381 14489
da0f6381 14490
da0f6381 14491
da0f6381 14492
da0f6381 14493
00020c16
ILT
14494#
14495# Check to make sure the static flag actually works.
14496#
14497wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
5213506e
RW
14498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14499$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
14500if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
14501 $as_echo_n "(cached) " >&6
00020c16
ILT
14502else
14503 lt_cv_prog_compiler_static_works=no
14504 save_LDFLAGS="$LDFLAGS"
14505 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14506 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14507 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14508 # The linker can only warn and ignore the option if not recognized
14509 # So say no if there are warnings
14510 if test -s conftest.err; then
14511 # Append any errors to the config.log.
14512 cat conftest.err 1>&5
43e02a8a 14513 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
00020c16
ILT
14514 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14515 if diff conftest.exp conftest.er2 >/dev/null; then
14516 lt_cv_prog_compiler_static_works=yes
14517 fi
14518 else
14519 lt_cv_prog_compiler_static_works=yes
14520 fi
14521 fi
14522 $RM -r conftest*
14523 LDFLAGS="$save_LDFLAGS"
da0f6381 14524
00020c16 14525fi
5213506e
RW
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
14527$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
da0f6381 14528
00020c16
ILT
14529if test x"$lt_cv_prog_compiler_static_works" = xyes; then
14530 :
14531else
14532 lt_prog_compiler_static=
14533fi
da0f6381 14534
da0f6381 14535
da0f6381 14536
da0f6381 14537
da0f6381 14538
da0f6381 14539
da0f6381 14540
5213506e
RW
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14542$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14543if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14544 $as_echo_n "(cached) " >&6
00020c16
ILT
14545else
14546 lt_cv_prog_compiler_c_o=no
14547 $RM -r conftest 2>/dev/null
14548 mkdir conftest
14549 cd conftest
14550 mkdir out
14551 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14552
00020c16
ILT
14553 lt_compiler_flag="-o out/conftest2.$ac_objext"
14554 # Insert the option either (1) after the last *FLAGS variable, or
14555 # (2) before a word containing "conftest.", or (3) at the end.
14556 # Note that $ac_compile itself does not contain backslashes and begins
14557 # with a dollar sign (not a hyphen), so the echo should work correctly.
14558 lt_compile=`echo "$ac_compile" | $SED \
14559 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14560 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14561 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14562 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14563 (eval "$lt_compile" 2>out/conftest.err)
14564 ac_status=$?
14565 cat out/conftest.err >&5
43e02a8a 14566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14567 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14568 then
14569 # The compiler can only warn and ignore the option if not recognized
14570 # So say no if there are warnings
43e02a8a 14571 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
14572 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14573 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14574 lt_cv_prog_compiler_c_o=yes
14575 fi
14576 fi
14577 chmod u+w . 2>&5
14578 $RM conftest*
14579 # SGI C++ compiler will create directory out/ii_files/ for
14580 # template instantiation
14581 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14582 $RM out/* && rmdir out
14583 cd ..
14584 $RM -r conftest
14585 $RM conftest*
da0f6381 14586
00020c16 14587fi
5213506e
RW
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14589$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14590
14591
14592
14593
14594
14595
5213506e
RW
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14597$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14598if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14599 $as_echo_n "(cached) " >&6
00020c16
ILT
14600else
14601 lt_cv_prog_compiler_c_o=no
14602 $RM -r conftest 2>/dev/null
14603 mkdir conftest
14604 cd conftest
14605 mkdir out
14606 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14607
00020c16
ILT
14608 lt_compiler_flag="-o out/conftest2.$ac_objext"
14609 # Insert the option either (1) after the last *FLAGS variable, or
14610 # (2) before a word containing "conftest.", or (3) at the end.
14611 # Note that $ac_compile itself does not contain backslashes and begins
14612 # with a dollar sign (not a hyphen), so the echo should work correctly.
14613 lt_compile=`echo "$ac_compile" | $SED \
14614 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14615 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14616 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14617 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14618 (eval "$lt_compile" 2>out/conftest.err)
14619 ac_status=$?
14620 cat out/conftest.err >&5
43e02a8a 14621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14622 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14623 then
14624 # The compiler can only warn and ignore the option if not recognized
14625 # So say no if there are warnings
43e02a8a 14626 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
14627 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14628 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14629 lt_cv_prog_compiler_c_o=yes
14630 fi
14631 fi
14632 chmod u+w . 2>&5
14633 $RM conftest*
14634 # SGI C++ compiler will create directory out/ii_files/ for
14635 # template instantiation
14636 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14637 $RM out/* && rmdir out
14638 cd ..
14639 $RM -r conftest
14640 $RM conftest*
da0f6381 14641
00020c16 14642fi
5213506e
RW
14643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14644$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14645
14646
14647
14648
00020c16
ILT
14649hard_links="nottested"
14650if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
14651 # do not overwrite the value of need_locks provided by the user
5213506e
RW
14652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
14653$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16 14654 hard_links=yes
baafc534 14655 $RM conftest*
00020c16
ILT
14656 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14657 touch conftest.a
14658 ln conftest.a conftest.b 2>&5 || hard_links=no
14659 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
14660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
14661$as_echo "$hard_links" >&6; }
00020c16 14662 if test "$hard_links" = no; then
5213506e
RW
14663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14664$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16 14665 need_locks=warn
da0f6381 14666 fi
00020c16
ILT
14667else
14668 need_locks=no
14669fi
da0f6381
PB
14670
14671
14672
14673
14674
14675
5213506e
RW
14676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14677$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
da0f6381 14678
00020c16
ILT
14679 runpath_var=
14680 allow_undefined_flag=
14681 always_export_symbols=no
14682 archive_cmds=
14683 archive_expsym_cmds=
14684 compiler_needs_object=no
14685 enable_shared_with_static_runtimes=no
14686 export_dynamic_flag_spec=
14687 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14688 hardcode_automatic=no
14689 hardcode_direct=no
14690 hardcode_direct_absolute=no
14691 hardcode_libdir_flag_spec=
14692 hardcode_libdir_flag_spec_ld=
14693 hardcode_libdir_separator=
14694 hardcode_minus_L=no
14695 hardcode_shlibpath_var=unsupported
14696 inherit_rpath=no
14697 link_all_deplibs=unknown
14698 module_cmds=
14699 module_expsym_cmds=
14700 old_archive_from_new_cmds=
14701 old_archive_from_expsyms_cmds=
14702 thread_safe_flag_spec=
14703 whole_archive_flag_spec=
14704 # include_expsyms should be a list of space-separated symbols to be *always*
14705 # included in the symbol list
14706 include_expsyms=
14707 # exclude_expsyms can be an extended regexp of symbols to exclude
14708 # it will be wrapped by ` (' and `)$', so one must not match beginning or
14709 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
14710 # as well as any symbol that contains `d'.
14711 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
14712 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
14713 # platforms (ab)use it in PIC code, but their linkers get confused if
14714 # the symbol is explicitly referenced. Since portable code cannot
14715 # rely on this symbol name, it's probably fine to never include it in
14716 # preloaded symbol tables.
14717 # Exclude shared library initialization/finalization symbols.
14718 extract_expsyms_cmds=
da0f6381 14719
00020c16
ILT
14720 case $host_os in
14721 cygwin* | mingw* | pw32* | cegcc*)
14722 # FIXME: the MSVC++ port hasn't been tested in a loooong time
14723 # When not using gcc, we currently assume that we are using
14724 # Microsoft Visual C++.
14725 if test "$GCC" != yes; then
14726 with_gnu_ld=no
14727 fi
14728 ;;
14729 interix*)
14730 # we just hope/assume this is gcc and not c89 (= MSVC++)
14731 with_gnu_ld=yes
14732 ;;
14733 openbsd*)
14734 with_gnu_ld=no
14735 ;;
14736 esac
da0f6381 14737
00020c16 14738 ld_shlibs=yes
43e02a8a
RW
14739
14740 # On some targets, GNU ld is compatible enough with the native linker
14741 # that we're better off using the native interface for both.
14742 lt_use_gnu_ld_interface=no
00020c16 14743 if test "$with_gnu_ld" = yes; then
43e02a8a
RW
14744 case $host_os in
14745 aix*)
14746 # The AIX port of GNU ld has always aspired to compatibility
14747 # with the native linker. However, as the warning in the GNU ld
14748 # block says, versions before 2.19.5* couldn't really create working
14749 # shared libraries, regardless of the interface used.
14750 case `$LD -v 2>&1` in
14751 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
14752 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
14753 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
14754 *)
14755 lt_use_gnu_ld_interface=yes
14756 ;;
14757 esac
14758 ;;
14759 *)
14760 lt_use_gnu_ld_interface=yes
14761 ;;
14762 esac
14763 fi
14764
14765 if test "$lt_use_gnu_ld_interface" = yes; then
00020c16
ILT
14766 # If archive_cmds runs LD, not CC, wlarc should be empty
14767 wlarc='${wl}'
da0f6381 14768
00020c16
ILT
14769 # Set some defaults for GNU ld with shared library support. These
14770 # are reset later if shared libraries are not supported. Putting them
14771 # here allows them to be overridden if necessary.
14772 runpath_var=LD_RUN_PATH
14773 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
14774 export_dynamic_flag_spec='${wl}--export-dynamic'
14775 # ancient GNU ld didn't support --whole-archive et. al.
14776 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
14777 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
14778 else
14779 whole_archive_flag_spec=
14780 fi
14781 supports_anon_versioning=no
14782 case `$LD -v 2>&1` in
43e02a8a 14783 *GNU\ gold*) supports_anon_versioning=yes ;;
00020c16
ILT
14784 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
14785 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
14786 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
14787 *\ 2.11.*) ;; # other 2.11 versions
14788 *) supports_anon_versioning=yes ;;
14789 esac
da0f6381 14790
00020c16
ILT
14791 # See if GNU ld supports shared libraries.
14792 case $host_os in
14793 aix[3-9]*)
14794 # On AIX/PPC, the GNU linker is very broken
14795 if test "$host_cpu" != ia64; then
14796 ld_shlibs=no
14797 cat <<_LT_EOF 1>&2
da0f6381 14798
43e02a8a 14799*** Warning: the GNU linker, at least up to release 2.19, is reported
00020c16
ILT
14800*** to be unable to reliably create shared libraries on AIX.
14801*** Therefore, libtool is disabling shared libraries support. If you
43e02a8a
RW
14802*** really care for shared libraries, you may want to install binutils
14803*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
14804*** You will then need to restart the configuration process.
da0f6381 14805
00020c16
ILT
14806_LT_EOF
14807 fi
14808 ;;
da0f6381 14809
00020c16
ILT
14810 amigaos*)
14811 case $host_cpu in
14812 powerpc)
14813 # see comment about AmigaOS4 .so support
14814 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14815 archive_expsym_cmds=''
14816 ;;
14817 m68k)
14818 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)'
14819 hardcode_libdir_flag_spec='-L$libdir'
14820 hardcode_minus_L=yes
14821 ;;
14822 esac
14823 ;;
da0f6381 14824
00020c16
ILT
14825 beos*)
14826 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14827 allow_undefined_flag=unsupported
14828 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14829 # support --undefined. This deserves some investigation. FIXME
14830 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14831 else
14832 ld_shlibs=no
14833 fi
14834 ;;
da0f6381 14835
00020c16
ILT
14836 cygwin* | mingw* | pw32* | cegcc*)
14837 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
14838 # as there is no search path for DLLs.
14839 hardcode_libdir_flag_spec='-L$libdir'
43e02a8a 14840 export_dynamic_flag_spec='${wl}--export-all-symbols'
00020c16
ILT
14841 allow_undefined_flag=unsupported
14842 always_export_symbols=no
14843 enable_shared_with_static_runtimes=yes
14844 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
da0f6381 14845
00020c16
ILT
14846 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
14847 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14848 # If the export-symbols file already is a .def file (1st line
14849 # is EXPORTS), use it as is; otherwise, prepend...
14850 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
14851 cp $export_symbols $output_objdir/$soname.def;
14852 else
14853 echo EXPORTS > $output_objdir/$soname.def;
14854 cat $export_symbols >> $output_objdir/$soname.def;
14855 fi~
14856 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14857 else
14858 ld_shlibs=no
14859 fi
14860 ;;
da0f6381 14861
43e02a8a
RW
14862 haiku*)
14863 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14864 link_all_deplibs=yes
14865 ;;
14866
00020c16
ILT
14867 interix[3-9]*)
14868 hardcode_direct=no
14869 hardcode_shlibpath_var=no
14870 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
14871 export_dynamic_flag_spec='${wl}-E'
14872 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14873 # Instead, shared libraries are loaded at an image base (0x10000000 by
14874 # default) and relocated if they conflict, which is a slow very memory
14875 # consuming and fragmenting process. To avoid this, we pick a random,
14876 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14877 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14878 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14879 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'
14880 ;;
da0f6381 14881
00020c16
ILT
14882 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
14883 tmp_diet=no
14884 if test "$host_os" = linux-dietlibc; then
14885 case $cc_basename in
14886 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
14887 esac
14888 fi
14889 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
14890 && test "$tmp_diet" = no
14891 then
14892 tmp_addflag=
14893 tmp_sharedflag='-shared'
14894 case $cc_basename,$host_cpu in
14895 pgcc*) # Portland Group C compiler
43e02a8a 14896 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
00020c16
ILT
14897 tmp_addflag=' $pic_flag'
14898 ;;
43e02a8a
RW
14899 pgf77* | pgf90* | pgf95* | pgfortran*)
14900 # Portland Group f77 and f90 compilers
14901 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
00020c16
ILT
14902 tmp_addflag=' $pic_flag -Mnomain' ;;
14903 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
14904 tmp_addflag=' -i_dynamic' ;;
14905 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
14906 tmp_addflag=' -i_dynamic -nofor_main' ;;
14907 ifc* | ifort*) # Intel Fortran compiler
14908 tmp_addflag=' -nofor_main' ;;
14909 lf95*) # Lahey Fortran 8.1
14910 whole_archive_flag_spec=
14911 tmp_sharedflag='--shared' ;;
43e02a8a 14912 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
00020c16
ILT
14913 tmp_sharedflag='-qmkshrobj'
14914 tmp_addflag= ;;
43e02a8a
RW
14915 nvcc*) # Cuda Compiler Driver 2.2
14916 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
14917 compiler_needs_object=yes
14918 ;;
00020c16
ILT
14919 esac
14920 case `$CC -V 2>&1 | sed 5q` in
14921 *Sun\ C*) # Sun C 5.9
43e02a8a 14922 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
00020c16
ILT
14923 compiler_needs_object=yes
14924 tmp_sharedflag='-G' ;;
14925 *Sun\ F*) # Sun Fortran 8.3
14926 tmp_sharedflag='-G' ;;
14927 esac
14928 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
da0f6381 14929
00020c16
ILT
14930 if test "x$supports_anon_versioning" = xyes; then
14931 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14932 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14933 echo "local: *; };" >> $output_objdir/$libname.ver~
14934 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
14935 fi
da0f6381 14936
00020c16 14937 case $cc_basename in
43e02a8a 14938 xlf* | bgf* | bgxlf* | mpixlf*)
00020c16
ILT
14939 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
14940 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
14941 hardcode_libdir_flag_spec=
14942 hardcode_libdir_flag_spec_ld='-rpath $libdir'
14943 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
14944 if test "x$supports_anon_versioning" = xyes; then
14945 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14946 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14947 echo "local: *; };" >> $output_objdir/$libname.ver~
14948 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
14949 fi
14950 ;;
14951 esac
14952 else
14953 ld_shlibs=no
14954 fi
14955 ;;
da0f6381 14956
00020c16
ILT
14957 netbsd*)
14958 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14959 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14960 wlarc=
14961 else
14962 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14963 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14964 fi
14965 ;;
da0f6381 14966
00020c16
ILT
14967 solaris*)
14968 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
14969 ld_shlibs=no
14970 cat <<_LT_EOF 1>&2
da0f6381 14971
00020c16
ILT
14972*** Warning: The releases 2.8.* of the GNU linker cannot reliably
14973*** create shared libraries on Solaris systems. Therefore, libtool
14974*** is disabling shared libraries support. We urge you to upgrade GNU
14975*** binutils to release 2.9.1 or newer. Another option is to modify
14976*** your PATH or compiler configuration so that the native linker is
14977*** used, and then restart.
da0f6381 14978
00020c16
ILT
14979_LT_EOF
14980 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14981 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14982 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14983 else
14984 ld_shlibs=no
14985 fi
14986 ;;
da0f6381 14987
00020c16
ILT
14988 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
14989 case `$LD -v 2>&1` in
14990 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
14991 ld_shlibs=no
14992 cat <<_LT_EOF 1>&2
da0f6381 14993
00020c16
ILT
14994*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
14995*** reliably create shared libraries on SCO systems. Therefore, libtool
14996*** is disabling shared libraries support. We urge you to upgrade GNU
14997*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
14998*** your PATH or compiler configuration so that the native linker is
14999*** used, and then restart.
da0f6381 15000
00020c16
ILT
15001_LT_EOF
15002 ;;
15003 *)
15004 # For security reasons, it is highly recommended that you always
15005 # use absolute paths for naming shared libraries, and exclude the
15006 # DT_RUNPATH tag from executables and libraries. But doing so
15007 # requires that you compile everything twice, which is a pain.
15008 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15009 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15010 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15011 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15012 else
15013 ld_shlibs=no
15014 fi
15015 ;;
15016 esac
15017 ;;
da0f6381 15018
00020c16
ILT
15019 sunos4*)
15020 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15021 wlarc=
15022 hardcode_direct=yes
15023 hardcode_shlibpath_var=no
15024 ;;
da0f6381 15025
00020c16
ILT
15026 *)
15027 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15028 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15029 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15030 else
15031 ld_shlibs=no
15032 fi
15033 ;;
15034 esac
da0f6381 15035
00020c16
ILT
15036 if test "$ld_shlibs" = no; then
15037 runpath_var=
15038 hardcode_libdir_flag_spec=
15039 export_dynamic_flag_spec=
15040 whole_archive_flag_spec=
15041 fi
15042 else
15043 # PORTME fill in a description of your system's linker (not GNU ld)
15044 case $host_os in
15045 aix3*)
15046 allow_undefined_flag=unsupported
15047 always_export_symbols=yes
15048 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'
15049 # Note: this linker hardcodes the directories in LIBPATH if there
15050 # are no directories specified by -L.
15051 hardcode_minus_L=yes
15052 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
15053 # Neither direct hardcoding nor static linking is supported with a
15054 # broken collect2.
15055 hardcode_direct=unsupported
15056 fi
15057 ;;
da0f6381 15058
00020c16
ILT
15059 aix[4-9]*)
15060 if test "$host_cpu" = ia64; then
15061 # On IA64, the linker does run time linking by default, so we don't
15062 # have to do anything special.
15063 aix_use_runtimelinking=no
15064 exp_sym_flag='-Bexport'
15065 no_entry_flag=""
15066 else
15067 # If we're using GNU nm, then we don't want the "-C" option.
15068 # -C means demangle to AIX nm, but means don't demangle with GNU nm
43e02a8a
RW
15069 # Also, AIX nm treats weak defined symbols like other global
15070 # defined symbols, whereas GNU nm marks them as "W".
00020c16 15071 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
43e02a8a 15072 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
00020c16
ILT
15073 else
15074 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'
15075 fi
15076 aix_use_runtimelinking=no
da0f6381 15077
00020c16
ILT
15078 # Test if we are trying to use run time linking or normal
15079 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
15080 # need to do runtime linking.
15081 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
15082 for ld_flag in $LDFLAGS; do
15083 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
15084 aix_use_runtimelinking=yes
15085 break
15086 fi
15087 done
15088 ;;
15089 esac
da0f6381 15090
00020c16
ILT
15091 exp_sym_flag='-bexport'
15092 no_entry_flag='-bnoentry'
15093 fi
da0f6381 15094
00020c16
ILT
15095 # When large executables or shared objects are built, AIX ld can
15096 # have problems creating the table of contents. If linking a library
15097 # or program results in "error TOC overflow" add -mminimal-toc to
15098 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
15099 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
da0f6381 15100
00020c16
ILT
15101 archive_cmds=''
15102 hardcode_direct=yes
15103 hardcode_direct_absolute=yes
15104 hardcode_libdir_separator=':'
15105 link_all_deplibs=yes
15106 file_list_spec='${wl}-f,'
da0f6381 15107
00020c16
ILT
15108 if test "$GCC" = yes; then
15109 case $host_os in aix4.[012]|aix4.[012].*)
15110 # We only want to do this on AIX 4.2 and lower, the check
15111 # below for broken collect2 doesn't work under 4.3+
15112 collect2name=`${CC} -print-prog-name=collect2`
15113 if test -f "$collect2name" &&
15114 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
15115 then
15116 # We have reworked collect2
15117 :
15118 else
15119 # We have old collect2
15120 hardcode_direct=unsupported
15121 # It fails to find uninstalled libraries when the uninstalled
15122 # path is not listed in the libpath. Setting hardcode_minus_L
15123 # to unsupported forces relinking
15124 hardcode_minus_L=yes
15125 hardcode_libdir_flag_spec='-L$libdir'
15126 hardcode_libdir_separator=
15127 fi
15128 ;;
15129 esac
15130 shared_flag='-shared'
15131 if test "$aix_use_runtimelinking" = yes; then
15132 shared_flag="$shared_flag "'${wl}-G'
15133 fi
15134 else
15135 # not using gcc
15136 if test "$host_cpu" = ia64; then
15137 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
15138 # chokes on -Wl,-G. The following line is correct:
15139 shared_flag='-G'
15140 else
15141 if test "$aix_use_runtimelinking" = yes; then
15142 shared_flag='${wl}-G'
15143 else
15144 shared_flag='${wl}-bM:SRE'
15145 fi
15146 fi
15147 fi
da0f6381 15148
00020c16
ILT
15149 export_dynamic_flag_spec='${wl}-bexpall'
15150 # It seems that -bexpall does not export symbols beginning with
15151 # underscore (_), so it is better to generate a list of symbols to export.
15152 always_export_symbols=yes
15153 if test "$aix_use_runtimelinking" = yes; then
15154 # Warning - without using the other runtime loading flags (-brtl),
15155 # -berok will link without error, but may produce a broken library.
15156 allow_undefined_flag='-berok'
15157 # Determine the default libpath from the value encoded in an
15158 # empty executable.
5213506e 15159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15160/* end confdefs.h. */
da0f6381 15161
00020c16
ILT
15162int
15163main ()
15164{
da0f6381 15165
00020c16
ILT
15166 ;
15167 return 0;
15168}
15169_ACEOF
5213506e 15170if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15171
00020c16
ILT
15172lt_aix_libpath_sed='
15173 /Import File Strings/,/^$/ {
15174 /^0/ {
15175 s/^0 *\(.*\)$/\1/
15176 p
15177 }
15178 }'
15179aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15180# Check for a 64-bit object if we didn't find anything.
15181if test -z "$aix_libpath"; then
15182 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15183fi
00020c16 15184fi
5213506e
RW
15185rm -f core conftest.err conftest.$ac_objext \
15186 conftest$ac_exeext conftest.$ac_ext
00020c16 15187if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15188
00020c16 15189 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
43e02a8a 15190 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
00020c16
ILT
15191 else
15192 if test "$host_cpu" = ia64; then
15193 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
15194 allow_undefined_flag="-z nodefs"
15195 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"
15196 else
15197 # Determine the default libpath from the value encoded in an
15198 # empty executable.
5213506e 15199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15200/* end confdefs.h. */
da0f6381 15201
00020c16
ILT
15202int
15203main ()
15204{
da0f6381 15205
00020c16
ILT
15206 ;
15207 return 0;
15208}
15209_ACEOF
5213506e 15210if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15211
00020c16
ILT
15212lt_aix_libpath_sed='
15213 /Import File Strings/,/^$/ {
15214 /^0/ {
15215 s/^0 *\(.*\)$/\1/
15216 p
15217 }
15218 }'
15219aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15220# Check for a 64-bit object if we didn't find anything.
15221if test -z "$aix_libpath"; then
15222 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15223fi
00020c16 15224fi
5213506e
RW
15225rm -f core conftest.err conftest.$ac_objext \
15226 conftest$ac_exeext conftest.$ac_ext
00020c16 15227if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15228
00020c16
ILT
15229 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
15230 # Warning - without using the other run time loading flags,
15231 # -berok will link without error, but may produce a broken library.
15232 no_undefined_flag=' ${wl}-bernotok'
15233 allow_undefined_flag=' ${wl}-berok'
43e02a8a
RW
15234 if test "$with_gnu_ld" = yes; then
15235 # We only use this code for GNU lds that support --whole-archive.
15236 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
15237 else
15238 # Exported symbols can be pulled into shared objects from archives
15239 whole_archive_flag_spec='$convenience'
15240 fi
00020c16
ILT
15241 archive_cmds_need_lc=yes
15242 # This is similar to how AIX traditionally builds its shared libraries.
15243 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'
15244 fi
15245 fi
15246 ;;
da0f6381 15247
00020c16
ILT
15248 amigaos*)
15249 case $host_cpu in
15250 powerpc)
15251 # see comment about AmigaOS4 .so support
15252 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15253 archive_expsym_cmds=''
15254 ;;
15255 m68k)
15256 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)'
15257 hardcode_libdir_flag_spec='-L$libdir'
15258 hardcode_minus_L=yes
15259 ;;
15260 esac
15261 ;;
da0f6381 15262
00020c16
ILT
15263 bsdi[45]*)
15264 export_dynamic_flag_spec=-rdynamic
15265 ;;
da0f6381 15266
00020c16
ILT
15267 cygwin* | mingw* | pw32* | cegcc*)
15268 # When not using gcc, we currently assume that we are using
15269 # Microsoft Visual C++.
15270 # hardcode_libdir_flag_spec is actually meaningless, as there is
15271 # no search path for DLLs.
15272 hardcode_libdir_flag_spec=' '
15273 allow_undefined_flag=unsupported
15274 # Tell ltmain to make .lib files, not .a files.
15275 libext=lib
15276 # Tell ltmain to make .dll files, not .so files.
15277 shrext_cmds=".dll"
15278 # FIXME: Setting linknames here is a bad hack.
43e02a8a 15279 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
00020c16
ILT
15280 # The linker will automatically build a .lib file if we build a DLL.
15281 old_archive_from_new_cmds='true'
15282 # FIXME: Should let the user specify the lib program.
15283 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
15284 fix_srcfile_path='`cygpath -w "$srcfile"`'
15285 enable_shared_with_static_runtimes=yes
15286 ;;
da0f6381 15287
00020c16 15288 darwin* | rhapsody*)
da0f6381
PB
15289
15290
00020c16
ILT
15291 archive_cmds_need_lc=no
15292 hardcode_direct=no
15293 hardcode_automatic=yes
15294 hardcode_shlibpath_var=unsupported
43e02a8a
RW
15295 if test "$lt_cv_ld_force_load" = "yes"; then
15296 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
15297 else
15298 whole_archive_flag_spec=''
15299 fi
00020c16
ILT
15300 link_all_deplibs=yes
15301 allow_undefined_flag="$_lt_dar_allow_undefined"
15302 case $cc_basename in
15303 ifort*) _lt_dar_can_shared=yes ;;
15304 *) _lt_dar_can_shared=$GCC ;;
15305 esac
15306 if test "$_lt_dar_can_shared" = "yes"; then
43e02a8a 15307 output_verbose_link_cmd=func_echo_all
00020c16
ILT
15308 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
15309 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
15310 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}"
15311 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 15312
00020c16
ILT
15313 else
15314 ld_shlibs=no
15315 fi
da0f6381 15316
00020c16 15317 ;;
da0f6381 15318
00020c16
ILT
15319 dgux*)
15320 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15321 hardcode_libdir_flag_spec='-L$libdir'
15322 hardcode_shlibpath_var=no
15323 ;;
da0f6381 15324
00020c16
ILT
15325 freebsd1*)
15326 ld_shlibs=no
15327 ;;
da0f6381 15328
00020c16
ILT
15329 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15330 # support. Future versions do this automatically, but an explicit c++rt0.o
15331 # does not break anything, and helps significantly (at the cost of a little
15332 # extra space).
15333 freebsd2.2*)
15334 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
15335 hardcode_libdir_flag_spec='-R$libdir'
15336 hardcode_direct=yes
15337 hardcode_shlibpath_var=no
15338 ;;
da0f6381 15339
00020c16
ILT
15340 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
15341 freebsd2*)
15342 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15343 hardcode_direct=yes
15344 hardcode_minus_L=yes
15345 hardcode_shlibpath_var=no
15346 ;;
da0f6381 15347
00020c16
ILT
15348 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
15349 freebsd* | dragonfly*)
15350 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
15351 hardcode_libdir_flag_spec='-R$libdir'
15352 hardcode_direct=yes
15353 hardcode_shlibpath_var=no
15354 ;;
da0f6381 15355
00020c16
ILT
15356 hpux9*)
15357 if test "$GCC" = yes; then
15358 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'
15359 else
15360 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'
15361 fi
15362 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15363 hardcode_libdir_separator=:
15364 hardcode_direct=yes
da0f6381 15365
00020c16
ILT
15366 # hardcode_minus_L: Not really in the search PATH,
15367 # but as the default location of the library.
15368 hardcode_minus_L=yes
15369 export_dynamic_flag_spec='${wl}-E'
15370 ;;
da0f6381 15371
00020c16 15372 hpux10*)
43e02a8a 15373 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
00020c16
ILT
15374 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15375 else
15376 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15377 fi
15378 if test "$with_gnu_ld" = no; then
15379 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15380 hardcode_libdir_flag_spec_ld='+b $libdir'
15381 hardcode_libdir_separator=:
15382 hardcode_direct=yes
15383 hardcode_direct_absolute=yes
15384 export_dynamic_flag_spec='${wl}-E'
15385 # hardcode_minus_L: Not really in the search PATH,
15386 # but as the default location of the library.
15387 hardcode_minus_L=yes
15388 fi
15389 ;;
da0f6381 15390
00020c16 15391 hpux11*)
43e02a8a 15392 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
00020c16
ILT
15393 case $host_cpu in
15394 hppa*64*)
15395 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15396 ;;
15397 ia64*)
15398 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15399 ;;
15400 *)
15401 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15402 ;;
15403 esac
15404 else
15405 case $host_cpu in
15406 hppa*64*)
15407 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15408 ;;
15409 ia64*)
15410 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15411 ;;
15412 *)
43e02a8a
RW
15413
15414 # Older versions of the 11.00 compiler do not understand -b yet
15415 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
15416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
15417$as_echo_n "checking if $CC understands -b... " >&6; }
15418if test "${lt_cv_prog_compiler__b+set}" = set; then :
15419 $as_echo_n "(cached) " >&6
15420else
15421 lt_cv_prog_compiler__b=no
15422 save_LDFLAGS="$LDFLAGS"
15423 LDFLAGS="$LDFLAGS -b"
15424 echo "$lt_simple_link_test_code" > conftest.$ac_ext
15425 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15426 # The linker can only warn and ignore the option if not recognized
15427 # So say no if there are warnings
15428 if test -s conftest.err; then
15429 # Append any errors to the config.log.
15430 cat conftest.err 1>&5
15431 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15432 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15433 if diff conftest.exp conftest.er2 >/dev/null; then
15434 lt_cv_prog_compiler__b=yes
15435 fi
15436 else
15437 lt_cv_prog_compiler__b=yes
15438 fi
15439 fi
15440 $RM -r conftest*
15441 LDFLAGS="$save_LDFLAGS"
15442
15443fi
15444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
15445$as_echo "$lt_cv_prog_compiler__b" >&6; }
15446
15447if test x"$lt_cv_prog_compiler__b" = xyes; then
15448 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15449else
15450 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15451fi
15452
00020c16
ILT
15453 ;;
15454 esac
15455 fi
15456 if test "$with_gnu_ld" = no; then
15457 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15458 hardcode_libdir_separator=:
da0f6381 15459
00020c16
ILT
15460 case $host_cpu in
15461 hppa*64*|ia64*)
15462 hardcode_direct=no
15463 hardcode_shlibpath_var=no
15464 ;;
15465 *)
15466 hardcode_direct=yes
15467 hardcode_direct_absolute=yes
15468 export_dynamic_flag_spec='${wl}-E'
da0f6381 15469
00020c16
ILT
15470 # hardcode_minus_L: Not really in the search PATH,
15471 # but as the default location of the library.
15472 hardcode_minus_L=yes
15473 ;;
15474 esac
15475 fi
15476 ;;
da0f6381 15477
00020c16
ILT
15478 irix5* | irix6* | nonstopux*)
15479 if test "$GCC" = yes; then
43e02a8a 15480 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
00020c16
ILT
15481 # Try to use the -exported_symbol ld option, if it does not
15482 # work, assume that -exports_file does not work either and
15483 # implicitly export all symbols.
15484 save_LDFLAGS="$LDFLAGS"
15485 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5213506e
RW
15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15487/* end confdefs.h. */
00020c16
ILT
15488int foo(void) {}
15489_ACEOF
5213506e 15490if ac_fn_c_try_link "$LINENO"; then :
43e02a8a 15491 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
da0f6381 15492
00020c16 15493fi
5213506e
RW
15494rm -f core conftest.err conftest.$ac_objext \
15495 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
15496 LDFLAGS="$save_LDFLAGS"
15497 else
43e02a8a
RW
15498 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
15499 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
00020c16
ILT
15500 fi
15501 archive_cmds_need_lc='no'
15502 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15503 hardcode_libdir_separator=:
15504 inherit_rpath=yes
15505 link_all_deplibs=yes
15506 ;;
da0f6381 15507
00020c16
ILT
15508 netbsd*)
15509 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15510 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
15511 else
15512 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
15513 fi
15514 hardcode_libdir_flag_spec='-R$libdir'
15515 hardcode_direct=yes
15516 hardcode_shlibpath_var=no
15517 ;;
da0f6381 15518
00020c16
ILT
15519 newsos6)
15520 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15521 hardcode_direct=yes
15522 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15523 hardcode_libdir_separator=:
15524 hardcode_shlibpath_var=no
15525 ;;
da0f6381 15526
00020c16
ILT
15527 *nto* | *qnx*)
15528 ;;
da0f6381 15529
00020c16
ILT
15530 openbsd*)
15531 if test -f /usr/libexec/ld.so; then
15532 hardcode_direct=yes
15533 hardcode_shlibpath_var=no
15534 hardcode_direct_absolute=yes
15535 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15536 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15537 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
15538 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15539 export_dynamic_flag_spec='${wl}-E'
15540 else
15541 case $host_os in
15542 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
15543 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15544 hardcode_libdir_flag_spec='-R$libdir'
15545 ;;
15546 *)
15547 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15548 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15549 ;;
15550 esac
15551 fi
15552 else
15553 ld_shlibs=no
15554 fi
15555 ;;
da0f6381 15556
00020c16
ILT
15557 os2*)
15558 hardcode_libdir_flag_spec='-L$libdir'
15559 hardcode_minus_L=yes
15560 allow_undefined_flag=unsupported
43e02a8a 15561 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
00020c16
ILT
15562 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
15563 ;;
da0f6381 15564
00020c16
ILT
15565 osf3*)
15566 if test "$GCC" = yes; then
15567 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 15568 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
00020c16
ILT
15569 else
15570 allow_undefined_flag=' -expect_unresolved \*'
43e02a8a 15571 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
00020c16
ILT
15572 fi
15573 archive_cmds_need_lc='no'
15574 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15575 hardcode_libdir_separator=:
15576 ;;
da0f6381 15577
00020c16
ILT
15578 osf4* | osf5*) # as osf3* with the addition of -msym flag
15579 if test "$GCC" = yes; then
15580 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 15581 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
00020c16
ILT
15582 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15583 else
15584 allow_undefined_flag=' -expect_unresolved \*'
43e02a8a 15585 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
00020c16 15586 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
43e02a8a 15587 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
da0f6381 15588
00020c16
ILT
15589 # Both c and cxx compiler support -rpath directly
15590 hardcode_libdir_flag_spec='-rpath $libdir'
15591 fi
15592 archive_cmds_need_lc='no'
15593 hardcode_libdir_separator=:
15594 ;;
da0f6381 15595
00020c16
ILT
15596 solaris*)
15597 no_undefined_flag=' -z defs'
15598 if test "$GCC" = yes; then
15599 wlarc='${wl}'
15600 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15601 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15602 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15603 else
15604 case `$CC -V 2>&1` in
15605 *"Compilers 5.0"*)
15606 wlarc=''
15607 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15608 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15609 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
15610 ;;
15611 *)
15612 wlarc='${wl}'
15613 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
15614 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15615 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15616 ;;
15617 esac
15618 fi
15619 hardcode_libdir_flag_spec='-R$libdir'
15620 hardcode_shlibpath_var=no
15621 case $host_os in
15622 solaris2.[0-5] | solaris2.[0-5].*) ;;
15623 *)
15624 # The compiler driver will combine and reorder linker options,
15625 # but understands `-z linker_flag'. GCC discards it without `$wl',
15626 # but is careful enough not to reorder.
15627 # Supported since Solaris 2.6 (maybe 2.5.1?)
15628 if test "$GCC" = yes; then
15629 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
15630 else
15631 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
15632 fi
15633 ;;
15634 esac
15635 link_all_deplibs=yes
15636 ;;
da0f6381 15637
00020c16
ILT
15638 sunos4*)
15639 if test "x$host_vendor" = xsequent; then
15640 # Use $CC to link under sequent, because it throws in some extra .o
15641 # files that make .init and .fini sections work.
15642 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15643 else
15644 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15645 fi
15646 hardcode_libdir_flag_spec='-L$libdir'
15647 hardcode_direct=yes
15648 hardcode_minus_L=yes
15649 hardcode_shlibpath_var=no
15650 ;;
da0f6381 15651
00020c16
ILT
15652 sysv4)
15653 case $host_vendor in
15654 sni)
15655 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15656 hardcode_direct=yes # is this really true???
15657 ;;
15658 siemens)
15659 ## LD is ld it makes a PLAMLIB
15660 ## CC just makes a GrossModule.
15661 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15662 reload_cmds='$CC -r -o $output$reload_objs'
15663 hardcode_direct=no
15664 ;;
15665 motorola)
15666 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15667 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
15668 ;;
15669 esac
15670 runpath_var='LD_RUN_PATH'
15671 hardcode_shlibpath_var=no
15672 ;;
da0f6381 15673
00020c16
ILT
15674 sysv4.3*)
15675 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15676 hardcode_shlibpath_var=no
15677 export_dynamic_flag_spec='-Bexport'
15678 ;;
da0f6381 15679
00020c16
ILT
15680 sysv4*MP*)
15681 if test -d /usr/nec; then
15682 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15683 hardcode_shlibpath_var=no
15684 runpath_var=LD_RUN_PATH
15685 hardcode_runpath_var=yes
15686 ld_shlibs=yes
15687 fi
15688 ;;
da0f6381 15689
00020c16
ILT
15690 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15691 no_undefined_flag='${wl}-z,text'
15692 archive_cmds_need_lc=no
15693 hardcode_shlibpath_var=no
15694 runpath_var='LD_RUN_PATH'
da0f6381 15695
00020c16
ILT
15696 if test "$GCC" = yes; then
15697 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15698 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15699 else
15700 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15701 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15702 fi
15703 ;;
da0f6381 15704
00020c16
ILT
15705 sysv5* | sco3.2v5* | sco5v6*)
15706 # Note: We can NOT use -z defs as we might desire, because we do not
15707 # link with -lc, and that would cause any symbols used from libc to
15708 # always be unresolved, which means just about no library would
15709 # ever link correctly. If we're not using GNU ld we use -z text
15710 # though, which does catch some bad symbols but isn't as heavy-handed
15711 # as -z defs.
15712 no_undefined_flag='${wl}-z,text'
15713 allow_undefined_flag='${wl}-z,nodefs'
15714 archive_cmds_need_lc=no
15715 hardcode_shlibpath_var=no
15716 hardcode_libdir_flag_spec='${wl}-R,$libdir'
15717 hardcode_libdir_separator=':'
15718 link_all_deplibs=yes
15719 export_dynamic_flag_spec='${wl}-Bexport'
15720 runpath_var='LD_RUN_PATH'
da0f6381 15721
00020c16
ILT
15722 if test "$GCC" = yes; then
15723 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15724 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15725 else
15726 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15727 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15728 fi
15729 ;;
da0f6381 15730
00020c16
ILT
15731 uts4*)
15732 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15733 hardcode_libdir_flag_spec='-L$libdir'
15734 hardcode_shlibpath_var=no
15735 ;;
da0f6381 15736
00020c16
ILT
15737 *)
15738 ld_shlibs=no
15739 ;;
15740 esac
da0f6381 15741
00020c16
ILT
15742 if test x$host_vendor = xsni; then
15743 case $host in
15744 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
15745 export_dynamic_flag_spec='${wl}-Blargedynsym'
15746 ;;
15747 esac
15748 fi
15749 fi
da0f6381 15750
5213506e
RW
15751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
15752$as_echo "$ld_shlibs" >&6; }
00020c16 15753test "$ld_shlibs" = no && can_build_shared=no
da0f6381 15754
00020c16 15755with_gnu_ld=$with_gnu_ld
da0f6381
PB
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
00020c16
ILT
15771#
15772# Do we need to explicitly link libc?
15773#
15774case "x$archive_cmds_need_lc" in
15775x|xyes)
15776 # Assume -lc should be added
15777 archive_cmds_need_lc=yes
da0f6381 15778
00020c16
ILT
15779 if test "$enable_shared" = yes && test "$GCC" = yes; then
15780 case $archive_cmds in
15781 *'~'*)
15782 # FIXME: we may have to deal with multi-command sequences.
15783 ;;
15784 '$CC '*)
15785 # Test whether the compiler implicitly links with -lc since on some
15786 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15787 # to ld, don't add -lc before -lgcc.
5213506e
RW
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
15789$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
15790if test "${lt_cv_archive_cmds_need_lc+set}" = set; then :
15791 $as_echo_n "(cached) " >&6
00020c16
ILT
15792else
15793 $RM conftest*
15794 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 15795
5213506e 15796 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
15797 (eval $ac_compile) 2>&5
15798 ac_status=$?
5213506e
RW
15799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15800 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
15801 soname=conftest
15802 lib=conftest
15803 libobjs=conftest.$ac_objext
15804 deplibs=
15805 wl=$lt_prog_compiler_wl
15806 pic_flag=$lt_prog_compiler_pic
15807 compiler_flags=-v
15808 linker_flags=-v
15809 verstring=
15810 output_objdir=.
15811 libname=conftest
15812 lt_save_allow_undefined_flag=$allow_undefined_flag
15813 allow_undefined_flag=
5213506e 15814 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
15815 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
15816 ac_status=$?
5213506e
RW
15817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15818 test $ac_status = 0; }
00020c16
ILT
15819 then
15820 lt_cv_archive_cmds_need_lc=no
15821 else
15822 lt_cv_archive_cmds_need_lc=yes
15823 fi
15824 allow_undefined_flag=$lt_save_allow_undefined_flag
15825 else
15826 cat conftest.err 1>&5
15827 fi
15828 $RM conftest*
da0f6381 15829
00020c16 15830fi
5213506e
RW
15831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
15832$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
00020c16
ILT
15833 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
15834 ;;
15835 esac
15836 fi
15837 ;;
15838esac
da0f6381
PB
15839
15840
15841
15842
5d47bb02 15843
da0f6381 15844
da0f6381 15845
da0f6381 15846
da0f6381 15847
00020c16
ILT
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
5213506e
RW
15996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
15997$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
15998
15999if test "$GCC" = yes; then
16000 case $host_os in
16001 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
16002 *) lt_awk_arg="/^libraries:/" ;;
16003 esac
43e02a8a
RW
16004 case $host_os in
16005 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
16006 *) lt_sed_strip_eq="s,=/,/,g" ;;
16007 esac
16008 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
16009 case $lt_search_path_spec in
16010 *\;*)
00020c16
ILT
16011 # if the path contains ";" then we assume it to be the separator
16012 # otherwise default to the standard path separator (i.e. ":") - it is
16013 # assumed that no part of a normal pathname contains ";" but that should
16014 # okay in the real world where ";" in dirpaths is itself problematic.
43e02a8a
RW
16015 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
16016 ;;
16017 *)
16018 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
16019 ;;
16020 esac
00020c16
ILT
16021 # Ok, now we have the path, separated by spaces, we can step through it
16022 # and add multilib dir if necessary.
16023 lt_tmp_lt_search_path_spec=
16024 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
16025 for lt_sys_path in $lt_search_path_spec; do
16026 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
16027 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
16028 else
16029 test -d "$lt_sys_path" && \
16030 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
16031 fi
16032 done
43e02a8a 16033 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
00020c16
ILT
16034BEGIN {RS=" "; FS="/|\n";} {
16035 lt_foo="";
16036 lt_count=0;
16037 for (lt_i = NF; lt_i > 0; lt_i--) {
16038 if ($lt_i != "" && $lt_i != ".") {
16039 if ($lt_i == "..") {
16040 lt_count++;
16041 } else {
16042 if (lt_count == 0) {
16043 lt_foo="/" $lt_i lt_foo;
16044 } else {
16045 lt_count--;
16046 }
16047 }
16048 }
16049 }
16050 if (lt_foo != "") { lt_freq[lt_foo]++; }
16051 if (lt_freq[lt_foo] == 1) { print lt_foo; }
16052}'`
43e02a8a
RW
16053 # AWK program above erroneously prepends '/' to C:/dos/paths
16054 # for these hosts.
16055 case $host_os in
16056 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
16057 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
16058 esac
16059 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
00020c16
ILT
16060else
16061 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16062fi
16063library_names_spec=
16064libname_spec='lib$name'
16065soname_spec=
16066shrext_cmds=".so"
16067postinstall_cmds=
16068postuninstall_cmds=
16069finish_cmds=
16070finish_eval=
16071shlibpath_var=
16072shlibpath_overrides_runpath=unknown
16073version_type=none
16074dynamic_linker="$host_os ld.so"
16075sys_lib_dlsearch_path_spec="/lib /usr/lib"
16076need_lib_prefix=unknown
16077hardcode_into_libs=no
16078
16079# when you set need_version to no, make sure it does not cause -set_version
16080# flags to be left without arguments
16081need_version=unknown
16082
16083case $host_os in
16084aix3*)
16085 version_type=linux
16086 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
16087 shlibpath_var=LIBPATH
16088
16089 # AIX 3 has no versioning support, so we append a major version to the name.
16090 soname_spec='${libname}${release}${shared_ext}$major'
16091 ;;
16092
16093aix[4-9]*)
16094 version_type=linux
16095 need_lib_prefix=no
16096 need_version=no
16097 hardcode_into_libs=yes
16098 if test "$host_cpu" = ia64; then
16099 # AIX 5 supports IA64
16100 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
16101 shlibpath_var=LD_LIBRARY_PATH
16102 else
16103 # With GCC up to 2.95.x, collect2 would create an import file
16104 # for dependence libraries. The import file would start with
16105 # the line `#! .'. This would cause the generated library to
16106 # depend on `.', always an invalid library. This was fixed in
16107 # development snapshots of GCC prior to 3.0.
16108 case $host_os in
16109 aix4 | aix4.[01] | aix4.[01].*)
16110 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
16111 echo ' yes '
da0f6381
PB
16112 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
16113 :
16114 else
16115 can_build_shared=no
16116 fi
16117 ;;
16118 esac
16119 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
16120 # soname into executable. Probably we can add versioning support to
16121 # collect2, so additional links can be useful in future.
16122 if test "$aix_use_runtimelinking" = yes; then
16123 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
16124 # instead of lib<name>.a to let people know that these are not
16125 # typical AIX shared libraries.
16126 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16127 else
16128 # We preserve .a as extension for shared libraries through AIX4.2
16129 # and later when we are not doing run time linking.
16130 library_names_spec='${libname}${release}.a $libname.a'
16131 soname_spec='${libname}${release}${shared_ext}$major'
16132 fi
16133 shlibpath_var=LIBPATH
16134 fi
16135 ;;
16136
16137amigaos*)
5d47bb02
PG
16138 case $host_cpu in
16139 powerpc)
16140 # Since July 2007 AmigaOS4 officially supports .so libraries.
16141 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
16142 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16143 ;;
16144 m68k)
da0f6381
PB
16145 library_names_spec='$libname.ixlibrary $libname.a'
16146 # Create ${libname}_ixlibrary.a entries in /sys/libs.
43e02a8a 16147 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
5d47bb02
PG
16148 ;;
16149 esac
da0f6381
PB
16150 ;;
16151
16152beos*)
16153 library_names_spec='${libname}${shared_ext}'
16154 dynamic_linker="$host_os ld.so"
16155 shlibpath_var=LIBRARY_PATH
16156 ;;
16157
16158bsdi[45]*)
16159 version_type=linux
16160 need_version=no
16161 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16162 soname_spec='${libname}${release}${shared_ext}$major'
16163 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
16164 shlibpath_var=LD_LIBRARY_PATH
16165 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
16166 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
16167 # the default ld.so.conf also contains /usr/contrib/lib and
16168 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
16169 # libtool to hard-code these into programs
16170 ;;
16171
5d47bb02 16172cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
16173 version_type=windows
16174 shrext_cmds=".dll"
16175 need_version=no
16176 need_lib_prefix=no
16177
5d47bb02
PG
16178 case $GCC,$host_os in
16179 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
da0f6381
PB
16180 library_names_spec='$libname.dll.a'
16181 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16182 postinstall_cmds='base_file=`basename \${file}`~
16183 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
16184 dldir=$destdir/`dirname \$dlpath`~
16185 test -d \$dldir || mkdir -p \$dldir~
16186 $install_prog $dir/$dlname \$dldir/$dlname~
16187 chmod a+x \$dldir/$dlname~
16188 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16189 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16190 fi'
16191 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16192 dlpath=$dir/\$dldll~
16193 $RM \$dlpath'
16194 shlibpath_overrides_runpath=yes
16195
16196 case $host_os in
16197 cygwin*)
16198 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
16199 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
43e02a8a
RW
16200
16201 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
da0f6381 16202 ;;
5d47bb02 16203 mingw* | cegcc*)
da0f6381
PB
16204 # MinGW DLLs use traditional 'lib' prefix
16205 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
da0f6381
PB
16206 ;;
16207 pw32*)
16208 # pw32 DLLs use 'pw' prefix rather than 'lib'
16209 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16210 ;;
16211 esac
16212 ;;
16213
16214 *)
16215 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
16216 ;;
16217 esac
16218 dynamic_linker='Win32 ld.exe'
16219 # FIXME: first we should search . and the directory the executable is in
16220 shlibpath_var=PATH
16221 ;;
16222
16223darwin* | rhapsody*)
16224 dynamic_linker="$host_os dyld"
16225 version_type=darwin
16226 need_lib_prefix=no
16227 need_version=no
16228 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
16229 soname_spec='${libname}${release}${major}$shared_ext'
16230 shlibpath_overrides_runpath=yes
16231 shlibpath_var=DYLD_LIBRARY_PATH
16232 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
16233
16234 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
16235 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
16236 ;;
16237
16238dgux*)
16239 version_type=linux
16240 need_lib_prefix=no
16241 need_version=no
16242 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
16243 soname_spec='${libname}${release}${shared_ext}$major'
16244 shlibpath_var=LD_LIBRARY_PATH
16245 ;;
16246
16247freebsd1*)
16248 dynamic_linker=no
16249 ;;
16250
16251freebsd* | dragonfly*)
16252 # DragonFly does not have aout. When/if they implement a new
16253 # versioning mechanism, adjust this.
16254 if test -x /usr/bin/objformat; then
16255 objformat=`/usr/bin/objformat`
16256 else
16257 case $host_os in
16258 freebsd[123]*) objformat=aout ;;
16259 *) objformat=elf ;;
16260 esac
16261 fi
16262 version_type=freebsd-$objformat
16263 case $version_type in
16264 freebsd-elf*)
16265 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16266 need_version=no
16267 need_lib_prefix=no
16268 ;;
16269 freebsd-*)
16270 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
16271 need_version=yes
16272 ;;
16273 esac
16274 shlibpath_var=LD_LIBRARY_PATH
16275 case $host_os in
16276 freebsd2*)
16277 shlibpath_overrides_runpath=yes
16278 ;;
16279 freebsd3.[01]* | freebsdelf3.[01]*)
16280 shlibpath_overrides_runpath=yes
16281 hardcode_into_libs=yes
16282 ;;
16283 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
16284 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
16285 shlibpath_overrides_runpath=no
16286 hardcode_into_libs=yes
16287 ;;
16288 *) # from 4.6 on, and DragonFly
16289 shlibpath_overrides_runpath=yes
16290 hardcode_into_libs=yes
16291 ;;
16292 esac
16293 ;;
16294
16295gnu*)
16296 version_type=linux
16297 need_lib_prefix=no
16298 need_version=no
16299 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
16300 soname_spec='${libname}${release}${shared_ext}$major'
16301 shlibpath_var=LD_LIBRARY_PATH
16302 hardcode_into_libs=yes
16303 ;;
16304
43e02a8a
RW
16305haiku*)
16306 version_type=linux
16307 need_lib_prefix=no
16308 need_version=no
16309 dynamic_linker="$host_os runtime_loader"
16310 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
16311 soname_spec='${libname}${release}${shared_ext}$major'
16312 shlibpath_var=LIBRARY_PATH
16313 shlibpath_overrides_runpath=yes
16314 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
16315 hardcode_into_libs=yes
16316 ;;
16317
da0f6381
PB
16318hpux9* | hpux10* | hpux11*)
16319 # Give a soname corresponding to the major version so that dld.sl refuses to
16320 # link against other versions.
16321 version_type=sunos
16322 need_lib_prefix=no
16323 need_version=no
16324 case $host_cpu in
16325 ia64*)
16326 shrext_cmds='.so'
16327 hardcode_into_libs=yes
16328 dynamic_linker="$host_os dld.so"
16329 shlibpath_var=LD_LIBRARY_PATH
16330 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16331 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16332 soname_spec='${libname}${release}${shared_ext}$major'
16333 if test "X$HPUX_IA64_MODE" = X32; then
16334 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16335 else
16336 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16337 fi
16338 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16339 ;;
16340 hppa*64*)
16341 shrext_cmds='.sl'
16342 hardcode_into_libs=yes
16343 dynamic_linker="$host_os dld.sl"
16344 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16345 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16346 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16347 soname_spec='${libname}${release}${shared_ext}$major'
16348 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16349 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16350 ;;
16351 *)
16352 shrext_cmds='.sl'
16353 dynamic_linker="$host_os dld.sl"
16354 shlibpath_var=SHLIB_PATH
16355 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
16356 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16357 soname_spec='${libname}${release}${shared_ext}$major'
16358 ;;
16359 esac
43e02a8a 16360 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
da0f6381 16361 postinstall_cmds='chmod 555 $lib'
43e02a8a
RW
16362 # or fails outright, so override atomically:
16363 install_override_mode=555
da0f6381
PB
16364 ;;
16365
16366interix[3-9]*)
16367 version_type=linux
16368 need_lib_prefix=no
16369 need_version=no
16370 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16371 soname_spec='${libname}${release}${shared_ext}$major'
16372 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16373 shlibpath_var=LD_LIBRARY_PATH
16374 shlibpath_overrides_runpath=no
16375 hardcode_into_libs=yes
16376 ;;
16377
16378irix5* | irix6* | nonstopux*)
16379 case $host_os in
16380 nonstopux*) version_type=nonstopux ;;
16381 *)
16382 if test "$lt_cv_prog_gnu_ld" = yes; then
16383 version_type=linux
16384 else
16385 version_type=irix
16386 fi ;;
16387 esac
16388 need_lib_prefix=no
16389 need_version=no
16390 soname_spec='${libname}${release}${shared_ext}$major'
16391 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
16392 case $host_os in
16393 irix5* | nonstopux*)
16394 libsuff= shlibsuff=
16395 ;;
16396 *)
16397 case $LD in # libtool.m4 will add one of these switches to LD
16398 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16399 libsuff= shlibsuff= libmagic=32-bit;;
16400 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16401 libsuff=32 shlibsuff=N32 libmagic=N32;;
16402 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16403 libsuff=64 shlibsuff=64 libmagic=64-bit;;
16404 *) libsuff= shlibsuff= libmagic=never-match;;
16405 esac
16406 ;;
16407 esac
16408 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16409 shlibpath_overrides_runpath=no
16410 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
16411 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
16412 hardcode_into_libs=yes
16413 ;;
16414
16415# No shared lib support for Linux oldld, aout, or coff.
16416linux*oldld* | linux*aout* | linux*coff*)
16417 dynamic_linker=no
16418 ;;
16419
16420# This must be Linux ELF.
7a9d3fe8 16421linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
16422 version_type=linux
16423 need_lib_prefix=no
16424 need_version=no
16425 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16426 soname_spec='${libname}${release}${shared_ext}$major'
16427 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16428 shlibpath_var=LD_LIBRARY_PATH
16429 shlibpath_overrides_runpath=no
baafc534 16430
da0f6381 16431 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
16432 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
16433 $as_echo_n "(cached) " >&6
baafc534
RW
16434else
16435 lt_cv_shlibpath_overrides_runpath=no
16436 save_LDFLAGS=$LDFLAGS
16437 save_libdir=$libdir
16438 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
16439 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
5213506e 16440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16441/* end confdefs.h. */
16442
16443int
16444main ()
16445{
16446
16447 ;
16448 return 0;
16449}
16450_ACEOF
5213506e
RW
16451if ac_fn_c_try_link "$LINENO"; then :
16452 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
baafc534 16453 lt_cv_shlibpath_overrides_runpath=yes
da0f6381 16454fi
da0f6381 16455fi
5213506e
RW
16456rm -f core conftest.err conftest.$ac_objext \
16457 conftest$ac_exeext conftest.$ac_ext
baafc534
RW
16458 LDFLAGS=$save_LDFLAGS
16459 libdir=$save_libdir
16460
16461fi
16462
16463 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381
PB
16464
16465 # This implies no fast_install, which is unacceptable.
16466 # Some rework will be needed to allow for fast_install
16467 # before this can be enabled.
16468 hardcode_into_libs=yes
16469
16470 # Append ld.so.conf contents to the search path
16471 if test -f /etc/ld.so.conf; then
43e02a8a 16472 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
da0f6381
PB
16473 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16474 fi
16475
16476 # We used to test for /lib/ld.so.1 and disable shared libraries on
16477 # powerpc, because MkLinux only supported shared libraries with the
16478 # GNU dynamic linker. Since this was broken with cross compilers,
16479 # most powerpc-linux boxes support dynamic linking these days and
16480 # people can always --disable-shared, the test was removed, and we
16481 # assume the GNU/Linux dynamic linker is in use.
16482 dynamic_linker='GNU/Linux ld.so'
16483 ;;
16484
16485netbsd*)
16486 version_type=sunos
16487 need_lib_prefix=no
16488 need_version=no
16489 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16490 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16491 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16492 dynamic_linker='NetBSD (a.out) ld.so'
16493 else
16494 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16495 soname_spec='${libname}${release}${shared_ext}$major'
16496 dynamic_linker='NetBSD ld.elf_so'
16497 fi
16498 shlibpath_var=LD_LIBRARY_PATH
16499 shlibpath_overrides_runpath=yes
16500 hardcode_into_libs=yes
16501 ;;
16502
16503newsos6)
16504 version_type=linux
16505 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16506 shlibpath_var=LD_LIBRARY_PATH
16507 shlibpath_overrides_runpath=yes
16508 ;;
16509
16510*nto* | *qnx*)
16511 version_type=qnx
16512 need_lib_prefix=no
16513 need_version=no
16514 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16515 soname_spec='${libname}${release}${shared_ext}$major'
16516 shlibpath_var=LD_LIBRARY_PATH
16517 shlibpath_overrides_runpath=no
16518 hardcode_into_libs=yes
16519 dynamic_linker='ldqnx.so'
16520 ;;
16521
16522openbsd*)
16523 version_type=sunos
16524 sys_lib_dlsearch_path_spec="/usr/lib"
16525 need_lib_prefix=no
16526 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
16527 case $host_os in
16528 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
16529 *) need_version=no ;;
16530 esac
16531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16532 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16533 shlibpath_var=LD_LIBRARY_PATH
16534 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
16535 case $host_os in
16536 openbsd2.[89] | openbsd2.[89].*)
16537 shlibpath_overrides_runpath=no
16538 ;;
16539 *)
16540 shlibpath_overrides_runpath=yes
16541 ;;
16542 esac
16543 else
16544 shlibpath_overrides_runpath=yes
16545 fi
16546 ;;
16547
16548os2*)
16549 libname_spec='$name'
16550 shrext_cmds=".dll"
16551 need_lib_prefix=no
16552 library_names_spec='$libname${shared_ext} $libname.a'
16553 dynamic_linker='OS/2 ld.exe'
16554 shlibpath_var=LIBPATH
16555 ;;
16556
16557osf3* | osf4* | osf5*)
16558 version_type=osf
16559 need_lib_prefix=no
16560 need_version=no
16561 soname_spec='${libname}${release}${shared_ext}$major'
16562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16563 shlibpath_var=LD_LIBRARY_PATH
16564 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16565 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
16566 ;;
16567
16568rdos*)
16569 dynamic_linker=no
16570 ;;
16571
16572solaris*)
16573 version_type=linux
16574 need_lib_prefix=no
16575 need_version=no
16576 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16577 soname_spec='${libname}${release}${shared_ext}$major'
16578 shlibpath_var=LD_LIBRARY_PATH
16579 shlibpath_overrides_runpath=yes
16580 hardcode_into_libs=yes
16581 # ldd complains unless libraries are executable
16582 postinstall_cmds='chmod +x $lib'
16583 ;;
16584
16585sunos4*)
16586 version_type=sunos
16587 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16588 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16589 shlibpath_var=LD_LIBRARY_PATH
16590 shlibpath_overrides_runpath=yes
16591 if test "$with_gnu_ld" = yes; then
16592 need_lib_prefix=no
16593 fi
16594 need_version=yes
16595 ;;
16596
16597sysv4 | sysv4.3*)
16598 version_type=linux
16599 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16600 soname_spec='${libname}${release}${shared_ext}$major'
16601 shlibpath_var=LD_LIBRARY_PATH
16602 case $host_vendor in
16603 sni)
16604 shlibpath_overrides_runpath=no
16605 need_lib_prefix=no
16606 runpath_var=LD_RUN_PATH
16607 ;;
16608 siemens)
16609 need_lib_prefix=no
16610 ;;
16611 motorola)
16612 need_lib_prefix=no
16613 need_version=no
16614 shlibpath_overrides_runpath=no
16615 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16616 ;;
16617 esac
16618 ;;
16619
16620sysv4*MP*)
16621 if test -d /usr/nec ;then
16622 version_type=linux
16623 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
16624 soname_spec='$libname${shared_ext}.$major'
16625 shlibpath_var=LD_LIBRARY_PATH
16626 fi
16627 ;;
16628
16629sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16630 version_type=freebsd-elf
16631 need_lib_prefix=no
16632 need_version=no
16633 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16634 soname_spec='${libname}${release}${shared_ext}$major'
16635 shlibpath_var=LD_LIBRARY_PATH
16636 shlibpath_overrides_runpath=yes
16637 hardcode_into_libs=yes
16638 if test "$with_gnu_ld" = yes; then
16639 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16640 else
16641 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16642 case $host_os in
16643 sco3.2v5*)
16644 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16645 ;;
16646 esac
16647 fi
16648 sys_lib_dlsearch_path_spec='/usr/lib'
16649 ;;
16650
16651tpf*)
16652 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
16653 version_type=linux
16654 need_lib_prefix=no
16655 need_version=no
5d47bb02 16656 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
da0f6381
PB
16657 shlibpath_var=LD_LIBRARY_PATH
16658 shlibpath_overrides_runpath=no
16659 hardcode_into_libs=yes
16660 ;;
16661
16662uts4*)
16663 version_type=linux
16664 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16665 soname_spec='${libname}${release}${shared_ext}$major'
16666 shlibpath_var=LD_LIBRARY_PATH
16667 ;;
16668
16669*)
16670 dynamic_linker=no
16671 ;;
16672esac
5213506e
RW
16673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
16674$as_echo "$dynamic_linker" >&6; }
da0f6381
PB
16675test "$dynamic_linker" = no && can_build_shared=no
16676
16677variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16678if test "$GCC" = yes; then
16679 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16680fi
16681
5d47bb02
PG
16682if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
16683 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
16684fi
16685if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
16686 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
16687fi
16688
da0f6381
PB
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
43e02a8a
RW
16769
16770
16771
16772
16773
da0f6381
PB
16774
16775
16776
16777
16778
16779
5213506e
RW
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16781$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
da0f6381
PB
16782hardcode_action=
16783if test -n "$hardcode_libdir_flag_spec" ||
16784 test -n "$runpath_var" ||
16785 test "X$hardcode_automatic" = "Xyes" ; then
16786
16787 # We can hardcode non-existent directories.
16788 if test "$hardcode_direct" != no &&
16789 # If the only mechanism to avoid hardcoding is shlibpath_var, we
16790 # have to relink, otherwise we might link with an installed library
16791 # when we should be linking with a yet-to-be-installed one
16792 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
16793 test "$hardcode_minus_L" != no; then
16794 # Linking always hardcodes the temporary library directory.
16795 hardcode_action=relink
16796 else
16797 # We can link without hardcoding, and we can hardcode nonexisting dirs.
16798 hardcode_action=immediate
16799 fi
16800else
16801 # We cannot hardcode anything, or else we can only hardcode existing
16802 # directories.
16803 hardcode_action=unsupported
16804fi
5213506e
RW
16805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
16806$as_echo "$hardcode_action" >&6; }
da0f6381
PB
16807
16808if test "$hardcode_action" = relink ||
16809 test "$inherit_rpath" = yes; then
16810 # Fast installation is not supported
16811 enable_fast_install=no
16812elif test "$shlibpath_overrides_runpath" = yes ||
16813 test "$enable_shared" = no; then
16814 # Fast installation is not necessary
16815 enable_fast_install=needless
16816fi
16817
16818
16819
16820
16821
16822
16823 if test "x$enable_dlopen" != xyes; then
16824 enable_dlopen=unknown
16825 enable_dlopen_self=unknown
16826 enable_dlopen_self_static=unknown
16827else
16828 lt_cv_dlopen=no
16829 lt_cv_dlopen_libs=
16830
16831 case $host_os in
16832 beos*)
16833 lt_cv_dlopen="load_add_on"
16834 lt_cv_dlopen_libs=
16835 lt_cv_dlopen_self=yes
16836 ;;
16837
5d47bb02 16838 mingw* | pw32* | cegcc*)
da0f6381 16839 lt_cv_dlopen="LoadLibrary"
5213506e
RW
16840 lt_cv_dlopen_libs=
16841 ;;
da0f6381 16842
5213506e
RW
16843 cygwin*)
16844 lt_cv_dlopen="dlopen"
16845 lt_cv_dlopen_libs=
16846 ;;
16847
16848 darwin*)
16849 # if libdl is installed we need to link against it
16850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16851$as_echo_n "checking for dlopen in -ldl... " >&6; }
16852if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
16853 $as_echo_n "(cached) " >&6
da0f6381
PB
16854else
16855 ac_check_lib_save_LIBS=$LIBS
5213506e
RW
16856LIBS="-ldl $LIBS"
16857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16858/* end confdefs.h. */
16859
5213506e
RW
16860/* Override any GCC internal prototype to avoid an error.
16861 Use char because int might match the return type of a GCC
16862 builtin and then its argument prototype would still apply. */
da0f6381
PB
16863#ifdef __cplusplus
16864extern "C"
16865#endif
5213506e 16866char dlopen ();
da0f6381
PB
16867int
16868main ()
16869{
5213506e 16870return dlopen ();
da0f6381
PB
16871 ;
16872 return 0;
16873}
16874_ACEOF
5213506e
RW
16875if ac_fn_c_try_link "$LINENO"; then :
16876 ac_cv_lib_dl_dlopen=yes
da0f6381 16877else
5213506e 16878 ac_cv_lib_dl_dlopen=no
da0f6381 16879fi
5213506e
RW
16880rm -f core conftest.err conftest.$ac_objext \
16881 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
16882LIBS=$ac_check_lib_save_LIBS
16883fi
5213506e
RW
16884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16885$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16886if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
16887 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
da0f6381 16888else
da0f6381 16889
5213506e
RW
16890 lt_cv_dlopen="dyld"
16891 lt_cv_dlopen_libs=
16892 lt_cv_dlopen_self=yes
da0f6381 16893
5213506e 16894fi
da0f6381 16895
5213506e 16896 ;;
da0f6381 16897
5213506e
RW
16898 *)
16899 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
16900if test "x$ac_cv_func_shl_load" = x""yes; then :
16901 lt_cv_dlopen="shl_load"
16902else
16903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
16904$as_echo_n "checking for shl_load in -ldld... " >&6; }
16905if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
16906 $as_echo_n "(cached) " >&6
16907else
16908 ac_check_lib_save_LIBS=$LIBS
16909LIBS="-ldld $LIBS"
16910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16911/* end confdefs.h. */
16912
16913/* Override any GCC internal prototype to avoid an error.
16914 Use char because int might match the return type of a GCC
da0f6381 16915 builtin and then its argument prototype would still apply. */
da0f6381 16916#ifdef __cplusplus
5213506e 16917extern "C"
da0f6381 16918#endif
5213506e 16919char shl_load ();
da0f6381
PB
16920int
16921main ()
16922{
5213506e 16923return shl_load ();
da0f6381
PB
16924 ;
16925 return 0;
16926}
16927_ACEOF
5213506e
RW
16928if ac_fn_c_try_link "$LINENO"; then :
16929 ac_cv_lib_dld_shl_load=yes
da0f6381 16930else
5213506e 16931 ac_cv_lib_dld_shl_load=no
da0f6381 16932fi
5213506e
RW
16933rm -f core conftest.err conftest.$ac_objext \
16934 conftest$ac_exeext conftest.$ac_ext
16935LIBS=$ac_check_lib_save_LIBS
da0f6381 16936fi
5213506e
RW
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
16938$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
16939if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
16940 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
16941else
16942 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16943if test "x$ac_cv_func_dlopen" = x""yes; then :
da0f6381
PB
16944 lt_cv_dlopen="dlopen"
16945else
5213506e
RW
16946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16947$as_echo_n "checking for dlopen in -ldl... " >&6; }
16948if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
16949 $as_echo_n "(cached) " >&6
da0f6381
PB
16950else
16951 ac_check_lib_save_LIBS=$LIBS
16952LIBS="-ldl $LIBS"
5213506e 16953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16954/* end confdefs.h. */
16955
5213506e
RW
16956/* Override any GCC internal prototype to avoid an error.
16957 Use char because int might match the return type of a GCC
16958 builtin and then its argument prototype would still apply. */
da0f6381
PB
16959#ifdef __cplusplus
16960extern "C"
16961#endif
da0f6381
PB
16962char dlopen ();
16963int
16964main ()
16965{
5213506e 16966return dlopen ();
da0f6381
PB
16967 ;
16968 return 0;
16969}
16970_ACEOF
5213506e 16971if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
16972 ac_cv_lib_dl_dlopen=yes
16973else
5213506e 16974 ac_cv_lib_dl_dlopen=no
da0f6381 16975fi
5213506e
RW
16976rm -f core conftest.err conftest.$ac_objext \
16977 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
16978LIBS=$ac_check_lib_save_LIBS
16979fi
5213506e
RW
16980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16981$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16982if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
da0f6381
PB
16983 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
16984else
5213506e
RW
16985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
16986$as_echo_n "checking for dlopen in -lsvld... " >&6; }
16987if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
16988 $as_echo_n "(cached) " >&6
da0f6381
PB
16989else
16990 ac_check_lib_save_LIBS=$LIBS
16991LIBS="-lsvld $LIBS"
5213506e 16992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16993/* end confdefs.h. */
16994
5213506e
RW
16995/* Override any GCC internal prototype to avoid an error.
16996 Use char because int might match the return type of a GCC
16997 builtin and then its argument prototype would still apply. */
da0f6381
PB
16998#ifdef __cplusplus
16999extern "C"
17000#endif
da0f6381
PB
17001char dlopen ();
17002int
17003main ()
17004{
5213506e 17005return dlopen ();
da0f6381
PB
17006 ;
17007 return 0;
17008}
17009_ACEOF
5213506e 17010if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
17011 ac_cv_lib_svld_dlopen=yes
17012else
5213506e 17013 ac_cv_lib_svld_dlopen=no
da0f6381 17014fi
5213506e
RW
17015rm -f core conftest.err conftest.$ac_objext \
17016 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
17017LIBS=$ac_check_lib_save_LIBS
17018fi
5213506e
RW
17019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
17020$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
17021if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
da0f6381
PB
17022 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
17023else
5213506e
RW
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
17025$as_echo_n "checking for dld_link in -ldld... " >&6; }
17026if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
17027 $as_echo_n "(cached) " >&6
da0f6381
PB
17028else
17029 ac_check_lib_save_LIBS=$LIBS
17030LIBS="-ldld $LIBS"
5213506e 17031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17032/* end confdefs.h. */
17033
5213506e
RW
17034/* Override any GCC internal prototype to avoid an error.
17035 Use char because int might match the return type of a GCC
17036 builtin and then its argument prototype would still apply. */
da0f6381
PB
17037#ifdef __cplusplus
17038extern "C"
17039#endif
da0f6381
PB
17040char dld_link ();
17041int
17042main ()
17043{
5213506e 17044return dld_link ();
00020c16
ILT
17045 ;
17046 return 0;
17047}
17048_ACEOF
5213506e 17049if ac_fn_c_try_link "$LINENO"; then :
00020c16
ILT
17050 ac_cv_lib_dld_dld_link=yes
17051else
5213506e 17052 ac_cv_lib_dld_dld_link=no
00020c16 17053fi
5213506e
RW
17054rm -f core conftest.err conftest.$ac_objext \
17055 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
17056LIBS=$ac_check_lib_save_LIBS
17057fi
5213506e
RW
17058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
17059$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
17060if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
00020c16
ILT
17061 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
17062fi
17063
17064
17065fi
17066
17067
17068fi
17069
17070
17071fi
17072
17073
17074fi
17075
17076
17077fi
17078
17079 ;;
17080 esac
17081
17082 if test "x$lt_cv_dlopen" != xno; then
17083 enable_dlopen=yes
17084 else
17085 enable_dlopen=no
17086 fi
17087
17088 case $lt_cv_dlopen in
17089 dlopen)
17090 save_CPPFLAGS="$CPPFLAGS"
17091 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
17092
17093 save_LDFLAGS="$LDFLAGS"
17094 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
17095
17096 save_LIBS="$LIBS"
17097 LIBS="$lt_cv_dlopen_libs $LIBS"
17098
5213506e
RW
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
17100$as_echo_n "checking whether a program can dlopen itself... " >&6; }
17101if test "${lt_cv_dlopen_self+set}" = set; then :
17102 $as_echo_n "(cached) " >&6
00020c16
ILT
17103else
17104 if test "$cross_compiling" = yes; then :
17105 lt_cv_dlopen_self=cross
17106else
17107 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17108 lt_status=$lt_dlunknown
17109 cat > conftest.$ac_ext <<_LT_EOF
96ee6e08 17110#line 17110 "configure"
00020c16
ILT
17111#include "confdefs.h"
17112
17113#if HAVE_DLFCN_H
17114#include <dlfcn.h>
17115#endif
17116
17117#include <stdio.h>
17118
17119#ifdef RTLD_GLOBAL
17120# define LT_DLGLOBAL RTLD_GLOBAL
17121#else
17122# ifdef DL_GLOBAL
17123# define LT_DLGLOBAL DL_GLOBAL
17124# else
17125# define LT_DLGLOBAL 0
17126# endif
17127#endif
17128
17129/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17130 find out it does not work in some platform. */
17131#ifndef LT_DLLAZY_OR_NOW
17132# ifdef RTLD_LAZY
17133# define LT_DLLAZY_OR_NOW RTLD_LAZY
17134# else
17135# ifdef DL_LAZY
17136# define LT_DLLAZY_OR_NOW DL_LAZY
17137# else
17138# ifdef RTLD_NOW
17139# define LT_DLLAZY_OR_NOW RTLD_NOW
17140# else
17141# ifdef DL_NOW
17142# define LT_DLLAZY_OR_NOW DL_NOW
17143# else
17144# define LT_DLLAZY_OR_NOW 0
17145# endif
17146# endif
17147# endif
17148# endif
17149#endif
17150
43e02a8a
RW
17151/* When -fvisbility=hidden is used, assume the code has been annotated
17152 correspondingly for the symbols needed. */
17153#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17154void fnord () __attribute__((visibility("default")));
17155#endif
17156
17157void fnord () { int i=42; }
00020c16
ILT
17158int main ()
17159{
17160 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17161 int status = $lt_dlunknown;
17162
17163 if (self)
17164 {
17165 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
43e02a8a
RW
17166 else
17167 {
17168 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17169 else puts (dlerror ());
17170 }
00020c16
ILT
17171 /* dlclose (self); */
17172 }
17173 else
17174 puts (dlerror ());
17175
17176 return status;
17177}
17178_LT_EOF
5213506e 17179 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17180 (eval $ac_link) 2>&5
17181 ac_status=$?
5213506e
RW
17182 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17183 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17184 (./conftest; exit; ) >&5 2>/dev/null
17185 lt_status=$?
17186 case x$lt_status in
17187 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
17188 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
17189 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
17190 esac
17191 else :
17192 # compilation failed
17193 lt_cv_dlopen_self=no
17194 fi
17195fi
17196rm -fr conftest*
17197
17198
17199fi
5213506e
RW
17200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
17201$as_echo "$lt_cv_dlopen_self" >&6; }
00020c16
ILT
17202
17203 if test "x$lt_cv_dlopen_self" = xyes; then
17204 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
5213506e
RW
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
17206$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
17207if test "${lt_cv_dlopen_self_static+set}" = set; then :
17208 $as_echo_n "(cached) " >&6
00020c16
ILT
17209else
17210 if test "$cross_compiling" = yes; then :
17211 lt_cv_dlopen_self_static=cross
17212else
17213 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17214 lt_status=$lt_dlunknown
17215 cat > conftest.$ac_ext <<_LT_EOF
96ee6e08 17216#line 17216 "configure"
00020c16
ILT
17217#include "confdefs.h"
17218
17219#if HAVE_DLFCN_H
17220#include <dlfcn.h>
17221#endif
17222
17223#include <stdio.h>
17224
17225#ifdef RTLD_GLOBAL
17226# define LT_DLGLOBAL RTLD_GLOBAL
17227#else
17228# ifdef DL_GLOBAL
17229# define LT_DLGLOBAL DL_GLOBAL
17230# else
17231# define LT_DLGLOBAL 0
17232# endif
17233#endif
17234
17235/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17236 find out it does not work in some platform. */
17237#ifndef LT_DLLAZY_OR_NOW
17238# ifdef RTLD_LAZY
17239# define LT_DLLAZY_OR_NOW RTLD_LAZY
17240# else
17241# ifdef DL_LAZY
17242# define LT_DLLAZY_OR_NOW DL_LAZY
17243# else
17244# ifdef RTLD_NOW
17245# define LT_DLLAZY_OR_NOW RTLD_NOW
17246# else
17247# ifdef DL_NOW
17248# define LT_DLLAZY_OR_NOW DL_NOW
17249# else
17250# define LT_DLLAZY_OR_NOW 0
17251# endif
17252# endif
17253# endif
17254# endif
17255#endif
17256
43e02a8a
RW
17257/* When -fvisbility=hidden is used, assume the code has been annotated
17258 correspondingly for the symbols needed. */
17259#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17260void fnord () __attribute__((visibility("default")));
17261#endif
17262
17263void fnord () { int i=42; }
00020c16
ILT
17264int main ()
17265{
17266 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17267 int status = $lt_dlunknown;
17268
17269 if (self)
17270 {
17271 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
43e02a8a
RW
17272 else
17273 {
17274 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17275 else puts (dlerror ());
17276 }
00020c16
ILT
17277 /* dlclose (self); */
17278 }
17279 else
17280 puts (dlerror ());
17281
17282 return status;
17283}
17284_LT_EOF
5213506e 17285 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17286 (eval $ac_link) 2>&5
17287 ac_status=$?
5213506e
RW
17288 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17289 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17290 (./conftest; exit; ) >&5 2>/dev/null
17291 lt_status=$?
17292 case x$lt_status in
17293 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
17294 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
17295 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
17296 esac
17297 else :
17298 # compilation failed
17299 lt_cv_dlopen_self_static=no
17300 fi
17301fi
17302rm -fr conftest*
17303
17304
17305fi
5213506e
RW
17306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
17307$as_echo "$lt_cv_dlopen_self_static" >&6; }
00020c16
ILT
17308 fi
17309
17310 CPPFLAGS="$save_CPPFLAGS"
17311 LDFLAGS="$save_LDFLAGS"
17312 LIBS="$save_LIBS"
17313 ;;
17314 esac
17315
17316 case $lt_cv_dlopen_self in
17317 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
17318 *) enable_dlopen_self=unknown ;;
17319 esac
17320
17321 case $lt_cv_dlopen_self_static in
17322 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
17323 *) enable_dlopen_self_static=unknown ;;
17324 esac
17325fi
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343striplib=
17344old_striplib=
5213506e
RW
17345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
17346$as_echo_n "checking whether stripping libraries is possible... " >&6; }
00020c16
ILT
17347if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
17348 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
17349 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5213506e
RW
17350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17351$as_echo "yes" >&6; }
00020c16
ILT
17352else
17353# FIXME - insert some real tests, host_os isn't really good enough
17354 case $host_os in
17355 darwin*)
17356 if test -n "$STRIP" ; then
17357 striplib="$STRIP -x"
17358 old_striplib="$STRIP -S"
5213506e
RW
17359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17360$as_echo "yes" >&6; }
00020c16 17361 else
5213506e
RW
17362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17363$as_echo "no" >&6; }
00020c16
ILT
17364 fi
17365 ;;
17366 *)
5213506e
RW
17367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17368$as_echo "no" >&6; }
00020c16
ILT
17369 ;;
17370 esac
17371fi
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384 # Report which library types will actually be built
5213506e
RW
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
17386$as_echo_n "checking if libtool supports shared libraries... " >&6; }
17387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
17388$as_echo "$can_build_shared" >&6; }
00020c16 17389
5213506e
RW
17390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
17391$as_echo_n "checking whether to build shared libraries... " >&6; }
00020c16
ILT
17392 test "$can_build_shared" = "no" && enable_shared=no
17393
17394 # On AIX, shared libraries and static libraries use the same namespace, and
17395 # are all built from PIC.
17396 case $host_os in
17397 aix3*)
17398 test "$enable_shared" = yes && enable_static=no
17399 if test -n "$RANLIB"; then
17400 archive_cmds="$archive_cmds~\$RANLIB \$lib"
17401 postinstall_cmds='$RANLIB $lib'
17402 fi
17403 ;;
17404
17405 aix[4-9]*)
17406 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
17407 test "$enable_shared" = yes && enable_static=no
17408 fi
17409 ;;
17410 esac
5213506e
RW
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
17412$as_echo "$enable_shared" >&6; }
00020c16 17413
5213506e
RW
17414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
17415$as_echo_n "checking whether to build static libraries... " >&6; }
00020c16
ILT
17416 # Make sure either enable_shared or enable_static is yes.
17417 test "$enable_shared" = yes || enable_static=yes
5213506e
RW
17418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
17419$as_echo "$enable_static" >&6; }
00020c16
ILT
17420
17421
17422
17423
17424fi
17425ac_ext=c
17426ac_cpp='$CPP $CPPFLAGS'
17427ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17428ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17429ac_compiler_gnu=$ac_cv_c_compiler_gnu
17430
17431CC="$lt_save_CC"
17432
43e02a8a
RW
17433 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
17434 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
17435 (test "X$CXX" != "Xg++"))) ; then
17436 ac_ext=cpp
17437ac_cpp='$CXXCPP $CPPFLAGS'
17438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
17442$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
17443if test -z "$CXXCPP"; then
17444 if test "${ac_cv_prog_CXXCPP+set}" = set; then :
17445 $as_echo_n "(cached) " >&6
17446else
17447 # Double quotes because CXXCPP needs to be expanded
17448 for CXXCPP in "$CXX -E" "/lib/cpp"
17449 do
17450 ac_preproc_ok=false
17451for ac_cxx_preproc_warn_flag in '' yes
17452do
17453 # Use a header file that comes with gcc, so configuring glibc
17454 # with a fresh cross-compiler works.
17455 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17456 # <limits.h> exists even on freestanding compilers.
17457 # On the NeXT, cc -E runs the code through the compiler's parser,
17458 # not just through cpp. "Syntax error" is here to catch this case.
17459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17460/* end confdefs.h. */
17461#ifdef __STDC__
17462# include <limits.h>
17463#else
17464# include <assert.h>
17465#endif
17466 Syntax error
17467_ACEOF
17468if ac_fn_cxx_try_cpp "$LINENO"; then :
17469
17470else
17471 # Broken: fails on valid input.
17472continue
17473fi
17474rm -f conftest.err conftest.$ac_ext
17475
17476 # OK, works on sane cases. Now check whether nonexistent headers
17477 # can be detected and how.
17478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17479/* end confdefs.h. */
17480#include <ac_nonexistent.h>
17481_ACEOF
17482if ac_fn_cxx_try_cpp "$LINENO"; then :
17483 # Broken: success on invalid input.
17484continue
17485else
17486 # Passes both tests.
17487ac_preproc_ok=:
17488break
17489fi
17490rm -f conftest.err conftest.$ac_ext
17491
17492done
17493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17494rm -f conftest.err conftest.$ac_ext
17495if $ac_preproc_ok; then :
17496 break
17497fi
17498
17499 done
17500 ac_cv_prog_CXXCPP=$CXXCPP
17501
17502fi
17503 CXXCPP=$ac_cv_prog_CXXCPP
17504else
17505 ac_cv_prog_CXXCPP=$CXXCPP
17506fi
17507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
17508$as_echo "$CXXCPP" >&6; }
17509ac_preproc_ok=false
17510for ac_cxx_preproc_warn_flag in '' yes
17511do
17512 # Use a header file that comes with gcc, so configuring glibc
17513 # with a fresh cross-compiler works.
17514 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17515 # <limits.h> exists even on freestanding compilers.
17516 # On the NeXT, cc -E runs the code through the compiler's parser,
17517 # not just through cpp. "Syntax error" is here to catch this case.
17518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17519/* end confdefs.h. */
17520#ifdef __STDC__
17521# include <limits.h>
17522#else
17523# include <assert.h>
17524#endif
17525 Syntax error
17526_ACEOF
17527if ac_fn_cxx_try_cpp "$LINENO"; then :
17528
17529else
17530 # Broken: fails on valid input.
17531continue
17532fi
17533rm -f conftest.err conftest.$ac_ext
17534
17535 # OK, works on sane cases. Now check whether nonexistent headers
17536 # can be detected and how.
17537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17538/* end confdefs.h. */
17539#include <ac_nonexistent.h>
17540_ACEOF
17541if ac_fn_cxx_try_cpp "$LINENO"; then :
17542 # Broken: success on invalid input.
17543continue
17544else
17545 # Passes both tests.
17546ac_preproc_ok=:
17547break
17548fi
17549rm -f conftest.err conftest.$ac_ext
17550
17551done
17552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17553rm -f conftest.err conftest.$ac_ext
17554if $ac_preproc_ok; then :
17555
17556else
17557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17559as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
17560See \`config.log' for more details." "$LINENO" 5; }
17561fi
17562
17563ac_ext=c
17564ac_cpp='$CPP $CPPFLAGS'
17565ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17566ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17567ac_compiler_gnu=$ac_cv_c_compiler_gnu
17568
17569else
17570 _lt_caught_CXX_error=yes
17571fi
00020c16 17572
5213506e 17573ac_ext=cpp
00020c16
ILT
17574ac_cpp='$CXXCPP $CPPFLAGS'
17575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17578
17579archive_cmds_need_lc_CXX=no
17580allow_undefined_flag_CXX=
17581always_export_symbols_CXX=no
17582archive_expsym_cmds_CXX=
17583compiler_needs_object_CXX=no
17584export_dynamic_flag_spec_CXX=
17585hardcode_direct_CXX=no
17586hardcode_direct_absolute_CXX=no
17587hardcode_libdir_flag_spec_CXX=
17588hardcode_libdir_flag_spec_ld_CXX=
17589hardcode_libdir_separator_CXX=
17590hardcode_minus_L_CXX=no
17591hardcode_shlibpath_var_CXX=unsupported
17592hardcode_automatic_CXX=no
17593inherit_rpath_CXX=no
17594module_cmds_CXX=
17595module_expsym_cmds_CXX=
17596link_all_deplibs_CXX=unknown
17597old_archive_cmds_CXX=$old_archive_cmds
43e02a8a
RW
17598reload_flag_CXX=$reload_flag
17599reload_cmds_CXX=$reload_cmds
00020c16
ILT
17600no_undefined_flag_CXX=
17601whole_archive_flag_spec_CXX=
17602enable_shared_with_static_runtimes_CXX=no
17603
17604# Source file extension for C++ test sources.
17605ac_ext=cpp
17606
17607# Object file extension for compiled C++ test sources.
17608objext=o
17609objext_CXX=$objext
17610
17611# No sense in running all these tests if we already determined that
17612# the CXX compiler isn't working. Some variables (like enable_shared)
17613# are currently assumed to apply to all compilers on this platform,
17614# and will be corrupted by setting them based on a non-working compiler.
17615if test "$_lt_caught_CXX_error" != yes; then
17616 # Code to be used in simple compile tests
17617 lt_simple_compile_test_code="int some_variable = 0;"
17618
17619 # Code to be used in simple link tests
17620 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
17621
17622 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
17623
17624
17625
17626
17627
17628
17629# If no C compiler was specified, use CC.
17630LTCC=${LTCC-"$CC"}
17631
17632# If no C compiler flags were specified, use CFLAGS.
17633LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17634
17635# Allow CC to be a program name with arguments.
17636compiler=$CC
17637
17638
17639 # save warnings/boilerplate of simple test code
17640 ac_outfile=conftest.$ac_objext
17641echo "$lt_simple_compile_test_code" >conftest.$ac_ext
17642eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17643_lt_compiler_boilerplate=`cat conftest.err`
17644$RM conftest*
17645
17646 ac_outfile=conftest.$ac_objext
17647echo "$lt_simple_link_test_code" >conftest.$ac_ext
17648eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17649_lt_linker_boilerplate=`cat conftest.err`
17650$RM -r conftest*
17651
17652
17653 # Allow CC to be a program name with arguments.
17654 lt_save_CC=$CC
17655 lt_save_LD=$LD
17656 lt_save_GCC=$GCC
17657 GCC=$GXX
17658 lt_save_with_gnu_ld=$with_gnu_ld
17659 lt_save_path_LD=$lt_cv_path_LD
17660 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
17661 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
17662 else
17663 $as_unset lt_cv_prog_gnu_ld
17664 fi
17665 if test -n "${lt_cv_path_LDCXX+set}"; then
17666 lt_cv_path_LD=$lt_cv_path_LDCXX
17667 else
17668 $as_unset lt_cv_path_LD
17669 fi
17670 test -z "${LDCXX+set}" || LD=$LDCXX
17671 CC=${CXX-"c++"}
17672 compiler=$CC
17673 compiler_CXX=$CC
17674 for cc_temp in $compiler""; do
17675 case $cc_temp in
17676 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17677 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17678 \-*) ;;
17679 *) break;;
17680 esac
17681done
43e02a8a 17682cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
00020c16
ILT
17683
17684
17685 if test -n "$compiler"; then
17686 # We don't want -fno-exception when compiling C++ code, so set the
17687 # no_builtin_flag separately
17688 if test "$GXX" = yes; then
17689 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
17690 else
17691 lt_prog_compiler_no_builtin_flag_CXX=
17692 fi
17693
17694 if test "$GXX" = yes; then
17695 # Set up default GNU C++ configuration
17696
17697
17698
5213506e
RW
17699# Check whether --with-gnu-ld was given.
17700if test "${with_gnu_ld+set}" = set; then :
17701 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
00020c16
ILT
17702else
17703 with_gnu_ld=no
5213506e
RW
17704fi
17705
00020c16
ILT
17706ac_prog=ld
17707if test "$GCC" = yes; then
17708 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
17709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17710$as_echo_n "checking for ld used by $CC... " >&6; }
00020c16
ILT
17711 case $host in
17712 *-*-mingw*)
17713 # gcc leaves a trailing carriage return which upsets mingw
17714 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17715 *)
17716 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17717 esac
17718 case $ac_prog in
17719 # Accept absolute paths.
17720 [\\/]* | ?:[\\/]*)
17721 re_direlt='/[^/][^/]*/\.\./'
17722 # Canonicalize the pathname of ld
17723 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
17724 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
17725 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
17726 done
17727 test -z "$LD" && LD="$ac_prog"
17728 ;;
17729 "")
17730 # If it fails, then pretend we aren't using GCC.
17731 ac_prog=ld
17732 ;;
17733 *)
17734 # If it is relative, then search for the first ld in PATH.
17735 with_gnu_ld=unknown
17736 ;;
17737 esac
17738elif test "$with_gnu_ld" = yes; then
5213506e
RW
17739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17740$as_echo_n "checking for GNU ld... " >&6; }
00020c16 17741else
5213506e
RW
17742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17743$as_echo_n "checking for non-GNU ld... " >&6; }
00020c16 17744fi
5213506e
RW
17745if test "${lt_cv_path_LD+set}" = set; then :
17746 $as_echo_n "(cached) " >&6
00020c16
ILT
17747else
17748 if test -z "$LD"; then
17749 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17750 for ac_dir in $PATH; do
17751 IFS="$lt_save_ifs"
17752 test -z "$ac_dir" && ac_dir=.
17753 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17754 lt_cv_path_LD="$ac_dir/$ac_prog"
17755 # Check to see if the program is GNU ld. I'd rather use --version,
17756 # but apparently some variants of GNU ld only accept -v.
17757 # Break only if it was the GNU/non-GNU ld that we prefer.
17758 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
17759 *GNU* | *'with BFD'*)
17760 test "$with_gnu_ld" != no && break
17761 ;;
17762 *)
17763 test "$with_gnu_ld" != yes && break
17764 ;;
17765 esac
17766 fi
17767 done
17768 IFS="$lt_save_ifs"
17769else
17770 lt_cv_path_LD="$LD" # Let the user override the test with a path.
17771fi
17772fi
17773
17774LD="$lt_cv_path_LD"
17775if test -n "$LD"; then
5213506e
RW
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17777$as_echo "$LD" >&6; }
00020c16 17778else
5213506e
RW
17779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17780$as_echo "no" >&6; }
00020c16 17781fi
5213506e
RW
17782test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
17783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17784$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
17785if test "${lt_cv_prog_gnu_ld+set}" = set; then :
17786 $as_echo_n "(cached) " >&6
00020c16
ILT
17787else
17788 # I'd rather use --version here, but apparently some GNU lds only accept -v.
17789case `$LD -v 2>&1 </dev/null` in
17790*GNU* | *'with BFD'*)
17791 lt_cv_prog_gnu_ld=yes
17792 ;;
17793*)
17794 lt_cv_prog_gnu_ld=no
17795 ;;
17796esac
17797fi
5213506e
RW
17798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
17799$as_echo "$lt_cv_prog_gnu_ld" >&6; }
00020c16
ILT
17800with_gnu_ld=$lt_cv_prog_gnu_ld
17801
17802
17803
17804
17805
17806
17807
17808 # Check if GNU C++ uses GNU ld as the underlying linker, since the
17809 # archiving commands below assume that GNU ld is being used.
17810 if test "$with_gnu_ld" = yes; then
17811 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
17812 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'
17813
17814 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
17815 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
17816
17817 # If archive_cmds runs LD, not CC, wlarc should be empty
17818 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
17819 # investigate it a little bit more. (MM)
17820 wlarc='${wl}'
17821
17822 # ancient GNU ld didn't support --whole-archive et. al.
17823 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
17824 $GREP 'no-whole-archive' > /dev/null; then
17825 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17826 else
17827 whole_archive_flag_spec_CXX=
17828 fi
17829 else
17830 with_gnu_ld=no
17831 wlarc=
17832
17833 # A generic and very simple default shared library creation
17834 # command for GNU C++ for the case where it uses the native
17835 # linker, instead of GNU ld. If possible, this setting should
17836 # overridden to take advantage of the native linker features on
17837 # the platform it is being used on.
17838 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
17839 fi
17840
17841 # Commands to make compiler produce verbose output that lists
17842 # what "hidden" libraries, object files and flags are used when
17843 # linking a shared library.
43e02a8a 17844 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
17845
17846 else
17847 GXX=no
17848 with_gnu_ld=no
17849 wlarc=
17850 fi
17851
17852 # PORTME: fill in a description of your system's C++ link characteristics
5213506e
RW
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17854$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
17855 ld_shlibs_CXX=yes
17856 case $host_os in
17857 aix3*)
17858 # FIXME: insert proper C++ library support
17859 ld_shlibs_CXX=no
17860 ;;
17861 aix[4-9]*)
17862 if test "$host_cpu" = ia64; then
17863 # On IA64, the linker does run time linking by default, so we don't
17864 # have to do anything special.
17865 aix_use_runtimelinking=no
17866 exp_sym_flag='-Bexport'
17867 no_entry_flag=""
17868 else
17869 aix_use_runtimelinking=no
17870
17871 # Test if we are trying to use run time linking or normal
17872 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17873 # need to do runtime linking.
17874 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17875 for ld_flag in $LDFLAGS; do
17876 case $ld_flag in
17877 *-brtl*)
17878 aix_use_runtimelinking=yes
17879 break
17880 ;;
17881 esac
17882 done
17883 ;;
17884 esac
17885
17886 exp_sym_flag='-bexport'
17887 no_entry_flag='-bnoentry'
17888 fi
17889
17890 # When large executables or shared objects are built, AIX ld can
17891 # have problems creating the table of contents. If linking a library
17892 # or program results in "error TOC overflow" add -mminimal-toc to
17893 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17894 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17895
17896 archive_cmds_CXX=''
17897 hardcode_direct_CXX=yes
17898 hardcode_direct_absolute_CXX=yes
17899 hardcode_libdir_separator_CXX=':'
17900 link_all_deplibs_CXX=yes
17901 file_list_spec_CXX='${wl}-f,'
17902
17903 if test "$GXX" = yes; then
17904 case $host_os in aix4.[012]|aix4.[012].*)
17905 # We only want to do this on AIX 4.2 and lower, the check
17906 # below for broken collect2 doesn't work under 4.3+
17907 collect2name=`${CC} -print-prog-name=collect2`
17908 if test -f "$collect2name" &&
17909 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17910 then
17911 # We have reworked collect2
17912 :
17913 else
17914 # We have old collect2
17915 hardcode_direct_CXX=unsupported
17916 # It fails to find uninstalled libraries when the uninstalled
17917 # path is not listed in the libpath. Setting hardcode_minus_L
17918 # to unsupported forces relinking
17919 hardcode_minus_L_CXX=yes
17920 hardcode_libdir_flag_spec_CXX='-L$libdir'
17921 hardcode_libdir_separator_CXX=
17922 fi
17923 esac
17924 shared_flag='-shared'
17925 if test "$aix_use_runtimelinking" = yes; then
17926 shared_flag="$shared_flag "'${wl}-G'
17927 fi
17928 else
17929 # not using gcc
17930 if test "$host_cpu" = ia64; then
17931 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17932 # chokes on -Wl,-G. The following line is correct:
17933 shared_flag='-G'
17934 else
17935 if test "$aix_use_runtimelinking" = yes; then
17936 shared_flag='${wl}-G'
17937 else
17938 shared_flag='${wl}-bM:SRE'
17939 fi
17940 fi
17941 fi
17942
17943 export_dynamic_flag_spec_CXX='${wl}-bexpall'
17944 # It seems that -bexpall does not export symbols beginning with
17945 # underscore (_), so it is better to generate a list of symbols to
17946 # export.
17947 always_export_symbols_CXX=yes
17948 if test "$aix_use_runtimelinking" = yes; then
17949 # Warning - without using the other runtime loading flags (-brtl),
17950 # -berok will link without error, but may produce a broken library.
17951 allow_undefined_flag_CXX='-berok'
17952 # Determine the default libpath from the value encoded in an empty
17953 # executable.
5213506e 17954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
17955/* end confdefs.h. */
17956
17957int
17958main ()
17959{
17960
17961 ;
17962 return 0;
17963}
17964_ACEOF
5213506e 17965if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
17966
17967lt_aix_libpath_sed='
17968 /Import File Strings/,/^$/ {
17969 /^0/ {
17970 s/^0 *\(.*\)$/\1/
17971 p
17972 }
17973 }'
17974aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17975# Check for a 64-bit object if we didn't find anything.
17976if test -z "$aix_libpath"; then
17977 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17978fi
00020c16 17979fi
5213506e
RW
17980rm -f core conftest.err conftest.$ac_objext \
17981 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
17982if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17983
17984 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
17985
43e02a8a 17986 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
00020c16
ILT
17987 else
17988 if test "$host_cpu" = ia64; then
17989 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
17990 allow_undefined_flag_CXX="-z nodefs"
17991 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"
17992 else
17993 # Determine the default libpath from the value encoded in an
17994 # empty executable.
5213506e 17995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
17996/* end confdefs.h. */
17997
17998int
17999main ()
18000{
18001
18002 ;
18003 return 0;
18004}
18005_ACEOF
5213506e 18006if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
18007
18008lt_aix_libpath_sed='
18009 /Import File Strings/,/^$/ {
18010 /^0/ {
18011 s/^0 *\(.*\)$/\1/
18012 p
18013 }
18014 }'
18015aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18016# Check for a 64-bit object if we didn't find anything.
18017if test -z "$aix_libpath"; then
18018 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18019fi
00020c16 18020fi
5213506e
RW
18021rm -f core conftest.err conftest.$ac_objext \
18022 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
18023if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
18024
18025 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
18026 # Warning - without using the other run time loading flags,
18027 # -berok will link without error, but may produce a broken library.
18028 no_undefined_flag_CXX=' ${wl}-bernotok'
18029 allow_undefined_flag_CXX=' ${wl}-berok'
43e02a8a
RW
18030 if test "$with_gnu_ld" = yes; then
18031 # We only use this code for GNU lds that support --whole-archive.
18032 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
18033 else
18034 # Exported symbols can be pulled into shared objects from archives
18035 whole_archive_flag_spec_CXX='$convenience'
18036 fi
00020c16
ILT
18037 archive_cmds_need_lc_CXX=yes
18038 # This is similar to how AIX traditionally builds its shared
18039 # libraries.
18040 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'
18041 fi
18042 fi
18043 ;;
18044
18045 beos*)
18046 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18047 allow_undefined_flag_CXX=unsupported
18048 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
18049 # support --undefined. This deserves some investigation. FIXME
18050 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18051 else
18052 ld_shlibs_CXX=no
18053 fi
18054 ;;
18055
18056 chorus*)
18057 case $cc_basename in
18058 *)
18059 # FIXME: insert proper C++ library support
18060 ld_shlibs_CXX=no
18061 ;;
18062 esac
18063 ;;
18064
18065 cygwin* | mingw* | pw32* | cegcc*)
18066 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
18067 # as there is no search path for DLLs.
18068 hardcode_libdir_flag_spec_CXX='-L$libdir'
43e02a8a 18069 export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
00020c16
ILT
18070 allow_undefined_flag_CXX=unsupported
18071 always_export_symbols_CXX=no
18072 enable_shared_with_static_runtimes_CXX=yes
18073
18074 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
18075 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'
18076 # If the export-symbols file already is a .def file (1st line
18077 # is EXPORTS), use it as is; otherwise, prepend...
18078 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
18079 cp $export_symbols $output_objdir/$soname.def;
18080 else
18081 echo EXPORTS > $output_objdir/$soname.def;
18082 cat $export_symbols >> $output_objdir/$soname.def;
18083 fi~
18084 $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'
18085 else
18086 ld_shlibs_CXX=no
18087 fi
18088 ;;
18089 darwin* | rhapsody*)
18090
18091
18092 archive_cmds_need_lc_CXX=no
18093 hardcode_direct_CXX=no
18094 hardcode_automatic_CXX=yes
18095 hardcode_shlibpath_var_CXX=unsupported
43e02a8a
RW
18096 if test "$lt_cv_ld_force_load" = "yes"; then
18097 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
18098 else
18099 whole_archive_flag_spec_CXX=''
18100 fi
00020c16
ILT
18101 link_all_deplibs_CXX=yes
18102 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
18103 case $cc_basename in
18104 ifort*) _lt_dar_can_shared=yes ;;
18105 *) _lt_dar_can_shared=$GCC ;;
18106 esac
18107 if test "$_lt_dar_can_shared" = "yes"; then
43e02a8a 18108 output_verbose_link_cmd=func_echo_all
00020c16
ILT
18109 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}"
18110 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
18111 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}"
18112 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}"
18113 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
18114 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}"
18115 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}"
18116 fi
18117
18118 else
18119 ld_shlibs_CXX=no
18120 fi
18121
18122 ;;
18123
18124 dgux*)
18125 case $cc_basename in
18126 ec++*)
18127 # FIXME: insert proper C++ library support
18128 ld_shlibs_CXX=no
18129 ;;
18130 ghcx*)
18131 # Green Hills C++ Compiler
18132 # FIXME: insert proper C++ library support
18133 ld_shlibs_CXX=no
18134 ;;
18135 *)
18136 # FIXME: insert proper C++ library support
18137 ld_shlibs_CXX=no
18138 ;;
18139 esac
18140 ;;
18141
18142 freebsd[12]*)
18143 # C++ shared libraries reported to be fairly broken before
18144 # switch to ELF
18145 ld_shlibs_CXX=no
18146 ;;
18147
18148 freebsd-elf*)
18149 archive_cmds_need_lc_CXX=no
18150 ;;
18151
18152 freebsd* | dragonfly*)
18153 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
18154 # conventions
18155 ld_shlibs_CXX=yes
18156 ;;
18157
18158 gnu*)
18159 ;;
18160
43e02a8a
RW
18161 haiku*)
18162 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18163 link_all_deplibs_CXX=yes
18164 ;;
18165
00020c16
ILT
18166 hpux9*)
18167 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18168 hardcode_libdir_separator_CXX=:
18169 export_dynamic_flag_spec_CXX='${wl}-E'
18170 hardcode_direct_CXX=yes
18171 hardcode_minus_L_CXX=yes # Not in the search PATH,
18172 # but as the default
18173 # location of the library.
18174
18175 case $cc_basename in
18176 CC*)
18177 # FIXME: insert proper C++ library support
18178 ld_shlibs_CXX=no
18179 ;;
18180 aCC*)
18181 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'
18182 # Commands to make compiler produce verbose output that lists
18183 # what "hidden" libraries, object files and flags are used when
18184 # linking a shared library.
18185 #
18186 # There doesn't appear to be a way to prevent this compiler from
18187 # explicitly linking system object files so we need to strip them
18188 # from the output so that they don't get included in the library
18189 # dependencies.
43e02a8a 18190 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
00020c16
ILT
18191 ;;
18192 *)
18193 if test "$GXX" = yes; then
18194 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'
18195 else
18196 # FIXME: insert proper C++ library support
18197 ld_shlibs_CXX=no
18198 fi
18199 ;;
18200 esac
18201 ;;
18202
18203 hpux10*|hpux11*)
18204 if test $with_gnu_ld = no; then
18205 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18206 hardcode_libdir_separator_CXX=:
18207
18208 case $host_cpu in
18209 hppa*64*|ia64*)
18210 ;;
18211 *)
18212 export_dynamic_flag_spec_CXX='${wl}-E'
18213 ;;
18214 esac
18215 fi
18216 case $host_cpu in
18217 hppa*64*|ia64*)
18218 hardcode_direct_CXX=no
18219 hardcode_shlibpath_var_CXX=no
18220 ;;
18221 *)
18222 hardcode_direct_CXX=yes
18223 hardcode_direct_absolute_CXX=yes
18224 hardcode_minus_L_CXX=yes # Not in the search PATH,
18225 # but as the default
18226 # location of the library.
18227 ;;
18228 esac
18229
18230 case $cc_basename in
18231 CC*)
18232 # FIXME: insert proper C++ library support
18233 ld_shlibs_CXX=no
18234 ;;
18235 aCC*)
18236 case $host_cpu in
18237 hppa*64*)
18238 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18239 ;;
18240 ia64*)
18241 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18242 ;;
18243 *)
18244 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18245 ;;
18246 esac
18247 # Commands to make compiler produce verbose output that lists
18248 # what "hidden" libraries, object files and flags are used when
18249 # linking a shared library.
18250 #
18251 # There doesn't appear to be a way to prevent this compiler from
18252 # explicitly linking system object files so we need to strip them
18253 # from the output so that they don't get included in the library
18254 # dependencies.
43e02a8a 18255 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
00020c16
ILT
18256 ;;
18257 *)
18258 if test "$GXX" = yes; then
18259 if test $with_gnu_ld = no; then
18260 case $host_cpu in
18261 hppa*64*)
18262 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18263 ;;
18264 ia64*)
18265 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18266 ;;
18267 *)
18268 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'
18269 ;;
18270 esac
18271 fi
18272 else
18273 # FIXME: insert proper C++ library support
18274 ld_shlibs_CXX=no
18275 fi
18276 ;;
18277 esac
18278 ;;
18279
18280 interix[3-9]*)
18281 hardcode_direct_CXX=no
18282 hardcode_shlibpath_var_CXX=no
18283 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18284 export_dynamic_flag_spec_CXX='${wl}-E'
18285 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
18286 # Instead, shared libraries are loaded at an image base (0x10000000 by
18287 # default) and relocated if they conflict, which is a slow very memory
18288 # consuming and fragmenting process. To avoid this, we pick a random,
18289 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
18290 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
18291 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'
18292 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'
18293 ;;
18294 irix5* | irix6*)
18295 case $cc_basename in
18296 CC*)
18297 # SGI C++
43e02a8a 18298 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
00020c16
ILT
18299
18300 # Archives containing C++ object files must be created using
18301 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
18302 # necessary to make sure instantiated templates are included
18303 # in the archive.
18304 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
18305 ;;
18306 *)
18307 if test "$GXX" = yes; then
18308 if test "$with_gnu_ld" = no; then
43e02a8a 18309 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
00020c16 18310 else
43e02a8a 18311 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
00020c16
ILT
18312 fi
18313 fi
18314 link_all_deplibs_CXX=yes
18315 ;;
18316 esac
18317 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18318 hardcode_libdir_separator_CXX=:
18319 inherit_rpath_CXX=yes
18320 ;;
18321
18322 linux* | k*bsd*-gnu | kopensolaris*-gnu)
18323 case $cc_basename in
18324 KCC*)
18325 # Kuck and Associates, Inc. (KAI) C++ Compiler
18326
18327 # KCC will only create a shared library if the output file
18328 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18329 # to its proper name (with version) after linking.
18330 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'
18331 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'
18332 # Commands to make compiler produce verbose output that lists
18333 # what "hidden" libraries, object files and flags are used when
18334 # linking a shared library.
18335 #
18336 # There doesn't appear to be a way to prevent this compiler from
18337 # explicitly linking system object files so we need to strip them
18338 # from the output so that they don't get included in the library
18339 # dependencies.
43e02a8a 18340 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
00020c16
ILT
18341
18342 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18343 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18344
18345 # Archives containing C++ object files must be created using
18346 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
18347 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
18348 ;;
18349 icpc* | ecpc* )
18350 # Intel C++
18351 with_gnu_ld=yes
18352 # version 8.0 and above of icpc choke on multiply defined symbols
18353 # if we add $predep_objects and $postdep_objects, however 7.1 and
18354 # earlier do not add the objects themselves.
18355 case `$CC -V 2>&1` in
18356 *"Version 7."*)
18357 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18358 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'
18359 ;;
18360 *) # Version 8.0 or newer
18361 tmp_idyn=
18362 case $host_cpu in
18363 ia64*) tmp_idyn=' -i_dynamic';;
18364 esac
18365 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18366 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'
18367 ;;
18368 esac
18369 archive_cmds_need_lc_CXX=no
18370 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18371 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18372 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
18373 ;;
18374 pgCC* | pgcpp*)
18375 # Portland Group C++ compiler
18376 case `$CC -V` in
43e02a8a 18377 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
00020c16
ILT
18378 prelink_cmds_CXX='tpldir=Template.dir~
18379 rm -rf $tpldir~
18380 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
18381 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
18382 old_archive_cmds_CXX='tpldir=Template.dir~
18383 rm -rf $tpldir~
18384 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
18385 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
18386 $RANLIB $oldlib'
18387 archive_cmds_CXX='tpldir=Template.dir~
18388 rm -rf $tpldir~
18389 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18390 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18391 archive_expsym_cmds_CXX='tpldir=Template.dir~
18392 rm -rf $tpldir~
18393 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18394 $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'
18395 ;;
43e02a8a 18396 *) # Version 6 and above use weak symbols
00020c16
ILT
18397 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18398 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'
18399 ;;
18400 esac
18401
18402 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
18403 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
43e02a8a 18404 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
00020c16
ILT
18405 ;;
18406 cxx*)
18407 # Compaq C++
18408 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18409 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'
18410
18411 runpath_var=LD_RUN_PATH
18412 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18413 hardcode_libdir_separator_CXX=:
18414
18415 # Commands to make compiler produce verbose output that lists
18416 # what "hidden" libraries, object files and flags are used when
18417 # linking a shared library.
18418 #
18419 # There doesn't appear to be a way to prevent this compiler from
18420 # explicitly linking system object files so we need to strip them
18421 # from the output so that they don't get included in the library
18422 # dependencies.
43e02a8a 18423 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
00020c16 18424 ;;
43e02a8a 18425 xl* | mpixl* | bgxl*)
00020c16
ILT
18426 # IBM XL 8.0 on PPC, with GNU ld
18427 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18428 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18429 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18430 if test "x$supports_anon_versioning" = xyes; then
18431 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
18432 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
18433 echo "local: *; };" >> $output_objdir/$libname.ver~
18434 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
18435 fi
18436 ;;
18437 *)
18438 case `$CC -V 2>&1 | sed 5q` in
18439 *Sun\ C*)
18440 # Sun C++ 5.9
18441 no_undefined_flag_CXX=' -zdefs'
18442 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18443 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'
18444 hardcode_libdir_flag_spec_CXX='-R$libdir'
43e02a8a 18445 whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
00020c16
ILT
18446 compiler_needs_object_CXX=yes
18447
18448 # Not sure whether something based on
18449 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
18450 # would be better.
43e02a8a 18451 output_verbose_link_cmd='func_echo_all'
00020c16
ILT
18452
18453 # Archives containing C++ object files must be created using
18454 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18455 # necessary to make sure instantiated templates are included
18456 # in the archive.
18457 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18458 ;;
18459 esac
18460 ;;
18461 esac
18462 ;;
18463
18464 lynxos*)
18465 # FIXME: insert proper C++ library support
18466 ld_shlibs_CXX=no
18467 ;;
18468
18469 m88k*)
18470 # FIXME: insert proper C++ library support
18471 ld_shlibs_CXX=no
18472 ;;
18473
18474 mvs*)
18475 case $cc_basename in
18476 cxx*)
18477 # FIXME: insert proper C++ library support
18478 ld_shlibs_CXX=no
18479 ;;
18480 *)
18481 # FIXME: insert proper C++ library support
18482 ld_shlibs_CXX=no
18483 ;;
18484 esac
18485 ;;
18486
18487 netbsd*)
18488 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18489 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
18490 wlarc=
18491 hardcode_libdir_flag_spec_CXX='-R$libdir'
18492 hardcode_direct_CXX=yes
18493 hardcode_shlibpath_var_CXX=no
18494 fi
18495 # Workaround some broken pre-1.5 toolchains
18496 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
18497 ;;
18498
18499 *nto* | *qnx*)
18500 ld_shlibs_CXX=yes
18501 ;;
18502
18503 openbsd2*)
18504 # C++ shared libraries are fairly broken
18505 ld_shlibs_CXX=no
18506 ;;
18507
18508 openbsd*)
18509 if test -f /usr/libexec/ld.so; then
18510 hardcode_direct_CXX=yes
18511 hardcode_shlibpath_var_CXX=no
18512 hardcode_direct_absolute_CXX=yes
18513 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
18514 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18515 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18516 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
18517 export_dynamic_flag_spec_CXX='${wl}-E'
18518 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
18519 fi
43e02a8a 18520 output_verbose_link_cmd=func_echo_all
00020c16
ILT
18521 else
18522 ld_shlibs_CXX=no
18523 fi
18524 ;;
18525
18526 osf3* | osf4* | osf5*)
18527 case $cc_basename in
18528 KCC*)
18529 # Kuck and Associates, Inc. (KAI) C++ Compiler
18530
18531 # KCC will only create a shared library if the output file
18532 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18533 # to its proper name (with version) after linking.
18534 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'
18535
18536 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18537 hardcode_libdir_separator_CXX=:
18538
18539 # Archives containing C++ object files must be created using
18540 # the KAI C++ compiler.
18541 case $host in
18542 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
18543 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
18544 esac
18545 ;;
18546 RCC*)
18547 # Rational C++ 2.4.1
18548 # FIXME: insert proper C++ library support
18549 ld_shlibs_CXX=no
18550 ;;
18551 cxx*)
18552 case $host in
18553 osf3*)
18554 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 18555 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
00020c16
ILT
18556 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18557 ;;
18558 *)
18559 allow_undefined_flag_CXX=' -expect_unresolved \*'
43e02a8a 18560 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
00020c16
ILT
18561 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
18562 echo "-hidden">> $lib.exp~
43e02a8a 18563 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
00020c16
ILT
18564 $RM $lib.exp'
18565 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18566 ;;
18567 esac
18568
18569 hardcode_libdir_separator_CXX=:
18570
18571 # Commands to make compiler produce verbose output that lists
18572 # what "hidden" libraries, object files and flags are used when
18573 # linking a shared library.
18574 #
18575 # There doesn't appear to be a way to prevent this compiler from
18576 # explicitly linking system object files so we need to strip them
18577 # from the output so that they don't get included in the library
18578 # dependencies.
43e02a8a 18579 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
00020c16
ILT
18580 ;;
18581 *)
18582 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18583 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
18584 case $host in
18585 osf3*)
43e02a8a 18586 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
00020c16
ILT
18587 ;;
18588 *)
43e02a8a 18589 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
00020c16
ILT
18590 ;;
18591 esac
18592
18593 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18594 hardcode_libdir_separator_CXX=:
18595
18596 # Commands to make compiler produce verbose output that lists
18597 # what "hidden" libraries, object files and flags are used when
18598 # linking a shared library.
43e02a8a 18599 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18600
18601 else
18602 # FIXME: insert proper C++ library support
18603 ld_shlibs_CXX=no
18604 fi
18605 ;;
18606 esac
18607 ;;
18608
18609 psos*)
18610 # FIXME: insert proper C++ library support
18611 ld_shlibs_CXX=no
18612 ;;
18613
18614 sunos4*)
18615 case $cc_basename in
18616 CC*)
18617 # Sun C++ 4.x
18618 # FIXME: insert proper C++ library support
18619 ld_shlibs_CXX=no
18620 ;;
18621 lcc*)
18622 # Lucid
18623 # FIXME: insert proper C++ library support
18624 ld_shlibs_CXX=no
18625 ;;
18626 *)
18627 # FIXME: insert proper C++ library support
18628 ld_shlibs_CXX=no
18629 ;;
18630 esac
18631 ;;
18632
18633 solaris*)
18634 case $cc_basename in
18635 CC*)
18636 # Sun C++ 4.2, 5.x and Centerline C++
18637 archive_cmds_need_lc_CXX=yes
18638 no_undefined_flag_CXX=' -zdefs'
18639 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18640 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18641 $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'
18642
18643 hardcode_libdir_flag_spec_CXX='-R$libdir'
18644 hardcode_shlibpath_var_CXX=no
18645 case $host_os in
18646 solaris2.[0-5] | solaris2.[0-5].*) ;;
18647 *)
18648 # The compiler driver will combine and reorder linker options,
18649 # but understands `-z linker_flag'.
18650 # Supported since Solaris 2.6 (maybe 2.5.1?)
18651 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
18652 ;;
18653 esac
18654 link_all_deplibs_CXX=yes
18655
43e02a8a 18656 output_verbose_link_cmd='func_echo_all'
00020c16
ILT
18657
18658 # Archives containing C++ object files must be created using
18659 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18660 # necessary to make sure instantiated templates are included
18661 # in the archive.
18662 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18663 ;;
18664 gcx*)
18665 # Green Hills C++ Compiler
18666 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18667
18668 # The C++ compiler must be used to create the archive.
18669 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
18670 ;;
18671 *)
18672 # GNU C++ compiler with Solaris linker
18673 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18674 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
18675 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
18676 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18677 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18678 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18679
18680 # Commands to make compiler produce verbose output that lists
18681 # what "hidden" libraries, object files and flags are used when
18682 # linking a shared library.
43e02a8a 18683 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18684 else
18685 # g++ 2.7 appears to require `-G' NOT `-shared' on this
18686 # platform.
18687 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18688 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18689 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18690
18691 # Commands to make compiler produce verbose output that lists
18692 # what "hidden" libraries, object files and flags are used when
18693 # linking a shared library.
43e02a8a 18694 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18695 fi
18696
18697 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
18698 case $host_os in
18699 solaris2.[0-5] | solaris2.[0-5].*) ;;
18700 *)
18701 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
18702 ;;
18703 esac
18704 fi
18705 ;;
18706 esac
18707 ;;
18708
18709 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
18710 no_undefined_flag_CXX='${wl}-z,text'
18711 archive_cmds_need_lc_CXX=no
18712 hardcode_shlibpath_var_CXX=no
18713 runpath_var='LD_RUN_PATH'
18714
18715 case $cc_basename in
18716 CC*)
18717 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18718 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18719 ;;
18720 *)
18721 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18722 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18723 ;;
18724 esac
18725 ;;
18726
18727 sysv5* | sco3.2v5* | sco5v6*)
18728 # Note: We can NOT use -z defs as we might desire, because we do not
18729 # link with -lc, and that would cause any symbols used from libc to
18730 # always be unresolved, which means just about no library would
18731 # ever link correctly. If we're not using GNU ld we use -z text
18732 # though, which does catch some bad symbols but isn't as heavy-handed
18733 # as -z defs.
18734 no_undefined_flag_CXX='${wl}-z,text'
18735 allow_undefined_flag_CXX='${wl}-z,nodefs'
18736 archive_cmds_need_lc_CXX=no
18737 hardcode_shlibpath_var_CXX=no
18738 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
18739 hardcode_libdir_separator_CXX=':'
18740 link_all_deplibs_CXX=yes
18741 export_dynamic_flag_spec_CXX='${wl}-Bexport'
18742 runpath_var='LD_RUN_PATH'
18743
18744 case $cc_basename in
18745 CC*)
18746 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18747 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
43e02a8a
RW
18748 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
18749 '"$old_archive_cmds_CXX"
18750 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
18751 '"$reload_cmds_CXX"
00020c16
ILT
18752 ;;
18753 *)
18754 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18755 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18756 ;;
18757 esac
18758 ;;
18759
18760 tandem*)
18761 case $cc_basename in
18762 NCC*)
18763 # NonStop-UX NCC 3.20
18764 # FIXME: insert proper C++ library support
18765 ld_shlibs_CXX=no
18766 ;;
18767 *)
18768 # FIXME: insert proper C++ library support
18769 ld_shlibs_CXX=no
18770 ;;
18771 esac
18772 ;;
18773
18774 vxworks*)
18775 # FIXME: insert proper C++ library support
18776 ld_shlibs_CXX=no
18777 ;;
18778
18779 *)
18780 # FIXME: insert proper C++ library support
18781 ld_shlibs_CXX=no
18782 ;;
18783 esac
18784
5213506e
RW
18785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
18786$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
18787 test "$ld_shlibs_CXX" = no && can_build_shared=no
18788
18789 GCC_CXX="$GXX"
18790 LD_CXX="$LD"
18791
18792 ## CAVEAT EMPTOR:
18793 ## There is no encapsulation within the following macros, do not change
18794 ## the running order or otherwise move them around unless you know exactly
18795 ## what you are doing...
18796 # Dependencies to place before and after the object being linked:
18797predep_objects_CXX=
18798postdep_objects_CXX=
18799predeps_CXX=
18800postdeps_CXX=
18801compiler_lib_search_path_CXX=
18802
18803cat > conftest.$ac_ext <<_LT_EOF
18804class Foo
18805{
18806public:
18807 Foo (void) { a = 0; }
18808private:
18809 int a;
18810};
18811_LT_EOF
18812
5213506e 18813if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
18814 (eval $ac_compile) 2>&5
18815 ac_status=$?
5213506e
RW
18816 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18817 test $ac_status = 0; }; then
00020c16
ILT
18818 # Parse the compiler output and extract the necessary
18819 # objects, libraries and library flags.
18820
18821 # Sentinel used to keep track of whether or not we are before
18822 # the conftest object file.
18823 pre_test_object_deps_done=no
18824
18825 for p in `eval "$output_verbose_link_cmd"`; do
18826 case $p in
18827
18828 -L* | -R* | -l*)
18829 # Some compilers place space between "-{L,R}" and the path.
18830 # Remove the space.
18831 if test $p = "-L" ||
18832 test $p = "-R"; then
18833 prev=$p
18834 continue
18835 else
18836 prev=
18837 fi
18838
18839 if test "$pre_test_object_deps_done" = no; then
18840 case $p in
18841 -L* | -R*)
18842 # Internal compiler library paths should come after those
18843 # provided the user. The postdeps already come after the
18844 # user supplied libs so there is no need to process them.
18845 if test -z "$compiler_lib_search_path_CXX"; then
18846 compiler_lib_search_path_CXX="${prev}${p}"
18847 else
18848 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
18849 fi
18850 ;;
18851 # The "-l" case would never come before the object being
18852 # linked, so don't bother handling this case.
18853 esac
18854 else
18855 if test -z "$postdeps_CXX"; then
18856 postdeps_CXX="${prev}${p}"
18857 else
18858 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
18859 fi
18860 fi
18861 ;;
18862
18863 *.$objext)
18864 # This assumes that the test object file only shows up
18865 # once in the compiler output.
18866 if test "$p" = "conftest.$objext"; then
18867 pre_test_object_deps_done=yes
18868 continue
18869 fi
18870
18871 if test "$pre_test_object_deps_done" = no; then
18872 if test -z "$predep_objects_CXX"; then
18873 predep_objects_CXX="$p"
18874 else
18875 predep_objects_CXX="$predep_objects_CXX $p"
18876 fi
18877 else
18878 if test -z "$postdep_objects_CXX"; then
18879 postdep_objects_CXX="$p"
18880 else
18881 postdep_objects_CXX="$postdep_objects_CXX $p"
18882 fi
18883 fi
18884 ;;
18885
18886 *) ;; # Ignore the rest.
18887
18888 esac
18889 done
18890
18891 # Clean up.
18892 rm -f a.out a.exe
18893else
18894 echo "libtool.m4: error: problem compiling CXX test program"
18895fi
18896
18897$RM -f confest.$objext
18898
18899# PORTME: override above test on systems where it is broken
18900case $host_os in
18901interix[3-9]*)
18902 # Interix 3.5 installs completely hosed .la files for C++, so rather than
18903 # hack all around it, let's just trust "g++" to DTRT.
18904 predep_objects_CXX=
18905 postdep_objects_CXX=
18906 postdeps_CXX=
18907 ;;
18908
18909linux*)
18910 case `$CC -V 2>&1 | sed 5q` in
18911 *Sun\ C*)
18912 # Sun C++ 5.9
18913
18914 # The more standards-conforming stlport4 library is
18915 # incompatible with the Cstd library. Avoid specifying
18916 # it if it's in CXXFLAGS. Ignore libCrun as
18917 # -library=stlport4 depends on it.
18918 case " $CXX $CXXFLAGS " in
18919 *" -library=stlport4 "*)
18920 solaris_use_stlport4=yes
18921 ;;
18922 esac
18923
18924 if test "$solaris_use_stlport4" != yes; then
18925 postdeps_CXX='-library=Cstd -library=Crun'
18926 fi
18927 ;;
18928 esac
18929 ;;
18930
18931solaris*)
18932 case $cc_basename in
18933 CC*)
18934 # The more standards-conforming stlport4 library is
18935 # incompatible with the Cstd library. Avoid specifying
18936 # it if it's in CXXFLAGS. Ignore libCrun as
18937 # -library=stlport4 depends on it.
18938 case " $CXX $CXXFLAGS " in
18939 *" -library=stlport4 "*)
18940 solaris_use_stlport4=yes
18941 ;;
18942 esac
18943
18944 # Adding this requires a known-good setup of shared libraries for
18945 # Sun compiler versions before 5.6, else PIC objects from an old
18946 # archive will be linked into the output, leading to subtle bugs.
18947 if test "$solaris_use_stlport4" != yes; then
18948 postdeps_CXX='-library=Cstd -library=Crun'
18949 fi
18950 ;;
18951 esac
18952 ;;
18953esac
18954
18955
18956case " $postdeps_CXX " in
18957*" -lc "*) archive_cmds_need_lc_CXX=no ;;
18958esac
18959 compiler_lib_search_dirs_CXX=
18960if test -n "${compiler_lib_search_path_CXX}"; then
18961 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
18962fi
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994 lt_prog_compiler_wl_CXX=
18995lt_prog_compiler_pic_CXX=
18996lt_prog_compiler_static_CXX=
18997
5213506e
RW
18998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
18999$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
19000
19001 # C++ specific cases for pic, static, wl, etc.
19002 if test "$GXX" = yes; then
19003 lt_prog_compiler_wl_CXX='-Wl,'
19004 lt_prog_compiler_static_CXX='-static'
19005
19006 case $host_os in
19007 aix*)
19008 # All AIX code is PIC.
19009 if test "$host_cpu" = ia64; then
19010 # AIX 5 now supports IA64 processor
19011 lt_prog_compiler_static_CXX='-Bstatic'
19012 fi
19013 ;;
19014
19015 amigaos*)
19016 case $host_cpu in
19017 powerpc)
19018 # see comment about AmigaOS4 .so support
19019 lt_prog_compiler_pic_CXX='-fPIC'
19020 ;;
19021 m68k)
19022 # FIXME: we need at least 68020 code to build shared libraries, but
19023 # adding the `-m68020' flag to GCC prevents building anything better,
19024 # like `-m68040'.
19025 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
19026 ;;
19027 esac
19028 ;;
19029
19030 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19031 # PIC is the default for these OSes.
19032 ;;
19033 mingw* | cygwin* | os2* | pw32* | cegcc*)
19034 # This hack is so that the source file can tell whether it is being
19035 # built for inclusion in a dll (and should export symbols for example).
19036 # Although the cygwin gcc ignores -fPIC, still need this for old-style
19037 # (--disable-auto-import) libraries
19038 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
19039 ;;
19040 darwin* | rhapsody*)
19041 # PIC is the default on this platform
19042 # Common symbols not allowed in MH_DYLIB files
19043 lt_prog_compiler_pic_CXX='-fno-common'
19044 ;;
19045 *djgpp*)
19046 # DJGPP does not support shared libraries at all
19047 lt_prog_compiler_pic_CXX=
19048 ;;
43e02a8a
RW
19049 haiku*)
19050 # PIC is the default for Haiku.
19051 # The "-static" flag exists, but is broken.
19052 lt_prog_compiler_static_CXX=
19053 ;;
00020c16
ILT
19054 interix[3-9]*)
19055 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19056 # Instead, we relocate shared libraries at runtime.
19057 ;;
19058 sysv4*MP*)
19059 if test -d /usr/nec; then
19060 lt_prog_compiler_pic_CXX=-Kconform_pic
19061 fi
19062 ;;
19063 hpux*)
19064 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19065 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
19066 # sets the default TLS model and affects inlining.
19067 case $host_cpu in
19068 hppa*64*)
19069 ;;
19070 *)
19071 lt_prog_compiler_pic_CXX='-fPIC'
19072 ;;
19073 esac
19074 ;;
19075 *qnx* | *nto*)
19076 # QNX uses GNU C++, but need to define -shared option too, otherwise
19077 # it will coredump.
19078 lt_prog_compiler_pic_CXX='-fPIC -shared'
19079 ;;
19080 *)
19081 lt_prog_compiler_pic_CXX='-fPIC'
19082 ;;
19083 esac
19084 else
19085 case $host_os in
19086 aix[4-9]*)
19087 # All AIX code is PIC.
19088 if test "$host_cpu" = ia64; then
19089 # AIX 5 now supports IA64 processor
19090 lt_prog_compiler_static_CXX='-Bstatic'
19091 else
19092 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
19093 fi
19094 ;;
19095 chorus*)
19096 case $cc_basename in
19097 cxch68*)
19098 # Green Hills C++ Compiler
19099 # _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"
19100 ;;
19101 esac
19102 ;;
19103 dgux*)
19104 case $cc_basename in
19105 ec++*)
19106 lt_prog_compiler_pic_CXX='-KPIC'
19107 ;;
19108 ghcx*)
19109 # Green Hills C++ Compiler
19110 lt_prog_compiler_pic_CXX='-pic'
19111 ;;
19112 *)
19113 ;;
19114 esac
19115 ;;
19116 freebsd* | dragonfly*)
19117 # FreeBSD uses GNU C++
19118 ;;
19119 hpux9* | hpux10* | hpux11*)
19120 case $cc_basename in
19121 CC*)
19122 lt_prog_compiler_wl_CXX='-Wl,'
19123 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19124 if test "$host_cpu" != ia64; then
19125 lt_prog_compiler_pic_CXX='+Z'
19126 fi
19127 ;;
19128 aCC*)
19129 lt_prog_compiler_wl_CXX='-Wl,'
19130 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19131 case $host_cpu in
19132 hppa*64*|ia64*)
19133 # +Z the default
19134 ;;
19135 *)
19136 lt_prog_compiler_pic_CXX='+Z'
19137 ;;
19138 esac
19139 ;;
19140 *)
19141 ;;
19142 esac
19143 ;;
19144 interix*)
19145 # This is c89, which is MS Visual C++ (no shared libs)
19146 # Anyone wants to do a port?
19147 ;;
19148 irix5* | irix6* | nonstopux*)
19149 case $cc_basename in
19150 CC*)
19151 lt_prog_compiler_wl_CXX='-Wl,'
19152 lt_prog_compiler_static_CXX='-non_shared'
19153 # CC pic flag -KPIC is the default.
19154 ;;
19155 *)
19156 ;;
19157 esac
19158 ;;
19159 linux* | k*bsd*-gnu | kopensolaris*-gnu)
19160 case $cc_basename in
19161 KCC*)
19162 # KAI C++ Compiler
19163 lt_prog_compiler_wl_CXX='--backend -Wl,'
19164 lt_prog_compiler_pic_CXX='-fPIC'
19165 ;;
19166 ecpc* )
19167 # old Intel C++ for x86_64 which still supported -KPIC.
19168 lt_prog_compiler_wl_CXX='-Wl,'
19169 lt_prog_compiler_pic_CXX='-KPIC'
19170 lt_prog_compiler_static_CXX='-static'
19171 ;;
19172 icpc* )
19173 # Intel C++, used to be incompatible with GCC.
19174 # ICC 10 doesn't accept -KPIC any more.
19175 lt_prog_compiler_wl_CXX='-Wl,'
19176 lt_prog_compiler_pic_CXX='-fPIC'
19177 lt_prog_compiler_static_CXX='-static'
19178 ;;
19179 pgCC* | pgcpp*)
19180 # Portland Group C++ compiler
19181 lt_prog_compiler_wl_CXX='-Wl,'
19182 lt_prog_compiler_pic_CXX='-fpic'
19183 lt_prog_compiler_static_CXX='-Bstatic'
19184 ;;
19185 cxx*)
19186 # Compaq C++
19187 # Make sure the PIC flag is empty. It appears that all Alpha
19188 # Linux and Compaq Tru64 Unix objects are PIC.
19189 lt_prog_compiler_pic_CXX=
19190 lt_prog_compiler_static_CXX='-non_shared'
19191 ;;
43e02a8a
RW
19192 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
19193 # IBM XL 8.0, 9.0 on PPC and BlueGene
00020c16
ILT
19194 lt_prog_compiler_wl_CXX='-Wl,'
19195 lt_prog_compiler_pic_CXX='-qpic'
19196 lt_prog_compiler_static_CXX='-qstaticlink'
19197 ;;
19198 *)
19199 case `$CC -V 2>&1 | sed 5q` in
19200 *Sun\ C*)
19201 # Sun C++ 5.9
19202 lt_prog_compiler_pic_CXX='-KPIC'
19203 lt_prog_compiler_static_CXX='-Bstatic'
19204 lt_prog_compiler_wl_CXX='-Qoption ld '
19205 ;;
19206 esac
19207 ;;
19208 esac
19209 ;;
19210 lynxos*)
19211 ;;
19212 m88k*)
19213 ;;
19214 mvs*)
19215 case $cc_basename in
19216 cxx*)
19217 lt_prog_compiler_pic_CXX='-W c,exportall'
19218 ;;
19219 *)
19220 ;;
19221 esac
19222 ;;
19223 netbsd*)
19224 ;;
19225 *qnx* | *nto*)
19226 # QNX uses GNU C++, but need to define -shared option too, otherwise
19227 # it will coredump.
19228 lt_prog_compiler_pic_CXX='-fPIC -shared'
19229 ;;
19230 osf3* | osf4* | osf5*)
19231 case $cc_basename in
19232 KCC*)
19233 lt_prog_compiler_wl_CXX='--backend -Wl,'
19234 ;;
19235 RCC*)
19236 # Rational C++ 2.4.1
19237 lt_prog_compiler_pic_CXX='-pic'
19238 ;;
19239 cxx*)
19240 # Digital/Compaq C++
19241 lt_prog_compiler_wl_CXX='-Wl,'
19242 # Make sure the PIC flag is empty. It appears that all Alpha
19243 # Linux and Compaq Tru64 Unix objects are PIC.
19244 lt_prog_compiler_pic_CXX=
19245 lt_prog_compiler_static_CXX='-non_shared'
19246 ;;
19247 *)
19248 ;;
19249 esac
19250 ;;
19251 psos*)
19252 ;;
19253 solaris*)
19254 case $cc_basename in
19255 CC*)
19256 # Sun C++ 4.2, 5.x and Centerline C++
19257 lt_prog_compiler_pic_CXX='-KPIC'
19258 lt_prog_compiler_static_CXX='-Bstatic'
19259 lt_prog_compiler_wl_CXX='-Qoption ld '
19260 ;;
19261 gcx*)
19262 # Green Hills C++ Compiler
19263 lt_prog_compiler_pic_CXX='-PIC'
19264 ;;
19265 *)
19266 ;;
19267 esac
19268 ;;
19269 sunos4*)
19270 case $cc_basename in
19271 CC*)
19272 # Sun C++ 4.x
19273 lt_prog_compiler_pic_CXX='-pic'
19274 lt_prog_compiler_static_CXX='-Bstatic'
19275 ;;
19276 lcc*)
19277 # Lucid
19278 lt_prog_compiler_pic_CXX='-pic'
19279 ;;
19280 *)
19281 ;;
19282 esac
19283 ;;
19284 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
19285 case $cc_basename in
19286 CC*)
19287 lt_prog_compiler_wl_CXX='-Wl,'
19288 lt_prog_compiler_pic_CXX='-KPIC'
19289 lt_prog_compiler_static_CXX='-Bstatic'
19290 ;;
19291 esac
19292 ;;
19293 tandem*)
19294 case $cc_basename in
19295 NCC*)
19296 # NonStop-UX NCC 3.20
19297 lt_prog_compiler_pic_CXX='-KPIC'
19298 ;;
19299 *)
19300 ;;
19301 esac
19302 ;;
19303 vxworks*)
19304 ;;
19305 *)
19306 lt_prog_compiler_can_build_shared_CXX=no
19307 ;;
19308 esac
19309 fi
19310
19311case $host_os in
19312 # For platforms which do not support PIC, -DPIC is meaningless:
19313 *djgpp*)
19314 lt_prog_compiler_pic_CXX=
19315 ;;
19316 *)
19317 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
19318 ;;
19319esac
5213506e
RW
19320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
19321$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
00020c16
ILT
19322
19323
19324
19325#
19326# Check to make sure the PIC flag actually works.
19327#
19328if test -n "$lt_prog_compiler_pic_CXX"; then
5213506e
RW
19329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
19330$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
19331if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
19332 $as_echo_n "(cached) " >&6
00020c16
ILT
19333else
19334 lt_cv_prog_compiler_pic_works_CXX=no
19335 ac_outfile=conftest.$ac_objext
19336 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19337 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
19338 # Insert the option either (1) after the last *FLAGS variable, or
19339 # (2) before a word containing "conftest.", or (3) at the end.
19340 # Note that $ac_compile itself does not contain backslashes and begins
19341 # with a dollar sign (not a hyphen), so the echo should work correctly.
19342 # The option is referenced via a variable to avoid confusing sed.
19343 lt_compile=`echo "$ac_compile" | $SED \
19344 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19345 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19346 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19347 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19348 (eval "$lt_compile" 2>conftest.err)
19349 ac_status=$?
19350 cat conftest.err >&5
43e02a8a 19351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19352 if (exit $ac_status) && test -s "$ac_outfile"; then
19353 # The compiler can only warn and ignore the option if not recognized
19354 # So say no if there are warnings other than the usual output.
43e02a8a 19355 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
19356 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19357 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19358 lt_cv_prog_compiler_pic_works_CXX=yes
19359 fi
19360 fi
19361 $RM conftest*
19362
19363fi
5213506e
RW
19364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
19365$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
00020c16
ILT
19366
19367if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
19368 case $lt_prog_compiler_pic_CXX in
19369 "" | " "*) ;;
19370 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
19371 esac
19372else
19373 lt_prog_compiler_pic_CXX=
19374 lt_prog_compiler_can_build_shared_CXX=no
19375fi
19376
19377fi
19378
19379
19380
19381#
19382# Check to make sure the static flag actually works.
19383#
19384wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
5213506e
RW
19385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19386$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19387if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
19388 $as_echo_n "(cached) " >&6
00020c16
ILT
19389else
19390 lt_cv_prog_compiler_static_works_CXX=no
19391 save_LDFLAGS="$LDFLAGS"
19392 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19393 echo "$lt_simple_link_test_code" > conftest.$ac_ext
19394 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19395 # The linker can only warn and ignore the option if not recognized
19396 # So say no if there are warnings
19397 if test -s conftest.err; then
19398 # Append any errors to the config.log.
19399 cat conftest.err 1>&5
43e02a8a 19400 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
00020c16
ILT
19401 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19402 if diff conftest.exp conftest.er2 >/dev/null; then
19403 lt_cv_prog_compiler_static_works_CXX=yes
19404 fi
19405 else
19406 lt_cv_prog_compiler_static_works_CXX=yes
19407 fi
19408 fi
19409 $RM -r conftest*
19410 LDFLAGS="$save_LDFLAGS"
19411
19412fi
5213506e
RW
19413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
19414$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
00020c16
ILT
19415
19416if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
19417 :
19418else
19419 lt_prog_compiler_static_CXX=
19420fi
19421
19422
19423
19424
5213506e
RW
19425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19426$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19427if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19428 $as_echo_n "(cached) " >&6
00020c16
ILT
19429else
19430 lt_cv_prog_compiler_c_o_CXX=no
19431 $RM -r conftest 2>/dev/null
19432 mkdir conftest
19433 cd conftest
19434 mkdir out
19435 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19436
19437 lt_compiler_flag="-o out/conftest2.$ac_objext"
19438 # Insert the option either (1) after the last *FLAGS variable, or
19439 # (2) before a word containing "conftest.", or (3) at the end.
19440 # Note that $ac_compile itself does not contain backslashes and begins
19441 # with a dollar sign (not a hyphen), so the echo should work correctly.
19442 lt_compile=`echo "$ac_compile" | $SED \
19443 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19444 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19445 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19446 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19447 (eval "$lt_compile" 2>out/conftest.err)
19448 ac_status=$?
19449 cat out/conftest.err >&5
43e02a8a 19450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19451 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19452 then
19453 # The compiler can only warn and ignore the option if not recognized
19454 # So say no if there are warnings
43e02a8a 19455 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
19456 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19457 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19458 lt_cv_prog_compiler_c_o_CXX=yes
19459 fi
19460 fi
19461 chmod u+w . 2>&5
19462 $RM conftest*
19463 # SGI C++ compiler will create directory out/ii_files/ for
19464 # template instantiation
19465 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19466 $RM out/* && rmdir out
19467 cd ..
19468 $RM -r conftest
19469 $RM conftest*
19470
19471fi
5213506e
RW
19472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19473$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19474
19475
19476
5213506e
RW
19477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19478$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19479if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19480 $as_echo_n "(cached) " >&6
00020c16
ILT
19481else
19482 lt_cv_prog_compiler_c_o_CXX=no
19483 $RM -r conftest 2>/dev/null
19484 mkdir conftest
19485 cd conftest
19486 mkdir out
19487 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19488
19489 lt_compiler_flag="-o out/conftest2.$ac_objext"
19490 # Insert the option either (1) after the last *FLAGS variable, or
19491 # (2) before a word containing "conftest.", or (3) at the end.
19492 # Note that $ac_compile itself does not contain backslashes and begins
19493 # with a dollar sign (not a hyphen), so the echo should work correctly.
19494 lt_compile=`echo "$ac_compile" | $SED \
19495 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19496 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19497 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19498 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19499 (eval "$lt_compile" 2>out/conftest.err)
19500 ac_status=$?
19501 cat out/conftest.err >&5
43e02a8a 19502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19503 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19504 then
19505 # The compiler can only warn and ignore the option if not recognized
19506 # So say no if there are warnings
43e02a8a 19507 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
19508 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19509 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19510 lt_cv_prog_compiler_c_o_CXX=yes
19511 fi
19512 fi
19513 chmod u+w . 2>&5
19514 $RM conftest*
19515 # SGI C++ compiler will create directory out/ii_files/ for
19516 # template instantiation
19517 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19518 $RM out/* && rmdir out
19519 cd ..
19520 $RM -r conftest
19521 $RM conftest*
19522
19523fi
5213506e
RW
19524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19525$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19526
19527
19528
19529
19530hard_links="nottested"
19531if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
19532 # do not overwrite the value of need_locks provided by the user
5213506e
RW
19533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19534$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16
ILT
19535 hard_links=yes
19536 $RM conftest*
19537 ln conftest.a conftest.b 2>/dev/null && hard_links=no
19538 touch conftest.a
19539 ln conftest.a conftest.b 2>&5 || hard_links=no
19540 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
19541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19542$as_echo "$hard_links" >&6; }
00020c16 19543 if test "$hard_links" = no; then
5213506e
RW
19544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
19545$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16
ILT
19546 need_locks=warn
19547 fi
19548else
19549 need_locks=no
19550fi
19551
19552
19553
5213506e
RW
19554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19555$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
19556
19557 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19558 case $host_os in
19559 aix[4-9]*)
19560 # If we're using GNU nm, then we don't want the "-C" option.
19561 # -C means demangle to AIX nm, but means don't demangle with GNU nm
43e02a8a
RW
19562 # Also, AIX nm treats weak defined symbols like other global defined
19563 # symbols, whereas GNU nm marks them as "W".
00020c16 19564 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
43e02a8a 19565 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
00020c16
ILT
19566 else
19567 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'
19568 fi
19569 ;;
19570 pw32*)
19571 export_symbols_cmds_CXX="$ltdll_cmds"
19572 ;;
19573 cygwin* | mingw* | cegcc*)
19574 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'
19575 ;;
19576 *)
19577 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19578 ;;
19579 esac
19580 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19581
5213506e
RW
19582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
19583$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
19584test "$ld_shlibs_CXX" = no && can_build_shared=no
19585
19586with_gnu_ld_CXX=$with_gnu_ld
19587
19588
19589
19590
19591
19592
19593#
19594# Do we need to explicitly link libc?
19595#
19596case "x$archive_cmds_need_lc_CXX" in
19597x|xyes)
19598 # Assume -lc should be added
19599 archive_cmds_need_lc_CXX=yes
19600
19601 if test "$enable_shared" = yes && test "$GCC" = yes; then
19602 case $archive_cmds_CXX in
19603 *'~'*)
19604 # FIXME: we may have to deal with multi-command sequences.
19605 ;;
19606 '$CC '*)
19607 # Test whether the compiler implicitly links with -lc since on some
19608 # systems, -lgcc has to come before -lc. If gcc already passes -lc
19609 # to ld, don't add -lc before -lgcc.
5213506e
RW
19610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
19611$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
19612if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then :
19613 $as_echo_n "(cached) " >&6
00020c16
ILT
19614else
19615 $RM conftest*
19616 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19617
5213506e 19618 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
19619 (eval $ac_compile) 2>&5
19620 ac_status=$?
5213506e
RW
19621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19622 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
19623 soname=conftest
19624 lib=conftest
19625 libobjs=conftest.$ac_objext
19626 deplibs=
19627 wl=$lt_prog_compiler_wl_CXX
19628 pic_flag=$lt_prog_compiler_pic_CXX
19629 compiler_flags=-v
19630 linker_flags=-v
19631 verstring=
19632 output_objdir=.
19633 libname=conftest
19634 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
19635 allow_undefined_flag_CXX=
5213506e 19636 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
19637 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
19638 ac_status=$?
5213506e
RW
19639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19640 test $ac_status = 0; }
00020c16
ILT
19641 then
19642 lt_cv_archive_cmds_need_lc_CXX=no
19643 else
19644 lt_cv_archive_cmds_need_lc_CXX=yes
19645 fi
19646 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
19647 else
19648 cat conftest.err 1>&5
19649 fi
19650 $RM conftest*
19651
19652fi
5213506e
RW
19653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
19654$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
00020c16
ILT
19655 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
19656 ;;
19657 esac
19658 fi
19659 ;;
19660esac
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
5213506e
RW
19725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
19726$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
19727
19728library_names_spec=
19729libname_spec='lib$name'
19730soname_spec=
19731shrext_cmds=".so"
19732postinstall_cmds=
19733postuninstall_cmds=
19734finish_cmds=
19735finish_eval=
19736shlibpath_var=
19737shlibpath_overrides_runpath=unknown
19738version_type=none
19739dynamic_linker="$host_os ld.so"
19740sys_lib_dlsearch_path_spec="/lib /usr/lib"
19741need_lib_prefix=unknown
19742hardcode_into_libs=no
19743
19744# when you set need_version to no, make sure it does not cause -set_version
19745# flags to be left without arguments
19746need_version=unknown
19747
19748case $host_os in
19749aix3*)
19750 version_type=linux
19751 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
19752 shlibpath_var=LIBPATH
19753
19754 # AIX 3 has no versioning support, so we append a major version to the name.
19755 soname_spec='${libname}${release}${shared_ext}$major'
19756 ;;
19757
19758aix[4-9]*)
19759 version_type=linux
19760 need_lib_prefix=no
19761 need_version=no
19762 hardcode_into_libs=yes
19763 if test "$host_cpu" = ia64; then
19764 # AIX 5 supports IA64
19765 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
19766 shlibpath_var=LD_LIBRARY_PATH
19767 else
19768 # With GCC up to 2.95.x, collect2 would create an import file
19769 # for dependence libraries. The import file would start with
19770 # the line `#! .'. This would cause the generated library to
19771 # depend on `.', always an invalid library. This was fixed in
19772 # development snapshots of GCC prior to 3.0.
19773 case $host_os in
19774 aix4 | aix4.[01] | aix4.[01].*)
19775 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19776 echo ' yes '
19777 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
19778 :
19779 else
19780 can_build_shared=no
19781 fi
19782 ;;
19783 esac
19784 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
19785 # soname into executable. Probably we can add versioning support to
19786 # collect2, so additional links can be useful in future.
19787 if test "$aix_use_runtimelinking" = yes; then
19788 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19789 # instead of lib<name>.a to let people know that these are not
19790 # typical AIX shared libraries.
19791 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19792 else
19793 # We preserve .a as extension for shared libraries through AIX4.2
19794 # and later when we are not doing run time linking.
19795 library_names_spec='${libname}${release}.a $libname.a'
19796 soname_spec='${libname}${release}${shared_ext}$major'
19797 fi
19798 shlibpath_var=LIBPATH
19799 fi
19800 ;;
19801
19802amigaos*)
19803 case $host_cpu in
19804 powerpc)
19805 # Since July 2007 AmigaOS4 officially supports .so libraries.
19806 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
19807 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19808 ;;
19809 m68k)
19810 library_names_spec='$libname.ixlibrary $libname.a'
19811 # Create ${libname}_ixlibrary.a entries in /sys/libs.
43e02a8a 19812 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
00020c16
ILT
19813 ;;
19814 esac
19815 ;;
19816
19817beos*)
19818 library_names_spec='${libname}${shared_ext}'
19819 dynamic_linker="$host_os ld.so"
19820 shlibpath_var=LIBRARY_PATH
19821 ;;
19822
19823bsdi[45]*)
19824 version_type=linux
19825 need_version=no
19826 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19827 soname_spec='${libname}${release}${shared_ext}$major'
19828 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19829 shlibpath_var=LD_LIBRARY_PATH
19830 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19831 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19832 # the default ld.so.conf also contains /usr/contrib/lib and
19833 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19834 # libtool to hard-code these into programs
19835 ;;
19836
19837cygwin* | mingw* | pw32* | cegcc*)
19838 version_type=windows
19839 shrext_cmds=".dll"
19840 need_version=no
19841 need_lib_prefix=no
19842
19843 case $GCC,$host_os in
19844 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
19845 library_names_spec='$libname.dll.a'
19846 # DLL is installed to $(libdir)/../bin by postinstall_cmds
19847 postinstall_cmds='base_file=`basename \${file}`~
19848 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
19849 dldir=$destdir/`dirname \$dlpath`~
19850 test -d \$dldir || mkdir -p \$dldir~
19851 $install_prog $dir/$dlname \$dldir/$dlname~
19852 chmod a+x \$dldir/$dlname~
19853 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
19854 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
19855 fi'
19856 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19857 dlpath=$dir/\$dldll~
19858 $RM \$dlpath'
19859 shlibpath_overrides_runpath=yes
19860
19861 case $host_os in
19862 cygwin*)
19863 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
19864 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
43e02a8a 19865
00020c16
ILT
19866 ;;
19867 mingw* | cegcc*)
19868 # MinGW DLLs use traditional 'lib' prefix
19869 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
00020c16
ILT
19870 ;;
19871 pw32*)
19872 # pw32 DLLs use 'pw' prefix rather than 'lib'
19873 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
19874 ;;
19875 esac
19876 ;;
19877
19878 *)
19879 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
19880 ;;
19881 esac
19882 dynamic_linker='Win32 ld.exe'
19883 # FIXME: first we should search . and the directory the executable is in
19884 shlibpath_var=PATH
19885 ;;
19886
19887darwin* | rhapsody*)
19888 dynamic_linker="$host_os dyld"
19889 version_type=darwin
19890 need_lib_prefix=no
19891 need_version=no
19892 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
19893 soname_spec='${libname}${release}${major}$shared_ext'
19894 shlibpath_overrides_runpath=yes
19895 shlibpath_var=DYLD_LIBRARY_PATH
19896 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
19897
19898 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
19899 ;;
19900
19901dgux*)
19902 version_type=linux
19903 need_lib_prefix=no
19904 need_version=no
19905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
19906 soname_spec='${libname}${release}${shared_ext}$major'
19907 shlibpath_var=LD_LIBRARY_PATH
19908 ;;
19909
19910freebsd1*)
19911 dynamic_linker=no
19912 ;;
19913
19914freebsd* | dragonfly*)
19915 # DragonFly does not have aout. When/if they implement a new
19916 # versioning mechanism, adjust this.
19917 if test -x /usr/bin/objformat; then
19918 objformat=`/usr/bin/objformat`
19919 else
19920 case $host_os in
19921 freebsd[123]*) objformat=aout ;;
19922 *) objformat=elf ;;
19923 esac
19924 fi
19925 version_type=freebsd-$objformat
19926 case $version_type in
19927 freebsd-elf*)
19928 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
19929 need_version=no
19930 need_lib_prefix=no
19931 ;;
19932 freebsd-*)
19933 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
19934 need_version=yes
19935 ;;
19936 esac
19937 shlibpath_var=LD_LIBRARY_PATH
19938 case $host_os in
19939 freebsd2*)
19940 shlibpath_overrides_runpath=yes
19941 ;;
19942 freebsd3.[01]* | freebsdelf3.[01]*)
19943 shlibpath_overrides_runpath=yes
19944 hardcode_into_libs=yes
19945 ;;
19946 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
19947 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
19948 shlibpath_overrides_runpath=no
19949 hardcode_into_libs=yes
19950 ;;
19951 *) # from 4.6 on, and DragonFly
19952 shlibpath_overrides_runpath=yes
19953 hardcode_into_libs=yes
19954 ;;
19955 esac
19956 ;;
19957
19958gnu*)
19959 version_type=linux
19960 need_lib_prefix=no
19961 need_version=no
19962 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
19963 soname_spec='${libname}${release}${shared_ext}$major'
19964 shlibpath_var=LD_LIBRARY_PATH
19965 hardcode_into_libs=yes
19966 ;;
19967
43e02a8a
RW
19968haiku*)
19969 version_type=linux
19970 need_lib_prefix=no
19971 need_version=no
19972 dynamic_linker="$host_os runtime_loader"
19973 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
19974 soname_spec='${libname}${release}${shared_ext}$major'
19975 shlibpath_var=LIBRARY_PATH
19976 shlibpath_overrides_runpath=yes
19977 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
19978 hardcode_into_libs=yes
19979 ;;
19980
00020c16
ILT
19981hpux9* | hpux10* | hpux11*)
19982 # Give a soname corresponding to the major version so that dld.sl refuses to
19983 # link against other versions.
19984 version_type=sunos
19985 need_lib_prefix=no
19986 need_version=no
19987 case $host_cpu in
19988 ia64*)
19989 shrext_cmds='.so'
19990 hardcode_into_libs=yes
19991 dynamic_linker="$host_os dld.so"
19992 shlibpath_var=LD_LIBRARY_PATH
19993 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19994 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19995 soname_spec='${libname}${release}${shared_ext}$major'
19996 if test "X$HPUX_IA64_MODE" = X32; then
19997 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
19998 else
19999 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
20000 fi
20001 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20002 ;;
20003 hppa*64*)
20004 shrext_cmds='.sl'
20005 hardcode_into_libs=yes
20006 dynamic_linker="$host_os dld.sl"
20007 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
20008 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20009 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20010 soname_spec='${libname}${release}${shared_ext}$major'
20011 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
20012 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20013 ;;
20014 *)
20015 shrext_cmds='.sl'
20016 dynamic_linker="$host_os dld.sl"
20017 shlibpath_var=SHLIB_PATH
20018 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
20019 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20020 soname_spec='${libname}${release}${shared_ext}$major'
20021 ;;
20022 esac
43e02a8a 20023 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
00020c16 20024 postinstall_cmds='chmod 555 $lib'
43e02a8a
RW
20025 # or fails outright, so override atomically:
20026 install_override_mode=555
00020c16
ILT
20027 ;;
20028
20029interix[3-9]*)
20030 version_type=linux
20031 need_lib_prefix=no
20032 need_version=no
20033 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20034 soname_spec='${libname}${release}${shared_ext}$major'
20035 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
20036 shlibpath_var=LD_LIBRARY_PATH
20037 shlibpath_overrides_runpath=no
20038 hardcode_into_libs=yes
20039 ;;
20040
20041irix5* | irix6* | nonstopux*)
20042 case $host_os in
20043 nonstopux*) version_type=nonstopux ;;
20044 *)
20045 if test "$lt_cv_prog_gnu_ld" = yes; then
20046 version_type=linux
20047 else
20048 version_type=irix
20049 fi ;;
20050 esac
20051 need_lib_prefix=no
20052 need_version=no
20053 soname_spec='${libname}${release}${shared_ext}$major'
20054 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
20055 case $host_os in
20056 irix5* | nonstopux*)
20057 libsuff= shlibsuff=
20058 ;;
20059 *)
20060 case $LD in # libtool.m4 will add one of these switches to LD
20061 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
20062 libsuff= shlibsuff= libmagic=32-bit;;
20063 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
20064 libsuff=32 shlibsuff=N32 libmagic=N32;;
20065 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
20066 libsuff=64 shlibsuff=64 libmagic=64-bit;;
20067 *) libsuff= shlibsuff= libmagic=never-match;;
20068 esac
20069 ;;
20070 esac
20071 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
20072 shlibpath_overrides_runpath=no
20073 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
20074 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
20075 hardcode_into_libs=yes
20076 ;;
20077
20078# No shared lib support for Linux oldld, aout, or coff.
20079linux*oldld* | linux*aout* | linux*coff*)
20080 dynamic_linker=no
20081 ;;
20082
20083# This must be Linux ELF.
20084linux* | k*bsd*-gnu | kopensolaris*-gnu)
20085 version_type=linux
20086 need_lib_prefix=no
20087 need_version=no
20088 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20089 soname_spec='${libname}${release}${shared_ext}$major'
20090 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
20091 shlibpath_var=LD_LIBRARY_PATH
20092 shlibpath_overrides_runpath=no
20093
20094 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
20095 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
20096 $as_echo_n "(cached) " >&6
00020c16
ILT
20097else
20098 lt_cv_shlibpath_overrides_runpath=no
20099 save_LDFLAGS=$LDFLAGS
20100 save_libdir=$libdir
20101 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
20102 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
5213506e 20103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
20104/* end confdefs.h. */
20105
20106int
20107main ()
20108{
20109
da0f6381
PB
20110 ;
20111 return 0;
20112}
20113_ACEOF
5213506e
RW
20114if ac_fn_cxx_try_link "$LINENO"; then :
20115 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
00020c16
ILT
20116 lt_cv_shlibpath_overrides_runpath=yes
20117fi
da0f6381 20118fi
5213506e
RW
20119rm -f core conftest.err conftest.$ac_objext \
20120 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
20121 LDFLAGS=$save_LDFLAGS
20122 libdir=$save_libdir
da0f6381
PB
20123
20124fi
20125
00020c16 20126 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381 20127
00020c16
ILT
20128 # This implies no fast_install, which is unacceptable.
20129 # Some rework will be needed to allow for fast_install
20130 # before this can be enabled.
20131 hardcode_into_libs=yes
da0f6381 20132
00020c16
ILT
20133 # Append ld.so.conf contents to the search path
20134 if test -f /etc/ld.so.conf; then
43e02a8a 20135 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
00020c16
ILT
20136 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
20137 fi
da0f6381 20138
00020c16
ILT
20139 # We used to test for /lib/ld.so.1 and disable shared libraries on
20140 # powerpc, because MkLinux only supported shared libraries with the
20141 # GNU dynamic linker. Since this was broken with cross compilers,
20142 # most powerpc-linux boxes support dynamic linking these days and
20143 # people can always --disable-shared, the test was removed, and we
20144 # assume the GNU/Linux dynamic linker is in use.
20145 dynamic_linker='GNU/Linux ld.so'
20146 ;;
da0f6381 20147
00020c16
ILT
20148netbsd*)
20149 version_type=sunos
20150 need_lib_prefix=no
20151 need_version=no
20152 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20153 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20154 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20155 dynamic_linker='NetBSD (a.out) ld.so'
20156 else
20157 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20158 soname_spec='${libname}${release}${shared_ext}$major'
20159 dynamic_linker='NetBSD ld.elf_so'
20160 fi
20161 shlibpath_var=LD_LIBRARY_PATH
20162 shlibpath_overrides_runpath=yes
20163 hardcode_into_libs=yes
20164 ;;
da0f6381 20165
00020c16
ILT
20166newsos6)
20167 version_type=linux
20168 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20169 shlibpath_var=LD_LIBRARY_PATH
20170 shlibpath_overrides_runpath=yes
20171 ;;
da0f6381 20172
00020c16
ILT
20173*nto* | *qnx*)
20174 version_type=qnx
20175 need_lib_prefix=no
20176 need_version=no
20177 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20178 soname_spec='${libname}${release}${shared_ext}$major'
20179 shlibpath_var=LD_LIBRARY_PATH
20180 shlibpath_overrides_runpath=no
20181 hardcode_into_libs=yes
20182 dynamic_linker='ldqnx.so'
20183 ;;
da0f6381 20184
00020c16
ILT
20185openbsd*)
20186 version_type=sunos
20187 sys_lib_dlsearch_path_spec="/usr/lib"
20188 need_lib_prefix=no
20189 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
20190 case $host_os in
20191 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
20192 *) need_version=no ;;
da0f6381 20193 esac
00020c16
ILT
20194 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20195 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20196 shlibpath_var=LD_LIBRARY_PATH
20197 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
20198 case $host_os in
20199 openbsd2.[89] | openbsd2.[89].*)
20200 shlibpath_overrides_runpath=no
20201 ;;
20202 *)
20203 shlibpath_overrides_runpath=yes
20204 ;;
20205 esac
da0f6381 20206 else
00020c16 20207 shlibpath_overrides_runpath=yes
da0f6381 20208 fi
00020c16 20209 ;;
da0f6381 20210
00020c16
ILT
20211os2*)
20212 libname_spec='$name'
20213 shrext_cmds=".dll"
20214 need_lib_prefix=no
20215 library_names_spec='$libname${shared_ext} $libname.a'
20216 dynamic_linker='OS/2 ld.exe'
20217 shlibpath_var=LIBPATH
20218 ;;
da0f6381 20219
00020c16
ILT
20220osf3* | osf4* | osf5*)
20221 version_type=osf
20222 need_lib_prefix=no
20223 need_version=no
20224 soname_spec='${libname}${release}${shared_ext}$major'
20225 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20226 shlibpath_var=LD_LIBRARY_PATH
20227 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
20228 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
20229 ;;
da0f6381 20230
00020c16
ILT
20231rdos*)
20232 dynamic_linker=no
20233 ;;
da0f6381 20234
00020c16
ILT
20235solaris*)
20236 version_type=linux
20237 need_lib_prefix=no
20238 need_version=no
20239 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20240 soname_spec='${libname}${release}${shared_ext}$major'
20241 shlibpath_var=LD_LIBRARY_PATH
20242 shlibpath_overrides_runpath=yes
20243 hardcode_into_libs=yes
20244 # ldd complains unless libraries are executable
20245 postinstall_cmds='chmod +x $lib'
20246 ;;
da0f6381 20247
00020c16
ILT
20248sunos4*)
20249 version_type=sunos
20250 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20251 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
20252 shlibpath_var=LD_LIBRARY_PATH
20253 shlibpath_overrides_runpath=yes
20254 if test "$with_gnu_ld" = yes; then
20255 need_lib_prefix=no
20256 fi
20257 need_version=yes
20258 ;;
da0f6381 20259
00020c16
ILT
20260sysv4 | sysv4.3*)
20261 version_type=linux
20262 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20263 soname_spec='${libname}${release}${shared_ext}$major'
20264 shlibpath_var=LD_LIBRARY_PATH
20265 case $host_vendor in
20266 sni)
20267 shlibpath_overrides_runpath=no
20268 need_lib_prefix=no
20269 runpath_var=LD_RUN_PATH
20270 ;;
20271 siemens)
20272 need_lib_prefix=no
20273 ;;
20274 motorola)
20275 need_lib_prefix=no
20276 need_version=no
20277 shlibpath_overrides_runpath=no
20278 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
20279 ;;
20280 esac
20281 ;;
da0f6381 20282
00020c16
ILT
20283sysv4*MP*)
20284 if test -d /usr/nec ;then
20285 version_type=linux
20286 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
20287 soname_spec='$libname${shared_ext}.$major'
20288 shlibpath_var=LD_LIBRARY_PATH
20289 fi
20290 ;;
da0f6381 20291
00020c16
ILT
20292sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
20293 version_type=freebsd-elf
20294 need_lib_prefix=no
20295 need_version=no
20296 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
20297 soname_spec='${libname}${release}${shared_ext}$major'
20298 shlibpath_var=LD_LIBRARY_PATH
20299 shlibpath_overrides_runpath=yes
20300 hardcode_into_libs=yes
20301 if test "$with_gnu_ld" = yes; then
20302 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
da0f6381 20303 else
00020c16
ILT
20304 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
20305 case $host_os in
20306 sco3.2v5*)
20307 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
20308 ;;
da0f6381 20309 esac
da0f6381 20310 fi
00020c16
ILT
20311 sys_lib_dlsearch_path_spec='/usr/lib'
20312 ;;
da0f6381 20313
00020c16
ILT
20314tpf*)
20315 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
20316 version_type=linux
20317 need_lib_prefix=no
20318 need_version=no
20319 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20320 shlibpath_var=LD_LIBRARY_PATH
20321 shlibpath_overrides_runpath=no
20322 hardcode_into_libs=yes
20323 ;;
da0f6381 20324
00020c16
ILT
20325uts4*)
20326 version_type=linux
20327 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20328 soname_spec='${libname}${release}${shared_ext}$major'
20329 shlibpath_var=LD_LIBRARY_PATH
20330 ;;
da0f6381 20331
00020c16
ILT
20332*)
20333 dynamic_linker=no
20334 ;;
20335esac
5213506e
RW
20336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
20337$as_echo "$dynamic_linker" >&6; }
00020c16 20338test "$dynamic_linker" = no && can_build_shared=no
da0f6381 20339
00020c16
ILT
20340variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
20341if test "$GCC" = yes; then
20342 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
20343fi
da0f6381 20344
00020c16
ILT
20345if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
20346 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
20347fi
20348if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
20349 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
20350fi
da0f6381 20351
da0f6381 20352
da0f6381 20353
da0f6381 20354
da0f6381 20355
da0f6381
PB
20356
20357
da0f6381 20358
da0f6381 20359
da0f6381 20360
da0f6381
PB
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
da0f6381
PB
20378
20379
20380
20381
20382
20383
43e02a8a
RW
20384
20385
da0f6381
PB
20386
20387
20388
5213506e
RW
20389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
20390$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
00020c16
ILT
20391hardcode_action_CXX=
20392if test -n "$hardcode_libdir_flag_spec_CXX" ||
20393 test -n "$runpath_var_CXX" ||
20394 test "X$hardcode_automatic_CXX" = "Xyes" ; then
da0f6381 20395
00020c16
ILT
20396 # We can hardcode non-existent directories.
20397 if test "$hardcode_direct_CXX" != no &&
20398 # If the only mechanism to avoid hardcoding is shlibpath_var, we
20399 # have to relink, otherwise we might link with an installed library
20400 # when we should be linking with a yet-to-be-installed one
20401 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
20402 test "$hardcode_minus_L_CXX" != no; then
20403 # Linking always hardcodes the temporary library directory.
20404 hardcode_action_CXX=relink
20405 else
20406 # We can link without hardcoding, and we can hardcode nonexisting dirs.
20407 hardcode_action_CXX=immediate
20408 fi
20409else
20410 # We cannot hardcode anything, or else we can only hardcode existing
20411 # directories.
20412 hardcode_action_CXX=unsupported
20413fi
5213506e
RW
20414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
20415$as_echo "$hardcode_action_CXX" >&6; }
da0f6381 20416
00020c16
ILT
20417if test "$hardcode_action_CXX" = relink ||
20418 test "$inherit_rpath_CXX" = yes; then
20419 # Fast installation is not supported
20420 enable_fast_install=no
20421elif test "$shlibpath_overrides_runpath" = yes ||
20422 test "$enable_shared" = no; then
20423 # Fast installation is not necessary
20424 enable_fast_install=needless
20425fi
da0f6381 20426
da0f6381 20427
da0f6381 20428
da0f6381 20429
da0f6381 20430
da0f6381
PB
20431
20432
00020c16 20433 fi # test -n "$compiler"
da0f6381 20434
00020c16
ILT
20435 CC=$lt_save_CC
20436 LDCXX=$LD
20437 LD=$lt_save_LD
20438 GCC=$lt_save_GCC
20439 with_gnu_ld=$lt_save_with_gnu_ld
20440 lt_cv_path_LDCXX=$lt_cv_path_LD
20441 lt_cv_path_LD=$lt_save_path_LD
20442 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
20443 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
20444fi # test "$_lt_caught_CXX_error" != yes
da0f6381 20445
da0f6381
PB
20446ac_ext=c
20447ac_cpp='$CPP $CPPFLAGS'
20448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20450ac_compiler_gnu=$ac_cv_c_compiler_gnu
20451
da0f6381
PB
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467# Only expand once:
20468
20469
20470
20471
20472
20473# Identify the assembler which will work hand-in-glove with the newly
20474# built GCC, so that we can examine its features. This is the assembler
20475# which will be driven by the driver program.
20476#
20477# If build != host, and we aren't building gas in-tree, we identify a
20478# build->target assembler and hope that it will have the same features
20479# as the host->target assembler we'll be using.
20480gcc_cv_gas_major_version=
20481gcc_cv_gas_minor_version=
20482gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
20483
5213506e
RW
20484if test "${gcc_cv_as+set}" = set; then :
20485
da0f6381
PB
20486else
20487
20488if test -x "$DEFAULT_ASSEMBLER"; then
20489 gcc_cv_as="$DEFAULT_ASSEMBLER"
20490elif test -f $gcc_cv_as_gas_srcdir/configure.in \
20491 && test -f ../gas/Makefile \
20492 && test x$build = x$host; then
20493 gcc_cv_as=../gas/as-new$build_exeext
20494elif test -x as$build_exeext; then
20495 # Build using assembler in the current directory.
20496 gcc_cv_as=./as$build_exeext
20497elif test -x $AS_FOR_TARGET; then
20498 gcc_cv_as="$AS_FOR_TARGET"
20499else
20500 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
20501set dummy $AS_FOR_TARGET; ac_word=$2
5213506e
RW
20502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20503$as_echo_n "checking for $ac_word... " >&6; }
20504if test "${ac_cv_path_gcc_cv_as+set}" = set; then :
20505 $as_echo_n "(cached) " >&6
da0f6381
PB
20506else
20507 case $gcc_cv_as in
20508 [\\/]* | ?:[\\/]*)
20509 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
20510 ;;
20511 *)
20512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20513for as_dir in $PATH
20514do
20515 IFS=$as_save_IFS
20516 test -z "$as_dir" && as_dir=.
5213506e
RW
20517 for ac_exec_ext in '' $ac_executable_extensions; do
20518 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 20519 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
5213506e 20520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
20521 break 2
20522 fi
20523done
5213506e
RW
20524 done
20525IFS=$as_save_IFS
da0f6381
PB
20526
20527 ;;
20528esac
20529fi
20530gcc_cv_as=$ac_cv_path_gcc_cv_as
da0f6381 20531if test -n "$gcc_cv_as"; then
5213506e
RW
20532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20533$as_echo "$gcc_cv_as" >&6; }
da0f6381 20534else
5213506e
RW
20535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20536$as_echo "no" >&6; }
da0f6381
PB
20537fi
20538
5213506e 20539
da0f6381
PB
20540fi
20541fi
20542
da0f6381
PB
20543ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20544
20545case "$ORIGINAL_AS_FOR_TARGET" in
20546 ./as | ./as$build_exeext) ;;
5213506e 20547 *) ac_config_files="$ac_config_files as:exec-tool.in"
da0f6381
PB
20548 ;;
20549esac
20550
5213506e
RW
20551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5
20552$as_echo_n "checking what assembler to use... " >&6; }
da0f6381
PB
20553if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20554 # Single tree build which includes gas. We want to prefer it
20555 # over whatever linker top-level may have detected, since
20556 # we'll use what we're building after installation anyway.
5213506e
RW
20557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5
20558$as_echo "newly built gas" >&6; }
da0f6381
PB
20559 in_tree_gas=yes
20560 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20561for f in $gcc_cv_as_bfd_srcdir/configure \
20562 $gcc_cv_as_gas_srcdir/configure \
20563 $gcc_cv_as_gas_srcdir/configure.in \
20564 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20565 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20566 if test x$gcc_cv_gas_version != x; then
20567 break
20568 fi
20569done
20570gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20571gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20572gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20573case $gcc_cv_gas_patch_version in
20574 "") gcc_cv_gas_patch_version="0" ;;
20575esac
20576gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20577 + $gcc_cv_gas_minor_version \) \* 1000 \
20578 + $gcc_cv_gas_patch_version`
20579
20580 in_tree_gas_is_elf=no
20581 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20582 || (grep 'obj_format = multi' ../gas/Makefile \
20583 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20584 then
20585 in_tree_gas_is_elf=yes
20586 fi
20587else
5213506e
RW
20588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20589$as_echo "$gcc_cv_as" >&6; }
da0f6381
PB
20590 in_tree_gas=no
20591fi
20592
20593# Identify the linker which will work hand-in-glove with the newly
20594# built GCC, so that we can examine its features. This is the linker
20595# which will be driven by the driver program.
20596#
20597# If build != host, and we aren't building gas in-tree, we identify a
20598# build->target linker and hope that it will have the same features
20599# as the host->target linker we'll be using.
20600gcc_cv_gld_major_version=
20601gcc_cv_gld_minor_version=
20602gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20603gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20604
5213506e
RW
20605if test "${gcc_cv_ld+set}" = set; then :
20606
da0f6381
PB
20607else
20608
20609if test -x "$DEFAULT_LINKER"; then
20610 gcc_cv_ld="$DEFAULT_LINKER"
20611elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20612 && test -f ../ld/Makefile \
20613 && test x$build = x$host; then
20614 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20615elif test -x collect-ld$build_exeext; then
20616 # Build using linker in the current directory.
20617 gcc_cv_ld=./collect-ld$build_exeext
20618elif test -x $LD_FOR_TARGET; then
20619 gcc_cv_ld="$LD_FOR_TARGET"
20620else
20621 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20622set dummy $LD_FOR_TARGET; ac_word=$2
5213506e
RW
20623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20624$as_echo_n "checking for $ac_word... " >&6; }
20625if test "${ac_cv_path_gcc_cv_ld+set}" = set; then :
20626 $as_echo_n "(cached) " >&6
d739199a 20627else
e8b05380 20628 case $gcc_cv_ld in
d739199a 20629 [\\/]* | ?:[\\/]*)
e8b05380 20630 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20631 ;;
20632 *)
20633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20634for as_dir in $PATH
20635do
20636 IFS=$as_save_IFS
20637 test -z "$as_dir" && as_dir=.
5213506e
RW
20638 for ac_exec_ext in '' $ac_executable_extensions; do
20639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20640 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
5213506e 20641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20642 break 2
20643 fi
20644done
5213506e
RW
20645 done
20646IFS=$as_save_IFS
d739199a
DJ
20647
20648 ;;
20649esac
20650fi
e8b05380 20651gcc_cv_ld=$ac_cv_path_gcc_cv_ld
e8b05380 20652if test -n "$gcc_cv_ld"; then
5213506e
RW
20653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20654$as_echo "$gcc_cv_ld" >&6; }
d739199a 20655else
5213506e
RW
20656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20657$as_echo "no" >&6; }
d739199a
DJ
20658fi
20659
5213506e 20660
d739199a 20661fi
e8b05380
PB
20662fi
20663
5938f74d
L
20664ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
20665PLUGIN_LD=`basename $gcc_cv_ld`
20666
20667# Check whether --with-plugin-ld was given.
20668if test "${with_plugin_ld+set}" = set; then :
20669 withval=$with_plugin_ld; if test x"$withval" != x; then
20670 ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval"
20671 PLUGIN_LD="$withval"
20672 fi
20673fi
20674
20675
20676
20677cat >>confdefs.h <<_ACEOF
20678#define PLUGIN_LD "$PLUGIN_LD"
20679_ACEOF
20680
20681
1dcc82c2
DK
20682# Check to see if we are using gold instead of ld
20683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gold" >&5
20684$as_echo_n "checking whether we are using gold... " >&6; }
20685ld_is_gold=no
20686if test x$gcc_cv_ld != x; then
20687 if $gcc_cv_ld --version 2>/dev/null | sed 1q \
20688 | grep "GNU gold" > /dev/null; then
20689 ld_is_gold=yes
20690 fi
20691fi
20692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5
20693$as_echo "$ld_is_gold" >&6; }
20694
e8b05380
PB
20695ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20696
be0fe523
PB
20697case "$ORIGINAL_LD_FOR_TARGET" in
20698 ./collect-ld | ./collect-ld$build_exeext) ;;
5213506e 20699 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20700 ;;
20701esac
e8b05380 20702
5213506e
RW
20703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5
20704$as_echo_n "checking what linker to use... " >&6; }
e8b05380
PB
20705if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20706 # Single tree build which includes ld. We want to prefer it
20707 # over whatever linker top-level may have detected, since
20708 # we'll use what we're building after installation anyway.
5213506e
RW
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built ld" >&5
20710$as_echo "newly built ld" >&6; }
e8b05380
PB
20711 in_tree_ld=yes
20712 in_tree_ld_is_elf=no
20713 if (grep 'EMUL = .*elf' ../ld/Makefile \
20714 || grep 'EMUL = .*linux' ../ld/Makefile \
20715 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20716 in_tree_ld_is_elf=yes
20717 fi
20718 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
20719 do
20720 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20721 if test x$gcc_cv_gld_version != x; then
20722 break
20723 fi
20724 done
20725 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20726 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20727else
5213506e
RW
20728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20729$as_echo "$gcc_cv_ld" >&6; }
e8b05380
PB
20730 in_tree_ld=no
20731fi
20732
20733# Figure out what nm we will be using.
20734gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
5213506e
RW
20735if test "${gcc_cv_nm+set}" = set; then :
20736
e8b05380
PB
20737else
20738
20739if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20740 && test -f ../binutils/Makefile \
20741 && test x$build = x$host; then
e8b05380
PB
20742 gcc_cv_nm=../binutils/nm-new$build_exeext
20743elif test -x nm$build_exeext; then
20744 gcc_cv_nm=./nm$build_exeext
20745elif test -x $NM_FOR_TARGET; then
20746 gcc_cv_nm="$NM_FOR_TARGET"
20747else
20748 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20749set dummy $NM_FOR_TARGET; ac_word=$2
5213506e
RW
20750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20751$as_echo_n "checking for $ac_word... " >&6; }
20752if test "${ac_cv_path_gcc_cv_nm+set}" = set; then :
20753 $as_echo_n "(cached) " >&6
d739199a 20754else
e8b05380 20755 case $gcc_cv_nm in
d739199a 20756 [\\/]* | ?:[\\/]*)
e8b05380 20757 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20758 ;;
20759 *)
20760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20761for as_dir in $PATH
20762do
20763 IFS=$as_save_IFS
20764 test -z "$as_dir" && as_dir=.
5213506e
RW
20765 for ac_exec_ext in '' $ac_executable_extensions; do
20766 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20767 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
5213506e 20768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20769 break 2
20770 fi
20771done
5213506e
RW
20772 done
20773IFS=$as_save_IFS
d739199a
DJ
20774
20775 ;;
20776esac
20777fi
e8b05380 20778gcc_cv_nm=$ac_cv_path_gcc_cv_nm
e8b05380 20779if test -n "$gcc_cv_nm"; then
5213506e
RW
20780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20781$as_echo "$gcc_cv_nm" >&6; }
d739199a 20782else
5213506e
RW
20783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20784$as_echo "no" >&6; }
d739199a
DJ
20785fi
20786
5213506e 20787
d739199a 20788fi
e8b05380 20789fi
d739199a 20790
5213506e
RW
20791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what nm to use" >&5
20792$as_echo_n "checking what nm to use... " >&6; }
e8b05380
PB
20793if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20794 # Single tree build which includes binutils.
5213506e
RW
20795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built nm" >&5
20796$as_echo "newly built nm" >&6; }
e8b05380
PB
20797 in_tree_nm=yes
20798else
5213506e
RW
20799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20800$as_echo "$gcc_cv_nm" >&6; }
e8b05380
PB
20801 in_tree_nm=no
20802fi
20803
20804ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20805
be0fe523
PB
20806case "$ORIGINAL_NM_FOR_TARGET" in
20807 ./nm | ./nm$build_exeext) ;;
5213506e 20808 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20809 ;;
20810esac
20811
e8b05380
PB
20812
20813# Figure out what objdump we will be using.
5213506e
RW
20814if test "${gcc_cv_objdump+set}" = set; then :
20815
e8b05380
PB
20816else
20817
20818if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20819 && test -f ../binutils/Makefile \
20820 && test x$build = x$host; then
e8b05380
PB
20821 # Single tree build which includes binutils.
20822 gcc_cv_objdump=../binutils/objdump$build_exeext
20823elif test -x objdump$build_exeext; then
20824 gcc_cv_objdump=./objdump$build_exeext
20825elif test -x $OBJDUMP_FOR_TARGET; then
20826 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20827else
20828 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20829set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
5213506e
RW
20830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20831$as_echo_n "checking for $ac_word... " >&6; }
20832if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then :
20833 $as_echo_n "(cached) " >&6
9f18db39 20834else
e8b05380 20835 case $gcc_cv_objdump in
9f18db39 20836 [\\/]* | ?:[\\/]*)
e8b05380 20837 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20838 ;;
20839 *)
20840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20841for as_dir in $PATH
9f18db39
PB
20842do
20843 IFS=$as_save_IFS
20844 test -z "$as_dir" && as_dir=.
5213506e
RW
20845 for ac_exec_ext in '' $ac_executable_extensions; do
20846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20847 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
5213506e 20848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9f18db39
PB
20849 break 2
20850 fi
20851done
5213506e
RW
20852 done
20853IFS=$as_save_IFS
779243f7 20854
9f18db39
PB
20855 ;;
20856esac
20857fi
e8b05380 20858gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
e8b05380 20859if test -n "$gcc_cv_objdump"; then
5213506e
RW
20860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20861$as_echo "$gcc_cv_objdump" >&6; }
9f18db39 20862else
5213506e
RW
20863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20864$as_echo "no" >&6; }
9f18db39
PB
20865fi
20866
5213506e 20867
e8b05380
PB
20868fi
20869fi
9f18db39 20870
5213506e
RW
20871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what objdump to use" >&5
20872$as_echo_n "checking what objdump to use... " >&6; }
e8b05380
PB
20873if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20874 # Single tree build which includes binutils.
5213506e
RW
20875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built objdump" >&5
20876$as_echo "newly built objdump" >&6; }
e8b05380 20877elif test x$gcc_cv_objdump = x; then
5213506e
RW
20878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20879$as_echo "not found" >&6; }
e8b05380 20880else
5213506e
RW
20881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20882$as_echo "$gcc_cv_objdump" >&6; }
a2eafc76 20883fi
3cae5780 20884
6e97481b 20885# Figure out what readelf we will be using.
5213506e
RW
20886if test "${gcc_cv_readelf+set}" = set; then :
20887
6e97481b
JJ
20888else
20889
20890if test -f $gcc_cv_binutils_srcdir/configure.in \
20891 && test -f ../binutils/Makefile \
20892 && test x$build = x$host; then
20893 # Single tree build which includes binutils.
20894 gcc_cv_readelf=../binutils/readelf$build_exeext
20895elif test -x readelf$build_exeext; then
20896 gcc_cv_readelf=./readelf$build_exeext
20897else
20898 # Extract the first word of "readelf", so it can be a program name with args.
20899set dummy readelf; ac_word=$2
5213506e
RW
20900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20901$as_echo_n "checking for $ac_word... " >&6; }
20902if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then :
20903 $as_echo_n "(cached) " >&6
6e97481b
JJ
20904else
20905 case $gcc_cv_readelf in
20906 [\\/]* | ?:[\\/]*)
20907 ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path.
20908 ;;
20909 *)
20910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20911for as_dir in $PATH
20912do
20913 IFS=$as_save_IFS
20914 test -z "$as_dir" && as_dir=.
5213506e
RW
20915 for ac_exec_ext in '' $ac_executable_extensions; do
20916 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6e97481b 20917 ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
5213506e 20918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6e97481b
JJ
20919 break 2
20920 fi
20921done
5213506e
RW
20922 done
20923IFS=$as_save_IFS
6e97481b
JJ
20924
20925 ;;
20926esac
20927fi
20928gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
6e97481b 20929if test -n "$gcc_cv_readelf"; then
5213506e
RW
20930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20931$as_echo "$gcc_cv_readelf" >&6; }
6e97481b 20932else
5213506e
RW
20933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20934$as_echo "no" >&6; }
6e97481b
JJ
20935fi
20936
5213506e 20937
6e97481b
JJ
20938fi
20939fi
20940
5213506e
RW
20941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5
20942$as_echo_n "checking what readelf to use... " >&6; }
6e97481b
JJ
20943if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
20944 # Single tree build which includes binutils.
5213506e
RW
20945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" >&5
20946$as_echo "newly built readelf" >&6; }
6e97481b 20947elif test x$gcc_cv_readelf = x; then
5213506e
RW
20948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20949$as_echo "not found" >&6; }
6e97481b 20950else
5213506e
RW
20951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20952$as_echo "$gcc_cv_readelf" >&6; }
6e97481b
JJ
20953fi
20954
981d4858 20955# Figure out what assembler alignment features are present.
e0b0fd74
L
20956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5
20957$as_echo_n "checking assembler flags... " >&6; }
20958if test "${gcc_cv_as_flags+set}" = set; then :
20959 $as_echo_n "(cached) " >&6
20960else
20961 case "$target" in
20962 i[34567]86-*-linux*)
20963 gcc_cv_as_flags="--32"
20964 ;;
20965 *)
20966 gcc_cv_as_flags=" "
20967 ;;
20968 esac
20969fi
20970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_flags" >&5
20971$as_echo "$gcc_cv_as_flags" >&6; }
20972
5213506e
RW
20973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .balign and .p2align" >&5
20974$as_echo_n "checking assembler for .balign and .p2align... " >&6; }
20975if test "${gcc_cv_as_balign_and_p2align+set}" = set; then :
20976 $as_echo_n "(cached) " >&6
8ada417f
ZW
20977else
20978 gcc_cv_as_balign_and_p2align=no
20979 if test $in_tree_gas = yes; then
20980 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
20981 then gcc_cv_as_balign_and_p2align=yes
20982fi
20983 elif test x$gcc_cv_as != x; then
6e3f3080 20984 echo '.balign 4
8ada417f 20985.p2align 2' > conftest.s
e0b0fd74 20986 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 20987 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
20988 (eval $ac_try) 2>&5
20989 ac_status=$?
5213506e
RW
20990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20991 test $ac_status = 0; }; }
8ada417f
ZW
20992 then
20993 gcc_cv_as_balign_and_p2align=yes
20994 else
20995 echo "configure: failed program was" >&5
20996 cat conftest.s >&5
20997 fi
20998 rm -f conftest.o conftest.s
20999 fi
21000fi
5213506e
RW
21001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_balign_and_p2align" >&5
21002$as_echo "$gcc_cv_as_balign_and_p2align" >&6; }
63cf211a 21003if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2 21004
5213506e 21005$as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h
981d4858 21006
ad9c4d9f
NN
21007fi
21008
5213506e
RW
21009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5
21010$as_echo_n "checking assembler for .p2align with maximum skip... " >&6; }
21011if test "${gcc_cv_as_max_skip_p2align+set}" = set; then :
21012 $as_echo_n "(cached) " >&6
8ada417f
ZW
21013else
21014 gcc_cv_as_max_skip_p2align=no
21015 if test $in_tree_gas = yes; then
21016 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
21017 then gcc_cv_as_max_skip_p2align=yes
21018fi
21019 elif test x$gcc_cv_as != x; then
6e3f3080 21020 echo '.p2align 4,,7' > conftest.s
e0b0fd74 21021 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21022 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21023 (eval $ac_try) 2>&5
21024 ac_status=$?
5213506e
RW
21025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21026 test $ac_status = 0; }; }
8ada417f
ZW
21027 then
21028 gcc_cv_as_max_skip_p2align=yes
21029 else
21030 echo "configure: failed program was" >&5
21031 cat conftest.s >&5
21032 fi
21033 rm -f conftest.o conftest.s
21034 fi
ad9c4d9f 21035fi
5213506e
RW
21036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_max_skip_p2align" >&5
21037$as_echo "$gcc_cv_as_max_skip_p2align" >&6; }
63cf211a 21038if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2 21039
5213506e 21040$as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h
9e423e6d 21041
9e423e6d 21042fi
ad9c4d9f 21043
5213506e
RW
21044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5
21045$as_echo_n "checking assembler for .literal16... " >&6; }
21046if test "${gcc_cv_as_literal16+set}" = set; then :
21047 $as_echo_n "(cached) " >&6
5708d18d
MS
21048else
21049 gcc_cv_as_literal16=no
21050 if test $in_tree_gas = yes; then
21051 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
21052 then gcc_cv_as_literal16=yes
21053fi
21054 elif test x$gcc_cv_as != x; then
21055 echo '.literal16' > conftest.s
e0b0fd74 21056 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21057 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
5708d18d
MS
21058 (eval $ac_try) 2>&5
21059 ac_status=$?
5213506e
RW
21060 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21061 test $ac_status = 0; }; }
5708d18d
MS
21062 then
21063 gcc_cv_as_literal16=yes
21064 else
21065 echo "configure: failed program was" >&5
21066 cat conftest.s >&5
21067 fi
21068 rm -f conftest.o conftest.s
21069 fi
21070fi
5213506e
RW
21071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_literal16" >&5
21072$as_echo "$gcc_cv_as_literal16" >&6; }
5708d18d
MS
21073if test $gcc_cv_as_literal16 = yes; then
21074
5213506e 21075$as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h
5708d18d
MS
21076
21077fi
21078
5213506e
RW
21079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5
21080$as_echo_n "checking assembler for working .subsection -1... " >&6; }
21081if test "${gcc_cv_as_subsection_m1+set}" = set; then :
21082 $as_echo_n "(cached) " >&6
8ada417f
ZW
21083else
21084 gcc_cv_as_subsection_m1=no
21085 if test $in_tree_gas = yes; then
21086 if test $in_tree_gas_is_elf = yes \
21087 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
21088 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 21089fi
8ada417f 21090 elif test x$gcc_cv_as != x; then
6e3f3080 21091 echo 'conftest_label1: .word 0
d1accaa3
JJ
21092.subsection -1
21093conftest_label2: .word 0
8ada417f 21094.previous' > conftest.s
e0b0fd74 21095 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21096 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21097 (eval $ac_try) 2>&5
21098 ac_status=$?
5213506e
RW
21099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21100 test $ac_status = 0; }; }
8ada417f
ZW
21101 then
21102 if test x$gcc_cv_nm != x; then
21103 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
21104 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
21105 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
21106 then :
21107 else gcc_cv_as_subsection_m1=yes
21108 fi
21109 rm -f conftest.nm1 conftest.nm2
21110 fi
21111 else
21112 echo "configure: failed program was" >&5
21113 cat conftest.s >&5
21114 fi
21115 rm -f conftest.o conftest.s
21116 fi
981d4858 21117fi
5213506e
RW
21118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_subsection_m1" >&5
21119$as_echo "$gcc_cv_as_subsection_m1" >&6; }
63cf211a 21120if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2 21121
5213506e 21122$as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h
981d4858 21123
d1accaa3 21124fi
ad9c4d9f 21125
5213506e
RW
21126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5
21127$as_echo_n "checking assembler for .weak... " >&6; }
21128if test "${gcc_cv_as_weak+set}" = set; then :
21129 $as_echo_n "(cached) " >&6
8ada417f
ZW
21130else
21131 gcc_cv_as_weak=no
21132 if test $in_tree_gas = yes; then
21133 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
21134 then gcc_cv_as_weak=yes
ad9c4d9f 21135fi
8ada417f 21136 elif test x$gcc_cv_as != x; then
6e3f3080 21137 echo ' .weak foobar' > conftest.s
e0b0fd74 21138 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21139 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21140 (eval $ac_try) 2>&5
21141 ac_status=$?
5213506e
RW
21142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21143 test $ac_status = 0; }; }
8ada417f
ZW
21144 then
21145 gcc_cv_as_weak=yes
21146 else
21147 echo "configure: failed program was" >&5
21148 cat conftest.s >&5
21149 fi
21150 rm -f conftest.o conftest.s
21151 fi
981d4858 21152fi
5213506e
RW
21153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weak" >&5
21154$as_echo "$gcc_cv_as_weak" >&6; }
63cf211a 21155if test $gcc_cv_as_weak = yes; then
ba479fd2 21156
5213506e 21157$as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h
981d4858 21158
12822146 21159fi
ad9c4d9f 21160
5213506e
RW
21161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5
21162$as_echo_n "checking assembler for .weakref... " >&6; }
21163if test "${gcc_cv_as_weakref+set}" = set; then :
21164 $as_echo_n "(cached) " >&6
a0203ca7
AO
21165else
21166 gcc_cv_as_weakref=no
21167 if test $in_tree_gas = yes; then
21168 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
21169 then gcc_cv_as_weakref=yes
21170fi
21171 elif test x$gcc_cv_as != x; then
21172 echo ' .weakref foobar, barfnot' > conftest.s
e0b0fd74 21173 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21174 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a0203ca7
AO
21175 (eval $ac_try) 2>&5
21176 ac_status=$?
5213506e
RW
21177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21178 test $ac_status = 0; }; }
a0203ca7
AO
21179 then
21180 gcc_cv_as_weakref=yes
21181 else
21182 echo "configure: failed program was" >&5
21183 cat conftest.s >&5
21184 fi
21185 rm -f conftest.o conftest.s
21186 fi
21187fi
5213506e
RW
21188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weakref" >&5
21189$as_echo "$gcc_cv_as_weakref" >&6; }
a0203ca7
AO
21190if test $gcc_cv_as_weakref = yes; then
21191
5213506e 21192$as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h
a0203ca7
AO
21193
21194fi
21195
5213506e
RW
21196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5
21197$as_echo_n "checking assembler for .nsubspa comdat... " >&6; }
21198if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then :
21199 $as_echo_n "(cached) " >&6
e41f3691
JDA
21200else
21201 gcc_cv_as_nsubspa_comdat=no
21202 if test $in_tree_gas = yes; then
21203 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21204 then gcc_cv_as_nsubspa_comdat=yes
21205fi
21206 elif test x$gcc_cv_as != x; then
21207 echo ' .SPACE $TEXT$
21208 .NSUBSPA $CODE$,COMDAT' > conftest.s
e0b0fd74 21209 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21210 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e41f3691
JDA
21211 (eval $ac_try) 2>&5
21212 ac_status=$?
5213506e
RW
21213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21214 test $ac_status = 0; }; }
e41f3691
JDA
21215 then
21216 gcc_cv_as_nsubspa_comdat=yes
21217 else
21218 echo "configure: failed program was" >&5
21219 cat conftest.s >&5
21220 fi
21221 rm -f conftest.o conftest.s
21222 fi
21223fi
5213506e
RW
21224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_nsubspa_comdat" >&5
21225$as_echo "$gcc_cv_as_nsubspa_comdat" >&6; }
e41f3691
JDA
21226if test $gcc_cv_as_nsubspa_comdat = yes; then
21227
5213506e 21228$as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h
e41f3691
JDA
21229
21230fi
21231
8ada417f
ZW
21232# .hidden needs to be supported in both the assembler and the linker,
21233# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
21234# This is irritatingly difficult to feature test for; we have to check the
21235# date string after the version number. If we've got an in-tree
21236# ld, we don't know its patchlevel version, so we set the baseline at 2.13
21237# to be safe.
21238# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
5213506e
RW
21239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .hidden" >&5
21240$as_echo_n "checking assembler for .hidden... " >&6; }
21241if test "${gcc_cv_as_hidden+set}" = set; then :
21242 $as_echo_n "(cached) " >&6
8ada417f
ZW
21243else
21244 gcc_cv_as_hidden=no
21245 if test $in_tree_gas = yes; then
21246 if test $in_tree_gas_is_elf = yes \
21247 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
21248 then gcc_cv_as_hidden=yes
21249fi
21250 elif test x$gcc_cv_as != x; then
6e3f3080 21251 echo ' .hidden foobar
8ada417f 21252foobar:' > conftest.s
e0b0fd74 21253 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21254 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21255 (eval $ac_try) 2>&5
21256 ac_status=$?
5213506e
RW
21257 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21258 test $ac_status = 0; }; }
8ada417f 21259 then
ed104137
RO
21260
21261# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with
21262# STV_HIDDEN, so disable .hidden support if so.
21263case "${target}" in
21264 i?86-*-solaris2*)
21265 if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then
21266 cat > conftest.s <<EOF
21267.globl hidden
21268 .hidden hidden
21269hidden:
21270.globl default
21271 .set default,hidden
21272EOF
21273 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
21274 && $gcc_cv_objdump -t conftest.o 2>/dev/null | \
21275 grep '\.hidden default' > /dev/null; then
21276 gcc_cv_as_hidden=no
21277 else
21278 gcc_cv_as_hidden=yes
21279 fi
21280 else
21281 # Assume bug is present if objdump is missing.
21282 gcc_cv_as_hidden=no
21283 fi
21284 ;;
21285 *)
21286 gcc_cv_as_hidden=yes
21287 ;;
21288esac
8ada417f
ZW
21289 else
21290 echo "configure: failed program was" >&5
21291 cat conftest.s >&5
21292 fi
21293 rm -f conftest.o conftest.s
21294 fi
21295fi
5213506e
RW
21296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5
21297$as_echo "$gcc_cv_as_hidden" >&6; }
63cf211a 21298
ad9c4d9f 21299
10ca6198
JJ
21300if test $in_tree_ld != yes ; then
21301 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
1dcc82c2
DK
21302 if test x"$ld_is_gold" = xyes; then
21303 gcc_cv_ld_hidden=yes
21304 elif echo "$ld_ver" | grep GNU > /dev/null; then
10ca6198
JJ
21305 ld_vers=`echo $ld_ver | sed -n \
21306 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
21307 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'`
21308 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21309 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21310 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
55c4f715
RO
21311 else
21312 case "${target}" in
21313 *-*-solaris2*)
21314 #
21315 # Solaris 2 ld -V output looks like this for a regular version:
21316 #
21317 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
21318 #
21319 # but test versions add stuff at the end:
21320 #
21321 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
21322 #
21323 ld_ver=`$gcc_cv_ld -V 2>&1`
21324 if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
21325 ld_vers=`echo $ld_ver | sed -n \
21326 -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
21327 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21328 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21329 fi
21330 ;;
21331 esac
10ca6198
JJ
21332 fi
21333fi
21334
5213506e
RW
21335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .hidden support" >&5
21336$as_echo_n "checking linker for .hidden support... " >&6; }
21337if test "${gcc_cv_ld_hidden+set}" = set; then :
21338 $as_echo_n "(cached) " >&6
8ada417f
ZW
21339else
21340 if test $in_tree_ld = yes ; then
21341 gcc_cv_ld_hidden=no
21342 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 \
21343 && test $in_tree_ld_is_elf = yes; then
21344 gcc_cv_ld_hidden=yes
21345 fi
21346else
21347 gcc_cv_ld_hidden=yes
8ada417f 21348 if echo "$ld_ver" | grep GNU > /dev/null; then
8ada417f
ZW
21349 if test 0"$ld_date" -lt 20020404; then
21350 if test -n "$ld_date"; then
21351 # If there was date string, but was earlier than 2002-04-04, fail
21352 gcc_cv_ld_hidden=no
21353 elif test -z "$ld_vers"; then
21354 # If there was no date string nor ld version number, something is wrong
21355 gcc_cv_ld_hidden=no
21356 else
8ada417f
ZW
21357 test -z "$ld_vers_patch" && ld_vers_patch=0
21358 if test "$ld_vers_major" -lt 2; then
21359 gcc_cv_ld_hidden=no
21360 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
21361 gcc_cv_ld_hidden="no"
21362 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
21363 gcc_cv_ld_hidden=no
c72931a6 21364 fi
8ada417f 21365 fi
789b7de5 21366 fi
8ada417f 21367 else
28690784 21368 case "${target}" in
b0fd7d27 21369 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
21370 gcc_cv_ld_hidden=yes
21371 ;;
5e87dc23 21372 *-*-solaris2.9* | *-*-solaris2.1[0-9]*)
a93e1899
RO
21373 # Support for .hidden in Sun ld appeared in Solaris 9 FCS, but
21374 # .symbolic was only added in Solaris 9 12/02.
5e87dc23
RO
21375 gcc_cv_ld_hidden=yes
21376 ;;
28690784
JDA
21377 *)
21378 gcc_cv_ld_hidden=no
21379 ;;
21380 esac
8ada417f
ZW
21381 fi
21382fi
6d07784a 21383fi
5213506e
RW
21384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_hidden" >&5
21385$as_echo "$gcc_cv_ld_hidden" >&6; }
8ada417f 21386libgcc_visibility=no
ad9c4d9f 21387
232b67d9 21388
8e3940b2 21389if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 21390 libgcc_visibility=yes
ba479fd2 21391
5213506e 21392$as_echo "#define HAVE_GAS_HIDDEN 1" >>confdefs.h
ad9c4d9f
NN
21393
21394fi
21395
5213506e
RW
21396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker read-only and read-write section mixing" >&5
21397$as_echo_n "checking linker read-only and read-write section mixing... " >&6; }
e73da78e
RO
21398gcc_cv_ld_ro_rw_mix=unknown
21399if test $in_tree_ld = yes ; then
21400 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 \
21401 && test $in_tree_ld_is_elf = yes; then
21402 gcc_cv_ld_ro_rw_mix=read-write
21403 fi
21404elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
21405 echo '.section myfoosect, "a"' > conftest1.s
21406 echo '.section myfoosect, "aw"' > conftest2.s
21407 echo '.byte 1' >> conftest2.s
21408 echo '.section myfoosect, "a"' > conftest3.s
21409 echo '.byte 0' >> conftest3.s
21410 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
21411 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
21412 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
21413 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
21414 conftest2.o conftest3.o > /dev/null 2>&1; then
21415 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
21416 | sed -e '/myfoosect/!d' -e N`
21417 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
21418 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
21419 gcc_cv_ld_ro_rw_mix=read-only
21420 else
21421 gcc_cv_ld_ro_rw_mix=read-write
21422 fi
21423 fi
21424 fi
21425 rm -f conftest.* conftest[123].*
21426fi
21427if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
21428
5213506e 21429$as_echo "#define HAVE_LD_RO_RW_SECTION_MIXING 1" >>confdefs.h
e73da78e
RO
21430
21431fi
5213506e
RW
21432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5
21433$as_echo "$gcc_cv_ld_ro_rw_mix" >&6; }
e73da78e 21434
8ada417f 21435# Check if we have .[us]leb128, and support symbol arithmetic with it.
5213506e
RW
21436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .sleb128 and .uleb128" >&5
21437$as_echo_n "checking assembler for .sleb128 and .uleb128... " >&6; }
21438if test "${gcc_cv_as_leb128+set}" = set; then :
21439 $as_echo_n "(cached) " >&6
8ada417f
ZW
21440else
21441 gcc_cv_as_leb128=no
21442 if test $in_tree_gas = yes; then
21443 if test $in_tree_gas_is_elf = yes \
21444 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
21445 then gcc_cv_as_leb128=yes
21446fi
21447 elif test x$gcc_cv_as != x; then
6e3f3080 21448 echo ' .data
b7460f24
RH
21449 .uleb128 L2 - L1
21450L1:
21451 .uleb128 1280
21452 .sleb128 -1010
8ada417f 21453L2:' > conftest.s
e0b0fd74 21454 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21455 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21456 (eval $ac_try) 2>&5
21457 ac_status=$?
5213506e
RW
21458 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21459 test $ac_status = 0; }; }
8ada417f
ZW
21460 then
21461 # GAS versions before 2.11 do not support uleb128,
21462 # despite appearing to.
21463 # ??? There exists an elf-specific test that will crash
21464 # the assembler. Perhaps it's better to figure out whether
21465 # arbitrary sections are supported and try the test.
bace148a 21466 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 21467 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 21468 as_vers=`echo $as_ver | sed -n \
115e6e55 21469 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
21470 as_major=`expr "$as_vers" : '\([0-9]*\)'`
21471 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
21472 if test $as_major -eq 2 && test $as_minor -lt 11
21473 then :
21474 else gcc_cv_as_leb128=yes
21475 fi
21476 fi
21477 else
21478 echo "configure: failed program was" >&5
21479 cat conftest.s >&5
21480 fi
21481 rm -f conftest.o conftest.s
21482 fi
b7460f24 21483fi
5213506e
RW
21484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_leb128" >&5
21485$as_echo "$gcc_cv_as_leb128" >&6; }
63cf211a 21486if test $gcc_cv_as_leb128 = yes; then
ba479fd2 21487
5213506e 21488$as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h
b7460f24
RH
21489
21490fi
ad9c4d9f 21491
d4ea4622 21492# Check if we have assembler support for unwind directives.
5213506e
RW
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5
21494$as_echo_n "checking assembler for cfi directives... " >&6; }
21495if test "${gcc_cv_as_cfi_directive+set}" = set; then :
21496 $as_echo_n "(cached) " >&6
d4ea4622
RH
21497else
21498 gcc_cv_as_cfi_directive=no
6e60703f 21499 if test x$gcc_cv_as != x; then
d4ea4622
RH
21500 echo ' .text
21501 .cfi_startproc
21502 .cfi_offset 0, 0
21503 .cfi_same_value 1
21504 .cfi_def_cfa 1, 2
21505 .cfi_escape 1, 2, 3, 4, 5
21506 .cfi_endproc' > conftest.s
e0b0fd74 21507 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21508 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d4ea4622
RH
21509 (eval $ac_try) 2>&5
21510 ac_status=$?
5213506e
RW
21511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21512 test $ac_status = 0; }; }
d4ea4622 21513 then
e73da78e
RO
21514 case "$target" in
21515 *-*-solaris*)
21516 # If the linker used on Solaris (like Sun ld) isn't capable of merging
21517 # read-only and read-write sections, we need to make sure that the
21518 # assembler used emits read-write .eh_frame sections.
21519 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then
21520 if test "x$gcc_cv_objdump" != x; then
21521 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21522 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then
21523 gcc_cv_as_cfi_directive=no
21524 else
eb2573ee
RO
21525 case "$target" in
21526 i?86-*-solaris2.1[0-9]*)
21527 # On Solaris/x86, make sure that GCC and gas agree on using
21528 # read-only .eh_frame sections for 64-bit.
21529 if $gcc_cv_as --64 -o conftest.o conftest.s > /dev/null 2>&1 && \
21530 $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21531 sed -e /.eh_frame/!d -e N | \
21532 grep READONLY > /dev/null; then
21533 gcc_cv_as_cfi_directive=yes
21534 else
21535 gcc_cv_as_cfi_directive=no
21536 fi
21537 ;;
21538 *)
21539 gcc_cv_as_cfi_directive=yes
21540 ;;
21541 esac
e73da78e
RO
21542 fi
21543 else
21544 # no objdump, err on the side of caution
21545 gcc_cv_as_cfi_directive=no
21546 fi
21547 else
21548 gcc_cv_as_cfi_directive=yes
21549 fi
21550 ;;
21551 *-*-*)
21552 gcc_cv_as_cfi_directive=yes
21553 ;;
21554esac
d4ea4622
RH
21555 else
21556 echo "configure: failed program was" >&5
21557 cat conftest.s >&5
21558 fi
21559 rm -f conftest.o conftest.s
21560 fi
21561fi
5213506e
RW
21562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5
21563$as_echo "$gcc_cv_as_cfi_directive" >&6; }
d4ea4622 21564
6e97481b 21565if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_readelf != x; then
5213506e
RW
21566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5
21567$as_echo_n "checking assembler for working cfi advance... " >&6; }
21568if test "${gcc_cv_as_cfi_advance_working+set}" = set; then :
21569 $as_echo_n "(cached) " >&6
6e97481b
JJ
21570else
21571 gcc_cv_as_cfi_advance_working=no
21572 if test x$gcc_cv_as != x; then
21573 echo ' .text
21574 .cfi_startproc
21575 .cfi_adjust_cfa_offset 64
7ac22e17 21576 .skip 75040, 0
6e97481b
JJ
21577 .cfi_adjust_cfa_offset 128
21578 .cfi_endproc' > conftest.s
e0b0fd74 21579 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21580 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6e97481b
JJ
21581 (eval $ac_try) 2>&5
21582 ac_status=$?
5213506e
RW
21583 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21584 test $ac_status = 0; }; }
6e97481b
JJ
21585 then
21586
21587if $gcc_cv_readelf -wf conftest.o 2>/dev/null \
7ac22e17 21588 | grep 'DW_CFA_advance_loc[24]:[ ][ ]*75040[ ]' >/dev/null; then
6e97481b
JJ
21589 gcc_cv_as_cfi_advance_working=yes
21590fi
21591
21592 else
21593 echo "configure: failed program was" >&5
21594 cat conftest.s >&5
21595 fi
21596 rm -f conftest.o conftest.s
21597 fi
21598fi
5213506e
RW
21599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5
21600$as_echo "$gcc_cv_as_cfi_advance_working" >&6; }
6e97481b
JJ
21601
21602else
66f91112
EB
21603 # no readelf, err on the side of caution
21604 gcc_cv_as_cfi_advance_working=no
6e97481b 21605fi
d4ea4622
RH
21606
21607cat >>confdefs.h <<_ACEOF
6e97481b
JJ
21608#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \
21609 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`
d4ea4622
RH
21610_ACEOF
21611
21612
5213506e
RW
21613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi personality directive" >&5
21614$as_echo_n "checking assembler for cfi personality directive... " >&6; }
21615if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then :
21616 $as_echo_n "(cached) " >&6
058514b3
RH
21617else
21618 gcc_cv_as_cfi_personality_directive=no
6e60703f 21619 if test x$gcc_cv_as != x; then
058514b3 21620 echo ' .text
042628f9 21621 .cfi_startproc
058514b3
RH
21622 .cfi_personality 0, symbol
21623 .cfi_endproc' > conftest.s
e0b0fd74 21624 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21625 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
058514b3
RH
21626 (eval $ac_try) 2>&5
21627 ac_status=$?
5213506e
RW
21628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21629 test $ac_status = 0; }; }
058514b3
RH
21630 then
21631 gcc_cv_as_cfi_personality_directive=yes
21632 else
21633 echo "configure: failed program was" >&5
21634 cat conftest.s >&5
21635 fi
21636 rm -f conftest.o conftest.s
21637 fi
21638fi
5213506e
RW
21639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_personality_directive" >&5
21640$as_echo "$gcc_cv_as_cfi_personality_directive" >&6; }
058514b3
RH
21641
21642
21643cat >>confdefs.h <<_ACEOF
21644#define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
21645 then echo 1; else echo 0; fi`
21646_ACEOF
21647
21648
7d45fb94
JJ
21649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi sections directive" >&5
21650$as_echo_n "checking assembler for cfi sections directive... " >&6; }
21651if test "${gcc_cv_as_cfi_sections_directive+set}" = set; then :
21652 $as_echo_n "(cached) " >&6
21653else
21654 gcc_cv_as_cfi_sections_directive=no
21655 if test x$gcc_cv_as != x; then
21656 echo ' .text
21657 .cfi_sections .debug_frame, .eh_frame
21658 .cfi_startproc
21659 .cfi_endproc' > conftest.s
e0b0fd74 21660 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
7d45fb94
JJ
21661 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
21662 (eval $ac_try) 2>&5
21663 ac_status=$?
21664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21665 test $ac_status = 0; }; }
21666 then
21667 gcc_cv_as_cfi_sections_directive=yes
21668 else
21669 echo "configure: failed program was" >&5
21670 cat conftest.s >&5
21671 fi
21672 rm -f conftest.o conftest.s
21673 fi
21674fi
21675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_sections_directive" >&5
21676$as_echo "$gcc_cv_as_cfi_sections_directive" >&6; }
21677
21678
21679cat >>confdefs.h <<_ACEOF
21680#define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes;
21681 then echo 1; else echo 0; fi`
21682_ACEOF
21683
21684
8ada417f
ZW
21685# GAS versions up to and including 2.11.0 may mis-optimize
21686# .eh_frame data.
5213506e
RW
21687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for eh_frame optimization" >&5
21688$as_echo_n "checking assembler for eh_frame optimization... " >&6; }
21689if test "${gcc_cv_as_eh_frame+set}" = set; then :
21690 $as_echo_n "(cached) " >&6
8ada417f
ZW
21691else
21692 gcc_cv_as_eh_frame=no
21693 if test $in_tree_gas = yes; then
21694 if test $in_tree_gas_is_elf = yes \
21695 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21696 then gcc_cv_as_eh_frame=yes
ad9c4d9f 21697fi
8ada417f 21698 elif test x$gcc_cv_as != x; then
6e3f3080 21699 echo ' .text
c64688ae
RH
21700.LFB1:
21701 .4byte 0
21702.L1:
21703 .4byte 0
21704.LFE1:
21705 .section .eh_frame,"aw",@progbits
21706__FRAME_BEGIN__:
21707 .4byte .LECIE1-.LSCIE1
21708.LSCIE1:
21709 .4byte 0x0
21710 .byte 0x1
21711 .ascii "z\0"
21712 .byte 0x1
21713 .byte 0x78
21714 .byte 0x1a
21715 .byte 0x0
21716 .byte 0x4
21717 .4byte 1
21718 .p2align 1
21719.LECIE1:
21720.LSFDE1:
21721 .4byte .LEFDE1-.LASFDE1
21722.LASFDE1:
21723 .4byte .LASFDE1-__FRAME_BEGIN__
21724 .4byte .LFB1
21725 .4byte .LFE1-.LFB1
21726 .byte 0x4
21727 .4byte .LFE1-.LFB1
21728 .byte 0x4
21729 .4byte .L1-.LFB1
8ada417f 21730.LEFDE1:' > conftest.s
e0b0fd74 21731 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21732 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21733 (eval $ac_try) 2>&5
21734 ac_status=$?
5213506e
RW
21735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21736 test $ac_status = 0; }; }
8ada417f
ZW
21737 then
21738 cat > conftest.lit <<EOF
c64688ae
RH
21739 0000 10000000 00000000 017a0001 781a0004 .........z..x...
21740 0010 01000000 12000000 18000000 00000000 ................
093e61a6 21741 0020 08000000 04080000 0044 .........D
01efb963 21742EOF
ba479fd2 21743cat > conftest.big <<EOF
01efb963
AS
21744 0000 00000010 00000000 017a0001 781a0004 .........z..x...
21745 0010 00000001 00000012 00000018 00000000 ................
093e61a6 21746 0020 00000008 04000000 0844 .........D
c64688ae 21747EOF
8ada417f
ZW
21748 # If the assembler didn't choke, and we can objdump,
21749 # and we got the correct data, then succeed.
dbc02e7f
AS
21750 # The text in the here-document typically retains its unix-style line
21751 # endings, while the output of objdump will use host line endings.
21752 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
21753 if test x$gcc_cv_objdump != x \
21754 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
21755 | tail -3 > conftest.got \
dbc02e7f
AS
21756 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
21757 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
21758 then
21759 gcc_cv_as_eh_frame=yes
ba479fd2 21760 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
5213506e 21761 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21762 (eval $ac_try) 2>&5
21763 ac_status=$?
5213506e
RW
21764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21765 test $ac_status = 0; }; }; then
8ada417f
ZW
21766 gcc_cv_as_eh_frame=buggy
21767 else
21768 # Uh oh, what do we do now?
21769 gcc_cv_as_eh_frame=no
21770 fi
21771 else
21772 echo "configure: failed program was" >&5
21773 cat conftest.s >&5
21774 fi
21775 rm -f conftest.o conftest.s
21776 fi
c64688ae 21777fi
5213506e
RW
21778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_eh_frame" >&5
21779$as_echo "$gcc_cv_as_eh_frame" >&6; }
ad9c4d9f 21780
6e3f3080 21781
63cf211a 21782if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2 21783
5213506e 21784$as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h
ad9c4d9f
NN
21785
21786fi
21787
5213506e
RW
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21789$as_echo_n "checking assembler for section merging support... " >&6; }
21790if test "${gcc_cv_as_shf_merge+set}" = set; then :
21791 $as_echo_n "(cached) " >&6
8ada417f
ZW
21792else
21793 gcc_cv_as_shf_merge=no
21794 if test $in_tree_gas = yes; then
21795 if test $in_tree_gas_is_elf = yes \
21796 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21797 then gcc_cv_as_shf_merge=yes
21798fi
21799 elif test x$gcc_cv_as != x; then
6e3f3080 21800 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
e0b0fd74 21801 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21802 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21803 (eval $ac_try) 2>&5
21804 ac_status=$?
5213506e
RW
21805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21806 test $ac_status = 0; }; }
8ada417f
ZW
21807 then
21808 gcc_cv_as_shf_merge=yes
21809 else
21810 echo "configure: failed program was" >&5
21811 cat conftest.s >&5
21812 fi
21813 rm -f conftest.o conftest.s
21814 fi
201556f0 21815fi
5213506e
RW
21816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21817$as_echo "$gcc_cv_as_shf_merge" >&6; }
8ada417f 21818
c18a5b6c 21819if test $gcc_cv_as_shf_merge = no; then
5213506e
RW
21820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21821$as_echo_n "checking assembler for section merging support... " >&6; }
21822if test "${gcc_cv_as_shf_merge+set}" = set; then :
21823 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21824else
21825 gcc_cv_as_shf_merge=no
21826 if test $in_tree_gas = yes; then
21827 if test $in_tree_gas_is_elf = yes \
21828 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21829 then gcc_cv_as_shf_merge=yes
21830fi
21831 elif test x$gcc_cv_as != x; then
21832 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
e0b0fd74 21833 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21834 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21835 (eval $ac_try) 2>&5
21836 ac_status=$?
5213506e
RW
21837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21838 test $ac_status = 0; }; }
c18a5b6c
MM
21839 then
21840 gcc_cv_as_shf_merge=yes
21841 else
21842 echo "configure: failed program was" >&5
21843 cat conftest.s >&5
21844 fi
21845 rm -f conftest.o conftest.s
21846 fi
21847fi
5213506e
RW
21848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21849$as_echo "$gcc_cv_as_shf_merge" >&6; }
c18a5b6c
MM
21850
21851fi
8ad9fb33 21852
ba479fd2 21853cat >>confdefs.h <<_ACEOF
8ad9fb33 21854#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 21855_ACEOF
201556f0 21856
201556f0 21857
5213506e
RW
21858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21859$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21860if test "${gcc_cv_as_comdat_group+set}" = set; then :
21861 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21862else
21863 gcc_cv_as_comdat_group=no
21864 if test $in_tree_gas = yes; then
21865 if test $in_tree_gas_is_elf = yes \
11176d2a 21866 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21867 then gcc_cv_as_comdat_group=yes
21868fi
21869 elif test x$gcc_cv_as != x; then
21870 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
e0b0fd74 21871 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21872 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21873 (eval $ac_try) 2>&5
21874 ac_status=$?
5213506e
RW
21875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21876 test $ac_status = 0; }; }
c18a5b6c
MM
21877 then
21878 gcc_cv_as_comdat_group=yes
21879 else
21880 echo "configure: failed program was" >&5
21881 cat conftest.s >&5
21882 fi
21883 rm -f conftest.o conftest.s
21884 fi
21885fi
5213506e
RW
21886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5
21887$as_echo "$gcc_cv_as_comdat_group" >&6; }
c18a5b6c
MM
21888
21889if test $gcc_cv_as_comdat_group = yes; then
21890 gcc_cv_as_comdat_group_percent=no
21891else
5213506e
RW
21892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21893$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21894if test "${gcc_cv_as_comdat_group_percent+set}" = set; then :
21895 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21896else
21897 gcc_cv_as_comdat_group_percent=no
21898 if test $in_tree_gas = yes; then
21899 if test $in_tree_gas_is_elf = yes \
11176d2a 21900 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21901 then gcc_cv_as_comdat_group_percent=yes
21902fi
21903 elif test x$gcc_cv_as != x; then
21904 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
e0b0fd74 21905 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21906 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21907 (eval $ac_try) 2>&5
21908 ac_status=$?
5213506e
RW
21909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21910 test $ac_status = 0; }; }
c18a5b6c
MM
21911 then
21912 gcc_cv_as_comdat_group_percent=yes
21913 else
21914 echo "configure: failed program was" >&5
21915 cat conftest.s >&5
21916 fi
21917 rm -f conftest.o conftest.s
21918 fi
21919fi
5213506e
RW
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5
21921$as_echo "$gcc_cv_as_comdat_group_percent" >&6; }
c18a5b6c
MM
21922
21923fi
1dcc82c2
DK
21924if test x"$ld_is_gold" = xyes; then
21925 comdat_group=yes
21926elif test $in_tree_ld = yes ; then
39ba7b7d
JB
21927 comdat_group=no
21928 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 \
21929 && test $in_tree_ld_is_elf = yes; then
21930 comdat_group=yes
21931 fi
55c4f715 21932elif echo "$ld_ver" | grep GNU > /dev/null; then
11176d2a
JB
21933 comdat_group=yes
21934 if test 0"$ld_date" -lt 20050308; then
21935 if test -n "$ld_date"; then
21936 # If there was date string, but was earlier than 2005-03-08, fail
21937 comdat_group=no
21938 elif test "$ld_vers_major" -lt 2; then
21939 comdat_group=no
21940 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
21941 comdat_group=no
21942 fi
21943 fi
1cf0118d 21944else
55c4f715
RO
21945 case "${target}" in
21946 *-*-solaris2.1[1-9]*)
21947 # Sun ld has COMDAT group support since Solaris 9, but it doesn't
21948 # interoperate with GNU as until Solaris 11 build 130, i.e. ld
21949 # version 1.688.
21950 #
21951 # FIXME: Maybe need to refine later when COMDAT group support with
21952 # Sun as is implemented.
21953 if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 1688; then
21954 comdat_group=yes
21955 else
21956 comdat_group=no
21957 fi
21958 ;;
21959 *)
21960 # Assume linkers other than GNU ld don't support COMDAT group.
21961 comdat_group=no
21962 ;;
21963 esac
21964fi
21965# Allow overriding the automatic COMDAT group tests above.
21966# Check whether --enable-comdat was given.
21967if test "${enable_comdat+set}" = set; then :
21968 enableval=$enable_comdat; comdat_group="$enable_comdat"
1cf0118d 21969fi
55c4f715 21970
1cf0118d
RO
21971if test $comdat_group = no; then
21972 gcc_cv_as_comdat_group=no
21973 gcc_cv_as_comdat_group_percent=no
11176d2a 21974fi
c18a5b6c
MM
21975
21976cat >>confdefs.h <<_ACEOF
11176d2a 21977#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
21978_ACEOF
21979
21980
5213506e
RW
21981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for line table discriminator support" >&5
21982$as_echo_n "checking assembler for line table discriminator support... " >&6; }
21983if test "${gcc_cv_as_discriminator+set}" = set; then :
21984 $as_echo_n "(cached) " >&6
6c52e687
CC
21985else
21986 gcc_cv_as_discriminator=no
21987 if test $in_tree_gas = yes; then
21988 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 51`
21989 then gcc_cv_as_discriminator=yes
21990fi
21991 elif test x$gcc_cv_as != x; then
21992 echo ' .text
21993 .file 1 "conf.c"
21994 .loc 1 1 0 discriminator 1' > conftest.s
e0b0fd74 21995 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21996 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6c52e687
CC
21997 (eval $ac_try) 2>&5
21998 ac_status=$?
5213506e
RW
21999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22000 test $ac_status = 0; }; }
6c52e687
CC
22001 then
22002 gcc_cv_as_discriminator=yes
22003 else
22004 echo "configure: failed program was" >&5
22005 cat conftest.s >&5
22006 fi
22007 rm -f conftest.o conftest.s
22008 fi
22009fi
5213506e
RW
22010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_discriminator" >&5
22011$as_echo "$gcc_cv_as_discriminator" >&6; }
6c52e687
CC
22012if test $gcc_cv_as_discriminator = yes; then
22013
5213506e 22014$as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h
6c52e687
CC
22015
22016fi
22017
6a7a462c 22018# Thread-local storage - the check is heavily parameterized.
f996902d
RH
22019conftest_s=
22020tls_first_major=
22021tls_first_minor=
9739c90c 22022tls_as_opt=
f996902d 22023case "$target" in
6f9b006d
RH
22024 alpha*-*-*)
22025 conftest_s='
22026 .section ".tdata","awT",@progbits
22027foo: .long 25
22028 .text
22029 ldq $27,__tls_get_addr($29) !literal!1
22030 lda $16,foo($29) !tlsgd!1
22031 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
22032 ldq $27,__tls_get_addr($29) !literal!2
22033 lda $16,foo($29) !tlsldm!2
22034 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
22035 ldq $1,foo($29) !gotdtprel
22036 ldah $2,foo($29) !dtprelhi
22037 lda $3,foo($2) !dtprello
22038 lda $4,foo($29) !dtprel
22039 ldq $1,foo($29) !gottprel
22040 ldah $2,foo($29) !tprelhi
22041 lda $3,foo($2) !tprello
22042 lda $4,foo($29) !tprel'
22043 tls_first_major=2
22044 tls_first_minor=13
2f3321ca 22045 tls_as_opt=--fatal-warnings
6f9b006d 22046 ;;
ad9646c7
HPN
22047 cris-*-*|crisv32-*-*)
22048 conftest_s='
22049 .section ".tdata","awT",@progbits
22050x: .long 25
22051 .text
22052 move.d x:IE,$r10
22053 nop'
22054 tls_first_major=2
22055 tls_first_minor=20
22056 tls_as_opt=--fatal-warnings
22057 ;;
e4dd71de
AH
22058 frv*-*-*)
22059 conftest_s='
22060 .section ".tdata","awT",@progbits
22061x: .long 25
22062 .text
22063 call #gettlsoff(x)'
22064 tls_first_major=2
22065 tls_first_minor=14
22066 ;;
51076f96
RC
22067 hppa*-*-linux*)
22068 conftest_s='
22069t1: .reg %r20
22070t2: .reg %r21
22071gp: .reg %r19
22072 .section ".tdata","awT",@progbits
22073foo: .long 25
22074 .text
22075 .align 4
22076 addil LT%foo-$tls_gdidx$,gp
22077 ldo RT%foo-$tls_gdidx$(%r1),%arg0
22078 b __tls_get_addr
22079 nop
22080 addil LT%foo-$tls_ldidx$,gp
22081 b __tls_get_addr
22082 ldo RT%foo-$tls_ldidx$(%r1),%arg0
22083 addil LR%foo-$tls_dtpoff$,%ret0
22084 ldo RR%foo-$tls_dtpoff$(%r1),%t1
22085 mfctl %cr27,%t1
22086 addil LT%foo-$tls_ieoff$,gp
22087 ldw RT%foo-$tls_ieoff$(%r1),%t2
22088 add %t1,%t2,%t3
22089 mfctl %cr27,%t1
22090 addil LR%foo-$tls_leoff$,%t1
22091 ldo RR%foo-$tls_leoff$(%r1),%t2'
22092 tls_first_major=2
22093 tls_first_minor=15
22094 tls_as_opt=--fatal-warnings
22095 ;;
d3585b76
DJ
22096 arm*-*-*)
22097 conftest_s='
22098 .section ".tdata","awT",%progbits
22099foo: .long 25
22100 .text
22101.word foo(gottpoff)
22102.word foo(tpoff)
22103.word foo(tlsgd)
22104.word foo(tlsldm)
22105.word foo(tlsldo)'
22106 tls_first_major=2
22107 tls_first_minor=17
22108 ;;
f996902d 22109 i[34567]86-*-*)
f1c26cad 22110 case "$target" in
f1c26cad
RO
22111 i[34567]86-*-solaris2.*)
22112 on_solaris=yes
16c9d3b1 22113 tga_func=___tls_get_addr
f1c26cad
RO
22114 ;;
22115 *)
22116 on_solaris=no
22117 ;;
22118 esac
22119 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22120 conftest_s='
22121 .section .tdata,"awt",@progbits'
22122 tls_first_major=0
22123 tls_first_minor=0
22124
22125$as_echo "#define TLS_SECTION_ASM_FLAG 't'" >>confdefs.h
22126
22127 else
22128 conftest_s='
22129 .section ".tdata","awT",@progbits'
22130 tls_first_major=2
22131 tls_first_minor=14
22132 tls_as_opt="--fatal-warnings"
22133 fi
22134 conftest_s="$conftest_s
f996902d
RH
22135foo: .long 25
22136 .text
22137 movl %gs:0, %eax
f1c26cad
RO
22138 leal foo@tlsgd(,%ebx,1), %eax
22139 leal foo@tlsldm(%ebx), %eax
22140 leal foo@dtpoff(%eax), %edx
22141 movl foo@gottpoff(%ebx), %eax
22142 subl foo@gottpoff(%ebx), %eax
22143 addl foo@gotntpoff(%ebx), %eax
22144 movl foo@indntpoff, %eax
22145 movl \$foo@tpoff, %eax
22146 subl \$foo@tpoff, %eax
22147 leal foo@ntpoff(%ecx), %eax"
22148 ;;
75d38379
JJ
22149 x86_64-*-*)
22150 conftest_s='
22151 .section ".tdata","awT",@progbits
22152foo: .long 25
22153 .text
22154 movq %fs:0, %rax
22155 leaq foo@TLSGD(%rip), %rdi
22156 leaq foo@TLSLD(%rip), %rdi
22157 leaq foo@DTPOFF(%rax), %rdx
22158 movq foo@GOTTPOFF(%rip), %rax
22159 movq $foo@TPOFF, %rax'
22160 tls_first_major=2
22161 tls_first_minor=14
2f3321ca 22162 tls_as_opt=--fatal-warnings
f996902d 22163 ;;
7b6e506e
RH
22164 ia64-*-*)
22165 conftest_s='
22166 .section ".tdata","awT",@progbits
22167foo: data8 25
22168 .text
22169 addl r16 = @ltoff(@dtpmod(foo#)), gp
22170 addl r17 = @ltoff(@dtprel(foo#)), gp
22171 addl r18 = @ltoff(@tprel(foo#)), gp
22172 addl r19 = @dtprel(foo#), gp
22173 adds r21 = @dtprel(foo#), r13
22174 movl r23 = @dtprel(foo#)
22175 addl r20 = @tprel(foo#), gp
22176 adds r22 = @tprel(foo#), r13
22177 movl r24 = @tprel(foo#)'
22178 tls_first_major=2
22179 tls_first_minor=13
2f3321ca 22180 tls_as_opt=--fatal-warnings
7b6e506e 22181 ;;
69229b81
DJ
22182 mips*-*-*)
22183 conftest_s='
22184 .section .tdata,"awT",@progbits
22185x:
22186 .word 2
22187 .text
22188 addiu $4, $28, %tlsgd(x)
22189 addiu $4, $28, %tlsldm(x)
22190 lui $4, %dtprel_hi(x)
22191 addiu $4, $4, %dtprel_lo(x)
22192 lw $4, %gottprel(x)($28)
22193 lui $4, %tprel_hi(x)
22194 addiu $4, $4, %tprel_lo(x)'
22195 tls_first_major=2
22196 tls_first_minor=16
22197 tls_as_opt='-32 --fatal-warnings'
22198 ;;
75df395f
MK
22199 m68k-*-*)
22200 conftest_s='
22201 .section .tdata,"awT",@progbits
22202x:
22203 .word 2
22204 .text
22205foo:
22206 move.l x@TLSGD(%a5),%a0
22207 move.l x@TLSLDM(%a5),%a0
22208 move.l x@TLSLDO(%a5),%a0
22209 move.l x@TLSIE(%a5),%a0
22210 move.l x@TLSLE(%a5),%a0'
22211 tls_first_major=2
22212 tls_first_minor=19
22213 tls_as_opt='--fatal-warnings'
22214 ;;
c4501e62
JJ
22215 powerpc-*-*)
22216 conftest_s='
22217 .section ".tdata","awT",@progbits
22218 .align 2
22219ld0: .space 4
22220ld1: .space 4
22221x1: .space 4
22222x2: .space 4
22223x3: .space 4
22224 .text
22225 addi 3,31,ld0@got@tlsgd
22226 bl __tls_get_addr
22227 addi 3,31,x1@got@tlsld
22228 bl __tls_get_addr
22229 addi 9,3,x1@dtprel
22230 addis 9,3,x2@dtprel@ha
22231 addi 9,9,x2@dtprel@l
22232 lwz 9,x3@got@tprel(31)
22233 add 9,9,x@tls
22234 addi 9,2,x1@tprel
22235 addis 9,2,x2@tprel@ha
22236 addi 9,9,x2@tprel@l'
22237 tls_first_major=2
22238 tls_first_minor=14
2f3321ca 22239 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
22240 ;;
22241 powerpc64-*-*)
22242 conftest_s='
22243 .section ".tdata","awT",@progbits
22244 .align 3
22245ld0: .space 8
22246ld1: .space 8
22247x1: .space 8
22248x2: .space 8
22249x3: .space 8
22250 .text
22251 addi 3,2,ld0@got@tlsgd
22252 bl .__tls_get_addr
22253 nop
22254 addi 3,2,ld1@toc
22255 bl .__tls_get_addr
22256 nop
22257 addi 3,2,x1@got@tlsld
22258 bl .__tls_get_addr
22259 nop
22260 addi 9,3,x1@dtprel
22261 bl .__tls_get_addr
22262 nop
22263 addis 9,3,x2@dtprel@ha
22264 addi 9,9,x2@dtprel@l
22265 bl .__tls_get_addr
22266 nop
22267 ld 9,x3@got@dtprel(2)
22268 add 9,9,3
22269 bl .__tls_get_addr
22270 nop'
22271 tls_first_major=2
22272 tls_first_minor=14
2f3321ca 22273 tls_as_opt="-a64 --fatal-warnings"
c4501e62 22274 ;;
fd3cd001
UW
22275 s390-*-*)
22276 conftest_s='
22277 .section ".tdata","awT",@progbits
22278foo: .long 25
22279 .text
22280 .long foo@TLSGD
22281 .long foo@TLSLDM
22282 .long foo@DTPOFF
22283 .long foo@NTPOFF
22284 .long foo@GOTNTPOFF
22285 .long foo@INDNTPOFF
22286 l %r1,foo@GOTNTPOFF(%r12)
22287 l %r1,0(%r1):tls_load:foo
22288 bas %r14,0(%r1,%r13):tls_gdcall:foo
22289 bas %r14,0(%r1,%r13):tls_ldcall:foo'
22290 tls_first_major=2
22291 tls_first_minor=14
2f3321ca 22292 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
22293 ;;
22294 s390x-*-*)
22295 conftest_s='
22296 .section ".tdata","awT",@progbits
22297foo: .long 25
22298 .text
22299 .quad foo@TLSGD
22300 .quad foo@TLSLDM
22301 .quad foo@DTPOFF
22302 .quad foo@NTPOFF
22303 .quad foo@GOTNTPOFF
22304 lg %r1,foo@GOTNTPOFF(%r12)
22305 larl %r1,foo@INDNTPOFF
22306 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
22307 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
22308 tls_first_major=2
22309 tls_first_minor=14
2f3321ca 22310 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 22311 ;;
9ff13962
KK
22312 sh-*-* | sh[34]-*-*)
22313 conftest_s='
22314 .section ".tdata","awT",@progbits
22315foo: .long 25
22316 .text
22317 .long foo@TLSGD
22318 .long foo@TLSLDM
22319 .long foo@DTPOFF
22320 .long foo@GOTTPOFF
22321 .long foo@TPOFF'
22322 tls_first_major=2
22323 tls_first_minor=13
2f3321ca 22324 tls_as_opt=--fatal-warnings
9ff13962 22325 ;;
5751a10b 22326 sparc*-*-*)
2f3321ca
EB
22327 case "$target" in
22328 sparc*-sun-solaris2.*)
22329 on_solaris=yes
16c9d3b1 22330 tga_func=__tls_get_addr
2f3321ca
EB
22331 ;;
22332 *)
22333 on_solaris=no
22334 ;;
22335 esac
22336 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22337 conftest_s='
16c9d3b1 22338 .section ".tdata",#alloc,#write,#tls'
2f3321ca
EB
22339 tls_first_major=0
22340 tls_first_minor=0
22341 else
22342 conftest_s='
16c9d3b1
RO
22343 .section ".tdata","awT",@progbits'
22344 tls_first_major=2
22345 tls_first_minor=14
22346 tls_as_opt="-32 --fatal-warnings"
22347 fi
22348 conftest_s="$conftest_s
5751a10b
JJ
22349foo: .long 25
22350 .text
22351 sethi %tgd_hi22(foo), %o0
22352 add %o0, %tgd_lo10(foo), %o1
22353 add %l7, %o1, %o0, %tgd_add(foo)
22354 call __tls_get_addr, %tgd_call(foo)
22355 sethi %tldm_hi22(foo), %l1
22356 add %l1, %tldm_lo10(foo), %l2
22357 add %l7, %l2, %o0, %tldm_add(foo)
22358 call __tls_get_addr, %tldm_call(foo)
22359 sethi %tldo_hix22(foo), %l3
22360 xor %l3, %tldo_lox10(foo), %l4
22361 add %o0, %l4, %l5, %tldo_add(foo)
22362 sethi %tie_hi22(foo), %o3
22363 add %o3, %tie_lo10(foo), %o3
22364 ld [%l7 + %o3], %o2, %tie_ld(foo)
22365 add %g7, %o2, %o4, %tie_add(foo)
22366 sethi %tle_hix22(foo), %l1
22367 xor %l1, %tle_lox10(foo), %o5
16c9d3b1 22368 ld [%g7 + %o5], %o1"
5751a10b 22369 ;;
6a7a462c
BW
22370 xtensa*-*-*)
22371 conftest_s='
22372 .section ".tdata","awT",@progbits
22373foo: .long 25
22374 .text
22375 movi a8, foo@TLSFUNC
22376 movi a10, foo@TLSARG
22377 callx8.tls a8, foo@TLSCALL'
22378 tls_first_major=2
22379 tls_first_minor=19
22380 ;;
f996902d 22381esac
8dea1cca
DD
22382set_have_as_tls=no
22383if test "x$enable_tls" = xno ; then
22384 : # TLS explicitly disabled.
22385elif test "x$enable_tls" = xyes ; then
22386 set_have_as_tls=yes # TLS explicitly enabled.
22387elif test -z "$tls_first_major"; then
8ada417f
ZW
22388 : # If we don't have a check, assume no support.
22389else
5213506e
RW
22390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for thread-local storage support" >&5
22391$as_echo_n "checking assembler for thread-local storage support... " >&6; }
22392if test "${gcc_cv_as_tls+set}" = set; then :
22393 $as_echo_n "(cached) " >&6
8ada417f
ZW
22394else
22395 gcc_cv_as_tls=no
22396 if test $in_tree_gas = yes; then
22397 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
22398 then gcc_cv_as_tls=yes
ad9c4d9f 22399fi
8ada417f 22400 elif test x$gcc_cv_as != x; then
6e3f3080 22401 echo "$conftest_s" > conftest.s
e0b0fd74 22402 if { ac_try='$gcc_cv_as $gcc_cv_as_flags $tls_as_opt -o conftest.o conftest.s >&5'
5213506e 22403 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22404 (eval $ac_try) 2>&5
22405 ac_status=$?
5213506e
RW
22406 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22407 test $ac_status = 0; }; }
8ada417f
ZW
22408 then
22409 gcc_cv_as_tls=yes
22410 else
22411 echo "configure: failed program was" >&5
22412 cat conftest.s >&5
22413 fi
22414 rm -f conftest.o conftest.s
f996902d 22415 fi
f996902d 22416fi
5213506e
RW
22417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_tls" >&5
22418$as_echo "$gcc_cv_as_tls" >&6; }
63cf211a 22419if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
22420 set_have_as_tls=yes
22421fi
22422fi
16c9d3b1
RO
22423case "$target" in
22424 # TLS was introduced in the Solaris 9 FCS release and backported to
22425 # Solaris 8 patches. Support for GNU-style TLS on x86 was only
22426 # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun
22427 # ld and GCC don't support any longer.
22428 *-*-solaris2.*)
22429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker and ld.so.1 TLS support" >&5
22430$as_echo_n "checking linker and ld.so.1 TLS support... " >&6; }
22431 ld_tls_support=no
22432 # Check ld and ld.so.1 TLS support.
22433 if echo "$ld_ver" | grep GNU > /dev/null; then
22434 # Assume all interesting versions of GNU ld have TLS support.
22435 # FIXME: still need ld.so.1 support, i.e. ld version checks below.
22436 ld_tls_support=yes
22437 else
22438 case "$target" in
22439 # Solaris 8/x86 ld has GNU style TLS support since version 1.280.
22440 i?86-*-solaris2.8)
22441 min_tls_ld_vers_minor=280
22442 ;;
22443 # Solaris 8/SPARC ld has TLS support since version 1.272.
22444 sparc*-*-solaris2.8)
22445 min_tls_ld_vers_minor=272
22446 ;;
22447 # Solaris 9/x86 ld has GNU style TLS support since version 1.374.
22448 i?86-*-solaris2.9)
22449 min_tls_ld_vers_minor=374
22450 ;;
22451 # Solaris 9/SPARC and Solaris 10+ ld have TLS support since FCS.
22452 sparc*-*-solaris2.9 | *-*-solaris2.1[0-9]*)
22453 min_tls_ld_vers_minor=343
22454 ;;
22455 esac
22456 if test "$ls_vers_major" -gt 1 || \
22457 test "$ld_vers_minor" -ge "$min_tls_ld_vers_minor"; then
22458 ld_tls_support=yes
22459 else
22460 set_have_as_tls=no
22461 fi
22462 fi
22463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_tls_support" >&5
22464$as_echo "$ld_tls_support" >&6; }
22465
22466 save_LIBS="$LIBS"
22467 save_LDFLAGS="$LDFLAGS"
22468 LIBS=
22469 LDFLAGS=
22470
22471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alternate thread library" >&5
22472$as_echo_n "checking alternate thread library... " >&6; }
22473 case "$target" in
22474 # TLS support was backported to Solaris 8 patches, but only lives in
22475 # the alternate thread library which became the default in Solaris 9.
22476 # We want to always use that, irrespective of TLS support.
22477 *-*-solaris2.8)
22478 # Take multilib subdir into account. There's no spec to handle
22479 # this. The 64 symlink exists since Solaris 8.
22480 lwp_dir=/usr/lib/lwp
22481 lwp_spec="-L$lwp_dir%{m64:/64} -R$lwp_dir%{m64:/64}"
22482 LDFLAGS="-L$lwp_dir -R$lwp_dir"
22483 ;;
22484 *-*-solaris2*)
22485 lwp_dir="none"
22486 lwp_spec=""
22487 ;;
22488 esac
22489 # Always define LIB_THREAD_LDFLAGS_SPEC, even without TLS support.
22490
22491cat >>confdefs.h <<_ACEOF
22492#define LIB_THREAD_LDFLAGS_SPEC "$lwp_spec"
22493_ACEOF
22494
22495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lwp_dir" >&5
22496$as_echo "$lwp_dir" >&6; }
22497
22498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking library containing $tga_func" >&5
22499$as_echo_n "checking library containing $tga_func... " >&6; }
22500 # Before Solaris 10, __tls_get_addr (SPARC/x64) resp. ___tls_get_addr
22501 # (32-bit x86) only lived in libthread, so check for that. Keep
22502 # set_have_as_tls if found, disable if not.
22503 as_ac_Search=`$as_echo "ac_cv_search_$tga_func" | $as_tr_sh`
22504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tga_func" >&5
22505$as_echo_n "checking for library containing $tga_func... " >&6; }
22506if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22507 $as_echo_n "(cached) " >&6
22508else
22509 ac_func_search_save_LIBS=$LIBS
22510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22511/* end confdefs.h. */
22512
22513/* Override any GCC internal prototype to avoid an error.
22514 Use char because int might match the return type of a GCC
22515 builtin and then its argument prototype would still apply. */
22516#ifdef __cplusplus
22517extern "C"
22518#endif
22519char $tga_func ();
22520int
22521main ()
22522{
22523return $tga_func ();
22524 ;
22525 return 0;
22526}
22527_ACEOF
22528for ac_lib in '' thread; do
22529 if test -z "$ac_lib"; then
22530 ac_res="none required"
22531 else
22532 ac_res=-l$ac_lib
22533 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22534 fi
22535 if ac_fn_c_try_link "$LINENO"; then :
22536 eval "$as_ac_Search=\$ac_res"
22537fi
22538rm -f core conftest.err conftest.$ac_objext \
22539 conftest$ac_exeext
22540 if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22541 break
22542fi
22543done
22544if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22545
22546else
22547 eval "$as_ac_Search=no"
22548fi
22549rm conftest.$ac_ext
22550LIBS=$ac_func_search_save_LIBS
22551fi
22552eval ac_res=\$$as_ac_Search
22553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22554$as_echo "$ac_res" >&6; }
22555eval ac_res=\$$as_ac_Search
22556if test "$ac_res" != no; then :
22557 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22558
22559else
22560 set_have_as_tls=no
22561fi
22562
22563 # Clear LIBS if we cannot support TLS.
22564 if test $set_have_as_tls = no; then
22565 LIBS=
22566 fi
22567 # Always define LIB_TLS_SPEC, even without TLS support.
22568
22569cat >>confdefs.h <<_ACEOF
22570#define LIB_TLS_SPEC "$LIBS"
22571_ACEOF
22572
22573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBS" >&5
22574$as_echo "$LIBS" >&6; }
22575
22576 LIBS="$save_LIBS"
22577 LDFLAGS="$save_LDFLAGS"
22578 ;;
22579esac
8dea1cca 22580if test $set_have_as_tls = yes ; then
ba479fd2 22581
5213506e 22582$as_echo "#define HAVE_AS_TLS 1" >>confdefs.h
f996902d 22583
8ada417f
ZW
22584fi
22585
22586# Target-specific assembler checks.
f996902d 22587
5213506e
RW
22588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker -Bstatic/-Bdynamic option" >&5
22589$as_echo_n "checking linker -Bstatic/-Bdynamic option... " >&6; }
7e9d8517
L
22590gcc_cv_ld_static_dynamic=no
22591if test $in_tree_ld = yes ; then
83f0ccb8 22592 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
22593 gcc_cv_ld_static_dynamic=yes
22594 fi
22595elif test x$gcc_cv_ld != x; then
22596 # Check if linker supports -Bstatic/-Bdynamic option
22597 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
22598 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
22599 gcc_cv_ld_static_dynamic=yes
22600 fi
22601fi
22602if test x"$gcc_cv_ld_static_dynamic" = xyes; then
22603
5213506e 22604$as_echo "#define HAVE_LD_STATIC_DYNAMIC 1" >>confdefs.h
7e9d8517
L
22605
22606fi
5213506e
RW
22607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_static_dynamic" >&5
22608$as_echo "$gcc_cv_ld_static_dynamic" >&6; }
7e9d8517 22609
d594623a 22610if test x"$demangler_in_ld" = xyes; then
5213506e
RW
22611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --demangle support" >&5
22612$as_echo_n "checking linker --demangle support... " >&6; }
d594623a
L
22613 gcc_cv_ld_demangle=no
22614 if test $in_tree_ld = yes; then
22615 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 \
22616 gcc_cv_ld_demangle=yes
22617 fi
22618 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
22619 # Check if the GNU linker supports --demangle option
22620 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
22621 gcc_cv_ld_demangle=yes
22622 fi
22623 fi
22624 if test x"$gcc_cv_ld_demangle" = xyes; then
22625
5213506e 22626$as_echo "#define HAVE_LD_DEMANGLE 1" >>confdefs.h
d594623a
L
22627
22628 fi
5213506e
RW
22629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_demangle" >&5
22630$as_echo "$gcc_cv_ld_demangle" >&6; }
d594623a
L
22631fi
22632
3a37b08e
RH
22633case "$target" in
22634 # All TARGET_ABI_OSF targets.
22635 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
5213506e
RW
22636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
22637$as_echo_n "checking assembler for explicit relocation support... " >&6; }
22638if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then :
22639 $as_echo_n "(cached) " >&6
3a37b08e 22640else
8ada417f
ZW
22641 gcc_cv_as_alpha_explicit_relocs=no
22642 if test $in_tree_gas = yes; then
22643 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
22644 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 22645fi
8ada417f 22646 elif test x$gcc_cv_as != x; then
6e3f3080 22647 echo ' .set nomacro
3a37b08e
RH
22648 .text
22649 extbl $3, $2, $3 !lituse_bytoff!1
22650 ldq $2, a($29) !literal!1
22651 ldq $4, b($29) !literal!2
22652 ldq_u $3, 0($2) !lituse_base!1
22653 ldq $27, f($29) !literal!5
22654 jsr $26, ($27), f !lituse_jsr!5
22655 ldah $29, 0($26) !gpdisp!3
22656 lda $0, c($29) !gprel
22657 ldah $1, d($29) !gprelhigh
22658 lda $1, d($1) !gprellow
8ada417f 22659 lda $29, 0($29) !gpdisp!3' > conftest.s
e0b0fd74 22660 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22661 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22662 (eval $ac_try) 2>&5
22663 ac_status=$?
5213506e
RW
22664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22665 test $ac_status = 0; }; }
8ada417f
ZW
22666 then
22667 gcc_cv_as_alpha_explicit_relocs=yes
22668 else
22669 echo "configure: failed program was" >&5
22670 cat conftest.s >&5
22671 fi
22672 rm -f conftest.o conftest.s
22673 fi
cafe096b 22674fi
5213506e
RW
22675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_explicit_relocs" >&5
22676$as_echo "$gcc_cv_as_alpha_explicit_relocs" >&6; }
63cf211a 22677if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2 22678
5213506e 22679$as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h
3a37b08e 22680
d006f5eb 22681fi
5213506e
RW
22682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5
22683$as_echo_n "checking assembler for jsrdirect relocation support... " >&6; }
22684if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then :
22685 $as_echo_n "(cached) " >&6
d006f5eb
RH
22686else
22687 gcc_cv_as_alpha_jsrdirect_relocs=no
22688 if test $in_tree_gas = yes; then
22689 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
22690 then gcc_cv_as_alpha_jsrdirect_relocs=yes
22691fi
22692 elif test x$gcc_cv_as != x; then
22693 echo ' .set nomacro
22694 .text
22695 ldq $27, a($29) !literal!1
22696 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
e0b0fd74 22697 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22698 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d006f5eb
RH
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; }; }
d006f5eb
RH
22703 then
22704 gcc_cv_as_alpha_jsrdirect_relocs=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_alpha_jsrdirect_relocs" >&5
22713$as_echo "$gcc_cv_as_alpha_jsrdirect_relocs" >&6; }
d006f5eb
RH
22714if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
22715
5213506e 22716$as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h
d006f5eb 22717
86da66b5
HPN
22718fi
22719 ;;
22720
22721 cris-*-*)
5213506e
RW
22722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -no-mul-bug-abort option" >&5
22723$as_echo_n "checking assembler for -no-mul-bug-abort option... " >&6; }
22724if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then :
22725 $as_echo_n "(cached) " >&6
86da66b5
HPN
22726else
22727 gcc_cv_as_cris_no_mul_bug=no
22728 if test $in_tree_gas = yes; then
22729 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
22730 then gcc_cv_as_cris_no_mul_bug=yes
22731fi
22732 elif test x$gcc_cv_as != x; then
22733 echo '.text' > conftest.s
e0b0fd74 22734 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -no-mul-bug-abort -o conftest.o conftest.s >&5'
5213506e 22735 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
86da66b5
HPN
22736 (eval $ac_try) 2>&5
22737 ac_status=$?
5213506e
RW
22738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22739 test $ac_status = 0; }; }
86da66b5
HPN
22740 then
22741 gcc_cv_as_cris_no_mul_bug=yes
22742 else
22743 echo "configure: failed program was" >&5
22744 cat conftest.s >&5
22745 fi
22746 rm -f conftest.o conftest.s
22747 fi
22748fi
5213506e
RW
22749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cris_no_mul_bug" >&5
22750$as_echo "$gcc_cv_as_cris_no_mul_bug" >&6; }
86da66b5
HPN
22751if test $gcc_cv_as_cris_no_mul_bug = yes; then
22752
5213506e 22753$as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h
86da66b5 22754
8ada417f 22755fi
3a37b08e 22756 ;;
8ada417f 22757
1cb36a98 22758 sparc*-*-*)
5213506e
RW
22759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .register" >&5
22760$as_echo_n "checking assembler for .register... " >&6; }
22761if test "${gcc_cv_as_sparc_register_op+set}" = set; then :
22762 $as_echo_n "(cached) " >&6
5b68c389 22763else
8ada417f
ZW
22764 gcc_cv_as_sparc_register_op=no
22765 if test x$gcc_cv_as != x; then
6e3f3080 22766 echo '.register %g2, #scratch' > conftest.s
e0b0fd74 22767 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22768 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22769 (eval $ac_try) 2>&5
22770 ac_status=$?
5213506e
RW
22771 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22772 test $ac_status = 0; }; }
8ada417f
ZW
22773 then
22774 gcc_cv_as_sparc_register_op=yes
22775 else
22776 echo "configure: failed program was" >&5
22777 cat conftest.s >&5
22778 fi
22779 rm -f conftest.o conftest.s
22780 fi
cafe096b 22781fi
5213506e
RW
22782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_register_op" >&5
22783$as_echo "$gcc_cv_as_sparc_register_op" >&6; }
63cf211a 22784if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2 22785
5213506e 22786$as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
1cb36a98 22787
8ada417f 22788fi
1cb36a98 22789
5213506e
RW
22790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5
22791$as_echo_n "checking assembler for -relax option... " >&6; }
22792if test "${gcc_cv_as_sparc_relax+set}" = set; then :
22793 $as_echo_n "(cached) " >&6
e95b1e6a 22794else
8ada417f
ZW
22795 gcc_cv_as_sparc_relax=no
22796 if test x$gcc_cv_as != x; then
6e3f3080 22797 echo '.text' > conftest.s
e0b0fd74 22798 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -relax -o conftest.o conftest.s >&5'
5213506e 22799 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22800 (eval $ac_try) 2>&5
22801 ac_status=$?
5213506e
RW
22802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22803 test $ac_status = 0; }; }
8ada417f
ZW
22804 then
22805 gcc_cv_as_sparc_relax=yes
22806 else
22807 echo "configure: failed program was" >&5
22808 cat conftest.s >&5
22809 fi
22810 rm -f conftest.o conftest.s
22811 fi
cafe096b 22812fi
5213506e
RW
22813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_relax" >&5
22814$as_echo "$gcc_cv_as_sparc_relax" >&6; }
63cf211a 22815if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2 22816
5213506e 22817$as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h
e95b1e6a 22818
878ee0ab
DM
22819fi
22820
22821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5
22822$as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; }
22823if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then :
22824 $as_echo_n "(cached) " >&6
22825else
22826 gcc_cv_as_sparc_gotdata_op=no
22827 if test x$gcc_cv_as != x; then
22828 echo '.text
22829foo:
22830 nop
22831bar:
22832 sethi %gdop_hix22(foo), %g1
22833 xor %g1, %gdop_lox10(foo), %g1
22834 ld [%l7 + %g1], %g2, %gdop(foo)' > conftest.s
22835 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
22836 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
22837 (eval $ac_try) 2>&5
22838 ac_status=$?
22839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22840 test $ac_status = 0; }; }
22841 then
22842 if test x$gcc_cv_ld != x \
46bc665f
DM
22843 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22844 if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then
22845 if test x$gcc_cv_objdump != x; then
22846 if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \
22847 | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then
22848 gcc_cv_as_sparc_gotdata_op=no
22849 else
22850 gcc_cv_as_sparc_gotdata_op=yes
22851 fi
22852 fi
22853 else
22854 gcc_cv_as_sparc_gotdata_op=yes
22855 fi
878ee0ab
DM
22856 fi
22857 rm -f conftest
22858 else
22859 echo "configure: failed program was" >&5
22860 cat conftest.s >&5
22861 fi
22862 rm -f conftest.o conftest.s
22863 fi
22864fi
22865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_gotdata_op" >&5
22866$as_echo "$gcc_cv_as_sparc_gotdata_op" >&6; }
22867if test $gcc_cv_as_sparc_gotdata_op = yes; then
22868
22869$as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h
22870
8ada417f 22871fi
e95b1e6a 22872
5213506e
RW
22873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5
22874$as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; }
22875if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then :
22876 $as_echo_n "(cached) " >&6
17e9e88c 22877else
8ada417f
ZW
22878 gcc_cv_as_sparc_ua_pcrel=no
22879 if test x$gcc_cv_as != x; then
6e3f3080 22880 echo '.text
8ada417f
ZW
22881foo:
22882 nop
22883.data
22884.align 4
22885.byte 0
22886.uaword %r_disp32(foo)' > conftest.s
e0b0fd74 22887 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
5213506e 22888 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22889 (eval $ac_try) 2>&5
22890 ac_status=$?
5213506e
RW
22891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22892 test $ac_status = 0; }; }
8ada417f
ZW
22893 then
22894 if test x$gcc_cv_ld != x \
22895 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22896 gcc_cv_as_sparc_ua_pcrel=yes
22897 fi
22898 rm -f conftest
22899 else
22900 echo "configure: failed program was" >&5
22901 cat conftest.s >&5
22902 fi
22903 rm -f conftest.o conftest.s
22904 fi
cafe096b 22905fi
5213506e
RW
22906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel" >&5
22907$as_echo "$gcc_cv_as_sparc_ua_pcrel" >&6; }
63cf211a 22908if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2 22909
5213506e 22910$as_echo "#define HAVE_AS_SPARC_UA_PCREL 1" >>confdefs.h
17e9e88c 22911
17e9e88c 22912
5213506e
RW
22913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
22914$as_echo_n "checking assembler for unaligned pcrel relocs against hidden symbols... " >&6; }
22915if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then :
22916 $as_echo_n "(cached) " >&6
cf7b8b0d 22917else
8ada417f
ZW
22918 gcc_cv_as_sparc_ua_pcrel_hidden=no
22919 if test x$gcc_cv_as != x; then
6e3f3080 22920 echo '.data
8ada417f
ZW
22921.align 4
22922.byte 0x31
22923.uaword %r_disp32(foo)
22924.byte 0x32, 0x33, 0x34
22925.global foo
22926.hidden foo
22927foo:
22928.skip 4' > conftest.s
e0b0fd74 22929 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
5213506e 22930 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22931 (eval $ac_try) 2>&5
22932 ac_status=$?
5213506e
RW
22933 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22934 test $ac_status = 0; }; }
8ada417f
ZW
22935 then
22936 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
22937 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
22938 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
22939 | grep ' 31000000 07323334' > /dev/null 2>&1; then
22940 if $gcc_cv_objdump -R conftest 2> /dev/null \
22941 | grep 'DISP32' > /dev/null 2>&1; then
22942 :
22943 else
22944 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 22945 fi
8ada417f
ZW
22946 fi
22947 rm -f conftest
22948 else
22949 echo "configure: failed program was" >&5
22950 cat conftest.s >&5
22951 fi
22952 rm -f conftest.o conftest.s
22953 fi
cafe096b 22954fi
5213506e
RW
22955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
22956$as_echo "$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; }
63cf211a 22957if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2 22958
5213506e 22959$as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h
cf7b8b0d 22960
8ada417f 22961fi
ba479fd2 22962
8ada417f 22963fi # unaligned pcrel relocs
cf7b8b0d 22964
5213506e
RW
22965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5
22966$as_echo_n "checking assembler for offsetable %lo()... " >&6; }
22967if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then :
22968 $as_echo_n "(cached) " >&6
5b68c389 22969else
8ada417f
ZW
22970 gcc_cv_as_sparc_offsetable_lo10=no
22971 if test x$gcc_cv_as != x; then
6e3f3080 22972 echo '.text
8ada417f
ZW
22973 or %g1, %lo(ab) + 12, %g1
22974 or %g1, %lo(ab + 12), %g1' > conftest.s
e0b0fd74 22975 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xarch=v9 -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 if test x$gcc_cv_objdump != x \
ecb0ccbc 22983 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 22984 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 22985 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
22986 fi
22987 else
22988 echo "configure: failed program was" >&5
22989 cat conftest.s >&5
22990 fi
22991 rm -f conftest.o conftest.s
22992 fi
cafe096b 22993fi
5213506e
RW
22994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
22995$as_echo "$gcc_cv_as_sparc_offsetable_lo10" >&6; }
63cf211a 22996if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2 22997
5213506e 22998$as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h
1cb36a98 22999
8ada417f 23000fi
1cb36a98
RH
23001 ;;
23002
c307e6dd 23003 i[34567]86-*-* | x86_64-*-*)
f7e413e2
DK
23004 case $target_os in
23005 cygwin*)
23006 # Full C++ conformance when using a shared libstdc++-v3 requires some
23007 # support from the Cygwin DLL, which in more recent versions exports
23008 # wrappers to aid in interposing and redirecting operators new, delete,
23009 # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we
23010 # are configuring for a version of Cygwin that exports the wrappers.
23011 if test x$host = x$target; then
23012 ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj"
23013if test "x$ac_cv_func___wrap__Znaj" = x""yes; then :
23014 gcc_ac_cygwin_dll_wrappers=yes
23015else
23016 gcc_ac_cygwin_dll_wrappers=no
23017fi
23018
23019 else
23020 # Can't check presence of libc functions during cross-compile, so
23021 # we just have to assume we're building for an up-to-date target.
23022 gcc_ac_cygwin_dll_wrappers=yes
23023 fi
23024
23025cat >>confdefs.h <<_ACEOF
23026#define USE_CYGWIN_LIBSTDCXX_WRAPPERS `if test $gcc_ac_cygwin_dll_wrappers = yes; then echo 1; else echo 0; fi`
23027_ACEOF
23028
23029 esac
d38bc601
BF
23030 case $target_os in
23031 cygwin* | pe | mingw32*)
233215fe
DK
23032 # Recent binutils allows the three-operand form of ".comm" on PE. This
23033 # definition is used unconditionally to initialise the default state of
23034 # the target option variable that governs usage of the feature.
5213506e
RW
23035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .comm with alignment" >&5
23036$as_echo_n "checking assembler for .comm with alignment... " >&6; }
23037if test "${gcc_cv_as_comm_has_align+set}" = set; then :
23038 $as_echo_n "(cached) " >&6
233215fe
DK
23039else
23040 gcc_cv_as_comm_has_align=no
23041 if test $in_tree_gas = yes; then
23042 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
23043 then gcc_cv_as_comm_has_align=yes
23044fi
23045 elif test x$gcc_cv_as != x; then
23046 echo '.comm foo,1,32' > conftest.s
e0b0fd74 23047 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23048 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
233215fe
DK
23049 (eval $ac_try) 2>&5
23050 ac_status=$?
5213506e
RW
23051 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23052 test $ac_status = 0; }; }
233215fe
DK
23053 then
23054 gcc_cv_as_comm_has_align=yes
23055 else
23056 echo "configure: failed program was" >&5
23057 cat conftest.s >&5
23058 fi
23059 rm -f conftest.o conftest.s
23060 fi
23061fi
5213506e
RW
23062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comm_has_align" >&5
23063$as_echo "$gcc_cv_as_comm_has_align" >&6; }
233215fe
DK
23064
23065
23066cat >>confdefs.h <<_ACEOF
23067#define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi`
23068_ACEOF
23069
d38bc601 23070 # Used for DWARF 2 in PE
5213506e
RW
23071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .secrel32 relocs" >&5
23072$as_echo_n "checking assembler for .secrel32 relocs... " >&6; }
23073if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then :
23074 $as_echo_n "(cached) " >&6
d38bc601
BF
23075else
23076 gcc_cv_as_ix86_pe_secrel32=no
23077 if test $in_tree_gas = yes; then
23078 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
23079 then gcc_cv_as_ix86_pe_secrel32=yes
23080fi
23081 elif test x$gcc_cv_as != x; then
23082 echo '.text
23083foo: nop
23084.data
23085 .secrel32 foo' > conftest.s
e0b0fd74 23086 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23087 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d38bc601
BF
23088 (eval $ac_try) 2>&5
23089 ac_status=$?
5213506e
RW
23090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23091 test $ac_status = 0; }; }
d38bc601
BF
23092 then
23093 if test x$gcc_cv_ld != x \
23094 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
23095 gcc_cv_as_ix86_pe_secrel32=yes
23096 fi
23097 rm -f conftest
23098 else
23099 echo "configure: failed program was" >&5
23100 cat conftest.s >&5
23101 fi
23102 rm -f conftest.o conftest.s
23103 fi
23104fi
5213506e
RW
23105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_pe_secrel32" >&5
23106$as_echo "$gcc_cv_as_ix86_pe_secrel32" >&6; }
d38bc601
BF
23107if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
23108
5213506e 23109$as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h
d38bc601
BF
23110
23111fi
3bec79c5
DK
23112 # Test if the assembler supports the extended form of the .section
23113 # directive that specifies section alignment. LTO support uses this,
23114 # but normally only after installation, so we warn but don't fail the
23115 # configure if LTO is enabled but the assembler does not support it.
23116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with alignment" >&5
23117$as_echo_n "checking assembler for .section with alignment... " >&6; }
23118if test "${gcc_cv_as_section_has_align+set}" = set; then :
23119 $as_echo_n "(cached) " >&6
23120else
23121 gcc_cv_as_section_has_align=no
23122 if test $in_tree_gas = yes; then
23123 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 1`
23124 then gcc_cv_as_section_has_align=yes
23125fi
23126 elif test x$gcc_cv_as != x; then
23127 echo '.section lto_test,"dr0"' > conftest.s
23128 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -fatal-warnings -o conftest.o conftest.s >&5'
23129 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23130 (eval $ac_try) 2>&5
23131 ac_status=$?
23132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23133 test $ac_status = 0; }; }
23134 then
23135 gcc_cv_as_section_has_align=yes
23136 else
23137 echo "configure: failed program was" >&5
23138 cat conftest.s >&5
23139 fi
23140 rm -f conftest.o conftest.s
23141 fi
23142fi
23143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5
23144$as_echo "$gcc_cv_as_section_has_align" >&6; }
23145
23146 if test x$gcc_cv_as_section_has_align != xyes; then
23147 case ",$enable_languages," in
23148 *,lto,*)
23149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: LTO for $target requires binutils >= 2.20.1, but version found appears insufficient; LTO will not work until binutils is upgraded." >&5
23150$as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but version found appears insufficient; LTO will not work until binutils is upgraded." >&2;}
23151 ;;
23152 esac
23153 fi
d38bc601
BF
23154 ;;
23155 esac
23156
5213506e
RW
23157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5
23158$as_echo_n "checking assembler for filds and fists mnemonics... " >&6; }
23159if test "${gcc_cv_as_ix86_filds+set}" = set; then :
23160 $as_echo_n "(cached) " >&6
8ada417f 23161else
a3a5e3d1
UB
23162 gcc_cv_as_ix86_filds=no
23163 if test x$gcc_cv_as != x; then
6e3f3080 23164 echo 'filds mem; fists mem' > conftest.s
e0b0fd74 23165 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23166 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23167 (eval $ac_try) 2>&5
23168 ac_status=$?
5213506e
RW
23169 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23170 test $ac_status = 0; }; }
8ada417f 23171 then
a3a5e3d1
UB
23172 gcc_cv_as_ix86_filds=yes
23173 else
23174 echo "configure: failed program was" >&5
23175 cat conftest.s >&5
23176 fi
23177 rm -f conftest.o conftest.s
23178 fi
23179fi
5213506e
RW
23180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_filds" >&5
23181$as_echo "$gcc_cv_as_ix86_filds" >&6; }
a3a5e3d1
UB
23182if test $gcc_cv_as_ix86_filds = yes; then
23183
5213506e 23184$as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h
a3a5e3d1
UB
23185
23186fi
23187
5213506e
RW
23188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5
23189$as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; }
23190if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
23191 $as_echo_n "(cached) " >&6
a3a5e3d1
UB
23192else
23193 gcc_cv_as_ix86_fildq=no
23194 if test x$gcc_cv_as != x; then
23195 echo 'fildq mem; fistpq mem' > conftest.s
e0b0fd74 23196 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23197 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a3a5e3d1
UB
23198 (eval $ac_try) 2>&5
23199 ac_status=$?
5213506e
RW
23200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23201 test $ac_status = 0; }; }
a3a5e3d1
UB
23202 then
23203 gcc_cv_as_ix86_fildq=yes
8ada417f
ZW
23204 else
23205 echo "configure: failed program was" >&5
23206 cat conftest.s >&5
981d4858 23207 fi
8ada417f
ZW
23208 rm -f conftest.o conftest.s
23209 fi
23210fi
5213506e
RW
23211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_fildq" >&5
23212$as_echo "$gcc_cv_as_ix86_fildq" >&6; }
a3a5e3d1 23213if test $gcc_cv_as_ix86_fildq = yes; then
ba479fd2 23214
5213506e 23215$as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h
ad9c4d9f 23216
f6f5dff2
RO
23217fi
23218
5213506e
RW
23219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5
23220$as_echo_n "checking assembler for cmov syntax... " >&6; }
23221if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then :
23222 $as_echo_n "(cached) " >&6
f6f5dff2
RO
23223else
23224 gcc_cv_as_ix86_cmov_sun_syntax=no
23225 if test x$gcc_cv_as != x; then
6e3f3080 23226 echo 'cmovl.l %edx, %eax' > conftest.s
e0b0fd74 23227 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23228 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23229 (eval $ac_try) 2>&5
23230 ac_status=$?
5213506e
RW
23231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23232 test $ac_status = 0; }; }
f6f5dff2
RO
23233 then
23234 gcc_cv_as_ix86_cmov_sun_syntax=yes
23235 else
23236 echo "configure: failed program was" >&5
23237 cat conftest.s >&5
23238 fi
23239 rm -f conftest.o conftest.s
23240 fi
23241fi
5213506e
RW
23242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
23243$as_echo "$gcc_cv_as_ix86_cmov_sun_syntax" >&6; }
63cf211a 23244if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2 23245
5213506e 23246$as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h
f6f5dff2 23247
b6c03bcd
RS
23248fi
23249
5213506e
RW
23250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5
23251$as_echo_n "checking assembler for ffreep mnemonic... " >&6; }
23252if test "${gcc_cv_as_ix86_ffreep+set}" = set; then :
23253 $as_echo_n "(cached) " >&6
b6c03bcd
RS
23254else
23255 gcc_cv_as_ix86_ffreep=no
23256 if test x$gcc_cv_as != x; then
23257 echo 'ffreep %st(1)' > conftest.s
e0b0fd74 23258 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23259 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b6c03bcd
RS
23260 (eval $ac_try) 2>&5
23261 ac_status=$?
5213506e
RW
23262 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23263 test $ac_status = 0; }; }
b6c03bcd
RS
23264 then
23265 gcc_cv_as_ix86_ffreep=yes
23266 else
23267 echo "configure: failed program was" >&5
23268 cat conftest.s >&5
23269 fi
23270 rm -f conftest.o conftest.s
23271 fi
23272fi
5213506e
RW
23273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_ffreep" >&5
23274$as_echo "$gcc_cv_as_ix86_ffreep" >&6; }
b6c03bcd
RS
23275if test $gcc_cv_as_ix86_ffreep = yes; then
23276
5213506e 23277$as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h
b6c03bcd 23278
ed104137
RO
23279fi
23280
23281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5
23282$as_echo_n "checking assembler for .quad directive... " >&6; }
23283if test "${gcc_cv_as_ix86_quad+set}" = set; then :
23284 $as_echo_n "(cached) " >&6
23285else
23286 gcc_cv_as_ix86_quad=no
23287 if test x$gcc_cv_as != x; then
23288 echo '.quad 0' > conftest.s
23289 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
23290 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23291 (eval $ac_try) 2>&5
23292 ac_status=$?
23293 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23294 test $ac_status = 0; }; }
23295 then
23296 gcc_cv_as_ix86_quad=yes
23297 else
23298 echo "configure: failed program was" >&5
23299 cat conftest.s >&5
23300 fi
23301 rm -f conftest.o conftest.s
23302 fi
23303fi
23304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_quad" >&5
23305$as_echo "$gcc_cv_as_ix86_quad" >&6; }
23306if test $gcc_cv_as_ix86_quad = yes; then
23307
23308$as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h
23309
38ca3765
UB
23310fi
23311
5213506e
RW
23312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5
23313$as_echo_n "checking assembler for sahf mnemonic... " >&6; }
23314if test "${gcc_cv_as_ix86_sahf+set}" = set; then :
23315 $as_echo_n "(cached) " >&6
38ca3765
UB
23316else
23317 gcc_cv_as_ix86_sahf=no
23318 if test x$gcc_cv_as != x; then
953c29f7
UB
23319 echo '.code64
23320 sahf' > conftest.s
e0b0fd74 23321 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23322 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
38ca3765
UB
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; }; }
38ca3765
UB
23327 then
23328 gcc_cv_as_ix86_sahf=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_ix86_sahf" >&5
23337$as_echo "$gcc_cv_as_ix86_sahf" >&6; }
38ca3765
UB
23338if test $gcc_cv_as_ix86_sahf = yes; then
23339
5213506e 23340$as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h
38ca3765 23341
bad72d7a
RH
23342fi
23343
23344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5
23345$as_echo_n "checking assembler for swap suffix... " >&6; }
23346if test "${gcc_cv_as_ix86_swap+set}" = set; then :
23347 $as_echo_n "(cached) " >&6
23348else
23349 gcc_cv_as_ix86_swap=no
23350 if test x$gcc_cv_as != x; then
23351 echo 'movl.s %esp, %ebp' > conftest.s
e0b0fd74 23352 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
bad72d7a
RH
23353 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23354 (eval $ac_try) 2>&5
23355 ac_status=$?
23356 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23357 test $ac_status = 0; }; }
23358 then
23359 gcc_cv_as_ix86_swap=yes
23360 else
23361 echo "configure: failed program was" >&5
23362 cat conftest.s >&5
23363 fi
23364 rm -f conftest.o conftest.s
23365 fi
23366fi
23367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_swap" >&5
23368$as_echo "$gcc_cv_as_ix86_swap" >&6; }
23369if test $gcc_cv_as_ix86_swap = yes; then
23370
23371$as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h
23372
68b92f78
RS
23373fi
23374
5213506e
RW
23375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5
23376$as_echo_n "checking assembler for different section symbol subtraction... " >&6; }
23377if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then :
23378 $as_echo_n "(cached) " >&6
68b92f78
RS
23379else
23380 gcc_cv_as_ix86_diff_sect_delta=no
23381 if test x$gcc_cv_as != x; then
23382 echo '.section .rodata
23383.L1:
23384 .long .L2-.L1
23385 .long .L3-.L1
23386 .text
23387.L3: nop
23388.L2: nop' > conftest.s
e0b0fd74 23389 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23390 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
68b92f78
RS
23391 (eval $ac_try) 2>&5
23392 ac_status=$?
5213506e
RW
23393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23394 test $ac_status = 0; }; }
68b92f78
RS
23395 then
23396 gcc_cv_as_ix86_diff_sect_delta=yes
23397 else
23398 echo "configure: failed program was" >&5
23399 cat conftest.s >&5
23400 fi
23401 rm -f conftest.o conftest.s
23402 fi
23403fi
5213506e
RW
23404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
23405$as_echo "$gcc_cv_as_ix86_diff_sect_delta" >&6; }
68b92f78
RS
23406if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
23407
5213506e 23408$as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h
68b92f78 23409
ad9c4d9f
NN
23410fi
23411
2433310d 23412 # These two are used unconditionally by i386.[ch]; it is to be defined
6f3ca281 23413 # to 1 if the feature is present, 0 otherwise.
5213506e
RW
23414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5
23415$as_echo_n "checking assembler for GOTOFF in data... " >&6; }
23416if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then :
23417 $as_echo_n "(cached) " >&6
8ada417f
ZW
23418else
23419 gcc_cv_as_ix86_gotoff_in_data=no
23420 if test $in_tree_gas = yes; then
23421 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23422 then gcc_cv_as_ix86_gotoff_in_data=yes
23423fi
23424 elif test x$gcc_cv_as != x; then
6e3f3080 23425 echo ' .text
f88c65f7
RH
23426.L0:
23427 nop
23428 .data
8ada417f 23429 .long .L0@GOTOFF' > conftest.s
e0b0fd74 23430 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23431 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23432 (eval $ac_try) 2>&5
23433 ac_status=$?
5213506e
RW
23434 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23435 test $ac_status = 0; }; }
8ada417f
ZW
23436 then
23437 gcc_cv_as_ix86_gotoff_in_data=yes
23438 else
23439 echo "configure: failed program was" >&5
23440 cat conftest.s >&5
f88c65f7 23441 fi
8ada417f
ZW
23442 rm -f conftest.o conftest.s
23443 fi
23444fi
5213506e
RW
23445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
23446$as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; }
8ada417f 23447
6f3ca281 23448
ba479fd2 23449cat >>confdefs.h <<_ACEOF
6f3ca281 23450#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 23451_ACEOF
f88c65f7 23452
2433310d
RO
23453
23454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rep and lock prefix" >&5
23455$as_echo_n "checking assembler for rep and lock prefix... " >&6; }
23456if test "${gcc_cv_as_ix86_rep_lock_prefix+set}" = set; then :
23457 $as_echo_n "(cached) " >&6
23458else
23459 gcc_cv_as_ix86_rep_lock_prefix=no
23460 if test x$gcc_cv_as != x; then
23461 echo 'rep movsl
4bade865 23462 lock addl %edi, (%eax,%esi)
2433310d
RO
23463 lock orl $0, (%esp)' > conftest.s
23464 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
23465 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23466 (eval $ac_try) 2>&5
23467 ac_status=$?
23468 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23469 test $ac_status = 0; }; }
23470 then
23471 gcc_cv_as_ix86_rep_lock_prefix=yes
23472 else
23473 echo "configure: failed program was" >&5
23474 cat conftest.s >&5
23475 fi
23476 rm -f conftest.o conftest.s
23477 fi
23478fi
23479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_rep_lock_prefix" >&5
23480$as_echo "$gcc_cv_as_ix86_rep_lock_prefix" >&6; }
7085bfb6 23481if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then
2433310d 23482
7085bfb6 23483$as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h
2433310d 23484
7085bfb6 23485fi
2433310d 23486
1cb36a98 23487 ;;
ef1ecf87
RH
23488
23489 ia64*-*-*)
5213506e
RW
23490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ltoffx and ldxmov relocs" >&5
23491$as_echo_n "checking assembler for ltoffx and ldxmov relocs... " >&6; }
23492if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then :
23493 $as_echo_n "(cached) " >&6
ef1ecf87 23494else
8ada417f
ZW
23495 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
23496 if test $in_tree_gas = yes; then
23497 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23498 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 23499fi
8ada417f 23500 elif test x$gcc_cv_as != x; then
6e3f3080 23501 echo ' .text
ef1ecf87
RH
23502 addl r15 = @ltoffx(x#), gp
23503 ;;
cfa9ee99 23504 ld8.mov r16 = [r15], x#' > conftest.s
e0b0fd74 23505 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23506 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23507 (eval $ac_try) 2>&5
23508 ac_status=$?
5213506e
RW
23509 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23510 test $ac_status = 0; }; }
8ada417f 23511 then
cfa9ee99 23512 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
23513 else
23514 echo "configure: failed program was" >&5
23515 cat conftest.s >&5
2c4a9cff 23516 fi
8ada417f
ZW
23517 rm -f conftest.o conftest.s
23518 fi
23519fi
5213506e
RW
23520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
23521$as_echo "$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; }
63cf211a 23522if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2 23523
5213506e 23524$as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h
8ada417f 23525
cfa9ee99 23526fi
8ada417f 23527
2c4a9cff 23528 ;;
8ada417f 23529
2c4a9cff 23530 powerpc*-*-*)
8ada417f 23531 case $target in
432218ba
DE
23532 *-*-aix*) conftest_s=' .machine "pwr5"
23533 .csect .text[PR]
6b37db3c 23534 mfcr 3,128';;
8af4d362 23535 *-*-darwin*)
5213506e
RW
23536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine directive support" >&5
23537$as_echo_n "checking assembler for .machine directive support... " >&6; }
23538if test "${gcc_cv_as_machine_directive+set}" = set; then :
23539 $as_echo_n "(cached) " >&6
8af4d362
PB
23540else
23541 gcc_cv_as_machine_directive=no
23542 if test x$gcc_cv_as != x; then
23543 echo ' .machine ppc7400' > conftest.s
e0b0fd74 23544 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23545 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8af4d362
PB
23546 (eval $ac_try) 2>&5
23547 ac_status=$?
5213506e
RW
23548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23549 test $ac_status = 0; }; }
8af4d362
PB
23550 then
23551 gcc_cv_as_machine_directive=yes
23552 else
23553 echo "configure: failed program was" >&5
23554 cat conftest.s >&5
23555 fi
23556 rm -f conftest.o conftest.s
23557 fi
23558fi
5213506e
RW
23559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5
23560$as_echo "$gcc_cv_as_machine_directive" >&6; }
8af4d362
PB
23561
23562 if test x$gcc_cv_as_machine_directive != xyes; then
23563 echo "*** This target requires an assembler supporting \".machine\"" >&2
23564 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
23565 test x$build = x$target && exit 1
23566 fi
23567 conftest_s=' .text
6b37db3c 23568 mfcr r3,128';;
4c67db14 23569 *) conftest_s=' .machine power4
d2ab3e37 23570 .text
6b37db3c 23571 mfcr 3,128';;
8ada417f 23572 esac
8ada417f 23573
5213506e
RW
23574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for mfcr field support" >&5
23575$as_echo_n "checking assembler for mfcr field support... " >&6; }
23576if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then :
23577 $as_echo_n "(cached) " >&6
2c4a9cff 23578else
8ada417f
ZW
23579 gcc_cv_as_powerpc_mfcrf=no
23580 if test $in_tree_gas = yes; then
23581 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23582 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 23583fi
8ada417f 23584 elif test x$gcc_cv_as != x; then
6e3f3080 23585 echo "$conftest_s" > conftest.s
e0b0fd74 23586 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23587 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23588 (eval $ac_try) 2>&5
23589 ac_status=$?
5213506e
RW
23590 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23591 test $ac_status = 0; }; }
8ada417f
ZW
23592 then
23593 gcc_cv_as_powerpc_mfcrf=yes
23594 else
23595 echo "configure: failed program was" >&5
23596 cat conftest.s >&5
23597 fi
23598 rm -f conftest.o conftest.s
23599 fi
2c4a9cff 23600fi
5213506e
RW
23601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfcrf" >&5
23602$as_echo "$gcc_cv_as_powerpc_mfcrf" >&6; }
63cf211a 23603if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2 23604
5213506e 23605$as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h
ef1ecf87 23606
8ada417f 23607fi
432218ba
DE
23608
23609 case $target in
23610 *-*-aix*) conftest_s=' .machine "pwr5"
23611 .csect .text[PR]
23612 popcntb 3,3';;
23613 *) conftest_s=' .machine power5
23614 .text
23615 popcntb 3,3';;
23616 esac
23617
5213506e
RW
23618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntb support" >&5
23619$as_echo_n "checking assembler for popcntb support... " >&6; }
23620if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then :
23621 $as_echo_n "(cached) " >&6
432218ba
DE
23622else
23623 gcc_cv_as_powerpc_popcntb=no
23624 if test $in_tree_gas = yes; then
23625 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23626 then gcc_cv_as_powerpc_popcntb=yes
23627fi
23628 elif test x$gcc_cv_as != x; then
23629 echo "$conftest_s" > conftest.s
e0b0fd74 23630 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23631 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
432218ba
DE
23632 (eval $ac_try) 2>&5
23633 ac_status=$?
5213506e
RW
23634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23635 test $ac_status = 0; }; }
432218ba
DE
23636 then
23637 gcc_cv_as_powerpc_popcntb=yes
23638 else
23639 echo "configure: failed program was" >&5
23640 cat conftest.s >&5
23641 fi
23642 rm -f conftest.o conftest.s
23643 fi
23644fi
5213506e
RW
23645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntb" >&5
23646$as_echo "$gcc_cv_as_powerpc_popcntb" >&6; }
432218ba
DE
23647if test $gcc_cv_as_powerpc_popcntb = yes; then
23648
5213506e 23649$as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h
432218ba 23650
9719f3b7
DE
23651fi
23652
23653 case $target in
23654 *-*-aix*) conftest_s=' .machine "pwr5x"
23655 .csect .text[PR]
23656 frin 1,1';;
1e04bfdc 23657 *) conftest_s=' .machine power5
9719f3b7
DE
23658 .text
23659 frin 1,1';;
23660 esac
23661
5213506e
RW
23662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fp round support" >&5
23663$as_echo_n "checking assembler for fp round support... " >&6; }
23664if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then :
23665 $as_echo_n "(cached) " >&6
9719f3b7
DE
23666else
23667 gcc_cv_as_powerpc_fprnd=no
23668 if test $in_tree_gas = yes; then
23669 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23670 then gcc_cv_as_powerpc_fprnd=yes
23671fi
23672 elif test x$gcc_cv_as != x; then
23673 echo "$conftest_s" > conftest.s
e0b0fd74 23674 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23675 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9719f3b7
DE
23676 (eval $ac_try) 2>&5
23677 ac_status=$?
5213506e
RW
23678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23679 test $ac_status = 0; }; }
9719f3b7
DE
23680 then
23681 gcc_cv_as_powerpc_fprnd=yes
23682 else
23683 echo "configure: failed program was" >&5
23684 cat conftest.s >&5
23685 fi
23686 rm -f conftest.o conftest.s
23687 fi
23688fi
5213506e
RW
23689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_fprnd" >&5
23690$as_echo "$gcc_cv_as_powerpc_fprnd" >&6; }
9719f3b7
DE
23691if test $gcc_cv_as_powerpc_fprnd = yes; then
23692
5213506e 23693$as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h
9719f3b7 23694
44cd321e
PS
23695fi
23696
23697 case $target in
23698 *-*-aix*) conftest_s=' .machine "pwr6"
23699 .csect .text[PR]
23700 mffgpr 1,3';;
23701 *) conftest_s=' .machine power6
23702 .text
23703 mffgpr 1,3';;
23704 esac
23705
5213506e
RW
23706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for move fp gpr support" >&5
23707$as_echo_n "checking assembler for move fp gpr support... " >&6; }
23708if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then :
23709 $as_echo_n "(cached) " >&6
44cd321e
PS
23710else
23711 gcc_cv_as_powerpc_mfpgpr=no
23712 if test $in_tree_gas = yes; then
cacf1ca8 23713 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
44cd321e
PS
23714 then gcc_cv_as_powerpc_mfpgpr=yes
23715fi
23716 elif test x$gcc_cv_as != x; then
23717 echo "$conftest_s" > conftest.s
e0b0fd74 23718 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23719 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
44cd321e
PS
23720 (eval $ac_try) 2>&5
23721 ac_status=$?
5213506e
RW
23722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23723 test $ac_status = 0; }; }
44cd321e
PS
23724 then
23725 gcc_cv_as_powerpc_mfpgpr=yes
23726 else
23727 echo "configure: failed program was" >&5
23728 cat conftest.s >&5
23729 fi
23730 rm -f conftest.o conftest.s
23731 fi
23732fi
5213506e
RW
23733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfpgpr" >&5
23734$as_echo "$gcc_cv_as_powerpc_mfpgpr" >&6; }
44cd321e
PS
23735if test $gcc_cv_as_powerpc_mfpgpr = yes; then
23736
5213506e 23737$as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h
44cd321e 23738
432218ba
DE
23739fi
23740
7f970b70
AM
23741 case $target in
23742 *-*-aix*) conftest_s=' .csect .text[PR]
23743LCF..0:
23744 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
23745 *-*-darwin*)
23746 conftest_s=' .text
23747LCF0:
23748 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
23749 *) conftest_s=' .text
23750.LCF0:
23751 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
23752 esac
23753
5213506e
RW
23754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rel16 relocs" >&5
23755$as_echo_n "checking assembler for rel16 relocs... " >&6; }
23756if test "${gcc_cv_as_powerpc_rel16+set}" = set; then :
23757 $as_echo_n "(cached) " >&6
695d8830
AS
23758else
23759 gcc_cv_as_powerpc_rel16=no
23760 if test $in_tree_gas = yes; then
23761 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23762 then gcc_cv_as_powerpc_rel16=yes
23763fi
23764 elif test x$gcc_cv_as != x; then
23765 echo "$conftest_s" > conftest.s
e0b0fd74 23766 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23767 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
695d8830
AS
23768 (eval $ac_try) 2>&5
23769 ac_status=$?
5213506e
RW
23770 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23771 test $ac_status = 0; }; }
695d8830
AS
23772 then
23773 gcc_cv_as_powerpc_rel16=yes
23774 else
23775 echo "configure: failed program was" >&5
23776 cat conftest.s >&5
23777 fi
23778 rm -f conftest.o conftest.s
23779 fi
23780fi
5213506e
RW
23781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_rel16" >&5
23782$as_echo "$gcc_cv_as_powerpc_rel16" >&6; }
695d8830
AS
23783if test $gcc_cv_as_powerpc_rel16 = yes; then
23784
5213506e 23785$as_echo "#define HAVE_AS_REL16 1" >>confdefs.h
695d8830
AS
23786
23787fi
23788
b639c3c2
JJ
23789 case $target in
23790 *-*-aix*) conftest_s=' .machine "pwr6"
23791 .csect .text[PR]
23792 cmpb 3,4,5';;
23793 *) conftest_s=' .machine power6
23794 .text
23795 cmpb 3,4,5';;
23796 esac
23797
5213506e
RW
23798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compare bytes support" >&5
23799$as_echo_n "checking assembler for compare bytes support... " >&6; }
23800if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then :
23801 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23802else
23803 gcc_cv_as_powerpc_cmpb=no
23804 if test $in_tree_gas = yes; then
cacf1ca8 23805 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23806 then gcc_cv_as_powerpc_cmpb=yes
23807fi
23808 elif test x$gcc_cv_as != x; then
23809 echo "$conftest_s" > conftest.s
e0b0fd74 23810 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23811 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23812 (eval $ac_try) 2>&5
23813 ac_status=$?
5213506e
RW
23814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23815 test $ac_status = 0; }; }
b639c3c2
JJ
23816 then
23817 gcc_cv_as_powerpc_cmpb=yes
23818 else
23819 echo "configure: failed program was" >&5
23820 cat conftest.s >&5
23821 fi
23822 rm -f conftest.o conftest.s
23823 fi
23824fi
5213506e
RW
23825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_cmpb" >&5
23826$as_echo "$gcc_cv_as_powerpc_cmpb" >&6; }
b639c3c2
JJ
23827if test $gcc_cv_as_powerpc_cmpb = yes; then
23828
5213506e 23829$as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h
b639c3c2
JJ
23830
23831fi
23832
23833 case $target in
23834 *-*-aix*) conftest_s=' .machine "pwr6"
23835 .csect .text[PR]
0d74c0ee 23836 dadd 1,2,3';;
b639c3c2
JJ
23837 *) conftest_s=' .machine power6
23838 .text
0d74c0ee 23839 dadd 1,2,3';;
b639c3c2
JJ
23840 esac
23841
5213506e
RW
23842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for decimal float support" >&5
23843$as_echo_n "checking assembler for decimal float support... " >&6; }
23844if test "${gcc_cv_as_powerpc_dfp+set}" = set; then :
23845 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23846else
23847 gcc_cv_as_powerpc_dfp=no
23848 if test $in_tree_gas = yes; then
cacf1ca8 23849 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23850 then gcc_cv_as_powerpc_dfp=yes
23851fi
23852 elif test x$gcc_cv_as != x; then
23853 echo "$conftest_s" > conftest.s
e0b0fd74 23854 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23855 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23856 (eval $ac_try) 2>&5
23857 ac_status=$?
5213506e
RW
23858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23859 test $ac_status = 0; }; }
b639c3c2
JJ
23860 then
23861 gcc_cv_as_powerpc_dfp=yes
23862 else
23863 echo "configure: failed program was" >&5
23864 cat conftest.s >&5
23865 fi
23866 rm -f conftest.o conftest.s
23867 fi
23868fi
5213506e
RW
23869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dfp" >&5
23870$as_echo "$gcc_cv_as_powerpc_dfp" >&6; }
b639c3c2
JJ
23871if test $gcc_cv_as_powerpc_dfp = yes; then
23872
5213506e 23873$as_echo "#define HAVE_AS_DFP 1" >>confdefs.h
b639c3c2 23874
d40c9e33
PB
23875fi
23876
23877 case $target in
23878 *-*-aix*) conftest_s=' .machine "pwr7"
23879 .csect .text[PR]
23880 lxvd2x 1,2,3';;
23881 *) conftest_s=' .machine power7
23882 .text
23883 lxvd2x 1,2,3';;
23884 esac
23885
5213506e
RW
23886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for vector-scalar support" >&5
23887$as_echo_n "checking assembler for vector-scalar support... " >&6; }
23888if test "${gcc_cv_as_powerpc_vsx+set}" = set; then :
23889 $as_echo_n "(cached) " >&6
d40c9e33
PB
23890else
23891 gcc_cv_as_powerpc_vsx=no
23892 if test $in_tree_gas = yes; then
cacf1ca8 23893 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
d40c9e33
PB
23894 then gcc_cv_as_powerpc_vsx=yes
23895fi
23896 elif test x$gcc_cv_as != x; then
23897 echo "$conftest_s" > conftest.s
e0b0fd74 23898 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23899 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d40c9e33
PB
23900 (eval $ac_try) 2>&5
23901 ac_status=$?
5213506e
RW
23902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23903 test $ac_status = 0; }; }
d40c9e33
PB
23904 then
23905 gcc_cv_as_powerpc_vsx=yes
23906 else
23907 echo "configure: failed program was" >&5
23908 cat conftest.s >&5
23909 fi
23910 rm -f conftest.o conftest.s
23911 fi
23912fi
5213506e
RW
23913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_vsx" >&5
23914$as_echo "$gcc_cv_as_powerpc_vsx" >&6; }
d40c9e33
PB
23915if test $gcc_cv_as_powerpc_vsx = yes; then
23916
5213506e 23917$as_echo "#define HAVE_AS_VSX 1" >>confdefs.h
d40c9e33 23918
cacf1ca8
MM
23919fi
23920
23921 case $target in
23922 *-*-aix*) conftest_s=' .machine "pwr7"
23923 .csect .text[PR]
23924 popcntd 3,3';;
23925 *) conftest_s=' .machine power7
23926 .text
23927 popcntd 3,3';;
23928 esac
23929
5213506e
RW
23930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntd support" >&5
23931$as_echo_n "checking assembler for popcntd support... " >&6; }
23932if test "${gcc_cv_as_powerpc_popcntd+set}" = set; then :
23933 $as_echo_n "(cached) " >&6
cacf1ca8
MM
23934else
23935 gcc_cv_as_powerpc_popcntd=no
23936 if test $in_tree_gas = yes; then
23937 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
23938 then gcc_cv_as_powerpc_popcntd=yes
23939fi
23940 elif test x$gcc_cv_as != x; then
23941 echo "$conftest_s" > conftest.s
e0b0fd74 23942 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23943 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
23944 (eval $ac_try) 2>&5
23945 ac_status=$?
5213506e
RW
23946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23947 test $ac_status = 0; }; }
cacf1ca8
MM
23948 then
23949 gcc_cv_as_powerpc_popcntd=yes
23950 else
23951 echo "configure: failed program was" >&5
23952 cat conftest.s >&5
23953 fi
23954 rm -f conftest.o conftest.s
23955 fi
23956fi
5213506e
RW
23957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntd" >&5
23958$as_echo "$gcc_cv_as_powerpc_popcntd" >&6; }
cacf1ca8
MM
23959if test $gcc_cv_as_powerpc_popcntd = yes; then
23960
5213506e 23961$as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h
cacf1ca8
MM
23962
23963fi
23964
23965 case $target in
23966 *-*-aix*) conftest_s=' .csect .text[PR]
23967 lwsync';;
23968 *) conftest_s=' .text
23969 lwsync';;
23970 esac
23971
5213506e
RW
23972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for lwsync support" >&5
23973$as_echo_n "checking assembler for lwsync support... " >&6; }
23974if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then :
23975 $as_echo_n "(cached) " >&6
cacf1ca8
MM
23976else
23977 gcc_cv_as_powerpc_lwsync=no
23978 if test $in_tree_gas = yes; then
23979 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
23980 then gcc_cv_as_powerpc_lwsync=yes
23981fi
23982 elif test x$gcc_cv_as != x; then
23983 echo "$conftest_s" > conftest.s
e0b0fd74 23984 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23985 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
23986 (eval $ac_try) 2>&5
23987 ac_status=$?
5213506e
RW
23988 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23989 test $ac_status = 0; }; }
cacf1ca8
MM
23990 then
23991 gcc_cv_as_powerpc_lwsync=yes
23992 else
23993 echo "configure: failed program was" >&5
23994 cat conftest.s >&5
23995 fi
23996 rm -f conftest.o conftest.s
23997 fi
23998fi
5213506e
RW
23999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_lwsync" >&5
24000$as_echo "$gcc_cv_as_powerpc_lwsync" >&6; }
cacf1ca8
MM
24001if test $gcc_cv_as_powerpc_lwsync = yes; then
24002
5213506e 24003$as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h
cacf1ca8 24004
47f67e51
PB
24005fi
24006
24007 case $target in
24008 *-*-aix*) conftest_s=' .machine "476"
24009 .csect .text[PR]
24010 dci 0';;
24011 *) conftest_s=' .machine "476"
24012 .text
24013 dci 0';;
24014 esac
24015
24016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for data cache invalidate support" >&5
24017$as_echo_n "checking assembler for data cache invalidate support... " >&6; }
24018if test "${gcc_cv_as_powerpc_dci+set}" = set; then :
24019 $as_echo_n "(cached) " >&6
24020else
24021 gcc_cv_as_powerpc_dci=no
24022 if test $in_tree_gas = yes; then
24023 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
24024 then gcc_cv_as_powerpc_dci=yes
24025fi
24026 elif test x$gcc_cv_as != x; then
24027 echo "$conftest_s" > conftest.s
e0b0fd74 24028 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
47f67e51
PB
24029 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
24030 (eval $ac_try) 2>&5
24031 ac_status=$?
24032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24033 test $ac_status = 0; }; }
24034 then
24035 gcc_cv_as_powerpc_dci=yes
24036 else
24037 echo "configure: failed program was" >&5
24038 cat conftest.s >&5
24039 fi
24040 rm -f conftest.o conftest.s
24041 fi
24042fi
24043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dci" >&5
24044$as_echo "$gcc_cv_as_powerpc_dci" >&6; }
24045if test $gcc_cv_as_powerpc_dci = yes; then
24046
24047$as_echo "#define HAVE_AS_DCI 1" >>confdefs.h
24048
e51917ae
JM
24049fi
24050
5213506e
RW
24051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
24052$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
24053if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then :
24054 $as_echo_n "(cached) " >&6
e51917ae
JM
24055else
24056 gcc_cv_as_powerpc_gnu_attribute=no
24057 if test $in_tree_gas = yes; then
24058 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24059 then gcc_cv_as_powerpc_gnu_attribute=yes
24060fi
24061 elif test x$gcc_cv_as != x; then
24062 echo '.gnu_attribute 4,1' > conftest.s
e0b0fd74 24063 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24064 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e51917ae
JM
24065 (eval $ac_try) 2>&5
24066 ac_status=$?
5213506e
RW
24067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24068 test $ac_status = 0; }; }
e51917ae
JM
24069 then
24070 gcc_cv_as_powerpc_gnu_attribute=yes
24071 else
24072 echo "configure: failed program was" >&5
24073 cat conftest.s >&5
24074 fi
24075 rm -f conftest.o conftest.s
24076 fi
24077fi
5213506e
RW
24078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
24079$as_echo "$gcc_cv_as_powerpc_gnu_attribute" >&6; }
e51917ae
JM
24080if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
24081
5213506e 24082$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
e51917ae 24083
9752c4ad
AM
24084fi
24085
5213506e
RW
24086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5
24087$as_echo_n "checking assembler for tls marker support... " >&6; }
24088if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then :
24089 $as_echo_n "(cached) " >&6
9752c4ad
AM
24090else
24091 gcc_cv_as_powerpc_tls_markers=no
24092 if test $in_tree_gas = yes; then
207bf79d 24093 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0`
9752c4ad
AM
24094 then gcc_cv_as_powerpc_tls_markers=yes
24095fi
24096 elif test x$gcc_cv_as != x; then
24097 echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s
e0b0fd74 24098 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24099 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9752c4ad
AM
24100 (eval $ac_try) 2>&5
24101 ac_status=$?
5213506e
RW
24102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24103 test $ac_status = 0; }; }
9752c4ad
AM
24104 then
24105 gcc_cv_as_powerpc_tls_markers=yes
24106 else
24107 echo "configure: failed program was" >&5
24108 cat conftest.s >&5
24109 fi
24110 rm -f conftest.o conftest.s
24111 fi
24112fi
5213506e
RW
24113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_tls_markers" >&5
24114$as_echo "$gcc_cv_as_powerpc_tls_markers" >&6; }
9752c4ad
AM
24115if test $gcc_cv_as_powerpc_tls_markers = yes; then
24116
5213506e 24117$as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h
9752c4ad 24118
7f970b70 24119fi
636cf8b1
RS
24120
24121 case $target in
24122 *-*-aix*)
24123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5
24124$as_echo_n "checking assembler for .ref support... " >&6; }
24125if test "${gcc_cv_as_aix_ref+set}" = set; then :
24126 $as_echo_n "(cached) " >&6
24127else
24128 gcc_cv_as_aix_ref=no
24129 if test $in_tree_gas = yes; then
24130 if test $gcc_cv_gas_vers -ge `expr \( \( 2.21.0 \* 1000 \) + gcc_cv_as_aix_ref=yes \) \* 1000 + `
24131 then :
24132fi
24133 elif test x$gcc_cv_as != x; then
24134 echo ' .csect stuff[rw]
24135 stuff:
24136 .long 1
24137 .extern sym
24138 .ref sym
24139 ' > conftest.s
24140 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
24141 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
24142 (eval $ac_try) 2>&5
24143 ac_status=$?
24144 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24145 test $ac_status = 0; }; }
24146 then
24147 gcc_cv_as_aix_ref=yes
24148 else
24149 echo "configure: failed program was" >&5
24150 cat conftest.s >&5
24151 fi
24152 rm -f conftest.o conftest.s
24153 fi
24154fi
24155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aix_ref" >&5
24156$as_echo "$gcc_cv_as_aix_ref" >&6; }
24157if test $gcc_cv_as_aix_ref = yes; then
24158
24159$as_echo "#define HAVE_AS_REF 1" >>confdefs.h
24160
24161fi
24162 ;;
24163 esac
8ada417f
ZW
24164 ;;
24165
24166 mips*-*-*)
5213506e
RW
24167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
24168$as_echo_n "checking assembler for explicit relocation support... " >&6; }
24169if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then :
24170 $as_echo_n "(cached) " >&6
8ada417f
ZW
24171else
24172 gcc_cv_as_mips_explicit_relocs=no
24173 if test $in_tree_gas = yes; then
24174 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
24175 then gcc_cv_as_mips_explicit_relocs=yes
24176fi
24177 elif test x$gcc_cv_as != x; then
6e3f3080 24178 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
e0b0fd74 24179 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24180 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24181 (eval $ac_try) 2>&5
24182 ac_status=$?
5213506e
RW
24183 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24184 test $ac_status = 0; }; }
8ada417f
ZW
24185 then
24186 gcc_cv_as_mips_explicit_relocs=yes
24187 else
24188 echo "configure: failed program was" >&5
24189 cat conftest.s >&5
ef1ecf87 24190 fi
8ada417f
ZW
24191 rm -f conftest.o conftest.s
24192 fi
24193fi
5213506e
RW
24194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_explicit_relocs" >&5
24195$as_echo "$gcc_cv_as_mips_explicit_relocs" >&6; }
8ada417f
ZW
24196if test $gcc_cv_as_mips_explicit_relocs = yes; then
24197 if test x$target_cpu_default = x
24198 then target_cpu_default=MASK_EXPLICIT_RELOCS
24199 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
24200 fi
4551169f 24201fi
5213506e
RW
24202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5
24203$as_echo_n "checking assembler for -mno-shared support... " >&6; }
24204if test "${gcc_cv_as_mips_no_shared+set}" = set; then :
24205 $as_echo_n "(cached) " >&6
4551169f
RS
24206else
24207 gcc_cv_as_mips_no_shared=no
24208 if test $in_tree_gas = yes; then
24209 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
24210 then gcc_cv_as_mips_no_shared=yes
24211fi
24212 elif test x$gcc_cv_as != x; then
24213 echo 'nop' > conftest.s
e0b0fd74 24214 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mno-shared -o conftest.o conftest.s >&5'
5213506e 24215 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4551169f
RS
24216 (eval $ac_try) 2>&5
24217 ac_status=$?
5213506e
RW
24218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24219 test $ac_status = 0; }; }
4551169f
RS
24220 then
24221 gcc_cv_as_mips_no_shared=yes
24222 else
24223 echo "configure: failed program was" >&5
24224 cat conftest.s >&5
24225 fi
24226 rm -f conftest.o conftest.s
24227 fi
24228fi
5213506e
RW
24229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_no_shared" >&5
24230$as_echo "$gcc_cv_as_mips_no_shared" >&6; }
4551169f
RS
24231if test $gcc_cv_as_mips_no_shared = yes; then
24232
5213506e 24233$as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h
4551169f 24234
dcb957d9
JM
24235fi
24236
5213506e
RW
24237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
24238$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
24239if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then :
24240 $as_echo_n "(cached) " >&6
dcb957d9
JM
24241else
24242 gcc_cv_as_mips_gnu_attribute=no
24243 if test $in_tree_gas = yes; then
24244 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24245 then gcc_cv_as_mips_gnu_attribute=yes
24246fi
24247 elif test x$gcc_cv_as != x; then
24248 echo '.gnu_attribute 4,1' > conftest.s
e0b0fd74 24249 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24250 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
dcb957d9
JM
24251 (eval $ac_try) 2>&5
24252 ac_status=$?
5213506e
RW
24253 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24254 test $ac_status = 0; }; }
dcb957d9
JM
24255 then
24256 gcc_cv_as_mips_gnu_attribute=yes
24257 else
24258 echo "configure: failed program was" >&5
24259 cat conftest.s >&5
24260 fi
24261 rm -f conftest.o conftest.s
24262 fi
24263fi
5213506e
RW
24264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_gnu_attribute" >&5
24265$as_echo "$gcc_cv_as_mips_gnu_attribute" >&6; }
dcb957d9
JM
24266if test $gcc_cv_as_mips_gnu_attribute = yes; then
24267
5213506e 24268$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
dcb957d9 24269
a44380d2
JM
24270fi
24271
5213506e
RW
24272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5
24273$as_echo_n "checking assembler for .dtprelword support... " >&6; }
24274if test "${gcc_cv_as_mips_dtprelword+set}" = set; then :
24275 $as_echo_n "(cached) " >&6
a44380d2
JM
24276else
24277 gcc_cv_as_mips_dtprelword=no
24278 if test $in_tree_gas = yes; then
24279 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24280 then gcc_cv_as_mips_dtprelword=yes
24281fi
24282 elif test x$gcc_cv_as != x; then
24283 echo '.section .tdata,"awT",@progbits
24284x:
24285 .word 2
24286 .text
24287 .dtprelword x+0x8000' > conftest.s
e0b0fd74 24288 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24289 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a44380d2
JM
24290 (eval $ac_try) 2>&5
24291 ac_status=$?
5213506e
RW
24292 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24293 test $ac_status = 0; }; }
a44380d2
JM
24294 then
24295 gcc_cv_as_mips_dtprelword=yes
24296 else
24297 echo "configure: failed program was" >&5
24298 cat conftest.s >&5
24299 fi
24300 rm -f conftest.o conftest.s
24301 fi
24302fi
5213506e
RW
24303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_dtprelword" >&5
24304$as_echo "$gcc_cv_as_mips_dtprelword" >&6; }
a44380d2
JM
24305if test $gcc_cv_as_mips_dtprelword = yes; then
24306
5213506e 24307$as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h
a44380d2 24308
8ada417f 24309fi
b53da244
AN
24310
24311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5
24312$as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; }
24313 gcc_cv_as_ld_jalr_reloc=no
24314 if test $gcc_cv_as_mips_explicit_relocs = yes; then
24315 if test $in_tree_ld = yes ; then
24316 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 \
24317 && test $in_tree_ld_is_elf = yes; then
24318 gcc_cv_as_ld_jalr_reloc=yes
24319 fi
24320 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then
24321 echo ' .ent x' > conftest.s
24322 echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s
24323 echo ' ld $25,%call16(y)($28)' >> conftest.s
24324 echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s
24325 echo '1: jalr $25' >> conftest.s
24326 echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s
24327 echo '1: jalr $25' >> conftest.s
24328 echo ' .end x' >> conftest.s
24329 if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&5 \
24330 && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&5; then
bc492e47
RO
24331 if $gcc_cv_objdump -d conftest.so | grep jalr >/dev/null 2>&1 \
24332 && $gcc_cv_objdump -d conftest.so | grep "bal.*<x>" >/dev/null 2>&1; then
b53da244
AN
24333 gcc_cv_as_ld_jalr_reloc=yes
24334 fi
24335 fi
24336 rm -f conftest.*
24337 fi
24338 fi
24339 if test $gcc_cv_as_ld_jalr_reloc = yes; then
24340 if test x$target_cpu_default = x; then
24341 target_cpu_default=MASK_RELAX_PIC_CALLS
24342 else
24343 target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
24344 fi
24345 fi
24346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
24347$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
49576e25
RS
24348
24349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .eh_frame personality relaxation" >&5
24350$as_echo_n "checking linker for .eh_frame personality relaxation... " >&6; }
24351if test "${gcc_cv_ld_mips_personality_relaxation+set}" = set; then :
24352 $as_echo_n "(cached) " >&6
24353else
24354 gcc_cv_ld_mips_personality_relaxation=no
24355 if test $in_tree_ld = yes ; then
24356 if test "$gcc_cv_gld_major_version" -eq 2 \
24357 -a "$gcc_cv_gld_minor_version" -ge 21 \
24358 -o "$gcc_cv_gld_major_version" -gt 2; then
24359 gcc_cv_ld_mips_personality_relaxation=yes
24360 fi
24361 elif test x$gcc_cv_as != x \
24362 -a x$gcc_cv_ld != x \
24363 -a x$gcc_cv_readelf != x ; then
24364 cat > conftest.s <<EOF
24365 .cfi_startproc
24366 .cfi_personality 0x80,indirect_ptr
24367 .ent test
24368test:
24369 nop
24370 .end test
24371 .cfi_endproc
24372
24373 .section .data,"aw",@progbits
24374indirect_ptr:
24375 .dc.a personality
24376EOF
24377 if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \
24378 && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then
24379 if $gcc_cv_readelf -d conftest 2>&1 \
24380 | grep TEXTREL > /dev/null 2>&1; then
24381 :
24382 elif $gcc_cv_readelf --relocs conftest 2>&1 \
24383 | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then
24384 :
24385 else
24386 gcc_cv_ld_mips_personality_relaxation=yes
24387 fi
24388 fi
24389 fi
24390 rm -f conftest.s conftest.o conftest
24391fi
24392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_mips_personality_relaxation" >&5
24393$as_echo "$gcc_cv_ld_mips_personality_relaxation" >&6; }
24394 if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then
24395
24396$as_echo "#define HAVE_LD_PERSONALITY_RELAXATION 1" >>confdefs.h
24397
24398 fi
dbad5e72
SE
24399 ;;
24400esac
8ada417f 24401
dbad5e72
SE
24402# Mips and HP-UX need the GNU assembler.
24403# Linux on IA64 might be able to use the Intel assembler.
24404
24405case "$target" in
24406 mips*-*-* | *-*-hpux* )
82563d35
RS
24407 if test x$gas_flag = xyes \
24408 || test x"$host" != x"$build" \
24409 || test ! -x "$gcc_cv_as" \
24410 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
24411 :
24412 else
24413 echo "*** This configuration requires the GNU assembler" >&2
24414 exit 1
24415 fi
ef1ecf87 24416 ;;
1cb36a98 24417esac
dbad5e72 24418
9d147085
RH
24419# ??? Not all targets support dwarf2 debug_line, even within a version
24420# of gas. Moreover, we need to emit a valid instruction to trigger any
24421# info to the output file. So, as supported targets are added to gas 2.11,
24422# add some instruction here to (also) show we expect this might work.
24423# ??? Once 2.11 is released, probably need to add first known working
24424# version to the per-target configury.
24425case "$target" in
80486e06 24426 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
cd985f66 24427 | x86_64*-*-* | hppa*-*-* | arm*-*-* \
ad9646c7 24428 | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
15a43677 24429 | spu-*-* | fido*-*-* | m32c-*-*)
9d147085
RH
24430 insn="nop"
24431 ;;
57116d8d 24432 ia64*-*-* | s390*-*-*)
9d147085
RH
24433 insn="nop 0"
24434 ;;
2853bc5a
HPN
24435 mmix-*-*)
24436 insn="swym 0"
24437 ;;
8ada417f
ZW
24438esac
24439if test x"$insn" != x; then
24440 conftest_s="\
24441 .file 1 \"conftest.s\"
24442 .loc 1 3 0
24443 $insn"
5213506e
RW
24444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for dwarf2 debug_line support" >&5
24445$as_echo_n "checking assembler for dwarf2 debug_line support... " >&6; }
24446if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then :
24447 $as_echo_n "(cached) " >&6
8ada417f
ZW
24448else
24449 gcc_cv_as_dwarf2_debug_line=no
24450 if test $in_tree_gas = yes; then
24451 if test $in_tree_gas_is_elf = yes \
24452 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24453 then gcc_cv_as_dwarf2_debug_line=yes
24454fi
24455 elif test x$gcc_cv_as != x; then
6e3f3080 24456 echo "$conftest_s" > conftest.s
e0b0fd74 24457 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24458 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24459 (eval $ac_try) 2>&5
24460 ac_status=$?
5213506e
RW
24461 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24462 test $ac_status = 0; }; }
8ada417f 24463 then
080a5bb0
EB
24464 if test x$gcc_cv_objdump != x \
24465 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
24466 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
24467 gcc_cv_as_dwarf2_debug_line=yes
24468 fi
24469 else
24470 echo "configure: failed program was" >&5
24471 cat conftest.s >&5
24472 fi
24473 rm -f conftest.o conftest.s
24474 fi
24475fi
5213506e
RW
24476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_debug_line" >&5
24477$as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; }
ad9c4d9f 24478
ad9c4d9f 24479
8ada417f
ZW
24480# The .debug_line file table must be in the exact order that
24481# we specified the files, since these indices are also used
24482# by DW_AT_decl_file. Approximate this test by testing if
24483# the assembler bitches if the same index is assigned twice.
5213506e
RW
24484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for buggy dwarf2 .file directive" >&5
24485$as_echo_n "checking assembler for buggy dwarf2 .file directive... " >&6; }
24486if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then :
24487 $as_echo_n "(cached) " >&6
8ada417f
ZW
24488else
24489 gcc_cv_as_dwarf2_file_buggy=no
24490 if test x$gcc_cv_as != x; then
6e3f3080 24491 echo ' .file 1 "foo.s"
8ada417f 24492 .file 1 "bar.s"' > conftest.s
e0b0fd74 24493 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24494 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24495 (eval $ac_try) 2>&5
24496 ac_status=$?
5213506e
RW
24497 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24498 test $ac_status = 0; }; }
8ada417f
ZW
24499 then
24500 gcc_cv_as_dwarf2_file_buggy=yes
24501 else
24502 echo "configure: failed program was" >&5
24503 cat conftest.s >&5
24504 fi
24505 rm -f conftest.o conftest.s
24506 fi
ad9c4d9f 24507fi
5213506e
RW
24508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_file_buggy" >&5
24509$as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; }
8ada417f
ZW
24510
24511
24512 if test $gcc_cv_as_dwarf2_debug_line = yes \
24513 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2 24514
5213506e 24515$as_echo "#define HAVE_AS_DWARF2_DEBUG_LINE 1" >>confdefs.h
9d147085 24516
8ada417f 24517 fi
ad9c4d9f 24518
5213506e
RW
24519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf2 option" >&5
24520$as_echo_n "checking assembler for --gdwarf2 option... " >&6; }
24521if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then :
24522 $as_echo_n "(cached) " >&6
8ada417f
ZW
24523else
24524 gcc_cv_as_gdwarf2_flag=no
24525 if test $in_tree_gas = yes; then
24526 if test $in_tree_gas_is_elf = yes \
24527 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24528 then gcc_cv_as_gdwarf2_flag=yes
24529fi
24530 elif test x$gcc_cv_as != x; then
6e3f3080 24531 echo "$insn" > conftest.s
e0b0fd74 24532 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf2 -o conftest.o conftest.s >&5'
5213506e 24533 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24534 (eval $ac_try) 2>&5
24535 ac_status=$?
5213506e
RW
24536 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24537 test $ac_status = 0; }; }
8ada417f
ZW
24538 then
24539 gcc_cv_as_gdwarf2_flag=yes
24540 else
24541 echo "configure: failed program was" >&5
24542 cat conftest.s >&5
24543 fi
24544 rm -f conftest.o conftest.s
24545 fi
ad9c4d9f 24546fi
5213506e
RW
24547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gdwarf2_flag" >&5
24548$as_echo "$gcc_cv_as_gdwarf2_flag" >&6; }
63cf211a 24549if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2 24550
5213506e 24551$as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2
GK
24552
24553fi
ad9c4d9f 24554
5213506e
RW
24555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
24556$as_echo_n "checking assembler for --gstabs option... " >&6; }
24557if test "${gcc_cv_as_gstabs_flag+set}" = set; then :
24558 $as_echo_n "(cached) " >&6
8ada417f
ZW
24559else
24560 gcc_cv_as_gstabs_flag=no
24561 if test $in_tree_gas = yes; then
24562 if test $in_tree_gas_is_elf = yes \
24563 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24564 then gcc_cv_as_gstabs_flag=yes
24565fi
24566 elif test x$gcc_cv_as != x; then
6e3f3080 24567 echo "$insn" > conftest.s
e0b0fd74 24568 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gstabs -o conftest.o conftest.s >&5'
5213506e 24569 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24570 (eval $ac_try) 2>&5
24571 ac_status=$?
5213506e
RW
24572 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24573 test $ac_status = 0; }; }
8ada417f
ZW
24574 then
24575 # The native Solaris 9/Intel assembler doesn't understand --gstabs
24576 # and warns about it, but still exits successfully. So check for
24577 # this.
ba479fd2 24578 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
5213506e 24579 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24580 (eval $ac_try) 2>&5
24581 ac_status=$?
5213506e
RW
24582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24583 test $ac_status = 0; }; }
8ada417f
ZW
24584 then :
24585 else gcc_cv_as_gstabs_flag=yes
24586 fi
24587 else
24588 echo "configure: failed program was" >&5
24589 cat conftest.s >&5
24590 fi
24591 rm -f conftest.o conftest.s
24592 fi
ad9c4d9f 24593fi
5213506e
RW
24594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gstabs_flag" >&5
24595$as_echo "$gcc_cv_as_gstabs_flag" >&6; }
63cf211a 24596if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2 24597
5213506e 24598$as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2 24599
c8aea42c
PB
24600fi
24601
5213506e
RW
24602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5
24603$as_echo_n "checking assembler for --debug-prefix-map option... " >&6; }
24604if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then :
24605 $as_echo_n "(cached) " >&6
c8aea42c
PB
24606else
24607 gcc_cv_as_debug_prefix_map_flag=no
24608 if test $in_tree_gas = yes; then
303a4698 24609 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
24610 then gcc_cv_as_debug_prefix_map_flag=yes
24611fi
24612 elif test x$gcc_cv_as != x; then
24613 echo "$insn" > conftest.s
e0b0fd74 24614 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
5213506e 24615 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c8aea42c
PB
24616 (eval $ac_try) 2>&5
24617 ac_status=$?
5213506e
RW
24618 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24619 test $ac_status = 0; }; }
c8aea42c
PB
24620 then
24621 gcc_cv_as_debug_prefix_map_flag=yes
24622 else
24623 echo "configure: failed program was" >&5
24624 cat conftest.s >&5
24625 fi
24626 rm -f conftest.o conftest.s
24627 fi
24628fi
5213506e
RW
24629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_debug_prefix_map_flag" >&5
24630$as_echo "$gcc_cv_as_debug_prefix_map_flag" >&6; }
c8aea42c
PB
24631if test $gcc_cv_as_debug_prefix_map_flag = yes; then
24632
5213506e 24633$as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h
c8aea42c 24634
5f0e9ea2 24635fi
8ada417f 24636fi
5f0e9ea2 24637
5213506e
RW
24638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5
24639$as_echo_n "checking assembler for .lcomm with alignment... " >&6; }
24640if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then :
24641 $as_echo_n "(cached) " >&6
28e6bb13
NC
24642else
24643 gcc_cv_as_lcomm_with_alignment=no
24644 if test x$gcc_cv_as != x; then
24645 echo '.lcomm bar,4,16' > conftest.s
e0b0fd74 24646 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24647 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
28e6bb13
NC
24648 (eval $ac_try) 2>&5
24649 ac_status=$?
5213506e
RW
24650 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24651 test $ac_status = 0; }; }
28e6bb13
NC
24652 then
24653 gcc_cv_as_lcomm_with_alignment=yes
24654 else
24655 echo "configure: failed program was" >&5
24656 cat conftest.s >&5
24657 fi
24658 rm -f conftest.o conftest.s
24659 fi
24660fi
5213506e
RW
24661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_lcomm_with_alignment" >&5
24662$as_echo "$gcc_cv_as_lcomm_with_alignment" >&6; }
28e6bb13
NC
24663if test $gcc_cv_as_lcomm_with_alignment = yes; then
24664
5213506e 24665$as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h
28e6bb13
NC
24666
24667fi
24668
5213506e
RW
24669# Check whether --enable-gnu-unique-object was given.
24670if test "${enable_gnu_unique_object+set}" = set; then :
24671 enableval=$enable_gnu_unique_object; case $enable_gnu_unique_object in
e31bcd1b 24672 yes | no) ;;
5213506e
RW
24673 *) as_fn_error "'$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object.
24674Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
e31bcd1b
JM
24675 esac
24676else
5213506e
RW
24677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_unique_object" >&5
24678$as_echo_n "checking assembler for gnu_unique_object... " >&6; }
24679if test "${gcc_cv_as_gnu_unique_object+set}" = set; then :
24680 $as_echo_n "(cached) " >&6
e31bcd1b
JM
24681else
24682 gcc_cv_as_gnu_unique_object=no
24683 if test $in_tree_gas = yes; then
24684 if test $in_tree_gas_is_elf = yes \
24685 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
24686 then gcc_cv_as_gnu_unique_object=yes
24687fi
24688 elif test x$gcc_cv_as != x; then
24689 echo '.type foo, @gnu_unique_object' > conftest.s
e0b0fd74 24690 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24691 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e31bcd1b
JM
24692 (eval $ac_try) 2>&5
24693 ac_status=$?
5213506e
RW
24694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24695 test $ac_status = 0; }; }
e31bcd1b 24696 then
e00ded68 24697 gcc_cv_as_gnu_unique_object=yes
e31bcd1b
JM
24698 else
24699 echo "configure: failed program was" >&5
24700 cat conftest.s >&5
24701 fi
24702 rm -f conftest.o conftest.s
24703 fi
24704fi
5213506e
RW
24705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5
24706$as_echo "$gcc_cv_as_gnu_unique_object" >&6; }
e31bcd1b 24707if test $gcc_cv_as_gnu_unique_object = yes; then
e00ded68
JM
24708 # Also check for ld.so support, i.e. glibc 2.11 or higher.
24709 if test x$host = x$build -a x$host = x$target &&
cdf6bfb7 24710 glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
1a242e3c
UB
24711 glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
24712 glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
e00ded68
JM
24713 glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
24714 if test "$glibcnum" -ge 2011 ; then
24715 enable_gnu_unique_object=yes
24716 fi
24717 fi
e31bcd1b 24718fi
5213506e
RW
24719fi
24720
e31bcd1b
JM
24721if test x$enable_gnu_unique_object = xyes; then
24722
5213506e 24723$as_echo "#define HAVE_GAS_GNU_UNIQUE_OBJECT 1" >>confdefs.h
e31bcd1b
JM
24724
24725fi
24726
5213506e
RW
24727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tolerance to line number 0" >&5
24728$as_echo_n "checking assembler for tolerance to line number 0... " >&6; }
24729if test "${gcc_cv_as_line_zero+set}" = set; then :
24730 $as_echo_n "(cached) " >&6
03943c05
AO
24731else
24732 gcc_cv_as_line_zero=no
24733 if test $in_tree_gas = yes; then
cf0eb7a1
AO
24734 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
24735 then gcc_cv_as_line_zero=yes
03943c05
AO
24736fi
24737 elif test "x$gcc_cv_as" != x; then
24738 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
24739 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
5213506e 24740 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
03943c05
AO
24741 (eval $ac_try) 2>&5
24742 ac_status=$?
5213506e
RW
24743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24744 test $ac_status = 0; }; } &&
03943c05
AO
24745 test "x`cat conftest.out`" = x
24746 then
24747 gcc_cv_as_line_zero=yes
24748 else
24749 echo "configure: failed program was" >&5
24750 cat conftest.s >&5
24751 echo "configure: error output was" >&5
24752 cat conftest.out >&5
24753 fi
24754 rm -f conftest.o conftest.s conftest.out
24755 fi
24756fi
5213506e
RW
24757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_line_zero" >&5
24758$as_echo "$gcc_cv_as_line_zero" >&6; }
03943c05
AO
24759if test "x$gcc_cv_as_line_zero" = xyes; then
24760
5213506e 24761$as_echo "#define HAVE_AS_LINE_ZERO 1" >>confdefs.h
03943c05
AO
24762
24763fi
24764
5213506e
RW
24765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker PT_GNU_EH_FRAME support" >&5
24766$as_echo_n "checking linker PT_GNU_EH_FRAME support... " >&6; }
275b60d6 24767gcc_cv_ld_eh_frame_hdr=no
34a86c2b 24768if test $in_tree_ld = yes ; then
5408ac6c
HPN
24769 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 \
24770 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
24771 gcc_cv_ld_eh_frame_hdr=yes
24772 fi
24773elif test x$gcc_cv_ld != x; then
24774 # Check if linker supports --eh-frame-hdr option
24775 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
24776 gcc_cv_ld_eh_frame_hdr=yes
24777 fi
24778fi
232b67d9 24779
275b60d6 24780if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2 24781
5213506e 24782$as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
275b60d6
JJ
24783
24784fi
5213506e
RW
24785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
24786$as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
275b60d6 24787
5213506e
RW
24788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker position independent executable support" >&5
24789$as_echo_n "checking linker position independent executable support... " >&6; }
24a4dd31
JJ
24790gcc_cv_ld_pie=no
24791if test $in_tree_ld = yes ; then
5408ac6c
HPN
24792 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 \
24793 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
24794 gcc_cv_ld_pie=yes
24795 fi
24796elif test x$gcc_cv_ld != x; then
24797 # Check if linker supports -pie option
24798 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
24799 gcc_cv_ld_pie=yes
24800 fi
24801fi
24802if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2 24803
5213506e 24804$as_echo "#define HAVE_LD_PIE 1" >>confdefs.h
24a4dd31
JJ
24805
24806fi
5213506e
RW
24807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_pie" >&5
24808$as_echo "$gcc_cv_ld_pie" >&6; }
24a4dd31 24809
5213506e
RW
24810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker EH-compatible garbage collection of sections" >&5
24811$as_echo_n "checking linker EH-compatible garbage collection of sections... " >&6; }
22ba88ef 24812gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
24813if test $in_tree_ld = yes ; then
24814 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 \
24815 && test $in_tree_ld_is_elf = yes; then
24816 gcc_cv_ld_eh_gc_sections=yes
24817 fi
24818elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
24819 cat > conftest.s <<EOF
24820 .section .text
24821.globl _start
24822 .type _start, @function
24823_start:
24824 .long foo
24825 .size _start, .-_start
24826 .section .text.foo,"ax",@progbits
24827 .type foo, @function
24828foo:
24829 .long 0
24830 .size foo, .-foo
24831 .section .gcc_except_table.foo,"a",@progbits
24832.L0:
24833 .long 0
24834 .section .eh_frame,"a",@progbits
24835 .long .L0
24836EOF
24837 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24838 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24839 | grep "gc-sections option ignored" > /dev/null; then
24840 gcc_cv_ld_eh_gc_sections=no
2e2b183b
RO
24841 elif $gcc_cv_objdump -h conftest 2> /dev/null \
24842 | grep gcc_except_table > /dev/null; then
b639c3c2
JJ
24843 gcc_cv_ld_eh_gc_sections=yes
24844 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
24845 if test x$gcc_cv_as_comdat_group != xyes; then
24846 gcc_cv_ld_eh_gc_sections=no
24847 cat > conftest.s <<EOF
24848 .section .text
24849.globl _start
24850 .type _start, @function
24851_start:
24852 .long foo
24853 .size _start, .-_start
24854 .section .gnu.linkonce.t.foo,"ax",@progbits
24855 .type foo, @function
24856foo:
24857 .long 0
24858 .size foo, .-foo
24859 .section .gcc_except_table.foo,"a",@progbits
24860.L0:
24861 .long 0
24862 .section .eh_frame,"a",@progbits
24863 .long .L0
24864EOF
24865 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24866 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24867 | grep "gc-sections option ignored" > /dev/null; then
24868 gcc_cv_ld_eh_gc_sections=no
2e2b183b
RO
24869 elif $gcc_cv_objdump -h conftest 2> /dev/null \
24870 | grep gcc_except_table > /dev/null; then
b639c3c2
JJ
24871 gcc_cv_ld_eh_gc_sections=yes
24872 fi
24873 fi
24874 fi
24875 fi
24876 fi
24877 rm -f conftest.s conftest.o conftest
24878fi
e9d207d9
EB
24879case "$target" in
24880 hppa*-*-linux*)
24881 # ??? This apparently exposes a binutils bug with PC-relative relocations.
24882 gcc_cv_ld_eh_gc_sections=no
24883 ;;
24884esac
22ba88ef
EB
24885if test x$gcc_cv_ld_eh_gc_sections = xyes; then
24886
5213506e 24887$as_echo "#define HAVE_LD_EH_GC_SECTIONS 1" >>confdefs.h
22ba88ef
EB
24888
24889fi
5213506e
RW
24890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections" >&5
24891$as_echo "$gcc_cv_ld_eh_gc_sections" >&6; }
22ba88ef 24892
8bb915b6
NN
24893# --------
24894# UNSORTED
24895# --------
24896
5213506e
RW
24897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
24898$as_echo_n "checking linker --as-needed support... " >&6; }
24899if test "${gcc_cv_ld_as_needed+set}" = set; then :
24900 $as_echo_n "(cached) " >&6
82e923f6
RS
24901else
24902 gcc_cv_ld_as_needed=no
765f1bf9
AM
24903if test $in_tree_ld = yes ; then
24904 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 \
24905 && test $in_tree_ld_is_elf = yes; then
24906 gcc_cv_ld_as_needed=yes
24907 fi
24908elif test x$gcc_cv_ld != x; then
24909 # Check if linker supports --as-needed and --no-as-needed options
24910 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
24911 gcc_cv_ld_as_needed=yes
24912 fi
24913fi
82e923f6
RS
24914
24915fi
5213506e
RW
24916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_as_needed" >&5
24917$as_echo "$gcc_cv_ld_as_needed" >&6; }
765f1bf9
AM
24918if test x"$gcc_cv_ld_as_needed" = xyes; then
24919
5213506e 24920$as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h
765f1bf9
AM
24921
24922fi
765f1bf9 24923
d82bf747
AM
24924case "$target:$tm_file" in
24925 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
5213506e
RW
24926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5
24927$as_echo_n "checking linker support for omitting dot symbols... " >&6; }
24928if test "${gcc_cv_ld_no_dot_syms+set}" = set; then :
24929 $as_echo_n "(cached) " >&6
85b776df
AM
24930else
24931 gcc_cv_ld_no_dot_syms=no
24932 if test $in_tree_ld = yes ; then
24933 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
24934 gcc_cv_ld_no_dot_syms=yes
24935 fi
24936 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
24937 cat > conftest1.s <<EOF
24938 .text
24939 bl .foo
24940EOF
24941 cat > conftest2.s <<EOF
24942 .section ".opd","aw"
24943 .align 3
24944 .globl foo
24945 .type foo,@function
24946foo:
24947 .quad .LEfoo,.TOC.@tocbase,0
24948 .text
24949.LEfoo:
24950 blr
24951 .size foo,.-.LEfoo
24952EOF
24953 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
24954 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
24955 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
24956 gcc_cv_ld_no_dot_syms=yes
24957 fi
24958 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
24959 fi
24960
24961fi
5213506e
RW
24962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_no_dot_syms" >&5
24963$as_echo "$gcc_cv_ld_no_dot_syms" >&6; }
85b776df
AM
24964 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
24965
5213506e 24966$as_echo "#define HAVE_LD_NO_DOT_SYMS 1" >>confdefs.h
85b776df 24967
070b27da
AM
24968 fi
24969
24970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker large toc support" >&5
24971$as_echo_n "checking linker large toc support... " >&6; }
24972if test "${gcc_cv_ld_large_toc+set}" = set; then :
24973 $as_echo_n "(cached) " >&6
24974else
24975 gcc_cv_ld_large_toc=no
24976 if test $in_tree_ld = yes ; then
24977 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then
24978 gcc_cv_ld_large_toc=yes
24979 fi
24980 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
24981 cat > conftest.s <<EOF
24982 .section ".tbss","awT",@nobits
24983 .align 3
24984ie0: .space 8
24985 .global _start
24986 .text
24987_start:
24988 addis 9,13,ie0@got@tprel@ha
24989 ld 9,ie0@got@tprel@l(9)
24990EOF
24991 if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \
24992 && $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then
24993 gcc_cv_ld_large_toc=yes
24994 fi
24995 rm -f conftest conftest.o conftest.s
24996 fi
24997
24998fi
24999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_large_toc" >&5
25000$as_echo "$gcc_cv_ld_large_toc" >&6; }
25001 if test x"$gcc_cv_ld_large_toc" = xyes; then
25002
25003$as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h
25004
85b776df
AM
25005 fi
25006 ;;
25007esac
25008
5213506e
RW
25009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5
25010$as_echo_n "checking linker --build-id support... " >&6; }
25011if test "${gcc_cv_ld_buildid+set}" = set; then :
25012 $as_echo_n "(cached) " >&6
cd533689
PP
25013else
25014 gcc_cv_ld_buildid=no
25015 if test $in_tree_ld = yes ; then
25016 if test "$gcc_cv_gld_major_version" -eq 2 -a \
25017 "$gcc_cv_gld_minor_version" -ge 18 -o \
25018 "$gcc_cv_gld_major_version" -gt 2 \
25019 && test $in_tree_ld_is_elf = yes; then
25020 gcc_cv_ld_buildid=yes
25021 fi
25022 elif test x$gcc_cv_ld != x; then
25023 if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then
25024 gcc_cv_ld_buildid=yes
25025 fi
25026 fi
25027fi
5213506e
RW
25028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_buildid" >&5
25029$as_echo "$gcc_cv_ld_buildid" >&6; }
cd533689
PP
25030if test x"$gcc_cv_ld_buildid" = xyes; then
25031
5213506e 25032$as_echo "#define HAVE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
25033
25034fi
25035
5213506e
RW
25036# Check whether --enable-linker-build-id was given.
25037if test "${enable_linker_build_id+set}" = set; then :
25038 enableval=$enable_linker_build_id;
cd533689
PP
25039else
25040 enable_linker_build_id=no
5213506e
RW
25041fi
25042
cd533689
PP
25043
25044if test x"$enable_linker_build_id" = xyes; then
25045 if test x"$gcc_cv_ld_buildid" = xyes; then
25046
5213506e 25047$as_echo "#define ENABLE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
25048
25049 else
5213506e
RW
25050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&5
25051$as_echo "$as_me: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&2;}
cd533689
PP
25052 fi
25053fi
25054
a6198222
RO
25055# In binutils 2.21, GNU ld gained support for new emulations fully
25056# supporting the Solaris 2 ABI. Detect their presence in the linker used.
25057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker *_sol2 emulation support" >&5
25058$as_echo_n "checking linker *_sol2 emulation support... " >&6; }
25059if test "${gcc_cv_ld_sol2_emulation+set}" = set; then :
25060 $as_echo_n "(cached) " >&6
25061else
25062 gcc_cv_ld_sol2_emulation=no
25063 if test $in_tree_ld = yes ; then
25064 if test "$gcc_cv_gld_major_version" -eq 2 -a \
25065 "$gcc_cv_gld_minor_version" -ge 21 -o \
25066 "$gcc_cv_gld_major_version" -gt 2 \
25067 && test $in_tree_ld_is_elf = yes; then
25068 gcc_cv_ld_sol2_emulation=yes
25069 fi
25070 elif test x$gcc_cv_ld != x; then
25071 if $gcc_cv_ld -V 2>/dev/null | sed -e '1,/Supported emulations/d;q' | \
25072 grep _sol2 > /dev/null; then
25073 gcc_cv_ld_sol2_emulation=yes
25074 fi
25075 fi
25076fi
25077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sol2_emulation" >&5
25078$as_echo "$gcc_cv_ld_sol2_emulation" >&6; }
25079if test x"$gcc_cv_ld_sol2_emulation" = xyes; then
25080
25081$as_echo "#define HAVE_LD_SOL2_EMULATION 1" >>confdefs.h
25082
25083fi
25084
5213506e
RW
25085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --sysroot support" >&5
25086$as_echo_n "checking linker --sysroot support... " >&6; }
25087if test "${gcc_cv_ld_sysroot+set}" = set; then :
25088 $as_echo_n "(cached) " >&6
380e5ca4
MM
25089else
25090 gcc_cv_ld_sysroot=no
25091 if test $in_tree_ld = yes ; then
25092 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 25093 gcc_cv_ld_sysroot=yes
380e5ca4
MM
25094 fi
25095 elif test x$gcc_cv_ld != x; then
25096 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
25097 gcc_cv_ld_sysroot=yes
25098 fi
25099 fi
25100fi
5213506e
RW
25101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sysroot" >&5
25102$as_echo "$gcc_cv_ld_sysroot" >&6; }
380e5ca4
MM
25103if test x"$gcc_cv_ld_sysroot" = xyes; then
25104
5213506e 25105$as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h
380e5ca4
MM
25106
25107fi
25108
9fb28a67 25109if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
25110 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
25111 && test "$prefix" != "NONE"; then
ba479fd2
NN
25112
25113cat >>confdefs.h <<_ACEOF
793e9558 25114#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 25115_ACEOF
793e9558
PB
25116
25117fi
25118
77008252 25119# Test for stack protector support in target C library.
5213506e
RW
25120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5
25121$as_echo_n "checking __stack_chk_fail in target C library... " >&6; }
25122if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
25123 $as_echo_n "(cached) " >&6
77008252
JJ
25124else
25125 gcc_cv_libc_provides_ssp=no
a6ccdbab 25126 case "$target" in
22f96a0f 25127 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
77008252 25128 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
b0a69d20
MK
25129 if test "x$with_headers" != x; then
25130 glibc_header_dir=$with_headers
25131 elif test "x$with_sysroot" = x; then
77008252 25132 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
25133 elif test "x$with_build_sysroot" != "x"; then
25134 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
25135 elif test "x$with_sysroot" = xyes; then
25136 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
25137 else
25138 glibc_header_dir="${with_sysroot}/usr/include"
25139 fi
25140 else
25141 glibc_header_dir=/usr/include
25142 fi
25143 # glibc 2.4 and later provides __stack_chk_fail and
25144 # either __stack_chk_guard, or TLS access to stack guard canary.
25145 if test -f $glibc_header_dir/features.h \
25146 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
25147 $glibc_header_dir/features.h > /dev/null; then
25148 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
25149 $glibc_header_dir/features.h > /dev/null; then
25150 gcc_cv_libc_provides_ssp=yes
25151 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
25152 $glibc_header_dir/features.h > /dev/null \
25153 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
25154 $glibc_header_dir/features.h > /dev/null; then
25155 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
25156 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
25157 $glibc_header_dir/features.h > /dev/null && \
25158 test -f $glibc_header_dir/bits/uClibc_config.h && \
25159 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
25160 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
25161 gcc_cv_libc_provides_ssp=yes
77008252 25162 fi
fed6d628 25163 fi
a6ccdbab 25164 ;;
4cc115a2
TS
25165 *-*-gnu*)
25166 # Avoid complicated tests (see
25167 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
25168 # simply assert that glibc does provide this, which is true for all
25169 # realistically usable GNU/Hurd configurations.
25170 gcc_cv_libc_provides_ssp=yes;;
61e1d511 25171 *-*-darwin* | *-*-freebsd*)
5213506e
RW
25172 ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
25173if test "x$ac_cv_func___stack_chk_fail" = x""yes; then :
a6ccdbab
EC
25174 gcc_cv_libc_provides_ssp=yes
25175else
25176 echo "no __stack_chk_fail on this target"
77008252 25177fi
a6ccdbab
EC
25178
25179 ;;
77008252 25180 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
25181 esac
25182fi
5213506e
RW
25183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_libc_provides_ssp" >&5
25184$as_echo "$gcc_cv_libc_provides_ssp" >&6; }
a6ccdbab 25185
77008252
JJ
25186if test x$gcc_cv_libc_provides_ssp = xyes; then
25187
5213506e 25188$as_echo "#define TARGET_LIBC_PROVIDES_SSP 1" >>confdefs.h
77008252
JJ
25189
25190fi
25191
ed965309
JJ
25192# Check if TFmode long double should be used by default or not.
25193# Some glibc targets used DFmode long double, but with glibc 2.4
25194# and later they can use TFmode.
25195case "$target" in
f7cc5390
JM
25196 powerpc*-*-linux* | \
25197 powerpc*-*-gnu* | \
ed965309
JJ
25198 sparc*-*-linux* | \
25199 s390*-*-linux* | \
25200 alpha*-*-linux*)
25201
5213506e
RW
25202# Check whether --with-long-double-128 was given.
25203if test "${with_long_double_128+set}" = set; then :
25204 withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
25205else
25206 gcc_cv_target_ldbl128=no
25207 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
25208 if test "x$with_sysroot" = x; then
25209 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
25210 elif test "x$with_build_sysroot" != "x"; then
25211 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
25212 elif test "x$with_sysroot" = xyes; then
25213 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
25214 else
25215 glibc_header_dir="${with_sysroot}/usr/include"
25216 fi
25217 else
25218 glibc_header_dir=/usr/include
25219 fi
65280f6c 25220 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
25221 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
25222 && gcc_cv_target_ldbl128=yes
65280f6c 25223
5213506e
RW
25224fi
25225
ed965309
JJ
25226 ;;
25227esac
25228if test x$gcc_cv_target_ldbl128 = xyes; then
25229
5213506e 25230$as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h
ed965309
JJ
25231
25232fi
25233
81bf3d9e 25234# Find out what GC implementation we want, or may, use.
ba479fd2 25235
5213506e
RW
25236# Check whether --with-gc was given.
25237if test "${with_gc+set}" = set; then :
25238 withval=$with_gc; case "$withval" in
08cee789 25239 page)
81bf3d9e 25240 GGC=ggc-$withval
08cee789
DJ
25241 ;;
25242 zone)
25243 GGC=ggc-$withval
25244
5213506e 25245$as_echo "#define GGC_ZONE 1" >>confdefs.h
08cee789 25246
81bf3d9e
RH
25247 ;;
25248 *)
5213506e 25249 as_fn_error "$withval is an invalid option to --with-gc" "$LINENO" 5
81bf3d9e
RH
25250 ;;
25251esac
25252else
005537df 25253 GGC=ggc-page
5213506e
RW
25254fi
25255
81bf3d9e
RH
25256
25257echo "Using $GGC for garbage collection."
25258
00020c16
ILT
25259# Libraries to use on the host. This will normally be set by the top
25260# level Makefile. Here we simply capture the value for our Makefile.
25261if test -z "${HOST_LIBS+set}"; then
25262 HOST_LIBS=
25263fi
25264
25265
3c809ba4 25266# Use the system's zlib library.
b8dad04b
ZW
25267zlibdir=-L../zlib
25268zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 25269
5213506e
RW
25270# Check whether --with-system-zlib was given.
25271if test "${with_system_zlib+set}" = set; then :
25272 withval=$with_system_zlib; zlibdir=
3c809ba4
AG
25273zlibinc=
25274
5213506e
RW
25275fi
25276
b8ec3cc8 25277
703d89ab 25278
ab22c1fa 25279
1a4b763e 25280
5213506e
RW
25281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
25282$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
25283 # Check whether --enable-maintainer-mode was given.
25284if test "${enable_maintainer_mode+set}" = set; then :
25285 enableval=$enable_maintainer_mode; maintainer_mode=$enableval
dc6746e7
PT
25286else
25287 maintainer_mode=no
5213506e 25288fi
a6ccdbab 25289
5213506e
RW
25290
25291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5
25292$as_echo "$maintainer_mode" >&6; }
dc6746e7
PT
25293
25294if test "$maintainer_mode" = "yes"; then
25295 MAINT=''
25296else
25297 MAINT='#'
25298fi
25299
8bb915b6
NN
25300# --------------
25301# Language hooks
25302# --------------
25303
861bb6c1
JL
25304# Make empty files to contain the specs and options for each language.
25305# Then add #include lines to for a compiler that has specs and/or options.
25306
cc11cc9b 25307subdirs=
d7b42618 25308lang_opt_files=
861bb6c1 25309lang_specs_files=
3103b7db 25310lang_tree_files=
861bb6c1
JL
25311# These (without "all_") are set in each config-lang.in.
25312# `language' must be a single word so is spelled singularly.
25313all_languages=
861bb6c1 25314all_compilers=
47ad7893 25315all_outputs='Makefile gccbug'
861bb6c1 25316# List of language makefile fragments.
2ed26f6b 25317all_lang_makefrags=
703d89ab 25318# Additional files for gengtype
ef69da62 25319all_gtfiles="$target_gtfiles"
861bb6c1 25320
cc11cc9b
PB
25321# These are the languages that are set in --enable-languages,
25322# and are available in the GCC tree.
25323all_selected_languages=
25324
861bb6c1
JL
25325# Add the language fragments.
25326# Languages are added via two mechanisms. Some information must be
25327# recorded in makefile variables, these are defined in config-lang.in.
25328# We accumulate them and plug them into the main Makefile.
25329# The other mechanism is a set of hooks for each of the main targets
25330# like `clean', `install', etc.
25331
861bb6c1 25332language_hooks="Make-hooks"
861bb6c1 25333
cc11cc9b 25334for lang in ${srcdir}/*/config-lang.in
861bb6c1 25335do
1546bb64
PB
25336 test "$lang" = "${srcdir}/*/config-lang.in" && continue
25337
cc11cc9b
PB
25338 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
25339 if test "x$lang_alias" = x
25340 then
25341 echo "$lang doesn't set \$language." 1>&2
25342 exit 1
25343 fi
25344 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
25345 subdirs="$subdirs $subdir"
349c3166
OH
25346
25347 # $gcc_subdir is where the gcc integration files are to be found
25348 # for a language, both for internal compiler purposes (compiler
25349 # sources implementing front-end to GCC tree converters), and for
25350 # build infrastructure purposes (Make-lang.in, etc.)
25351 #
25352 # This will be <subdir> (relative to $srcdir) if a line like
25353 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
25354 # is found in <langdir>/config-lang.in, and will remain <langdir>
25355 # otherwise.
25356 #
25357 # Except for the language alias (fetched above), the regular
25358 # "config-lang.in" contents are always retrieved from $gcc_subdir,
25359 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
25360 # only this and the language alias.
25361
25362 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
25363 if [ "$gcc_subdir" = "" ]; then
25364 gcc_subdir="$subdir"
25365 fi
25366
cc11cc9b
PB
25367 case ",$enable_languages," in
25368 *,$lang_alias,*)
25369 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
25370 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
25371 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
25372 fi
25373 ;;
25374 esac
25375
cc11cc9b
PB
25376 language=
25377 boot_language=
25378 compilers=
cc11cc9b
PB
25379 outputs=
25380 gtfiles=
1546bb64 25381 subdir_requires=
349c3166 25382 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
25383 if test "x$language" = x
25384 then
349c3166 25385 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
25386 exit 1
25387 fi
1546bb64
PB
25388
25389 ok=:
25390 case ",$enable_languages," in
25391 *,$lang_alias,*) ;;
25392 *)
25393 for i in $subdir_requires; do
b6348cb3 25394 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
25395 ok=false
25396 break
25397 done
25398 ;;
25399 esac
25400 $ok || continue
25401
349c3166
OH
25402 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
25403 if test -f $srcdir/$gcc_subdir/lang.opt; then
25404 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 25405 fi
349c3166
OH
25406 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
25407 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 25408 fi
cc11cc9b 25409 all_languages="$all_languages $language"
cc11cc9b 25410 all_compilers="$all_compilers $compilers"
cc11cc9b 25411 all_outputs="$all_outputs $outputs"
703d89ab 25412 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
d7f09764
DN
25413 case ",$enable_languages," in
25414 *,lto,*)
25415
25416$as_echo "#define ENABLE_LTO 1" >>confdefs.h
25417
25418 enable_lto=yes
25419
3bec79c5
DK
25420 # LTO needs to speak the platform's object file format, and has a
25421 # number of implementations of the required binary file access APIs.
25422 # ELF is the most common, and default. We only link libelf if ELF
25423 # is indeed the selected format.
25424 LTO_BINARY_READER=${lto_binary_reader}
25425 LTO_USE_LIBELF=-lelf
25426 if test "x$lto_binary_reader" != "xlto-elf" ; then
25427 LTO_USE_LIBELF=
25428 fi
25429
25430
d7f09764
DN
25431 ;;
25432 *) ;;
25433 esac
861bb6c1
JL
25434done
25435
8ac9d31f
TJ
25436# Pick up gtfiles for c
25437gtfiles=
8ac9d31f 25438. ${srcdir}/c-config-lang.in
703d89ab 25439all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 25440
cbc59f01 25441check_languages=
cc11cc9b 25442for language in $all_selected_languages
cbc59f01 25443do
cc11cc9b 25444 check_languages="$check_languages check-$language"
cbc59f01
DD
25445done
25446
62b81e45 25447# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 25448# lang.${target}. Only do so for selected languages.
861bb6c1
JL
25449
25450rm -f Make-hooks
25451touch Make-hooks
bd97af06 25452target_list="all.cross start.encap rest.encap tags \
55bcd32b
AJ
25453 install-common install-man install-info install-pdf install-html dvi \
25454 pdf html uninstall info man srcextra srcman srcinfo \
2a4c0366 25455 mostlyclean clean distclean maintainer-clean install-plugin"
cc11cc9b 25456
861bb6c1
JL
25457for t in $target_list
25458do
25459 x=
cc11cc9b 25460 for lang in $all_selected_languages
861bb6c1 25461 do
cc11cc9b 25462 x="$x $lang.$t"
861bb6c1
JL
25463 done
25464 echo "lang.$t: $x" >> Make-hooks
25465done
25466
8bb915b6
NN
25467# --------
25468# UNSORTED
25469# --------
25470
cc06d68c 25471# Create .gdbinit.
861bb6c1 25472
cc06d68c
GP
25473echo "dir ." > .gdbinit
25474echo "dir ${srcdir}" >> .gdbinit
25475if test x$gdb_needs_out_file_path = xyes
25476then
25477 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
25478fi
25479if test "x$subdirs" != x; then
25480 for s in $subdirs
25481 do
25482 echo "dir ${srcdir}/$s" >> .gdbinit
25483 done
861bb6c1 25484fi
cc06d68c 25485echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 25486
15c723f3 25487gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
25488
25489
2ce3c6c6 25490
2bbea3a6
RH
25491# Find a directory in which to install a shared libgcc.
25492
5213506e
RW
25493# Check whether --enable-version-specific-runtime-libs was given.
25494if test "${enable_version_specific_runtime_libs+set}" = set; then :
25495 enableval=$enable_version_specific_runtime_libs;
25496fi
ba479fd2 25497
2bbea3a6
RH
25498
25499
5213506e
RW
25500# Check whether --with-slibdir was given.
25501if test "${with_slibdir+set}" = set; then :
25502 withval=$with_slibdir; slibdir="$with_slibdir"
5b15f277
RH
25503else
25504 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 25505 slibdir='$(libsubdir)'
5b15f277 25506elif test "$host" != "$target"; then
2bbea3a6
RH
25507 slibdir='$(build_tooldir)/lib'
25508else
5b15f277 25509 slibdir='$(libdir)'
2bbea3a6 25510fi
5213506e
RW
25511fi
25512
2bbea3a6
RH
25513
25514
703d89ab 25515# Substitute configuration variables
861bb6c1
JL
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
9b16d2c4 25560
e9a25f70 25561
6e26218f 25562
c8724862 25563
11642c3a
ZW
25564
25565
25566
3d9d2476 25567
e2500fed 25568
a0e527e3 25569
aca600aa
AS
25570
25571
25572
c776a6d0 25573
51b9ff45 25574
861bb6c1 25575
6e3f3080
NN
25576# Echo link setup.
25577if test x${build} = x${host} ; then
25578 if test x${host} = x${target} ; then
25579 echo "Links are now set up to build a native compiler for ${target}." 1>&2
25580 else
25581 echo "Links are now set up to build a cross-compiler" 1>&2
25582 echo " from ${host} to ${target}." 1>&2
25583 fi
25584else
25585 if test x${host} = x${target} ; then
25586 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
25587 echo " for ${target}." 1>&2
25588 else
25589 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
25590 echo " from ${host} to ${target}." 1>&2
25591 fi
25592fi
25593
6de9cd9a
DN
25594
25595
25596
f8bf9252
SP
25597
25598
25599
25600
25601
25602if test "x${CLOOGLIBS}" != "x" ; then
25603
5213506e 25604$as_echo "#define HAVE_cloog 1" >>confdefs.h
f8bf9252 25605
f8bf9252
SP
25606fi
25607
d7f09764
DN
25608
25609
25610if test "x${LIBELFLIBS}" != "x" ; then
25611
25612$as_echo "#define HAVE_libelf 1" >>confdefs.h
25613
25614fi
25615
68a607d8 25616# Check for plugin support
5213506e
RW
25617# Check whether --enable-plugin was given.
25618if test "${enable_plugin+set}" = set; then :
25619 enableval=$enable_plugin; enable_plugin=$enableval
68a607d8
DN
25620else
25621 enable_plugin=yes; default_plugin=yes
5213506e
RW
25622fi
25623
68a607d8
DN
25624
25625pluginlibs=
25626if test x"$enable_plugin" = x"yes"; then
68a607d8 25627
9ec69d2e
JH
25628 case "${host}" in
25629 *-*-darwin*)
25630 export_sym_check="$gcc_cv_nm -g"
25631 ;;
25632 *)
25633 export_sym_check="$gcc_cv_objdump -T"
25634 ;;
25635 esac
601fc26e
SE
25636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5
25637$as_echo_n "checking for exported symbols... " >&6; }
25638 echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
25639 ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
9ec69d2e 25640 if $export_sym_check conftest | grep foobar > /dev/null; then
601fc26e
SE
25641 : # No need to use a flag
25642 else
25643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5
25644$as_echo_n "checking for -rdynamic... " >&6; }
25645 ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
9ec69d2e 25646 if $export_sym_check conftest | grep foobar > /dev/null; then
fcf52686 25647 plugin_rdynamic=yes
601fc26e
SE
25648 pluginlibs="-rdynamic"
25649 else
fcf52686 25650 plugin_rdynamic=no
601fc26e
SE
25651 enable_plugin=no
25652 fi
fcf52686
RO
25653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_rdynamic" >&5
25654$as_echo "$plugin_rdynamic" >&6; }
68a607d8
DN
25655 fi
25656
25657 # Check -ldl
30ce157e 25658 saved_LIBS="$LIBS"
0c2edd9f
ILT
25659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
25660$as_echo_n "checking for library containing dlopen... " >&6; }
25661if test "${ac_cv_search_dlopen+set}" = set; then :
25662 $as_echo_n "(cached) " >&6
25663else
25664 ac_func_search_save_LIBS=$LIBS
25665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8 25666/* end confdefs.h. */
0c2edd9f
ILT
25667
25668/* Override any GCC internal prototype to avoid an error.
25669 Use char because int might match the return type of a GCC
25670 builtin and then its argument prototype would still apply. */
25671#ifdef __cplusplus
25672extern "C"
25673#endif
25674char dlopen ();
68a607d8
DN
25675int
25676main ()
25677{
0c2edd9f 25678return dlopen ();
68a607d8
DN
25679 ;
25680 return 0;
25681}
25682_ACEOF
0c2edd9f
ILT
25683for ac_lib in '' dl; do
25684 if test -z "$ac_lib"; then
25685 ac_res="none required"
25686 else
25687 ac_res=-l$ac_lib
25688 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25689 fi
25690 if ac_fn_c_try_link "$LINENO"; then :
25691 ac_cv_search_dlopen=$ac_res
68a607d8 25692fi
5213506e 25693rm -f core conftest.err conftest.$ac_objext \
0c2edd9f
ILT
25694 conftest$ac_exeext
25695 if test "${ac_cv_search_dlopen+set}" = set; then :
25696 break
25697fi
25698done
25699if test "${ac_cv_search_dlopen+set}" = set; then :
25700
25701else
25702 ac_cv_search_dlopen=no
25703fi
25704rm conftest.$ac_ext
25705LIBS=$ac_func_search_save_LIBS
25706fi
25707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
25708$as_echo "$ac_cv_search_dlopen" >&6; }
25709ac_res=$ac_cv_search_dlopen
25710if test "$ac_res" != no; then :
25711 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25712
25713fi
25714
25715 if test x"$ac_cv_search_dlopen" = x"-ldl"; then
68a607d8
DN
25716 pluginlibs="$pluginlibs -ldl"
25717 fi
30ce157e 25718 LIBS="$saved_LIBS"
68a607d8
DN
25719
25720 # Check that we can build shared objects with -fPIC -shared
30ce157e 25721 saved_LDFLAGS="$LDFLAGS"
9ec69d2e
JH
25722 case "${host}" in
25723 *-*-darwin*)
25724 LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
25725 ;;
25726 *)
25727 LDFLAGS="$LDFLAGS -fPIC -shared"
25728 ;;
25729 esac
5213506e
RW
25730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
25731$as_echo_n "checking for -fPIC -shared... " >&6; }
25732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8
DN
25733/* end confdefs.h. */
25734extern int X;
25735int
25736main ()
25737{
25738return X == 0;
25739 ;
25740 return 0;
25741}
25742_ACEOF
5213506e
RW
25743if ac_fn_c_try_link "$LINENO"; then :
25744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25745$as_echo "yes" >&6; }; have_pic_shared=yes
68a607d8 25746else
5213506e
RW
25747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25748$as_echo "no" >&6; }; have_pic_shared=no
68a607d8 25749fi
5213506e
RW
25750rm -f core conftest.err conftest.$ac_objext \
25751 conftest$ac_exeext conftest.$ac_ext
0c2edd9f 25752 if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
68a607d8
DN
25753 pluginlibs=
25754 enable_plugin=no
25755 fi
30ce157e 25756 LDFLAGS="$saved_LDFLAGS"
68a607d8
DN
25757
25758 # If plugin support had been requested but not available, fail.
25759 if test x"$enable_plugin" = x"no" ; then
25760 if test x"$default_plugin" != x"yes"; then
5213506e 25761 as_fn_error "
68a607d8 25762Building GCC with plugin support requires a host that supports
5213506e 25763-fPIC, -shared, -ldl and -rdynamic." "$LINENO" 5
68a607d8
DN
25764 fi
25765 fi
68a607d8
DN
25766fi
25767
25768
25769
25770if test x"$enable_plugin" = x"yes"; then
25771
5213506e 25772$as_echo "#define ENABLE_PLUGIN 1" >>confdefs.h
68a607d8
DN
25773
25774fi
25775
6e3f3080
NN
25776# Configure the subdirectories
25777# AC_CONFIG_SUBDIRS($subdirs)
25778
25779# Create the Makefile
25780# and configure language subdirectories
5213506e 25781ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
25782
25783
5213506e 25784ac_config_commands="$ac_config_commands default"
914c5af7 25785
ba479fd2 25786cat >confcache <<\_ACEOF
6e3f3080
NN
25787# This file is a shell script that caches the results of configure
25788# tests run on this system so they can be shared between configure
ba479fd2
NN
25789# scripts and configure runs, see configure's option --config-cache.
25790# It is not useful on other systems. If it contains results you don't
25791# want to keep, you may remove or edit it.
6e3f3080 25792#
ba479fd2
NN
25793# config.status only pays attention to the cache file if you give it
25794# the --recheck option to rerun configure.
6e3f3080 25795#
ba479fd2
NN
25796# `ac_cv_env_foo' variables (set or unset) will be overridden when
25797# loading this file, other *unset* `ac_cv_foo' will be assigned the
25798# following values.
25799
25800_ACEOF
25801
6e3f3080
NN
25802# The following way of writing the cache mishandles newlines in values,
25803# but we know of no workaround that is simple, portable, and efficient.
5213506e 25804# So, we kill variables containing newlines.
6e3f3080
NN
25805# Ultrix sh set writes to stderr and can't be redirected directly,
25806# and sets the high bit in the cache file unless we assign to the vars.
5213506e
RW
25807(
25808 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25809 eval ac_val=\$$ac_var
25810 case $ac_val in #(
25811 *${as_nl}*)
25812 case $ac_var in #(
25813 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25814$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25815 esac
25816 case $ac_var in #(
25817 _ | IFS | as_nl) ;; #(
25818 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25819 *) { eval $ac_var=; unset $ac_var;} ;;
25820 esac ;;
25821 esac
25822 done
25823
ba479fd2 25824 (set) 2>&1 |
5213506e
RW
25825 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25826 *${as_nl}ac_space=\ *)
25827 # `set' does not quote correctly, so add quotes: double-quote
25828 # substitution turns \\\\ into \\, and sed turns \\ into \.
ba479fd2 25829 sed -n \
86da66b5
HPN
25830 "s/'/'\\\\''/g;
25831 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5213506e 25832 ;; #(
ba479fd2
NN
25833 *)
25834 # `set' quotes correctly as required by POSIX, so do not add quotes.
5213506e 25835 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 25836 ;;
5213506e
RW
25837 esac |
25838 sort
25839) |
ba479fd2 25840 sed '
5213506e 25841 /^ac_cv_env_/b end
ba479fd2 25842 t clear
5213506e 25843 :clear
ba479fd2
NN
25844 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25845 t end
5213506e
RW
25846 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25847 :end' >>confcache
25848if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25849 if test -w "$cache_file"; then
25850 test "x$cache_file" != "x/dev/null" &&
25851 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25852$as_echo "$as_me: updating cache $cache_file" >&6;}
ba479fd2 25853 cat confcache >$cache_file
6e3f3080 25854 else
5213506e
RW
25855 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25856$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6e3f3080
NN
25857 fi
25858fi
25859rm -f confcache
25860
25861test "x$prefix" = xNONE && prefix=$ac_default_prefix
25862# Let make expand exec_prefix.
25863test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25864
63cf211a 25865DEFS=-DHAVE_CONFIG_H
6e3f3080 25866
ba479fd2
NN
25867ac_libobjs=
25868ac_ltlibobjs=
25869for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25870 # 1. Remove the extension, and $U if already installed.
5213506e
RW
25871 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25872 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25873 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25874 # will be set to the directory where LIBOBJS objects are built.
25875 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25876 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
ba479fd2
NN
25877done
25878LIBOBJS=$ac_libobjs
63cf211a 25879
ba479fd2
NN
25880LTLIBOBJS=$ac_ltlibobjs
25881
25882
25883
5213506e 25884
ba479fd2 25885: ${CONFIG_STATUS=./config.status}
5213506e 25886ac_write_fail=0
ba479fd2
NN
25887ac_clean_files_save=$ac_clean_files
25888ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5213506e
RW
25889{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25890$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25891as_write_fail=0
25892cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
ba479fd2
NN
25893#! $SHELL
25894# Generated by $as_me.
6e3f3080
NN
25895# Run this file to recreate the current configuration.
25896# Compiler output produced by configure, useful for debugging
ba479fd2 25897# configure, is in config.log if it exists.
6e3f3080 25898
ba479fd2
NN
25899debug=false
25900ac_cs_recheck=false
25901ac_cs_silent=false
ba479fd2 25902
5213506e
RW
25903SHELL=\${CONFIG_SHELL-$SHELL}
25904export SHELL
25905_ASEOF
25906cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25907## -------------------- ##
25908## M4sh Initialization. ##
25909## -------------------- ##
ba479fd2 25910
5213506e
RW
25911# Be more Bourne compatible
25912DUALCASE=1; export DUALCASE # for MKS sh
25913if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
ba479fd2
NN
25914 emulate sh
25915 NULLCMD=:
5213506e 25916 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
ba479fd2
NN
25917 # is contrary to our usage. Disable this feature.
25918 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
25919 setopt NO_GLOB_SUBST
25920else
25921 case `(set -o) 2>/dev/null` in #(
25922 *posix*) :
25923 set -o posix ;; #(
25924 *) :
25925 ;;
25926esac
2f41c1d6 25927fi
ab22c1fa 25928
5213506e
RW
25929
25930as_nl='
25931'
25932export as_nl
25933# Printing a long string crashes Solaris 7 /usr/bin/printf.
25934as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25935as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25936as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25937# Prefer a ksh shell builtin over an external printf program on Solaris,
25938# but without wasting forks for bash or zsh.
25939if test -z "$BASH_VERSION$ZSH_VERSION" \
25940 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25941 as_echo='print -r --'
25942 as_echo_n='print -rn --'
25943elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25944 as_echo='printf %s\n'
25945 as_echo_n='printf %s'
25946else
25947 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25948 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25949 as_echo_n='/usr/ucb/echo -n'
25950 else
25951 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25952 as_echo_n_body='eval
25953 arg=$1;
25954 case $arg in #(
25955 *"$as_nl"*)
25956 expr "X$arg" : "X\\(.*\\)$as_nl";
25957 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25958 esac;
25959 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25960 '
25961 export as_echo_n_body
25962 as_echo_n='sh -c $as_echo_n_body as_echo'
25963 fi
25964 export as_echo_body
25965 as_echo='sh -c $as_echo_body as_echo'
25966fi
25967
25968# The user is always right.
25969if test "${PATH_SEPARATOR+set}" != set; then
25970 PATH_SEPARATOR=:
25971 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25972 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25973 PATH_SEPARATOR=';'
25974 }
1a4b763e
BS
25975fi
25976
ab22c1fa 25977
5213506e
RW
25978# IFS
25979# We need space, tab and new line, in precisely that order. Quoting is
25980# there to prevent editors from complaining about space-tab.
25981# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25982# splitting by setting IFS to empty value.)
25983IFS=" "" $as_nl"
25984
25985# Find who we are. Look in the path if we contain no directory separator.
25986case $0 in #((
25987 *[\\/]* ) as_myself=$0 ;;
25988 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25989for as_dir in $PATH
25990do
25991 IFS=$as_save_IFS
25992 test -z "$as_dir" && as_dir=.
25993 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25994 done
25995IFS=$as_save_IFS
25996
25997 ;;
25998esac
25999# We did not find ourselves, most probably we were run as `sh COMMAND'
26000# in which case we are not to be found in the path.
26001if test "x$as_myself" = x; then
26002 as_myself=$0
26003fi
26004if test ! -f "$as_myself"; then
26005 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26006 exit 1
26007fi
26008
26009# Unset variables that we do not need and which cause bugs (e.g. in
26010# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
26011# suppresses any "Segmentation fault" message there. '((' could
26012# trigger a bug in pdksh 5.2.14.
26013for as_var in BASH_ENV ENV MAIL MAILPATH
26014do eval test x\${$as_var+set} = xset \
26015 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26016done
1a4b763e
BS
26017PS1='$ '
26018PS2='> '
26019PS4='+ '
26020
26021# NLS nuisances.
5213506e
RW
26022LC_ALL=C
26023export LC_ALL
26024LANGUAGE=C
26025export LANGUAGE
26026
26027# CDPATH.
26028(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26029
26030
26031# as_fn_error ERROR [LINENO LOG_FD]
26032# ---------------------------------
26033# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26034# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26035# script with status $?, using 1 if that was 0.
26036as_fn_error ()
26037{
26038 as_status=$?; test $as_status -eq 0 && as_status=1
26039 if test "$3"; then
26040 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26041 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
1a4b763e 26042 fi
5213506e
RW
26043 $as_echo "$as_me: error: $1" >&2
26044 as_fn_exit $as_status
26045} # as_fn_error
26046
26047
26048# as_fn_set_status STATUS
26049# -----------------------
26050# Set $? to STATUS, without forking.
26051as_fn_set_status ()
26052{
26053 return $1
26054} # as_fn_set_status
26055
26056# as_fn_exit STATUS
26057# -----------------
26058# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26059as_fn_exit ()
26060{
26061 set +e
26062 as_fn_set_status $1
26063 exit $1
26064} # as_fn_exit
26065
26066# as_fn_unset VAR
26067# ---------------
26068# Portably unset VAR.
26069as_fn_unset ()
26070{
26071 { eval $1=; unset $1;}
26072}
26073as_unset=as_fn_unset
26074# as_fn_append VAR VALUE
26075# ----------------------
26076# Append the text in VALUE to the end of the definition contained in VAR. Take
26077# advantage of any shell optimizations that allow amortized linear growth over
26078# repeated appends, instead of the typical quadratic growth present in naive
26079# implementations.
26080if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26081 eval 'as_fn_append ()
26082 {
26083 eval $1+=\$2
26084 }'
26085else
26086 as_fn_append ()
26087 {
26088 eval $1=\$$1\$2
26089 }
26090fi # as_fn_append
26091
26092# as_fn_arith ARG...
26093# ------------------
26094# Perform arithmetic evaluation on the ARGs, and store the result in the
26095# global $as_val. Take advantage of shells that can avoid forks. The arguments
26096# must be portable across $(()) and expr.
26097if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26098 eval 'as_fn_arith ()
26099 {
26100 as_val=$(( $* ))
26101 }'
26102else
26103 as_fn_arith ()
26104 {
26105 as_val=`expr "$@" || test $? -eq 1`
26106 }
26107fi # as_fn_arith
1a4b763e 26108
5213506e
RW
26109
26110if expr a : '\(a\)' >/dev/null 2>&1 &&
26111 test "X`expr 00001 : '.*\(...\)'`" = X001; then
1a4b763e
BS
26112 as_expr=expr
26113else
26114 as_expr=false
26115fi
26116
5213506e 26117if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1a4b763e
BS
26118 as_basename=basename
26119else
26120 as_basename=false
26121fi
26122
5213506e
RW
26123if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26124 as_dirname=dirname
26125else
26126 as_dirname=false
26127fi
1a4b763e 26128
5213506e 26129as_me=`$as_basename -- "$0" ||
1a4b763e
BS
26130$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26131 X"$0" : 'X\(//\)$' \| \
5213506e
RW
26132 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26133$as_echo X/"$0" |
26134 sed '/^.*\/\([^/][^/]*\)\/*$/{
26135 s//\1/
26136 q
26137 }
26138 /^X\/\(\/\/\)$/{
26139 s//\1/
26140 q
26141 }
26142 /^X\/\(\/\).*/{
26143 s//\1/
26144 q
26145 }
26146 s/.*/./; q'`
b61ff9c8 26147
b61ff9c8
BS
26148# Avoid depending upon Character Ranges.
26149as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26150as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26151as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26152as_cr_digits='0123456789'
26153as_cr_alnum=$as_cr_Letters$as_cr_digits
26154
5213506e
RW
26155ECHO_C= ECHO_N= ECHO_T=
26156case `echo -n x` in #(((((
26157-n*)
26158 case `echo 'xy\c'` in
26159 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26160 xy) ECHO_C='\c';;
26161 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
26162 ECHO_T=' ';;
26163 esac;;
26164*)
26165 ECHO_N='-n';;
ba479fd2
NN
26166esac
26167
ba479fd2 26168rm -f conf$$ conf$$.exe conf$$.file
5213506e
RW
26169if test -d conf$$.dir; then
26170 rm -f conf$$.dir/conf$$.file
26171else
26172 rm -f conf$$.dir
26173 mkdir conf$$.dir 2>/dev/null
26174fi
26175if (echo >conf$$.file) 2>/dev/null; then
26176 if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8 26177 as_ln_s='ln -s'
5213506e
RW
26178 # ... but there are two gotchas:
26179 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26180 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26181 # In both cases, we have to default to `cp -p'.
26182 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26183 as_ln_s='cp -p'
26184 elif ln conf$$.file conf$$ 2>/dev/null; then
26185 as_ln_s=ln
26186 else
26187 as_ln_s='cp -p'
b61ff9c8 26188 fi
ba479fd2
NN
26189else
26190 as_ln_s='cp -p'
26191fi
5213506e
RW
26192rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26193rmdir conf$$.dir 2>/dev/null
26194
26195
26196# as_fn_mkdir_p
26197# -------------
26198# Create "$as_dir" as a directory, including parents if necessary.
26199as_fn_mkdir_p ()
26200{
26201
26202 case $as_dir in #(
26203 -*) as_dir=./$as_dir;;
26204 esac
26205 test -d "$as_dir" || eval $as_mkdir_p || {
26206 as_dirs=
26207 while :; do
26208 case $as_dir in #(
26209 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26210 *) as_qdir=$as_dir;;
26211 esac
26212 as_dirs="'$as_qdir' $as_dirs"
26213 as_dir=`$as_dirname -- "$as_dir" ||
26214$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26215 X"$as_dir" : 'X\(//\)[^/]' \| \
26216 X"$as_dir" : 'X\(//\)$' \| \
26217 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26218$as_echo X"$as_dir" |
26219 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26220 s//\1/
26221 q
26222 }
26223 /^X\(\/\/\)[^/].*/{
26224 s//\1/
26225 q
26226 }
26227 /^X\(\/\/\)$/{
26228 s//\1/
26229 q
26230 }
26231 /^X\(\/\).*/{
26232 s//\1/
26233 q
26234 }
26235 s/.*/./; q'`
26236 test -d "$as_dir" && break
26237 done
26238 test -z "$as_dirs" || eval "mkdir $as_dirs"
26239 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
26240
ba479fd2 26241
5213506e 26242} # as_fn_mkdir_p
ba479fd2 26243if mkdir -p . 2>/dev/null; then
5213506e 26244 as_mkdir_p='mkdir -p "$as_dir"'
ba479fd2 26245else
86da66b5 26246 test -d ./-p && rmdir ./-p
ba479fd2
NN
26247 as_mkdir_p=false
26248fi
26249
5213506e
RW
26250if test -x / >/dev/null 2>&1; then
26251 as_test_x='test -x'
26252else
26253 if ls -dL / >/dev/null 2>&1; then
26254 as_ls_L_option=L
26255 else
26256 as_ls_L_option=
26257 fi
26258 as_test_x='
26259 eval sh -c '\''
26260 if test -d "$1"; then
26261 test -d "$1/.";
26262 else
26263 case $1 in #(
26264 -*)set "./$1";;
26265 esac;
26266 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
26267 ???[sx]*):;;*)false;;esac;fi
26268 '\'' sh
26269 '
26270fi
26271as_executable_p=$as_test_x
ba479fd2
NN
26272
26273# Sed expression to map a string onto a valid CPP name.
86da66b5 26274as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
26275
26276# Sed expression to map a string onto a valid variable name.
86da66b5 26277as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
26278
26279
ba479fd2 26280exec 6>&1
5213506e
RW
26281## ----------------------------------- ##
26282## Main body of $CONFIG_STATUS script. ##
26283## ----------------------------------- ##
26284_ASEOF
26285test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
ba479fd2 26286
5213506e
RW
26287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26288# Save the log message, to keep $0 and so on meaningful, and to
ba479fd2 26289# report actual input values of CONFIG_FILES etc. instead of their
5213506e
RW
26290# values after options handling.
26291ac_log="
ba479fd2 26292This file was extended by $as_me, which was
5213506e 26293generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2
NN
26294
26295 CONFIG_FILES = $CONFIG_FILES
26296 CONFIG_HEADERS = $CONFIG_HEADERS
26297 CONFIG_LINKS = $CONFIG_LINKS
26298 CONFIG_COMMANDS = $CONFIG_COMMANDS
26299 $ $0 $@
26300
5213506e
RW
26301on `(hostname || uname -n) 2>/dev/null | sed 1q`
26302"
26303
ba479fd2
NN
26304_ACEOF
26305
5213506e
RW
26306case $ac_config_files in *"
26307"*) set x $ac_config_files; shift; ac_config_files=$*;;
26308esac
2f41c1d6 26309
5213506e
RW
26310case $ac_config_headers in *"
26311"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26312esac
b61ff9c8 26313
b61ff9c8 26314
5213506e
RW
26315cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26316# Files that config.status was made for.
26317config_files="$ac_config_files"
26318config_headers="$ac_config_headers"
26319config_commands="$ac_config_commands"
ba479fd2 26320
5213506e 26321_ACEOF
b61ff9c8 26322
5213506e 26323cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2 26324ac_cs_usage="\
5213506e
RW
26325\`$as_me' instantiates files and other configuration actions
26326from templates according to the current configuration. Unless the files
26327and actions are specified as TAGs, all are instantiated by default.
ba479fd2 26328
5213506e 26329Usage: $0 [OPTION]... [TAG]...
ba479fd2
NN
26330
26331 -h, --help print this help, then exit
5213506e
RW
26332 -V, --version print version number and configuration settings, then exit
26333 -q, --quiet, --silent
26334 do not print progress messages
ba479fd2
NN
26335 -d, --debug don't remove temporary files
26336 --recheck update $as_me by reconfiguring in the same conditions
5213506e
RW
26337 --file=FILE[:TEMPLATE]
26338 instantiate the configuration file FILE
26339 --header=FILE[:TEMPLATE]
26340 instantiate the configuration header FILE
ba479fd2
NN
26341
26342Configuration files:
26343$config_files
26344
26345Configuration headers:
26346$config_headers
26347
26348Configuration commands:
26349$config_commands
26350
5213506e 26351Report bugs to the package provider."
b61ff9c8 26352
5213506e
RW
26353_ACEOF
26354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2
NN
26355ac_cs_version="\\
26356config.status
5213506e
RW
26357configured by $0, generated by GNU Autoconf 2.64,
26358 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 26359
5213506e 26360Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
26361This config.status script is free software; the Free Software Foundation
26362gives unlimited permission to copy, distribute and modify it."
5213506e
RW
26363
26364ac_pwd='$ac_pwd'
26365srcdir='$srcdir'
26366AWK='$AWK'
26367test -n "\$AWK" || AWK=awk
ba479fd2
NN
26368_ACEOF
26369
5213506e
RW
26370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26371# The default lists apply if the user does not specify any file.
ba479fd2
NN
26372ac_need_defaults=:
26373while test $# != 0
26374do
26375 case $1 in
26376 --*=*)
5213506e
RW
26377 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26378 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ba479fd2
NN
26379 ac_shift=:
26380 ;;
5213506e 26381 *)
ba479fd2
NN
26382 ac_option=$1
26383 ac_optarg=$2
26384 ac_shift=shift
26385 ;;
ba479fd2
NN
26386 esac
26387
26388 case $ac_option in
26389 # Handling of the options.
ba479fd2
NN
26390 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26391 ac_cs_recheck=: ;;
5213506e
RW
26392 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26393 $as_echo "$ac_cs_version"; exit ;;
26394 --debug | --debu | --deb | --de | --d | -d )
ba479fd2
NN
26395 debug=: ;;
26396 --file | --fil | --fi | --f )
26397 $ac_shift
5213506e
RW
26398 case $ac_optarg in
26399 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26400 esac
26401 as_fn_append CONFIG_FILES " '$ac_optarg'"
ba479fd2
NN
26402 ac_need_defaults=false;;
26403 --header | --heade | --head | --hea )
26404 $ac_shift
5213506e
RW
26405 case $ac_optarg in
26406 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26407 esac
26408 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ba479fd2 26409 ac_need_defaults=false;;
5213506e
RW
26410 --he | --h)
26411 # Conflict between --help and --header
26412 as_fn_error "ambiguous option: \`$1'
26413Try \`$0 --help' for more information.";;
26414 --help | --hel | -h )
26415 $as_echo "$ac_cs_usage"; exit ;;
ba479fd2
NN
26416 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26417 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26418 ac_cs_silent=: ;;
26419
26420 # This is an error.
5213506e
RW
26421 -*) as_fn_error "unrecognized option: \`$1'
26422Try \`$0 --help' for more information." ;;
ba479fd2 26423
5213506e
RW
26424 *) as_fn_append ac_config_targets " $1"
26425 ac_need_defaults=false ;;
ba479fd2
NN
26426
26427 esac
26428 shift
6e3f3080 26429done
ba479fd2
NN
26430
26431ac_configure_extra_args=
26432
26433if $ac_cs_silent; then
26434 exec 6>/dev/null
26435 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
26436fi
26437
ba479fd2 26438_ACEOF
5213506e 26439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 26440if \$ac_cs_recheck; then
5213506e
RW
26441 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26442 shift
26443 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26444 CONFIG_SHELL='$SHELL'
26445 export CONFIG_SHELL
26446 exec "\$@"
ba479fd2 26447fi
861bb6c1 26448
ba479fd2 26449_ACEOF
5213506e
RW
26450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26451exec 5>>config.log
26452{
26453 echo
26454 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26455## Running $as_me. ##
26456_ASBOX
26457 $as_echo "$ac_log"
26458} >&5
ba479fd2 26459
5213506e
RW
26460_ACEOF
26461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 26462#
5213506e 26463# INIT-COMMANDS
ba479fd2 26464#
ba479fd2 26465subdirs='$subdirs'
ba479fd2
NN
26466
26467_ACEOF
26468
5213506e 26469cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1a4b763e 26470
5213506e 26471# Handling of arguments.
ba479fd2
NN
26472for ac_config_target in $ac_config_targets
26473do
5213506e
RW
26474 case $ac_config_target in
26475 "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
26476 "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
26477 "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
26478 "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
26479 "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
26480 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26481
26482 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
861bb6c1 26483 esac
ba479fd2
NN
26484done
26485
5213506e 26486
ba479fd2
NN
26487# If the user did not use the arguments to specify the items to instantiate,
26488# then the envvar interface is used. Set only those that are not.
26489# We use the long form for the default assignment because of an extremely
26490# bizarre bug on SunOS 4.1.3.
26491if $ac_need_defaults; then
26492 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26493 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26494 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26495fi
26496
26497# Have a temporary directory for convenience. Make it in the build tree
5213506e 26498# simply because there is no reason against having it here, and in addition,
ba479fd2 26499# creating and moving files from /tmp can sometimes cause problems.
5213506e
RW
26500# Hook for its removal unless debugging.
26501# Note that there is a small window in which the directory will not be cleaned:
26502# after its creation but before its name has been assigned to `$tmp'.
ba479fd2
NN
26503$debug ||
26504{
5213506e
RW
26505 tmp=
26506 trap 'exit_status=$?
26507 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26508' 0
26509 trap 'as_fn_exit 1' 1 2 13 15
ba479fd2 26510}
ba479fd2 26511# Create a (secure) tmp directory for tmp files.
6e3f3080 26512
ba479fd2 26513{
5213506e 26514 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ba479fd2
NN
26515 test -n "$tmp" && test -d "$tmp"
26516} ||
26517{
5213506e
RW
26518 tmp=./conf$$-$RANDOM
26519 (umask 077 && mkdir "$tmp")
26520} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
26521
26522# Set up the scripts for CONFIG_FILES section.
26523# No need to generate them if there are no CONFIG_FILES.
26524# This happens for instance with `./config.status config.h'.
26525if test -n "$CONFIG_FILES"; then
26526
26527if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
26528 ac_cs_awk_getline=:
26529 ac_cs_awk_pipe_init=
26530 ac_cs_awk_read_file='
26531 while ((getline aline < (F[key])) > 0)
26532 print(aline)
26533 close(F[key])'
26534 ac_cs_awk_pipe_fini=
26535else
26536 ac_cs_awk_getline=false
26537 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
26538 ac_cs_awk_read_file='
26539 print "|#_!!_#|"
26540 print "cat " F[key] " &&"
26541 '$ac_cs_awk_pipe_init
26542 # The final `:' finishes the AND list.
26543 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
26544fi
26545ac_cr=`echo X | tr X '\015'`
26546# On cygwin, bash can eat \r inside `` if the user requested igncr.
26547# But we know of no other shell where ac_cr would be empty at this
26548# point, so we can use a bashism as a fallback.
26549if test "x$ac_cr" = x; then
26550 eval ac_cr=\$\'\\r\'
26551fi
26552ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26553if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26554 ac_cs_awk_cr='\r'
26555else
26556 ac_cs_awk_cr=$ac_cr
26557fi
26558
26559echo 'BEGIN {' >"$tmp/subs1.awk" &&
26560_ACEOF
26561
26562# Create commands to substitute file output variables.
ba479fd2 26563{
5213506e
RW
26564 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
26565 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
26566 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
26567 echo "_ACAWK" &&
26568 echo "_ACEOF"
26569} >conf$$files.sh &&
26570. ./conf$$files.sh ||
26571 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26572rm -f conf$$files.sh
ba479fd2 26573
5213506e
RW
26574{
26575 echo "cat >conf$$subs.awk <<_ACEOF" &&
26576 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26577 echo "_ACEOF"
26578} >conf$$subs.sh ||
26579 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26580ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
26581ac_delim='%!_!# '
26582for ac_last_try in false false false false false :; do
26583 . ./conf$$subs.sh ||
26584 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26585
26586 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26587 if test $ac_delim_n = $ac_delim_num; then
26588 break
26589 elif $ac_last_try; then
26590 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26591 else
26592 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26593 fi
26594done
26595rm -f conf$$subs.sh
26596
26597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26598cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
26599_ACEOF
26600sed -n '
26601h
26602s/^/S["/; s/!.*/"]=/
26603p
26604g
26605s/^[^!]*!//
26606:repl
26607t repl
26608s/'"$ac_delim"'$//
26609t delim
26610:nl
26611h
26612s/\(.\{148\}\).*/\1/
26613t more1
26614s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26615p
26616n
26617b repl
26618:more1
26619s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26620p
26621g
26622s/.\{148\}//
26623t nl
26624:delim
26625h
26626s/\(.\{148\}\).*/\1/
26627t more2
26628s/["\\]/\\&/g; s/^/"/; s/$/"/
26629p
26630b
26631:more2
26632s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26633p
26634g
26635s/.\{148\}//
26636t delim
26637' <conf$$subs.awk | sed '
26638/^[^""]/{
26639 N
26640 s/\n//
26641}
26642' >>$CONFIG_STATUS || ac_write_fail=1
26643rm -f conf$$subs.awk
26644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26645_ACAWK
26646cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26647 for (key in S) S_is_set[key] = 1
26648 FS = "\a"
26649 \$ac_cs_awk_pipe_init
26650}
26651{
26652 line = $ 0
26653 nfields = split(line, field, "@")
26654 substed = 0
26655 len = length(field[1])
26656 for (i = 2; i < nfields; i++) {
26657 key = field[i]
26658 keylen = length(key)
26659 if (S_is_set[key]) {
26660 value = S[key]
26661 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26662 len += length(value) + length(field[++i])
26663 substed = 1
26664 } else
26665 len += 1 + keylen
26666 }
26667 if (nfields == 3 && !substed) {
26668 key = field[2]
26669 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
26670 \$ac_cs_awk_read_file
26671 next
26672 }
26673 }
26674 print line
26675}
26676\$ac_cs_awk_pipe_fini
26677_ACAWK
26678_ACEOF
26679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26680if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26681 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26682else
26683 cat
26684fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26685 || as_fn_error "could not setup config files machinery" "$LINENO" 5
b61ff9c8
BS
26686_ACEOF
26687
5213506e
RW
26688# VPATH may cause trouble with some makes, so we remove $(srcdir),
26689# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26690# trailing colons and then remove the whole line if VPATH becomes empty
26691# (actually we leave an empty line to preserve line numbers).
26692if test "x$srcdir" = x.; then
26693 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26694s/:*\$(srcdir):*/:/
26695s/:*\${srcdir}:*/:/
26696s/:*@srcdir@:*/:/
26697s/^\([^=]*=[ ]*\):*/\1/
26698s/:*$//
26699s/^[^=]*=[ ]*$//
26700}'
26701fi
ba479fd2 26702
5213506e
RW
26703cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26704fi # test -n "$CONFIG_FILES"
b61ff9c8 26705
5213506e
RW
26706# Set up the scripts for CONFIG_HEADERS section.
26707# No need to generate them if there are no CONFIG_HEADERS.
26708# This happens for instance with `./config.status Makefile'.
26709if test -n "$CONFIG_HEADERS"; then
26710cat >"$tmp/defines.awk" <<\_ACAWK ||
26711BEGIN {
b61ff9c8
BS
26712_ACEOF
26713
5213506e
RW
26714# Transform confdefs.h into an awk script `defines.awk', embedded as
26715# here-document in config.status, that substitutes the proper values into
26716# config.h.in to produce config.h.
26717
26718# Create a delimiter string that does not exist in confdefs.h, to ease
26719# handling of long lines.
26720ac_delim='%!_!# '
26721for ac_last_try in false false :; do
26722 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26723 if test -z "$ac_t"; then
26724 break
26725 elif $ac_last_try; then
26726 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
26727 else
26728 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1a4b763e 26729 fi
5213506e 26730done
1a4b763e 26731
5213506e
RW
26732# For the awk script, D is an array of macro values keyed by name,
26733# likewise P contains macro parameters if any. Preserve backslash
26734# newline sequences.
26735
26736ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26737sed -n '
26738s/.\{148\}/&'"$ac_delim"'/g
26739t rset
26740:rset
26741s/^[ ]*#[ ]*define[ ][ ]*/ /
26742t def
26743d
26744:def
26745s/\\$//
26746t bsnl
26747s/["\\]/\\&/g
26748s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26749D["\1"]=" \3"/p
26750s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26751d
26752:bsnl
26753s/["\\]/\\&/g
26754s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26755D["\1"]=" \3\\\\\\n"\\/p
26756t cont
26757s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26758t cont
26759d
26760:cont
26761n
26762s/.\{148\}/&'"$ac_delim"'/g
26763t clear
26764:clear
26765s/\\$//
26766t bsnlc
26767s/["\\]/\\&/g; s/^/"/; s/$/"/p
26768d
26769:bsnlc
26770s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26771b cont
26772' <confdefs.h | sed '
26773s/'"$ac_delim"'/"\\\
26774"/g' >>$CONFIG_STATUS || ac_write_fail=1
26775
26776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26777 for (key in D) D_is_set[key] = 1
26778 FS = "\a"
26779}
26780/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26781 line = \$ 0
26782 split(line, arg, " ")
26783 if (arg[1] == "#") {
26784 defundef = arg[2]
26785 mac1 = arg[3]
26786 } else {
26787 defundef = substr(arg[1], 2)
26788 mac1 = arg[2]
26789 }
26790 split(mac1, mac2, "(") #)
26791 macro = mac2[1]
26792 prefix = substr(line, 1, index(line, defundef) - 1)
26793 if (D_is_set[macro]) {
26794 # Preserve the white space surrounding the "#".
26795 print prefix "define", macro P[macro] D[macro]
26796 next
26797 } else {
26798 # Replace #undef with comments. This is necessary, for example,
26799 # in the case of _POSIX_SOURCE, which is predefined and required
26800 # on some systems where configure will not decide to define it.
26801 if (defundef == "undef") {
26802 print "/*", prefix defundef, macro, "*/"
26803 next
26804 }
26805 }
26806}
26807{ print }
26808_ACAWK
1a4b763e 26809_ACEOF
5213506e
RW
26810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26811 as_fn_error "could not setup config headers machinery" "$LINENO" 5
26812fi # test -n "$CONFIG_HEADERS"
26813
26814
26815eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26816shift
26817for ac_tag
26818do
26819 case $ac_tag in
26820 :[FHLC]) ac_mode=$ac_tag; continue;;
26821 esac
26822 case $ac_mode$ac_tag in
26823 :[FHL]*:*);;
26824 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26825 :[FH]-) ac_tag=-:-;;
26826 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26827 esac
26828 ac_save_IFS=$IFS
26829 IFS=:
26830 set x $ac_tag
26831 IFS=$ac_save_IFS
26832 shift
26833 ac_file=$1
26834 shift
26835
26836 case $ac_mode in
26837 :L) ac_source=$1;;
26838 :[FH])
26839 ac_file_inputs=
26840 for ac_f
26841 do
26842 case $ac_f in
26843 -) ac_f="$tmp/stdin";;
26844 *) # Look for the file first in the build tree, then in the source tree
26845 # (if the path is not absolute). The absolute path cannot be DOS-style,
26846 # because $ac_f cannot contain `:'.
26847 test -f "$ac_f" ||
26848 case $ac_f in
26849 [\\/$]*) false;;
26850 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26851 esac ||
26852 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26853 esac
26854 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26855 as_fn_append ac_file_inputs " '$ac_f'"
26856 done
26857
26858 # Let's still pretend it is `configure' which instantiates (i.e., don't
26859 # use $as_me), people would be surprised to read:
26860 # /* config.h. Generated by config.status. */
26861 configure_input='Generated from '`
26862 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26863 `' by configure.'
26864 if test x"$ac_file" != x-; then
26865 configure_input="$ac_file. $configure_input"
26866 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26867$as_echo "$as_me: creating $ac_file" >&6;}
26868 fi
26869 # Neutralize special characters interpreted by sed in replacement strings.
26870 case $configure_input in #(
26871 *\&* | *\|* | *\\* )
26872 ac_sed_conf_input=`$as_echo "$configure_input" |
26873 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26874 *) ac_sed_conf_input=$configure_input;;
26875 esac
26876
26877 case $ac_tag in
26878 *:-:* | *:-) cat >"$tmp/stdin" \
26879 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26880 esac
26881 ;;
703d89ab
ZW
26882 esac
26883
5213506e 26884 ac_dir=`$as_dirname -- "$ac_file" ||
ba479fd2 26885$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
26886 X"$ac_file" : 'X\(//\)[^/]' \| \
26887 X"$ac_file" : 'X\(//\)$' \| \
5213506e
RW
26888 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26889$as_echo X"$ac_file" |
26890 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26891 s//\1/
26892 q
26893 }
26894 /^X\(\/\/\)[^/].*/{
26895 s//\1/
26896 q
26897 }
26898 /^X\(\/\/\)$/{
26899 s//\1/
26900 q
26901 }
26902 /^X\(\/\).*/{
26903 s//\1/
26904 q
26905 }
26906 s/.*/./; q'`
26907 as_dir="$ac_dir"; as_fn_mkdir_p
ba479fd2
NN
26908 ac_builddir=.
26909
5213506e
RW
26910case "$ac_dir" in
26911.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26912*)
26913 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26914 # A ".." for each directory in $ac_dir_suffix.
26915 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26916 case $ac_top_builddir_sub in
26917 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26918 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26919 esac ;;
26920esac
26921ac_abs_top_builddir=$ac_pwd
26922ac_abs_builddir=$ac_pwd$ac_dir_suffix
26923# for backward compatibility:
26924ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
26925
26926case $srcdir in
5213506e 26927 .) # We are building in place.
ba479fd2 26928 ac_srcdir=.
5213506e
RW
26929 ac_top_srcdir=$ac_top_builddir_sub
26930 ac_abs_top_srcdir=$ac_pwd ;;
26931 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 26932 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
26933 ac_top_srcdir=$srcdir
26934 ac_abs_top_srcdir=$srcdir ;;
26935 *) # Relative name.
26936 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26937 ac_top_srcdir=$ac_top_build_prefix$srcdir
26938 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
ba479fd2 26939esac
5213506e 26940ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
ba479fd2 26941
703d89ab 26942
5213506e
RW
26943 case $ac_mode in
26944 :F)
26945 #
26946 # CONFIG_FILE
26947 #
ab22c1fa 26948
5213506e 26949_ACEOF
1a4b763e 26950
5213506e
RW
26951cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26952# If the template does not know about datarootdir, expand it.
26953# FIXME: This hack should be removed a few years after 2.60.
26954ac_datarootdir_hack=; ac_datarootdir_seen=
26955ac_sed_dataroot='
26956/datarootdir/ {
26957 p
26958 q
26959}
26960/@datadir@/p
26961/@docdir@/p
26962/@infodir@/p
26963/@localedir@/p
26964/@mandir@/p'
26965case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26966*datarootdir*) ac_datarootdir_seen=yes;;
26967*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26969$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26970_ACEOF
26971cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26972 ac_datarootdir_hack='
26973 s&@datadir@&$datadir&g
26974 s&@docdir@&$docdir&g
26975 s&@infodir@&$infodir&g
26976 s&@localedir@&$localedir&g
26977 s&@mandir@&$mandir&g
26978 s&\\\${datarootdir}&$datarootdir&g' ;;
26979esac
a6ccdbab 26980_ACEOF
5213506e
RW
26981
26982# Neutralize VPATH when `$srcdir' = `.'.
26983# Shell code in configure.ac might set extrasub.
26984# FIXME: do we really want to maintain this feature?
26985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26986ac_sed_extra="$ac_vpsub
ba479fd2
NN
26987$extrasub
26988_ACEOF
5213506e 26989cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2
NN
26990:t
26991/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5213506e
RW
26992s|@configure_input@|$ac_sed_conf_input|;t t
26993s&@top_builddir@&$ac_top_builddir_sub&;t t
26994s&@top_build_prefix@&$ac_top_build_prefix&;t t
26995s&@srcdir@&$ac_srcdir&;t t
26996s&@abs_srcdir@&$ac_abs_srcdir&;t t
26997s&@top_srcdir@&$ac_top_srcdir&;t t
26998s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26999s&@builddir@&$ac_builddir&;t t
27000s&@abs_builddir@&$ac_abs_builddir&;t t
27001s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27002$ac_datarootdir_hack
27003"
27004eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
27005if $ac_cs_awk_getline; then
27006 $AWK -f "$tmp/subs.awk"
27007else
27008 $AWK -f "$tmp/subs.awk" | $SHELL
27009fi >$tmp/out \
27010 || as_fn_error "could not create $ac_file" "$LINENO" 5
27011
27012test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27013 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27014 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
27015 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27016which seems to be undefined. Please make sure it is defined." >&5
27017$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27018which seems to be undefined. Please make sure it is defined." >&2;}
27019
27020 rm -f "$tmp/stdin"
b61ff9c8 27021 case $ac_file in
5213506e
RW
27022 -) cat "$tmp/out" && rm -f "$tmp/out";;
27023 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27024 esac \
27025 || as_fn_error "could not create $ac_file" "$LINENO" 5
27026 ;;
27027 :H)
27028 #
27029 # CONFIG_HEADER
27030 #
ba479fd2 27031 if test x"$ac_file" != x-; then
5213506e
RW
27032 {
27033 $as_echo "/* $configure_input */" \
27034 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27035 } >"$tmp/config.h" \
27036 || as_fn_error "could not create $ac_file" "$LINENO" 5
27037 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27038 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27039$as_echo "$as_me: $ac_file is unchanged" >&6;}
ba479fd2 27040 else
5213506e
RW
27041 rm -f "$ac_file"
27042 mv "$tmp/config.h" "$ac_file" \
27043 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba479fd2
NN
27044 fi
27045 else
5213506e
RW
27046 $as_echo "/* $configure_input */" \
27047 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27048 || as_fn_error "could not create -" "$LINENO" 5
ba479fd2 27049 fi
5213506e 27050 ;;
b61ff9c8 27051
5213506e
RW
27052 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27053$as_echo "$as_me: executing $ac_file commands" >&6;}
27054 ;;
27055 esac
b61ff9c8
BS
27056
27057
5213506e
RW
27058 case $ac_file$ac_mode in
27059 "as":F) chmod +x as ;;
27060 "collect-ld":F) chmod +x collect-ld ;;
27061 "nm":F) chmod +x nm ;;
27062 "default":C)
f1faaabd
NN
27063case ${CONFIG_HEADERS} in
27064 *auto-host.h:config.in*)
27065 echo > cstamp-h ;;
861bb6c1 27066esac
2ed26f6b 27067# Make sure all the subdirs exist.
39dabefd 27068for d in $subdirs doc build c-family
2ed26f6b 27069do
2ed26f6b 27070 test -d $d || mkdir $d
2ed26f6b 27071done
ba479fd2 27072 ;;
5213506e 27073
ba479fd2 27074 esac
5213506e 27075done # for ac_tag
cafe096b 27076
ba479fd2 27077
5213506e 27078as_fn_exit 0
ba479fd2 27079_ACEOF
ba479fd2
NN
27080ac_clean_files=$ac_clean_files_save
27081
5213506e
RW
27082test $ac_write_fail = 0 ||
27083 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
27084
ba479fd2
NN
27085
27086# configure is writing to config.log, and then calls config.status.
27087# config.status does its own redirection, appending to config.log.
27088# Unfortunately, on DOS this fails, as config.log is still kept open
27089# by configure, so config.status won't be able to write to it; its
27090# output is simply discarded. So we exec the FD to /dev/null,
27091# effectively closing config.log, so it can be properly (re)opened and
27092# appended to by config.status. When coming back to configure, we
27093# need to make the FD available again.
27094if test "$no_create" != yes; then
27095 ac_cs_success=:
27096 ac_config_status_args=
27097 test "$silent" = yes &&
27098 ac_config_status_args="$ac_config_status_args --quiet"
27099 exec 5>/dev/null
27100 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27101 exec 5>>config.log
27102 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27103 # would make configure fail if this is the last instruction.
5213506e
RW
27104 $ac_cs_success || as_fn_exit $?
27105fi
27106if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27107 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27108$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
ba479fd2 27109fi
861bb6c1 27110