]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
configure.ac (build_lto_plugin): New shell variable.
[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
9b91e436
KT
649user_headers_inc_next_post
650user_headers_inc_next_pre
5213506e
RW
651extra_gcc_objs
652TM_MULTILIB_EXCEPTIONS_CONFIG
653TM_MULTILIB_CONFIG
654TM_ENDIAN_CONFIG
655tmake_file
656xmake_file
657cpp_install_dir
658check_languages
659build_file_translate
660build_xm_defines
661build_xm_include_list
662build_xm_file_list
663build_install_headers_dir
664build_exeext
665all_selected_languages
666all_languages
5213506e
RW
667all_lang_makefrags
668all_gtfiles
669all_compilers
670srcdir
671subdirs
672slibdir
673dollar
674gcc_tooldir
3bec79c5
DK
675LTO_USE_LIBELF
676LTO_BINARY_READER
d7f09764 677enable_lto
5213506e
RW
678MAINT
679zlibinc
680zlibdir
681HOST_LIBS
682GGC
683libgcc_visibility
684gcc_cv_readelf
685gcc_cv_objdump
686ORIGINAL_NM_FOR_TARGET
687gcc_cv_nm
688ORIGINAL_LD_FOR_TARGET
5938f74d 689ORIGINAL_PLUGIN_LD_FOR_TARGET
5213506e
RW
690gcc_cv_ld
691ORIGINAL_AS_FOR_TARGET
692gcc_cv_as
693enable_fast_install
694objdir
695CXXCPP
696OTOOL64
697OTOOL
698LIPO
699NMEDIT
700DSYMUTIL
5213506e
RW
701STRIP
702OBJDUMP
703ac_ct_DUMPBIN
704DUMPBIN
705LD
706FGREP
707SED
708LIBTOOL
709collect2
710STMP_FIXINC
711BUILD_LDFLAGS
712BUILD_CFLAGS
713CC_FOR_BUILD
714inhibit_libc
715SYSTEM_HEADER_DIR
716ALL
717CROSS
718CATOBJEXT
719GENCAT
720INSTOBJEXT
721DATADIRNAME
722CATALOGS
723POSUB
724GMSGFMT
725XGETTEXT
726INCINTL
727LIBINTL_DEP
728LIBINTL
729USE_NLS
730extra_opt_files
731extra_modes_file
732gthread_flags
733objext
734manext
735LIBICONV_DEP
736LTLIBICONV
737LIBICONV
738LDEXP_LIB
739GNAT_LIBEXC
740COLLECT2_LIBS
741AR
742NM
743BISON
744FLEX
745GENERATED_MANPAGES
746BUILD_INFO
747MAKEINFO
748have_mktemp_command
749make_compare_target
750INSTALL_DATA
751INSTALL_PROGRAM
752INSTALL
753ranlib_flags
754RANLIB
755LN
756LN_S
757AWK
758SET_MAKE
759REPORT_BUGS_TEXI
760REPORT_BUGS_TO
761PKGVERSION
e11ddaf5 762CONFIGURE_SPECS
5213506e
RW
763CROSS_SYSTEM_HEADER_DIR
764TARGET_SYSTEM_ROOT_DEFINE
765TARGET_SYSTEM_ROOT
766enable_shared
767enable_fixed_point
768enable_decimal_float
769enable_multilib
770ENABLE_BUILD_WITH_CXX
771coverage_flags
772valgrind_command
773valgrind_path_defines
774valgrind_path
775TREEBROWSER
776nocommon_flag
777warn_cxxflags
778warn_cflags
779c_strict_warn
780strict_warn
781c_loose_warn
782loose_warn
783EGREP
784GREP
785CPP
786OUTPUT_OPTION
787NO_MINUS_C_MINUS_O
788GNATMAKE
789GNATBIND
790ac_ct_CXX
791CXXFLAGS
792CXX
793OBJEXT
794EXEEXT
795ac_ct_CC
796CPPFLAGS
797LDFLAGS
798CFLAGS
799CC
800GENINSRC
801target_subdir
802host_subdir
803build_subdir
804build_libsubdir
805target_noncanonical
806target_os
807target_vendor
808target_cpu
809target
810host_os
811host_vendor
812host_cpu
813host
814build_os
815build_vendor
816build_cpu
817build
818target_alias
819host_alias
820build_alias
821LIBS
822ECHO_T
823ECHO_N
824ECHO_C
825DEFS
826mandir
827localedir
828libdir
829psdir
830pdfdir
831dvidir
832htmldir
833infodir
834docdir
835oldincludedir
836includedir
837localstatedir
838sharedstatedir
839sysconfdir
840datadir
841datarootdir
842libexecdir
843sbindir
844bindir
845program_transform_name
846prefix
847exec_prefix
848PACKAGE_URL
849PACKAGE_BUGREPORT
850PACKAGE_STRING
851PACKAGE_VERSION
852PACKAGE_TARNAME
853PACKAGE_NAME
854PATH_SEPARATOR
855SHELL'
ba479fd2 856ac_subst_files='language_hooks'
5213506e
RW
857ac_user_opts='
858enable_option_checking
859with_build_libsubdir
860with_local_prefix
861with_gxx_include_dir
862with_cpp_install_dir
863enable_generated_files_in_srcdir
864with_gnu_ld
865with_ld
866with_demangler_in_ld
867with_gnu_as
868with_as
869enable_werror_always
870enable_checking
871enable_coverage
872enable_gather_detailed_mem_stats
873enable_build_with_cxx
874with_stabs
875enable_multilib
876enable___cxa_atexit
877enable_decimal_float
878enable_fixed_point
879enable_threads
880enable_tls
881enable_objc_gc
882with_dwarf2
883enable_shared
884with_build_sysroot
885with_sysroot
e11ddaf5 886with_specs
5213506e
RW
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 898enable_cld
d79389af 899enable_frame_pointer
5213506e
RW
900enable_win32_registry
901enable_static
902with_pic
903enable_fast_install
904enable_libtool_lock
5938f74d 905with_plugin_ld
f6c5fbfd 906enable_gnu_indirect_function
55c4f715 907enable_comdat
5213506e
RW
908enable_gnu_unique_object
909enable_linker_build_id
910with_long_double_128
911with_gc
912with_system_zlib
913enable_maintainer_mode
914enable_version_specific_runtime_libs
915with_slibdir
5213506e
RW
916enable_plugin
917'
918 ac_precious_vars='build_alias
919host_alias
920target_alias
921CC
922CFLAGS
923LDFLAGS
924LIBS
925CPPFLAGS
926CXX
927CXXFLAGS
928CCC
929CPP
930CXXCPP
931GMPLIBS
932GMPINC
933PPLLIBS
934PPLINC
935CLOOGLIBS
d7f09764
DN
936CLOOGINC
937LIBELFLIBS
938LIBELFINC'
5213506e 939
861bb6c1
JL
940
941# Initialize some variables set by options.
ba479fd2
NN
942ac_init_help=
943ac_init_version=false
5213506e
RW
944ac_unrecognized_opts=
945ac_unrecognized_sep=
861bb6c1
JL
946# The variables have the same names as the options, with
947# dashes changed to underlines.
ba479fd2 948cache_file=/dev/null
861bb6c1 949exec_prefix=NONE
861bb6c1 950no_create=
861bb6c1
JL
951no_recursion=
952prefix=NONE
953program_prefix=NONE
954program_suffix=NONE
955program_transform_name=s,x,x,
956silent=
957site=
958srcdir=
861bb6c1
JL
959verbose=
960x_includes=NONE
961x_libraries=NONE
ba479fd2
NN
962
963# Installation directory options.
964# These are left unexpanded so users can "make install exec_prefix=/foo"
965# and all the variables that are supposed to be based on exec_prefix
966# by default will actually change.
967# Use braces instead of parens because sh, perl, etc. also accept them.
5213506e 968# (The list follows the same order as the GNU Coding Standards.)
861bb6c1
JL
969bindir='${exec_prefix}/bin'
970sbindir='${exec_prefix}/sbin'
971libexecdir='${exec_prefix}/libexec'
5213506e
RW
972datarootdir='${prefix}/share'
973datadir='${datarootdir}'
861bb6c1
JL
974sysconfdir='${prefix}/etc'
975sharedstatedir='${prefix}/com'
976localstatedir='${prefix}/var'
861bb6c1
JL
977includedir='${prefix}/include'
978oldincludedir='/usr/include'
5213506e
RW
979docdir='${datarootdir}/doc/${PACKAGE}'
980infodir='${datarootdir}/info'
981htmldir='${docdir}'
982dvidir='${docdir}'
983pdfdir='${docdir}'
984psdir='${docdir}'
985libdir='${exec_prefix}/lib'
986localedir='${datarootdir}/locale'
987mandir='${datarootdir}/man'
861bb6c1 988
861bb6c1 989ac_prev=
5213506e 990ac_dashdash=
861bb6c1
JL
991for ac_option
992do
861bb6c1
JL
993 # If the previous option needs an argument, assign it.
994 if test -n "$ac_prev"; then
5213506e 995 eval $ac_prev=\$ac_option
861bb6c1
JL
996 ac_prev=
997 continue
998 fi
999
5213506e
RW
1000 case $ac_option in
1001 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1002 *) ac_optarg=yes ;;
1003 esac
861bb6c1
JL
1004
1005 # Accept the important Cygnus configure options, so we can diagnose typos.
1006
5213506e
RW
1007 case $ac_dashdash$ac_option in
1008 --)
1009 ac_dashdash=yes ;;
861bb6c1
JL
1010
1011 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1012 ac_prev=bindir ;;
1013 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 1014 bindir=$ac_optarg ;;
861bb6c1
JL
1015
1016 -build | --build | --buil | --bui | --bu)
ba479fd2 1017 ac_prev=build_alias ;;
861bb6c1 1018 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 1019 build_alias=$ac_optarg ;;
861bb6c1
JL
1020
1021 -cache-file | --cache-file | --cache-fil | --cache-fi \
1022 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1023 ac_prev=cache_file ;;
1024 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1025 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
1026 cache_file=$ac_optarg ;;
1027
1028 --config-cache | -C)
1029 cache_file=config.cache ;;
861bb6c1 1030
5213506e 1031 -datadir | --datadir | --datadi | --datad)
861bb6c1 1032 ac_prev=datadir ;;
5213506e 1033 -datadir=* | --datadir=* | --datadi=* | --datad=*)
ba479fd2 1034 datadir=$ac_optarg ;;
861bb6c1 1035
5213506e
RW
1036 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1037 | --dataroo | --dataro | --datar)
1038 ac_prev=datarootdir ;;
1039 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1040 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1041 datarootdir=$ac_optarg ;;
1042
861bb6c1 1043 -disable-* | --disable-*)
5213506e 1044 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 1045 # Reject names that are not valid shell variable names.
5213506e
RW
1046 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1047 as_fn_error "invalid feature name: $ac_useropt"
1048 ac_useropt_orig=$ac_useropt
1049 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1050 case $ac_user_opts in
1051 *"
1052"enable_$ac_useropt"
1053"*) ;;
1054 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1055 ac_unrecognized_sep=', ';;
1056 esac
1057 eval enable_$ac_useropt=no ;;
1058
1059 -docdir | --docdir | --docdi | --doc | --do)
1060 ac_prev=docdir ;;
1061 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1062 docdir=$ac_optarg ;;
1063
1064 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1065 ac_prev=dvidir ;;
1066 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1067 dvidir=$ac_optarg ;;
861bb6c1
JL
1068
1069 -enable-* | --enable-*)
5213506e 1070 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 1071 # Reject names that are not valid shell variable names.
5213506e
RW
1072 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1073 as_fn_error "invalid feature name: $ac_useropt"
1074 ac_useropt_orig=$ac_useropt
1075 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1076 case $ac_user_opts in
1077 *"
1078"enable_$ac_useropt"
1079"*) ;;
1080 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1081 ac_unrecognized_sep=', ';;
b61ff9c8 1082 esac
5213506e 1083 eval enable_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1084
1085 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1086 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1087 | --exec | --exe | --ex)
1088 ac_prev=exec_prefix ;;
1089 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1090 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1091 | --exec=* | --exe=* | --ex=*)
ba479fd2 1092 exec_prefix=$ac_optarg ;;
861bb6c1
JL
1093
1094 -gas | --gas | --ga | --g)
1095 # Obsolete; use --with-gas.
1096 with_gas=yes ;;
1097
ba479fd2
NN
1098 -help | --help | --hel | --he | -h)
1099 ac_init_help=long ;;
1100 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1101 ac_init_help=recursive ;;
1102 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1103 ac_init_help=short ;;
861bb6c1
JL
1104
1105 -host | --host | --hos | --ho)
ba479fd2 1106 ac_prev=host_alias ;;
861bb6c1 1107 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 1108 host_alias=$ac_optarg ;;
861bb6c1 1109
5213506e
RW
1110 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1111 ac_prev=htmldir ;;
1112 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1113 | --ht=*)
1114 htmldir=$ac_optarg ;;
1115
861bb6c1
JL
1116 -includedir | --includedir | --includedi | --included | --include \
1117 | --includ | --inclu | --incl | --inc)
1118 ac_prev=includedir ;;
1119 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1120 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 1121 includedir=$ac_optarg ;;
861bb6c1
JL
1122
1123 -infodir | --infodir | --infodi | --infod | --info | --inf)
1124 ac_prev=infodir ;;
1125 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 1126 infodir=$ac_optarg ;;
861bb6c1
JL
1127
1128 -libdir | --libdir | --libdi | --libd)
1129 ac_prev=libdir ;;
1130 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 1131 libdir=$ac_optarg ;;
861bb6c1
JL
1132
1133 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1134 | --libexe | --libex | --libe)
1135 ac_prev=libexecdir ;;
1136 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1137 | --libexe=* | --libex=* | --libe=*)
ba479fd2 1138 libexecdir=$ac_optarg ;;
861bb6c1 1139
5213506e
RW
1140 -localedir | --localedir | --localedi | --localed | --locale)
1141 ac_prev=localedir ;;
1142 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1143 localedir=$ac_optarg ;;
1144
861bb6c1 1145 -localstatedir | --localstatedir | --localstatedi | --localstated \
5213506e 1146 | --localstate | --localstat | --localsta | --localst | --locals)
861bb6c1
JL
1147 ac_prev=localstatedir ;;
1148 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
5213506e 1149 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
ba479fd2 1150 localstatedir=$ac_optarg ;;
861bb6c1
JL
1151
1152 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1153 ac_prev=mandir ;;
1154 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 1155 mandir=$ac_optarg ;;
861bb6c1
JL
1156
1157 -nfp | --nfp | --nf)
1158 # Obsolete; use --without-fp.
1159 with_fp=no ;;
1160
1161 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 1162 | --no-cr | --no-c | -n)
861bb6c1
JL
1163 no_create=yes ;;
1164
1165 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1166 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1167 no_recursion=yes ;;
1168
1169 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1170 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1171 | --oldin | --oldi | --old | --ol | --o)
1172 ac_prev=oldincludedir ;;
1173 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1174 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1175 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 1176 oldincludedir=$ac_optarg ;;
861bb6c1
JL
1177
1178 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1179 ac_prev=prefix ;;
1180 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 1181 prefix=$ac_optarg ;;
861bb6c1
JL
1182
1183 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1184 | --program-pre | --program-pr | --program-p)
1185 ac_prev=program_prefix ;;
1186 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1187 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 1188 program_prefix=$ac_optarg ;;
861bb6c1
JL
1189
1190 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1191 | --program-suf | --program-su | --program-s)
1192 ac_prev=program_suffix ;;
1193 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1194 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 1195 program_suffix=$ac_optarg ;;
861bb6c1
JL
1196
1197 -program-transform-name | --program-transform-name \
1198 | --program-transform-nam | --program-transform-na \
1199 | --program-transform-n | --program-transform- \
1200 | --program-transform | --program-transfor \
1201 | --program-transfo | --program-transf \
1202 | --program-trans | --program-tran \
1203 | --progr-tra | --program-tr | --program-t)
1204 ac_prev=program_transform_name ;;
1205 -program-transform-name=* | --program-transform-name=* \
1206 | --program-transform-nam=* | --program-transform-na=* \
1207 | --program-transform-n=* | --program-transform-=* \
1208 | --program-transform=* | --program-transfor=* \
1209 | --program-transfo=* | --program-transf=* \
1210 | --program-trans=* | --program-tran=* \
1211 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 1212 program_transform_name=$ac_optarg ;;
861bb6c1 1213
5213506e
RW
1214 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1215 ac_prev=pdfdir ;;
1216 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1217 pdfdir=$ac_optarg ;;
1218
1219 -psdir | --psdir | --psdi | --psd | --ps)
1220 ac_prev=psdir ;;
1221 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1222 psdir=$ac_optarg ;;
1223
861bb6c1
JL
1224 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1225 | -silent | --silent | --silen | --sile | --sil)
1226 silent=yes ;;
1227
1228 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1229 ac_prev=sbindir ;;
1230 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1231 | --sbi=* | --sb=*)
ba479fd2 1232 sbindir=$ac_optarg ;;
861bb6c1
JL
1233
1234 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1235 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1236 | --sharedst | --shareds | --shared | --share | --shar \
1237 | --sha | --sh)
1238 ac_prev=sharedstatedir ;;
1239 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1240 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1241 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1242 | --sha=* | --sh=*)
ba479fd2 1243 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
1244
1245 -site | --site | --sit)
1246 ac_prev=site ;;
1247 -site=* | --site=* | --sit=*)
ba479fd2 1248 site=$ac_optarg ;;
861bb6c1
JL
1249
1250 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1251 ac_prev=srcdir ;;
1252 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 1253 srcdir=$ac_optarg ;;
861bb6c1
JL
1254
1255 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1256 | --syscon | --sysco | --sysc | --sys | --sy)
1257 ac_prev=sysconfdir ;;
1258 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1259 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 1260 sysconfdir=$ac_optarg ;;
861bb6c1
JL
1261
1262 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 1263 ac_prev=target_alias ;;
861bb6c1 1264 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 1265 target_alias=$ac_optarg ;;
861bb6c1
JL
1266
1267 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1268 verbose=yes ;;
1269
ba479fd2
NN
1270 -version | --version | --versio | --versi | --vers | -V)
1271 ac_init_version=: ;;
861bb6c1
JL
1272
1273 -with-* | --with-*)
5213506e 1274 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 1275 # Reject names that are not valid shell variable names.
5213506e
RW
1276 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1277 as_fn_error "invalid package name: $ac_useropt"
1278 ac_useropt_orig=$ac_useropt
1279 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1280 case $ac_user_opts in
1281 *"
1282"with_$ac_useropt"
1283"*) ;;
1284 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1285 ac_unrecognized_sep=', ';;
b61ff9c8 1286 esac
5213506e 1287 eval with_$ac_useropt=\$ac_optarg ;;
861bb6c1
JL
1288
1289 -without-* | --without-*)
5213506e 1290 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 1291 # Reject names that are not valid shell variable names.
5213506e
RW
1292 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1293 as_fn_error "invalid package name: $ac_useropt"
1294 ac_useropt_orig=$ac_useropt
1295 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1296 case $ac_user_opts in
1297 *"
1298"with_$ac_useropt"
1299"*) ;;
1300 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1301 ac_unrecognized_sep=', ';;
1302 esac
1303 eval with_$ac_useropt=no ;;
861bb6c1
JL
1304
1305 --x)
1306 # Obsolete; use --with-x.
1307 with_x=yes ;;
1308
1309 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1310 | --x-incl | --x-inc | --x-in | --x-i)
1311 ac_prev=x_includes ;;
1312 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1313 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 1314 x_includes=$ac_optarg ;;
861bb6c1
JL
1315
1316 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1317 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1318 ac_prev=x_libraries ;;
1319 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1320 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 1321 x_libraries=$ac_optarg ;;
861bb6c1 1322
5213506e
RW
1323 -*) as_fn_error "unrecognized option: \`$ac_option'
1324Try \`$0 --help' for more information."
861bb6c1
JL
1325 ;;
1326
ba479fd2
NN
1327 *=*)
1328 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1329 # Reject names that are not valid shell variable names.
5213506e
RW
1330 case $ac_envvar in #(
1331 '' | [0-9]* | *[!_$as_cr_alnum]* )
1332 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1333 esac
1334 eval $ac_envvar=\$ac_optarg
ba479fd2
NN
1335 export $ac_envvar ;;
1336
861bb6c1 1337 *)
ba479fd2 1338 # FIXME: should be removed in autoconf 3.0.
5213506e 1339 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
ba479fd2 1340 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
5213506e 1341 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
ba479fd2 1342 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
1343 ;;
1344
1345 esac
1346done
1347
1348if test -n "$ac_prev"; then
ba479fd2 1349 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
5213506e 1350 as_fn_error "missing argument to $ac_option"
63cf211a 1351fi
63cf211a 1352
5213506e
RW
1353if test -n "$ac_unrecognized_opts"; then
1354 case $enable_option_checking in
1355 no) ;;
1356 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1357 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2f41c1d6 1358 esac
5213506e 1359fi
2f41c1d6 1360
5213506e
RW
1361# Check all directory arguments for consistency.
1362for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1363 datadir sysconfdir sharedstatedir localstatedir includedir \
1364 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1365 libdir localedir mandir
b61ff9c8 1366do
5213506e
RW
1367 eval ac_val=\$$ac_var
1368 # Remove trailing slashes.
1369 case $ac_val in
1370 */ )
1371 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1372 eval $ac_var=\$ac_val;;
1373 esac
1374 # Be sure to have absolute directory names.
b61ff9c8 1375 case $ac_val in
5213506e
RW
1376 [\\/$]* | ?:[\\/]* ) continue;;
1377 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
b61ff9c8 1378 esac
5213506e 1379 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
b61ff9c8
BS
1380done
1381
1382# There might be people who depend on the old broken behavior: `$host'
1383# used to hold the argument of --host etc.
1384# FIXME: To remove some day.
1385build=$build_alias
1386host=$host_alias
ba479fd2
NN
1387target=$target_alias
1388
1389# FIXME: To remove some day.
1390if test "x$host_alias" != x; then
1391 if test "x$build_alias" = x; then
1392 cross_compiling=maybe
5213506e 1393 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
ba479fd2
NN
1394 If a cross compiler is detected then cross compile mode will be used." >&2
1395 elif test "x$build_alias" != "x$host_alias"; then
1396 cross_compiling=yes
1397 fi
1398fi
6e3f3080 1399
ba479fd2
NN
1400ac_tool_prefix=
1401test -n "$host_alias" && ac_tool_prefix=$host_alias-
1402
1403test "$silent" = yes && exec 6>/dev/null
861bb6c1 1404
861bb6c1 1405
5213506e
RW
1406ac_pwd=`pwd` && test -n "$ac_pwd" &&
1407ac_ls_di=`ls -di .` &&
1408ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1409 as_fn_error "working directory cannot be determined"
1410test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1411 as_fn_error "pwd does not report name of working directory"
1412
1413
861bb6c1
JL
1414# Find the source files, if location was not specified.
1415if test -z "$srcdir"; then
1416 ac_srcdir_defaulted=yes
5213506e
RW
1417 # Try the directory containing this script, then the parent directory.
1418 ac_confdir=`$as_dirname -- "$as_myself" ||
1419$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1420 X"$as_myself" : 'X\(//\)[^/]' \| \
1421 X"$as_myself" : 'X\(//\)$' \| \
1422 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1423$as_echo X"$as_myself" |
1424 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1425 s//\1/
1426 q
1427 }
1428 /^X\(\/\/\)[^/].*/{
1429 s//\1/
1430 q
1431 }
1432 /^X\(\/\/\)$/{
1433 s//\1/
1434 q
1435 }
1436 /^X\(\/\).*/{
1437 s//\1/
1438 q
1439 }
1440 s/.*/./; q'`
861bb6c1 1441 srcdir=$ac_confdir
5213506e 1442 if test ! -r "$srcdir/$ac_unique_file"; then
861bb6c1
JL
1443 srcdir=..
1444 fi
1445else
1446 ac_srcdir_defaulted=no
1447fi
5213506e
RW
1448if test ! -r "$srcdir/$ac_unique_file"; then
1449 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1450 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1451fi
1452ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1453ac_abs_confdir=`(
1454 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1455 pwd)`
1456# When building in place, set srcdir=.
1457if test "$ac_abs_confdir" = "$ac_pwd"; then
1458 srcdir=.
1459fi
1460# Remove unnecessary trailing slashes from srcdir.
1461# Double slashes in file names in object file debugging info
1462# mess up M-x gdb in Emacs.
1463case $srcdir in
1464*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1465esac
1466for ac_var in $ac_precious_vars; do
1467 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1468 eval ac_env_${ac_var}_value=\$${ac_var}
1469 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1470 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1471done
63cf211a 1472
ba479fd2
NN
1473#
1474# Report the --help message.
1475#
1476if test "$ac_init_help" = "long"; then
1477 # Omit some internal or obsolete options to make the list less imposing.
1478 # This message is too long to be a string in the A/UX 3.1 sh.
1479 cat <<_ACEOF
1480\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 1481
ba479fd2 1482Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 1483
ba479fd2
NN
1484To assign environment variables (e.g., CC, CFLAGS...), specify them as
1485VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 1486
ba479fd2 1487Defaults for the options are specified in brackets.
861bb6c1 1488
ba479fd2
NN
1489Configuration:
1490 -h, --help display this help and exit
1491 --help=short display options specific to this package
1492 --help=recursive display the short help of all the included packages
1493 -V, --version display version information and exit
1494 -q, --quiet, --silent do not print \`checking...' messages
1495 --cache-file=FILE cache test results in FILE [disabled]
1496 -C, --config-cache alias for \`--cache-file=config.cache'
1497 -n, --no-create do not create output files
1498 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1499
ba479fd2
NN
1500Installation directories:
1501 --prefix=PREFIX install architecture-independent files in PREFIX
5213506e 1502 [$ac_default_prefix]
ba479fd2 1503 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5213506e 1504 [PREFIX]
861bb6c1 1505
ba479fd2
NN
1506By default, \`make install' will install all the files in
1507\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1508an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1509for instance \`--prefix=\$HOME'.
13c22933 1510
ba479fd2 1511For better control, use the options below.
13c22933 1512
ba479fd2 1513Fine tuning of the installation directories:
5213506e
RW
1514 --bindir=DIR user executables [EPREFIX/bin]
1515 --sbindir=DIR system admin executables [EPREFIX/sbin]
1516 --libexecdir=DIR program executables [EPREFIX/libexec]
1517 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1518 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1519 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1520 --libdir=DIR object code libraries [EPREFIX/lib]
1521 --includedir=DIR C header files [PREFIX/include]
1522 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1523 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1524 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1525 --infodir=DIR info documentation [DATAROOTDIR/info]
1526 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1527 --mandir=DIR man documentation [DATAROOTDIR/man]
1528 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1529 --htmldir=DIR html documentation [DOCDIR]
1530 --dvidir=DIR dvi documentation [DOCDIR]
1531 --pdfdir=DIR pdf documentation [DOCDIR]
1532 --psdir=DIR ps documentation [DOCDIR]
ba479fd2 1533_ACEOF
13c22933 1534
ba479fd2 1535 cat <<\_ACEOF
13c22933 1536
ba479fd2
NN
1537Program names:
1538 --program-prefix=PREFIX prepend PREFIX to installed program names
1539 --program-suffix=SUFFIX append SUFFIX to installed program names
1540 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1541
ba479fd2
NN
1542System types:
1543 --build=BUILD configure for building on BUILD [guessed]
1544 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1545 --target=TARGET configure for building compilers for TARGET [HOST]
1546_ACEOF
13c22933
JJ
1547fi
1548
ba479fd2 1549if test -n "$ac_init_help"; then
13c22933 1550
ba479fd2 1551 cat <<\_ACEOF
13c22933 1552
ba479fd2 1553Optional Features:
5213506e 1554 --disable-option-checking ignore unrecognized --enable/--with options
ba479fd2
NN
1555 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1556 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1557 --enable-generated-files-in-srcdir
1558 put copies of generated files in source dir
1559 intended for creating source tarballs for users
1560 without texinfo bison or flex.
3bbd5a19 1561 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1562 --enable-checking=LIST
1563 enable expensive run-time checks. With LIST,
1564 enable only specific categories of checks.
cdce5c16 1565 Categories are: yes,no,all,none,release.
726a989a 1566 Flags are: assert,df,fold,gc,gcac,gimple,misc,
7e98624c 1567 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1568 --enable-coverage=LEVEL
fb38008e 1569 enable compiler's code coverage collection.
ba479fd2
NN
1570 Use to measure compiler performance and locate
1571 unused parts of the compiler. With LEVEL, specify
1572 optimization. Values are opt, noopt,
1573 default is noopt
1574 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
00020c16 1575 --enable-build-with-cxx build with C++ compiler instead of C compiler
ba479fd2
NN
1576 --enable-multilib enable library support for multiple ABIs
1577 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1578 --enable-decimal-float={no,yes,bid,dpd}
1579 enable decimal float extension to C. Selecting 'bid'
1580 or 'dpd' choses which decimal floating point format
1581 to use
ab22c1fa 1582 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1583 --enable-threads enable thread usage for target GCC
1584 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1585 --enable-tls enable or disable generation of tls code
1586 overriding the assembler check for tls support
ba479fd2
NN
1587 --enable-objc-gc enable the use of Boehm's garbage collector with
1588 the GNU Objective-C runtime
1589 --disable-shared don't provide a shared libgcc
f3c9f174 1590 --enable-languages=LIST specify which front-ends to build
dfb77e37 1591 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1592 --enable-initfini-array use .init_array/.fini_array sections
1593 --enable-sjlj-exceptions
1594 arrange to use setjmp/longjmp exception handling
7f970b70 1595 --enable-secureplt enable -msecure-plt by default for PowerPC
ad211091
KT
1596 --enable-leading-mingw64-underscores
1597 Enable leading underscores on 64 bit mingw targets
922e3e33 1598 --enable-cld enable -mcld by default for 32bit x86
d79389af 1599 --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86
ba479fd2
NN
1600 --disable-win32-registry
1601 disable lookup of installation paths in the
1602 Registry on Windows hosts
1603 --enable-win32-registry enable registry lookup (default)
1604 --enable-win32-registry=KEY
1605 use KEY instead of GCC version as the last portion
1606 of the registry key
5213506e
RW
1607 --enable-shared[=PKGS] build shared libraries [default=yes]
1608 --enable-static[=PKGS] build static libraries [default=yes]
da0f6381
PB
1609 --enable-fast-install[=PKGS]
1610 optimize for fast installation [default=yes]
1611 --disable-libtool-lock avoid locking (might break parallel builds)
f6c5fbfd
NS
1612 --enable-gnu-indirect-function
1613 enable the use of the @gnu_indirect_function to
1614 glibc systems
55c4f715 1615 --enable-comdat enable COMDAT group support
e31bcd1b
JM
1616 --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on
1617 glibc systems
cd533689
PP
1618 --enable-linker-build-id
1619 compiler will always pass --build-id to linker
ba479fd2
NN
1620 --enable-maintainer-mode
1621 enable make rules and dependencies not useful
1622 (and sometimes confusing) to the casual installer
1623 --enable-version-specific-runtime-libs
1624 specify that runtime libraries should be
1625 installed in a compiler-specific directory
68a607d8 1626 --enable-plugin enable plugin support
093e61a6 1627
ba479fd2
NN
1628Optional Packages:
1629 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1630 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1631 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1632 --with-local-prefix=DIR specifies directory to put local include
1633 --with-gxx-include-dir=DIR
1634 specifies directory to put g++ header files
1635 --with-cpp-install-dir=DIR
1636 install the user visible C preprocessor in DIR
1637 (relative to PREFIX) as well as PREFIX/bin
1638 --with-gnu-ld arrange to work with GNU ld.
1639 --with-ld arrange to use the specified ld (full pathname)
d594623a 1640 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1641 --with-gnu-as arrange to work with GNU as
1642 --with-as arrange to use the specified as (full pathname)
1643 --with-stabs arrange to use stabs instead of host debug format
1644 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1645 --with-build-sysroot=sysroot
1646 use sysroot as the system root during the build
ba479fd2 1647 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
e11ddaf5 1648 --with-specs=SPECS add SPECS to driver command-line processing
2f41c1d6
PB
1649 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1650 --with-bugurl=URL Direct users to URL to report a bug
aca600aa 1651 --with-multilib-list Select multilibs (SH only)
dfb77e37
KC
1652 --with-gnu-ld assume the C compiler uses GNU ld default=no
1653 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1654 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1655 --with-system-libunwind use installed libunwind
da0f6381
PB
1656 --with-pic try to use only PIC/non-PIC objects [default=use
1657 both]
1658 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
5938f74d 1659 --with-plugin-ld=[ARG] specify the plugin linker
ed965309 1660 --with-long-double-128 Use 128-bit long double by default.
59415997 1661 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1662 with the compiler
1663 --with-system-zlib use installed libz
22482f74 1664 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
13c22933 1665
ba479fd2
NN
1666Some influential environment variables:
1667 CC C compiler command
1668 CFLAGS C compiler flags
1669 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1670 nonstandard directory <lib dir>
5213506e
RW
1671 LIBS libraries to pass to the linker, e.g. -l<library>
1672 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1673 you have headers in a nonstandard directory <include dir>
00020c16
ILT
1674 CXX C++ compiler command
1675 CXXFLAGS C++ compiler flags
ba479fd2 1676 CPP C preprocessor
00020c16 1677 CXXCPP C++ preprocessor
6de9cd9a
DN
1678 GMPLIBS How to link GMP
1679 GMPINC How to find GMP include files
f8bf9252
SP
1680 PPLLIBS How to link PPL
1681 PPLINC How to find PPL include files
1682 CLOOGLIBS How to link CLOOG
1683 CLOOGINC How to find CLOOG include files
d7f09764
DN
1684 LIBELFLIBS How to link libelf
1685 LIBELFINC How to find libelf include files
13c22933 1686
ba479fd2
NN
1687Use these variables to override the choices made by `configure' or to help
1688it to find libraries and programs with nonstandard names/locations.
73458fb7 1689
5213506e 1690Report bugs to the package provider.
ba479fd2 1691_ACEOF
5213506e 1692ac_status=$?
ba479fd2 1693fi
6e3f3080 1694
ba479fd2
NN
1695if test "$ac_init_help" = "recursive"; then
1696 # If there are subdirs, report their specific --help.
ba479fd2 1697 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
5213506e
RW
1698 test -d "$ac_dir" ||
1699 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1700 continue
ba479fd2
NN
1701 ac_builddir=.
1702
5213506e
RW
1703case "$ac_dir" in
1704.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1705*)
1706 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1707 # A ".." for each directory in $ac_dir_suffix.
1708 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1709 case $ac_top_builddir_sub in
1710 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1711 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1712 esac ;;
1713esac
1714ac_abs_top_builddir=$ac_pwd
1715ac_abs_builddir=$ac_pwd$ac_dir_suffix
1716# for backward compatibility:
1717ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
1718
1719case $srcdir in
5213506e 1720 .) # We are building in place.
ba479fd2 1721 ac_srcdir=.
5213506e
RW
1722 ac_top_srcdir=$ac_top_builddir_sub
1723 ac_abs_top_srcdir=$ac_pwd ;;
1724 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 1725 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
1726 ac_top_srcdir=$srcdir
1727 ac_abs_top_srcdir=$srcdir ;;
1728 *) # Relative name.
1729 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1730 ac_top_srcdir=$ac_top_build_prefix$srcdir
1731 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
86da66b5 1732esac
5213506e
RW
1733ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1734
1735 cd "$ac_dir" || { ac_status=$?; continue; }
1736 # Check for guested configure.
1737 if test -f "$ac_srcdir/configure.gnu"; then
1738 echo &&
1739 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1740 elif test -f "$ac_srcdir/configure"; then
1741 echo &&
1742 $SHELL "$ac_srcdir/configure" --help=recursive
ba479fd2 1743 else
5213506e
RW
1744 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1745 fi || ac_status=$?
1746 cd "$ac_pwd" || { ac_status=$?; break; }
ba479fd2
NN
1747 done
1748fi
1749
5213506e 1750test -n "$ac_init_help" && exit $ac_status
ba479fd2
NN
1751if $ac_init_version; then
1752 cat <<\_ACEOF
5213506e
RW
1753configure
1754generated by GNU Autoconf 2.64
ba479fd2 1755
5213506e 1756Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
1757This configure script is free software; the Free Software Foundation
1758gives unlimited permission to copy, distribute and modify it.
1759_ACEOF
5213506e 1760 exit
ba479fd2 1761fi
ba479fd2 1762
5213506e
RW
1763## ------------------------ ##
1764## Autoconf initialization. ##
1765## ------------------------ ##
ba479fd2 1766
5213506e
RW
1767# ac_fn_c_try_compile LINENO
1768# --------------------------
1769# Try to compile conftest.$ac_ext, and return whether this succeeded.
1770ac_fn_c_try_compile ()
ba479fd2 1771{
5213506e
RW
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773 rm -f conftest.$ac_objext
1774 if { { ac_try="$ac_compile"
1775case "(($ac_try" in
1776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777 *) ac_try_echo=$ac_try;;
1778esac
1779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780$as_echo "$ac_try_echo"; } >&5
1781 (eval "$ac_compile") 2>conftest.err
1782 ac_status=$?
1783 if test -s conftest.err; then
1784 grep -v '^ *+' conftest.err >conftest.er1
1785 cat conftest.er1 >&5
1786 mv -f conftest.er1 conftest.err
1787 fi
1788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789 test $ac_status = 0; } && {
1790 test -z "$ac_c_werror_flag" ||
1791 test ! -s conftest.err
1792 } && test -s conftest.$ac_objext; then :
1793 ac_retval=0
1794else
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1797
5213506e
RW
1798 ac_retval=1
1799fi
1800 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1801 return $ac_retval
ba479fd2 1802
5213506e 1803} # ac_fn_c_try_compile
ba479fd2 1804
5213506e
RW
1805# ac_fn_cxx_try_compile LINENO
1806# ----------------------------
1807# Try to compile conftest.$ac_ext, and return whether this succeeded.
1808ac_fn_cxx_try_compile ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 rm -f conftest.$ac_objext
1812 if { { ac_try="$ac_compile"
1813case "(($ac_try" in
1814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815 *) ac_try_echo=$ac_try;;
1816esac
1817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1818$as_echo "$ac_try_echo"; } >&5
1819 (eval "$ac_compile") 2>conftest.err
1820 ac_status=$?
1821 if test -s conftest.err; then
1822 grep -v '^ *+' conftest.err >conftest.er1
1823 cat conftest.er1 >&5
1824 mv -f conftest.er1 conftest.err
1825 fi
1826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827 test $ac_status = 0; } && {
1828 test -z "$ac_cxx_werror_flag" ||
1829 test ! -s conftest.err
1830 } && test -s conftest.$ac_objext; then :
1831 ac_retval=0
1832else
1833 $as_echo "$as_me: failed program was:" >&5
1834sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1835
5213506e
RW
1836 ac_retval=1
1837fi
1838 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1839 return $ac_retval
ba479fd2 1840
5213506e 1841} # ac_fn_cxx_try_compile
ba479fd2 1842
5213506e
RW
1843# ac_fn_c_try_cpp LINENO
1844# ----------------------
1845# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1846ac_fn_c_try_cpp ()
1847{
1848 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849 if { { ac_try="$ac_cpp conftest.$ac_ext"
1850case "(($ac_try" in
1851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1852 *) ac_try_echo=$ac_try;;
1853esac
1854eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1855$as_echo "$ac_try_echo"; } >&5
1856 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1857 ac_status=$?
1858 if test -s conftest.err; then
1859 grep -v '^ *+' conftest.err >conftest.er1
1860 cat conftest.er1 >&5
1861 mv -f conftest.er1 conftest.err
1862 fi
1863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864 test $ac_status = 0; } >/dev/null && {
1865 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1866 test ! -s conftest.err
1867 }; then :
1868 ac_retval=0
1869else
1870 $as_echo "$as_me: failed program was:" >&5
1871sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 1872
5213506e
RW
1873 ac_retval=1
1874fi
1875 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1876 return $ac_retval
ba479fd2 1877
5213506e 1878} # ac_fn_c_try_cpp
ba479fd2 1879
5213506e
RW
1880# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1881# -------------------------------------------------------
1882# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1883# the include files in INCLUDES and setting the cache variable VAR
1884# accordingly.
1885ac_fn_c_check_header_mongrel ()
1886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1890$as_echo_n "checking for $2... " >&6; }
1891if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1892 $as_echo_n "(cached) " >&6
1893fi
1894eval ac_res=\$$3
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1896$as_echo "$ac_res" >&6; }
1897else
1898 # Is the header compilable?
1899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1900$as_echo_n "checking $2 usability... " >&6; }
1901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1902/* end confdefs.h. */
1903$4
1904#include <$2>
ba479fd2 1905_ACEOF
5213506e
RW
1906if ac_fn_c_try_compile "$LINENO"; then :
1907 ac_header_compiler=yes
1908else
1909 ac_header_compiler=no
1910fi
1911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1913$as_echo "$ac_header_compiler" >&6; }
ba479fd2 1914
5213506e
RW
1915# Is the header present?
1916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1917$as_echo_n "checking $2 presence... " >&6; }
1918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919/* end confdefs.h. */
1920#include <$2>
1921_ACEOF
1922if ac_fn_c_try_cpp "$LINENO"; then :
1923 ac_header_preproc=yes
1924else
1925 ac_header_preproc=no
1926fi
1927rm -f conftest.err conftest.$ac_ext
1928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1929$as_echo "$ac_header_preproc" >&6; }
ba479fd2 1930
5213506e
RW
1931# So? What about this header?
1932case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1933 yes:no: )
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1935$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1937$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1938 ;;
1939 no:yes:* )
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1941$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1943$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1945$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1947$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1949$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1950 ;;
1951esac
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1953$as_echo_n "checking for $2... " >&6; }
1954if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1955 $as_echo_n "(cached) " >&6
1956else
1957 eval "$3=\$ac_header_compiler"
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
1962fi
1963 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 1964
5213506e 1965} # ac_fn_c_check_header_mongrel
ba479fd2 1966
5213506e
RW
1967# ac_fn_c_try_run LINENO
1968# ----------------------
1969# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1970# that executables *can* be run.
1971ac_fn_c_try_run ()
b61ff9c8 1972{
5213506e
RW
1973 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1974 if { { ac_try="$ac_link"
1975case "(($ac_try" in
1976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1977 *) ac_try_echo=$ac_try;;
1978esac
1979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1980$as_echo "$ac_try_echo"; } >&5
1981 (eval "$ac_link") 2>&5
1982 ac_status=$?
1983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1984 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1985 { { case "(($ac_try" in
1986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1987 *) ac_try_echo=$ac_try;;
1988esac
1989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1990$as_echo "$ac_try_echo"; } >&5
1991 (eval "$ac_try") 2>&5
1992 ac_status=$?
1993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1994 test $ac_status = 0; }; }; then :
1995 ac_retval=0
1996else
1997 $as_echo "$as_me: program exited with status $ac_status" >&5
1998 $as_echo "$as_me: failed program was:" >&5
1999sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2000
5213506e
RW
2001 ac_retval=$ac_status
2002fi
2003 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2004 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2005 return $ac_retval
ba479fd2 2006
5213506e 2007} # ac_fn_c_try_run
ba479fd2 2008
5213506e
RW
2009# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2010# -------------------------------------------------------
2011# Tests whether HEADER exists and can be compiled using the include files in
2012# INCLUDES, setting the cache variable VAR accordingly.
2013ac_fn_c_check_header_compile ()
2014{
2015 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2017$as_echo_n "checking for $2... " >&6; }
2018if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2019 $as_echo_n "(cached) " >&6
2020else
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022/* end confdefs.h. */
2023$4
2024#include <$2>
ba479fd2 2025_ACEOF
5213506e
RW
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 eval "$3=yes"
2028else
2029 eval "$3=no"
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032fi
2033eval ac_res=\$$3
2034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2035$as_echo "$ac_res" >&6; }
2036 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2037
5213506e 2038} # ac_fn_c_check_header_compile
ba479fd2 2039
5213506e
RW
2040# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2041# --------------------------------------------
2042# Tries to find the compile-time value of EXPR in a program that includes
2043# INCLUDES, setting VAR accordingly. Returns whether the value could be
2044# computed
2045ac_fn_c_compute_int ()
2046{
2047 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048 if test "$cross_compiling" = yes; then
2049 # Depending upon the size, compute the lo and hi bounds.
2050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) >= 0)];
2057test_array [0] = 0
ba479fd2 2058
5213506e
RW
2059 ;
2060 return 0;
2061}
ba479fd2 2062_ACEOF
5213506e
RW
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_lo=0 ac_mid=0
2065 while :; do
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2073test_array [0] = 0
ba479fd2 2074
5213506e
RW
2075 ;
2076 return 0;
2077}
ba479fd2 2078_ACEOF
5213506e
RW
2079if ac_fn_c_try_compile "$LINENO"; then :
2080 ac_hi=$ac_mid; break
2081else
2082 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2083 if test $ac_lo -le $ac_mid; then
2084 ac_lo= ac_hi=
2085 break
2086 fi
2087 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090 done
2091else
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) < 0)];
2099test_array [0] = 0
ba479fd2 2100
5213506e
RW
2101 ;
2102 return 0;
2103}
ba479fd2 2104_ACEOF
5213506e
RW
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=-1 ac_mid=-1
2107 while :; do
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2115test_array [0] = 0
ba479fd2 2116
5213506e
RW
2117 ;
2118 return 0;
2119}
2120_ACEOF
2121if ac_fn_c_try_compile "$LINENO"; then :
2122 ac_lo=$ac_mid; break
2123else
2124 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2125 if test $ac_mid -le $ac_hi; then
2126 ac_lo= ac_hi=
2127 break
2128 fi
2129 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
ba479fd2 2130fi
5213506e
RW
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132 done
ba479fd2 2133else
5213506e 2134 ac_lo= ac_hi=
ba479fd2 2135fi
5213506e
RW
2136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137fi
2138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2139# Binary search between lo and hi bounds.
2140while test "x$ac_lo" != "x$ac_hi"; do
2141 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145int
2146main ()
2147{
2148static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2149test_array [0] = 0
ba479fd2 2150
5213506e
RW
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_compile "$LINENO"; then :
2156 ac_hi=$ac_mid
2157else
2158 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
ba479fd2 2159fi
5213506e
RW
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161done
2162case $ac_lo in #((
2163?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2164'') ac_retval=1 ;;
2165esac
2166 else
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170static long int longval () { return $2; }
2171static unsigned long int ulongval () { return $2; }
2172#include <stdio.h>
2173#include <stdlib.h>
2174int
2175main ()
2176{
ba479fd2 2177
5213506e
RW
2178 FILE *f = fopen ("conftest.val", "w");
2179 if (! f)
2180 return 1;
2181 if (($2) < 0)
2182 {
2183 long int i = longval ();
2184 if (i != ($2))
2185 return 1;
2186 fprintf (f, "%ld", i);
2187 }
2188 else
2189 {
2190 unsigned long int i = ulongval ();
2191 if (i != ($2))
2192 return 1;
2193 fprintf (f, "%lu", i);
2194 }
2195 /* Do not output a trailing newline, as this causes \r\n confusion
2196 on some platforms. */
2197 return ferror (f) || fclose (f) != 0;
ba479fd2 2198
5213506e
RW
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_run "$LINENO"; then :
2204 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2205else
2206 ac_retval=1
2207fi
2208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2209 conftest.$ac_objext conftest.beam conftest.$ac_ext
2210rm -f conftest.val
ba479fd2 2211
5213506e
RW
2212 fi
2213 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2214 return $ac_retval
ba479fd2 2215
5213506e 2216} # ac_fn_c_compute_int
ba479fd2 2217
5213506e
RW
2218# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2219# -------------------------------------------
2220# Tests whether TYPE exists after having included INCLUDES, setting cache
2221# variable VAR accordingly.
2222ac_fn_c_check_type ()
2223{
2224 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2226$as_echo_n "checking for $2... " >&6; }
2227if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2228 $as_echo_n "(cached) " >&6
2229else
2230 eval "$3=no"
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233$4
2234int
2235main ()
2236{
2237if (sizeof ($2))
2238 return 0;
2239 ;
2240 return 0;
2241}
2242_ACEOF
2243if ac_fn_c_try_compile "$LINENO"; then :
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$4
2247int
2248main ()
2249{
2250if (sizeof (($2)))
2251 return 0;
2252 ;
2253 return 0;
2254}
2255_ACEOF
2256if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 2257
5213506e
RW
2258else
2259 eval "$3=yes"
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265eval ac_res=\$$3
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2267$as_echo "$ac_res" >&6; }
2268 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2269
5213506e 2270} # ac_fn_c_check_type
ba479fd2 2271
fa802374
KT
2272# ac_fn_c_find_intX_t LINENO BITS VAR
2273# -----------------------------------
2274# Finds a signed integer type with width BITS, setting cache variable VAR
2275# accordingly.
2276ac_fn_c_find_intX_t ()
5213506e
RW
2277{
2278 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
fa802374
KT
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2280$as_echo_n "checking for int$2_t... " >&6; }
5213506e
RW
2281if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2282 $as_echo_n "(cached) " >&6
2283else
fa802374
KT
2284 eval "$3=no"
2285 for ac_type in int$2_t 'int' 'long int' \
2286 'long long int' 'short int' 'signed char'; do
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h. */
2289$ac_includes_default
2290int
2291main ()
2292{
2293static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
2294test_array [0] = 0
2295
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_compile "$LINENO"; then :
5213506e
RW
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
fa802374
KT
2303$ac_includes_default
2304int
2305main ()
2306{
2307static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
2308 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
2309test_array [0] = 0
2310
2311 ;
2312 return 0;
2313}
5213506e 2314_ACEOF
fa802374
KT
2315if ac_fn_c_try_compile "$LINENO"; then :
2316
5213506e 2317else
fa802374
KT
2318 case $ac_type in #(
2319 int$2_t) :
2320 eval "$3=yes" ;; #(
2321 *) :
2322 eval "$3=\$ac_type" ;;
2323esac
5213506e 2324fi
fa802374
KT
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328 eval as_val=\$$3
2329 if test "x$as_val" = x""no; then :
2330
2331else
2332 break
2333fi
2334 done
5213506e
RW
2335fi
2336eval ac_res=\$$3
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
ba479fd2 2340
fa802374 2341} # ac_fn_c_find_intX_t
18c04407 2342
5213506e
RW
2343# ac_fn_c_try_link LINENO
2344# -----------------------
2345# Try to link conftest.$ac_ext, and return whether this succeeded.
2346ac_fn_c_try_link ()
2347{
2348 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349 rm -f conftest.$ac_objext conftest$ac_exeext
2350 if { { ac_try="$ac_link"
2351case "(($ac_try" in
2352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353 *) ac_try_echo=$ac_try;;
2354esac
2355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356$as_echo "$ac_try_echo"; } >&5
2357 (eval "$ac_link") 2>conftest.err
2358 ac_status=$?
2359 if test -s conftest.err; then
2360 grep -v '^ *+' conftest.err >conftest.er1
2361 cat conftest.er1 >&5
2362 mv -f conftest.er1 conftest.err
2363 fi
2364 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365 test $ac_status = 0; } && {
2366 test -z "$ac_c_werror_flag" ||
2367 test ! -s conftest.err
2368 } && test -s conftest$ac_exeext && {
2369 test "$cross_compiling" = yes ||
2370 $as_test_x conftest$ac_exeext
2371 }; then :
2372 ac_retval=0
2373else
2374 $as_echo "$as_me: failed program was:" >&5
2375sed 's/^/| /' conftest.$ac_ext >&5
18c04407 2376
5213506e
RW
2377 ac_retval=1
2378fi
2379 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2380 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2381 # interfere with the next link command; also delete a directory that is
2382 # left behind by Apple's compiler. We do this before executing the actions.
2383 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2384 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2385 return $ac_retval
18c04407 2386
5213506e 2387} # ac_fn_c_try_link
ba479fd2 2388
fa802374
KT
2389# ac_fn_c_find_uintX_t LINENO BITS VAR
2390# ------------------------------------
2391# Finds an unsigned integer type with width BITS, setting cache variable VAR
2392# accordingly.
2393ac_fn_c_find_uintX_t ()
2394{
2395 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2397$as_echo_n "checking for uint$2_t... " >&6; }
2398if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2399 $as_echo_n "(cached) " >&6
2400else
2401 eval "$3=no"
2402 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2403 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h. */
2406$ac_includes_default
2407int
2408main ()
2409{
2410static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
2411test_array [0] = 0
2412
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418 case $ac_type in #(
2419 uint$2_t) :
2420 eval "$3=yes" ;; #(
2421 *) :
2422 eval "$3=\$ac_type" ;;
2423esac
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426 eval as_val=\$$3
2427 if test "x$as_val" = x""no; then :
2428
2429else
2430 break
2431fi
2432 done
2433fi
2434eval ac_res=\$$3
2435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2436$as_echo "$ac_res" >&6; }
2437 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438
2439} # ac_fn_c_find_uintX_t
2440
2441# ac_fn_c_check_header_preproc LINENO HEADER VAR
2442# ----------------------------------------------
2443# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2444ac_fn_c_check_header_preproc ()
2445{
2446 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2448$as_echo_n "checking for $2... " >&6; }
2449if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2450 $as_echo_n "(cached) " >&6
2451else
2452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2453/* end confdefs.h. */
2454#include <$2>
2455_ACEOF
2456if ac_fn_c_try_cpp "$LINENO"; then :
2457 eval "$3=yes"
2458else
2459 eval "$3=no"
2460fi
2461rm -f conftest.err conftest.$ac_ext
2462fi
2463eval ac_res=\$$3
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2465$as_echo "$ac_res" >&6; }
2466 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2467
2468} # ac_fn_c_check_header_preproc
2469
5213506e
RW
2470# ac_fn_c_check_func LINENO FUNC VAR
2471# ----------------------------------
2472# Tests whether FUNC exists, setting the cache variable VAR accordingly
2473ac_fn_c_check_func ()
2474{
2475 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2477$as_echo_n "checking for $2... " >&6; }
2478if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2479 $as_echo_n "(cached) " >&6
2480else
2481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2482/* end confdefs.h. */
2483/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2484 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2485#define $2 innocuous_$2
ba479fd2 2486
5213506e
RW
2487/* System header to define __stub macros and hopefully few prototypes,
2488 which can conflict with char $2 (); below.
2489 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2490 <limits.h> exists even on freestanding compilers. */
914c5af7 2491
5213506e
RW
2492#ifdef __STDC__
2493# include <limits.h>
2494#else
2495# include <assert.h>
2496#endif
ba479fd2 2497
5213506e 2498#undef $2
ba479fd2 2499
5213506e
RW
2500/* Override any GCC internal prototype to avoid an error.
2501 Use char because int might match the return type of a GCC
2502 builtin and then its argument prototype would still apply. */
2503#ifdef __cplusplus
2504extern "C"
2505#endif
2506char $2 ();
2507/* The GNU C library defines this for functions which it implements
2508 to always fail with ENOSYS. Some functions are actually named
2509 something starting with __ and the normal name is an alias. */
2510#if defined __stub_$2 || defined __stub___$2
2511choke me
2512#endif
9f18db39 2513
5213506e
RW
2514int
2515main ()
2516{
2517return $2 ();
2518 ;
2519 return 0;
2520}
2521_ACEOF
2522if ac_fn_c_try_link "$LINENO"; then :
2523 eval "$3=yes"
2524else
2525 eval "$3=no"
ba479fd2 2526fi
5213506e
RW
2527rm -f core conftest.err conftest.$ac_objext \
2528 conftest$ac_exeext conftest.$ac_ext
2529fi
2530eval ac_res=\$$3
2531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2532$as_echo "$ac_res" >&6; }
2533 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
b61ff9c8 2534
5213506e 2535} # ac_fn_c_check_func
b61ff9c8 2536
5213506e
RW
2537# ac_fn_cxx_try_cpp LINENO
2538# ------------------------
2539# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2540ac_fn_cxx_try_cpp ()
2541{
2542 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543 if { { ac_try="$ac_cpp conftest.$ac_ext"
2544case "(($ac_try" in
2545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2546 *) ac_try_echo=$ac_try;;
2547esac
2548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2549$as_echo "$ac_try_echo"; } >&5
2550 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2551 ac_status=$?
2552 if test -s conftest.err; then
2553 grep -v '^ *+' conftest.err >conftest.er1
2554 cat conftest.er1 >&5
2555 mv -f conftest.er1 conftest.err
2556 fi
2557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2558 test $ac_status = 0; } >/dev/null && {
2559 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2560 test ! -s conftest.err
2561 }; then :
2562 ac_retval=0
2563else
2564 $as_echo "$as_me: failed program was:" >&5
2565sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2566
5213506e 2567 ac_retval=1
ba479fd2 2568fi
5213506e
RW
2569 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2570 return $ac_retval
b61ff9c8 2571
5213506e 2572} # ac_fn_cxx_try_cpp
b61ff9c8 2573
5213506e
RW
2574# ac_fn_cxx_try_link LINENO
2575# -------------------------
2576# Try to link conftest.$ac_ext, and return whether this succeeded.
2577ac_fn_cxx_try_link ()
2578{
2579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2580 rm -f conftest.$ac_objext conftest$ac_exeext
2581 if { { ac_try="$ac_link"
2582case "(($ac_try" in
2583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2584 *) ac_try_echo=$ac_try;;
2585esac
2586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2587$as_echo "$ac_try_echo"; } >&5
2588 (eval "$ac_link") 2>conftest.err
2589 ac_status=$?
2590 if test -s conftest.err; then
2591 grep -v '^ *+' conftest.err >conftest.er1
2592 cat conftest.er1 >&5
2593 mv -f conftest.er1 conftest.err
2594 fi
2595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2596 test $ac_status = 0; } && {
2597 test -z "$ac_cxx_werror_flag" ||
2598 test ! -s conftest.err
2599 } && test -s conftest$ac_exeext && {
2600 test "$cross_compiling" = yes ||
2601 $as_test_x conftest$ac_exeext
2602 }; then :
2603 ac_retval=0
2604else
2605 $as_echo "$as_me: failed program was:" >&5
2606sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2607
5213506e 2608 ac_retval=1
ba479fd2 2609fi
5213506e
RW
2610 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2611 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2612 # interfere with the next link command; also delete a directory that is
2613 # left behind by Apple's compiler. We do this before executing the actions.
2614 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2615 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2616 return $ac_retval
ba479fd2 2617
5213506e
RW
2618} # ac_fn_cxx_try_link
2619cat >config.log <<_ACEOF
2620This file contains any messages produced by compilers while
2621running configure, to aid debugging if configure makes a mistake.
ba479fd2 2622
5213506e
RW
2623It was created by $as_me, which was
2624generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2 2625
5213506e 2626 $ $0 $@
18fc9bd4 2627
5213506e
RW
2628_ACEOF
2629exec 5>>config.log
2630{
2631cat <<_ASUNAME
2632## --------- ##
2633## Platform. ##
2634## --------- ##
18fc9bd4 2635
5213506e
RW
2636hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2637uname -m = `(uname -m) 2>/dev/null || echo unknown`
2638uname -r = `(uname -r) 2>/dev/null || echo unknown`
2639uname -s = `(uname -s) 2>/dev/null || echo unknown`
2640uname -v = `(uname -v) 2>/dev/null || echo unknown`
18fc9bd4 2641
5213506e
RW
2642/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2643/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
18fc9bd4 2644
5213506e
RW
2645/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2646/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2647/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2648/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2649/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2650/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2651/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
18fc9bd4 2652
5213506e 2653_ASUNAME
8f1529e6 2654
5213506e
RW
2655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2656for as_dir in $PATH
2657do
2658 IFS=$as_save_IFS
2659 test -z "$as_dir" && as_dir=.
2660 $as_echo "PATH: $as_dir"
2661 done
2662IFS=$as_save_IFS
57255173 2663
5213506e 2664} >&5
57255173 2665
5213506e 2666cat >&5 <<_ACEOF
1546bb64 2667
18fc9bd4 2668
5213506e
RW
2669## ----------- ##
2670## Core tests. ##
2671## ----------- ##
73458fb7 2672
ba479fd2 2673_ACEOF
13c22933
JJ
2674
2675
5213506e
RW
2676# Keep a trace of the command line.
2677# Strip out --no-create and --no-recursion so they do not pile up.
2678# Strip out --silent because we don't want to record it for future runs.
2679# Also quote any args containing shell meta-characters.
2680# Make two passes to allow for proper duplicate-argument suppression.
2681ac_configure_args=
2682ac_configure_args0=
2683ac_configure_args1=
2684ac_must_keep_next=false
2685for ac_pass in 1 2
00020c16 2686do
5213506e
RW
2687 for ac_arg
2688 do
2689 case $ac_arg in
2690 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2691 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2692 | -silent | --silent | --silen | --sile | --sil)
2693 continue ;;
2694 *\'*)
2695 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2696 esac
2697 case $ac_pass in
2698 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2699 2)
2700 as_fn_append ac_configure_args1 " '$ac_arg'"
2701 if test $ac_must_keep_next = true; then
2702 ac_must_keep_next=false # Got value, back to normal.
2703 else
2704 case $ac_arg in
2705 *=* | --config-cache | -C | -disable-* | --disable-* \
2706 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2707 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2708 | -with-* | --with-* | -without-* | --without-* | --x)
2709 case "$ac_configure_args0 " in
2710 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2711 esac
2712 ;;
2713 -* ) ac_must_keep_next=true ;;
2714 esac
2715 fi
2716 as_fn_append ac_configure_args " '$ac_arg'"
2717 ;;
2718 esac
2719 done
00020c16 2720done
5213506e
RW
2721{ ac_configure_args0=; unset ac_configure_args0;}
2722{ ac_configure_args1=; unset ac_configure_args1;}
60d26958 2723
5213506e
RW
2724# When interrupted or exit'd, cleanup temporary files, and complete
2725# config.log. We remove comments because anyway the quotes in there
2726# would cause problems or look ugly.
2727# WARNING: Use '\'' to represent an apostrophe within the trap.
2728# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2729trap 'exit_status=$?
2730 # Save into config.log some information that might help in debugging.
2731 {
2732 echo
1a4b763e 2733
5213506e
RW
2734 cat <<\_ASBOX
2735## ---------------- ##
2736## Cache variables. ##
2737## ---------------- ##
2738_ASBOX
2739 echo
2740 # The following way of writing the cache mishandles newlines in values,
2741(
2742 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2743 eval ac_val=\$$ac_var
2744 case $ac_val in #(
2745 *${as_nl}*)
2746 case $ac_var in #(
2747 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2748$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2749 esac
2750 case $ac_var in #(
2751 _ | IFS | as_nl) ;; #(
2752 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2753 *) { eval $ac_var=; unset $ac_var;} ;;
2754 esac ;;
2755 esac
2756 done
2757 (set) 2>&1 |
2758 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2759 *${as_nl}ac_space=\ *)
2760 sed -n \
2761 "s/'\''/'\''\\\\'\'''\''/g;
2762 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2763 ;; #(
2764 *)
2765 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2766 ;;
2767 esac |
2768 sort
2769)
2770 echo
1a4b763e 2771
5213506e
RW
2772 cat <<\_ASBOX
2773## ----------------- ##
2774## Output variables. ##
2775## ----------------- ##
2776_ASBOX
2777 echo
2778 for ac_var in $ac_subst_vars
2779 do
2780 eval ac_val=\$$ac_var
2781 case $ac_val in
2782 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2783 esac
2784 $as_echo "$ac_var='\''$ac_val'\''"
2785 done | sort
2786 echo
60d26958 2787
5213506e
RW
2788 if test -n "$ac_subst_files"; then
2789 cat <<\_ASBOX
2790## ------------------- ##
2791## File substitutions. ##
2792## ------------------- ##
2793_ASBOX
2794 echo
2795 for ac_var in $ac_subst_files
2796 do
2797 eval ac_val=\$$ac_var
2798 case $ac_val in
2799 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2800 esac
2801 $as_echo "$ac_var='\''$ac_val'\''"
2802 done | sort
2803 echo
2804 fi
60d26958 2805
5213506e
RW
2806 if test -s confdefs.h; then
2807 cat <<\_ASBOX
2808## ----------- ##
2809## confdefs.h. ##
2810## ----------- ##
2811_ASBOX
2812 echo
2813 cat confdefs.h
2814 echo
2815 fi
2816 test "$ac_signal" != 0 &&
2817 $as_echo "$as_me: caught signal $ac_signal"
2818 $as_echo "$as_me: exit $exit_status"
2819 } >&5
2820 rm -f core *.core core.conftest.* &&
2821 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2822 exit $exit_status
2823' 0
2824for ac_signal in 1 2 13 15; do
2825 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
00020c16 2826done
5213506e 2827ac_signal=0
00020c16 2828
5213506e
RW
2829# confdefs.h avoids OS command line length limits that DEFS can exceed.
2830rm -f -r conftest* confdefs.h
00020c16 2831
5213506e
RW
2832$as_echo "/* confdefs.h */" > confdefs.h
2833
2834# Predefined preprocessor variables.
2835
2836cat >>confdefs.h <<_ACEOF
2837#define PACKAGE_NAME "$PACKAGE_NAME"
60d26958 2838_ACEOF
60d26958 2839
5213506e
RW
2840cat >>confdefs.h <<_ACEOF
2841#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2842_ACEOF
60d26958 2843
5213506e
RW
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_VERSION "$PACKAGE_VERSION"
60d26958 2846_ACEOF
5213506e
RW
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_STRING "$PACKAGE_STRING"
60d26958 2850_ACEOF
60d26958 2851
5213506e
RW
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2854_ACEOF
60d26958 2855
5213506e
RW
2856cat >>confdefs.h <<_ACEOF
2857#define PACKAGE_URL "$PACKAGE_URL"
2858_ACEOF
00020c16 2859
60d26958 2860
5213506e
RW
2861# Let the site file select an alternate cache file if it wants to.
2862# Prefer an explicitly selected file to automatically selected ones.
2863ac_site_file1=NONE
2864ac_site_file2=NONE
2865if test -n "$CONFIG_SITE"; then
2866 ac_site_file1=$CONFIG_SITE
2867elif test "x$prefix" != xNONE; then
2868 ac_site_file1=$prefix/share/config.site
2869 ac_site_file2=$prefix/etc/config.site
2870else
2871 ac_site_file1=$ac_default_prefix/share/config.site
2872 ac_site_file2=$ac_default_prefix/etc/config.site
2873fi
2874for ac_site_file in "$ac_site_file1" "$ac_site_file2"
00020c16 2875do
5213506e
RW
2876 test "x$ac_site_file" = xNONE && continue
2877 if test -r "$ac_site_file"; then
2878 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2879$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2880 sed 's/^/| /' "$ac_site_file" >&5
2881 . "$ac_site_file"
60d26958 2882 fi
5213506e 2883done
60d26958 2884
5213506e
RW
2885if test -r "$cache_file"; then
2886 # Some versions of bash will fail to source /dev/null (special
2887 # files actually), so we avoid doing that.
2888 if test -f "$cache_file"; then
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2890$as_echo "$as_me: loading cache $cache_file" >&6;}
2891 case $cache_file in
2892 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2893 *) . "./$cache_file";;
2894 esac
60d26958
PB
2895 fi
2896else
5213506e
RW
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2898$as_echo "$as_me: creating cache $cache_file" >&6;}
2899 >$cache_file
bf3b7cd3
JD
2900fi
2901
5213506e
RW
2902# Check that the precious variables saved in the cache have kept the same
2903# value.
2904ac_cache_corrupted=false
2905for ac_var in $ac_precious_vars; do
2906 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2907 eval ac_new_set=\$ac_env_${ac_var}_set
2908 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2909 eval ac_new_val=\$ac_env_${ac_var}_value
2910 case $ac_old_set,$ac_new_set in
2911 set,)
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2914 ac_cache_corrupted=: ;;
2915 ,set)
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2917$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2918 ac_cache_corrupted=: ;;
2919 ,);;
2920 *)
2921 if test "x$ac_old_val" != "x$ac_new_val"; then
2922 # differences in whitespace do not lead to failure.
2923 ac_old_val_w=`echo x $ac_old_val`
2924 ac_new_val_w=`echo x $ac_new_val`
2925 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2927$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2928 ac_cache_corrupted=:
2929 else
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2931$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2932 eval $ac_var=\$ac_old_val
2933 fi
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2935$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2937$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2938 fi;;
2939 esac
2940 # Pass precious variables to config.status.
2941 if test "$ac_new_set" = set; then
2942 case $ac_new_val in
2943 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2944 *) ac_arg=$ac_var=$ac_new_val ;;
2945 esac
2946 case " $ac_configure_args " in
2947 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2948 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2949 esac
2950 fi
60d26958 2951done
5213506e
RW
2952if $ac_cache_corrupted; then
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2956$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2957 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
60d26958 2958fi
5213506e
RW
2959## -------------------- ##
2960## Main body of script. ##
2961## -------------------- ##
60d26958 2962
00020c16
ILT
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
60d26958 2968
00020c16 2969
bf3b7cd3 2970
bf3b7cd3 2971
00020c16 2972
bf3b7cd3 2973
5213506e 2974ac_config_headers="$ac_config_headers auto-host.h:config.in"
bf3b7cd3 2975
bf3b7cd3 2976
5213506e 2977gcc_version=`cat $srcdir/BASE-VER`
bf3b7cd3 2978
5213506e
RW
2979# Determine the host, build, and target systems
2980ac_aux_dir=
2981for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2982 for ac_t in install-sh install.sh shtool; do
2983 if test -f "$ac_dir/$ac_t"; then
2984 ac_aux_dir=$ac_dir
2985 ac_install_sh="$ac_aux_dir/$ac_t -c"
2986 break 2
2987 fi
2988 done
2989done
2990if test -z "$ac_aux_dir"; then
2991 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
00020c16 2992fi
5213506e
RW
2993
2994# These three variables are undocumented and unsupported,
2995# and are intended to be withdrawn in a future Autoconf release.
2996# They can cause serious problems if a builder's source tree is in a directory
2997# whose full name contains unusual characters.
2998ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2999ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3000ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3001
3002
3003# Make sure we can run config.sub.
3004$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3005 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3006
3007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3008$as_echo_n "checking build system type... " >&6; }
3009if test "${ac_cv_build+set}" = set; then :
3010 $as_echo_n "(cached) " >&6
3011else
3012 ac_build_alias=$build_alias
3013test "x$ac_build_alias" = x &&
3014 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3015test "x$ac_build_alias" = x &&
3016 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3017ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3018 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3019
3020fi
3021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3022$as_echo "$ac_cv_build" >&6; }
3023case $ac_cv_build in
3024*-*-*) ;;
3025*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3026esac
3027build=$ac_cv_build
3028ac_save_IFS=$IFS; IFS='-'
3029set x $ac_cv_build
3030shift
3031build_cpu=$1
3032build_vendor=$2
3033shift; shift
3034# Remember, the first character of IFS is used to create $*,
3035# except with old shells:
3036build_os=$*
3037IFS=$ac_save_IFS
3038case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3039
3040
3041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3042$as_echo_n "checking host system type... " >&6; }
3043if test "${ac_cv_host+set}" = set; then :
3044 $as_echo_n "(cached) " >&6
3045else
3046 if test "x$host_alias" = x; then
3047 ac_cv_host=$ac_cv_build
3048else
3049 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3050 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
00020c16 3051fi
5213506e 3052
00020c16 3053fi
5213506e
RW
3054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3055$as_echo "$ac_cv_host" >&6; }
3056case $ac_cv_host in
3057*-*-*) ;;
3058*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3059esac
3060host=$ac_cv_host
3061ac_save_IFS=$IFS; IFS='-'
3062set x $ac_cv_host
3063shift
3064host_cpu=$1
3065host_vendor=$2
3066shift; shift
3067# Remember, the first character of IFS is used to create $*,
3068# except with old shells:
3069host_os=$*
3070IFS=$ac_save_IFS
3071case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
00020c16 3072
bf3b7cd3 3073
5213506e
RW
3074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3075$as_echo_n "checking target system type... " >&6; }
3076if test "${ac_cv_target+set}" = set; then :
3077 $as_echo_n "(cached) " >&6
3078else
3079 if test "x$target_alias" = x; then
3080 ac_cv_target=$ac_cv_host
3081else
3082 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3083 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
bf3b7cd3
JD
3084fi
3085
5213506e
RW
3086fi
3087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3088$as_echo "$ac_cv_target" >&6; }
3089case $ac_cv_target in
3090*-*-*) ;;
3091*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
3092esac
3093target=$ac_cv_target
3094ac_save_IFS=$IFS; IFS='-'
3095set x $ac_cv_target
3096shift
3097target_cpu=$1
3098target_vendor=$2
3099shift; shift
3100# Remember, the first character of IFS is used to create $*,
3101# except with old shells:
3102target_os=$*
3103IFS=$ac_save_IFS
3104case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
60d26958 3105
bf3b7cd3 3106
5213506e
RW
3107# The aliases save the names the user supplied, while $host etc.
3108# will get canonicalized.
3109test -n "$target_alias" &&
3110 test "$program_prefix$program_suffix$program_transform_name" = \
3111 NONENONEs,x,x, &&
3112 program_prefix=${target_alias}-
bf3b7cd3 3113
5213506e
RW
3114# Determine the noncanonical target name, for directory use.
3115 case ${build_alias} in
3116 "") build_noncanonical=${build} ;;
3117 *) build_noncanonical=${build_alias} ;;
3118esac
00020c16 3119
5213506e
RW
3120 case ${host_alias} in
3121 "") host_noncanonical=${build_noncanonical} ;;
3122 *) host_noncanonical=${host_alias} ;;
3123esac
00020c16 3124
5213506e
RW
3125 case ${target_alias} in
3126 "") target_noncanonical=${host_noncanonical} ;;
3127 *) target_noncanonical=${target_alias} ;;
3128esac
00020c16
ILT
3129
3130
3131
3132
5213506e 3133# Determine the target- and build-specific subdirectories
00020c16 3134
5213506e
RW
3135# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
3136# have matching libraries, they should use host libraries: Makefile.tpl
3137# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
3138# However, they still use the build modules, because the corresponding
3139# host modules (e.g. bison) are only built for the host when bootstrap
3140# finishes. So:
3141# - build_subdir is where we find build modules, and never changes.
3142# - build_libsubdir is where we find build libraries, and can be overridden.
bf3b7cd3 3143
5213506e
RW
3144# Prefix 'build-' so this never conflicts with target_subdir.
3145build_subdir="build-${build_noncanonical}"
3146
3147# Check whether --with-build-libsubdir was given.
3148if test "${with_build_libsubdir+set}" = set; then :
3149 withval=$with_build_libsubdir; build_libsubdir="$withval"
3150else
3151 build_libsubdir="$build_subdir"
bf3b7cd3 3152fi
bf3b7cd3 3153
5213506e
RW
3154# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
3155if ( test $srcdir = . && test -d gcc ) \
3156 || test -d $srcdir/../host-${host_noncanonical}; then
3157 host_subdir="host-${host_noncanonical}"
3158else
3159 host_subdir=.
00020c16 3160fi
5213506e
RW
3161# No prefix.
3162target_subdir=${target_noncanonical}
00020c16 3163
00020c16 3164
5213506e
RW
3165# Set program_transform_name
3166test "$program_prefix" != NONE &&
3167 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3168# Use a double $ so make ignores it.
3169test "$program_suffix" != NONE &&
3170 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3171# Double any \ or $.
3172# By default was `s,x,x', remove it if useless.
3173ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3174program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
00020c16
ILT
3175
3176
5213506e
RW
3177# Check for bogus environment variables.
3178# Test if LIBRARY_PATH contains the notation for the current directory
3179# since this would lead to problems installing/building glibc.
3180# LIBRARY_PATH contains the current directory if one of the following
3181# is true:
3182# - one of the terminals (":" and ";") is the first or last sign
3183# - two terminals occur directly after each other
3184# - the path contains an element with a dot in it
3185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY_PATH variable" >&5
3186$as_echo_n "checking LIBRARY_PATH variable... " >&6; }
3187case ${LIBRARY_PATH} in
3188 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3189 library_path_setting="contains current directory"
3190 ;;
3191 *)
3192 library_path_setting="ok"
3193 ;;
3194esac
3195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $library_path_setting" >&5
3196$as_echo "$library_path_setting" >&6; }
3197if test "$library_path_setting" != "ok"; then
3198as_fn_error "
3199*** LIBRARY_PATH shouldn't contain the current directory when
3200*** building gcc. Please change the environment variable
3201*** and run configure again." "$LINENO" 5
00020c16 3202fi
00020c16 3203
5213506e
RW
3204# Test if GCC_EXEC_PREFIX contains the notation for the current directory
3205# since this would lead to problems installing/building glibc.
3206# GCC_EXEC_PREFIX contains the current directory if one of the following
3207# is true:
3208# - one of the terminals (":" and ";") is the first or last sign
3209# - two terminals occur directly after each other
3210# - the path contains an element with a dot in it
3211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GCC_EXEC_PREFIX variable" >&5
3212$as_echo_n "checking GCC_EXEC_PREFIX variable... " >&6; }
3213case ${GCC_EXEC_PREFIX} in
3214 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
3215 gcc_exec_prefix_setting="contains current directory"
3216 ;;
3217 *)
3218 gcc_exec_prefix_setting="ok"
3219 ;;
3220esac
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_exec_prefix_setting" >&5
3222$as_echo "$gcc_exec_prefix_setting" >&6; }
3223if test "$gcc_exec_prefix_setting" != "ok"; then
3224as_fn_error "
3225*** GCC_EXEC_PREFIX shouldn't contain the current directory when
3226*** building gcc. Please change the environment variable
3227*** and run configure again." "$LINENO" 5
00020c16 3228fi
00020c16 3229
5213506e
RW
3230# -----------
3231# Directories
3232# -----------
3233
3234# Specify the local prefix
3235local_prefix=
3236
3237# Check whether --with-local-prefix was given.
3238if test "${with_local_prefix+set}" = set; then :
3239 withval=$with_local_prefix; case "${withval}" in
3240yes) as_fn_error "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;;
3241no) ;;
3242*) local_prefix=$with_local_prefix ;;
3243esac
00020c16 3244fi
bf3b7cd3 3245
5213506e
RW
3246
3247# Default local prefix if it is empty
3248if test x$local_prefix = x; then
3249 local_prefix=/usr/local
bf3b7cd3 3250fi
00020c16 3251
5213506e
RW
3252# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
3253# passed in by the toplevel make and thus we'd get different behavior
3254# depending on where we built the sources.
3255gcc_gxx_include_dir=
3256# Specify the g++ header file directory
3257
3258# Check whether --with-gxx-include-dir was given.
3259if test "${with_gxx_include_dir+set}" = set; then :
3260 withval=$with_gxx_include_dir; case "${withval}" in
3261yes) as_fn_error "bad value ${withval} given for g++ include directory" "$LINENO" 5 ;;
3262no) ;;
3263*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
00020c16 3264esac
00020c16 3265fi
bf3b7cd3 3266
5213506e
RW
3267
3268# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
3269if test x${gcc_gxx_include_dir} = x; then
3270 if test x${enable_version_specific_runtime_libs} = xyes; then
3271 gcc_gxx_include_dir='${libsubdir}/include/c++'
3272 else
3273 libstdcxx_incdir='include/c++/$(version)'
3274 if test x$host != x$target; then
3275 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
3276 fi
3277 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
3278 fi
00020c16
ILT
3279fi
3280
3281
5213506e
RW
3282# Check whether --with-cpp_install_dir was given.
3283if test "${with_cpp_install_dir+set}" = set; then :
3284 withval=$with_cpp_install_dir; if test x$withval = xyes; then
3285 as_fn_error "option --with-cpp-install-dir requires an argument" "$LINENO" 5
3286elif test x$withval != xno; then
3287 cpp_install_dir=$withval
3288fi
3289fi
00020c16 3290
00020c16 3291
5213506e
RW
3292# We would like to our source tree to be readonly. However when releases or
3293# pre-releases are generated, the flex/bison generated files as well as the
3294# various formats of manuals need to be included along with the rest of the
3295# sources. Therefore we have --enable-generated-files-in-srcdir to do
3296# just that.
00020c16 3297
5213506e
RW
3298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to place generated files in the source directory" >&5
3299$as_echo_n "checking whether to place generated files in the source directory... " >&6; }
3300 # Check whether --enable-generated-files-in-srcdir was given.
3301if test "${enable_generated_files_in_srcdir+set}" = set; then :
3302 enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval
3303else
3304 generated_files_in_srcdir=no
3305fi
00020c16
ILT
3306
3307
5213506e
RW
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $generated_files_in_srcdir" >&5
3309$as_echo "$generated_files_in_srcdir" >&6; }
00020c16 3310
5213506e
RW
3311if test "$generated_files_in_srcdir" = "yes"; then
3312 GENINSRC=''
3313else
3314 GENINSRC='#'
3315fi
00020c16
ILT
3316
3317
5213506e
RW
3318# -------------------
3319# Find default linker
3320# -------------------
3321
3322# With GNU ld
00020c16 3323
5213506e
RW
3324# Check whether --with-gnu-ld was given.
3325if test "${with_gnu_ld+set}" = set; then :
3326 withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld"
00020c16 3327else
5213506e
RW
3328 gnu_ld_flag=no
3329fi
00020c16 3330
bf3b7cd3 3331
5213506e 3332# With pre-defined ld
00020c16 3333
5213506e
RW
3334# Check whether --with-ld was given.
3335if test "${with_ld+set}" = set; then :
3336 withval=$with_ld; DEFAULT_LINKER="$with_ld"
00020c16 3337fi
00020c16 3338
5213506e
RW
3339if test x"${DEFAULT_LINKER+set}" = x"set"; then
3340 if test ! -x "$DEFAULT_LINKER"; then
3341 as_fn_error "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5
3342 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3343 gnu_ld_flag=yes
3344 fi
3345
3346cat >>confdefs.h <<_ACEOF
3347#define DEFAULT_LINKER "$DEFAULT_LINKER"
00020c16
ILT
3348_ACEOF
3349
5213506e 3350fi
00020c16 3351
5213506e 3352gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
00020c16 3353
5213506e
RW
3354cat >>confdefs.h <<_ACEOF
3355#define HAVE_GNU_LD $gnu_ld
00020c16
ILT
3356_ACEOF
3357
3358
5213506e
RW
3359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default linker was specified" >&5
3360$as_echo_n "checking whether a default linker was specified... " >&6; }
3361if test x"${DEFAULT_LINKER+set}" = x"set"; then
3362 if test x"$gnu_ld_flag" = x"no"; then
3363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER)" >&5
3364$as_echo "yes ($DEFAULT_LINKER)" >&6; }
00020c16 3365 else
5213506e
RW
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
3367$as_echo "yes ($DEFAULT_LINKER - GNU ld)" >&6; }
00020c16 3368 fi
bf3b7cd3 3369else
5213506e
RW
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371$as_echo "no" >&6; }
bf3b7cd3 3372fi
bf3b7cd3 3373
5213506e 3374# With demangler in GNU ld
00020c16 3375
5213506e
RW
3376# Check whether --with-demangler-in-ld was given.
3377if test "${with_demangler_in_ld+set}" = set; then :
3378 withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld"
00020c16 3379else
5213506e 3380 demangler_in_ld=no
00020c16 3381fi
bf3b7cd3 3382
00020c16 3383
5213506e
RW
3384# ----------------------
3385# Find default assembler
3386# ----------------------
00020c16 3387
5213506e 3388# With GNU as
00020c16 3389
5213506e
RW
3390# Check whether --with-gnu-as was given.
3391if test "${with_gnu_as+set}" = set; then :
3392 withval=$with_gnu_as; gas_flag="$with_gnu_as"
00020c16 3393else
5213506e 3394 gas_flag=no
00020c16 3395fi
00020c16 3396
5213506e
RW
3397
3398
3399# Check whether --with-as was given.
3400if test "${with_as+set}" = set; then :
3401 withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
00020c16 3402fi
00020c16 3403
5213506e
RW
3404if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3405 if test ! -x "$DEFAULT_ASSEMBLER"; then
3406 as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5
3407 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
3408 gas_flag=yes
3409 fi
3410
3411cat >>confdefs.h <<_ACEOF
3412#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
00020c16 3413_ACEOF
5213506e
RW
3414
3415fi
3416
3417gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
3418
3419cat >>confdefs.h <<_ACEOF
3420#define HAVE_GNU_AS $gnu_as
00020c16 3421_ACEOF
5213506e
RW
3422
3423
3424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5
3425$as_echo_n "checking whether a default assembler was specified... " >&6; }
3426if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
3427 if test x"$gas_flag" = x"no"; then
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5
3429$as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; }
00020c16 3430 else
5213506e
RW
3431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
3432$as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; }
00020c16 3433 fi
bf3b7cd3 3434else
5213506e
RW
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3436$as_echo "no" >&6; }
00020c16 3437fi
bf3b7cd3 3438
5213506e
RW
3439# ---------------
3440# Find C compiler
3441# ---------------
00020c16 3442
5213506e
RW
3443# If a non-executable a.out is present (e.g. created by GNU as above even if
3444# invoked with -v only), the IRIX 6 native ld just overwrites the existing
3445# file, even when creating an executable, so an execution test fails.
3446# Remove possible default executable files to avoid this.
3447#
3448# FIXME: This really belongs into AC_PROG_CC and can be removed once
3449# Autoconf includes it.
3450rm -f a.out a.exe b.out
bf3b7cd3 3451
5213506e 3452# Find the native compiler
00020c16
ILT
3453ac_ext=c
3454ac_cpp='$CPP $CPPFLAGS'
3455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3457ac_compiler_gnu=$ac_cv_c_compiler_gnu
5213506e
RW
3458if test -n "$ac_tool_prefix"; then
3459 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3460set dummy ${ac_tool_prefix}gcc; ac_word=$2
3461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3462$as_echo_n "checking for $ac_word... " >&6; }
3463if test "${ac_cv_prog_CC+set}" = set; then :
3464 $as_echo_n "(cached) " >&6
bf3b7cd3 3465else
5213506e
RW
3466 if test -n "$CC"; then
3467 ac_cv_prog_CC="$CC" # Let the user override the test.
3468else
3469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470for as_dir in $PATH
3471do
3472 IFS=$as_save_IFS
3473 test -z "$as_dir" && as_dir=.
3474 for ac_exec_ext in '' $ac_executable_extensions; do
3475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3476 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3478 break 2
3479 fi
3480done
3481 done
3482IFS=$as_save_IFS
00020c16 3483
5213506e
RW
3484fi
3485fi
3486CC=$ac_cv_prog_CC
3487if test -n "$CC"; then
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3489$as_echo "$CC" >&6; }
bf3b7cd3 3490else
5213506e
RW
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3492$as_echo "no" >&6; }
3493fi
3494
bf3b7cd3 3495
bf3b7cd3 3496fi
5213506e
RW
3497if test -z "$ac_cv_prog_CC"; then
3498 ac_ct_CC=$CC
3499 # Extract the first word of "gcc", so it can be a program name with args.
3500set dummy gcc; ac_word=$2
3501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3502$as_echo_n "checking for $ac_word... " >&6; }
3503if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3504 $as_echo_n "(cached) " >&6
3505else
3506 if test -n "$ac_ct_CC"; then
3507 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3508else
3509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3510for as_dir in $PATH
3511do
3512 IFS=$as_save_IFS
3513 test -z "$as_dir" && as_dir=.
3514 for ac_exec_ext in '' $ac_executable_extensions; do
3515 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3516 ac_cv_prog_ac_ct_CC="gcc"
3517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3518 break 2
3519 fi
00020c16 3520done
5213506e
RW
3521 done
3522IFS=$as_save_IFS
00020c16 3523
bf3b7cd3 3524fi
5213506e
RW
3525fi
3526ac_ct_CC=$ac_cv_prog_ac_ct_CC
3527if test -n "$ac_ct_CC"; then
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3529$as_echo "$ac_ct_CC" >&6; }
3530else
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3532$as_echo "no" >&6; }
3533fi
00020c16 3534
5213506e
RW
3535 if test "x$ac_ct_CC" = x; then
3536 CC=""
3537 else
3538 case $cross_compiling:$ac_tool_warned in
3539yes:)
3540{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3541$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3542ac_tool_warned=yes ;;
3543esac
3544 CC=$ac_ct_CC
3545 fi
3546else
3547 CC="$ac_cv_prog_CC"
3548fi
00020c16 3549
5213506e
RW
3550if test -z "$CC"; then
3551 if test -n "$ac_tool_prefix"; then
3552 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3553set dummy ${ac_tool_prefix}cc; ac_word=$2
3554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3555$as_echo_n "checking for $ac_word... " >&6; }
3556if test "${ac_cv_prog_CC+set}" = set; then :
3557 $as_echo_n "(cached) " >&6
bf3b7cd3 3558else
5213506e
RW
3559 if test -n "$CC"; then
3560 ac_cv_prog_CC="$CC" # Let the user override the test.
00020c16 3561else
5213506e
RW
3562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563for as_dir in $PATH
3564do
3565 IFS=$as_save_IFS
3566 test -z "$as_dir" && as_dir=.
3567 for ac_exec_ext in '' $ac_executable_extensions; do
3568 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3569 ac_cv_prog_CC="${ac_tool_prefix}cc"
3570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3571 break 2
3572 fi
3573done
3574 done
3575IFS=$as_save_IFS
00020c16 3576
00020c16 3577fi
00020c16 3578fi
5213506e
RW
3579CC=$ac_cv_prog_CC
3580if test -n "$CC"; then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3582$as_echo "$CC" >&6; }
00020c16 3583else
5213506e
RW
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
3586fi
bf3b7cd3 3587
bf3b7cd3 3588
5213506e
RW
3589 fi
3590fi
3591if test -z "$CC"; then
3592 # Extract the first word of "cc", so it can be a program name with args.
3593set dummy cc; ac_word=$2
3594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
3596if test "${ac_cv_prog_CC+set}" = set; then :
3597 $as_echo_n "(cached) " >&6
bf3b7cd3 3598else
5213506e
RW
3599 if test -n "$CC"; then
3600 ac_cv_prog_CC="$CC" # Let the user override the test.
3601else
3602 ac_prog_rejected=no
3603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604for as_dir in $PATH
3605do
3606 IFS=$as_save_IFS
3607 test -z "$as_dir" && as_dir=.
3608 for ac_exec_ext in '' $ac_executable_extensions; do
3609 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3610 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3611 ac_prog_rejected=yes
3612 continue
3613 fi
3614 ac_cv_prog_CC="cc"
3615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3616 break 2
3617 fi
3618done
3619 done
3620IFS=$as_save_IFS
bf3b7cd3 3621
5213506e
RW
3622if test $ac_prog_rejected = yes; then
3623 # We found a bogon in the path, so make sure we never use it.
3624 set dummy $ac_cv_prog_CC
3625 shift
3626 if test $# != 0; then
3627 # We chose a different compiler from the bogus one.
3628 # However, it has the same basename, so the bogon will be chosen
3629 # first if we set CC to just the basename; use the full file name.
3630 shift
3631 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3632 fi
bf3b7cd3 3633fi
5213506e
RW
3634fi
3635fi
3636CC=$ac_cv_prog_CC
3637if test -n "$CC"; then
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
bf3b7cd3 3640else
5213506e
RW
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
3643fi
bf3b7cd3 3644
bf3b7cd3 3645
5213506e
RW
3646fi
3647if test -z "$CC"; then
3648 if test -n "$ac_tool_prefix"; then
3649 for ac_prog in cl.exe
3650 do
3651 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3652set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3654$as_echo_n "checking for $ac_word... " >&6; }
3655if test "${ac_cv_prog_CC+set}" = set; then :
3656 $as_echo_n "(cached) " >&6
bf3b7cd3 3657else
5213506e
RW
3658 if test -n "$CC"; then
3659 ac_cv_prog_CC="$CC" # Let the user override the test.
3660else
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
3666 for ac_exec_ext in '' $ac_executable_extensions; do
3667 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3668 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3670 break 2
3671 fi
3672done
3673 done
3674IFS=$as_save_IFS
bf3b7cd3 3675
bf3b7cd3 3676fi
5213506e
RW
3677fi
3678CC=$ac_cv_prog_CC
3679if test -n "$CC"; then
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3681$as_echo "$CC" >&6; }
3682else
3683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3684$as_echo "no" >&6; }
3685fi
3686
3687
3688 test -n "$CC" && break
bf3b7cd3 3689 done
5213506e
RW
3690fi
3691if test -z "$CC"; then
3692 ac_ct_CC=$CC
3693 for ac_prog in cl.exe
3694do
3695 # Extract the first word of "$ac_prog", so it can be a program name with args.
3696set dummy $ac_prog; ac_word=$2
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
3699if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3700 $as_echo_n "(cached) " >&6
bf3b7cd3 3701else
5213506e
RW
3702 if test -n "$ac_ct_CC"; then
3703 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3704else
3705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3706for as_dir in $PATH
3707do
3708 IFS=$as_save_IFS
3709 test -z "$as_dir" && as_dir=.
3710 for ac_exec_ext in '' $ac_executable_extensions; do
3711 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3712 ac_cv_prog_ac_ct_CC="$ac_prog"
3713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3714 break 2
3715 fi
3716done
3717 done
3718IFS=$as_save_IFS
bf3b7cd3 3719
bf3b7cd3 3720fi
bf3b7cd3 3721fi
5213506e
RW
3722ac_ct_CC=$ac_cv_prog_ac_ct_CC
3723if test -n "$ac_ct_CC"; then
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3725$as_echo "$ac_ct_CC" >&6; }
bf3b7cd3 3726else
5213506e
RW
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
3729fi
3730
3731
3732 test -n "$ac_ct_CC" && break
3733done
3734
3735 if test "x$ac_ct_CC" = x; then
3736 CC=""
3737 else
3738 case $cross_compiling:$ac_tool_warned in
3739yes:)
3740{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3741$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3742ac_tool_warned=yes ;;
3743esac
3744 CC=$ac_ct_CC
3745 fi
3746fi
bf3b7cd3 3747
bf3b7cd3 3748fi
5213506e
RW
3749
3750
3751test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3753as_fn_error "no acceptable C compiler found in \$PATH
3754See \`config.log' for more details." "$LINENO" 5; }
3755
3756# Provide some information about the compiler.
3757$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3758set X $ac_compile
3759ac_compiler=$2
3760for ac_option in --version -v -V -qversion; do
3761 { { ac_try="$ac_compiler $ac_option >&5"
3762case "(($ac_try" in
3763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3764 *) ac_try_echo=$ac_try;;
bf3b7cd3 3765esac
5213506e
RW
3766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3767$as_echo "$ac_try_echo"; } >&5
3768 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3769 ac_status=$?
3770 if test -s conftest.err; then
3771 sed '10a\
3772... rest of stderr output deleted ...
3773 10q' conftest.err >conftest.er1
3774 cat conftest.er1 >&5
3775 rm -f conftest.er1 conftest.err
3776 fi
3777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3778 test $ac_status = 0; }
3779done
3780
3781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 3782/* end confdefs.h. */
5213506e 3783
bf3b7cd3
JD
3784int
3785main ()
3786{
3787
bf3b7cd3
JD
3788 ;
3789 return 0;
3790}
3791_ACEOF
5213506e
RW
3792ac_clean_files_save=$ac_clean_files
3793ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3794# Try to create an executable without -o first, disregard a.out.
3795# It will help us diagnose broken compilers, and finding out an intuition
3796# of exeext.
3797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3798$as_echo_n "checking for C compiler default output file name... " >&6; }
3799ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3800
3801# The possible output files:
3802ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3803
3804ac_rmfiles=
3805for ac_file in $ac_files
3806do
3807 case $ac_file in
3808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3809 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3810 esac
3811done
3812rm -f $ac_rmfiles
3813
3814if { { ac_try="$ac_link_default"
3815case "(($ac_try" in
3816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3817 *) ac_try_echo=$ac_try;;
3818esac
3819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3820$as_echo "$ac_try_echo"; } >&5
3821 (eval "$ac_link_default") 2>&5
3822 ac_status=$?
3823 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3824 test $ac_status = 0; }; then :
3825 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3826# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3827# in a Makefile. We should not override ac_cv_exeext if it was cached,
3828# so that the user can short-circuit this test for compilers unknown to
3829# Autoconf.
3830for ac_file in $ac_files ''
3831do
3832 test -f "$ac_file" || continue
3833 case $ac_file in
3834 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3835 ;;
3836 [ab].out )
3837 # We found the default executable, but exeext='' is most
3838 # certainly right.
3839 break;;
3840 *.* )
3841 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3842 then :; else
3843 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3844 fi
3845 # We set ac_cv_exeext here because the later test for it is not
3846 # safe: cross compilers may not add the suffix if given an `-o'
3847 # argument, so we may need to know it at that point already.
3848 # Even if this section looks crufty: it has the advantage of
3849 # actually working.
3850 break;;
3851 * )
3852 break;;
3853 esac
3854done
3855test "$ac_cv_exeext" = no && ac_cv_exeext=
3856
bf3b7cd3 3857else
5213506e
RW
3858 ac_file=''
3859fi
3860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3861$as_echo "$ac_file" >&6; }
3862if test -z "$ac_file"; then :
3863 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
3864sed 's/^/| /' conftest.$ac_ext >&5
3865
5213506e
RW
3866{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3868{ as_fn_set_status 77
3869as_fn_error "C compiler cannot create executables
3870See \`config.log' for more details." "$LINENO" 5; }; }
bf3b7cd3 3871fi
5213506e
RW
3872ac_exeext=$ac_cv_exeext
3873
3874# Check that the compiler produces executables we can run. If not, either
3875# the compiler is broken, or we cross compile.
3876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3877$as_echo_n "checking whether the C compiler works... " >&6; }
3878# If not cross compiling, check that we can run a simple program.
3879if test "$cross_compiling" != yes; then
3880 if { ac_try='./$ac_file'
3881 { { case "(($ac_try" in
3882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883 *) ac_try_echo=$ac_try;;
3884esac
3885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3886$as_echo "$ac_try_echo"; } >&5
3887 (eval "$ac_try") 2>&5
3888 ac_status=$?
3889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3890 test $ac_status = 0; }; }; then
3891 cross_compiling=no
3892 else
3893 if test "$cross_compiling" = maybe; then
3894 cross_compiling=yes
3895 else
3896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3898as_fn_error "cannot run C compiled programs.
3899If you meant to cross compile, use \`--host'.
3900See \`config.log' for more details." "$LINENO" 5; }
3901 fi
3902 fi
bf3b7cd3 3903fi
5213506e
RW
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3905$as_echo "yes" >&6; }
3906
3907rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3908ac_clean_files=$ac_clean_files_save
3909# Check that the compiler produces executables we can run. If not, either
3910# the compiler is broken, or we cross compile.
3911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3912$as_echo_n "checking whether we are cross compiling... " >&6; }
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3914$as_echo "$cross_compiling" >&6; }
3915
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3917$as_echo_n "checking for suffix of executables... " >&6; }
3918if { { ac_try="$ac_link"
3919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
3923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3924$as_echo "$ac_try_echo"; } >&5
3925 (eval "$ac_link") 2>&5
3926 ac_status=$?
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }; then :
3929 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3930# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3931# work properly (i.e., refer to `conftest.exe'), while it won't with
3932# `rm'.
3933for ac_file in conftest.exe conftest conftest.*; do
3934 test -f "$ac_file" || continue
3935 case $ac_file in
3936 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3937 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3938 break;;
3939 * ) break;;
3940 esac
3941done
b61ff9c8 3942else
5213506e
RW
3943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3945as_fn_error "cannot compute suffix of executables: cannot compile and link
3946See \`config.log' for more details." "$LINENO" 5; }
b61ff9c8 3947fi
5213506e
RW
3948rm -f conftest$ac_cv_exeext
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3950$as_echo "$ac_cv_exeext" >&6; }
bf3b7cd3 3951
5213506e
RW
3952rm -f conftest.$ac_ext
3953EXEEXT=$ac_cv_exeext
3954ac_exeext=$EXEEXT
3955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3956$as_echo_n "checking for suffix of object files... " >&6; }
3957if test "${ac_cv_objext+set}" = set; then :
3958 $as_echo_n "(cached) " >&6
bf3b7cd3 3959else
5213506e 3960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 3961/* end confdefs.h. */
5213506e 3962
bf3b7cd3
JD
3963int
3964main ()
3965{
5213506e 3966
bf3b7cd3
JD
3967 ;
3968 return 0;
3969}
3970_ACEOF
5213506e
RW
3971rm -f conftest.o conftest.obj
3972if { { ac_try="$ac_compile"
3973case "(($ac_try" in
3974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3975 *) ac_try_echo=$ac_try;;
3976esac
3977eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3978$as_echo "$ac_try_echo"; } >&5
3979 (eval "$ac_compile") 2>&5
3980 ac_status=$?
3981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3982 test $ac_status = 0; }; then :
3983 for ac_file in conftest.o conftest.obj conftest.*; do
3984 test -f "$ac_file" || continue;
3985 case $ac_file in
3986 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3987 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3988 break;;
3989 esac
3990done
bf3b7cd3 3991else
5213506e 3992 $as_echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
3993sed 's/^/| /' conftest.$ac_ext >&5
3994
5213506e
RW
3995{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3997as_fn_error "cannot compute suffix of object files: cannot compile
3998See \`config.log' for more details." "$LINENO" 5; }
bf3b7cd3 3999fi
5213506e 4000rm -f conftest.$ac_cv_objext conftest.$ac_ext
bf3b7cd3 4001fi
5213506e
RW
4002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4003$as_echo "$ac_cv_objext" >&6; }
4004OBJEXT=$ac_cv_objext
4005ac_objext=$OBJEXT
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4007$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4008if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4009 $as_echo_n "(cached) " >&6
bf3b7cd3 4010else
5213506e 4011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4012/* end confdefs.h. */
5213506e 4013
bf3b7cd3
JD
4014int
4015main ()
4016{
5213506e
RW
4017#ifndef __GNUC__
4018 choke me
4019#endif
bf3b7cd3
JD
4020
4021 ;
4022 return 0;
4023}
4024_ACEOF
5213506e
RW
4025if ac_fn_c_try_compile "$LINENO"; then :
4026 ac_compiler_gnu=yes
4027else
4028 ac_compiler_gnu=no
4029fi
4030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4031ac_cv_c_compiler_gnu=$ac_compiler_gnu
4032
4033fi
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4035$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4036if test $ac_compiler_gnu = yes; then
4037 GCC=yes
4038else
4039 GCC=
4040fi
4041ac_test_CFLAGS=${CFLAGS+set}
4042ac_save_CFLAGS=$CFLAGS
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4044$as_echo_n "checking whether $CC accepts -g... " >&6; }
4045if test "${ac_cv_prog_cc_g+set}" = set; then :
4046 $as_echo_n "(cached) " >&6
4047else
4048 ac_save_c_werror_flag=$ac_c_werror_flag
4049 ac_c_werror_flag=yes
4050 ac_cv_prog_cc_g=no
4051 CFLAGS="-g"
4052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4053/* end confdefs.h. */
5213506e 4054
bf3b7cd3
JD
4055int
4056main ()
4057{
bf3b7cd3
JD
4058
4059 ;
4060 return 0;
4061}
4062_ACEOF
5213506e
RW
4063if ac_fn_c_try_compile "$LINENO"; then :
4064 ac_cv_prog_cc_g=yes
bf3b7cd3 4065else
5213506e
RW
4066 CFLAGS=""
4067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4068/* end confdefs.h. */
5213506e 4069
bf3b7cd3
JD
4070int
4071main ()
4072{
bf3b7cd3
JD
4073
4074 ;
4075 return 0;
4076}
4077_ACEOF
5213506e
RW
4078if ac_fn_c_try_compile "$LINENO"; then :
4079
4080else
4081 ac_c_werror_flag=$ac_save_c_werror_flag
4082 CFLAGS="-g"
4083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4084/* end confdefs.h. */
5213506e 4085
bf3b7cd3
JD
4086int
4087main ()
4088{
bf3b7cd3
JD
4089
4090 ;
4091 return 0;
4092}
4093_ACEOF
5213506e
RW
4094if ac_fn_c_try_compile "$LINENO"; then :
4095 ac_cv_prog_cc_g=yes
bf3b7cd3 4096fi
5213506e 4097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4098fi
5213506e 4099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4100fi
5213506e
RW
4101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4102 ac_c_werror_flag=$ac_save_c_werror_flag
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4105$as_echo "$ac_cv_prog_cc_g" >&6; }
4106if test "$ac_test_CFLAGS" = set; then
4107 CFLAGS=$ac_save_CFLAGS
4108elif test $ac_cv_prog_cc_g = yes; then
4109 if test "$GCC" = yes; then
4110 CFLAGS="-g -O2"
4111 else
4112 CFLAGS="-g"
4113 fi
4114else
4115 if test "$GCC" = yes; then
4116 CFLAGS="-O2"
4117 else
4118 CFLAGS=
4119 fi
4120fi
4121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4122$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4123if test "${ac_cv_prog_cc_c89+set}" = set; then :
4124 $as_echo_n "(cached) " >&6
4125else
4126 ac_cv_prog_cc_c89=no
4127ac_save_CC=$CC
4128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4129/* end confdefs.h. */
5213506e
RW
4130#include <stdarg.h>
4131#include <stdio.h>
4132#include <sys/types.h>
4133#include <sys/stat.h>
4134/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4135struct buf { int x; };
4136FILE * (*rcsopen) (struct buf *, struct stat *, int);
4137static char *e (p, i)
4138 char **p;
4139 int i;
4140{
4141 return p[i];
4142}
4143static char *f (char * (*g) (char **, int), char **p, ...)
4144{
4145 char *s;
4146 va_list v;
4147 va_start (v,p);
4148 s = g (p, va_arg (v,int));
4149 va_end (v);
4150 return s;
4151}
4152
4153/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4154 function prototypes and stuff, but not '\xHH' hex character constants.
4155 These don't provoke an error unfortunately, instead are silently treated
4156 as 'x'. The following induces an error, until -std is added to get
4157 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4158 array size at least. It's necessary to write '\x00'==0 to get something
4159 that's true only with -std. */
4160int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4161
4162/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4163 inside strings and character constants. */
4164#define FOO(x) 'x'
4165int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4166
4167int test (int i, double x);
4168struct s1 {int (*f) (int a);};
4169struct s2 {int (*f) (double a);};
4170int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4171int argc;
4172char **argv;
bf3b7cd3
JD
4173int
4174main ()
4175{
5213506e 4176return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bf3b7cd3
JD
4177 ;
4178 return 0;
4179}
4180_ACEOF
5213506e
RW
4181for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4182 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4183do
4184 CC="$ac_save_CC $ac_arg"
4185 if ac_fn_c_try_compile "$LINENO"; then :
4186 ac_cv_prog_cc_c89=$ac_arg
bf3b7cd3 4187fi
5213506e
RW
4188rm -f core conftest.err conftest.$ac_objext
4189 test "x$ac_cv_prog_cc_c89" != "xno" && break
bf3b7cd3 4190done
5213506e
RW
4191rm -f conftest.$ac_ext
4192CC=$ac_save_CC
4193
4194fi
4195# AC_CACHE_VAL
4196case "x$ac_cv_prog_cc_c89" in
4197 x)
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4199$as_echo "none needed" >&6; } ;;
4200 xno)
4201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4202$as_echo "unsupported" >&6; } ;;
4203 *)
4204 CC="$CC $ac_cv_prog_cc_c89"
4205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4206$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bf3b7cd3 4207esac
5213506e
RW
4208if test "x$ac_cv_prog_cc_c89" != xno; then :
4209
4210fi
4211
4212ac_ext=c
4213ac_cpp='$CPP $CPPFLAGS'
4214ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4215ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4216ac_compiler_gnu=$ac_cv_c_compiler_gnu
4217
4218if test "x$CC" != xcc; then
4219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4220$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
b61ff9c8 4221else
5213506e
RW
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4223$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4224fi
4225set dummy $CC; ac_cc=`$as_echo "$2" |
4226 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4227if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
4228 $as_echo_n "(cached) " >&6
4229else
4230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4231/* end confdefs.h. */
5213506e 4232
bf3b7cd3
JD
4233int
4234main ()
4235{
4236
bf3b7cd3
JD
4237 ;
4238 return 0;
4239}
4240_ACEOF
5213506e
RW
4241# Make sure it works both with $CC and with simple cc.
4242# We do the test twice because some compilers refuse to overwrite an
4243# existing .o file with -o, though they will create one.
4244ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4245rm -f conftest2.*
4246if { { case "(($ac_try" in
4247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4248 *) ac_try_echo=$ac_try;;
4249esac
4250eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4251$as_echo "$ac_try_echo"; } >&5
4252 (eval "$ac_try") 2>&5
4253 ac_status=$?
4254 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4255 test $ac_status = 0; } &&
4256 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4258 *) ac_try_echo=$ac_try;;
4259esac
4260eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4261$as_echo "$ac_try_echo"; } >&5
4262 (eval "$ac_try") 2>&5
bf3b7cd3 4263 ac_status=$?
5213506e
RW
4264 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4265 test $ac_status = 0; };
4266then
4267 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4268 if test "x$CC" != xcc; then
4269 # Test first that cc exists at all.
4270 if { ac_try='cc -c conftest.$ac_ext >&5'
4271 { { case "(($ac_try" in
4272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4273 *) ac_try_echo=$ac_try;;
4274esac
4275eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4276$as_echo "$ac_try_echo"; } >&5
4277 (eval "$ac_try") 2>&5
4278 ac_status=$?
4279 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4280 test $ac_status = 0; }; }; then
4281 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4282 rm -f conftest2.*
4283 if { { case "(($ac_try" in
4284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4285 *) ac_try_echo=$ac_try;;
4286esac
4287eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4288$as_echo "$ac_try_echo"; } >&5
4289 (eval "$ac_try") 2>&5
4290 ac_status=$?
4291 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4292 test $ac_status = 0; } &&
4293 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4295 *) ac_try_echo=$ac_try;;
4296esac
4297eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4298$as_echo "$ac_try_echo"; } >&5
4299 (eval "$ac_try") 2>&5
bf3b7cd3 4300 ac_status=$?
5213506e
RW
4301 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4302 test $ac_status = 0; };
4303 then
4304 # cc works too.
4305 :
4306 else
4307 # cc exists but doesn't like -o.
4308 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4309 fi
4310 fi
4311 fi
bf3b7cd3 4312else
5213506e
RW
4313 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4314fi
4315rm -f core conftest*
bf3b7cd3 4316
b61ff9c8 4317fi
5213506e
RW
4318if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4320$as_echo "yes" >&6; }
4321else
4322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4323$as_echo "no" >&6; }
4324
4325$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
4326
bf3b7cd3 4327fi
5213506e
RW
4328
4329# expand $ac_aux_dir to an absolute path
4330am_aux_dir=`cd $ac_aux_dir && pwd`
4331
4332# FIXME: we rely on the cache variable name because
4333# there is no other way.
4334set dummy $CC
4335am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4336eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
4337if test "$am_t" != yes; then
4338 # Losing compiler, so override with the script.
4339 # FIXME: It is wrong to rewrite CC.
4340 # But if we don't then we get into trouble of one sort or another.
4341 # A longer-term fix would be to have automake use am__CC in this case,
4342 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4343 CC="$am_aux_dir/compile $CC"
bf3b7cd3 4344fi
5213506e
RW
4345
4346
4347ac_ext=cpp
4348ac_cpp='$CXXCPP $CPPFLAGS'
4349ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4350ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4351ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4352if test -z "$CXX"; then
4353 if test -n "$CCC"; then
4354 CXX=$CCC
4355 else
4356 if test -n "$ac_tool_prefix"; then
4357 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4358 do
4359 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4360set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4362$as_echo_n "checking for $ac_word... " >&6; }
4363if test "${ac_cv_prog_CXX+set}" = set; then :
4364 $as_echo_n "(cached) " >&6
b61ff9c8 4365else
5213506e
RW
4366 if test -n "$CXX"; then
4367 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4368else
4369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4370for as_dir in $PATH
4371do
4372 IFS=$as_save_IFS
4373 test -z "$as_dir" && as_dir=.
4374 for ac_exec_ext in '' $ac_executable_extensions; do
4375 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4376 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4378 break 2
4379 fi
4380done
4381 done
4382IFS=$as_save_IFS
4383
bf3b7cd3 4384fi
b61ff9c8 4385fi
5213506e
RW
4386CXX=$ac_cv_prog_CXX
4387if test -n "$CXX"; then
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4389$as_echo "$CXX" >&6; }
4390else
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392$as_echo "no" >&6; }
4393fi
bf3b7cd3
JD
4394
4395
5213506e
RW
4396 test -n "$CXX" && break
4397 done
4398fi
4399if test -z "$CXX"; then
4400 ac_ct_CXX=$CXX
4401 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4402do
4403 # Extract the first word of "$ac_prog", so it can be a program name with args.
4404set dummy $ac_prog; ac_word=$2
4405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4406$as_echo_n "checking for $ac_word... " >&6; }
4407if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
4408 $as_echo_n "(cached) " >&6
bf3b7cd3 4409else
5213506e
RW
4410 if test -n "$ac_ct_CXX"; then
4411 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
bf3b7cd3 4412else
5213506e
RW
4413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414for as_dir in $PATH
4415do
4416 IFS=$as_save_IFS
4417 test -z "$as_dir" && as_dir=.
4418 for ac_exec_ext in '' $ac_executable_extensions; do
4419 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4420 ac_cv_prog_ac_ct_CXX="$ac_prog"
4421 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4422 break 2
4423 fi
4424done
4425 done
4426IFS=$as_save_IFS
bf3b7cd3 4427
bf3b7cd3 4428fi
bf3b7cd3 4429fi
5213506e
RW
4430ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4431if test -n "$ac_ct_CXX"; then
4432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4433$as_echo "$ac_ct_CXX" >&6; }
bf3b7cd3 4434else
5213506e
RW
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4436$as_echo "no" >&6; }
4437fi
bf3b7cd3 4438
5213506e
RW
4439
4440 test -n "$ac_ct_CXX" && break
4441done
4442
4443 if test "x$ac_ct_CXX" = x; then
4444 CXX="g++"
4445 else
4446 case $cross_compiling:$ac_tool_warned in
4447yes:)
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4449$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4450ac_tool_warned=yes ;;
4451esac
4452 CXX=$ac_ct_CXX
4453 fi
4454fi
4455
4456 fi
4457fi
4458# Provide some information about the compiler.
4459$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4460set X $ac_compile
4461ac_compiler=$2
4462for ac_option in --version -v -V -qversion; do
4463 { { ac_try="$ac_compiler $ac_option >&5"
4464case "(($ac_try" in
4465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4466 *) ac_try_echo=$ac_try;;
4467esac
4468eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4469$as_echo "$ac_try_echo"; } >&5
4470 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
b61ff9c8 4471 ac_status=$?
5213506e
RW
4472 if test -s conftest.err; then
4473 sed '10a\
4474... rest of stderr output deleted ...
4475 10q' conftest.err >conftest.er1
4476 cat conftest.er1 >&5
4477 rm -f conftest.er1 conftest.err
4478 fi
4479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4480 test $ac_status = 0; }
4481done
4482
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4484$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4485if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
4486 $as_echo_n "(cached) " >&6
4487else
4488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4489/* end confdefs.h. */
5213506e 4490
bf3b7cd3
JD
4491int
4492main ()
4493{
5213506e
RW
4494#ifndef __GNUC__
4495 choke me
4496#endif
bf3b7cd3
JD
4497
4498 ;
4499 return 0;
4500}
4501_ACEOF
5213506e
RW
4502if ac_fn_cxx_try_compile "$LINENO"; then :
4503 ac_compiler_gnu=yes
bf3b7cd3 4504else
5213506e
RW
4505 ac_compiler_gnu=no
4506fi
4507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4508ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
bf3b7cd3 4509
bf3b7cd3 4510fi
5213506e
RW
4511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4512$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4513if test $ac_compiler_gnu = yes; then
4514 GXX=yes
bf3b7cd3 4515else
5213506e
RW
4516 GXX=
4517fi
4518ac_test_CXXFLAGS=${CXXFLAGS+set}
4519ac_save_CXXFLAGS=$CXXFLAGS
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4521$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4522if test "${ac_cv_prog_cxx_g+set}" = set; then :
4523 $as_echo_n "(cached) " >&6
4524else
4525 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4526 ac_cxx_werror_flag=yes
4527 ac_cv_prog_cxx_g=no
4528 CXXFLAGS="-g"
4529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4530/* end confdefs.h. */
5213506e 4531
bf3b7cd3
JD
4532int
4533main ()
4534{
bf3b7cd3
JD
4535
4536 ;
4537 return 0;
4538}
4539_ACEOF
5213506e
RW
4540if ac_fn_cxx_try_compile "$LINENO"; then :
4541 ac_cv_prog_cxx_g=yes
4542else
4543 CXXFLAGS=""
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4545/* end confdefs.h. */
5213506e 4546
bf3b7cd3
JD
4547int
4548main ()
4549{
bf3b7cd3
JD
4550
4551 ;
4552 return 0;
4553}
4554_ACEOF
5213506e 4555if ac_fn_cxx_try_compile "$LINENO"; then :
bf3b7cd3 4556
bf3b7cd3 4557else
5213506e
RW
4558 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4559 CXXFLAGS="-g"
4560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4561/* end confdefs.h. */
5213506e 4562
bf3b7cd3
JD
4563int
4564main ()
4565{
bf3b7cd3
JD
4566
4567 ;
4568 return 0;
4569}
4570_ACEOF
5213506e
RW
4571if ac_fn_cxx_try_compile "$LINENO"; then :
4572 ac_cv_prog_cxx_g=yes
4573fi
4574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4575fi
4576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4577fi
4578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4579 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4580fi
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4582$as_echo "$ac_cv_prog_cxx_g" >&6; }
4583if test "$ac_test_CXXFLAGS" = set; then
4584 CXXFLAGS=$ac_save_CXXFLAGS
4585elif test $ac_cv_prog_cxx_g = yes; then
4586 if test "$GXX" = yes; then
4587 CXXFLAGS="-g -O2"
4588 else
4589 CXXFLAGS="-g"
4590 fi
bf3b7cd3 4591else
5213506e
RW
4592 if test "$GXX" = yes; then
4593 CXXFLAGS="-O2"
4594 else
4595 CXXFLAGS=
4596 fi
4597fi
4598ac_ext=c
4599ac_cpp='$CPP $CPPFLAGS'
4600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4602ac_compiler_gnu=$ac_cv_c_compiler_gnu
4603
4604
4605
4606
4607if test -n "$ac_tool_prefix"; then
4608 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
4609set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611$as_echo_n "checking for $ac_word... " >&6; }
4612if test "${ac_cv_prog_GNATBIND+set}" = set; then :
4613 $as_echo_n "(cached) " >&6
4614else
4615 if test -n "$GNATBIND"; then
4616 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
4617else
4618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619for as_dir in $PATH
4620do
4621 IFS=$as_save_IFS
4622 test -z "$as_dir" && as_dir=.
4623 for ac_exec_ext in '' $ac_executable_extensions; do
4624 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4625 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
4626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4627 break 2
4628 fi
4629done
4630 done
4631IFS=$as_save_IFS
4632
4633fi
4634fi
4635GNATBIND=$ac_cv_prog_GNATBIND
4636if test -n "$GNATBIND"; then
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATBIND" >&5
4638$as_echo "$GNATBIND" >&6; }
4639else
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641$as_echo "no" >&6; }
4642fi
4643
bf3b7cd3 4644
bf3b7cd3 4645fi
5213506e
RW
4646if test -z "$ac_cv_prog_GNATBIND"; then
4647 ac_ct_GNATBIND=$GNATBIND
4648 # Extract the first word of "gnatbind", so it can be a program name with args.
4649set dummy gnatbind; ac_word=$2
4650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4651$as_echo_n "checking for $ac_word... " >&6; }
4652if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then :
4653 $as_echo_n "(cached) " >&6
4654else
4655 if test -n "$ac_ct_GNATBIND"; then
4656 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
4657else
4658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661 IFS=$as_save_IFS
4662 test -z "$as_dir" && as_dir=.
4663 for ac_exec_ext in '' $ac_executable_extensions; do
4664 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4665 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
4666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667 break 2
4668 fi
bf3b7cd3 4669done
5213506e
RW
4670 done
4671IFS=$as_save_IFS
4672
4673fi
4674fi
4675ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
4676if test -n "$ac_ct_GNATBIND"; then
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATBIND" >&5
4678$as_echo "$ac_ct_GNATBIND" >&6; }
4679else
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684 if test "x$ac_ct_GNATBIND" = x; then
4685 GNATBIND="no"
4686 else
4687 case $cross_compiling:$ac_tool_warned in
4688yes:)
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4691ac_tool_warned=yes ;;
bf3b7cd3 4692esac
5213506e
RW
4693 GNATBIND=$ac_ct_GNATBIND
4694 fi
b61ff9c8 4695else
5213506e
RW
4696 GNATBIND="$ac_cv_prog_GNATBIND"
4697fi
bf3b7cd3 4698
5213506e
RW
4699if test -n "$ac_tool_prefix"; then
4700 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
4701set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
4702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4703$as_echo_n "checking for $ac_word... " >&6; }
4704if test "${ac_cv_prog_GNATMAKE+set}" = set; then :
4705 $as_echo_n "(cached) " >&6
4706else
4707 if test -n "$GNATMAKE"; then
4708 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
4709else
4710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in $PATH
4712do
4713 IFS=$as_save_IFS
4714 test -z "$as_dir" && as_dir=.
4715 for ac_exec_ext in '' $ac_executable_extensions; do
4716 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4717 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
4718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4719 break 2
4720 fi
4721done
4722 done
4723IFS=$as_save_IFS
4724
4725fi
4726fi
4727GNATMAKE=$ac_cv_prog_GNATMAKE
4728if test -n "$GNATMAKE"; then
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNATMAKE" >&5
4730$as_echo "$GNATMAKE" >&6; }
4731else
4732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4733$as_echo "no" >&6; }
4734fi
4735
4736
4737fi
4738if test -z "$ac_cv_prog_GNATMAKE"; then
4739 ac_ct_GNATMAKE=$GNATMAKE
4740 # Extract the first word of "gnatmake", so it can be a program name with args.
4741set dummy gnatmake; ac_word=$2
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
4744if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then :
4745 $as_echo_n "(cached) " >&6
4746else
4747 if test -n "$ac_ct_GNATMAKE"; then
4748 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
4749else
4750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH
4752do
4753 IFS=$as_save_IFS
4754 test -z "$as_dir" && as_dir=.
4755 for ac_exec_ext in '' $ac_executable_extensions; do
4756 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4757 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765fi
4766fi
4767ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
4768if test -n "$ac_ct_GNATMAKE"; then
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GNATMAKE" >&5
4770$as_echo "$ac_ct_GNATMAKE" >&6; }
4771else
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776 if test "x$ac_ct_GNATMAKE" = x; then
4777 GNATMAKE="no"
bf3b7cd3 4778 else
5213506e
RW
4779 case $cross_compiling:$ac_tool_warned in
4780yes:)
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4783ac_tool_warned=yes ;;
4784esac
4785 GNATMAKE=$ac_ct_GNATMAKE
4786 fi
4787else
4788 GNATMAKE="$ac_cv_prog_GNATMAKE"
4789fi
bf3b7cd3 4790
5213506e
RW
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5
4792$as_echo_n "checking whether compiler driver understands Ada... " >&6; }
4793if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then :
4794 $as_echo_n "(cached) " >&6
bf3b7cd3 4795else
5213506e
RW
4796 cat >conftest.adb <<EOF
4797procedure conftest is begin null; end conftest;
4798EOF
4799acx_cv_cc_gcc_supports_ada=no
4800# There is a bug in old released versions of GCC which causes the
4801# driver to exit successfully when the appropriate language module
4802# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
4803# Therefore we must check for the error message as well as an
4804# unsuccessful exit.
4805# Other compilers, like HP Tru64 UNIX cc, exit successfully when
4806# given a .adb file, but produce no object file. So we must check
4807# if an object file was really produced to guard against this.
4808errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
4809if test x"$errors" = x && test -f conftest.$ac_objext; then
4810 acx_cv_cc_gcc_supports_ada=yes
4811fi
4812rm -f conftest.*
4813fi
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
4815$as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
bf3b7cd3 4816
5213506e
RW
4817if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
4818 have_gnat=yes
4819else
4820 have_gnat=no
b61ff9c8 4821fi
5213506e
RW
4822
4823
4824# autoconf is lame and doesn't give us any substitution variable for this.
4825if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
4826 NO_MINUS_C_MINUS_O=yes
4827else
4828 OUTPUT_OPTION='-o $@'
bf3b7cd3 4829fi
5213506e
RW
4830
4831
4832
4833# Remove the -O2: for historical reasons, unless bootstrapping we prefer
4834# optimizations to be activated explicitly by the toplevel.
4835case "$CC" in
4836 */prev-gcc/xgcc*) ;;
4837 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
4838esac
4839
4840
4841# -------------------------
4842# Check C compiler features
4843# -------------------------
4844
4845
4846ac_ext=c
4847ac_cpp='$CPP $CPPFLAGS'
4848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4850ac_compiler_gnu=$ac_cv_c_compiler_gnu
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4852$as_echo_n "checking how to run the C preprocessor... " >&6; }
4853# On Suns, sometimes $CPP names a directory.
4854if test -n "$CPP" && test -d "$CPP"; then
4855 CPP=
bf3b7cd3 4856fi
5213506e
RW
4857if test -z "$CPP"; then
4858 if test "${ac_cv_prog_CPP+set}" = set; then :
4859 $as_echo_n "(cached) " >&6
b61ff9c8 4860else
5213506e
RW
4861 # Double quotes because CPP needs to be expanded
4862 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4863 do
4864 ac_preproc_ok=false
4865for ac_c_preproc_warn_flag in '' yes
4866do
4867 # Use a header file that comes with gcc, so configuring glibc
4868 # with a fresh cross-compiler works.
4869 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4870 # <limits.h> exists even on freestanding compilers.
4871 # On the NeXT, cc -E runs the code through the compiler's parser,
4872 # not just through cpp. "Syntax error" is here to catch this case.
4873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4874/* end confdefs.h. */
4875#ifdef __STDC__
4876# include <limits.h>
4877#else
4878# include <assert.h>
4879#endif
4880 Syntax error
bf3b7cd3 4881_ACEOF
5213506e 4882if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 4883
bf3b7cd3 4884else
5213506e
RW
4885 # Broken: fails on valid input.
4886continue
4887fi
4888rm -f conftest.err conftest.$ac_ext
4889
4890 # OK, works on sane cases. Now check whether nonexistent headers
4891 # can be detected and how.
4892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4893/* end confdefs.h. */
5213506e 4894#include <ac_nonexistent.h>
bf3b7cd3 4895_ACEOF
5213506e
RW
4896if ac_fn_c_try_cpp "$LINENO"; then :
4897 # Broken: success on invalid input.
4898continue
b61ff9c8 4899else
5213506e
RW
4900 # Passes both tests.
4901ac_preproc_ok=:
4902break
bf3b7cd3 4903fi
5213506e 4904rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4905
5213506e
RW
4906done
4907# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4908rm -f conftest.err conftest.$ac_ext
4909if $ac_preproc_ok; then :
4910 break
4911fi
bf3b7cd3 4912
5213506e
RW
4913 done
4914 ac_cv_prog_CPP=$CPP
bf3b7cd3 4915
8b1f719a 4916fi
5213506e 4917 CPP=$ac_cv_prog_CPP
8b1f719a 4918else
5213506e
RW
4919 ac_cv_prog_CPP=$CPP
4920fi
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4922$as_echo "$CPP" >&6; }
4923ac_preproc_ok=false
4924for ac_c_preproc_warn_flag in '' yes
4925do
4926 # Use a header file that comes with gcc, so configuring glibc
4927 # with a fresh cross-compiler works.
4928 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4929 # <limits.h> exists even on freestanding compilers.
4930 # On the NeXT, cc -E runs the code through the compiler's parser,
4931 # not just through cpp. "Syntax error" is here to catch this case.
4932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4933/* end confdefs.h. */
5213506e
RW
4934#ifdef __STDC__
4935# include <limits.h>
4936#else
4937# include <assert.h>
4938#endif
4939 Syntax error
bf3b7cd3 4940_ACEOF
5213506e 4941if ac_fn_c_try_cpp "$LINENO"; then :
bf3b7cd3 4942
bf3b7cd3 4943else
5213506e
RW
4944 # Broken: fails on valid input.
4945continue
bf3b7cd3 4946fi
5213506e 4947rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4948
5213506e
RW
4949 # OK, works on sane cases. Now check whether nonexistent headers
4950 # can be detected and how.
4951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 4952/* end confdefs.h. */
5213506e 4953#include <ac_nonexistent.h>
bf3b7cd3 4954_ACEOF
5213506e
RW
4955if ac_fn_c_try_cpp "$LINENO"; then :
4956 # Broken: success on invalid input.
4957continue
bf3b7cd3 4958else
5213506e
RW
4959 # Passes both tests.
4960ac_preproc_ok=:
4961break
bf3b7cd3 4962fi
5213506e
RW
4963rm -f conftest.err conftest.$ac_ext
4964
bf3b7cd3 4965done
5213506e
RW
4966# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4967rm -f conftest.err conftest.$ac_ext
4968if $ac_preproc_ok; then :
4969
b61ff9c8 4970else
5213506e
RW
4971 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4973as_fn_error "C preprocessor \"$CPP\" fails sanity check
4974See \`config.log' for more details." "$LINENO" 5; }
4975fi
bf3b7cd3 4976
5213506e
RW
4977ac_ext=c
4978ac_cpp='$CPP $CPPFLAGS'
4979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4981ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4982
bf3b7cd3 4983
5213506e
RW
4984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4985$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4986if test "${ac_cv_path_GREP+set}" = set; then :
4987 $as_echo_n "(cached) " >&6
4988else
4989 if test -z "$GREP"; then
4990 ac_path_GREP_found=false
4991 # Loop through the user's path and test for each of PROGNAME-LIST
4992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4993for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4994do
4995 IFS=$as_save_IFS
4996 test -z "$as_dir" && as_dir=.
4997 for ac_prog in grep ggrep; do
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5000 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5001# Check for GNU ac_path_GREP and select it if it is found.
5002 # Check for GNU $ac_path_GREP
5003case `"$ac_path_GREP" --version 2>&1` in
5004*GNU*)
5005 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5006*)
5007 ac_count=0
5008 $as_echo_n 0123456789 >"conftest.in"
5009 while :
5010 do
5011 cat "conftest.in" "conftest.in" >"conftest.tmp"
5012 mv "conftest.tmp" "conftest.in"
5013 cp "conftest.in" "conftest.nl"
5014 $as_echo 'GREP' >> "conftest.nl"
5015 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5016 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5017 as_fn_arith $ac_count + 1 && ac_count=$as_val
5018 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5019 # Best one so far, save it but keep looking for a better one
5020 ac_cv_path_GREP="$ac_path_GREP"
5021 ac_path_GREP_max=$ac_count
5022 fi
5023 # 10*(2^10) chars as input seems more than enough
5024 test $ac_count -gt 10 && break
5025 done
5026 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5027esac
5028
5029 $ac_path_GREP_found && break 3
5030 done
5031 done
5032 done
5033IFS=$as_save_IFS
5034 if test -z "$ac_cv_path_GREP"; then
5035 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5036 fi
b61ff9c8 5037else
5213506e 5038 ac_cv_path_GREP=$GREP
2f41c1d6 5039fi
5213506e 5040
b61ff9c8 5041fi
5213506e
RW
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5043$as_echo "$ac_cv_path_GREP" >&6; }
5044 GREP="$ac_cv_path_GREP"
bf3b7cd3
JD
5045
5046
5213506e
RW
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5048$as_echo_n "checking for egrep... " >&6; }
5049if test "${ac_cv_path_EGREP+set}" = set; then :
5050 $as_echo_n "(cached) " >&6
5ec1c5e6 5051else
5213506e
RW
5052 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5053 then ac_cv_path_EGREP="$GREP -E"
5054 else
5055 if test -z "$EGREP"; then
5056 ac_path_EGREP_found=false
5057 # Loop through the user's path and test for each of PROGNAME-LIST
5058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5060do
5061 IFS=$as_save_IFS
5062 test -z "$as_dir" && as_dir=.
5063 for ac_prog in egrep; do
5064 for ac_exec_ext in '' $ac_executable_extensions; do
5065 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5066 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5067# Check for GNU ac_path_EGREP and select it if it is found.
5068 # Check for GNU $ac_path_EGREP
5069case `"$ac_path_EGREP" --version 2>&1` in
5070*GNU*)
5071 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5072*)
5073 ac_count=0
5074 $as_echo_n 0123456789 >"conftest.in"
5075 while :
5076 do
5077 cat "conftest.in" "conftest.in" >"conftest.tmp"
5078 mv "conftest.tmp" "conftest.in"
5079 cp "conftest.in" "conftest.nl"
5080 $as_echo 'EGREP' >> "conftest.nl"
5081 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5082 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5083 as_fn_arith $ac_count + 1 && ac_count=$as_val
5084 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5085 # Best one so far, save it but keep looking for a better one
5086 ac_cv_path_EGREP="$ac_path_EGREP"
5087 ac_path_EGREP_max=$ac_count
5088 fi
5089 # 10*(2^10) chars as input seems more than enough
5090 test $ac_count -gt 10 && break
5091 done
5092 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5093esac
5ec1c5e6 5094
5213506e
RW
5095 $ac_path_EGREP_found && break 3
5096 done
5097 done
5098 done
5099IFS=$as_save_IFS
5100 if test -z "$ac_cv_path_EGREP"; then
5101 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5102 fi
5103else
5104 ac_cv_path_EGREP=$EGREP
5ec1c5e6 5105fi
5213506e
RW
5106
5107 fi
5ec1c5e6 5108fi
5213506e
RW
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5110$as_echo "$ac_cv_path_EGREP" >&6; }
5111 EGREP="$ac_cv_path_EGREP"
5ec1c5e6 5112
5ec1c5e6 5113
5213506e
RW
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5115$as_echo_n "checking for ANSI C header files... " >&6; }
5116if test "${ac_cv_header_stdc+set}" = set; then :
5117 $as_echo_n "(cached) " >&6
bf3b7cd3 5118else
5213506e 5119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5120/* end confdefs.h. */
5213506e
RW
5121#include <stdlib.h>
5122#include <stdarg.h>
5123#include <string.h>
5124#include <float.h>
5125
ba479fd2
NN
5126int
5127main ()
5128{
5213506e 5129
ba479fd2
NN
5130 ;
5131 return 0;
5132}
5133_ACEOF
5213506e
RW
5134if ac_fn_c_try_compile "$LINENO"; then :
5135 ac_cv_header_stdc=yes
75b6f3fd 5136else
5213506e 5137 ac_cv_header_stdc=no
75b6f3fd 5138fi
5213506e 5139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5140
5213506e
RW
5141if test $ac_cv_header_stdc = yes; then
5142 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5144/* end confdefs.h. */
5213506e 5145#include <string.h>
bf3b7cd3 5146
ba479fd2 5147_ACEOF
5213506e
RW
5148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5149 $EGREP "memchr" >/dev/null 2>&1; then :
bf3b7cd3 5150
75e93faa 5151else
5213506e
RW
5152 ac_cv_header_stdc=no
5153fi
5154rm -f conftest*
ba479fd2 5155
75e93faa 5156fi
bf3b7cd3 5157
5213506e
RW
5158if test $ac_cv_header_stdc = yes; then
5159 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 5161/* end confdefs.h. */
5213506e 5162#include <stdlib.h>
bf3b7cd3 5163
ba479fd2 5164_ACEOF
5213506e
RW
5165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5166 $EGREP "free" >/dev/null 2>&1; then :
bf3b7cd3 5167
04cabffc 5168else
5213506e 5169 ac_cv_header_stdc=no
04cabffc 5170fi
5213506e 5171rm -f conftest*
04cabffc 5172
414d23ae 5173fi
ba479fd2 5174
5213506e
RW
5175if test $ac_cv_header_stdc = yes; then
5176 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5177 if test "$cross_compiling" = yes; then :
5178 :
b61ff9c8 5179else
5213506e 5180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf3b7cd3 5181/* end confdefs.h. */
5213506e 5182#include <ctype.h>
bf3b7cd3 5183#include <stdlib.h>
5213506e
RW
5184#if ((' ' & 0x0FF) == 0x020)
5185# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5186# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5187#else
5188# define ISLOWER(c) \
5189 (('a' <= (c) && (c) <= 'i') \
5190 || ('j' <= (c) && (c) <= 'r') \
5191 || ('s' <= (c) && (c) <= 'z'))
5192# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5193#endif
5194
5195#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bf3b7cd3
JD
5196int
5197main ()
5198{
5213506e
RW
5199 int i;
5200 for (i = 0; i < 256; i++)
5201 if (XOR (islower (i), ISLOWER (i))
5202 || toupper (i) != TOUPPER (i))
5203 return 2;
bf3b7cd3
JD
5204 return 0;
5205}
5206_ACEOF
5213506e 5207if ac_fn_c_try_run "$LINENO"; then :
75e93faa 5208
5213506e
RW
5209else
5210 ac_cv_header_stdc=no
b61ff9c8 5211fi
5213506e
RW
5212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5213 conftest.$ac_objext conftest.beam conftest.$ac_ext
bf3b7cd3 5214fi
5213506e 5215
bf3b7cd3 5216fi
bf3b7cd3 5217fi
5213506e
RW
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5219$as_echo "$ac_cv_header_stdc" >&6; }
5220if test $ac_cv_header_stdc = yes; then
5221
5222$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5223
b61ff9c8 5224fi
5213506e
RW
5225
5226# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5227for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5228 inttypes.h stdint.h unistd.h
5229do :
5230 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5231ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5232"
5233eval as_val=\$$as_ac_Header
5234 if test "x$as_val" = x""yes; then :
5235 cat >>confdefs.h <<_ACEOF
5236#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2 5237_ACEOF
414d23ae 5238
5213506e
RW
5239fi
5240
5241done
5242
5243
cafe096b 5244
5213506e
RW
5245 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5246if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5247 MINIX=yes
5248else
5249 MINIX=
414d23ae
HPN
5250fi
5251
5213506e
RW
5252
5253 if test "$MINIX" = yes; then
5254
5255$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5256
5257
5258$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5259
5260
5261$as_echo "#define _MINIX 1" >>confdefs.h
5262
5263 fi
5264
5265
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5267$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5268if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5269 $as_echo_n "(cached) " >&6
b5472e1d 5270else
5213506e 5271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b5472e1d 5272/* end confdefs.h. */
5213506e
RW
5273
5274# define __EXTENSIONS__ 1
5275 $ac_includes_default
3bbd5a19
PB
5276int
5277main ()
5278{
5213506e 5279
3bbd5a19
PB
5280 ;
5281 return 0;
5282}
b5472e1d 5283_ACEOF
5213506e
RW
5284if ac_fn_c_try_compile "$LINENO"; then :
5285 ac_cv_safe_to_define___extensions__=yes
b5472e1d 5286else
5213506e 5287 ac_cv_safe_to_define___extensions__=no
b5472e1d 5288fi
5213506e 5289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 5290fi
5213506e
RW
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5292$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5293 test $ac_cv_safe_to_define___extensions__ = yes &&
5294 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3bbd5a19 5295
5213506e
RW
5296 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5297
5298 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3bbd5a19 5299
5213506e
RW
5300 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5301
5302 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5303
5304
5305ac_ext=c
5306ac_cpp='$CPP $CPPFLAGS'
5307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5309ac_compiler_gnu=$ac_cv_c_compiler_gnu
5310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5311$as_echo_n "checking how to run the C preprocessor... " >&6; }
5312# On Suns, sometimes $CPP names a directory.
5313if test -n "$CPP" && test -d "$CPP"; then
5314 CPP=
5315fi
5316if test -z "$CPP"; then
5317 if test "${ac_cv_prog_CPP+set}" = set; then :
5318 $as_echo_n "(cached) " >&6
89a42ac8 5319else
5213506e
RW
5320 # Double quotes because CPP needs to be expanded
5321 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5322 do
5323 ac_preproc_ok=false
5324for ac_c_preproc_warn_flag in '' yes
5325do
5326 # Use a header file that comes with gcc, so configuring glibc
5327 # with a fresh cross-compiler works.
5328 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5329 # <limits.h> exists even on freestanding compilers.
5330 # On the NeXT, cc -E runs the code through the compiler's parser,
5331 # not just through cpp. "Syntax error" is here to catch this case.
5332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
89a42ac8 5333/* end confdefs.h. */
5213506e
RW
5334#ifdef __STDC__
5335# include <limits.h>
5336#else
5337# include <assert.h>
5338#endif
5339 Syntax error
89a42ac8 5340_ACEOF
5213506e
RW
5341if ac_fn_c_try_cpp "$LINENO"; then :
5342
89a42ac8 5343else
5213506e
RW
5344 # Broken: fails on valid input.
5345continue
5346fi
5347rm -f conftest.err conftest.$ac_ext
89a42ac8 5348
5213506e
RW
5349 # OK, works on sane cases. Now check whether nonexistent headers
5350 # can be detected and how.
5351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5352/* end confdefs.h. */
5353#include <ac_nonexistent.h>
5354_ACEOF
5355if ac_fn_c_try_cpp "$LINENO"; then :
5356 # Broken: success on invalid input.
5357continue
5358else
5359 # Passes both tests.
5360ac_preproc_ok=:
5361break
89a42ac8 5362fi
5213506e
RW
5363rm -f conftest.err conftest.$ac_ext
5364
5365done
5366# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5367rm -f conftest.err conftest.$ac_ext
5368if $ac_preproc_ok; then :
5369 break
34a86c2b
NN
5370fi
5371
5213506e
RW
5372 done
5373 ac_cv_prog_CPP=$CPP
5374
5375fi
5376 CPP=$ac_cv_prog_CPP
643d3bd2 5377else
5213506e
RW
5378 ac_cv_prog_CPP=$CPP
5379fi
5380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5381$as_echo "$CPP" >&6; }
5382ac_preproc_ok=false
5383for ac_c_preproc_warn_flag in '' yes
5384do
5385 # Use a header file that comes with gcc, so configuring glibc
5386 # with a fresh cross-compiler works.
5387 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5388 # <limits.h> exists even on freestanding compilers.
5389 # On the NeXT, cc -E runs the code through the compiler's parser,
5390 # not just through cpp. "Syntax error" is here to catch this case.
5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
643d3bd2 5392/* end confdefs.h. */
5213506e
RW
5393#ifdef __STDC__
5394# include <limits.h>
5395#else
5396# include <assert.h>
5397#endif
5398 Syntax error
00020c16 5399_ACEOF
5213506e 5400if ac_fn_c_try_cpp "$LINENO"; then :
3bbd5a19 5401
643d3bd2 5402else
5213506e
RW
5403 # Broken: fails on valid input.
5404continue
5405fi
5406rm -f conftest.err conftest.$ac_ext
643d3bd2 5407
5213506e
RW
5408 # OK, works on sane cases. Now check whether nonexistent headers
5409 # can be detected and how.
5410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5411/* end confdefs.h. */
5412#include <ac_nonexistent.h>
5413_ACEOF
5414if ac_fn_c_try_cpp "$LINENO"; then :
5415 # Broken: success on invalid input.
5416continue
5417else
5418 # Passes both tests.
5419ac_preproc_ok=:
5420break
643d3bd2 5421fi
5213506e
RW
5422rm -f conftest.err conftest.$ac_ext
5423
5424done
5425# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5426rm -f conftest.err conftest.$ac_ext
5427if $ac_preproc_ok; then :
5428
09a9c095 5429else
5213506e
RW
5430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5432as_fn_error "C preprocessor \"$CPP\" fails sanity check
5433See \`config.log' for more details." "$LINENO" 5; }
5434fi
373477bb 5435
5213506e
RW
5436ac_ext=c
5437ac_cpp='$CPP $CPPFLAGS'
5438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5440ac_compiler_gnu=$ac_cv_c_compiler_gnu
5441
5442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5443$as_echo_n "checking for inline... " >&6; }
5444if test "${ac_cv_c_inline+set}" = set; then :
5445 $as_echo_n "(cached) " >&6
5446else
5447 ac_cv_c_inline=no
5448for ac_kw in inline __inline__ __inline; do
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 5450/* end confdefs.h. */
5213506e
RW
5451#ifndef __cplusplus
5452typedef int foo_t;
5453static $ac_kw foo_t static_foo () {return 0; }
5454$ac_kw foo_t foo () {return 0; }
5455#endif
373477bb 5456
00020c16 5457_ACEOF
5213506e
RW
5458if ac_fn_c_try_compile "$LINENO"; then :
5459 ac_cv_c_inline=$ac_kw
5460fi
5461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5462 test "$ac_cv_c_inline" != no && break
5463done
5464
5465fi
5466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5467$as_echo "$ac_cv_c_inline" >&6; }
5468
5469case $ac_cv_c_inline in
5470 inline | yes) ;;
5471 *)
5472 case $ac_cv_c_inline in
5473 no) ac_val=;;
5474 *) ac_val=$ac_cv_c_inline;;
5475 esac
5476 cat >>confdefs.h <<_ACEOF
5477#ifndef __cplusplus
5478#define inline $ac_val
5479#endif
00020c16 5480_ACEOF
5213506e
RW
5481 ;;
5482esac
5483
5484
5485# sizeof(char) is 1 by definition.
5486# The cast to long int works around a bug in the HP C Compiler
5487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5489# This bug is HP SR number 8606223364.
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
5491$as_echo_n "checking size of void *... " >&6; }
5492if test "${ac_cv_sizeof_void_p+set}" = set; then :
5493 $as_echo_n "(cached) " >&6
5494else
5495 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
5496
5497else
5498 if test "$ac_cv_type_void_p" = yes; then
5499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5501{ as_fn_set_status 77
5502as_fn_error "cannot compute sizeof (void *)
5503See \`config.log' for more details." "$LINENO" 5; }; }
5504 else
5505 ac_cv_sizeof_void_p=0
5506 fi
5507fi
5508
5509fi
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
5511$as_echo "$ac_cv_sizeof_void_p" >&6; }
414d23ae 5512
5213506e
RW
5513
5514
5515cat >>confdefs.h <<_ACEOF
5516#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
00020c16 5517_ACEOF
5213506e
RW
5518
5519
5520# The cast to long int works around a bug in the HP C Compiler
5521# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5522# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5523# This bug is HP SR number 8606223364.
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
5525$as_echo_n "checking size of short... " >&6; }
5526if test "${ac_cv_sizeof_short+set}" = set; then :
5527 $as_echo_n "(cached) " >&6
00020c16 5528else
5213506e
RW
5529 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
5530
5531else
5532 if test "$ac_cv_type_short" = yes; then
5533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5535{ as_fn_set_status 77
5536as_fn_error "cannot compute sizeof (short)
5537See \`config.log' for more details." "$LINENO" 5; }; }
5538 else
5539 ac_cv_sizeof_short=0
5540 fi
5541fi
414d23ae 5542
a1286ef5 5543fi
5213506e
RW
5544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
5545$as_echo "$ac_cv_sizeof_short" >&6; }
5546
5547
5548
5549cat >>confdefs.h <<_ACEOF
5550#define SIZEOF_SHORT $ac_cv_sizeof_short
5551_ACEOF
5552
5553
5554# The cast to long int works around a bug in the HP C Compiler
5555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5557# This bug is HP SR number 8606223364.
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
5559$as_echo_n "checking size of int... " >&6; }
5560if test "${ac_cv_sizeof_int+set}" = set; then :
5561 $as_echo_n "(cached) " >&6
e1bbfc5c 5562else
5213506e 5563 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
e1bbfc5c 5564
5213506e
RW
5565else
5566 if test "$ac_cv_type_int" = yes; then
5567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5569{ as_fn_set_status 77
5570as_fn_error "cannot compute sizeof (int)
5571See \`config.log' for more details." "$LINENO" 5; }; }
5572 else
5573 ac_cv_sizeof_int=0
5574 fi
e1bbfc5c 5575fi
5213506e 5576
ba479fd2 5577fi
5213506e
RW
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
5579$as_echo "$ac_cv_sizeof_int" >&6; }
00020c16 5580
5213506e
RW
5581
5582
5583cat >>confdefs.h <<_ACEOF
5584#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 5585_ACEOF
5213506e
RW
5586
5587
5588# The cast to long int works around a bug in the HP C Compiler
5589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5591# This bug is HP SR number 8606223364.
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5593$as_echo_n "checking size of long... " >&6; }
5594if test "${ac_cv_sizeof_long+set}" = set; then :
5595 $as_echo_n "(cached) " >&6
ba479fd2 5596else
5213506e 5597 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
ba479fd2 5598
00020c16 5599else
5213506e
RW
5600 if test "$ac_cv_type_long" = yes; then
5601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5603{ as_fn_set_status 77
5604as_fn_error "cannot compute sizeof (long)
5605See \`config.log' for more details." "$LINENO" 5; }; }
5606 else
5607 ac_cv_sizeof_long=0
5608 fi
5609fi
5610
5611fi
5612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5613$as_echo "$ac_cv_sizeof_long" >&6; }
5614
5615
5616
5617cat >>confdefs.h <<_ACEOF
5618#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 5619_ACEOF
00020c16 5620
00020c16 5621
5213506e
RW
5622ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
5623if test "x$ac_cv_type_long_long" = x""yes; then :
5624
5625cat >>confdefs.h <<_ACEOF
5626#define HAVE_LONG_LONG 1
ba479fd2 5627_ACEOF
5213506e
RW
5628
5629# The cast to long int works around a bug in the HP C Compiler
5630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5632# This bug is HP SR number 8606223364.
5633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
5634$as_echo_n "checking size of long long... " >&6; }
5635if test "${ac_cv_sizeof_long_long+set}" = set; then :
5636 $as_echo_n "(cached) " >&6
b61ff9c8 5637else
5213506e 5638 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
ba479fd2 5639
5213506e
RW
5640else
5641 if test "$ac_cv_type_long_long" = yes; then
5642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5644{ as_fn_set_status 77
5645as_fn_error "cannot compute sizeof (long long)
5646See \`config.log' for more details." "$LINENO" 5; }; }
5647 else
5648 ac_cv_sizeof_long_long=0
5649 fi
ba479fd2 5650fi
5213506e 5651
6938ec6c 5652fi
5213506e
RW
5653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
5654$as_echo "$ac_cv_sizeof_long_long" >&6; }
5655
5656
5657
5658cat >>confdefs.h <<_ACEOF
5659#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5660_ACEOF
5661
5662
6e3f3080 5663fi
5213506e
RW
5664
5665ac_fn_c_check_type "$LINENO" "__int64" "ac_cv_type___int64" "$ac_includes_default"
5666if test "x$ac_cv_type___int64" = x""yes; then :
5667
5668cat >>confdefs.h <<_ACEOF
5669#define HAVE___INT64 1
5670_ACEOF
5671
5672# The cast to long int works around a bug in the HP C Compiler
5673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5675# This bug is HP SR number 8606223364.
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5
5677$as_echo_n "checking size of __int64... " >&6; }
5678if test "${ac_cv_sizeof___int64+set}" = set; then :
5679 $as_echo_n "(cached) " >&6
5680else
5681 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then :
5682
6938ec6c 5683else
5213506e
RW
5684 if test "$ac_cv_type___int64" = yes; then
5685 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5687{ as_fn_set_status 77
5688as_fn_error "cannot compute sizeof (__int64)
5689See \`config.log' for more details." "$LINENO" 5; }; }
5690 else
5691 ac_cv_sizeof___int64=0
5692 fi
6938ec6c 5693fi
5213506e 5694
00020c16 5695fi
5213506e
RW
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5
5697$as_echo "$ac_cv_sizeof___int64" >&6; }
5698
5699
5700
00020c16
ILT
5701cat >>confdefs.h <<_ACEOF
5702#define SIZEOF___INT64 $ac_cv_sizeof___int64
5703_ACEOF
6938ec6c
NN
5704
5705
00020c16 5706fi
ba479fd2 5707
fa802374
KT
5708ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
5709case $ac_cv_c_int8_t in #(
5710 no|yes) ;; #(
5711 *)
5712
5713cat >>confdefs.h <<_ACEOF
5714#define int8_t $ac_cv_c_int8_t
5715_ACEOF
5716;;
5717esac
5718
5719ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
5720case $ac_cv_c_int16_t in #(
5721 no|yes) ;; #(
5722 *)
5723
5724cat >>confdefs.h <<_ACEOF
5725#define int16_t $ac_cv_c_int16_t
5726_ACEOF
5727;;
5728esac
5729
5730ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
5731case $ac_cv_c_int32_t in #(
5732 no|yes) ;; #(
5733 *)
5734
5735cat >>confdefs.h <<_ACEOF
5736#define int32_t $ac_cv_c_int32_t
5737_ACEOF
5738;;
5739esac
5740
5741ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
5742case $ac_cv_c_int64_t in #(
5743 no|yes) ;; #(
5744 *)
5745
5746cat >>confdefs.h <<_ACEOF
5747#define int64_t $ac_cv_c_int64_t
5748_ACEOF
5749;;
5750esac
5751
5752
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5754$as_echo_n "checking for long long int... " >&6; }
5755if test "${ac_cv_type_long_long_int+set}" = set; then :
5756 $as_echo_n "(cached) " >&6
5757else
5758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5759/* end confdefs.h. */
5760
5761 /* For now, do not test the preprocessor; as of 2007 there are too many
5762 implementations with broken preprocessors. Perhaps this can
5763 be revisited in 2012. In the meantime, code should not expect
5764 #if to work with literals wider than 32 bits. */
5765 /* Test literals. */
5766 long long int ll = 9223372036854775807ll;
5767 long long int nll = -9223372036854775807LL;
5768 unsigned long long int ull = 18446744073709551615ULL;
5769 /* Test constant expressions. */
5770 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5771 ? 1 : -1)];
5772 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5773 ? 1 : -1)];
5774 int i = 63;
5775int
5776main ()
5777{
5778/* Test availability of runtime routines for shift and division. */
5779 long long int llmax = 9223372036854775807ll;
5780 unsigned long long int ullmax = 18446744073709551615ull;
5781 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5782 | (llmax / ll) | (llmax % ll)
5783 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5784 | (ullmax / ull) | (ullmax % ull));
5785 ;
5786 return 0;
5787}
5788
5789_ACEOF
5790if ac_fn_c_try_link "$LINENO"; then :
5791 if test "$cross_compiling" = yes; then :
5792 ac_cv_type_long_long_int=yes
5793else
5794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5795/* end confdefs.h. */
5796#include <limits.h>
5797 #ifndef LLONG_MAX
5798 # define HALF \
5799 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5800 # define LLONG_MAX (HALF - 1 + HALF)
5801 #endif
5802int
5803main ()
5804{
5805long long int n = 1;
5806 int i;
5807 for (i = 0; ; i++)
5808 {
5809 long long int m = n << i;
5810 if (m >> i != n)
5811 return 1;
5812 if (LLONG_MAX / 2 < m)
5813 break;
5814 }
5815 return 0;
5816 ;
5817 return 0;
5818}
5819_ACEOF
5820if ac_fn_c_try_run "$LINENO"; then :
5821 ac_cv_type_long_long_int=yes
5822else
5823 ac_cv_type_long_long_int=no
5824fi
5825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5826 conftest.$ac_objext conftest.beam conftest.$ac_ext
5827fi
5828
5829else
5830 ac_cv_type_long_long_int=no
5831fi
5832rm -f core conftest.err conftest.$ac_objext \
5833 conftest$ac_exeext conftest.$ac_ext
5834fi
5835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5836$as_echo "$ac_cv_type_long_long_int" >&6; }
5837 if test $ac_cv_type_long_long_int = yes; then
5838
5839$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
5840
5841 fi
5842
5843
5844
5845 ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
5846if test "x$ac_cv_type_intmax_t" = x""yes; then :
5847
5848$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
5849
5850else
5851 test $ac_cv_type_long_long_int = yes \
5852 && ac_type='long long int' \
5853 || ac_type='long int'
5854
5855cat >>confdefs.h <<_ACEOF
5856#define intmax_t $ac_type
5857_ACEOF
5858
5859fi
5860
5861
5862
5863 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
5864if test "x$ac_cv_type_intptr_t" = x""yes; then :
5865
5866$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
5867
5868else
5869 for ac_type in 'int' 'long int' 'long long int'; do
5870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5871/* end confdefs.h. */
5872$ac_includes_default
5873int
5874main ()
5875{
5876static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
5877test_array [0] = 0
5878
5879 ;
5880 return 0;
5881}
5882_ACEOF
5883if ac_fn_c_try_compile "$LINENO"; then :
5884
5885cat >>confdefs.h <<_ACEOF
5886#define intptr_t $ac_type
5887_ACEOF
5888
5889 ac_type=
5890fi
5891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5892 test -z "$ac_type" && break
5893 done
5894fi
5895
5896
5897ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
5898case $ac_cv_c_uint8_t in #(
5899 no|yes) ;; #(
5900 *)
5901
5902$as_echo "#define _UINT8_T 1" >>confdefs.h
5903
5904
5905cat >>confdefs.h <<_ACEOF
5906#define uint8_t $ac_cv_c_uint8_t
5907_ACEOF
5908;;
5909 esac
5910
5911ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
5912case $ac_cv_c_uint16_t in #(
5913 no|yes) ;; #(
5914 *)
5915
5916
5917cat >>confdefs.h <<_ACEOF
5918#define uint16_t $ac_cv_c_uint16_t
5919_ACEOF
5920;;
5921 esac
5922
5923ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
5924case $ac_cv_c_uint32_t in #(
5925 no|yes) ;; #(
5926 *)
5927
5928$as_echo "#define _UINT32_T 1" >>confdefs.h
5929
5930
5931cat >>confdefs.h <<_ACEOF
5932#define uint32_t $ac_cv_c_uint32_t
5933_ACEOF
5934;;
5935 esac
5936
5937ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
5938case $ac_cv_c_uint64_t in #(
5939 no|yes) ;; #(
5940 *)
5941
5942$as_echo "#define _UINT64_T 1" >>confdefs.h
5943
5944
5945cat >>confdefs.h <<_ACEOF
5946#define uint64_t $ac_cv_c_uint64_t
5947_ACEOF
5948;;
5949 esac
5950
5951
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5953$as_echo_n "checking for unsigned long long int... " >&6; }
5954if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5955 $as_echo_n "(cached) " >&6
5956else
5957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5958/* end confdefs.h. */
5959
5960 /* For now, do not test the preprocessor; as of 2007 there are too many
5961 implementations with broken preprocessors. Perhaps this can
5962 be revisited in 2012. In the meantime, code should not expect
5963 #if to work with literals wider than 32 bits. */
5964 /* Test literals. */
5965 long long int ll = 9223372036854775807ll;
5966 long long int nll = -9223372036854775807LL;
5967 unsigned long long int ull = 18446744073709551615ULL;
5968 /* Test constant expressions. */
5969 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
5970 ? 1 : -1)];
5971 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
5972 ? 1 : -1)];
5973 int i = 63;
5974int
5975main ()
5976{
5977/* Test availability of runtime routines for shift and division. */
5978 long long int llmax = 9223372036854775807ll;
5979 unsigned long long int ullmax = 18446744073709551615ull;
5980 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
5981 | (llmax / ll) | (llmax % ll)
5982 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5983 | (ullmax / ull) | (ullmax % ull));
5984 ;
5985 return 0;
5986}
5987
5988_ACEOF
5989if ac_fn_c_try_link "$LINENO"; then :
5990 ac_cv_type_unsigned_long_long_int=yes
5991else
5992 ac_cv_type_unsigned_long_long_int=no
5993fi
5994rm -f core conftest.err conftest.$ac_objext \
5995 conftest$ac_exeext conftest.$ac_ext
5996fi
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5998$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
5999 if test $ac_cv_type_unsigned_long_long_int = yes; then
6000
6001$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6002
6003 fi
6004
6005
6006
6007 ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
6008if test "x$ac_cv_type_uintmax_t" = x""yes; then :
6009
6010$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
6011
6012else
6013 test $ac_cv_type_unsigned_long_long_int = yes \
6014 && ac_type='unsigned long long int' \
6015 || ac_type='unsigned long int'
6016
6017cat >>confdefs.h <<_ACEOF
6018#define uintmax_t $ac_type
6019_ACEOF
6020
6021fi
6022
6023
6024
6025 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
6026if test "x$ac_cv_type_uintptr_t" = x""yes; then :
6027
6028$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
6029
6030else
6031 for ac_type in 'unsigned int' 'unsigned long int' \
6032 'unsigned long long int'; do
6033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034/* end confdefs.h. */
6035$ac_includes_default
6036int
6037main ()
6038{
6039static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6040test_array [0] = 0
6041
6042 ;
6043 return 0;
6044}
6045_ACEOF
6046if ac_fn_c_try_compile "$LINENO"; then :
6047
6048cat >>confdefs.h <<_ACEOF
6049#define uintptr_t $ac_type
6050_ACEOF
6051
6052 ac_type=
6053fi
6054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6055 test -z "$ac_type" && break
6056 done
6057fi
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
00020c16
ILT
6072
6073# ---------------------
6074# Warnings and checking
6075# ---------------------
6076
6077# Check $CC warning features (if it's GCC).
6078# We want to use -pedantic, but we don't want warnings about
6079# * 'long long'
6080# * variadic macros
6081# * overlong strings
6082# So, we only use -pedantic if we can disable those warnings.
6083
6084loose_warn=
6085save_CFLAGS="$CFLAGS"
6086for option in -W -Wall -Wwrite-strings -Wcast-qual; do
5213506e 6087 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6088
5213506e
RW
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6090$as_echo_n "checking whether $CC supports $option... " >&6; }
6091if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6092 $as_echo_n "(cached) " >&6
00020c16
ILT
6093else
6094 CFLAGS="$option"
5213506e 6095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6096/* end confdefs.h. */
00020c16
ILT
6097
6098int
6099main ()
6100{
6101
6102 ;
6103 return 0;
6104}
ba479fd2 6105_ACEOF
5213506e 6106if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6107 eval "$as_acx_Woption=yes"
a207b594 6108else
5213506e 6109 eval "$as_acx_Woption=no"
a207b594 6110fi
5213506e 6111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6112
6113fi
5213506e
RW
6114eval ac_res=\$$as_acx_Woption
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6116$as_echo "$ac_res" >&6; }
6117 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6118 loose_warn="$loose_warn${loose_warn:+ }$option"
6119fi
00020c16
ILT
6120 done
6121CFLAGS="$save_CFLAGS"
6122
6123c_loose_warn=
6124save_CFLAGS="$CFLAGS"
6125for option in -Wstrict-prototypes -Wmissing-prototypes; do
5213506e 6126 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6127
5213506e
RW
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6129$as_echo_n "checking whether $CC supports $option... " >&6; }
6130if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6131 $as_echo_n "(cached) " >&6
00020c16
ILT
6132else
6133 CFLAGS="$option"
5213506e 6134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 6135/* end confdefs.h. */
00020c16
ILT
6136
6137int
6138main ()
6139{
6140
6141 ;
6142 return 0;
6143}
ba479fd2 6144_ACEOF
5213506e 6145if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6146 eval "$as_acx_Woption=yes"
14011ca4 6147else
5213506e 6148 eval "$as_acx_Woption=no"
cafe096b 6149fi
5213506e 6150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 6151
56694dd9 6152fi
5213506e
RW
6153eval ac_res=\$$as_acx_Woption
6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6155$as_echo "$ac_res" >&6; }
6156 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16 6157 c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option"
56694dd9 6158fi
00020c16
ILT
6159 done
6160CFLAGS="$save_CFLAGS"
6161
6162strict_warn=
6163save_CFLAGS="$CFLAGS"
6164for option in -Wmissing-format-attribute; do
5213506e 6165 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
00020c16 6166
5213506e
RW
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6168$as_echo_n "checking whether $CC supports $option... " >&6; }
6169if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6170 $as_echo_n "(cached) " >&6
414d23ae 6171else
00020c16 6172 CFLAGS="$option"
5213506e 6173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6174/* end confdefs.h. */
6175
6176int
6177main ()
6178{
6179
6180 ;
6181 return 0;
6182}
6183_ACEOF
5213506e 6184if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6185 eval "$as_acx_Woption=yes"
414d23ae 6186else
5213506e 6187 eval "$as_acx_Woption=no"
414d23ae 6188fi
5213506e 6189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6190
00020c16 6191fi
5213506e
RW
6192eval ac_res=\$$as_acx_Woption
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6194$as_echo "$ac_res" >&6; }
6195 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6196 strict_warn="$strict_warn${strict_warn:+ }$option"
6197fi
00020c16
ILT
6198 done
6199CFLAGS="$save_CFLAGS"
75e93faa 6200
00020c16
ILT
6201c_strict_warn=
6202save_CFLAGS="$CFLAGS"
6203for option in -Wold-style-definition -Wc++-compat; do
5213506e 6204 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
ba479fd2 6205
5213506e
RW
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
6207$as_echo_n "checking whether $CC supports $option... " >&6; }
6208if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
6209 $as_echo_n "(cached) " >&6
00020c16
ILT
6210else
6211 CFLAGS="$option"
5213506e 6212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6213/* end confdefs.h. */
a207b594 6214
00020c16
ILT
6215int
6216main ()
6217{
ba479fd2 6218
00020c16
ILT
6219 ;
6220 return 0;
6221}
ba479fd2 6222_ACEOF
5213506e 6223if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
6224 eval "$as_acx_Woption=yes"
6225else
5213506e 6226 eval "$as_acx_Woption=no"
414d23ae 6227fi
5213506e 6228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa 6229
00020c16 6230fi
5213506e
RW
6231eval ac_res=\$$as_acx_Woption
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6233$as_echo "$ac_res" >&6; }
6234 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
00020c16
ILT
6235 c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option"
6236fi
00020c16
ILT
6237 done
6238CFLAGS="$save_CFLAGS"
75e93faa 6239
5213506e
RW
6240if test "$GCC" = yes; then :
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
6242$as_echo_n "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... " >&6; }
6243if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then :
6244 $as_echo_n "(cached) " >&6
75e93faa 6245else
00020c16
ILT
6246 save_CFLAGS="$CFLAGS"
6247CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
5213506e 6248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 6249/* end confdefs.h. */
2f41c1d6 6250
00020c16
ILT
6251int
6252main ()
6253{
b61ff9c8 6254
00020c16
ILT
6255 ;
6256 return 0;
6257}
6258_ACEOF
5213506e 6259if ac_fn_c_try_compile "$LINENO"; then :
00020c16 6260 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes
439a7e54 6261else
5213506e 6262 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no
00020c16 6263fi
5213506e 6264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
6265CFLAGS="$save_CFLAGS"
6266fi
5213506e
RW
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5
6268$as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6; }
6269if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then :
00020c16
ILT
6270 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
6271fi
ba479fd2 6272
439a7e54
DN
6273fi
6274
5213506e
RW
6275# Check whether --enable-werror-always was given.
6276if test "${enable_werror_always+set}" = set; then :
6277 enableval=$enable_werror_always;
34a86c2b 6278else
00020c16 6279 enable_werror_always=no
00020c16 6280fi
cafe096b 6281
5213506e
RW
6282if test $enable_werror_always = yes; then :
6283 strict_warn="$strict_warn${strict_warn:+ }-Werror"
6284fi
b61ff9c8 6285
75e93faa 6286
34a86c2b 6287
00020c16
ILT
6288# The above macros do nothing if the compiler is not GCC. However, the
6289# Makefile has more goo to add other flags, so these variables are used
6290# to enable warnings only for GCC.
6291warn_cflags=
6292warn_cxxflags=
6293if test "x$GCC" = "xyes"; then
6294 warn_cflags='$(GCC_WARN_CFLAGS)'
6295 warn_cxxflags='$(GCC_WARN_CXXFLAGS)'
6296fi
75e93faa
ZW
6297
6298
b61ff9c8 6299
00020c16
ILT
6300# Enable expensive internal checks
6301is_release=
6302if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6303 is_release=yes
6304fi
79b87c74 6305
5213506e
RW
6306# Check whether --enable-checking was given.
6307if test "${enable_checking+set}" = set; then :
6308 enableval=$enable_checking; ac_checking_flags="${enableval}"
79b87c74
MM
6309else
6310
00020c16
ILT
6311# Determine the default checks.
6312if test x$is_release = x ; then
6313 ac_checking_flags=yes
6314else
6315 ac_checking_flags=release
6316fi
5213506e
RW
6317fi
6318
00020c16
ILT
6319IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6320for check in release $ac_checking_flags
6321do
6322 case $check in
6323 # these set all the flags to specific states
6324 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
6325 ac_fold_checking= ; ac_gc_checking=1 ;
6326 ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
6327 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6328 ac_tree_checking=1 ; ac_valgrind_checking= ;
6329 ac_types_checking=1 ;;
6330 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
6331 ac_fold_checking= ; ac_gc_checking= ;
6332 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6333 ac_rtlflag_checking= ; ac_runtime_checking= ;
6334 ac_tree_checking= ; ac_valgrind_checking= ;
6335 ac_types_checking= ;;
6336 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
6337 ac_fold_checking=1 ; ac_gc_checking=1 ;
6338 ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
6339 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6340 ac_tree_checking=1 ; ac_valgrind_checking= ;
6341 ac_types_checking=1 ;;
6342 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
6343 ac_fold_checking= ; ac_gc_checking= ;
6344 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
6345 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6346 ac_tree_checking= ; ac_valgrind_checking= ;
6347 ac_types_checking= ;;
6348 # these enable particular checks
6349 assert) ac_assert_checking=1 ;;
6350 df) ac_df_checking=1 ;;
6351 fold) ac_fold_checking=1 ;;
6352 gc) ac_gc_checking=1 ;;
6353 gcac) ac_gc_always_collect=1 ;;
6354 gimple) ac_gimple_checking=1 ;;
6355 misc) ac_checking=1 ;;
6356 rtl) ac_rtl_checking=1 ;;
6357 rtlflag) ac_rtlflag_checking=1 ;;
6358 runtime) ac_runtime_checking=1 ;;
6359 tree) ac_tree_checking=1 ;;
6360 types) ac_types_checking=1 ;;
6361 valgrind) ac_valgrind_checking=1 ;;
5213506e 6362 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
00020c16
ILT
6363 esac
6364done
6365IFS="$ac_save_IFS"
486aa804 6366
00020c16
ILT
6367nocommon_flag=""
6368if test x$ac_checking != x ; then
79b87c74 6369
5213506e 6370$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
79b87c74 6371
00020c16
ILT
6372 nocommon_flag=-fno-common
6373fi
79b87c74 6374
00020c16 6375if test x$ac_df_checking != x ; then
486aa804 6376
5213506e 6377$as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h
486aa804 6378
00020c16
ILT
6379fi
6380if test x$ac_assert_checking != x ; then
486aa804 6381
5213506e 6382$as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h
486aa804 6383
00020c16
ILT
6384fi
6385if test x$ac_gimple_checking != x ; then
486aa804 6386
5213506e 6387$as_echo "#define ENABLE_GIMPLE_CHECKING 1" >>confdefs.h
b61ff9c8 6388
00020c16 6389fi
ab22c1fa 6390
00020c16 6391if test x$ac_runtime_checking != x ; then
ab22c1fa 6392
5213506e 6393$as_echo "#define ENABLE_RUNTIME_CHECKING 1" >>confdefs.h
ab22c1fa 6394
00020c16
ILT
6395fi
6396if test x$ac_tree_checking != x ; then
ab22c1fa 6397
5213506e 6398$as_echo "#define ENABLE_TREE_CHECKING 1" >>confdefs.h
ab22c1fa 6399
00020c16
ILT
6400 TREEBROWSER=tree-browser.o
6401fi
6402if test x$ac_types_checking != x ; then
ab22c1fa 6403
5213506e 6404$as_echo "#define ENABLE_TYPES_CHECKING 1" >>confdefs.h
ab22c1fa 6405
00020c16 6406fi
ab22c1fa 6407
00020c16 6408if test x$ac_rtl_checking != x ; then
2f41c1d6 6409
5213506e
RW
6410$as_echo "#define ENABLE_RTL_CHECKING 1" >>confdefs.h
6411
00020c16 6412fi
5213506e
RW
6413if test x$ac_rtlflag_checking != x ; then
6414
6415$as_echo "#define ENABLE_RTL_FLAG_CHECKING 1" >>confdefs.h
4977bab6 6416
00020c16 6417fi
5213506e
RW
6418if test x$ac_gc_checking != x ; then
6419
6420$as_echo "#define ENABLE_GC_CHECKING 1" >>confdefs.h
6421
6422fi
6423if test x$ac_gc_always_collect != x ; then
6424
6425$as_echo "#define ENABLE_GC_ALWAYS_COLLECT 1" >>confdefs.h
4977bab6 6426
00020c16 6427fi
5213506e
RW
6428if test x$ac_fold_checking != x ; then
6429
6430$as_echo "#define ENABLE_FOLD_CHECKING 1" >>confdefs.h
2f41c1d6 6431
00020c16 6432fi
5213506e
RW
6433valgrind_path_defines=
6434valgrind_command=
6435
6436ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
6437if test "x$ac_cv_header_valgrind_h" = x""yes; then :
00020c16 6438 have_valgrind_h=yes
2f41c1d6 6439else
00020c16
ILT
6440 have_valgrind_h=no
6441fi
2f41c1d6 6442
1a4b763e 6443
2f41c1d6 6444
00020c16
ILT
6445if test x$ac_valgrind_checking != x ; then
6446 # It is certainly possible that there's valgrind but no valgrind.h.
6447 # GCC relies on making annotations so we must have both.
5213506e
RW
6448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6449$as_echo_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... " >&6; }
6450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6451/* end confdefs.h. */
6452#include <valgrind/memcheck.h>
6453#ifndef VALGRIND_DISCARD
6454#error VALGRIND_DISCARD not defined
6455#endif
6456_ACEOF
5213506e 6457if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6458 gcc_cv_header_valgrind_memcheck_h=yes
aca600aa 6459else
00020c16
ILT
6460 gcc_cv_header_valgrind_memcheck_h=no
6461fi
6462rm -f conftest.err conftest.$ac_ext
5213506e
RW
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6464$as_echo "$gcc_cv_header_valgrind_memcheck_h" >&6; }
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6466$as_echo_n "checking for VALGRIND_DISCARD in <memcheck.h>... " >&6; }
6467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
6468/* end confdefs.h. */
6469#include <memcheck.h>
6470#ifndef VALGRIND_DISCARD
6471#error VALGRIND_DISCARD not defined
6472#endif
6473_ACEOF
5213506e 6474if ac_fn_c_try_cpp "$LINENO"; then :
00020c16 6475 gcc_cv_header_memcheck_h=yes
e9a25f70 6476else
00020c16
ILT
6477 gcc_cv_header_memcheck_h=no
6478fi
6479rm -f conftest.err conftest.$ac_ext
5213506e
RW
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_memcheck_h" >&5
6481$as_echo "$gcc_cv_header_memcheck_h" >&6; }
00020c16
ILT
6482
6483# Prepare PATH_SEPARATOR.
6484# The user is always right.
6485if test "${PATH_SEPARATOR+set}" != set; then
6486 echo "#! /bin/sh" >conf$$.sh
6487 echo "exit 0" >>conf$$.sh
6488 chmod +x conf$$.sh
6489 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6490 PATH_SEPARATOR=';'
6491 else
6492 PATH_SEPARATOR=:
6493 fi
6494 rm -f conf$$.sh
e9a25f70
JL
6495fi
6496
00020c16
ILT
6497# Find out how to test for executable files. Don't use a zero-byte file,
6498# as systems may use methods other than mode bits to determine executability.
6499cat >conf$$.file <<_ASEOF
6500#! /bin/sh
6501exit 0
6502_ASEOF
6503chmod +x conf$$.file
6504if test -x conf$$.file >/dev/null 2>&1; then
6505 ac_executable_p="test -x"
6506else
6507 ac_executable_p="test -f"
6508fi
6509rm -f conf$$.file
e9a25f70 6510
00020c16
ILT
6511# Extract the first word of "valgrind", so it can be a program name with args.
6512set dummy valgrind; ac_word=$2
5213506e
RW
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6514$as_echo_n "checking for $ac_word... " >&6; }
6515if test "${ac_cv_path_valgrind_path+set}" = set; then :
6516 $as_echo_n "(cached) " >&6
861bb6c1 6517else
00020c16
ILT
6518 case "$valgrind_path" in
6519 [\\/]* | ?:[\\/]*)
6520 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6521 ;;
6522 *)
6523 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6524 for ac_dir in $PATH; do
6525 IFS="$ac_save_IFS"
6526 test -z "$ac_dir" && ac_dir=.
6527 for ac_exec_ext in '' $ac_executable_extensions; do
6528 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6529 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6530 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6531 break 2
6532 fi
6533 fi
6534 done
6535 done
6536 IFS="$ac_save_IFS"
6537 ;;
6538esac
861bb6c1 6539fi
00020c16
ILT
6540valgrind_path="$ac_cv_path_valgrind_path"
6541if test -n "$valgrind_path"; then
5213506e
RW
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $valgrind_path" >&5
6543$as_echo "$valgrind_path" >&6; }
861bb6c1 6544else
5213506e
RW
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; }
861bb6c1
JL
6547fi
6548
00020c16
ILT
6549 if test "x$valgrind_path" = "x" \
6550 || (test $have_valgrind_h = no \
6551 && test $gcc_cv_header_memcheck_h = no \
6552 && test $gcc_cv_header_valgrind_memcheck_h = no); then
5213506e 6553 as_fn_error "*** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5
00020c16
ILT
6554 fi
6555 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6556 valgrind_command="$valgrind_path -q"
861bb6c1 6557
5213506e 6558$as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h
00020c16
ILT
6559
6560 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
6561
5213506e 6562$as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h
2c4902b9 6563
0a4b6309 6564 fi
00020c16
ILT
6565 if test $gcc_cv_header_memcheck_h = yes; then
6566
5213506e 6567$as_echo "#define HAVE_MEMCHECK_H 1" >>confdefs.h
0a4b6309 6568
0a4b6309
RL
6569 fi
6570fi
6571
18fc9bd4 6572
18fc9bd4 6573
00020c16 6574# Enable code coverage collection
5213506e
RW
6575# Check whether --enable-coverage was given.
6576if test "${enable_coverage+set}" = set; then :
6577 enableval=$enable_coverage; case "${enableval}" in
00020c16
ILT
6578 yes|noopt)
6579 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6580 ;;
6581 opt)
6582 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6583 ;;
6584 no)
6585 # a.k.a. --disable-coverage
6586 coverage_flags=""
6587 ;;
6588 *)
5213506e 6589 as_fn_error "unknown coverage setting $enableval" "$LINENO" 5
00020c16
ILT
6590 ;;
6591esac
861bb6c1 6592else
00020c16 6593 coverage_flags=""
5213506e 6594fi
00020c16
ILT
6595
6596
ba479fd2 6597
5213506e
RW
6598# Check whether --enable-gather-detailed-mem-stats was given.
6599if test "${enable_gather_detailed_mem_stats+set}" = set; then :
6600 enableval=$enable_gather_detailed_mem_stats;
ba479fd2 6601else
00020c16 6602 enable_gather_detailed_mem_stats=no
5213506e
RW
6603fi
6604
00020c16
ILT
6605if test x$enable_gather_detailed_mem_stats = xyes ; then
6606
5213506e 6607$as_echo "#define GATHER_STATISTICS 1" >>confdefs.h
ba479fd2
NN
6608
6609fi
00020c16
ILT
6610
6611# -------------------------------
6612# Miscenalleous configure options
6613# -------------------------------
6614
6615# See if we are building gcc with C++.
5213506e
RW
6616# Check whether --enable-build-with-cxx was given.
6617if test "${enable_build_with_cxx+set}" = set; then :
6618 enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval
ba479fd2 6619else
00020c16 6620 ENABLE_BUILD_WITH_CXX=no
5213506e
RW
6621fi
6622
ba479fd2 6623
00020c16
ILT
6624
6625# With stabs
6626
5213506e
RW
6627# Check whether --with-stabs was given.
6628if test "${with_stabs+set}" = set; then :
6629 withval=$with_stabs; stabs="$with_stabs"
6e3f3080 6630else
00020c16 6631 stabs=no
5213506e 6632fi
00020c16 6633
ba479fd2 6634
5213506e
RW
6635# Determine whether or not multilibs are enabled.
6636# Check whether --enable-multilib was given.
6637if test "${enable_multilib+set}" = set; then :
6638 enableval=$enable_multilib;
ba479fd2 6639else
00020c16 6640 enable_multilib=yes
5213506e
RW
6641fi
6642
861bb6c1 6643
343a6100 6644
00020c16 6645# Enable __cxa_atexit for C++.
5213506e
RW
6646# Check whether --enable-__cxa_atexit was given.
6647if test "${enable___cxa_atexit+set}" = set; then :
6648 enableval=$enable___cxa_atexit;
6649fi
00020c16 6650
00020c16
ILT
6651
6652# Enable C extension for decimal float if target supports it.
f4dae9fc 6653
5213506e
RW
6654# Check whether --enable-decimal-float was given.
6655if test "${enable_decimal_float+set}" = set; then :
6656 enableval=$enable_decimal_float;
00020c16 6657 case $enable_decimal_float in
cc0ae0ca 6658 yes | no | bid | dpd) default_decimal_float=$enable_decimal_float ;;
5213506e
RW
6659 *) as_fn_error "'$enable_decimal_float' is an invalid value for --enable-decimal-float.
6660Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;;
00020c16 6661 esac
343a6100 6662
0a4b6309 6663else
00020c16
ILT
6664
6665 case $target in
996b42ef
KT
6666 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
6667 i?86*-*-mingw* | x86_64*-*-mingw* | \
6668 i?86*-*-cygwin*)
00020c16 6669 enable_decimal_float=yes
0a4b6309 6670 ;;
00020c16 6671 *)
84f47d20
AS
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target, ignored" >&5
6673$as_echo "$as_me: WARNING: decimal float is not supported for this target, ignored" >&2;}
00020c16
ILT
6674 enable_decimal_float=no
6675 ;;
6676 esac
6677
5213506e
RW
6678fi
6679
00020c16 6680
00020c16
ILT
6681# x86's use BID format instead of DPD
6682case x$enable_decimal_float in
6683 xyes)
6684 case $target in
f4dae9fc 6685 i?86*-*-* | x86_64*-*-*)
00020c16
ILT
6686 enable_decimal_float=bid
6687 ;;
6688 *)
6689 enable_decimal_float=dpd
6690 ;;
0a4b6309 6691 esac
cc0ae0ca 6692 default_decimal_float=$enable_decimal_float
00020c16
ILT
6693 ;;
6694 xno)
6695 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
6696 # dependency on libdecnumber.
cc0ae0ca 6697 default_decimal_float=dpd
00020c16
ILT
6698 ;;
6699esac
0a4b6309 6700
0a4b6309 6701
f4dae9fc
AK
6702
6703
6704dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
6705
6706cat >>confdefs.h <<_ACEOF
6707#define ENABLE_DECIMAL_FLOAT $dfp
6708_ACEOF
6709
6710
cc0ae0ca
L
6711# Use default_decimal_float for dependency.
6712enable_decimal_float=$default_decimal_float
6713
00020c16 6714bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
0a4b6309 6715
00020c16
ILT
6716cat >>confdefs.h <<_ACEOF
6717#define ENABLE_DECIMAL_BID_FORMAT $bid
6718_ACEOF
6719
6720
6721# Enable C extension for fixed-point arithmetic.
5213506e
RW
6722# Check whether --enable-fixed-point was given.
6723if test "${enable_fixed_point+set}" = set; then :
6724 enableval=$enable_fixed_point;
861bb6c1 6725
3a000df0 6726else
3a000df0 6727
00020c16
ILT
6728 case $target in
6729 mips*-*-*)
6730 case $host in
6731 mips*-sgi-irix*)
84f47d20
AS
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported on IRIX, ignored" >&5
6733$as_echo "$as_me: WARNING: fixed-point is not supported on IRIX, ignored" >&2;}
00020c16
ILT
6734 enable_fixed_point=no
6735 ;;
6736 *)
6737 enable_fixed_point=yes
6738 ;;
6739 esac
6740 ;;
6741 *)
84f47d20
AS
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported for this target, ignored" >&5
6743$as_echo "$as_me: WARNING: fixed-point is not supported for this target, ignored" >&2;}
00020c16
ILT
6744 enable_fixed_point=no
6745 ;;
6746 esac
3a000df0 6747
5213506e
RW
6748fi
6749
3a000df0
KC
6750
6751
00020c16 6752fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
ba479fd2 6753
00020c16
ILT
6754cat >>confdefs.h <<_ACEOF
6755#define ENABLE_FIXED_POINT $fixedpoint
6756_ACEOF
73458fb7
NN
6757
6758
00020c16
ILT
6759# Enable threads
6760# Pass with no value to take the default
6761# Pass with a value to specify a thread package
5213506e
RW
6762# Check whether --enable-threads was given.
6763if test "${enable_threads+set}" = set; then :
6764 enableval=$enable_threads;
73458fb7 6765else
00020c16 6766 enable_threads=''
5213506e 6767fi
00020c16 6768
00020c16 6769
5213506e
RW
6770# Check whether --enable-tls was given.
6771if test "${enable_tls+set}" = set; then :
6772 enableval=$enable_tls;
00020c16
ILT
6773 case $enable_tls in
6774 yes | no) ;;
5213506e
RW
6775 *) as_fn_error "'$enable_tls' is an invalid value for --enable-tls.
6776Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
00020c16
ILT
6777 esac
6778
73458fb7 6779else
00020c16 6780 enable_tls=''
5213506e 6781fi
ba479fd2 6782
5213506e
RW
6783
6784# Check whether --enable-objc-gc was given.
6785if test "${enable_objc_gc+set}" = set; then :
6786 enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
00020c16 6787 objc_boehm_gc=''
73458fb7 6788else
00020c16 6789 objc_boehm_gc=1
73458fb7 6790fi
00020c16
ILT
6791else
6792 objc_boehm_gc=''
5213506e
RW
6793fi
6794
73458fb7 6795
00020c16 6796
5213506e
RW
6797# Check whether --with-dwarf2 was given.
6798if test "${with_dwarf2+set}" = set; then :
6799 withval=$with_dwarf2; dwarf2="$with_dwarf2"
73458fb7 6800else
00020c16 6801 dwarf2=no
5213506e 6802fi
3bbd5a19 6803
73458fb7 6804
5213506e
RW
6805# Check whether --enable-shared was given.
6806if test "${enable_shared+set}" = set; then :
6807 enableval=$enable_shared;
00020c16
ILT
6808 case $enable_shared in
6809 yes | no) ;;
6810 *)
6811 enable_shared=no
6812 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6813 for pkg in $enableval; do
6814 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6815 enable_shared=yes
6816 fi
6817 done
6818 IFS="$ac_save_ifs"
6819 ;;
6820 esac
73458fb7 6821
73458fb7 6822else
00020c16 6823 enable_shared=yes
5213506e 6824fi
73458fb7 6825
7c27e184 6826
00020c16 6827
00020c16 6828
5213506e
RW
6829# Check whether --with-build-sysroot was given.
6830if test "${with_build_sysroot+set}" = set; then :
6831 withval=$with_build_sysroot;
6832fi
00020c16
ILT
6833
6834
00020c16 6835
5213506e
RW
6836# Check whether --with-sysroot was given.
6837if test "${with_sysroot+set}" = set; then :
6838 withval=$with_sysroot;
00020c16
ILT
6839 case ${with_sysroot} in
6840 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
6841 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6842 esac
6843
6844 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6845 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
6846
6847 if test "x$prefix" = xNONE; then
6848 test_prefix=/usr/local
6849 else
6850 test_prefix=$prefix
6851 fi
6852 if test "x$exec_prefix" = xNONE; then
6853 test_exec_prefix=$test_prefix
6854 else
6855 test_exec_prefix=$exec_prefix
6856 fi
6857 case ${TARGET_SYSTEM_ROOT} in
6858 "${test_prefix}"|"${test_prefix}/"*|\
6859 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
6860 '${prefix}'|'${prefix}/'*|\
6861 '${exec_prefix}'|'${exec_prefix}/'*)
6862 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6863 TARGET_SYSTEM_ROOT_DEFINE="$t"
6864 ;;
6865 esac
6866
6867else
6868
6869 TARGET_SYSTEM_ROOT=
6870 TARGET_SYSTEM_ROOT_DEFINE=
6871 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6872
5213506e
RW
6873fi
6874
00020c16
ILT
6875
6876
6877
6878
e11ddaf5
NS
6879
6880# Check whether --with-specs was given.
6881if test "${with_specs+set}" = set; then :
6882 withval=$with_specs; CONFIGURE_SPECS=$withval
6883else
6884 CONFIGURE_SPECS=
6885
6886fi
6887
6888
6889
00020c16
ILT
6890
6891
5213506e
RW
6892# Check whether --with-pkgversion was given.
6893if test "${with_pkgversion+set}" = set; then :
6894 withval=$with_pkgversion; case "$withval" in
6895 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
00020c16
ILT
6896 no) PKGVERSION= ;;
6897 *) PKGVERSION="($withval) " ;;
6898 esac
6899else
6900 PKGVERSION="(GCC) "
6901
5213506e 6902fi
00020c16
ILT
6903
6904
6905
6906
5213506e
RW
6907
6908# Check whether --with-bugurl was given.
6909if test "${with_bugurl+set}" = set; then :
6910 withval=$with_bugurl; case "$withval" in
6911 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
00020c16
ILT
6912 no) BUGURL=
6913 ;;
6914 *) BUGURL="$withval"
6915 ;;
6916 esac
6917else
6918 BUGURL="http://gcc.gnu.org/bugs.html"
6919
5213506e
RW
6920fi
6921
00020c16
ILT
6922 case ${BUGURL} in
6923 "")
6924 REPORT_BUGS_TO=
6925 REPORT_BUGS_TEXI=
6926 ;;
6927 *)
6928 REPORT_BUGS_TO="<$BUGURL>"
6929 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6930 ;;
6931 esac;
6932
6933
6934
6935
6936# Sanity check enable_languages in case someone does not run the toplevel
6937# configure # script.
5213506e
RW
6938# Check whether --enable-languages was given.
6939if test "${enable_languages+set}" = set; then :
6940 enableval=$enable_languages; case ,${enable_languages}, in
00020c16
ILT
6941 ,,|,yes,)
6942 # go safe -- we cannot be much sure without the toplevel
6943 # configure's
6944 # analysis of which target libs are present and usable
6945 enable_languages=c
6946 ;;
6947 *,all,*)
5213506e 6948 as_fn_error "only the toplevel supports --enable-languages=all" "$LINENO" 5
00020c16
ILT
6949 ;;
6950 *,c,*)
6951 ;;
6952 *)
6953 enable_languages=c,${enable_languages}
6954 ;;
6955esac
6956else
6957 enable_languages=c
5213506e
RW
6958fi
6959
00020c16 6960
00020c16 6961
5213506e
RW
6962# Check whether --with-multilib-list was given.
6963if test "${with_multilib_list+set}" = set; then :
6964 withval=$with_multilib_list; :
00020c16
ILT
6965else
6966 with_multilib_list=default
5213506e
RW
6967fi
6968
00020c16
ILT
6969
6970# -------------------------
6971# Checks for other programs
6972# -------------------------
6973
5213506e
RW
6974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6975$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6976set x ${MAKE-make}
6977ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6978if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
6979 $as_echo_n "(cached) " >&6
00020c16
ILT
6980else
6981 cat >conftest.make <<\_ACEOF
5213506e 6982SHELL = /bin/sh
00020c16 6983all:
5213506e 6984 @echo '@@@%%%=$(MAKE)=@@@%%%'
00020c16
ILT
6985_ACEOF
6986# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5213506e
RW
6987case `${MAKE-make} -f conftest.make 2>/dev/null` in
6988 *@@@%%%=?*=@@@%%%*)
6989 eval ac_cv_prog_make_${ac_make}_set=yes;;
6990 *)
6991 eval ac_cv_prog_make_${ac_make}_set=no;;
6992esac
00020c16
ILT
6993rm -f conftest.make
6994fi
5213506e
RW
6995if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6997$as_echo "yes" >&6; }
00020c16 6998 SET_MAKE=
73458fb7 6999else
5213506e
RW
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7001$as_echo "no" >&6; }
00020c16 7002 SET_MAKE="MAKE=${MAKE-make}"
73458fb7
NN
7003fi
7004
7c27e184 7005
00020c16
ILT
7006# Find some useful tools
7007for ac_prog in gawk mawk nawk awk
7c27e184
PB
7008do
7009 # Extract the first word of "$ac_prog", so it can be a program name with args.
7010set dummy $ac_prog; ac_word=$2
5213506e
RW
7011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7012$as_echo_n "checking for $ac_word... " >&6; }
7013if test "${ac_cv_prog_AWK+set}" = set; then :
7014 $as_echo_n "(cached) " >&6
73458fb7 7015else
00020c16
ILT
7016 if test -n "$AWK"; then
7017 ac_cv_prog_AWK="$AWK" # Let the user override the test.
73458fb7 7018else
ba479fd2
NN
7019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7020for as_dir in $PATH
7021do
7022 IFS=$as_save_IFS
7023 test -z "$as_dir" && as_dir=.
5213506e
RW
7024 for ac_exec_ext in '' $ac_executable_extensions; do
7025 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7026 ac_cv_prog_AWK="$ac_prog"
5213506e 7027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7028 break 2
7029 fi
7030done
5213506e
RW
7031 done
7032IFS=$as_save_IFS
ba479fd2 7033
73458fb7
NN
7034fi
7035fi
00020c16
ILT
7036AWK=$ac_cv_prog_AWK
7037if test -n "$AWK"; then
5213506e
RW
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7039$as_echo "$AWK" >&6; }
73458fb7 7040else
5213506e
RW
7041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042$as_echo "no" >&6; }
73458fb7
NN
7043fi
7044
5213506e 7045
00020c16 7046 test -n "$AWK" && break
7c27e184 7047done
7c27e184 7048
00020c16
ILT
7049# We need awk to create options.c and options.h.
7050# Bail out if it's missing.
7051case ${AWK} in
5213506e 7052 "") as_fn_error "can't build without awk, bailing out" "$LINENO" 5 ;;
00020c16 7053esac
73458fb7 7054
5213506e
RW
7055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7056$as_echo_n "checking whether ln -s works... " >&6; }
7057if test "${gcc_cv_prog_LN_S+set}" = set; then :
7058 $as_echo_n "(cached) " >&6
00020c16
ILT
7059else
7060 rm -f conftestdata_t
7061echo >conftestdata_f
7062if ln -s conftestdata_f conftestdata_t 2>/dev/null
7063then
7064 gcc_cv_prog_LN_S="ln -s"
7065else
7066 if ln conftestdata_f conftestdata_t 2>/dev/null
7067 then
7068 gcc_cv_prog_LN_S=ln
7069 else
7070 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7071 then
7072 gcc_cv_prog_LN_S="cp -p"
7073 else
7074 gcc_cv_prog_LN_S=cp
7075 fi
7076 fi
7077fi
7078rm -f conftestdata_f conftestdata_t
7079
7080fi
7081LN_S="$gcc_cv_prog_LN_S"
7082if test "$gcc_cv_prog_LN_S" = "ln -s"; then
5213506e
RW
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7084$as_echo "yes" >&6; }
00020c16
ILT
7085else
7086 if test "$gcc_cv_prog_LN_S" = "ln"; then
5213506e
RW
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using ln" >&5
7088$as_echo "no, using ln" >&6; }
00020c16 7089 else
5213506e
RW
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7091$as_echo "no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; }
00020c16
ILT
7092 fi
7093fi
7094
5213506e
RW
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5
7096$as_echo_n "checking whether ln works... " >&6; }
7097if test "${acx_cv_prog_LN+set}" = set; then :
7098 $as_echo_n "(cached) " >&6
00020c16
ILT
7099else
7100 rm -f conftestdata_t
7101echo >conftestdata_f
7102if ln conftestdata_f conftestdata_t 2>/dev/null
7103then
7104 acx_cv_prog_LN=ln
7105else
7106 acx_cv_prog_LN=no
7107fi
7108rm -f conftestdata_f conftestdata_t
7109
7110fi
7111if test $acx_cv_prog_LN = no; then
7112 LN="$LN_S"
5213506e
RW
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN" >&5
7114$as_echo "no, using $LN" >&6; }
00020c16
ILT
7115else
7116 LN="$acx_cv_prog_LN"
5213506e
RW
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7118$as_echo "yes" >&6; }
00020c16
ILT
7119fi
7120
7121if test -n "$ac_tool_prefix"; then
7122 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7123set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
7124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125$as_echo_n "checking for $ac_word... " >&6; }
7126if test "${ac_cv_prog_RANLIB+set}" = set; then :
7127 $as_echo_n "(cached) " >&6
73458fb7 7128else
00020c16
ILT
7129 if test -n "$RANLIB"; then
7130 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
73458fb7 7131else
ba479fd2
NN
7132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7133for as_dir in $PATH
7134do
7135 IFS=$as_save_IFS
7136 test -z "$as_dir" && as_dir=.
5213506e
RW
7137 for ac_exec_ext in '' $ac_executable_extensions; do
7138 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7139 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 7140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
ba479fd2
NN
7141 break 2
7142 fi
7143done
5213506e
RW
7144 done
7145IFS=$as_save_IFS
ba479fd2 7146
73458fb7
NN
7147fi
7148fi
00020c16
ILT
7149RANLIB=$ac_cv_prog_RANLIB
7150if test -n "$RANLIB"; then
5213506e
RW
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7152$as_echo "$RANLIB" >&6; }
73458fb7 7153else
5213506e
RW
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155$as_echo "no" >&6; }
73458fb7
NN
7156fi
7157
5213506e 7158
00020c16
ILT
7159fi
7160if test -z "$ac_cv_prog_RANLIB"; then
7161 ac_ct_RANLIB=$RANLIB
7162 # Extract the first word of "ranlib", so it can be a program name with args.
7163set dummy ranlib; ac_word=$2
5213506e
RW
7164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7165$as_echo_n "checking for $ac_word... " >&6; }
7166if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7167 $as_echo_n "(cached) " >&6
f6a874ac 7168else
00020c16
ILT
7169 if test -n "$ac_ct_RANLIB"; then
7170 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
f6a874ac
JW
7171else
7172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7173for as_dir in $PATH
7174do
7175 IFS=$as_save_IFS
7176 test -z "$as_dir" && as_dir=.
5213506e
RW
7177 for ac_exec_ext in '' $ac_executable_extensions; do
7178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7179 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 7180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7181 break 2
7182 fi
7183done
5213506e
RW
7184 done
7185IFS=$as_save_IFS
f6a874ac 7186
f6a874ac
JW
7187fi
7188fi
00020c16
ILT
7189ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7190if test -n "$ac_ct_RANLIB"; then
5213506e
RW
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7192$as_echo "$ac_ct_RANLIB" >&6; }
f6a874ac 7193else
5213506e
RW
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195$as_echo "no" >&6; }
f6a874ac
JW
7196fi
7197
5213506e
RW
7198 if test "x$ac_ct_RANLIB" = x; then
7199 RANLIB=":"
7200 else
7201 case $cross_compiling:$ac_tool_warned in
7202yes:)
7203{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7204$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7205ac_tool_warned=yes ;;
7206esac
7207 RANLIB=$ac_ct_RANLIB
7208 fi
00020c16
ILT
7209else
7210 RANLIB="$ac_cv_prog_RANLIB"
f6a874ac
JW
7211fi
7212
00020c16
ILT
7213case "${host}" in
7214*-*-darwin*)
7215 # By default, the Darwin ranlib will not treat common symbols as
7216 # definitions when building the archive table of contents. Other
7217 # ranlibs do that; pass an option to the Darwin ranlib that makes
7218 # it behave similarly.
7219 ranlib_flags="-c"
7220 ;;
7221*)
7222 ranlib_flags=""
7223esac
7224
7225
7226# Find a good install program. We prefer a C program (faster),
7227# so one script is as good as another. But avoid the broken or
7228# incompatible versions:
7229# SysV /etc/install, /usr/sbin/install
7230# SunOS /usr/etc/install
7231# IRIX /sbin/install
7232# AIX /bin/install
7233# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7234# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7235# ./install, which can be erroneously created by make from ./install.sh.
5213506e
RW
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD compatible install" >&5
7237$as_echo_n "checking for a BSD compatible install... " >&6; }
00020c16 7238if test -z "$INSTALL"; then
5213506e
RW
7239if test "${ac_cv_path_install+set}" = set; then :
7240 $as_echo_n "(cached) " >&6
f6a874ac 7241else
00020c16
ILT
7242 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7243 for ac_dir in $PATH; do
7244 # Account for people who put trailing slashes in PATH elements.
7245 case "$ac_dir/" in
7246 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7247 *)
7248 # OSF1 and SCO ODT 3.0 have their own names for install.
7249 for ac_prog in ginstall scoinst install; do
7250 if test -f $ac_dir/$ac_prog; then
7251 if test $ac_prog = install &&
7252 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7253 # AIX install. It has an incompatible calling convention.
7254 # OSF/1 installbsd also uses dspmsg, but is usable.
7255 :
7256 else
7257 ac_cv_path_install="$ac_dir/$ac_prog -c"
7258 break 2
7259 fi
7260 fi
7261 done
7262 ;;
7263 esac
7264 done
7265 IFS="$ac_save_IFS"
7266
7267fi
7268 if test "${ac_cv_path_install+set}" = set; then
7269 INSTALL="$ac_cv_path_install"
7270 else
7271 # As a last resort, use the slow shell script. We don't cache a
7272 # path for INSTALL within a source directory, because that will
7273 # break other packages using the cache if that directory is
7274 # removed, or if the path is relative.
7275 INSTALL="$ac_install_sh"
7276 fi
7277fi
5213506e
RW
7278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7279$as_echo "$INSTALL" >&6; }
00020c16
ILT
7280
7281# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7282# It thinks the first close brace ends the variable substitution.
7283test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7284
7285test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7286
7287
7288# See if cmp has --ignore-initial.
5213506e
RW
7289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmp's capabilities" >&5
7290$as_echo_n "checking for cmp's capabilities... " >&6; }
7291if test "${gcc_cv_prog_cmp_skip+set}" = set; then :
7292 $as_echo_n "(cached) " >&6
00020c16
ILT
7293else
7294 echo abfoo >t1
7295 echo cdfoo >t2
7296 gcc_cv_prog_cmp_skip=slowcompare
7297 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7298 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
7299 :
7300 else
7301 gcc_cv_prog_cmp_skip=gnucompare
7302 fi
7303 fi
7304 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7305 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7306 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7307 :
7308 else
7309 gcc_cv_prog_cmp_skip=fastcompare
7310 fi
7311 fi
7312 fi
7313 rm t1 t2
7314
7315fi
5213506e
RW
7316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
7317$as_echo "$gcc_cv_prog_cmp_skip" >&6; }
00020c16
ILT
7318make_compare_target=$gcc_cv_prog_cmp_skip
7319
7320
7321
7322# See if we have the mktemp command.
7323# Extract the first word of "mktemp", so it can be a program name with args.
7324set dummy mktemp; ac_word=$2
5213506e
RW
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7326$as_echo_n "checking for $ac_word... " >&6; }
7327if test "${ac_cv_prog_have_mktemp_command+set}" = set; then :
7328 $as_echo_n "(cached) " >&6
f6a874ac 7329else
00020c16
ILT
7330 if test -n "$have_mktemp_command"; then
7331 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
f6a874ac
JW
7332else
7333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7334for as_dir in $PATH
7335do
7336 IFS=$as_save_IFS
7337 test -z "$as_dir" && as_dir=.
5213506e
RW
7338 for ac_exec_ext in '' $ac_executable_extensions; do
7339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7340 ac_cv_prog_have_mktemp_command="yes"
5213506e 7341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
f6a874ac
JW
7342 break 2
7343 fi
7344done
5213506e
RW
7345 done
7346IFS=$as_save_IFS
f6a874ac 7347
00020c16 7348 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
f6a874ac
JW
7349fi
7350fi
00020c16
ILT
7351have_mktemp_command=$ac_cv_prog_have_mktemp_command
7352if test -n "$have_mktemp_command"; then
5213506e
RW
7353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mktemp_command" >&5
7354$as_echo "$have_mktemp_command" >&6; }
f6a874ac 7355else
5213506e
RW
7356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357$as_echo "no" >&6; }
f6a874ac
JW
7358fi
7359
f6a874ac 7360
5213506e 7361
00020c16
ILT
7362# See if makeinfo has been installed and is modern enough
7363# that we can use it.
ca9bc441 7364
00020c16
ILT
7365 # Extract the first word of "makeinfo", so it can be a program name with args.
7366set dummy makeinfo; ac_word=$2
5213506e
RW
7367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7368$as_echo_n "checking for $ac_word... " >&6; }
7369if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
7370 $as_echo_n "(cached) " >&6
956d6950 7371else
00020c16
ILT
7372 if test -n "$MAKEINFO"; then
7373 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
956d6950 7374else
00020c16
ILT
7375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376for as_dir in $PATH
7377do
7378 IFS=$as_save_IFS
7379 test -z "$as_dir" && as_dir=.
5213506e
RW
7380 for ac_exec_ext in '' $ac_executable_extensions; do
7381 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7382 ac_cv_prog_MAKEINFO="makeinfo"
5213506e 7383 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7384 break 2
7385 fi
7386done
5213506e
RW
7387 done
7388IFS=$as_save_IFS
ba479fd2 7389
956d6950 7390fi
00020c16
ILT
7391fi
7392MAKEINFO=$ac_cv_prog_MAKEINFO
7393if test -n "$MAKEINFO"; then
5213506e
RW
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7395$as_echo "$MAKEINFO" >&6; }
956d6950 7396else
5213506e
RW
7397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398$as_echo "no" >&6; }
956d6950 7399fi
956d6950 7400
5213506e 7401
00020c16
ILT
7402 if test -n "$MAKEINFO"; then
7403 # Found it, now check the version.
5213506e
RW
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern makeinfo" >&5
7405$as_echo_n "checking for modern makeinfo... " >&6; }
7406if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then :
7407 $as_echo_n "(cached) " >&6
00020c16
ILT
7408else
7409 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
7410 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
956d6950 7411
00020c16
ILT
7412 case $ac_prog_version in
7413 '') gcc_cv_prog_makeinfo_modern=no;;
7414 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
7415 *) gcc_cv_prog_makeinfo_modern=no;;
7416 esac
ba479fd2 7417
956d6950 7418fi
5213506e
RW
7419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_makeinfo_modern" >&5
7420$as_echo "$gcc_cv_prog_makeinfo_modern" >&6; }
00020c16
ILT
7421 else
7422 gcc_cv_prog_makeinfo_modern=no
7423 fi
7424 if test $gcc_cv_prog_makeinfo_modern = no; then
7425 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
7426 fi
956d6950 7427
00020c16 7428if test $gcc_cv_prog_makeinfo_modern = no; then
5213506e 7429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
00020c16
ILT
7430*** Makeinfo is missing or too old.
7431*** Info documentation will not be built." >&5
5213506e 7432$as_echo "$as_me: WARNING:
00020c16
ILT
7433*** Makeinfo is missing or too old.
7434*** Info documentation will not be built." >&2;}
7435 BUILD_INFO=
7436else
7437 BUILD_INFO=info
956d6950
JL
7438fi
7439
63cf211a 7440
00020c16 7441# Is pod2man recent enough to regenerate manpages?
5213506e
RW
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent Pod::Man" >&5
7443$as_echo_n "checking for recent Pod::Man... " >&6; }
00020c16 7444if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
5213506e
RW
7445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7446$as_echo "yes" >&6; }
00020c16 7447 GENERATED_MANPAGES=generated-manpages
956d6950 7448else
5213506e
RW
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
00020c16 7451 GENERATED_MANPAGES=
956d6950 7452fi
ba479fd2 7453
956d6950 7454
00020c16 7455MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
956d6950 7456
00020c16
ILT
7457# How about lex?
7458for ac_prog in flex
7459do
7460 # Extract the first word of "$ac_prog", so it can be a program name with args.
7461set dummy $ac_prog; ac_word=$2
5213506e
RW
7462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7463$as_echo_n "checking for $ac_word... " >&6; }
7464if test "${ac_cv_prog_FLEX+set}" = set; then :
7465 $as_echo_n "(cached) " >&6
956d6950 7466else
00020c16
ILT
7467 if test -n "$FLEX"; then
7468 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
956d6950 7469else
00020c16
ILT
7470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7471for as_dir in $PATH
7472do
7473 IFS=$as_save_IFS
7474 test -z "$as_dir" && as_dir=.
5213506e
RW
7475 for ac_exec_ext in '' $ac_executable_extensions; do
7476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7477 ac_cv_prog_FLEX="$ac_prog"
5213506e 7478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7479 break 2
7480 fi
7481done
5213506e
RW
7482 done
7483IFS=$as_save_IFS
ba479fd2 7484
956d6950 7485fi
956d6950 7486fi
00020c16
ILT
7487FLEX=$ac_cv_prog_FLEX
7488if test -n "$FLEX"; then
5213506e
RW
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
7490$as_echo "$FLEX" >&6; }
00020c16 7491else
5213506e
RW
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7493$as_echo "no" >&6; }
00020c16 7494fi
ba479fd2 7495
5213506e 7496
00020c16
ILT
7497 test -n "$FLEX" && break
7498done
7499test -n "$FLEX" || FLEX="$MISSING flex"
7500
7501
7502# Bison?
7503for ac_prog in bison
7504do
7505 # Extract the first word of "$ac_prog", so it can be a program name with args.
7506set dummy $ac_prog; ac_word=$2
5213506e
RW
7507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7508$as_echo_n "checking for $ac_word... " >&6; }
7509if test "${ac_cv_prog_BISON+set}" = set; then :
7510 $as_echo_n "(cached) " >&6
00020c16
ILT
7511else
7512 if test -n "$BISON"; then
7513 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7514else
7515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7516for as_dir in $PATH
7517do
7518 IFS=$as_save_IFS
7519 test -z "$as_dir" && as_dir=.
5213506e
RW
7520 for ac_exec_ext in '' $ac_executable_extensions; do
7521 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7522 ac_cv_prog_BISON="$ac_prog"
5213506e 7523 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7524 break 2
7525 fi
7526done
5213506e
RW
7527 done
7528IFS=$as_save_IFS
956d6950 7529
00020c16
ILT
7530fi
7531fi
7532BISON=$ac_cv_prog_BISON
7533if test -n "$BISON"; then
5213506e
RW
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7535$as_echo "$BISON" >&6; }
00020c16 7536else
5213506e
RW
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7538$as_echo "no" >&6; }
956d6950
JL
7539fi
7540
5213506e 7541
00020c16
ILT
7542 test -n "$BISON" && break
7543done
7544test -n "$BISON" || BISON="$MISSING bison"
7545
7546
7547# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7548# check for build == host before using them.
7549
7550# NM
7551if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7552 && test -d ../binutils ; then
bfa912a8 7553 NM='${objdir}/../binutils/nm-new'
00020c16
ILT
7554else
7555 # Extract the first word of "nm", so it can be a program name with args.
7556set dummy nm; ac_word=$2
5213506e
RW
7557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7558$as_echo_n "checking for $ac_word... " >&6; }
7559if test "${ac_cv_prog_NM+set}" = set; then :
7560 $as_echo_n "(cached) " >&6
00020c16
ILT
7561else
7562 if test -n "$NM"; then
7563 ac_cv_prog_NM="$NM" # Let the user override the test.
7564else
7565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568 IFS=$as_save_IFS
7569 test -z "$as_dir" && as_dir=.
5213506e
RW
7570 for ac_exec_ext in '' $ac_executable_extensions; do
7571 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7572 ac_cv_prog_NM="nm"
5213506e 7573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7574 break 2
7575 fi
7576done
5213506e
RW
7577 done
7578IFS=$as_save_IFS
00020c16
ILT
7579
7580 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7581fi
7582fi
7583NM=$ac_cv_prog_NM
7584if test -n "$NM"; then
5213506e
RW
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
7586$as_echo "$NM" >&6; }
00020c16 7587else
5213506e
RW
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
00020c16
ILT
7590fi
7591
5213506e 7592
00020c16
ILT
7593fi
7594
7595# AR
7596if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7597 && test -d ../binutils ; then
bfa912a8 7598 AR='${objdir}/../binutils/ar'
00020c16
ILT
7599else
7600 # Extract the first word of "ar", so it can be a program name with args.
7601set dummy ar; ac_word=$2
5213506e
RW
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7603$as_echo_n "checking for $ac_word... " >&6; }
7604if test "${ac_cv_prog_AR+set}" = set; then :
7605 $as_echo_n "(cached) " >&6
00020c16
ILT
7606else
7607 if test -n "$AR"; then
7608 ac_cv_prog_AR="$AR" # Let the user override the test.
7609else
7610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613 IFS=$as_save_IFS
7614 test -z "$as_dir" && as_dir=.
5213506e
RW
7615 for ac_exec_ext in '' $ac_executable_extensions; do
7616 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
00020c16 7617 ac_cv_prog_AR="ar"
5213506e 7618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
00020c16
ILT
7619 break 2
7620 fi
7621done
5213506e
RW
7622 done
7623IFS=$as_save_IFS
00020c16
ILT
7624
7625 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7626fi
7627fi
7628AR=$ac_cv_prog_AR
7629if test -n "$AR"; then
5213506e
RW
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7631$as_echo "$AR" >&6; }
00020c16 7632else
5213506e
RW
7633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7634$as_echo "no" >&6; }
00020c16
ILT
7635fi
7636
5213506e 7637
00020c16
ILT
7638fi
7639
7640
7641# --------------------
7642# Checks for C headers
7643# --------------------
7644
7645# Need to reject headers which give warnings, so that the -Werror bootstrap
7646# works later. *sigh* This needs to come before all header checks.
7647
7648ac_c_preproc_warn_flag=yes
7649
5213506e
RW
7650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7651$as_echo_n "checking for ANSI C header files... " >&6; }
7652if test "${ac_cv_header_stdc+set}" = set; then :
7653 $as_echo_n "(cached) " >&6
18fc9bd4 7654else
5213506e 7655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4 7656/* end confdefs.h. */
00020c16
ILT
7657#include <stdlib.h>
7658#include <stdarg.h>
18fc9bd4 7659#include <string.h>
00020c16
ILT
7660#include <float.h>
7661
18fc9bd4
RG
7662int
7663main ()
7664{
7665
7666 ;
7667 return 0;
7668}
7669_ACEOF
5213506e 7670if ac_fn_c_try_compile "$LINENO"; then :
00020c16 7671 ac_cv_header_stdc=yes
18fc9bd4 7672else
5213506e 7673 ac_cv_header_stdc=no
18fc9bd4 7674fi
5213506e 7675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 7676
00020c16
ILT
7677if test $ac_cv_header_stdc = yes; then
7678 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5213506e 7679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7680/* end confdefs.h. */
7681#include <string.h>
7682
18fc9bd4 7683_ACEOF
00020c16 7684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7685 $EGREP "memchr" >/dev/null 2>&1; then :
7686
00020c16
ILT
7687else
7688 ac_cv_header_stdc=no
7689fi
7690rm -f conftest*
18fc9bd4
RG
7691
7692fi
7693
00020c16
ILT
7694if test $ac_cv_header_stdc = yes; then
7695 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5213506e 7696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 7697/* end confdefs.h. */
00020c16
ILT
7698#include <stdlib.h>
7699
7700_ACEOF
7701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e
RW
7702 $EGREP "free" >/dev/null 2>&1; then :
7703
00020c16
ILT
7704else
7705 ac_cv_header_stdc=no
7706fi
7707rm -f conftest*
7708
7709fi
7710
7711if test $ac_cv_header_stdc = yes; then
7712 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213506e 7713 if test "$cross_compiling" = yes; then :
00020c16
ILT
7714 :
7715else
5213506e 7716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7717/* end confdefs.h. */
7718#include <ctype.h>
5213506e 7719#include <stdlib.h>
00020c16
ILT
7720#if ((' ' & 0x0FF) == 0x020)
7721# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7722# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7723#else
7724# define ISLOWER(c) \
7725 (('a' <= (c) && (c) <= 'i') \
7726 || ('j' <= (c) && (c) <= 'r') \
7727 || ('s' <= (c) && (c) <= 'z'))
7728# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7729#endif
7730
7731#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7732int
7733main ()
7734{
7735 int i;
7736 for (i = 0; i < 256; i++)
7737 if (XOR (islower (i), ISLOWER (i))
7738 || toupper (i) != TOUPPER (i))
5213506e
RW
7739 return 2;
7740 return 0;
00020c16
ILT
7741}
7742_ACEOF
5213506e 7743if ac_fn_c_try_run "$LINENO"; then :
00020c16 7744
5213506e
RW
7745else
7746 ac_cv_header_stdc=no
00020c16 7747fi
5213506e
RW
7748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7749 conftest.$ac_objext conftest.beam conftest.$ac_ext
00020c16 7750fi
5213506e 7751
00020c16
ILT
7752fi
7753fi
5213506e
RW
7754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7755$as_echo "$ac_cv_header_stdc" >&6; }
00020c16
ILT
7756if test $ac_cv_header_stdc = yes; then
7757
5213506e 7758$as_echo "#define STDC_HEADERS 1" >>confdefs.h
00020c16
ILT
7759
7760fi
7761
5213506e
RW
7762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
7763$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
7764if test "${ac_cv_header_time+set}" = set; then :
7765 $as_echo_n "(cached) " >&6
00020c16 7766else
5213506e 7767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7768/* end confdefs.h. */
7769#include <sys/types.h>
7770#include <sys/time.h>
7771#include <time.h>
7772
7773int
7774main ()
7775{
7776if ((struct tm *) 0)
7777return 0;
7778 ;
7779 return 0;
7780}
7781_ACEOF
5213506e 7782if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7783 ac_cv_header_time=yes
7784else
5213506e 7785 ac_cv_header_time=no
00020c16 7786fi
5213506e 7787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7788fi
5213506e
RW
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
7790$as_echo "$ac_cv_header_time" >&6; }
00020c16
ILT
7791if test $ac_cv_header_time = yes; then
7792
5213506e 7793$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
00020c16
ILT
7794
7795fi
7796
5213506e
RW
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
7798$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
7799if test "${gcc_cv_header_string+set}" = set; then :
7800 $as_echo_n "(cached) " >&6
00020c16 7801else
5213506e 7802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7803/* end confdefs.h. */
7804#include <string.h>
7805#include <strings.h>
7806int
7807main ()
7808{
7809
7810 ;
7811 return 0;
7812}
7813_ACEOF
5213506e 7814if ac_fn_c_try_compile "$LINENO"; then :
00020c16
ILT
7815 gcc_cv_header_string=yes
7816else
5213506e 7817 gcc_cv_header_string=no
00020c16 7818fi
5213506e 7819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7820fi
5213506e
RW
7821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5
7822$as_echo "$gcc_cv_header_string" >&6; }
00020c16
ILT
7823if test $gcc_cv_header_string = yes; then
7824
5213506e 7825$as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h
00020c16
ILT
7826
7827fi
7828
5213506e
RW
7829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7830$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7831if test "${ac_cv_header_sys_wait_h+set}" = set; then :
7832 $as_echo_n "(cached) " >&6
00020c16 7833else
5213506e 7834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
7835/* end confdefs.h. */
7836#include <sys/types.h>
7837#include <sys/wait.h>
7838#ifndef WEXITSTATUS
5213506e 7839# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
e9831ca0
KG
7840#endif
7841#ifndef WIFEXITED
ba479fd2 7842# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 7843#endif
ba479fd2
NN
7844
7845int
7846main ()
7847{
7848 int s;
7849 wait (&s);
5213506e
RW
7850 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7851 ;
7852 return 0;
7853}
7854_ACEOF
7855if ac_fn_c_try_compile "$LINENO"; then :
7856 ac_cv_header_sys_wait_h=yes
7857else
7858 ac_cv_header_sys_wait_h=no
7859fi
7860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7861fi
7862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7863$as_echo "$ac_cv_header_sys_wait_h" >&6; }
7864if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2 7865
5213506e 7866$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
ba479fd2 7867
5213506e 7868fi
dfb77e37
KC
7869
7870for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 7871 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 7872 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 7873 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
5213506e
RW
7874do :
7875 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7876ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
7877eval as_val=\$$as_ac_Header
7878 if test "x$as_val" = x""yes; then :
ba479fd2 7879 cat >>confdefs.h <<_ACEOF
5213506e 7880#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
ba479fd2
NN
7881_ACEOF
7882
956d6950
JL
7883fi
7884done
7885
7886
f24af81b 7887# Check for thread headers.
5213506e
RW
7888ac_fn_c_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h"
7889if test "x$ac_cv_header_thread_h" = x""yes; then :
f24af81b
TT
7890 have_thread_h=yes
7891else
ba479fd2 7892 have_thread_h=
f24af81b
TT
7893fi
7894
5213506e
RW
7895ac_fn_c_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h"
7896if test "x$ac_cv_header_pthread_h" = x""yes; then :
f24af81b
TT
7897 have_pthread_h=yes
7898else
ba479fd2 7899 have_pthread_h=
f24af81b
TT
7900fi
7901
7902
84c041a1 7903# These tests can't be done till we know if we have limits.h.
5213506e
RW
7904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHAR_BIT" >&5
7905$as_echo_n "checking for CHAR_BIT... " >&6; }
7906if test "${gcc_cv_decl_char_bit+set}" = set; then :
7907 $as_echo_n "(cached) " >&6
ba479fd2 7908else
5213506e 7909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 7910/* end confdefs.h. */
75e93faa
ZW
7911#ifdef HAVE_LIMITS_H
7912#include <limits.h>
7913#endif
7914#ifdef CHAR_BIT
7915found
7916#endif
ba479fd2 7917_ACEOF
75e93faa 7918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5213506e 7919 $EGREP "found" >/dev/null 2>&1; then :
75e93faa
ZW
7920 gcc_cv_decl_char_bit=yes
7921else
75e93faa
ZW
7922 gcc_cv_decl_char_bit=no
7923fi
7924rm -f conftest*
7925
7926
7927fi
5213506e
RW
7928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_char_bit" >&5
7929$as_echo "$gcc_cv_decl_char_bit" >&6; }
75e93faa 7930if test $gcc_cv_decl_char_bit = no; then
5213506e
RW
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of bits in a byte" >&5
7932$as_echo_n "checking number of bits in a byte... " >&6; }
7933if test "${gcc_cv_c_nbby+set}" = set; then :
7934 $as_echo_n "(cached) " >&6
75e93faa
ZW
7935else
7936 i=8
7937 gcc_cv_c_nbby=
7938 while test $i -lt 65; do
5213506e 7939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
7940/* end confdefs.h. */
7941
7942int
7943main ()
7944{
4e70264f
ZW
7945switch(0) {
7946 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
7947 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
7948 ; }
ba479fd2
NN
7949 ;
7950 return 0;
7951}
7952_ACEOF
5213506e 7953if ac_fn_c_try_compile "$LINENO"; then :
4e70264f 7954 gcc_cv_c_nbby=$i; break
75e93faa 7955fi
5213506e 7956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
7957 i=`expr $i + 1`
7958 done
7959 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
7960
7961fi
5213506e
RW
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_nbby" >&5
7963$as_echo "$gcc_cv_c_nbby" >&6; }
75e93faa 7964if test $gcc_cv_c_nbby = failed; then
5213506e 7965 as_fn_error "cannot determine number of bits in a byte" "$LINENO" 5
75e93faa 7966else
ba479fd2
NN
7967
7968cat >>confdefs.h <<_ACEOF
75e93faa 7969#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 7970_ACEOF
75e93faa
ZW
7971
7972fi
7973fi
5213506e
RW
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7975$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
7976if test "${ac_cv_c_bigendian+set}" = set; then :
7977 $as_echo_n "(cached) " >&6
84c041a1 7978else
5213506e
RW
7979 ac_cv_c_bigendian=unknown
7980 # See if we're dealing with a universal compiler.
7981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7982/* end confdefs.h. */
7983#ifndef __APPLE_CC__
7984 not a universal capable compiler
7985 #endif
7986 typedef int dummy;
7987
7988_ACEOF
7989if ac_fn_c_try_compile "$LINENO"; then :
7990
7991 # Check for potential -arch flags. It is not universal unless
7992 # there are at least two -arch flags with different values.
7993 ac_arch=
7994 ac_prev=
7995 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7996 if test -n "$ac_prev"; then
7997 case $ac_word in
7998 i?86 | x86_64 | ppc | ppc64)
7999 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8000 ac_arch=$ac_word
8001 else
8002 ac_cv_c_bigendian=universal
8003 break
8004 fi
8005 ;;
8006 esac
8007 ac_prev=
8008 elif test "x$ac_word" = "x-arch"; then
8009 ac_prev=arch
8010 fi
8011 done
8012fi
8013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8014 if test $ac_cv_c_bigendian = unknown; then
8015 # See if sys/param.h defines the BYTE_ORDER macro.
8016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8017/* end confdefs.h. */
4977bab6 8018#include <sys/types.h>
5213506e 8019 #include <sys/param.h>
9791c75c 8020
ba479fd2
NN
8021int
8022main ()
8023{
5213506e
RW
8024#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8025 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8026 && LITTLE_ENDIAN)
8027 bogus endian macros
8028 #endif
9791c75c 8029
ba479fd2
NN
8030 ;
8031 return 0;
8032}
8033_ACEOF
5213506e 8034if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6 8035 # It does; now see whether it defined to BIG_ENDIAN or not.
5213506e 8036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8037/* end confdefs.h. */
4977bab6 8038#include <sys/types.h>
5213506e 8039 #include <sys/param.h>
9791c75c 8040
ba479fd2
NN
8041int
8042main ()
8043{
4977bab6 8044#if BYTE_ORDER != BIG_ENDIAN
5213506e
RW
8045 not big endian
8046 #endif
9791c75c 8047
ba479fd2
NN
8048 ;
8049 return 0;
8050}
8051_ACEOF
5213506e 8052if ac_fn_c_try_compile "$LINENO"; then :
b61ff9c8
BS
8053 ac_cv_c_bigendian=yes
8054else
5213506e 8055 ac_cv_c_bigendian=no
4977bab6 8056fi
5213506e
RW
8057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8058fi
8059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8060 fi
8061 if test $ac_cv_c_bigendian = unknown; then
8062 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8064/* end confdefs.h. */
8065#include <limits.h>
ba479fd2 8066
5213506e
RW
8067int
8068main ()
8069{
8070#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8071 bogus endian macros
8072 #endif
8073
8074 ;
8075 return 0;
8076}
9791c75c 8077_ACEOF
5213506e
RW
8078if ac_fn_c_try_compile "$LINENO"; then :
8079 # It does; now see whether it defined to _BIG_ENDIAN or not.
8080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791c75c 8081/* end confdefs.h. */
5213506e
RW
8082#include <limits.h>
8083
9791c75c
KC
8084int
8085main ()
8086{
5213506e
RW
8087#ifndef _BIG_ENDIAN
8088 not big endian
8089 #endif
8090
9791c75c
KC
8091 ;
8092 return 0;
8093}
8094_ACEOF
5213506e 8095if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a 8096 ac_cv_c_bigendian=yes
5213506e
RW
8097else
8098 ac_cv_c_bigendian=no
8b1f719a 8099fi
5213506e 8100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9791c75c 8101fi
5213506e
RW
8102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8103 fi
8104 if test $ac_cv_c_bigendian = unknown; then
8105 # Compile a test program.
8106 if test "$cross_compiling" = yes; then :
8107 # Try to guess by grepping values from an object file.
8108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8109/* end confdefs.h. */
8110short int ascii_mm[] =
8111 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8112 short int ascii_ii[] =
8113 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8114 int use_ascii (int i) {
8115 return ascii_mm[i] + ascii_ii[i];
8116 }
8117 short int ebcdic_ii[] =
8118 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8119 short int ebcdic_mm[] =
8120 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8121 int use_ebcdic (int i) {
8122 return ebcdic_mm[i] + ebcdic_ii[i];
8123 }
8124 extern int foo;
9791c75c 8125
5213506e
RW
8126int
8127main ()
8128{
8129return use_ascii (foo) == use_ebcdic (foo);
8130 ;
8131 return 0;
8132}
8133_ACEOF
8134if ac_fn_c_try_compile "$LINENO"; then :
8135 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8136 ac_cv_c_bigendian=yes
8137 fi
8138 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8139 if test "$ac_cv_c_bigendian" = unknown; then
8140 ac_cv_c_bigendian=no
8141 else
8142 # finding both strings is unlikely to happen, but who knows?
8143 ac_cv_c_bigendian=unknown
8144 fi
8145 fi
4977bab6 8146fi
5213506e 8147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 8148else
5213506e 8149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8150/* end confdefs.h. */
5213506e 8151$ac_includes_default
9791c75c
KC
8152int
8153main ()
8154{
5213506e
RW
8155
8156 /* Are we little or big endian? From Harbison&Steele. */
8157 union
8158 {
8159 long int l;
8160 char c[sizeof (long int)];
8161 } u;
8162 u.l = 1;
8163 return u.c[sizeof (long int) - 1] == 1;
8164
8165 ;
8166 return 0;
4977bab6 8167}
ba479fd2 8168_ACEOF
5213506e 8169if ac_fn_c_try_run "$LINENO"; then :
4977bab6
ZW
8170 ac_cv_c_bigendian=no
8171else
5213506e 8172 ac_cv_c_bigendian=yes
4977bab6 8173fi
5213506e
RW
8174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8175 conftest.$ac_objext conftest.beam conftest.$ac_ext
4977bab6 8176fi
ba479fd2 8177
5213506e
RW
8178 fi
8179fi
8180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
8181$as_echo "$ac_cv_c_bigendian" >&6; }
8182 case $ac_cv_c_bigendian in #(
8183 yes)
8184 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
8185;; #(
8186 no)
8187 ;; #(
8188 universal)
8189
8190$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8191
8192 ;; #(
8193 *)
8194 as_fn_error "unknown endianness
8195 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8196 esac
84c041a1 8197
75e93faa 8198
73458fb7
NN
8199# --------
8200# UNSORTED
8201# --------
1e608388 8202
1e608388 8203
4e70264f
ZW
8204# These libraries may be used by collect2.
8205# We may need a special search path to get them linked.
5213506e
RW
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5
8207$as_echo_n "checking for collect2 libraries... " >&6; }
8208if test "${gcc_cv_collect2_libs+set}" = set; then :
8209 $as_echo_n "(cached) " >&6
4e70264f
ZW
8210else
8211 save_LIBS="$LIBS"
7f2749d4 8212for libs in '' -lld -lmld \
4e70264f
ZW
8213 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8214 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8215do
8216 LIBS="$libs"
5213506e 8217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2
NN
8218/* end confdefs.h. */
8219
5213506e
RW
8220/* Override any GCC internal prototype to avoid an error.
8221 Use char because int might match the return type of a GCC
8222 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8223#ifdef __cplusplus
8224extern "C"
8225#endif
ba479fd2
NN
8226char ldopen ();
8227int
8228main ()
8229{
5213506e 8230return ldopen ();
ba479fd2
NN
8231 ;
8232 return 0;
8233}
8234_ACEOF
5213506e 8235if ac_fn_c_try_link "$LINENO"; then :
4e70264f 8236 gcc_cv_collect2_libs="$libs"; break
4e70264f 8237fi
5213506e
RW
8238rm -f core conftest.err conftest.$ac_objext \
8239 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8240done
8241LIBS="$save_LIBS"
8242test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8243fi
5213506e
RW
8244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_collect2_libs" >&5
8245$as_echo "$gcc_cv_collect2_libs" >&6; }
4e70264f
ZW
8246case $gcc_cv_collect2_libs in
8247 "none required") ;;
8248 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8249esac
8250
8251
7f2749d4
RK
8252# When building Ada code on Alpha, we need exc_resume which is usually in
8253# -lexc. So test for it.
8254save_LIBS="$LIBS"
8255LIBS=
5213506e
RW
8256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing exc_resume" >&5
8257$as_echo_n "checking for library containing exc_resume... " >&6; }
8258if test "${ac_cv_search_exc_resume+set}" = set; then :
8259 $as_echo_n "(cached) " >&6
ba479fd2
NN
8260else
8261 ac_func_search_save_LIBS=$LIBS
5213506e 8262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8263/* end confdefs.h. */
7f2749d4 8264
5213506e
RW
8265/* Override any GCC internal prototype to avoid an error.
8266 Use char because int might match the return type of a GCC
b61ff9c8 8267 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8268#ifdef __cplusplus
8269extern "C"
8270#endif
b61ff9c8
BS
8271char exc_resume ();
8272int
8273main ()
8274{
5213506e 8275return exc_resume ();
b61ff9c8
BS
8276 ;
8277 return 0;
8278}
8279_ACEOF
5213506e
RW
8280for ac_lib in '' exc; do
8281 if test -z "$ac_lib"; then
8282 ac_res="none required"
8283 else
8284 ac_res=-l$ac_lib
8285 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8286 fi
8287 if ac_fn_c_try_link "$LINENO"; then :
8288 ac_cv_search_exc_resume=$ac_res
b8ec3cc8 8289fi
5213506e
RW
8290rm -f core conftest.err conftest.$ac_objext \
8291 conftest$ac_exeext
8292 if test "${ac_cv_search_exc_resume+set}" = set; then :
8293 break
b8ec3cc8 8294fi
5213506e
RW
8295done
8296if test "${ac_cv_search_exc_resume+set}" = set; then :
8297
dd7f7a6e 8298else
5213506e
RW
8299 ac_cv_search_exc_resume=no
8300fi
8301rm conftest.$ac_ext
8302LIBS=$ac_func_search_save_LIBS
8303fi
8304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_exc_resume" >&5
8305$as_echo "$ac_cv_search_exc_resume" >&6; }
8306ac_res=$ac_cv_search_exc_resume
8307if test "$ac_res" != no; then :
8308 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e 8309
1a4b763e 8310fi
5213506e
RW
8311
8312GNAT_LIBEXC="$LIBS"
8313LIBS="$save_LIBS"
8314
8315
8316# Some systems put ldexp and frexp in libm instead of libc; assume
8317# they're both in the same place. jcf-dump needs them.
8318save_LIBS="$LIBS"
8319LIBS=
8320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5
8321$as_echo_n "checking for library containing ldexp... " >&6; }
8322if test "${ac_cv_search_ldexp+set}" = set; then :
8323 $as_echo_n "(cached) " >&6
8324else
8325 ac_func_search_save_LIBS=$LIBS
8326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b61ff9c8 8327/* end confdefs.h. */
2f41c1d6 8328
5213506e
RW
8329/* Override any GCC internal prototype to avoid an error.
8330 Use char because int might match the return type of a GCC
8331 builtin and then its argument prototype would still apply. */
b61ff9c8
BS
8332#ifdef __cplusplus
8333extern "C"
8334#endif
b61ff9c8
BS
8335char ldexp ();
8336int
8337main ()
8338{
5213506e 8339return ldexp ();
b61ff9c8
BS
8340 ;
8341 return 0;
8342}
8343_ACEOF
5213506e
RW
8344for ac_lib in '' m; do
8345 if test -z "$ac_lib"; then
8346 ac_res="none required"
8347 else
8348 ac_res=-l$ac_lib
8349 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8350 fi
8351 if ac_fn_c_try_link "$LINENO"; then :
8352 ac_cv_search_ldexp=$ac_res
b61ff9c8 8353fi
5213506e
RW
8354rm -f core conftest.err conftest.$ac_objext \
8355 conftest$ac_exeext
8356 if test "${ac_cv_search_ldexp+set}" = set; then :
8357 break
8358fi
8359done
8360if test "${ac_cv_search_ldexp+set}" = set; then :
8361
8362else
8363 ac_cv_search_ldexp=no
dd7f7a6e 8364fi
5213506e 8365rm conftest.$ac_ext
dd7f7a6e
EC
8366LIBS=$ac_func_search_save_LIBS
8367fi
5213506e
RW
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5
8369$as_echo "$ac_cv_search_ldexp" >&6; }
8370ac_res=$ac_cv_search_ldexp
8371if test "$ac_res" != no; then :
8372 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
8373
8374fi
8375
8376LDEXP_LIB="$LIBS"
8377LIBS="$save_LIBS"
8378
8379
8380# Use <inttypes.h> only if it exists,
8381# doesn't clash with <sys/types.h>, and declares intmax_t.
5213506e
RW
8382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8383$as_echo_n "checking for inttypes.h... " >&6; }
8384if test "${gcc_cv_header_inttypes_h+set}" = set; then :
8385 $as_echo_n "(cached) " >&6
dd7f7a6e 8386else
5213506e 8387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd7f7a6e
EC
8388/* end confdefs.h. */
8389#include <sys/types.h>
8390#include <inttypes.h>
8391int
8392main ()
8393{
8394intmax_t i = -1;
8395 ;
8396 return 0;
8397}
8398_ACEOF
5213506e 8399if ac_fn_c_try_compile "$LINENO"; then :
dd7f7a6e
EC
8400 gcc_cv_header_inttypes_h=yes
8401else
5213506e 8402 gcc_cv_header_inttypes_h=no
dd7f7a6e 8403fi
5213506e 8404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
8405fi
8406
5213506e
RW
8407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_inttypes_h" >&5
8408$as_echo "$gcc_cv_header_inttypes_h" >&6; }
dd7f7a6e
EC
8409if test $gcc_cv_header_inttypes_h = yes; then
8410
5213506e 8411$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h
dd7f7a6e 8412
0056a9b5 8413fi
956d6950 8414
c149cc37 8415
ba479fd2 8416
52a6edcc 8417for ac_func in times clock kill getrlimit setrlimit atoll atoq \
d2e506f2 8418 sysconf strsignal getrusage nl_langinfo \
0d667716
KG
8419 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
8420 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
8421do :
8422 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8423ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8424eval as_val=\$$as_ac_var
8425 if test "x$as_val" = x""yes; then :
ba479fd2 8426 cat >>confdefs.h <<_ACEOF
5213506e 8427#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2 8428_ACEOF
956d6950 8429
956d6950
JL
8430fi
8431done
8432
6885fc87 8433
8ccb78f2
RO
8434save_CPPFLAGS="$CPPFLAGS"
8435save_LIBS="$LIBS"
8436LIBS="$LIBS $LIBELFLIBS"
8437for ac_func in elf_getshdrstrndx
8438do :
8439 ac_fn_c_check_func "$LINENO" "elf_getshdrstrndx" "ac_cv_func_elf_getshdrstrndx"
8440if test "x$ac_cv_func_elf_getshdrstrndx" = x""yes; then :
8441 cat >>confdefs.h <<_ACEOF
8442#define HAVE_ELF_GETSHDRSTRNDX 1
8443_ACEOF
8444
8445else
8446 for ac_func in elf_getshstrndx
8447do :
8448 ac_fn_c_check_func "$LINENO" "elf_getshstrndx" "ac_cv_func_elf_getshstrndx"
8449if test "x$ac_cv_func_elf_getshstrndx" = x""yes; then :
8450 cat >>confdefs.h <<_ACEOF
8451#define HAVE_ELF_GETSHSTRNDX 1
8452_ACEOF
8453 if test "$cross_compiling" = yes; then :
8454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8456as_fn_error "cannot run test program while cross compiling
8457See \`config.log' for more details." "$LINENO" 5; }
8458else
8459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8460/* end confdefs.h. */
8461#include <stdlib.h>
8462#include <libelf.h>
8463int main()
8464{
8465 return elf_getshstrndx (NULL, 0) == 0;
479881c3 8466}
8ccb78f2
RO
8467_ACEOF
8468if ac_fn_c_try_run "$LINENO"; then :
8469
479881c3
RG
8470$as_echo "#define HAVE_ELF_GETSHSTRNDX_GABI 1" >>confdefs.h
8471
8ccb78f2
RO
8472fi
8473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8474 conftest.$ac_objext conftest.beam conftest.$ac_ext
8475fi
8476
8477fi
8478done
8479
8480
8481fi
8482done
8483
8484LIBS="$save_LIBS"
8485CPPFLAGS="$save_CPPFLAGS"
8486
39f6c4c8 8487if test x$ac_cv_func_mbstowcs = xyes; then
5213506e
RW
8488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbstowcs works" >&5
8489$as_echo_n "checking whether mbstowcs works... " >&6; }
8490if test "${gcc_cv_func_mbstowcs_works+set}" = set; then :
8491 $as_echo_n "(cached) " >&6
39f6c4c8 8492else
5213506e 8493 if test "$cross_compiling" = yes; then :
39f6c4c8
KW
8494 gcc_cv_func_mbstowcs_works=yes
8495else
5213506e 8496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8497/* end confdefs.h. */
39f6c4c8
KW
8498#include <stdlib.h>
8499int main()
8500{
8501 mbstowcs(0, "", 0);
8502 return 0;
8503}
ba479fd2 8504_ACEOF
5213506e 8505if ac_fn_c_try_run "$LINENO"; then :
39f6c4c8
KW
8506 gcc_cv_func_mbstowcs_works=yes
8507else
5213506e 8508 gcc_cv_func_mbstowcs_works=no
39f6c4c8 8509fi
5213506e
RW
8510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8511 conftest.$ac_objext conftest.beam conftest.$ac_ext
39f6c4c8 8512fi
5213506e 8513
39f6c4c8 8514fi
5213506e
RW
8515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mbstowcs_works" >&5
8516$as_echo "$gcc_cv_func_mbstowcs_works" >&6; }
63cf211a 8517 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2 8518
5213506e 8519$as_echo "#define HAVE_WORKING_MBSTOWCS 1" >>confdefs.h
39f6c4c8
KW
8520
8521 fi
8522fi
8523
5213506e
RW
8524ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
8525if test "x$ac_cv_type_ssize_t" = x""yes; then :
6e3f3080 8526
8b4fc07a 8527else
ba479fd2 8528
8b4fc07a 8529cat >>confdefs.h <<_ACEOF
f12bc141 8530#define ssize_t int
ba479fd2 8531_ACEOF
f12bc141
ZW
8532
8533fi
8534
5213506e
RW
8535ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
8536if test "x$ac_cv_type_caddr_t" = x""yes; then :
bba09b5a 8537
bba09b5a
AT
8538else
8539
8540cat >>confdefs.h <<_ACEOF
8541#define caddr_t char *
8542_ACEOF
8543
8544fi
8545
0b9d02c6 8546
3b0727a0 8547
5213506e
RW
8548ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h"
8549if test "x$ac_cv_header_sys_mman_h" = x""yes; then :
3b0727a0
MR
8550 gcc_header_sys_mman_h=yes
8551else
8552 gcc_header_sys_mman_h=no
8553fi
5213506e
RW
8554
8555ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
8556if test "x$ac_cv_func_mmap" = x""yes; then :
3b0727a0
MR
8557 gcc_func_mmap=yes
8558else
8559 gcc_func_mmap=no
8560fi
8561
8562if test "$gcc_header_sys_mman_h" != yes \
8563 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
8564 gcc_cv_func_mmap_file=no
8565 gcc_cv_func_mmap_dev_zero=no
8566 gcc_cv_func_mmap_anon=no
8567else
5213506e
RW
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read-only mmap of a plain file works" >&5
8569$as_echo_n "checking whether read-only mmap of a plain file works... " >&6; }
8570if test "${gcc_cv_func_mmap_file+set}" = set; then :
8571 $as_echo_n "(cached) " >&6
1072ec3f 8572else
ba479fd2 8573 # Add a system to this blacklist if
1072ec3f
ZW
8574 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
8575 # memory area containing the same data that you'd get if you applied
8576 # read() to the same fd. The only system known to have a problem here
8577 # is VMS, where text files have record structure.
8578 case "$host_os" in
ba479fd2 8579 vms* | ultrix*)
1072ec3f
ZW
8580 gcc_cv_func_mmap_file=no ;;
8581 *)
8582 gcc_cv_func_mmap_file=yes;;
8583 esac
8584fi
5213506e
RW
8585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_file" >&5
8586$as_echo "$gcc_cv_func_mmap_file" >&6; }
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap from /dev/zero works" >&5
8588$as_echo_n "checking whether mmap from /dev/zero works... " >&6; }
8589if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then :
8590 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8591else
8592 # Add a system to this blacklist if it has mmap() but /dev/zero
8593 # does not exist, or if mmapping /dev/zero does not give anonymous
8594 # zeroed pages with both the following properties:
8595 # 1. If you map N consecutive pages in with one call, and then
8596 # unmap any subset of those pages, the pages that were not
8597 # explicitly unmapped remain accessible.
8598 # 2. If you map two adjacent blocks of memory and then unmap them
8599 # both at once, they must both go away.
8600 # Systems known to be in this category are Windows (all variants),
8601 # VMS, and Darwin.
8602 case "$host_os" in
2ce240d3 8603 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
8604 gcc_cv_func_mmap_dev_zero=no ;;
8605 *)
8606 gcc_cv_func_mmap_dev_zero=yes;;
8607 esac
8608fi
5213506e
RW
8609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_dev_zero" >&5
8610$as_echo "$gcc_cv_func_mmap_dev_zero" >&6; }
1072ec3f
ZW
8611
8612 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
5213506e
RW
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5
8614$as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; }
8615if test "${gcc_cv_decl_map_anon+set}" = set; then :
8616 $as_echo_n "(cached) " >&6
ba479fd2 8617else
5213506e 8618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8619/* end confdefs.h. */
1072ec3f
ZW
8620#include <sys/types.h>
8621#include <sys/mman.h>
8622#include <unistd.h>
8623
8624#ifndef MAP_ANONYMOUS
8625#define MAP_ANONYMOUS MAP_ANON
8626#endif
8627
ba479fd2
NN
8628int
8629main ()
8630{
1072ec3f 8631int n = MAP_ANONYMOUS;
ba479fd2
NN
8632 ;
8633 return 0;
8634}
8635_ACEOF
5213506e 8636if ac_fn_c_try_compile "$LINENO"; then :
1072ec3f
ZW
8637 gcc_cv_decl_map_anon=yes
8638else
5213506e 8639 gcc_cv_decl_map_anon=no
1072ec3f 8640fi
5213506e 8641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 8642fi
5213506e
RW
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_decl_map_anon" >&5
8644$as_echo "$gcc_cv_decl_map_anon" >&6; }
1072ec3f
ZW
8645
8646 if test $gcc_cv_decl_map_anon = no; then
8647 gcc_cv_func_mmap_anon=no
8648 else
5213506e
RW
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5
8650$as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; }
8651if test "${gcc_cv_func_mmap_anon+set}" = set; then :
8652 $as_echo_n "(cached) " >&6
1072ec3f
ZW
8653else
8654 # Add a system to this blacklist if it has mmap() and MAP_ANON or
8655 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
8656 # doesn't give anonymous zeroed pages with the same properties listed
8657 # above for use of /dev/zero.
8658 # Systems known to be in this category are Windows, VMS, and SCO Unix.
8659 case "$host_os" in
8660 vms* | cygwin* | pe | mingw* | sco* | udk* )
8661 gcc_cv_func_mmap_anon=no ;;
8662 *)
8663 gcc_cv_func_mmap_anon=yes;;
8664 esac
8665fi
5213506e
RW
8666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_func_mmap_anon" >&5
8667$as_echo "$gcc_cv_func_mmap_anon" >&6; }
1072ec3f
ZW
8668 fi
8669fi
8670
8671if test $gcc_cv_func_mmap_file = yes; then
ba479fd2 8672
5213506e 8673$as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h
1072ec3f
ZW
8674
8675fi
8676if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2 8677
5213506e 8678$as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h
1072ec3f
ZW
8679
8680fi
8681if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2 8682
5213506e 8683$as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h
1072ec3f
ZW
8684
8685fi
8686
b27d2bd5
MK
8687
8688case "${host}" in
ee262b6f 8689*-*-*vms*)
ba479fd2 8690 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
8691 # won't work, and it isn't easily adaptable. It makes more sense to
8692 # just force it.
8693 ac_cv_func_vfork_works=yes
8694 ;;
b27d2bd5 8695esac
5213506e
RW
8696ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8697if test "x$ac_cv_type_pid_t" = x""yes; then :
6e3f3080 8698
ba479fd2
NN
8699else
8700
8701cat >>confdefs.h <<_ACEOF
c375c43b 8702#define pid_t int
ba479fd2 8703_ACEOF
c375c43b
KG
8704
8705fi
8706
5213506e
RW
8707for ac_header in vfork.h
8708do :
8709 ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h"
8710if test "x$ac_cv_header_vfork_h" = x""yes; then :
ba479fd2 8711 cat >>confdefs.h <<_ACEOF
5213506e 8712#define HAVE_VFORK_H 1
ba479fd2 8713_ACEOF
6e3f3080
NN
8714
8715fi
ba479fd2
NN
8716done
8717
ba479fd2 8718for ac_func in fork vfork
5213506e
RW
8719do :
8720 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8721ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8722eval as_val=\$$as_ac_var
8723 if test "x$as_val" = x""yes; then :
ba479fd2 8724 cat >>confdefs.h <<_ACEOF
5213506e 8725#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ba479fd2
NN
8726_ACEOF
8727
c375c43b 8728fi
ba479fd2 8729done
c375c43b 8730
ba479fd2 8731if test "x$ac_cv_func_fork" = xyes; then
5213506e
RW
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8733$as_echo_n "checking for working fork... " >&6; }
8734if test "${ac_cv_func_fork_works+set}" = set; then :
8735 $as_echo_n "(cached) " >&6
c375c43b 8736else
5213506e 8737 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8738 ac_cv_func_fork_works=cross
8739else
5213506e
RW
8740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741/* end confdefs.h. */
8742$ac_includes_default
8743int
8744main ()
8745{
8746
8747 /* By Ruediger Kuhlmann. */
8748 return fork () < 0;
8749
8750 ;
8751 return 0;
8752}
1a4b763e 8753_ACEOF
5213506e 8754if ac_fn_c_try_run "$LINENO"; then :
ba479fd2
NN
8755 ac_cv_func_fork_works=yes
8756else
5213506e 8757 ac_cv_func_fork_works=no
ba479fd2 8758fi
5213506e
RW
8759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8760 conftest.$ac_objext conftest.beam conftest.$ac_ext
ba479fd2 8761fi
5213506e 8762
ba479fd2 8763fi
5213506e
RW
8764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8765$as_echo "$ac_cv_func_fork_works" >&6; }
ba479fd2
NN
8766
8767else
8768 ac_cv_func_fork_works=$ac_cv_func_fork
8769fi
8770if test "x$ac_cv_func_fork_works" = xcross; then
8771 case $host in
8772 *-*-amigaos* | *-*-msdosdjgpp*)
8773 # Override, as these systems have only a dummy fork() stub
8774 ac_cv_func_fork_works=no
8775 ;;
8776 *)
8777 ac_cv_func_fork_works=yes
8778 ;;
8779 esac
5213506e
RW
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8781$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 8782fi
c375c43b 8783ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 8784if test "x$ac_cv_func_vfork" = xyes; then
5213506e
RW
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8786$as_echo_n "checking for working vfork... " >&6; }
8787if test "${ac_cv_func_vfork_works+set}" = set; then :
8788 $as_echo_n "(cached) " >&6
c375c43b 8789else
5213506e 8790 if test "$cross_compiling" = yes; then :
ba479fd2
NN
8791 ac_cv_func_vfork_works=cross
8792else
5213506e 8793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 8794/* end confdefs.h. */
c375c43b 8795/* Thanks to Paul Eggert for this test. */
5213506e 8796$ac_includes_default
ba479fd2 8797#include <sys/wait.h>
5213506e 8798#ifdef HAVE_VFORK_H
ba479fd2 8799# include <vfork.h>
c375c43b
KG
8800#endif
8801/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
8802 argument registers are propagated back to the parent. The compiler
8803 is told about this with #include <vfork.h>, but some compilers
8804 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8805 static variable whose address is put into a register that is
8806 clobbered by the vfork. */
8807static void
c375c43b
KG
8808#ifdef __cplusplus
8809sparc_address_test (int arg)
ba479fd2 8810# else
c375c43b
KG
8811sparc_address_test (arg) int arg;
8812#endif
8813{
8814 static pid_t child;
8815 if (!child) {
8816 child = vfork ();
8817 if (child < 0) {
8818 perror ("vfork");
8819 _exit(2);
8820 }
8821 if (!child) {
8822 arg = getpid();
8823 write(-1, "", 0);
8824 _exit (arg);
8825 }
8826 }
8827}
ba479fd2
NN
8828
8829int
8830main ()
8831{
c375c43b
KG
8832 pid_t parent = getpid ();
8833 pid_t child;
8834
ba479fd2 8835 sparc_address_test (0);
c375c43b
KG
8836
8837 child = vfork ();
8838
8839 if (child == 0) {
ba479fd2
NN
8840 /* Here is another test for sparc vfork register problems. This
8841 test uses lots of local variables, at least as many local
8842 variables as main has allocated so far including compiler
8843 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8844 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8845 reuse the register of parent for one of the local variables,
8846 since it will think that parent can't possibly be used any more
8847 in this routine. Assigning to the local variable will thus
8848 munge parent in the parent process. */
c375c43b
KG
8849 pid_t
8850 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8851 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8852 /* Convince the compiler that p..p7 are live; otherwise, it might
8853 use the same hardware register for all 8 local variables. */
8854 if (p != p1 || p != p2 || p != p3 || p != p4
8855 || p != p5 || p != p6 || p != p7)
8856 _exit(1);
8857
ba479fd2
NN
8858 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8859 from child file descriptors. If the child closes a descriptor
8860 before it execs or exits, this munges the parent's descriptor
8861 as well. Test for this by closing stdout in the child. */
c375c43b
KG
8862 _exit(close(fileno(stdout)) != 0);
8863 } else {
8864 int status;
8865 struct stat st;
8866
8867 while (wait(&status) != child)
8868 ;
5213506e 8869 return (
c375c43b
KG
8870 /* Was there some problem with vforking? */
8871 child < 0
8872
8873 /* Did the child fail? (This shouldn't happen.) */
8874 || status
8875
8876 /* Did the vfork/compiler bug occur? */
8877 || parent != getpid()
8878
8879 /* Did the file descriptor bug occur? */
8880 || fstat(fileno(stdout), &st) != 0
8881 );
8882 }
8883}
ba479fd2 8884_ACEOF
5213506e 8885if ac_fn_c_try_run "$LINENO"; then :
c375c43b
KG
8886 ac_cv_func_vfork_works=yes
8887else
5213506e 8888 ac_cv_func_vfork_works=no
cafe096b 8889fi
5213506e
RW
8890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8891 conftest.$ac_objext conftest.beam conftest.$ac_ext
6e3f3080 8892fi
5213506e 8893
ba479fd2 8894fi
5213506e
RW
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8896$as_echo "$ac_cv_func_vfork_works" >&6; }
c375c43b 8897
ba479fd2
NN
8898fi;
8899if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 8900 ac_cv_func_vfork_works=$ac_cv_func_vfork
5213506e
RW
8901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8902$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
8903fi
8904
ba479fd2
NN
8905if test "x$ac_cv_func_vfork_works" = xyes; then
8906
5213506e 8907$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
ba479fd2
NN
8908
8909else
8910
5213506e 8911$as_echo "#define vfork fork" >>confdefs.h
c375c43b
KG
8912
8913fi
ba479fd2
NN
8914if test "x$ac_cv_func_fork_works" = xyes; then
8915
5213506e 8916$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
ba479fd2
NN
8917
8918fi
8919
c375c43b 8920
81bf3d9e 8921
dfb77e37
KC
8922 if test "X$prefix" = "XNONE"; then
8923 acl_final_prefix="$ac_default_prefix"
8924 else
8925 acl_final_prefix="$prefix"
8926 fi
8927 if test "X$exec_prefix" = "XNONE"; then
8928 acl_final_exec_prefix='${prefix}'
8929 else
8930 acl_final_exec_prefix="$exec_prefix"
8931 fi
8932 acl_save_prefix="$prefix"
8933 prefix="$acl_final_prefix"
8934 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8935 prefix="$acl_save_prefix"
f91abfce
TT
8936
8937
5213506e
RW
8938# Check whether --with-gnu-ld was given.
8939if test "${with_gnu_ld+set}" = set; then :
8940 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
ba479fd2 8941else
dfb77e37 8942 with_gnu_ld=no
5213506e
RW
8943fi
8944
dfb77e37
KC
8945# Prepare PATH_SEPARATOR.
8946# The user is always right.
8947if test "${PATH_SEPARATOR+set}" != set; then
8948 echo "#! /bin/sh" >conf$$.sh
8949 echo "exit 0" >>conf$$.sh
8950 chmod +x conf$$.sh
8951 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8952 PATH_SEPARATOR=';'
ba479fd2 8953 else
dfb77e37 8954 PATH_SEPARATOR=:
ba479fd2 8955 fi
dfb77e37
KC
8956 rm -f conf$$.sh
8957fi
8958ac_prog=ld
8959if test "$GCC" = yes; then
8960 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8962$as_echo_n "checking for ld used by GCC... " >&6; }
dfb77e37
KC
8963 case $host in
8964 *-*-mingw*)
8965 # gcc leaves a trailing carriage return which upsets mingw
8966 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8967 *)
8968 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8969 esac
8970 case $ac_prog in
8971 # Accept absolute paths.
8972 [\\/]* | [A-Za-z]:[\\/]*)
8973 re_direlt='/[^/][^/]*/\.\./'
8974 # Canonicalize the path of ld
8975 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8976 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8977 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8978 done
8979 test -z "$LD" && LD="$ac_prog"
8980 ;;
8981 "")
8982 # If it fails, then pretend we aren't using GCC.
8983 ac_prog=ld
8984 ;;
8985 *)
8986 # If it is relative, then search for the first ld in PATH.
8987 with_gnu_ld=unknown
8988 ;;
8989 esac
8990elif test "$with_gnu_ld" = yes; then
5213506e
RW
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8992$as_echo_n "checking for GNU ld... " >&6; }
ba479fd2 8993else
5213506e
RW
8994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8995$as_echo_n "checking for non-GNU ld... " >&6; }
ba479fd2 8996fi
5213506e
RW
8997if test "${acl_cv_path_LD+set}" = set; then :
8998 $as_echo_n "(cached) " >&6
ba479fd2 8999else
dfb77e37
KC
9000 if test -z "$LD"; then
9001 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9002 for ac_dir in $PATH; do
9003 test -z "$ac_dir" && ac_dir=.
9004 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9005 acl_cv_path_LD="$ac_dir/$ac_prog"
9006 # Check to see if the program is GNU ld. I'd rather use --version,
9007 # but apparently some GNU ld's only accept -v.
9008 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
9009 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9010 test "$with_gnu_ld" != no && break
9011 else
9012 test "$with_gnu_ld" != yes && break
9013 fi
dfb77e37
KC
9014 fi
9015 done
9016 IFS="$ac_save_ifs"
9017else
9018 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9019fi
9020fi
ba479fd2 9021
dfb77e37
KC
9022LD="$acl_cv_path_LD"
9023if test -n "$LD"; then
5213506e
RW
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9025$as_echo "$LD" >&6; }
dfb77e37 9026else
5213506e
RW
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028$as_echo "no" >&6; }
ba479fd2 9029fi
5213506e
RW
9030test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9032$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9033if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9034 $as_echo_n "(cached) " >&6
dfb77e37
KC
9035else
9036 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
9037if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9038 acl_cv_prog_gnu_ld=yes
9039else
9040 acl_cv_prog_gnu_ld=no
9041fi
dfb77e37 9042fi
5213506e
RW
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9044$as_echo "$acl_cv_prog_gnu_ld" >&6; }
dfb77e37
KC
9045with_gnu_ld=$acl_cv_prog_gnu_ld
9046
9047
9048
5213506e
RW
9049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9050$as_echo_n "checking for shared library run path origin... " >&6; }
9051if test "${acl_cv_rpath+set}" = set; then :
9052 $as_echo_n "(cached) " >&6
dfb77e37
KC
9053else
9054
9055 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9056 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9057 . ./conftest.sh
9058 rm -f ./conftest.sh
9059 acl_cv_rpath=done
ba479fd2 9060
eb158727 9061fi
5213506e
RW
9062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9063$as_echo "$acl_cv_rpath" >&6; }
dfb77e37
KC
9064 wl="$acl_cv_wl"
9065 libext="$acl_cv_libext"
9066 shlibext="$acl_cv_shlibext"
9067 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9068 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9069 hardcode_direct="$acl_cv_hardcode_direct"
9070 hardcode_minus_L="$acl_cv_hardcode_minus_L"
5213506e
RW
9071 # Check whether --enable-rpath was given.
9072if test "${enable_rpath+set}" = set; then :
9073 enableval=$enable_rpath; :
dfb77e37
KC
9074else
9075 enable_rpath=yes
5213506e
RW
9076fi
9077
8b1f719a 9078
a6ccdbab 9079
dfb77e37
KC
9080
9081
9082
9083
9084
b639c3c2
JJ
9085 use_additional=yes
9086
9087 acl_save_prefix="$prefix"
9088 prefix="$acl_final_prefix"
9089 acl_save_exec_prefix="$exec_prefix"
9090 exec_prefix="$acl_final_exec_prefix"
9091
9092 eval additional_includedir=\"$includedir\"
9093 eval additional_libdir=\"$libdir\"
9094
9095 exec_prefix="$acl_save_exec_prefix"
9096 prefix="$acl_save_prefix"
dfb77e37
KC
9097
9098
5213506e
RW
9099# Check whether --with-libiconv-prefix was given.
9100if test "${with_libiconv_prefix+set}" = set; then :
9101 withval=$with_libiconv_prefix;
8b1f719a 9102 if test "X$withval" = "Xno"; then
b639c3c2 9103 use_additional=no
8b1f719a
PB
9104 else
9105 if test "X$withval" = "X"; then
dfb77e37
KC
9106
9107 acl_save_prefix="$prefix"
9108 prefix="$acl_final_prefix"
9109 acl_save_exec_prefix="$exec_prefix"
9110 exec_prefix="$acl_final_exec_prefix"
9111
b639c3c2
JJ
9112 eval additional_includedir=\"$includedir\"
9113 eval additional_libdir=\"$libdir\"
dfb77e37
KC
9114
9115 exec_prefix="$acl_save_exec_prefix"
9116 prefix="$acl_save_prefix"
9117
8b1f719a 9118 else
b639c3c2
JJ
9119 additional_includedir="$withval/include"
9120 additional_libdir="$withval/lib"
8b1f719a
PB
9121 fi
9122 fi
9123
5213506e
RW
9124fi
9125
dfb77e37
KC
9126 LIBICONV=
9127 LTLIBICONV=
9128 INCICONV=
9129 rpathdirs=
9130 ltrpathdirs=
9131 names_already_handled=
9132 names_next_round='iconv '
9133 while test -n "$names_next_round"; do
9134 names_this_round="$names_next_round"
9135 names_next_round=
9136 for name in $names_this_round; do
9137 already_handled=
9138 for n in $names_already_handled; do
9139 if test "$n" = "$name"; then
9140 already_handled=yes
9141 break
9142 fi
9143 done
9144 if test -z "$already_handled"; then
9145 names_already_handled="$names_already_handled $name"
9146 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9147 eval value=\"\$HAVE_LIB$uppername\"
9148 if test -n "$value"; then
9149 if test "$value" = yes; then
9150 eval value=\"\$LIB$uppername\"
9151 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
9152 eval value=\"\$LTLIB$uppername\"
9153 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
9154 else
9155 :
9156 fi
9157 else
9158 found_dir=
9159 found_la=
9160 found_so=
9161 found_a=
b639c3c2
JJ
9162 if test $use_additional = yes; then
9163 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9164 found_dir="$additional_libdir"
9165 found_so="$additional_libdir/lib$name.$shlibext"
9166 if test -f "$additional_libdir/lib$name.la"; then
9167 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9168 fi
9169 else
b639c3c2
JJ
9170 if test -f "$additional_libdir/lib$name.$libext"; then
9171 found_dir="$additional_libdir"
9172 found_a="$additional_libdir/lib$name.$libext"
9173 if test -f "$additional_libdir/lib$name.la"; then
9174 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
9175 fi
9176 fi
9177 fi
9178 fi
9179 if test "X$found_dir" = "X"; then
9180 for x in $LDFLAGS $LTLIBICONV; do
9181
9182 acl_save_prefix="$prefix"
9183 prefix="$acl_final_prefix"
9184 acl_save_exec_prefix="$exec_prefix"
9185 exec_prefix="$acl_final_exec_prefix"
9186 eval x=\"$x\"
9187 exec_prefix="$acl_save_exec_prefix"
9188 prefix="$acl_save_prefix"
9189
9190 case "$x" in
9191 -L*)
9192 dir=`echo "X$x" | sed -e 's/^X-L//'`
9193 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9194 found_dir="$dir"
9195 found_so="$dir/lib$name.$shlibext"
9196 if test -f "$dir/lib$name.la"; then
9197 found_la="$dir/lib$name.la"
9198 fi
9199 else
9200 if test -f "$dir/lib$name.$libext"; then
9201 found_dir="$dir"
9202 found_a="$dir/lib$name.$libext"
9203 if test -f "$dir/lib$name.la"; then
9204 found_la="$dir/lib$name.la"
9205 fi
9206 fi
9207 fi
9208 ;;
9209 esac
9210 if test "X$found_dir" != "X"; then
9211 break
9212 fi
9213 done
9214 fi
9215 if test "X$found_dir" != "X"; then
9216 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
9217 if test "X$found_so" != "X"; then
9218 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9219 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9220 else
9221 haveit=
9222 for x in $ltrpathdirs; do
9223 if test "X$x" = "X$found_dir"; then
9224 haveit=yes
9225 break
9226 fi
9227 done
9228 if test -z "$haveit"; then
9229 ltrpathdirs="$ltrpathdirs $found_dir"
9230 fi
9231 if test "$hardcode_direct" = yes; then
9232 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9233 else
9234 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9235 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9236 haveit=
9237 for x in $rpathdirs; do
9238 if test "X$x" = "X$found_dir"; then
9239 haveit=yes
9240 break
9241 fi
9242 done
9243 if test -z "$haveit"; then
9244 rpathdirs="$rpathdirs $found_dir"
9245 fi
9246 else
9247 haveit=
9248 for x in $LDFLAGS $LIBICONV; do
9249
9250 acl_save_prefix="$prefix"
9251 prefix="$acl_final_prefix"
9252 acl_save_exec_prefix="$exec_prefix"
9253 exec_prefix="$acl_final_exec_prefix"
9254 eval x=\"$x\"
9255 exec_prefix="$acl_save_exec_prefix"
9256 prefix="$acl_save_prefix"
9257
9258 if test "X$x" = "X-L$found_dir"; then
9259 haveit=yes
9260 break
9261 fi
9262 done
9263 if test -z "$haveit"; then
9264 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
9265 fi
9266 if test "$hardcode_minus_L" != no; then
9267 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
9268 else
9269 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9270 fi
9271 fi
9272 fi
9273 fi
9274 else
9275 if test "X$found_a" != "X"; then
9276 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
9277 else
9278 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
9279 fi
9280 fi
9281 additional_includedir=
9282 case "$found_dir" in
9283 */lib | */lib/)
9284 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9285 additional_includedir="$basedir/include"
9286 ;;
9287 esac
9288 if test "X$additional_includedir" != "X"; then
9289 if test "X$additional_includedir" != "X/usr/include"; then
9290 haveit=
9291 if test "X$additional_includedir" = "X/usr/local/include"; then
9292 if test -n "$GCC"; then
9293 case $host_os in
18fc9bd4 9294 linux*) haveit=yes;;
dfb77e37
KC
9295 esac
9296 fi
9297 fi
9298 if test -z "$haveit"; then
9299 for x in $CPPFLAGS $INCICONV; do
9300
9301 acl_save_prefix="$prefix"
9302 prefix="$acl_final_prefix"
9303 acl_save_exec_prefix="$exec_prefix"
9304 exec_prefix="$acl_final_exec_prefix"
9305 eval x=\"$x\"
9306 exec_prefix="$acl_save_exec_prefix"
9307 prefix="$acl_save_prefix"
9308
9309 if test "X$x" = "X-I$additional_includedir"; then
9310 haveit=yes
9311 break
9312 fi
9313 done
9314 if test -z "$haveit"; then
9315 if test -d "$additional_includedir"; then
9316 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
9317 fi
9318 fi
9319 fi
9320 fi
9321 fi
9322 if test -n "$found_la"; then
9323 save_libdir="$libdir"
9324 case "$found_la" in
9325 */* | *\\*) . "$found_la" ;;
9326 *) . "./$found_la" ;;
9327 esac
9328 libdir="$save_libdir"
9329 for dep in $dependency_libs; do
9330 case "$dep" in
9331 -L*)
9332 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9333 if test "X$additional_libdir" != "X/usr/lib"; then
9334 haveit=
9335 if test "X$additional_libdir" = "X/usr/local/lib"; then
9336 if test -n "$GCC"; then
9337 case $host_os in
18fc9bd4 9338 linux*) haveit=yes;;
dfb77e37
KC
9339 esac
9340 fi
9341 fi
9342 if test -z "$haveit"; then
9343 haveit=
9344 for x in $LDFLAGS $LIBICONV; do
9345
9346 acl_save_prefix="$prefix"
9347 prefix="$acl_final_prefix"
9348 acl_save_exec_prefix="$exec_prefix"
9349 exec_prefix="$acl_final_exec_prefix"
9350 eval x=\"$x\"
9351 exec_prefix="$acl_save_exec_prefix"
9352 prefix="$acl_save_prefix"
9353
9354 if test "X$x" = "X-L$additional_libdir"; then
9355 haveit=yes
9356 break
9357 fi
9358 done
9359 if test -z "$haveit"; then
9360 if test -d "$additional_libdir"; then
9361 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
9362 fi
9363 fi
9364 haveit=
9365 for x in $LDFLAGS $LTLIBICONV; do
9366
9367 acl_save_prefix="$prefix"
9368 prefix="$acl_final_prefix"
9369 acl_save_exec_prefix="$exec_prefix"
9370 exec_prefix="$acl_final_exec_prefix"
9371 eval x=\"$x\"
9372 exec_prefix="$acl_save_exec_prefix"
9373 prefix="$acl_save_prefix"
9374
9375 if test "X$x" = "X-L$additional_libdir"; then
9376 haveit=yes
9377 break
9378 fi
9379 done
9380 if test -z "$haveit"; then
9381 if test -d "$additional_libdir"; then
9382 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
9383 fi
9384 fi
9385 fi
9386 fi
9387 ;;
9388 -R*)
9389 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9390 if test "$enable_rpath" != no; then
9391 haveit=
9392 for x in $rpathdirs; do
9393 if test "X$x" = "X$dir"; then
9394 haveit=yes
9395 break
9396 fi
9397 done
9398 if test -z "$haveit"; then
9399 rpathdirs="$rpathdirs $dir"
9400 fi
9401 haveit=
9402 for x in $ltrpathdirs; do
9403 if test "X$x" = "X$dir"; then
9404 haveit=yes
9405 break
9406 fi
9407 done
9408 if test -z "$haveit"; then
9409 ltrpathdirs="$ltrpathdirs $dir"
9410 fi
9411 fi
9412 ;;
9413 -l*)
9414 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9415 ;;
9416 *.la)
9417 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9418 ;;
9419 *)
9420 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
9421 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
9422 ;;
9423 esac
9424 done
9425 fi
9426 else
9427 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
9428 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
9429 fi
9430 fi
9431 fi
9432 done
9433 done
9434 if test "X$rpathdirs" != "X"; then
9435 if test -n "$hardcode_libdir_separator"; then
9436 alldirs=
9437 for found_dir in $rpathdirs; do
9438 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9439 done
9440 acl_save_libdir="$libdir"
9441 libdir="$alldirs"
9442 eval flag=\"$hardcode_libdir_flag_spec\"
9443 libdir="$acl_save_libdir"
9444 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9445 else
9446 for found_dir in $rpathdirs; do
9447 acl_save_libdir="$libdir"
9448 libdir="$found_dir"
9449 eval flag=\"$hardcode_libdir_flag_spec\"
9450 libdir="$acl_save_libdir"
9451 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
9452 done
9453 fi
9454 fi
9455 if test "X$ltrpathdirs" != "X"; then
9456 for found_dir in $ltrpathdirs; do
9457 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
9458 done
9459 fi
9460
9461
9462
9463
9464
9465
9466
9467 am_save_CPPFLAGS="$CPPFLAGS"
9468
9469 for element in $INCICONV; do
9470 haveit=
9471 for x in $CPPFLAGS; do
9472
9473 acl_save_prefix="$prefix"
9474 prefix="$acl_final_prefix"
9475 acl_save_exec_prefix="$exec_prefix"
9476 exec_prefix="$acl_final_exec_prefix"
9477 eval x=\"$x\"
9478 exec_prefix="$acl_save_exec_prefix"
9479 prefix="$acl_save_prefix"
9480
9481 if test "X$x" = "X$element"; then
9482 haveit=yes
9483 break
9484 fi
9485 done
9486 if test -z "$haveit"; then
9487 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9488 fi
9489 done
eb158727
ZW
9490
9491
5213506e
RW
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9493$as_echo_n "checking for iconv... " >&6; }
9494if test "${am_cv_func_iconv+set}" = set; then :
9495 $as_echo_n "(cached) " >&6
f91abfce 9496else
ba479fd2 9497
f91abfce
TT
9498 am_cv_func_iconv="no, consider installing GNU libiconv"
9499 am_cv_lib_iconv=no
5213506e 9500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9501/* end confdefs.h. */
f91abfce
TT
9502#include <stdlib.h>
9503#include <iconv.h>
ba479fd2
NN
9504int
9505main ()
9506{
f91abfce
TT
9507iconv_t cd = iconv_open("","");
9508 iconv(cd,NULL,NULL,NULL,NULL);
9509 iconv_close(cd);
ba479fd2
NN
9510 ;
9511 return 0;
9512}
9513_ACEOF
5213506e 9514if ac_fn_c_try_link "$LINENO"; then :
f91abfce 9515 am_cv_func_iconv=yes
f91abfce 9516fi
5213506e
RW
9517rm -f core conftest.err conftest.$ac_objext \
9518 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9519 if test "$am_cv_func_iconv" != yes; then
9520 am_save_LIBS="$LIBS"
dfb77e37 9521 LIBS="$LIBS $LIBICONV"
5213506e 9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9523/* end confdefs.h. */
f91abfce
TT
9524#include <stdlib.h>
9525#include <iconv.h>
ba479fd2
NN
9526int
9527main ()
9528{
f91abfce
TT
9529iconv_t cd = iconv_open("","");
9530 iconv(cd,NULL,NULL,NULL,NULL);
9531 iconv_close(cd);
ba479fd2
NN
9532 ;
9533 return 0;
9534}
9535_ACEOF
5213506e 9536if ac_fn_c_try_link "$LINENO"; then :
f91abfce
TT
9537 am_cv_lib_iconv=yes
9538 am_cv_func_iconv=yes
f91abfce 9539fi
5213506e
RW
9540rm -f core conftest.err conftest.$ac_objext \
9541 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
9542 LIBS="$am_save_LIBS"
9543 fi
6e3f3080 9544
ba479fd2 9545fi
5213506e
RW
9546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9547$as_echo "$am_cv_func_iconv" >&6; }
63cf211a 9548 if test "$am_cv_func_iconv" = yes; then
ba479fd2 9549
5213506e 9550$as_echo "#define HAVE_ICONV 1" >>confdefs.h
f91abfce 9551
dfb77e37
KC
9552 fi
9553 if test "$am_cv_lib_iconv" = yes; then
5213506e
RW
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
9555$as_echo_n "checking how to link with libiconv... " >&6; }
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
9557$as_echo "$LIBICONV" >&6; }
dfb77e37
KC
9558 else
9559 CPPFLAGS="$am_save_CPPFLAGS"
9560 LIBICONV=
9561 LTLIBICONV=
9562 fi
9563
9564
9565
9566 if test "$am_cv_func_iconv" = yes; then
5213506e
RW
9567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9568$as_echo_n "checking for iconv declaration... " >&6; }
9569 if test "${am_cv_proto_iconv+set}" = set; then :
9570 $as_echo_n "(cached) " >&6
f91abfce 9571else
ba479fd2 9572
5213506e 9573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9574/* end confdefs.h. */
f91abfce
TT
9575
9576#include <stdlib.h>
9577#include <iconv.h>
9578extern
9579#ifdef __cplusplus
9580"C"
9581#endif
9582#if defined(__STDC__) || defined(__cplusplus)
9583size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9584#else
9585size_t iconv();
9586#endif
9587
ba479fd2
NN
9588int
9589main ()
9590{
f91abfce 9591
ba479fd2
NN
9592 ;
9593 return 0;
9594}
9595_ACEOF
5213506e 9596if ac_fn_c_try_compile "$LINENO"; then :
f91abfce
TT
9597 am_cv_proto_iconv_arg1=""
9598else
5213506e 9599 am_cv_proto_iconv_arg1="const"
f91abfce 9600fi
5213506e 9601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
9602 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);"
9603fi
9604
9605 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5213506e 9606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
ba479fd2 9607 }$am_cv_proto_iconv" >&5
5213506e
RW
9608$as_echo "${ac_t:-
9609 }$am_cv_proto_iconv" >&6; }
ba479fd2
NN
9610
9611cat >>confdefs.h <<_ACEOF
f91abfce 9612#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 9613_ACEOF
f91abfce
TT
9614
9615 fi
f91abfce 9616
56694dd9
ZW
9617# Until we have in-tree GNU iconv:
9618LIBICONV_DEP=
9619
9620
18fc9bd4 9621
5213506e
RW
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9623$as_echo_n "checking for LC_MESSAGES... " >&6; }
9624if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9625 $as_echo_n "(cached) " >&6
18fc9bd4 9626else
5213506e 9627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18fc9bd4
RG
9628/* end confdefs.h. */
9629#include <locale.h>
9630int
9631main ()
9632{
9633return LC_MESSAGES
9634 ;
9635 return 0;
9636}
9637_ACEOF
5213506e 9638if ac_fn_c_try_link "$LINENO"; then :
18fc9bd4
RG
9639 am_cv_val_LC_MESSAGES=yes
9640else
5213506e 9641 am_cv_val_LC_MESSAGES=no
18fc9bd4 9642fi
5213506e
RW
9643rm -f core conftest.err conftest.$ac_objext \
9644 conftest$ac_exeext conftest.$ac_ext
18fc9bd4 9645fi
5213506e
RW
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9647$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
18fc9bd4
RG
9648 if test $am_cv_val_LC_MESSAGES = yes; then
9649
5213506e 9650$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
18fc9bd4
RG
9651
9652 fi
9653
f91abfce 9654
a03ea89b 9655
5213506e
RW
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9657$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9658if test "${am_cv_langinfo_codeset+set}" = set; then :
9659 $as_echo_n "(cached) " >&6
a03ea89b 9660else
5213506e 9661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a03ea89b
BM
9662/* end confdefs.h. */
9663#include <langinfo.h>
9664int
9665main ()
9666{
9667char* cs = nl_langinfo(CODESET);
9668 ;
9669 return 0;
9670}
9671_ACEOF
5213506e 9672if ac_fn_c_try_link "$LINENO"; then :
a03ea89b
BM
9673 am_cv_langinfo_codeset=yes
9674else
5213506e 9675 am_cv_langinfo_codeset=no
a03ea89b 9676fi
5213506e
RW
9677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext
a03ea89b
BM
9679
9680fi
5213506e
RW
9681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9682$as_echo "$am_cv_langinfo_codeset" >&6; }
a03ea89b
BM
9683 if test $am_cv_langinfo_codeset = yes; then
9684
5213506e 9685$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a03ea89b
BM
9686
9687 fi
9688
9689
86cf1cbd
KG
9690# We will need to find libiberty.h and ansidecl.h
9691saved_CFLAGS="$CFLAGS"
9692CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ed5b9f96
GK
9693for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
9694 strsignal strstr strverscmp \
9695 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 9696 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 9697do
5213506e
RW
9698 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9700$as_echo_n "checking whether $ac_func is declared... " >&6; }
9701if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9702 $as_echo_n "(cached) " >&6
9703else
9704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9705/* end confdefs.h. */
7afe8c41
KG
9706#undef $ac_tr_decl
9707#define $ac_tr_decl 1
ba479fd2 9708
d02af173 9709#include "ansidecl.h"
86cf1cbd 9710#include "system.h"
f31e826b 9711
ba479fd2
NN
9712int
9713main ()
9714{
86cf1cbd
KG
9715#ifndef $ac_func
9716char *(*pfn) = (char *(*)) $ac_func ;
9717#endif
ba479fd2 9718 ;
5213506e
RW
9719 return 0;
9720}
9721_ACEOF
9722if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9723 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9724else
5213506e 9725 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9726fi
5213506e 9727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9728fi
9729
f31e826b 9730if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9732$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9733#define $ac_tr_decl 1
ba479fd2
NN
9734_ACEOF
9735
81bf3d9e 9736else
5213506e
RW
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9739#define $ac_tr_decl 0
ba479fd2
NN
9740_ACEOF
9741
81bf3d9e
RH
9742fi
9743
9744done
ba479fd2 9745
ba479fd2 9746
81bf3d9e
RH
9747for ac_func in getrlimit setrlimit getrusage
9748do
5213506e
RW
9749 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9751$as_echo_n "checking whether $ac_func is declared... " >&6; }
9752if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9753 $as_echo_n "(cached) " >&6
9754else
9755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9756/* end confdefs.h. */
7afe8c41
KG
9757#undef $ac_tr_decl
9758#define $ac_tr_decl 1
ba479fd2 9759
d02af173 9760#include "ansidecl.h"
86cf1cbd 9761#include "system.h"
81bf3d9e
RH
9762#ifdef HAVE_SYS_RESOURCE_H
9763#include <sys/resource.h>
9764#endif
9765
f31e826b 9766
ba479fd2
NN
9767int
9768main ()
9769{
86cf1cbd
KG
9770#ifndef $ac_func
9771char *(*pfn) = (char *(*)) $ac_func ;
9772#endif
ba479fd2
NN
9773 ;
9774 return 0;
9775}
9776_ACEOF
5213506e 9777if ac_fn_c_try_compile "$LINENO"; then :
f31e826b 9778 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 9779else
5213506e 9780 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 9781fi
5213506e 9782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
9783fi
9784
f31e826b 9785if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9787$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 9788#define $ac_tr_decl 1
ba479fd2
NN
9789_ACEOF
9790
81bf3d9e 9791else
5213506e
RW
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9793$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 9794#define $ac_tr_decl 0
ba479fd2
NN
9795_ACEOF
9796
81bf3d9e
RH
9797fi
9798
9799done
86cf1cbd 9800
81bf3d9e 9801
5213506e 9802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9803/* end confdefs.h. */
b2522d2b
HPN
9804
9805#include "ansidecl.h"
9806#include "system.h"
9807#ifdef HAVE_SYS_RESOURCE_H
9808#include <sys/resource.h>
9809#endif
9810
ba479fd2
NN
9811int
9812main ()
9813{
b2522d2b 9814rlim_t l = 0;
ba479fd2
NN
9815 ;
9816 return 0;
9817}
9818_ACEOF
5213506e 9819if ac_fn_c_try_compile "$LINENO"; then :
ba479fd2 9820
5213506e 9821else
ba479fd2 9822
5213506e 9823$as_echo "#define rlim_t long" >>confdefs.h
b2522d2b
HPN
9824
9825fi
5213506e 9826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 9827
2102b2fe
RS
9828# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
9829# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
9830# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
9831# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
351df804 9832for ac_func in ldgetname
c1800ec8 9833do
5213506e
RW
9834 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9836$as_echo_n "checking whether $ac_func is declared... " >&6; }
9837if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9838 $as_echo_n "(cached) " >&6
9839else
9840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9841/* end confdefs.h. */
c1800ec8
ZW
9842#undef $ac_tr_decl
9843#define $ac_tr_decl 1
ba479fd2 9844
351df804
KG
9845#include "ansidecl.h"
9846#include "system.h"
9847#ifdef HAVE_LDFCN_H
2102b2fe
RS
9848#undef FREAD
9849#undef FWRITE
351df804
KG
9850#include <ldfcn.h>
9851#endif
9852
9853
ba479fd2
NN
9854int
9855main ()
9856{
351df804
KG
9857#ifndef $ac_func
9858char *(*pfn) = (char *(*)) $ac_func ;
9859#endif
ba479fd2
NN
9860 ;
9861 return 0;
9862}
9863_ACEOF
5213506e 9864if ac_fn_c_try_compile "$LINENO"; then :
351df804
KG
9865 eval "gcc_cv_have_decl_$ac_func=yes"
9866else
5213506e 9867 eval "gcc_cv_have_decl_$ac_func=no"
351df804 9868fi
5213506e 9869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
9870fi
9871
9872if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9874$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9875#define $ac_tr_decl 1
ba479fd2
NN
9876_ACEOF
9877
351df804 9878else
5213506e
RW
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9880$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 9881#define $ac_tr_decl 0
ba479fd2
NN
9882_ACEOF
9883
351df804
KG
9884fi
9885
9886done
ba479fd2 9887
351df804 9888
351df804
KG
9889for ac_func in times
9890do
5213506e
RW
9891 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9893$as_echo_n "checking whether $ac_func is declared... " >&6; }
9894if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9895 $as_echo_n "(cached) " >&6
9896else
9897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 9898/* end confdefs.h. */
351df804
KG
9899#undef $ac_tr_decl
9900#define $ac_tr_decl 1
ba479fd2 9901
c1800ec8
ZW
9902#include "ansidecl.h"
9903#include "system.h"
9904#ifdef HAVE_SYS_TIMES_H
9905#include <sys/times.h>
9906#endif
9907
9908
ba479fd2
NN
9909int
9910main ()
9911{
c1800ec8
ZW
9912#ifndef $ac_func
9913char *(*pfn) = (char *(*)) $ac_func ;
9914#endif
ba479fd2
NN
9915 ;
9916 return 0;
9917}
9918_ACEOF
5213506e 9919if ac_fn_c_try_compile "$LINENO"; then :
2f41c1d6
PB
9920 eval "gcc_cv_have_decl_$ac_func=yes"
9921else
5213506e 9922 eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 9923fi
5213506e 9924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
9925fi
9926
9927if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9929$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9930#define $ac_tr_decl 1
ba479fd2
NN
9931_ACEOF
9932
c1800ec8 9933else
5213506e
RW
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 9936#define $ac_tr_decl 0
ba479fd2
NN
9937_ACEOF
9938
c1800ec8
ZW
9939fi
9940
9941done
c1800ec8
ZW
9942
9943
4f6d8cc8
GK
9944for ac_func in sigaltstack
9945do
5213506e
RW
9946 ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
9947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
9948$as_echo_n "checking whether $ac_func is declared... " >&6; }
9949if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
9950 $as_echo_n "(cached) " >&6
9951else
9952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4f6d8cc8
GK
9953/* end confdefs.h. */
9954#undef $ac_tr_decl
9955#define $ac_tr_decl 1
9956
9957#include "ansidecl.h"
9958#include "system.h"
9959#include <signal.h>
9960
9961
9962int
9963main ()
9964{
9965#ifndef $ac_func
9966char *(*pfn) = (char *(*)) $ac_func ;
9967#endif
9968 ;
9969 return 0;
9970}
9971_ACEOF
5213506e 9972if ac_fn_c_try_compile "$LINENO"; then :
8b1f719a
PB
9973 eval "gcc_cv_have_decl_$ac_func=yes"
9974else
5213506e 9975 eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 9976fi
5213506e 9977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
9978fi
9979
9980if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5213506e
RW
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9982$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
9983#define $ac_tr_decl 1
9984_ACEOF
9985
9986else
5213506e
RW
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9988$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
9989#define $ac_tr_decl 0
9990_ACEOF
9991
9992fi
9993
9994done
9995
9996
c1800ec8 9997# More time-related stuff.
5213506e
RW
9998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5
9999$as_echo_n "checking for struct tms... " >&6; }
10000if test "${ac_cv_struct_tms+set}" = set; then :
10001 $as_echo_n "(cached) " >&6
ba479fd2
NN
10002else
10003
5213506e 10004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10005/* end confdefs.h. */
c1800ec8
ZW
10006
10007#include "ansidecl.h"
10008#include "system.h"
10009#ifdef HAVE_SYS_TIMES_H
10010#include <sys/times.h>
10011#endif
10012
ba479fd2
NN
10013int
10014main ()
10015{
c1800ec8 10016struct tms tms;
ba479fd2
NN
10017 ;
10018 return 0;
10019}
10020_ACEOF
5213506e 10021if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10022 ac_cv_struct_tms=yes
10023else
5213506e 10024 ac_cv_struct_tms=no
c1800ec8 10025fi
5213506e 10026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10027fi
5213506e
RW
10028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tms" >&5
10029$as_echo "$ac_cv_struct_tms" >&6; }
63cf211a 10030if test $ac_cv_struct_tms = yes; then
ba479fd2 10031
5213506e 10032$as_echo "#define HAVE_STRUCT_TMS 1" >>confdefs.h
c1800ec8
ZW
10033
10034fi
10035
10036# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
10037# revisit after autoconf 2.50.
5213506e
RW
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
10039$as_echo_n "checking for clock_t... " >&6; }
10040if test "${gcc_cv_type_clock_t+set}" = set; then :
10041 $as_echo_n "(cached) " >&6
ba479fd2
NN
10042else
10043
5213506e 10044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10045/* end confdefs.h. */
c1800ec8
ZW
10046
10047#include "ansidecl.h"
10048#include "system.h"
10049
ba479fd2
NN
10050int
10051main ()
10052{
c1800ec8 10053clock_t x;
ba479fd2
NN
10054 ;
10055 return 0;
10056}
10057_ACEOF
5213506e 10058if ac_fn_c_try_compile "$LINENO"; then :
c1800ec8
ZW
10059 gcc_cv_type_clock_t=yes
10060else
5213506e 10061 gcc_cv_type_clock_t=no
c1800ec8 10062fi
5213506e 10063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 10064fi
5213506e
RW
10065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_type_clock_t" >&5
10066$as_echo "$gcc_cv_type_clock_t" >&6; }
63cf211a 10067if test $gcc_cv_type_clock_t = yes; then
ba479fd2 10068
5213506e 10069$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
c1800ec8
ZW
10070
10071fi
10072
eb70d86d
AS
10073# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
10074CFLAGS="$saved_CFLAGS"
10075
5213506e
RW
10076# Check whether --enable-initfini-array was given.
10077if test "${enable_initfini_array+set}" = set; then :
10078 enableval=$enable_initfini_array;
07cf4226 10079else
ba479fd2 10080
5213506e
RW
10081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5
10082$as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; }
10083if test "${gcc_cv_initfini_array+set}" = set; then :
10084 $as_echo_n "(cached) " >&6
07cf4226 10085else
5213506e 10086 if test "$cross_compiling" = yes; then :
918c4fe4 10087 gcc_cv_initfini_array=no
eb70d86d 10088else
5213506e 10089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10090/* end confdefs.h. */
eb70d86d 10091
07cf4226
DM
10092static int x = -1;
10093int main (void) { return x; }
10094int foo (void) { x = 0; }
10095int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2 10096_ACEOF
5213506e 10097if ac_fn_c_try_run "$LINENO"; then :
918c4fe4 10098 gcc_cv_initfini_array=yes
eb70d86d 10099else
5213506e 10100 gcc_cv_initfini_array=no
eb70d86d 10101fi
5213506e
RW
10102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10103 conftest.$ac_objext conftest.beam conftest.$ac_ext
eb70d86d 10104fi
5213506e 10105
07cf4226 10106fi
5213506e
RW
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5
10108$as_echo "$gcc_cv_initfini_array" >&6; }
eb70d86d 10109 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 10110
5213506e
RW
10111fi
10112
63cf211a 10113if test $enable_initfini_array = yes; then
ba479fd2 10114
5213506e 10115$as_echo "#define HAVE_INITFINI_ARRAY 1" >>confdefs.h
07cf4226 10116
eb70d86d 10117fi
81bf3d9e 10118
ba479fd2 10119# mkdir takes a single argument on some systems.
5213506e
RW
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if mkdir takes one argument" >&5
10121$as_echo_n "checking if mkdir takes one argument... " >&6; }
10122if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then :
10123 $as_echo_n "(cached) " >&6
75923b2f 10124else
5213506e 10125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10126/* end confdefs.h. */
75923b2f
MK
10127
10128#include <sys/types.h>
10129#ifdef HAVE_SYS_STAT_H
10130# include <sys/stat.h>
10131#endif
10132#ifdef HAVE_UNISTD_H
10133# include <unistd.h>
10134#endif
10135#ifdef HAVE_DIRECT_H
10136# include <direct.h>
10137#endif
ba479fd2
NN
10138int
10139main ()
10140{
75923b2f 10141mkdir ("foo", 0);
ba479fd2
NN
10142 ;
10143 return 0;
10144}
10145_ACEOF
5213506e 10146if ac_fn_c_try_compile "$LINENO"; then :
75923b2f
MK
10147 gcc_cv_mkdir_takes_one_arg=no
10148else
5213506e 10149 gcc_cv_mkdir_takes_one_arg=yes
75923b2f 10150fi
5213506e 10151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 10152fi
5213506e
RW
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mkdir_takes_one_arg" >&5
10154$as_echo "$gcc_cv_mkdir_takes_one_arg" >&6; }
63cf211a 10155if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2 10156
5213506e 10157$as_echo "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h
75923b2f
MK
10158
10159fi
10160
10161
861bb6c1
JL
10162# File extensions
10163manext='.1'
10164objext='.o'
10165
10166
10167
4977bab6 10168# With Setjmp/Longjmp based exception handling.
5213506e
RW
10169# Check whether --enable-sjlj-exceptions was given.
10170if test "${enable_sjlj_exceptions+set}" = set; then :
10171 enableval=$enable_sjlj_exceptions; case $target in
399fe3e1
JDA
10172 *-*-hpux10*)
10173 if test $enableval != yes; then
5213506e
RW
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
10175$as_echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
399fe3e1
JDA
10176 enableval=yes
10177 fi
10178 ;;
10179esac
10180force_sjlj_exceptions=yes
10181else
10182 case $target in
10183 *-*-hpux10*)
10184 force_sjlj_exceptions=yes
10185 enableval=yes
10186 ;;
10187 *)
10188 force_sjlj_exceptions=no
10189 ;;
10190esac
5213506e
RW
10191fi
10192
399fe3e1 10193if test $force_sjlj_exceptions = yes; then
b61ff9c8 10194 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 10195
ba479fd2
NN
10196cat >>confdefs.h <<_ACEOF
10197#define CONFIG_SJLJ_EXCEPTIONS $sjlj
10198_ACEOF
4977bab6 10199
399fe3e1 10200fi
4977bab6 10201
443728bb
L
10202# For platforms with the unwind ABI which includes an unwind library,
10203# libunwind, we can choose to use the system libunwind.
e61c76c9
SE
10204# config.gcc also contains tests of with_system_libunwind.
10205
4977bab6 10206
5213506e
RW
10207# Check whether --with-system-libunwind was given.
10208if test "${with_system_libunwind+set}" = set; then :
10209 withval=$with_system_libunwind;
10210fi
4977bab6 10211
e61c76c9
SE
10212 # If system-libunwind was not specifically set, pick a default setting.
10213 if test x$with_system_libunwind = x; then
10214 case ${target} in
10215 ia64-*-hpux*) with_system_libunwind=yes ;;
10216 *) with_system_libunwind=no ;;
10217 esac
10218 fi
10219 # Based on system-libunwind and target, do we have ipinfo?
10220 if test x$with_system_libunwind = xyes; then
10221 case ${target} in
10222 ia64-*-*) have_unwind_getipinfo=no ;;
10223 *) have_unwind_getipinfo=yes ;;
10224 esac
10225 else
a0e02041
AP
10226 # Darwin before version 9 does not have _Unwind_GetIPInfo.
10227
10228 case ${target} in
10229 *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
10230 *) have_unwind_getipinfo=yes ;;
10231 esac
10232
e61c76c9 10233 fi
4977bab6 10234
e61c76c9 10235 if test x$have_unwind_getipinfo = xyes; then
e64f5acf 10236
5213506e 10237$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
e64f5acf 10238
e61c76c9
SE
10239 fi
10240
e64f5acf 10241
34a86c2b
NN
10242# --------------------------------------------------------
10243# Build, host, and target specific configuration fragments
10244# --------------------------------------------------------
10245
5b28c537
NN
10246# Collect build-machine-specific information.
10247. ${srcdir}/config.build
10248
a89ea0df
NN
10249# Collect host-machine-specific information.
10250. ${srcdir}/config.host
10251
ef69da62 10252target_gtfiles=
a89ea0df
NN
10253
10254# Collect target-machine-specific information.
8ad9fb33 10255. ${srcdir}/config.gcc
861bb6c1
JL
10256
10257extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 10258extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
10259
10260# Default the target-machine variables that were not explicitly set.
75bffa71 10261if test x"$tm_file" = x
861bb6c1
JL
10262then tm_file=$cpu_type/$cpu_type.h; fi
10263
6b2adea9 10264if test x"$extra_headers" = x
861bb6c1
JL
10265then extra_headers=; fi
10266
75bffa71 10267if test x$md_file = x
e98e406f 10268then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 10269
75bffa71 10270if test x$out_file = x
861bb6c1
JL
10271then out_file=$cpu_type/$cpu_type.c; fi
10272
75bffa71 10273if test x"$tmake_file" = x
861bb6c1
JL
10274then tmake_file=$cpu_type/t-$cpu_type
10275fi
10276
90e6a802 10277if test x"$dwarf2" = xyes
756ee602 10278then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
10279fi
10280
861bb6c1 10281# Say what files are being used for the output code and MD file.
11642c3a 10282echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
10283echo "Using \`$srcdir/config/$md_file' as machine description file."
10284
11642c3a 10285# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
10286# about them and drop them.
10287
11642c3a
ZW
10288bx=
10289for x in $build_xm_file; do
10290 if test -f $srcdir/config/$x
10291 then bx="$bx $x"
5213506e
RW
10292 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10293$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10294 fi
10295done
10296build_xm_file="$bx"
10297
10298hx=
10299for x in $host_xm_file; do
10300 if test -f $srcdir/config/$x
10301 then hx="$hx $x"
5213506e
RW
10302 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10303$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10304 fi
10305done
10306host_xm_file="$hx"
10307
10308tx=
10309for x in $xm_file; do
10310 if test -f $srcdir/config/$x
10311 then tx="$tx $x"
5213506e
RW
10312 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $srcdir/config/$x does not exist." >&5
10313$as_echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
10314 fi
10315done
10316xm_file="$tx"
10317
861bb6c1
JL
10318count=a
10319for f in $tm_file; do
10320 count=${count}x
10321done
75bffa71 10322if test $count = ax; then
861bb6c1
JL
10323 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
10324else
10325 echo "Using the following target machine macro files:"
10326 for f in $tm_file; do
10327 echo " $srcdir/config/$f"
10328 done
10329fi
10330
4977bab6 10331if test x$need_64bit_hwint = xyes; then
ba479fd2 10332
5213506e 10333$as_echo "#define NEED_64BIT_HOST_WIDE_INT 1" >>confdefs.h
4977bab6
ZW
10334
10335fi
10336
99fa8911
AP
10337if test x$use_long_long_for_widest_fast_int = xyes; then
10338
5213506e 10339$as_echo "#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1" >>confdefs.h
99fa8911
AP
10340
10341fi
10342
861bb6c1
JL
10343count=a
10344for f in $host_xm_file; do
10345 count=${count}x
10346done
11642c3a
ZW
10347if test $count = a; then
10348 :
10349elif test $count = ax; then
861bb6c1
JL
10350 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
10351else
10352 echo "Using the following host machine macro files:"
10353 for f in $host_xm_file; do
10354 echo " $srcdir/config/$f"
10355 done
10356fi
476d9098 10357echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 10358
75bffa71 10359if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
10360 count=a
10361 for f in $build_xm_file; do
10362 count=${count}x
10363 done
11642c3a
ZW
10364 if test $count = a; then
10365 :
10366 elif test $count = ax; then
861bb6c1
JL
10367 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
10368 else
10369 echo "Using the following build machine macro files:"
10370 for f in $build_xm_file; do
10371 echo " $srcdir/config/$f"
10372 done
10373 fi
10374fi
10375
4f6d8cc8 10376case ${host} in
b8ec3cc8 10377 powerpc*-*-darwin*)
5213506e
RW
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5
10379$as_echo_n "checking whether mcontext_t fields have underscores... " >&6; }
10380if test "${gcc_cv_mcontext_underscores+set}" = set; then :
10381 $as_echo_n "(cached) " >&6
4f6d8cc8 10382else
5213506e
RW
10383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10384/* end confdefs.h. */
4f6d8cc8 10385
ba7da42a 10386#include <sys/cdefs.h>
de4fb767 10387#include <sys/signal.h>
4f6d8cc8
GK
10388#include <ucontext.h>
10389int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
10390
10391_ACEOF
5213506e 10392if ac_fn_c_try_compile "$LINENO"; then :
4f6d8cc8
GK
10393 gcc_cv_mcontext_underscores=no
10394else
5213506e 10395 gcc_cv_mcontext_underscores=yes
4f6d8cc8 10396fi
5213506e 10397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 10398fi
5213506e
RW
10399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_mcontext_underscores" >&5
10400$as_echo "$gcc_cv_mcontext_underscores" >&6; }
4f6d8cc8
GK
10401 if test $gcc_cv_mcontext_underscores = yes; then
10402
5213506e 10403$as_echo "#define HAS_MCONTEXT_T_UNDERSCORES /**/" >>confdefs.h
4f6d8cc8
GK
10404
10405 fi
10406 ;;
10407esac
10408
8bb915b6
NN
10409# ---------
10410# Threading
10411# ---------
10412
c2e494a8 10413# Check if a valid thread package
615be2cf 10414case ${enable_threads} in
c2e494a8
NN
10415 "" | no)
10416 # No threads
10417 target_thread_file='single'
10418 ;;
10419 yes)
10420 # default
10421 target_thread_file='single'
10422 ;;
18167442 10423 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 10424 single | solaris | vxworks | win32 | mipssde)
615be2cf 10425 target_thread_file=${enable_threads}
c2e494a8
NN
10426 ;;
10427 *)
615be2cf 10428 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
10429 exit 1
10430 ;;
10431esac
10432
10433if test x${thread_file} = x; then
10434 # No thread file set by target-specific clauses in config.gcc,
10435 # so use file chosen by default logic above
10436 thread_file=${target_thread_file}
861bb6c1
JL
10437fi
10438
8bb915b6
NN
10439# Make gthr-default.h if we have a thread file.
10440gthread_flags=
10441if test $thread_file != single; then
b15a9f63
RW
10442 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
10443 if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
10444 rm -f gthr-default.h-t
10445 else
10446 mv -f gthr-default.h-t gthr-default.h
10447 fi
8bb915b6
NN
10448 gthread_flags=-DHAVE_GTHR_DEFAULT
10449fi
10450
10451
10452# --------
10453# UNSORTED
10454# --------
10455
18fbf599 10456use_cxa_atexit=no
2121a768
JT
10457if test x$enable___cxa_atexit = xyes || \
10458 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 10459 if test x$host = x$target; then
97388150
DS
10460 case $host in
10461 # mingw32 doesn't have __cxa_atexit but uses atexit registration
10462 # keyed to flag_use_cxa_atexit
10463 *-*-mingw32*)
10464 use_cxa_atexit=yes
10465 ;;
10466 *)
5213506e
RW
10467 ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit"
10468if test "x$ac_cv_func___cxa_atexit" = x""yes; then :
18fbf599
PB
10469 use_cxa_atexit=yes
10470else
10471 echo "__cxa_atexit can't be enabled on this target"
10472fi
10473
5f60e48f 10474 ;;
97388150 10475 esac
18fbf599
PB
10476 else
10477 # We can't check for __cxa_atexit when building a cross, so assume
10478 # it is available
10479 use_cxa_atexit=yes
10480 fi
10481 if test x$use_cxa_atexit = xyes; then
ba479fd2 10482
5213506e 10483$as_echo "#define DEFAULT_USE_CXA_ATEXIT 2" >>confdefs.h
2121a768 10484
18fbf599 10485 fi
2121a768
JT
10486fi
10487
a5381466 10488# Look for a file containing extra machine modes.
1c0ca89d
ZW
10489if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
10490 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
10491
10492
10493cat >>confdefs.h <<_ACEOF
e22340b0 10494#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 10495_ACEOF
a5381466
ZW
10496
10497fi
10498
75685792
RS
10499# Convert extra_options into a form suitable for Makefile use.
10500extra_opt_files=
10501for f in $extra_options; do
10502 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
10503done
10504
10505
b7cb92ad 10506# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 10507# the first file included by config.h.
4977bab6 10508# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 10509# as well. If host!=build, we are in error and need to do more
db81d74a 10510# work to find out the build config parameters.
75bffa71 10511if test x$host = x$build
db81d74a 10512then
eaf4e618 10513 build_auto=auto-host.h
b7cb92ad
JL
10514else
10515 # We create a subdir, then run autoconf in the subdir.
10516 # To prevent recursion we set host and build for the new
10517 # invocation of configure to the build for this invocation
ba479fd2 10518 # of configure.
b7cb92ad
JL
10519 tempdir=build.$$
10520 rm -rf $tempdir
10521 mkdir $tempdir
10522 cd $tempdir
10523 case ${srcdir} in
255b8a49 10524 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
10525 *) realsrcdir=../${srcdir};;
10526 esac
d920e825
L
10527 saved_CFLAGS="${CFLAGS}"
10528 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 10529 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 10530 ${realsrcdir}/configure \
33e70558 10531 --enable-languages=${enable_languages-all} \
534d0cc0 10532 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 10533 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
10534
10535 # We just finished tests for the build machine, so rename
10536 # the file auto-build.h in the gcc directory.
10537 mv auto-host.h ../auto-build.h
10538 cd ..
10539 rm -rf $tempdir
eaf4e618 10540 build_auto=auto-build.h
db81d74a
RH
10541fi
10542
06f0b04c 10543
eaf4e618 10544tm_file="${tm_file} defaults.h"
4977bab6
ZW
10545tm_p_file="${tm_p_file} tm-preds.h"
10546host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
10547build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 10548# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 10549# put this back in temporarily.
232b67d9 10550xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 10551
34a86c2b
NN
10552# --------
10553# UNSORTED
10554# --------
10555
cc1e60ea 10556# Compile in configure arguments.
8105825d 10557if test -f configargs.h ; then
cc1e60ea 10558 # Being re-configured.
022dae81 10559 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
10560 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
10561else
10562 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
10563fi
eeae7b41
DJ
10564
10565# Double all backslashes and backslash all quotes to turn
10566# gcc_config_arguments into a C string.
10567sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
10568$gcc_config_arguments
10569EOF
10570gcc_config_arguments_str=`cat conftest.out`
10571rm -f conftest.out
10572
cc1e60ea
JM
10573cat > configargs.h <<EOF
10574/* Generated automatically. */
eeae7b41 10575static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 10576static const char thread_model[] = "$thread_file";
7816bea0
DJ
10577
10578static const struct {
10579 const char *name, *value;
10580} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
10581EOF
10582
40540e68
RAE
10583gcc_BASEVER=`cat $srcdir/BASE-VER`
10584gcc_DEVPHASE=`cat $srcdir/DEV-PHASE`
10585gcc_DATESTAMP=`cat $srcdir/DATESTAMP`
0c463e16 10586if test -f $srcdir/REVISION ; then
40540e68 10587 gcc_REVISION=`cat $srcdir/REVISION`
0c463e16
RAE
10588else
10589 gcc_REVISION=""
10590fi
10591cat > plugin-version.h <<EOF
10592#include "configargs.h"
10593
10594static char basever[] = "$gcc_BASEVER";
10595static char datestamp[] = "$gcc_DATESTAMP";
10596static char devphase[] = "$gcc_DEVPHASE";
10597static char revision[] = "$gcc_REVISION";
10598
10599/* FIXME plugins: We should make the version information more precise.
10600 One way to do is to add a checksum. */
10601
10602static struct plugin_gcc_version gcc_version = {basever, datestamp,
10603 devphase, revision,
10604 configuration_arguments};
10605EOF
10606
ab87f8c8 10607# Internationalization
18fc9bd4
RG
10608# If we haven't got the data from the intl directory,
10609# assume NLS is disabled.
10610USE_NLS=no
10611LIBINTL=
10612LIBINTL_DEP=
10613INCINTL=
10614XGETTEXT=
10615GMSGFMT=
10616POSUB=
10617
10618if test -f ../intl/config.intl; then
10619 . ../intl/config.intl
10620fi
5213506e
RW
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
10622$as_echo_n "checking whether NLS is requested... " >&6; }
18fc9bd4 10623if test x"$USE_NLS" != xyes; then
5213506e
RW
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
18fc9bd4 10626else
5213506e
RW
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10628$as_echo "yes" >&6; }
18fc9bd4 10629
5213506e 10630$as_echo "#define ENABLE_NLS 1" >>confdefs.h
18fc9bd4
RG
10631
10632
5213506e
RW
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
10634$as_echo_n "checking for catalogs to be installed... " >&6; }
18fc9bd4
RG
10635 # Look for .po and .gmo files in the source directory.
10636 CATALOGS=
10637 XLINGUAS=
10638 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
10639 # If there aren't any .gmo files the shell will give us the
10640 # literal string "../path/to/srcdir/po/*.gmo" which has to be
10641 # weeded out.
10642 case "$cat" in *\**)
10643 continue;;
10644 esac
10645 # The quadruple backslash is collapsed to a double backslash
10646 # by the backticks, then collapsed again by the double quotes,
10647 # leaving us with one backslash in the sed expression (right
10648 # before the dot that mustn't act as a wildcard).
10649 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
10650 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
10651 # The user is allowed to set LINGUAS to a list of languages to
10652 # install catalogs for. If it's empty that means "all of them."
10653 if test "x$LINGUAS" = x; then
10654 CATALOGS="$CATALOGS $cat"
10655 XLINGUAS="$XLINGUAS $lang"
10656 else
10657 case "$LINGUAS" in *$lang*)
10658 CATALOGS="$CATALOGS $cat"
10659 XLINGUAS="$XLINGUAS $lang"
10660 ;;
10661 esac
10662 fi
10663 done
10664 LINGUAS="$XLINGUAS"
5213506e
RW
10665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
10666$as_echo "$LINGUAS" >&6; }
18fc9bd4
RG
10667
10668
10669 DATADIRNAME=share
10670
10671 INSTOBJEXT=.mo
10672
10673 GENCAT=gencat
10674
10675 CATOBJEXT=.gmo
10676
10677fi
861bb6c1 10678
56694dd9
ZW
10679# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
10680# -liconv on the link line twice.
10681case "$LIBINTL" in *$LIBICONV*)
10682 LIBICONV= ;;
10683esac
dc6746e7 10684
5213506e
RW
10685# Check whether --enable-secureplt was given.
10686if test "${enable_secureplt+set}" = set; then :
10687 enableval=$enable_secureplt;
10688fi
7f970b70 10689
922e3e33 10690
ad211091
KT
10691# Check whether --enable-leading-mingw64-underscores was given.
10692if test "${enable_leading_mingw64_underscores+set}" = set; then :
10693 enableval=$enable_leading_mingw64_underscores;
10694fi
10695
10696if test x"$enable_leading_mingw64_underscores" = xyes ; then :
10697
10698$as_echo "#define USE_MINGW64_LEADING_UNDERSCORES 1" >>confdefs.h
10699
10700fi
10701
5213506e
RW
10702# Check whether --enable-cld was given.
10703if test "${enable_cld+set}" = set; then :
10704 enableval=$enable_cld;
922e3e33
UB
10705else
10706 enable_cld=no
5213506e
RW
10707fi
10708
922e3e33 10709
d79389af
L
10710# Check whether --enable-frame-pointer was given.
10711if test "${enable_frame_pointer+set}" = set; then :
10712 enableval=$enable_frame_pointer;
10713else
10714
10715case $target_os in
1b2d4118
JH
10716linux* | darwin[8912]*)
10717 # Enable -fomit-frame-pointer by default for Linux and Darwin with
10718 # DWARF2.
d79389af
L
10719 enable_frame_pointer=no
10720 ;;
10721*)
10722 enable_frame_pointer=yes
10723 ;;
10724esac
10725
10726fi
10727
10728
56694dd9 10729# Windows32 Registry support for specifying GCC installation paths.
5213506e
RW
10730# Check whether --enable-win32-registry was given.
10731if test "${enable_win32_registry+set}" = set; then :
10732 enableval=$enable_win32_registry;
10733fi
dc6746e7 10734
ba479fd2 10735
a1286ef5
ZW
10736case $host_os in
10737 win32 | pe | cygwin* | mingw32* | uwin*)
10738 if test "x$enable_win32_registry" != xno; then
5213506e
RW
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RegOpenKeyExA" >&5
10740$as_echo_n "checking for library containing RegOpenKeyExA... " >&6; }
10741if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10742 $as_echo_n "(cached) " >&6
ba479fd2
NN
10743else
10744 ac_func_search_save_LIBS=$LIBS
5213506e 10745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ba479fd2 10746/* end confdefs.h. */
861bb6c1 10747
5213506e
RW
10748/* Override any GCC internal prototype to avoid an error.
10749 Use char because int might match the return type of a GCC
10750 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10751#ifdef __cplusplus
10752extern "C"
10753#endif
ba479fd2
NN
10754char RegOpenKeyExA ();
10755int
10756main ()
10757{
5213506e 10758return RegOpenKeyExA ();
ba479fd2
NN
10759 ;
10760 return 0;
10761}
10762_ACEOF
5213506e
RW
10763for ac_lib in '' advapi32; do
10764 if test -z "$ac_lib"; then
10765 ac_res="none required"
10766 else
10767 ac_res=-l$ac_lib
b61ff9c8 10768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5213506e
RW
10769 fi
10770 if ac_fn_c_try_link "$LINENO"; then :
10771 ac_cv_search_RegOpenKeyExA=$ac_res
10772fi
10773rm -f core conftest.err conftest.$ac_objext \
10774 conftest$ac_exeext
10775 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
10776 break
10777fi
10778done
10779if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then :
2f41c1d6 10780
1a4b763e 10781else
5213506e 10782 ac_cv_search_RegOpenKeyExA=no
dd7f7a6e 10783fi
5213506e 10784rm conftest.$ac_ext
dd7f7a6e
EC
10785LIBS=$ac_func_search_save_LIBS
10786fi
5213506e
RW
10787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RegOpenKeyExA" >&5
10788$as_echo "$ac_cv_search_RegOpenKeyExA" >&6; }
10789ac_res=$ac_cv_search_RegOpenKeyExA
10790if test "$ac_res" != no; then :
10791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
10792
10793else
10794 enable_win32_registry=no
10795fi
10796
10797 fi
10798
10799 if test "x$enable_win32_registry" != xno; then
10800
5213506e 10801$as_echo "#define ENABLE_WIN32_REGISTRY 1" >>confdefs.h
dd7f7a6e
EC
10802
10803
10804 if test "x$enable_win32_registry" != xyes \
10805 && test "x$enable_win32_registry" != x; then
10806
10807cat >>confdefs.h <<_ACEOF
10808#define WIN32_REGISTRY_KEY "$enable_win32_registry"
10809_ACEOF
10810
10811 fi
10812 fi
10813 ;;
10814esac
ab87f8c8 10815
56694dd9
ZW
10816# Get an absolute path to the GCC top-level source directory
10817holddir=`${PWDCMD-pwd}`
10818cd $srcdir
10819topdir=`${PWDCMD-pwd}`
10820cd $holddir
ab87f8c8 10821
56694dd9 10822# Conditionalize the makefile for this host machine.
2ed26f6b 10823xmake_file=
c406e779 10824for f in ${host_xmake_file}
56694dd9
ZW
10825do
10826 if test -f ${srcdir}/config/$f
10827 then
2ed26f6b 10828 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
10829 fi
10830done
093e61a6 10831
56694dd9 10832# Conditionalize the makefile for this target machine.
2ed26f6b 10833tmake_file_=
c406e779 10834for f in ${tmake_file}
56694dd9
ZW
10835do
10836 if test -f ${srcdir}/config/$f
10837 then
2ed26f6b 10838 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
10839 fi
10840done
2ed26f6b 10841tmake_file="${tmake_file_}"
71a94577 10842
ab87f8c8
JL
10843out_object_file=`basename $out_file .c`.o
10844
75685792 10845tm_file_list="options.h"
c513ce77 10846tm_include_list="options.h insn-constants.h"
ab87f8c8 10847for f in $tm_file; do
64ccbc99 10848 case $f in
3ca43df7
RS
10849 ./* )
10850 f=`echo $f | sed 's/^..//'`
10851 tm_file_list="${tm_file_list} $f"
10852 tm_include_list="${tm_include_list} $f"
10853 ;;
d02af173 10854 defaults.h )
e22340b0
ZW
10855 tm_file_list="${tm_file_list} \$(srcdir)/$f"
10856 tm_include_list="${tm_include_list} $f"
10857 ;;
10858 * )
10859 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
10860 tm_include_list="${tm_include_list} config/$f"
10861 ;;
64ccbc99 10862 esac
ab87f8c8
JL
10863done
10864
11642c3a 10865tm_p_file_list=
e22340b0 10866tm_p_include_list=
11642c3a 10867for f in $tm_p_file; do
4977bab6
ZW
10868 case $f in
10869 tm-preds.h )
e22340b0
ZW
10870 tm_p_file_list="${tm_p_file_list} $f"
10871 tm_p_include_list="${tm_p_include_list} $f"
10872 ;;
10873 * )
10874 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
10875 tm_p_include_list="${tm_p_include_list} config/$f"
10876 esac
10877done
10878
10879xm_file_list=
10880xm_include_list=
10881for f in $xm_file; do
10882 case $f in
10883 ansidecl.h )
10884 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
10885 xm_include_list="${xm_include_list} $f"
10886 ;;
10887 auto-host.h )
10888 xm_file_list="${xm_file_list} $f"
10889 xm_include_list="${xm_include_list} $f"
10890 ;;
10891 * )
10892 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
10893 xm_include_list="${xm_include_list} config/$f"
10894 ;;
4977bab6 10895 esac
11642c3a
ZW
10896done
10897
ab87f8c8 10898host_xm_file_list=
e22340b0 10899host_xm_include_list=
ab87f8c8 10900for f in $host_xm_file; do
64ccbc99 10901 case $f in
d02af173 10902 ansidecl.h )
e22340b0
ZW
10903 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
10904 host_xm_include_list="${host_xm_include_list} $f"
10905 ;;
e2500fed 10906 auto-host.h )
e22340b0
ZW
10907 host_xm_file_list="${host_xm_file_list} $f"
10908 host_xm_include_list="${host_xm_include_list} $f"
10909 ;;
10910 * )
10911 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
10912 host_xm_include_list="${host_xm_include_list} config/$f"
10913 ;;
64ccbc99 10914 esac
ab87f8c8
JL
10915done
10916
10917build_xm_file_list=
10918for f in $build_xm_file; do
64ccbc99 10919 case $f in
d02af173 10920 ansidecl.h )
e22340b0
ZW
10921 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
10922 build_xm_include_list="${build_xm_include_list} $f"
10923 ;;
e2500fed 10924 auto-build.h | auto-host.h )
e22340b0
ZW
10925 build_xm_file_list="${build_xm_file_list} $f"
10926 build_xm_include_list="${build_xm_include_list} $f"
10927 ;;
10928 * )
10929 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
10930 build_xm_include_list="${build_xm_include_list} config/$f"
10931 ;;
64ccbc99 10932 esac
ab87f8c8
JL
10933done
10934
2989d30c
GK
10935# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
10936# cross-compiler which does not use the native headers and libraries.
a078a589 10937# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
10938CROSS=
10939ALL=all.internal
10940SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10941
10942if test "x$with_build_sysroot" != x; then
14da6073 10943 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
10944else
10945 # This value is used, even on a native system, because
10946 # CROSS_SYSTEM_HEADER_DIR is just
10947 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
10948 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
10949fi
10950
ab87f8c8
JL
10951if test x$host != x$target
10952then
2989d30c 10953 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 10954 ALL=all.cross
160633c6 10955 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 10956 case "$host","$target" in
3a7e8b87
GK
10957 # Darwin crosses can use the host system's libraries and headers,
10958 # because of the fat library support. Of course, it must be the
10959 # same version of Darwin on both sides. Allow the user to
10960 # just say --target=foo-darwin without a version number to mean
10961 # "the version on this system".
10962 *-*-darwin*,*-*-darwin*)
10963 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
10964 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
10965 if test $hostos = $targetos -o $targetos = darwin ; then
10966 CROSS=
10967 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
10968 with_headers=yes
10969 fi
10970 ;;
10971
343f59d9
AM
10972 i?86-*-*,x86_64-*-* \
10973 | powerpc*-*-*,powerpc64*-*-*)
10974 CROSS="$CROSS -DNATIVE_CROSS" ;;
10975 esac
7a615b25 10976elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 10977 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
10978fi
10979
b39d221a
EC
10980# If this is a cross-compiler that does not
10981# have its own set of headers then define
10982# inhibit_libc
10983
dc06db20
R
10984# If this is using newlib, without having the headers available now,
10985# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
10986# This prevents libgcc2 from containing any code which requires libc
10987# support.
a929bc28 10988: ${inhibit_libc=false}
dc06db20
R
10989if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
10990 test x$with_newlib = xyes ; } &&
e50084fa 10991 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 10992 inhibit_libc=true
b39d221a
EC
10993fi
10994
10995
a078a589
ZW
10996# When building gcc with a cross-compiler, we need to adjust things so
10997# that the generator programs are still built with the native compiler.
52c0e446 10998# Also, we cannot run fixincludes.
a078a589
ZW
10999
11000# These are the normal (build=host) settings:
ba479fd2
NN
11001CC_FOR_BUILD='$(CC)'
11002BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 11003BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 11004STMP_FIXINC=stmp-fixinc
8ad9fb33 11005
83599948
NS
11006# And these apply if build != host, or we are generating coverage data
11007if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 11008then
b11e4747 11009 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 11010 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
ab87f8c8
JL
11011fi
11012
11013# Expand extra_headers to include complete path.
11014# This substitutes for lots of t-* files.
11015extra_headers_list=
b1ef58c8
NN
11016# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
11017for file in ${extra_headers} ; do
11018 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
11019done
ab87f8c8 11020
1617e5ee
GK
11021# If use_gcc_tgmath is set, append ginclude/tgmath.h.
11022if test x"$use_gcc_tgmath" = xyes
11023then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
11024fi
11025
c38f02df
ILT
11026# Define collect2 in Makefile.
11027case $host_can_use_collect2 in
11028 no) collect2= ;;
11029 *) collect2='collect2$(exeext)' ;;
11030esac
11031
11032
ab87f8c8 11033# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
11034case $use_collect2 in
11035 no) use_collect2= ;;
11036 "") ;;
ba479fd2 11037 *)
34a86c2b
NN
11038 host_xm_defines="${host_xm_defines} USE_COLLECT2"
11039 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
11040 case $host_can_use_collect2 in
11041 no)
5213506e 11042 as_fn_error "collect2 is required but cannot be built on this system" "$LINENO" 5
c38f02df
ILT
11043 ;;
11044 esac
34a86c2b
NN
11045 ;;
11046esac
ab87f8c8 11047
1cd0b716
DK
11048
11049cat >>confdefs.h <<_ACEOF
11050#define LTOPLUGINSONAME "${host_lto_plugin_soname}"
11051_ACEOF
11052
11053
8bb915b6
NN
11054# ---------------------------
11055# Assembler & linker features
11056# ---------------------------
11057
da0f6381
PB
11058# During stage 2, ld is actually gcc/collect-ld, which is a small script to
11059# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
11060# However when ld-new is first executed from the build tree, libtool will
11061# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
11062# to the build tree. While doing this we need to use the previous-stage
11063# linker, or we have an infinite loop. The presence of a shell script as
11064# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
11065# the gcc/collect-ld script. So we need to know how libtool works, or
11066# exec-tool will fail.
e8b05380 11067
da0f6381 11068
5d47bb02
PG
11069case `pwd` in
11070 *\ * | *\ *)
5213506e
RW
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
11072$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5d47bb02 11073esac
da0f6381
PB
11074
11075
da0f6381 11076
43e02a8a
RW
11077macro_version='2.2.7a'
11078macro_revision='1.3134'
da0f6381
PB
11079
11080
11081
11082
11083
11084
da0f6381
PB
11085
11086
11087
11088
11089
11090
11091
5d47bb02 11092ltmain="$ac_aux_dir/ltmain.sh"
da0f6381 11093
43e02a8a
RW
11094# Backslashify metacharacters that are still active within
11095# double-quoted strings.
11096sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
11097
11098# Same as above, but do not quote variable references.
11099double_quote_subst='s/\(["`\\]\)/\\\1/g'
11100
11101# Sed substitution to delay expansion of an escaped shell variable in a
11102# double_quote_subst'ed string.
11103delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
11104
11105# Sed substitution to delay expansion of an escaped single quote.
11106delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
11107
11108# Sed substitution to avoid accidental globbing in evaled expressions
11109no_glob_subst='s/\*/\\\*/g'
11110
11111ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11112ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11113ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11114
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
11116$as_echo_n "checking how to print strings... " >&6; }
11117# Test print first, because it will be a builtin if present.
11118if test "X`print -r -- -n 2>/dev/null`" = X-n && \
11119 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
11120 ECHO='print -r --'
11121elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
11122 ECHO='printf %s\n'
11123else
11124 # Use this function as a fallback that always works.
11125 func_fallback_echo ()
11126 {
11127 eval 'cat <<_LTECHO_EOF
11128$1
11129_LTECHO_EOF'
11130 }
11131 ECHO='func_fallback_echo'
11132fi
11133
11134# func_echo_all arg...
11135# Invoke $ECHO with all args, space-separated.
11136func_echo_all ()
11137{
11138 $ECHO ""
11139}
11140
11141case "$ECHO" in
11142 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
11143$as_echo "printf" >&6; } ;;
11144 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
11145$as_echo "print -r" >&6; } ;;
11146 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
11147$as_echo "cat" >&6; } ;;
11148esac
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
5213506e
RW
11163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
11164$as_echo_n "checking for a sed that does not truncate output... " >&6; }
11165if test "${ac_cv_path_SED+set}" = set; then :
11166 $as_echo_n "(cached) " >&6
11167else
11168 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
11169 for ac_i in 1 2 3 4 5 6 7; do
11170 ac_script="$ac_script$as_nl$ac_script"
11171 done
11172 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
11173 { ac_script=; unset ac_script;}
11174 if test -z "$SED"; then
11175 ac_path_SED_found=false
11176 # Loop through the user's path and test for each of PROGNAME-LIST
11177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
11178for as_dir in $PATH
11179do
11180 IFS=$as_save_IFS
11181 test -z "$as_dir" && as_dir=.
5213506e 11182 for ac_prog in sed gsed; do
da0f6381 11183 for ac_exec_ext in '' $ac_executable_extensions; do
5213506e
RW
11184 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
11185 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
11186# Check for GNU ac_path_SED and select it if it is found.
11187 # Check for GNU $ac_path_SED
11188case `"$ac_path_SED" --version 2>&1` in
11189*GNU*)
11190 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
11191*)
11192 ac_count=0
11193 $as_echo_n 0123456789 >"conftest.in"
11194 while :
11195 do
11196 cat "conftest.in" "conftest.in" >"conftest.tmp"
11197 mv "conftest.tmp" "conftest.in"
11198 cp "conftest.in" "conftest.nl"
11199 $as_echo '' >> "conftest.nl"
11200 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
11201 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11202 as_fn_arith $ac_count + 1 && ac_count=$as_val
11203 if test $ac_count -gt ${ac_path_SED_max-0}; then
11204 # Best one so far, save it but keep looking for a better one
11205 ac_cv_path_SED="$ac_path_SED"
11206 ac_path_SED_max=$ac_count
11207 fi
11208 # 10*(2^10) chars as input seems more than enough
11209 test $ac_count -gt 10 && break
11210 done
11211 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11212esac
11213
11214 $ac_path_SED_found && break 3
da0f6381
PB
11215 done
11216 done
5213506e 11217 done
da0f6381 11218IFS=$as_save_IFS
5213506e
RW
11219 if test -z "$ac_cv_path_SED"; then
11220 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
da0f6381 11221 fi
5213506e
RW
11222else
11223 ac_cv_path_SED=$SED
e8b05380 11224fi
b61ff9c8 11225
5213506e
RW
11226fi
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
11228$as_echo "$ac_cv_path_SED" >&6; }
11229 SED="$ac_cv_path_SED"
11230 rm -f conftest.sed
e8b05380 11231
da0f6381
PB
11232test -z "$SED" && SED=sed
11233Xsed="$SED -e 1s/^X//"
e8b05380 11234
e8b05380
PB
11235
11236
ad9c4d9f 11237
da0f6381
PB
11238
11239
11240
11241
11242
11243
11244
5213506e
RW
11245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11246$as_echo_n "checking for fgrep... " >&6; }
11247if test "${ac_cv_path_FGREP+set}" = set; then :
11248 $as_echo_n "(cached) " >&6
11249else
11250 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11251 then ac_cv_path_FGREP="$GREP -F"
11252 else
11253 if test -z "$FGREP"; then
11254 ac_path_FGREP_found=false
11255 # Loop through the user's path and test for each of PROGNAME-LIST
11256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11257for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11258do
11259 IFS=$as_save_IFS
11260 test -z "$as_dir" && as_dir=.
11261 for ac_prog in fgrep; do
11262 for ac_exec_ext in '' $ac_executable_extensions; do
11263 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11264 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
11265# Check for GNU ac_path_FGREP and select it if it is found.
11266 # Check for GNU $ac_path_FGREP
11267case `"$ac_path_FGREP" --version 2>&1` in
11268*GNU*)
11269 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11270*)
11271 ac_count=0
11272 $as_echo_n 0123456789 >"conftest.in"
11273 while :
11274 do
11275 cat "conftest.in" "conftest.in" >"conftest.tmp"
11276 mv "conftest.tmp" "conftest.in"
11277 cp "conftest.in" "conftest.nl"
11278 $as_echo 'FGREP' >> "conftest.nl"
11279 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11280 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11281 as_fn_arith $ac_count + 1 && ac_count=$as_val
11282 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11283 # Best one so far, save it but keep looking for a better one
11284 ac_cv_path_FGREP="$ac_path_FGREP"
11285 ac_path_FGREP_max=$ac_count
11286 fi
11287 # 10*(2^10) chars as input seems more than enough
11288 test $ac_count -gt 10 && break
11289 done
11290 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11291esac
11292
11293 $ac_path_FGREP_found && break 3
11294 done
11295 done
11296 done
11297IFS=$as_save_IFS
11298 if test -z "$ac_cv_path_FGREP"; then
11299 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11300 fi
e8b05380 11301else
5213506e
RW
11302 ac_cv_path_FGREP=$FGREP
11303fi
11304
11305 fi
981d4858 11306fi
5213506e
RW
11307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11308$as_echo "$ac_cv_path_FGREP" >&6; }
11309 FGREP="$ac_cv_path_FGREP"
9e423e6d 11310
9f18db39 11311
da0f6381 11312test -z "$GREP" && GREP=grep
9f18db39 11313
da0f6381
PB
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
5213506e
RW
11332# Check whether --with-gnu-ld was given.
11333if test "${with_gnu_ld+set}" = set; then :
11334 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
da0f6381
PB
11335else
11336 with_gnu_ld=no
5213506e
RW
11337fi
11338
da0f6381
PB
11339ac_prog=ld
11340if test "$GCC" = yes; then
11341 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
11343$as_echo_n "checking for ld used by $CC... " >&6; }
da0f6381
PB
11344 case $host in
11345 *-*-mingw*)
11346 # gcc leaves a trailing carriage return which upsets mingw
11347 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11348 *)
11349 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11350 esac
11351 case $ac_prog in
11352 # Accept absolute paths.
11353 [\\/]* | ?:[\\/]*)
11354 re_direlt='/[^/][^/]*/\.\./'
11355 # Canonicalize the pathname of ld
11356 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
11357 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
11358 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
11359 done
11360 test -z "$LD" && LD="$ac_prog"
11361 ;;
11362 "")
11363 # If it fails, then pretend we aren't using GCC.
11364 ac_prog=ld
11365 ;;
11366 *)
11367 # If it is relative, then search for the first ld in PATH.
11368 with_gnu_ld=unknown
11369 ;;
11370 esac
11371elif test "$with_gnu_ld" = yes; then
5213506e
RW
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
11373$as_echo_n "checking for GNU ld... " >&6; }
da0f6381 11374else
5213506e
RW
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
11376$as_echo_n "checking for non-GNU ld... " >&6; }
da0f6381 11377fi
5213506e
RW
11378if test "${lt_cv_path_LD+set}" = set; then :
11379 $as_echo_n "(cached) " >&6
da0f6381
PB
11380else
11381 if test -z "$LD"; then
11382 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11383 for ac_dir in $PATH; do
11384 IFS="$lt_save_ifs"
11385 test -z "$ac_dir" && ac_dir=.
11386 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11387 lt_cv_path_LD="$ac_dir/$ac_prog"
11388 # Check to see if the program is GNU ld. I'd rather use --version,
11389 # but apparently some variants of GNU ld only accept -v.
11390 # Break only if it was the GNU/non-GNU ld that we prefer.
11391 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
11392 *GNU* | *'with BFD'*)
11393 test "$with_gnu_ld" != no && break
11394 ;;
11395 *)
11396 test "$with_gnu_ld" != yes && break
11397 ;;
11398 esac
11399 fi
11400 done
11401 IFS="$lt_save_ifs"
11402else
11403 lt_cv_path_LD="$LD" # Let the user override the test with a path.
11404fi
11405fi
11406
11407LD="$lt_cv_path_LD"
11408if test -n "$LD"; then
5213506e
RW
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11410$as_echo "$LD" >&6; }
da0f6381 11411else
5213506e
RW
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
da0f6381 11414fi
5213506e
RW
11415test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
11416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
11417$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
11418if test "${lt_cv_prog_gnu_ld+set}" = set; then :
11419 $as_echo_n "(cached) " >&6
da0f6381
PB
11420else
11421 # I'd rather use --version here, but apparently some GNU lds only accept -v.
11422case `$LD -v 2>&1 </dev/null` in
11423*GNU* | *'with BFD'*)
11424 lt_cv_prog_gnu_ld=yes
11425 ;;
11426*)
11427 lt_cv_prog_gnu_ld=no
11428 ;;
11429esac
11430fi
5213506e
RW
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
11432$as_echo "$lt_cv_prog_gnu_ld" >&6; }
da0f6381
PB
11433with_gnu_ld=$lt_cv_prog_gnu_ld
11434
11435
11436
11437
11438
11439
11440
11441
11442
5213506e
RW
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
11444$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
11445if test "${lt_cv_path_NM+set}" = set; then :
11446 $as_echo_n "(cached) " >&6
da0f6381
PB
11447else
11448 if test -n "$NM"; then
11449 # Let the user override the test.
11450 lt_cv_path_NM="$NM"
11451else
11452 lt_nm_to_check="${ac_tool_prefix}nm"
11453 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
11454 lt_nm_to_check="$lt_nm_to_check nm"
11455 fi
11456 for lt_tmp_nm in $lt_nm_to_check; do
11457 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11458 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
11459 IFS="$lt_save_ifs"
11460 test -z "$ac_dir" && ac_dir=.
11461 tmp_nm="$ac_dir/$lt_tmp_nm"
11462 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
11463 # Check to see if the nm accepts a BSD-compat flag.
11464 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
11465 # nm: unknown option "B" ignored
11466 # Tru64's nm complains that /dev/null is an invalid object file
11467 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
11468 */dev/null* | *'Invalid file or object type'*)
11469 lt_cv_path_NM="$tmp_nm -B"
11470 break
11471 ;;
11472 *)
11473 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
11474 */dev/null*)
11475 lt_cv_path_NM="$tmp_nm -p"
11476 break
11477 ;;
11478 *)
11479 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
11480 continue # so that we can try to find one that supports BSD flags
11481 ;;
11482 esac
11483 ;;
11484 esac
11485 fi
11486 done
11487 IFS="$lt_save_ifs"
11488 done
11489 : ${lt_cv_path_NM=no}
11490fi
11491fi
5213506e
RW
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
11493$as_echo "$lt_cv_path_NM" >&6; }
da0f6381
PB
11494if test "$lt_cv_path_NM" != "no"; then
11495 NM="$lt_cv_path_NM"
11496else
11497 # Didn't find any BSD compatible name lister, look for dumpbin.
43e02a8a
RW
11498 if test -n "$DUMPBIN"; then :
11499 # Let the user override the test.
11500 else
11501 if test -n "$ac_tool_prefix"; then
11502 for ac_prog in dumpbin "link -dump"
da0f6381
PB
11503 do
11504 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11505set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11507$as_echo_n "checking for $ac_word... " >&6; }
11508if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
11509 $as_echo_n "(cached) " >&6
da0f6381
PB
11510else
11511 if test -n "$DUMPBIN"; then
11512 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
11513else
11514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11515for as_dir in $PATH
11516do
11517 IFS=$as_save_IFS
11518 test -z "$as_dir" && as_dir=.
5213506e
RW
11519 for ac_exec_ext in '' $ac_executable_extensions; do
11520 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11521 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5213506e 11522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11523 break 2
11524 fi
11525done
5213506e
RW
11526 done
11527IFS=$as_save_IFS
da0f6381
PB
11528
11529fi
11530fi
11531DUMPBIN=$ac_cv_prog_DUMPBIN
11532if test -n "$DUMPBIN"; then
5213506e
RW
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
11534$as_echo "$DUMPBIN" >&6; }
da0f6381 11535else
5213506e
RW
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11537$as_echo "no" >&6; }
da0f6381
PB
11538fi
11539
5213506e 11540
da0f6381
PB
11541 test -n "$DUMPBIN" && break
11542 done
11543fi
11544if test -z "$DUMPBIN"; then
11545 ac_ct_DUMPBIN=$DUMPBIN
43e02a8a 11546 for ac_prog in dumpbin "link -dump"
da0f6381
PB
11547do
11548 # Extract the first word of "$ac_prog", so it can be a program name with args.
11549set dummy $ac_prog; ac_word=$2
5213506e
RW
11550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11551$as_echo_n "checking for $ac_word... " >&6; }
11552if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
11553 $as_echo_n "(cached) " >&6
da0f6381
PB
11554else
11555 if test -n "$ac_ct_DUMPBIN"; then
11556 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
11557else
11558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561 IFS=$as_save_IFS
11562 test -z "$as_dir" && as_dir=.
5213506e
RW
11563 for ac_exec_ext in '' $ac_executable_extensions; do
11564 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 11565 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5213506e 11566 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
11567 break 2
11568 fi
11569done
5213506e
RW
11570 done
11571IFS=$as_save_IFS
da0f6381
PB
11572
11573fi
11574fi
11575ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
11576if test -n "$ac_ct_DUMPBIN"; then
5213506e
RW
11577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
11578$as_echo "$ac_ct_DUMPBIN" >&6; }
da0f6381 11579else
5213506e
RW
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11581$as_echo "no" >&6; }
da0f6381
PB
11582fi
11583
5213506e 11584
da0f6381
PB
11585 test -n "$ac_ct_DUMPBIN" && break
11586done
da0f6381 11587
5213506e
RW
11588 if test "x$ac_ct_DUMPBIN" = x; then
11589 DUMPBIN=":"
11590 else
11591 case $cross_compiling:$ac_tool_warned in
11592yes:)
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11594$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11595ac_tool_warned=yes ;;
11596esac
11597 DUMPBIN=$ac_ct_DUMPBIN
11598 fi
da0f6381
PB
11599fi
11600
43e02a8a
RW
11601 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
11602 *COFF*)
11603 DUMPBIN="$DUMPBIN -symbols"
11604 ;;
11605 *)
11606 DUMPBIN=:
11607 ;;
11608 esac
11609 fi
da0f6381
PB
11610
11611 if test "$DUMPBIN" != ":"; then
11612 NM="$DUMPBIN"
11613 fi
11614fi
11615test -z "$NM" && NM=nm
11616
11617
11618
11619
11620
11621
5213506e
RW
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
11623$as_echo_n "checking the name lister ($NM) interface... " >&6; }
11624if test "${lt_cv_nm_interface+set}" = set; then :
11625 $as_echo_n "(cached) " >&6
da0f6381
PB
11626else
11627 lt_cv_nm_interface="BSD nm"
11628 echo "int some_variable = 0;" > conftest.$ac_ext
43e02a8a 11629 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
da0f6381
PB
11630 (eval "$ac_compile" 2>conftest.err)
11631 cat conftest.err >&5
43e02a8a 11632 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
11633 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
11634 cat conftest.err >&5
43e02a8a 11635 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
da0f6381
PB
11636 cat conftest.out >&5
11637 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
11638 lt_cv_nm_interface="MS dumpbin"
11639 fi
11640 rm -f conftest*
11641fi
5213506e
RW
11642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
11643$as_echo "$lt_cv_nm_interface" >&6; }
da0f6381 11644
5213506e
RW
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
11646$as_echo_n "checking whether ln -s works... " >&6; }
da0f6381
PB
11647LN_S=$as_ln_s
11648if test "$LN_S" = "ln -s"; then
5213506e
RW
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11650$as_echo "yes" >&6; }
da0f6381 11651else
5213506e
RW
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
11653$as_echo "no, using $LN_S" >&6; }
da0f6381
PB
11654fi
11655
11656# find the maximum length of command line arguments
5213506e
RW
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
11658$as_echo_n "checking the maximum length of command line arguments... " >&6; }
11659if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
11660 $as_echo_n "(cached) " >&6
da0f6381
PB
11661else
11662 i=0
11663 teststring="ABCD"
11664
11665 case $build_os in
11666 msdosdjgpp*)
11667 # On DJGPP, this test can blow up pretty badly due to problems in libc
11668 # (any single argument exceeding 2000 bytes causes a buffer overrun
11669 # during glob expansion). Even if it were fixed, the result of this
11670 # check would be larger than it should be.
11671 lt_cv_sys_max_cmd_len=12288; # 12K is about right
11672 ;;
11673
11674 gnu*)
11675 # Under GNU Hurd, this test is not required because there is
11676 # no limit to the length of command line arguments.
11677 # Libtool will interpret -1 as no limit whatsoever
11678 lt_cv_sys_max_cmd_len=-1;
11679 ;;
11680
5d47bb02 11681 cygwin* | mingw* | cegcc*)
da0f6381
PB
11682 # On Win9x/ME, this test blows up -- it succeeds, but takes
11683 # about 5 minutes as the teststring grows exponentially.
11684 # Worse, since 9x/ME are not pre-emptively multitasking,
11685 # you end up with a "frozen" computer, even though with patience
11686 # the test eventually succeeds (with a max line length of 256k).
11687 # Instead, let's just punt: use the minimum linelength reported by
11688 # all of the supported platforms: 8192 (on NT/2K/XP).
11689 lt_cv_sys_max_cmd_len=8192;
11690 ;;
11691
43e02a8a
RW
11692 mint*)
11693 # On MiNT this can take a long time and run out of memory.
11694 lt_cv_sys_max_cmd_len=8192;
11695 ;;
11696
da0f6381
PB
11697 amigaos*)
11698 # On AmigaOS with pdksh, this test takes hours, literally.
11699 # So we just punt and use a minimum line length of 8192.
11700 lt_cv_sys_max_cmd_len=8192;
11701 ;;
11702
11703 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
11704 # This has been around since 386BSD, at least. Likely further.
11705 if test -x /sbin/sysctl; then
11706 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
11707 elif test -x /usr/sbin/sysctl; then
11708 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
11709 else
11710 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
11711 fi
11712 # And add a safety zone
11713 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11714 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11715 ;;
11716
11717 interix*)
11718 # We know the value 262144 and hardcode it with a safety zone (like BSD)
11719 lt_cv_sys_max_cmd_len=196608
11720 ;;
11721
11722 osf*)
11723 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
11724 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
11725 # nice to cause kernel panics so lets avoid the loop below.
11726 # First set a reasonable default.
11727 lt_cv_sys_max_cmd_len=16384
11728 #
11729 if test -x /sbin/sysconfig; then
11730 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
11731 *1*) lt_cv_sys_max_cmd_len=-1 ;;
11732 esac
11733 fi
11734 ;;
11735 sco3.2v5*)
11736 lt_cv_sys_max_cmd_len=102400
11737 ;;
11738 sysv5* | sco5v6* | sysv4.2uw2*)
11739 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
11740 if test -n "$kargmax"; then
11741 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
11742 else
11743 lt_cv_sys_max_cmd_len=32768
11744 fi
11745 ;;
11746 *)
5d47bb02
PG
11747 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
11748 if test -n "$lt_cv_sys_max_cmd_len"; then
da0f6381
PB
11749 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
11750 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
11751 else
11752 # Make teststring a little bigger before we do anything with it.
11753 # a 1K string should be a reasonable start.
11754 for i in 1 2 3 4 5 6 7 8 ; do
11755 teststring=$teststring$teststring
11756 done
11757 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
11758 # If test is not a shell built-in, we'll probably end up computing a
11759 # maximum length that is only half of the actual maximum length, but
11760 # we can't tell.
43e02a8a
RW
11761 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
11762 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
da0f6381
PB
11763 test $i != 17 # 1/2 MB should be enough
11764 do
11765 i=`expr $i + 1`
11766 teststring=$teststring$teststring
11767 done
11768 # Only check the string length outside the loop.
11769 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
11770 teststring=
11771 # Add a significant safety factor because C++ compilers can tack on
11772 # massive amounts of additional arguments before passing them to the
11773 # linker. It appears as though 1/2 is a usable value.
11774 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
11775 fi
11776 ;;
11777 esac
11778
11779fi
11780
11781if test -n $lt_cv_sys_max_cmd_len ; then
5213506e
RW
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
11783$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
da0f6381 11784else
5213506e
RW
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11786$as_echo "none" >&6; }
da0f6381
PB
11787fi
11788max_cmd_len=$lt_cv_sys_max_cmd_len
11789
11790
11791
11792
11793
11794
da0f6381
PB
11795: ${CP="cp -f"}
11796: ${MV="mv -f"}
11797: ${RM="rm -f"}
11798
5213506e
RW
11799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
11800$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
da0f6381
PB
11801# Try some XSI features
11802xsi_shell=no
11803( _lt_dummy="a/b/c"
11804 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5d47bb02
PG
11805 = c,a/b,, \
11806 && eval 'test $(( 1 + 1 )) -eq 2 \
11807 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
da0f6381 11808 && xsi_shell=yes
5213506e
RW
11809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
11810$as_echo "$xsi_shell" >&6; }
da0f6381
PB
11811
11812
5213506e
RW
11813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
11814$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
da0f6381
PB
11815lt_shell_append=no
11816( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
11817 >/dev/null 2>&1 \
11818 && lt_shell_append=yes
5213506e
RW
11819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
11820$as_echo "$lt_shell_append" >&6; }
da0f6381
PB
11821
11822
11823if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11824 lt_unset=unset
11825else
11826 lt_unset=false
11827fi
11828
11829
11830
11831
11832
11833# test EBCDIC or ASCII
11834case `echo X|tr X '\101'` in
11835 A) # ASCII based system
11836 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
11837 lt_SP2NL='tr \040 \012'
11838 lt_NL2SP='tr \015\012 \040\040'
11839 ;;
11840 *) # EBCDIC based system
11841 lt_SP2NL='tr \100 \n'
11842 lt_NL2SP='tr \r\n \100\100'
11843 ;;
11844esac
11845
11846
11847
11848
11849
11850
11851
11852
11853
5213506e
RW
11854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
11855$as_echo_n "checking for $LD option to reload object files... " >&6; }
11856if test "${lt_cv_ld_reload_flag+set}" = set; then :
11857 $as_echo_n "(cached) " >&6
da0f6381
PB
11858else
11859 lt_cv_ld_reload_flag='-r'
11860fi
5213506e
RW
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
11862$as_echo "$lt_cv_ld_reload_flag" >&6; }
da0f6381
PB
11863reload_flag=$lt_cv_ld_reload_flag
11864case $reload_flag in
11865"" | " "*) ;;
11866*) reload_flag=" $reload_flag" ;;
11867esac
11868reload_cmds='$LD$reload_flag -o $output$reload_objs'
11869case $host_os in
11870 darwin*)
11871 if test "$GCC" = yes; then
11872 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
11873 else
11874 reload_cmds='$LD$reload_flag -o $output$reload_objs'
11875 fi
11876 ;;
11877esac
11878
11879
11880
11881
11882
11883
11884
11885
11886
5d47bb02
PG
11887if test -n "$ac_tool_prefix"; then
11888 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
11889set dummy ${ac_tool_prefix}objdump; ac_word=$2
5213506e
RW
11890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11891$as_echo_n "checking for $ac_word... " >&6; }
11892if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
11893 $as_echo_n "(cached) " >&6
5d47bb02
PG
11894else
11895 if test -n "$OBJDUMP"; then
11896 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
11897else
11898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11899for as_dir in $PATH
11900do
11901 IFS=$as_save_IFS
11902 test -z "$as_dir" && as_dir=.
5213506e
RW
11903 for ac_exec_ext in '' $ac_executable_extensions; do
11904 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11905 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5213506e 11906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11907 break 2
11908 fi
11909done
5213506e
RW
11910 done
11911IFS=$as_save_IFS
5d47bb02
PG
11912
11913fi
11914fi
11915OBJDUMP=$ac_cv_prog_OBJDUMP
11916if test -n "$OBJDUMP"; then
5213506e
RW
11917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
11918$as_echo "$OBJDUMP" >&6; }
5d47bb02 11919else
5213506e
RW
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
5d47bb02
PG
11922fi
11923
5213506e 11924
5d47bb02
PG
11925fi
11926if test -z "$ac_cv_prog_OBJDUMP"; then
11927 ac_ct_OBJDUMP=$OBJDUMP
11928 # Extract the first word of "objdump", so it can be a program name with args.
11929set dummy objdump; ac_word=$2
5213506e
RW
11930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11931$as_echo_n "checking for $ac_word... " >&6; }
11932if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
11933 $as_echo_n "(cached) " >&6
5d47bb02
PG
11934else
11935 if test -n "$ac_ct_OBJDUMP"; then
11936 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
11937else
11938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11939for as_dir in $PATH
11940do
11941 IFS=$as_save_IFS
11942 test -z "$as_dir" && as_dir=.
5213506e
RW
11943 for ac_exec_ext in '' $ac_executable_extensions; do
11944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 11945 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5213506e 11946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
11947 break 2
11948 fi
11949done
5213506e
RW
11950 done
11951IFS=$as_save_IFS
5d47bb02 11952
5d47bb02
PG
11953fi
11954fi
11955ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
11956if test -n "$ac_ct_OBJDUMP"; then
5213506e
RW
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
11958$as_echo "$ac_ct_OBJDUMP" >&6; }
5d47bb02 11959else
5213506e
RW
11960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11961$as_echo "no" >&6; }
5d47bb02
PG
11962fi
11963
5213506e
RW
11964 if test "x$ac_ct_OBJDUMP" = x; then
11965 OBJDUMP="false"
11966 else
11967 case $cross_compiling:$ac_tool_warned in
11968yes:)
11969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11971ac_tool_warned=yes ;;
11972esac
11973 OBJDUMP=$ac_ct_OBJDUMP
11974 fi
5d47bb02
PG
11975else
11976 OBJDUMP="$ac_cv_prog_OBJDUMP"
11977fi
11978
11979test -z "$OBJDUMP" && OBJDUMP=objdump
11980
11981
11982
11983
11984
11985
11986
11987
da0f6381 11988
5213506e
RW
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
11990$as_echo_n "checking how to recognize dependent libraries... " >&6; }
11991if test "${lt_cv_deplibs_check_method+set}" = set; then :
11992 $as_echo_n "(cached) " >&6
da0f6381
PB
11993else
11994 lt_cv_file_magic_cmd='$MAGIC_CMD'
11995lt_cv_file_magic_test_file=
11996lt_cv_deplibs_check_method='unknown'
11997# Need to set the preceding variable on all platforms that support
11998# interlibrary dependencies.
11999# 'none' -- dependencies not supported.
12000# `unknown' -- same as none, but documents that we really don't know.
12001# 'pass_all' -- all dependencies passed with no checks.
12002# 'test_compile' -- check by making test program.
12003# 'file_magic [[regex]]' -- check by looking for files in library path
12004# which responds to the $file_magic_cmd with a given extended regex.
12005# If you have `file' or equivalent on your system and you're not sure
12006# whether `pass_all' will *always* work, you probably want this one.
12007
12008case $host_os in
12009aix[4-9]*)
12010 lt_cv_deplibs_check_method=pass_all
12011 ;;
12012
12013beos*)
12014 lt_cv_deplibs_check_method=pass_all
12015 ;;
12016
12017bsdi[45]*)
12018 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
12019 lt_cv_file_magic_cmd='/usr/bin/file -L'
12020 lt_cv_file_magic_test_file=/shlib/libc.so
12021 ;;
12022
12023cygwin*)
12024 # func_win32_libid is a shell function defined in ltmain.sh
12025 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
12026 lt_cv_file_magic_cmd='func_win32_libid'
12027 ;;
12028
12029mingw* | pw32*)
12030 # Base MSYS/MinGW do not provide the 'file' command needed by
12031 # func_win32_libid shell function, so use a weaker test based on 'objdump',
12032 # unless we find 'file', for example because we are cross-compiling.
43e02a8a
RW
12033 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
12034 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
da0f6381
PB
12035 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
12036 lt_cv_file_magic_cmd='func_win32_libid'
12037 else
12038 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
12039 lt_cv_file_magic_cmd='$OBJDUMP -f'
12040 fi
12041 ;;
12042
43e02a8a 12043cegcc*)
5d47bb02
PG
12044 # use the weaker test based on 'objdump'. See mingw*.
12045 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
12046 lt_cv_file_magic_cmd='$OBJDUMP -f'
12047 ;;
12048
da0f6381
PB
12049darwin* | rhapsody*)
12050 lt_cv_deplibs_check_method=pass_all
12051 ;;
12052
12053freebsd* | dragonfly*)
12054 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
12055 case $host_cpu in
12056 i*86 )
12057 # Not sure whether the presence of OpenBSD here was a mistake.
12058 # Let's accept both of them until this is cleared up.
12059 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
12060 lt_cv_file_magic_cmd=/usr/bin/file
12061 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
12062 ;;
12063 esac
12064 else
12065 lt_cv_deplibs_check_method=pass_all
12066 fi
12067 ;;
12068
12069gnu*)
12070 lt_cv_deplibs_check_method=pass_all
12071 ;;
12072
43e02a8a
RW
12073haiku*)
12074 lt_cv_deplibs_check_method=pass_all
12075 ;;
12076
da0f6381
PB
12077hpux10.20* | hpux11*)
12078 lt_cv_file_magic_cmd=/usr/bin/file
12079 case $host_cpu in
12080 ia64*)
12081 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
12082 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
12083 ;;
12084 hppa*64*)
43e02a8a 12085 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
12086 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
12087 ;;
12088 *)
43e02a8a 12089 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
da0f6381
PB
12090 lt_cv_file_magic_test_file=/usr/lib/libc.sl
12091 ;;
12092 esac
12093 ;;
12094
12095interix[3-9]*)
12096 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
12097 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
12098 ;;
12099
12100irix5* | irix6* | nonstopux*)
12101 case $LD in
12102 *-32|*"-32 ") libmagic=32-bit;;
12103 *-n32|*"-n32 ") libmagic=N32;;
12104 *-64|*"-64 ") libmagic=64-bit;;
12105 *) libmagic=never-match;;
12106 esac
12107 lt_cv_deplibs_check_method=pass_all
12108 ;;
12109
12110# This must be Linux ELF.
7a9d3fe8 12111linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
12112 lt_cv_deplibs_check_method=pass_all
12113 ;;
12114
12115netbsd*)
12116 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
12117 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12118 else
12119 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
12120 fi
12121 ;;
12122
12123newos6*)
12124 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
12125 lt_cv_file_magic_cmd=/usr/bin/file
12126 lt_cv_file_magic_test_file=/usr/lib/libnls.so
12127 ;;
12128
12129*nto* | *qnx*)
12130 lt_cv_deplibs_check_method=pass_all
12131 ;;
12132
12133openbsd*)
12134 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12135 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
12136 else
12137 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
12138 fi
12139 ;;
12140
12141osf3* | osf4* | osf5*)
12142 lt_cv_deplibs_check_method=pass_all
12143 ;;
12144
12145rdos*)
12146 lt_cv_deplibs_check_method=pass_all
12147 ;;
12148
12149solaris*)
12150 lt_cv_deplibs_check_method=pass_all
12151 ;;
12152
12153sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12154 lt_cv_deplibs_check_method=pass_all
12155 ;;
12156
12157sysv4 | sysv4.3*)
12158 case $host_vendor in
12159 motorola)
12160 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]'
12161 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
12162 ;;
12163 ncr)
12164 lt_cv_deplibs_check_method=pass_all
12165 ;;
12166 sequent)
12167 lt_cv_file_magic_cmd='/bin/file'
12168 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
12169 ;;
12170 sni)
12171 lt_cv_file_magic_cmd='/bin/file'
12172 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
12173 lt_cv_file_magic_test_file=/lib/libc.so
12174 ;;
12175 siemens)
12176 lt_cv_deplibs_check_method=pass_all
12177 ;;
12178 pc)
12179 lt_cv_deplibs_check_method=pass_all
12180 ;;
12181 esac
12182 ;;
12183
12184tpf*)
12185 lt_cv_deplibs_check_method=pass_all
12186 ;;
12187esac
12188
12189fi
5213506e
RW
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
12191$as_echo "$lt_cv_deplibs_check_method" >&6; }
da0f6381
PB
12192file_magic_cmd=$lt_cv_file_magic_cmd
12193deplibs_check_method=$lt_cv_deplibs_check_method
12194test -z "$deplibs_check_method" && deplibs_check_method=unknown
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207if test -n "$ac_tool_prefix"; then
12208 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
12209set dummy ${ac_tool_prefix}ar; ac_word=$2
5213506e
RW
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12211$as_echo_n "checking for $ac_word... " >&6; }
12212if test "${ac_cv_prog_AR+set}" = set; then :
12213 $as_echo_n "(cached) " >&6
da0f6381
PB
12214else
12215 if test -n "$AR"; then
12216 ac_cv_prog_AR="$AR" # Let the user override the test.
12217else
12218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12219for as_dir in $PATH
12220do
12221 IFS=$as_save_IFS
12222 test -z "$as_dir" && as_dir=.
5213506e
RW
12223 for ac_exec_ext in '' $ac_executable_extensions; do
12224 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12225 ac_cv_prog_AR="${ac_tool_prefix}ar"
5213506e 12226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12227 break 2
12228 fi
12229done
5213506e
RW
12230 done
12231IFS=$as_save_IFS
da0f6381
PB
12232
12233fi
12234fi
12235AR=$ac_cv_prog_AR
12236if test -n "$AR"; then
5213506e
RW
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
12238$as_echo "$AR" >&6; }
da0f6381 12239else
5213506e
RW
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12241$as_echo "no" >&6; }
da0f6381
PB
12242fi
12243
5213506e 12244
da0f6381
PB
12245fi
12246if test -z "$ac_cv_prog_AR"; then
12247 ac_ct_AR=$AR
12248 # Extract the first word of "ar", so it can be a program name with args.
12249set dummy ar; ac_word=$2
5213506e
RW
12250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12251$as_echo_n "checking for $ac_word... " >&6; }
12252if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
12253 $as_echo_n "(cached) " >&6
da0f6381
PB
12254else
12255 if test -n "$ac_ct_AR"; then
12256 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
12257else
12258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12259for as_dir in $PATH
12260do
12261 IFS=$as_save_IFS
12262 test -z "$as_dir" && as_dir=.
5213506e
RW
12263 for ac_exec_ext in '' $ac_executable_extensions; do
12264 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12265 ac_cv_prog_ac_ct_AR="ar"
5213506e 12266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12267 break 2
12268 fi
12269done
5213506e
RW
12270 done
12271IFS=$as_save_IFS
da0f6381 12272
da0f6381
PB
12273fi
12274fi
12275ac_ct_AR=$ac_cv_prog_ac_ct_AR
12276if test -n "$ac_ct_AR"; then
5213506e
RW
12277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
12278$as_echo "$ac_ct_AR" >&6; }
da0f6381 12279else
5213506e
RW
12280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12281$as_echo "no" >&6; }
da0f6381
PB
12282fi
12283
5213506e
RW
12284 if test "x$ac_ct_AR" = x; then
12285 AR="false"
12286 else
12287 case $cross_compiling:$ac_tool_warned in
12288yes:)
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12291ac_tool_warned=yes ;;
12292esac
12293 AR=$ac_ct_AR
12294 fi
da0f6381
PB
12295else
12296 AR="$ac_cv_prog_AR"
12297fi
12298
12299test -z "$AR" && AR=ar
12300test -z "$AR_FLAGS" && AR_FLAGS=cru
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312if test -n "$ac_tool_prefix"; then
12313 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
12314set dummy ${ac_tool_prefix}strip; ac_word=$2
5213506e
RW
12315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12316$as_echo_n "checking for $ac_word... " >&6; }
12317if test "${ac_cv_prog_STRIP+set}" = set; then :
12318 $as_echo_n "(cached) " >&6
da0f6381
PB
12319else
12320 if test -n "$STRIP"; then
12321 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
12322else
12323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12324for as_dir in $PATH
12325do
12326 IFS=$as_save_IFS
12327 test -z "$as_dir" && as_dir=.
5213506e
RW
12328 for ac_exec_ext in '' $ac_executable_extensions; do
12329 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12330 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5213506e 12331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12332 break 2
12333 fi
12334done
5213506e
RW
12335 done
12336IFS=$as_save_IFS
da0f6381
PB
12337
12338fi
12339fi
12340STRIP=$ac_cv_prog_STRIP
12341if test -n "$STRIP"; then
5213506e
RW
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
12343$as_echo "$STRIP" >&6; }
da0f6381 12344else
5213506e
RW
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12346$as_echo "no" >&6; }
da0f6381
PB
12347fi
12348
5213506e 12349
da0f6381
PB
12350fi
12351if test -z "$ac_cv_prog_STRIP"; then
12352 ac_ct_STRIP=$STRIP
12353 # Extract the first word of "strip", so it can be a program name with args.
12354set dummy strip; ac_word=$2
5213506e
RW
12355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12356$as_echo_n "checking for $ac_word... " >&6; }
12357if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
12358 $as_echo_n "(cached) " >&6
da0f6381
PB
12359else
12360 if test -n "$ac_ct_STRIP"; then
12361 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
12362else
12363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12364for as_dir in $PATH
12365do
12366 IFS=$as_save_IFS
12367 test -z "$as_dir" && as_dir=.
5213506e
RW
12368 for ac_exec_ext in '' $ac_executable_extensions; do
12369 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12370 ac_cv_prog_ac_ct_STRIP="strip"
5213506e 12371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12372 break 2
12373 fi
12374done
5213506e
RW
12375 done
12376IFS=$as_save_IFS
da0f6381 12377
da0f6381
PB
12378fi
12379fi
12380ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
12381if test -n "$ac_ct_STRIP"; then
5213506e
RW
12382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
12383$as_echo "$ac_ct_STRIP" >&6; }
da0f6381 12384else
5213506e
RW
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12386$as_echo "no" >&6; }
da0f6381
PB
12387fi
12388
5213506e
RW
12389 if test "x$ac_ct_STRIP" = x; then
12390 STRIP=":"
12391 else
12392 case $cross_compiling:$ac_tool_warned in
12393yes:)
12394{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12395$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12396ac_tool_warned=yes ;;
12397esac
12398 STRIP=$ac_ct_STRIP
12399 fi
da0f6381
PB
12400else
12401 STRIP="$ac_cv_prog_STRIP"
12402fi
12403
12404test -z "$STRIP" && STRIP=:
12405
12406
12407
12408
12409
12410
12411if test -n "$ac_tool_prefix"; then
12412 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
12413set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12415$as_echo_n "checking for $ac_word... " >&6; }
12416if test "${ac_cv_prog_RANLIB+set}" = set; then :
12417 $as_echo_n "(cached) " >&6
da0f6381
PB
12418else
12419 if test -n "$RANLIB"; then
12420 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
12421else
12422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423for as_dir in $PATH
12424do
12425 IFS=$as_save_IFS
12426 test -z "$as_dir" && as_dir=.
5213506e
RW
12427 for ac_exec_ext in '' $ac_executable_extensions; do
12428 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12429 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 12430 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12431 break 2
12432 fi
12433done
5213506e
RW
12434 done
12435IFS=$as_save_IFS
da0f6381
PB
12436
12437fi
12438fi
12439RANLIB=$ac_cv_prog_RANLIB
12440if test -n "$RANLIB"; then
5213506e
RW
12441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
12442$as_echo "$RANLIB" >&6; }
da0f6381 12443else
5213506e
RW
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445$as_echo "no" >&6; }
da0f6381
PB
12446fi
12447
5213506e 12448
da0f6381
PB
12449fi
12450if test -z "$ac_cv_prog_RANLIB"; then
12451 ac_ct_RANLIB=$RANLIB
12452 # Extract the first word of "ranlib", so it can be a program name with args.
12453set dummy ranlib; ac_word=$2
5213506e
RW
12454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455$as_echo_n "checking for $ac_word... " >&6; }
12456if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
12457 $as_echo_n "(cached) " >&6
da0f6381
PB
12458else
12459 if test -n "$ac_ct_RANLIB"; then
12460 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
12461else
12462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12463for as_dir in $PATH
12464do
12465 IFS=$as_save_IFS
12466 test -z "$as_dir" && as_dir=.
5213506e
RW
12467 for ac_exec_ext in '' $ac_executable_extensions; do
12468 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 12469 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 12470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
12471 break 2
12472 fi
12473done
5213506e
RW
12474 done
12475IFS=$as_save_IFS
da0f6381 12476
da0f6381
PB
12477fi
12478fi
12479ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
12480if test -n "$ac_ct_RANLIB"; then
5213506e
RW
12481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
12482$as_echo "$ac_ct_RANLIB" >&6; }
da0f6381 12483else
5213506e
RW
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12485$as_echo "no" >&6; }
da0f6381
PB
12486fi
12487
5213506e
RW
12488 if test "x$ac_ct_RANLIB" = x; then
12489 RANLIB=":"
12490 else
12491 case $cross_compiling:$ac_tool_warned in
12492yes:)
12493{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12494$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12495ac_tool_warned=yes ;;
12496esac
12497 RANLIB=$ac_ct_RANLIB
12498 fi
da0f6381
PB
12499else
12500 RANLIB="$ac_cv_prog_RANLIB"
12501fi
12502
12503test -z "$RANLIB" && RANLIB=:
12504
12505
12506
12507
12508
12509
12510# Determine commands to create old-style static archives.
5d47bb02 12511old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
da0f6381
PB
12512old_postinstall_cmds='chmod 644 $oldlib'
12513old_postuninstall_cmds=
12514
12515if test -n "$RANLIB"; then
12516 case $host_os in
12517 openbsd*)
12518 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
12519 ;;
12520 *)
12521 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
12522 ;;
12523 esac
12524 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
12525fi
12526
43e02a8a
RW
12527case $host_os in
12528 darwin*)
12529 lock_old_archive_extraction=yes ;;
12530 *)
12531 lock_old_archive_extraction=no ;;
12532esac
12533
12534
12535
12536
12537
12538
da0f6381
PB
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572# If no C compiler was specified, use CC.
12573LTCC=${LTCC-"$CC"}
12574
12575# If no C compiler flags were specified, use CFLAGS.
12576LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12577
12578# Allow CC to be a program name with arguments.
12579compiler=$CC
12580
12581
12582# Check for command to grab the raw symbol name followed by C symbol from nm.
5213506e
RW
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
12584$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
12585if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
12586 $as_echo_n "(cached) " >&6
da0f6381
PB
12587else
12588
12589# These are sane defaults that work on at least a few old systems.
12590# [They come from Ultrix. What could be older than Ultrix?!! ;)]
12591
12592# Character class describing NM global symbol codes.
12593symcode='[BCDEGRST]'
12594
12595# Regexp to match symbols that can be accessed directly from C.
12596sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
12597
12598# Define system-specific variables.
12599case $host_os in
12600aix*)
12601 symcode='[BCDT]'
12602 ;;
5d47bb02 12603cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
12604 symcode='[ABCDGISTW]'
12605 ;;
12606hpux*)
12607 if test "$host_cpu" = ia64; then
12608 symcode='[ABCDEGRST]'
12609 fi
12610 ;;
12611irix* | nonstopux*)
12612 symcode='[BCDEGRST]'
12613 ;;
12614osf*)
12615 symcode='[BCDEGQRST]'
12616 ;;
12617solaris*)
12618 symcode='[BDRT]'
12619 ;;
12620sco3.2v5*)
12621 symcode='[DT]'
12622 ;;
12623sysv4.2uw2*)
12624 symcode='[DT]'
12625 ;;
12626sysv5* | sco5v6* | unixware* | OpenUNIX*)
12627 symcode='[ABDT]'
12628 ;;
12629sysv4)
12630 symcode='[DFNSTU]'
12631 ;;
12632esac
12633
12634# If we're using GNU nm, then use its standard symbol codes.
12635case `$NM -V 2>&1` in
12636*GNU* | *'with BFD'*)
12637 symcode='[ABCDGIRSTW]' ;;
12638esac
12639
12640# Transform an extracted symbol line into a proper C declaration.
12641# Some systems (esp. on ia64) link data and code symbols differently,
12642# so use this general approach.
12643lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
12644
12645# Transform an extracted symbol line into symbol name and symbol address
12646lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5d47bb02 12647lt_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
12648
12649# Handle CRLF in mingw tool chain
12650opt_cr=
12651case $build_os in
12652mingw*)
12653 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
12654 ;;
12655esac
12656
12657# Try without a prefix underscore, then with it.
12658for ac_symprfx in "" "_"; do
12659
12660 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
12661 symxfrm="\\1 $ac_symprfx\\2 \\2"
12662
12663 # Write the raw and C identifiers.
12664 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
12665 # Fake it for dumpbin and say T for any non-static function
12666 # and D for any global variable.
12667 # Also find C++ and __fastcall symbols from MSVC++,
12668 # which start with @ or ?.
12669 lt_cv_sys_global_symbol_pipe="$AWK '"\
12670" {last_section=section; section=\$ 3};"\
12671" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
12672" \$ 0!~/External *\|/{next};"\
12673" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
12674" {if(hide[section]) next};"\
12675" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
12676" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
12677" s[1]~/^[@?]/{print s[1], s[1]; next};"\
12678" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
12679" ' prfx=^$ac_symprfx"
12680 else
12681 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
12682 fi
12683
12684 # Check to see that the pipe works correctly.
12685 pipe_works=no
12686
12687 rm -f conftest*
12688 cat > conftest.$ac_ext <<_LT_EOF
12689#ifdef __cplusplus
12690extern "C" {
12691#endif
12692char nm_test_var;
12693void nm_test_func(void);
12694void nm_test_func(void){}
12695#ifdef __cplusplus
12696}
12697#endif
12698int main(){nm_test_var='a';nm_test_func();return(0);}
12699_LT_EOF
12700
5213506e 12701 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12702 (eval $ac_compile) 2>&5
12703 ac_status=$?
5213506e
RW
12704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12705 test $ac_status = 0; }; then
da0f6381
PB
12706 # Now try to grab the symbols.
12707 nlist=conftest.nm
43e02a8a
RW
12708 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
12709 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
da0f6381 12710 ac_status=$?
5213506e
RW
12711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12712 test $ac_status = 0; } && test -s "$nlist"; then
da0f6381
PB
12713 # Try sorting and uniquifying the output.
12714 if sort "$nlist" | uniq > "$nlist"T; then
12715 mv -f "$nlist"T "$nlist"
12716 else
12717 rm -f "$nlist"T
12718 fi
12719
12720 # Make sure that we snagged all the symbols we need.
12721 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
12722 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
12723 cat <<_LT_EOF > conftest.$ac_ext
12724#ifdef __cplusplus
12725extern "C" {
12726#endif
12727
12728_LT_EOF
12729 # Now generate the symbol file.
12730 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
12731
12732 cat <<_LT_EOF >> conftest.$ac_ext
12733
12734/* The mapping between symbol names and symbols. */
12735const struct {
12736 const char *name;
12737 void *address;
12738}
12739lt__PROGRAM__LTX_preloaded_symbols[] =
12740{
12741 { "@PROGRAM@", (void *) 0 },
12742_LT_EOF
12743 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
12744 cat <<\_LT_EOF >> conftest.$ac_ext
12745 {0, (void *) 0}
12746};
12747
12748/* This works around a problem in FreeBSD linker */
12749#ifdef FREEBSD_WORKAROUND
12750static const void *lt_preloaded_setup() {
12751 return lt__PROGRAM__LTX_preloaded_symbols;
12752}
12753#endif
12754
12755#ifdef __cplusplus
12756}
12757#endif
12758_LT_EOF
12759 # Now try linking the two files.
12760 mv conftest.$ac_objext conftstm.$ac_objext
12761 lt_save_LIBS="$LIBS"
12762 lt_save_CFLAGS="$CFLAGS"
12763 LIBS="conftstm.$ac_objext"
12764 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
5213506e 12765 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
da0f6381
PB
12766 (eval $ac_link) 2>&5
12767 ac_status=$?
5213506e
RW
12768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12769 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
da0f6381
PB
12770 pipe_works=yes
12771 fi
12772 LIBS="$lt_save_LIBS"
12773 CFLAGS="$lt_save_CFLAGS"
12774 else
12775 echo "cannot find nm_test_func in $nlist" >&5
12776 fi
12777 else
12778 echo "cannot find nm_test_var in $nlist" >&5
12779 fi
12780 else
12781 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
12782 fi
12783 else
12784 echo "$progname: failed program was:" >&5
12785 cat conftest.$ac_ext >&5
12786 fi
5d47bb02 12787 rm -rf conftest* conftst*
da0f6381
PB
12788
12789 # Do not use the global_symbol_pipe unless it works.
12790 if test "$pipe_works" = yes; then
12791 break
12792 else
12793 lt_cv_sys_global_symbol_pipe=
12794 fi
12795done
12796
12797fi
12798
12799if test -z "$lt_cv_sys_global_symbol_pipe"; then
12800 lt_cv_sys_global_symbol_to_cdecl=
12801fi
12802if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5213506e
RW
12803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12804$as_echo "failed" >&6; }
da0f6381 12805else
5213506e
RW
12806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12807$as_echo "ok" >&6; }
da0f6381
PB
12808fi
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
5d47bb02
PG
12824
12825
12826
12827
12828
da0f6381
PB
12829
12830
5213506e
RW
12831# Check whether --enable-libtool-lock was given.
12832if test "${enable_libtool_lock+set}" = set; then :
12833 enableval=$enable_libtool_lock;
12834fi
da0f6381 12835
da0f6381
PB
12836test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
12837
12838# Some flags need to be propagated to the compiler or linker for good
12839# libtool support.
12840case $host in
12841ia64-*-hpux*)
12842 # Find out which ABI we are using.
12843 echo 'int i;' > conftest.$ac_ext
5213506e 12844 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12845 (eval $ac_compile) 2>&5
12846 ac_status=$?
5213506e
RW
12847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12848 test $ac_status = 0; }; then
da0f6381
PB
12849 case `/usr/bin/file conftest.$ac_objext` in
12850 *ELF-32*)
12851 HPUX_IA64_MODE="32"
12852 ;;
12853 *ELF-64*)
12854 HPUX_IA64_MODE="64"
12855 ;;
12856 esac
12857 fi
12858 rm -rf conftest*
12859 ;;
12860*-*-irix6*)
12861 # Find out which ABI we are using.
43e02a8a 12862 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
5213506e 12863 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12864 (eval $ac_compile) 2>&5
12865 ac_status=$?
5213506e
RW
12866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12867 test $ac_status = 0; }; then
da0f6381
PB
12868 if test "$lt_cv_prog_gnu_ld" = yes; then
12869 case `/usr/bin/file conftest.$ac_objext` in
12870 *32-bit*)
12871 LD="${LD-ld} -melf32bsmip"
12872 ;;
12873 *N32*)
12874 LD="${LD-ld} -melf32bmipn32"
12875 ;;
12876 *64-bit*)
12877 LD="${LD-ld} -melf64bmip"
12878 ;;
12879 esac
12880 else
12881 case `/usr/bin/file conftest.$ac_objext` in
12882 *32-bit*)
12883 LD="${LD-ld} -32"
12884 ;;
12885 *N32*)
12886 LD="${LD-ld} -n32"
12887 ;;
12888 *64-bit*)
12889 LD="${LD-ld} -64"
12890 ;;
12891 esac
12892 fi
12893 fi
12894 rm -rf conftest*
12895 ;;
12896
12897x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
12898s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
12899 # Find out which ABI we are using.
12900 echo 'int i;' > conftest.$ac_ext
5213506e 12901 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
12902 (eval $ac_compile) 2>&5
12903 ac_status=$?
5213506e
RW
12904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12905 test $ac_status = 0; }; then
da0f6381
PB
12906 case `/usr/bin/file conftest.o` in
12907 *32-bit*)
12908 case $host in
12909 x86_64-*kfreebsd*-gnu)
12910 LD="${LD-ld} -m elf_i386_fbsd"
12911 ;;
12912 x86_64-*linux*)
12913 LD="${LD-ld} -m elf_i386"
12914 ;;
12915 ppc64-*linux*|powerpc64-*linux*)
12916 LD="${LD-ld} -m elf32ppclinux"
12917 ;;
12918 s390x-*linux*)
12919 LD="${LD-ld} -m elf_s390"
12920 ;;
12921 sparc64-*linux*)
12922 LD="${LD-ld} -m elf32_sparc"
12923 ;;
12924 esac
12925 ;;
12926 *64-bit*)
12927 case $host in
12928 x86_64-*kfreebsd*-gnu)
12929 LD="${LD-ld} -m elf_x86_64_fbsd"
12930 ;;
12931 x86_64-*linux*)
12932 LD="${LD-ld} -m elf_x86_64"
12933 ;;
12934 ppc*-*linux*|powerpc*-*linux*)
12935 LD="${LD-ld} -m elf64ppc"
12936 ;;
12937 s390*-*linux*|s390*-*tpf*)
12938 LD="${LD-ld} -m elf64_s390"
12939 ;;
12940 sparc*-*linux*)
12941 LD="${LD-ld} -m elf64_sparc"
12942 ;;
12943 esac
12944 ;;
12945 esac
12946 fi
12947 rm -rf conftest*
12948 ;;
12949
12950*-*-sco3.2v5*)
12951 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
12952 SAVE_CFLAGS="$CFLAGS"
12953 CFLAGS="$CFLAGS -belf"
5213506e
RW
12954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
12955$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
12956if test "${lt_cv_cc_needs_belf+set}" = set; then :
12957 $as_echo_n "(cached) " >&6
da0f6381
PB
12958else
12959 ac_ext=c
12960ac_cpp='$CPP $CPPFLAGS'
12961ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12962ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12963ac_compiler_gnu=$ac_cv_c_compiler_gnu
12964
5213506e 12965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
12966/* end confdefs.h. */
12967
12968int
12969main ()
12970{
12971
12972 ;
12973 return 0;
12974}
12975_ACEOF
5213506e 12976if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
12977 lt_cv_cc_needs_belf=yes
12978else
5213506e 12979 lt_cv_cc_needs_belf=no
da0f6381 12980fi
5213506e
RW
12981rm -f core conftest.err conftest.$ac_objext \
12982 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
12983 ac_ext=c
12984ac_cpp='$CPP $CPPFLAGS'
12985ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12986ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12987ac_compiler_gnu=$ac_cv_c_compiler_gnu
12988
12989fi
5213506e
RW
12990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
12991$as_echo "$lt_cv_cc_needs_belf" >&6; }
da0f6381
PB
12992 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
12993 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
12994 CFLAGS="$SAVE_CFLAGS"
12995 fi
12996 ;;
12997sparc*-*solaris*)
12998 # Find out which ABI we are using.
12999 echo 'int i;' > conftest.$ac_ext
5213506e 13000 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
da0f6381
PB
13001 (eval $ac_compile) 2>&5
13002 ac_status=$?
5213506e
RW
13003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13004 test $ac_status = 0; }; then
da0f6381
PB
13005 case `/usr/bin/file conftest.o` in
13006 *64-bit*)
13007 case $lt_cv_prog_gnu_ld in
13008 yes*) LD="${LD-ld} -m elf64_sparc" ;;
5d47bb02
PG
13009 *)
13010 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
13011 LD="${LD-ld} -64"
13012 fi
13013 ;;
da0f6381
PB
13014 esac
13015 ;;
13016 esac
13017 fi
13018 rm -rf conftest*
13019 ;;
13020esac
13021
5d47bb02
PG
13022need_locks="$enable_libtool_lock"
13023
13024
13025 case $host_os in
13026 rhapsody* | darwin*)
13027 if test -n "$ac_tool_prefix"; then
13028 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
13029set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
5213506e
RW
13030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13031$as_echo_n "checking for $ac_word... " >&6; }
13032if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
13033 $as_echo_n "(cached) " >&6
5d47bb02
PG
13034else
13035 if test -n "$DSYMUTIL"; then
13036 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
13037else
13038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13039for as_dir in $PATH
13040do
13041 IFS=$as_save_IFS
13042 test -z "$as_dir" && as_dir=.
5213506e
RW
13043 for ac_exec_ext in '' $ac_executable_extensions; do
13044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13045 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
5213506e 13046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13047 break 2
13048 fi
13049done
5213506e
RW
13050 done
13051IFS=$as_save_IFS
5d47bb02
PG
13052
13053fi
13054fi
13055DSYMUTIL=$ac_cv_prog_DSYMUTIL
13056if test -n "$DSYMUTIL"; then
5213506e
RW
13057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
13058$as_echo "$DSYMUTIL" >&6; }
5d47bb02 13059else
5213506e
RW
13060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13061$as_echo "no" >&6; }
5d47bb02
PG
13062fi
13063
5213506e 13064
5d47bb02
PG
13065fi
13066if test -z "$ac_cv_prog_DSYMUTIL"; then
13067 ac_ct_DSYMUTIL=$DSYMUTIL
13068 # Extract the first word of "dsymutil", so it can be a program name with args.
13069set dummy dsymutil; ac_word=$2
5213506e
RW
13070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13071$as_echo_n "checking for $ac_word... " >&6; }
13072if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
13073 $as_echo_n "(cached) " >&6
5d47bb02
PG
13074else
13075 if test -n "$ac_ct_DSYMUTIL"; then
13076 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
13077else
13078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13079for as_dir in $PATH
13080do
13081 IFS=$as_save_IFS
13082 test -z "$as_dir" && as_dir=.
5213506e
RW
13083 for ac_exec_ext in '' $ac_executable_extensions; do
13084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13085 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
5213506e 13086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13087 break 2
13088 fi
13089done
5213506e
RW
13090 done
13091IFS=$as_save_IFS
5d47bb02 13092
5d47bb02
PG
13093fi
13094fi
13095ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
13096if test -n "$ac_ct_DSYMUTIL"; then
5213506e
RW
13097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
13098$as_echo "$ac_ct_DSYMUTIL" >&6; }
5d47bb02 13099else
5213506e
RW
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101$as_echo "no" >&6; }
5d47bb02
PG
13102fi
13103
5213506e
RW
13104 if test "x$ac_ct_DSYMUTIL" = x; then
13105 DSYMUTIL=":"
13106 else
13107 case $cross_compiling:$ac_tool_warned in
13108yes:)
13109{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13110$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13111ac_tool_warned=yes ;;
13112esac
13113 DSYMUTIL=$ac_ct_DSYMUTIL
13114 fi
5d47bb02
PG
13115else
13116 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
13117fi
13118
13119 if test -n "$ac_tool_prefix"; then
13120 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
13121set dummy ${ac_tool_prefix}nmedit; ac_word=$2
5213506e
RW
13122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13123$as_echo_n "checking for $ac_word... " >&6; }
13124if test "${ac_cv_prog_NMEDIT+set}" = set; then :
13125 $as_echo_n "(cached) " >&6
5d47bb02
PG
13126else
13127 if test -n "$NMEDIT"; then
13128 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
13129else
13130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133 IFS=$as_save_IFS
13134 test -z "$as_dir" && as_dir=.
5213506e
RW
13135 for ac_exec_ext in '' $ac_executable_extensions; do
13136 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13137 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
5213506e 13138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13139 break 2
13140 fi
13141done
5213506e
RW
13142 done
13143IFS=$as_save_IFS
5d47bb02
PG
13144
13145fi
13146fi
13147NMEDIT=$ac_cv_prog_NMEDIT
13148if test -n "$NMEDIT"; then
5213506e
RW
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
13150$as_echo "$NMEDIT" >&6; }
5d47bb02 13151else
5213506e
RW
13152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13153$as_echo "no" >&6; }
5d47bb02
PG
13154fi
13155
5213506e 13156
5d47bb02
PG
13157fi
13158if test -z "$ac_cv_prog_NMEDIT"; then
13159 ac_ct_NMEDIT=$NMEDIT
13160 # Extract the first word of "nmedit", so it can be a program name with args.
13161set dummy nmedit; ac_word=$2
5213506e
RW
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13163$as_echo_n "checking for $ac_word... " >&6; }
13164if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
13165 $as_echo_n "(cached) " >&6
5d47bb02
PG
13166else
13167 if test -n "$ac_ct_NMEDIT"; then
13168 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
13169else
13170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13171for as_dir in $PATH
13172do
13173 IFS=$as_save_IFS
13174 test -z "$as_dir" && as_dir=.
5213506e
RW
13175 for ac_exec_ext in '' $ac_executable_extensions; do
13176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13177 ac_cv_prog_ac_ct_NMEDIT="nmedit"
5213506e 13178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13179 break 2
13180 fi
13181done
5213506e
RW
13182 done
13183IFS=$as_save_IFS
5d47bb02 13184
5d47bb02
PG
13185fi
13186fi
13187ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
13188if test -n "$ac_ct_NMEDIT"; then
5213506e
RW
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
13190$as_echo "$ac_ct_NMEDIT" >&6; }
5d47bb02 13191else
5213506e
RW
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13193$as_echo "no" >&6; }
5d47bb02
PG
13194fi
13195
5213506e
RW
13196 if test "x$ac_ct_NMEDIT" = x; then
13197 NMEDIT=":"
13198 else
13199 case $cross_compiling:$ac_tool_warned in
13200yes:)
13201{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13202$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13203ac_tool_warned=yes ;;
13204esac
13205 NMEDIT=$ac_ct_NMEDIT
13206 fi
5d47bb02
PG
13207else
13208 NMEDIT="$ac_cv_prog_NMEDIT"
13209fi
13210
13211 if test -n "$ac_tool_prefix"; then
13212 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
13213set dummy ${ac_tool_prefix}lipo; ac_word=$2
5213506e
RW
13214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13215$as_echo_n "checking for $ac_word... " >&6; }
13216if test "${ac_cv_prog_LIPO+set}" = set; then :
13217 $as_echo_n "(cached) " >&6
5d47bb02
PG
13218else
13219 if test -n "$LIPO"; then
13220 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
13221else
13222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13223for as_dir in $PATH
13224do
13225 IFS=$as_save_IFS
13226 test -z "$as_dir" && as_dir=.
5213506e
RW
13227 for ac_exec_ext in '' $ac_executable_extensions; do
13228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13229 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
5213506e 13230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13231 break 2
13232 fi
13233done
5213506e
RW
13234 done
13235IFS=$as_save_IFS
5d47bb02
PG
13236
13237fi
13238fi
13239LIPO=$ac_cv_prog_LIPO
13240if test -n "$LIPO"; then
5213506e
RW
13241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
13242$as_echo "$LIPO" >&6; }
5d47bb02 13243else
5213506e
RW
13244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13245$as_echo "no" >&6; }
5d47bb02
PG
13246fi
13247
5213506e 13248
5d47bb02
PG
13249fi
13250if test -z "$ac_cv_prog_LIPO"; then
13251 ac_ct_LIPO=$LIPO
13252 # Extract the first word of "lipo", so it can be a program name with args.
13253set dummy lipo; ac_word=$2
5213506e
RW
13254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13255$as_echo_n "checking for $ac_word... " >&6; }
13256if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
13257 $as_echo_n "(cached) " >&6
5d47bb02
PG
13258else
13259 if test -n "$ac_ct_LIPO"; then
13260 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
13261else
13262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263for as_dir in $PATH
13264do
13265 IFS=$as_save_IFS
13266 test -z "$as_dir" && as_dir=.
5213506e
RW
13267 for ac_exec_ext in '' $ac_executable_extensions; do
13268 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13269 ac_cv_prog_ac_ct_LIPO="lipo"
5213506e 13270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13271 break 2
13272 fi
13273done
5213506e
RW
13274 done
13275IFS=$as_save_IFS
5d47bb02 13276
5d47bb02
PG
13277fi
13278fi
13279ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
13280if test -n "$ac_ct_LIPO"; then
5213506e
RW
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
13282$as_echo "$ac_ct_LIPO" >&6; }
5d47bb02 13283else
5213506e
RW
13284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13285$as_echo "no" >&6; }
5d47bb02
PG
13286fi
13287
5213506e
RW
13288 if test "x$ac_ct_LIPO" = x; then
13289 LIPO=":"
13290 else
13291 case $cross_compiling:$ac_tool_warned in
13292yes:)
13293{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13294$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13295ac_tool_warned=yes ;;
13296esac
13297 LIPO=$ac_ct_LIPO
13298 fi
5d47bb02
PG
13299else
13300 LIPO="$ac_cv_prog_LIPO"
13301fi
13302
13303 if test -n "$ac_tool_prefix"; then
13304 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
13305set dummy ${ac_tool_prefix}otool; ac_word=$2
5213506e
RW
13306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13307$as_echo_n "checking for $ac_word... " >&6; }
13308if test "${ac_cv_prog_OTOOL+set}" = set; then :
13309 $as_echo_n "(cached) " >&6
5d47bb02
PG
13310else
13311 if test -n "$OTOOL"; then
13312 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
13313else
13314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13315for as_dir in $PATH
13316do
13317 IFS=$as_save_IFS
13318 test -z "$as_dir" && as_dir=.
5213506e
RW
13319 for ac_exec_ext in '' $ac_executable_extensions; do
13320 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13321 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
5213506e 13322 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13323 break 2
13324 fi
13325done
5213506e
RW
13326 done
13327IFS=$as_save_IFS
5d47bb02
PG
13328
13329fi
13330fi
13331OTOOL=$ac_cv_prog_OTOOL
13332if test -n "$OTOOL"; then
5213506e
RW
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
13334$as_echo "$OTOOL" >&6; }
5d47bb02 13335else
5213506e
RW
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13337$as_echo "no" >&6; }
5d47bb02
PG
13338fi
13339
5213506e 13340
5d47bb02
PG
13341fi
13342if test -z "$ac_cv_prog_OTOOL"; then
13343 ac_ct_OTOOL=$OTOOL
13344 # Extract the first word of "otool", so it can be a program name with args.
13345set dummy otool; ac_word=$2
5213506e
RW
13346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13347$as_echo_n "checking for $ac_word... " >&6; }
13348if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
13349 $as_echo_n "(cached) " >&6
5d47bb02
PG
13350else
13351 if test -n "$ac_ct_OTOOL"; then
13352 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
13353else
13354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13355for as_dir in $PATH
13356do
13357 IFS=$as_save_IFS
13358 test -z "$as_dir" && as_dir=.
5213506e
RW
13359 for ac_exec_ext in '' $ac_executable_extensions; do
13360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13361 ac_cv_prog_ac_ct_OTOOL="otool"
5213506e 13362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13363 break 2
13364 fi
13365done
5213506e
RW
13366 done
13367IFS=$as_save_IFS
5d47bb02 13368
5d47bb02
PG
13369fi
13370fi
13371ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
13372if test -n "$ac_ct_OTOOL"; then
5213506e
RW
13373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
13374$as_echo "$ac_ct_OTOOL" >&6; }
5d47bb02 13375else
5213506e
RW
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13377$as_echo "no" >&6; }
5d47bb02
PG
13378fi
13379
5213506e
RW
13380 if test "x$ac_ct_OTOOL" = x; then
13381 OTOOL=":"
13382 else
13383 case $cross_compiling:$ac_tool_warned in
13384yes:)
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13386$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13387ac_tool_warned=yes ;;
13388esac
13389 OTOOL=$ac_ct_OTOOL
13390 fi
5d47bb02
PG
13391else
13392 OTOOL="$ac_cv_prog_OTOOL"
13393fi
13394
13395 if test -n "$ac_tool_prefix"; then
13396 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
13397set dummy ${ac_tool_prefix}otool64; ac_word=$2
5213506e
RW
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13399$as_echo_n "checking for $ac_word... " >&6; }
13400if test "${ac_cv_prog_OTOOL64+set}" = set; then :
13401 $as_echo_n "(cached) " >&6
5d47bb02
PG
13402else
13403 if test -n "$OTOOL64"; then
13404 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
13405else
13406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13407for as_dir in $PATH
13408do
13409 IFS=$as_save_IFS
13410 test -z "$as_dir" && as_dir=.
5213506e
RW
13411 for ac_exec_ext in '' $ac_executable_extensions; do
13412 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13413 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
5213506e 13414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13415 break 2
13416 fi
13417done
5213506e
RW
13418 done
13419IFS=$as_save_IFS
5d47bb02
PG
13420
13421fi
13422fi
13423OTOOL64=$ac_cv_prog_OTOOL64
13424if test -n "$OTOOL64"; then
5213506e
RW
13425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
13426$as_echo "$OTOOL64" >&6; }
5d47bb02 13427else
5213506e
RW
13428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13429$as_echo "no" >&6; }
5d47bb02
PG
13430fi
13431
5213506e 13432
5d47bb02
PG
13433fi
13434if test -z "$ac_cv_prog_OTOOL64"; then
13435 ac_ct_OTOOL64=$OTOOL64
13436 # Extract the first word of "otool64", so it can be a program name with args.
13437set dummy otool64; ac_word=$2
5213506e
RW
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13439$as_echo_n "checking for $ac_word... " >&6; }
13440if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
13441 $as_echo_n "(cached) " >&6
5d47bb02
PG
13442else
13443 if test -n "$ac_ct_OTOOL64"; then
13444 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
13445else
13446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13447for as_dir in $PATH
13448do
13449 IFS=$as_save_IFS
13450 test -z "$as_dir" && as_dir=.
5213506e
RW
13451 for ac_exec_ext in '' $ac_executable_extensions; do
13452 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5d47bb02 13453 ac_cv_prog_ac_ct_OTOOL64="otool64"
5213506e 13454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5d47bb02
PG
13455 break 2
13456 fi
13457done
5213506e
RW
13458 done
13459IFS=$as_save_IFS
5d47bb02 13460
5d47bb02
PG
13461fi
13462fi
13463ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
13464if test -n "$ac_ct_OTOOL64"; then
5213506e
RW
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
13466$as_echo "$ac_ct_OTOOL64" >&6; }
5d47bb02 13467else
5213506e
RW
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13469$as_echo "no" >&6; }
5d47bb02
PG
13470fi
13471
5213506e
RW
13472 if test "x$ac_ct_OTOOL64" = x; then
13473 OTOOL64=":"
13474 else
13475 case $cross_compiling:$ac_tool_warned in
13476yes:)
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13479ac_tool_warned=yes ;;
13480esac
13481 OTOOL64=$ac_ct_OTOOL64
13482 fi
5d47bb02
PG
13483else
13484 OTOOL64="$ac_cv_prog_OTOOL64"
13485fi
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
5213506e
RW
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
13514$as_echo_n "checking for -single_module linker flag... " >&6; }
13515if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
13516 $as_echo_n "(cached) " >&6
5d47bb02
PG
13517else
13518 lt_cv_apple_cc_single_mod=no
13519 if test -z "${LT_MULTI_MODULE}"; then
13520 # By default we will add the -single_module flag. You can override
13521 # by either setting the environment variable LT_MULTI_MODULE
13522 # non-empty at configure time, or by adding -multi_module to the
13523 # link flags.
13524 rm -rf libconftest.dylib*
13525 echo "int foo(void){return 1;}" > conftest.c
13526 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13527-dynamiclib -Wl,-single_module conftest.c" >&5
13528 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13529 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
13530 _lt_result=$?
13531 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
13532 lt_cv_apple_cc_single_mod=yes
13533 else
13534 cat conftest.err >&5
13535 fi
13536 rm -rf libconftest.dylib*
13537 rm -f conftest.*
13538 fi
13539fi
5213506e
RW
13540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
13541$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
13542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
13543$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
13544if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
13545 $as_echo_n "(cached) " >&6
5d47bb02
PG
13546else
13547 lt_cv_ld_exported_symbols_list=no
13548 save_LDFLAGS=$LDFLAGS
13549 echo "_main" > conftest.sym
13550 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
5213506e 13551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5d47bb02
PG
13552/* end confdefs.h. */
13553
13554int
13555main ()
13556{
13557
13558 ;
13559 return 0;
13560}
13561_ACEOF
5213506e 13562if ac_fn_c_try_link "$LINENO"; then :
5d47bb02
PG
13563 lt_cv_ld_exported_symbols_list=yes
13564else
5213506e 13565 lt_cv_ld_exported_symbols_list=no
5d47bb02 13566fi
5213506e
RW
13567rm -f core conftest.err conftest.$ac_objext \
13568 conftest$ac_exeext conftest.$ac_ext
5d47bb02
PG
13569 LDFLAGS="$save_LDFLAGS"
13570
13571fi
5213506e
RW
13572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
13573$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
43e02a8a
RW
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
13575$as_echo_n "checking for -force_load linker flag... " >&6; }
13576if test "${lt_cv_ld_force_load+set}" = set; then :
13577 $as_echo_n "(cached) " >&6
13578else
13579 lt_cv_ld_force_load=no
13580 cat > conftest.c << _LT_EOF
13581int forced_loaded() { return 2;}
13582_LT_EOF
13583 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
13584 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
13585 echo "$AR cru libconftest.a conftest.o" >&5
13586 $AR cru libconftest.a conftest.o 2>&5
13587 cat > conftest.c << _LT_EOF
13588int main() { return 0;}
13589_LT_EOF
13590 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
13591 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
13592 _lt_result=$?
13593 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
13594 lt_cv_ld_force_load=yes
13595 else
13596 cat conftest.err >&5
13597 fi
13598 rm -f conftest.err libconftest.a conftest conftest.c
13599 rm -rf conftest.dSYM
13600
13601fi
13602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
13603$as_echo "$lt_cv_ld_force_load" >&6; }
5d47bb02
PG
13604 case $host_os in
13605 rhapsody* | darwin1.[012])
13606 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
13607 darwin1.*)
13608 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13609 darwin*) # darwin 5.x on
13610 # if running on 10.5 or later, the deployment target defaults
13611 # to the OS version, if on x86, and 10.4, the deployment
13612 # target defaults to 10.4. Don't you love it?
13613 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
13614 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
13615 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13616 10.[012]*)
13617 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
13618 10.*)
13619 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
13620 esac
13621 ;;
13622 esac
13623 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
13624 _lt_dar_single_mod='$single_module'
13625 fi
13626 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
13627 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
13628 else
13629 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
13630 fi
43e02a8a 13631 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
5d47bb02
PG
13632 _lt_dsymutil='~$DSYMUTIL $lib || :'
13633 else
13634 _lt_dsymutil=
13635 fi
13636 ;;
13637 esac
da0f6381 13638
da0f6381 13639for ac_header in dlfcn.h
5213506e
RW
13640do :
13641 ac_fn_c_check_header_preproc "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h"
13642if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
da0f6381 13643 cat >>confdefs.h <<_ACEOF
5213506e 13644#define HAVE_DLFCN_H 1
da0f6381
PB
13645_ACEOF
13646
13647fi
13648done
13649
13650
13651
5d47bb02
PG
13652
13653
5213506e 13654
43e02a8a 13655# Set options
5d47bb02 13656
43e02a8a
RW
13657
13658
13659 enable_dlopen=no
13660
13661
13662 enable_win32_dll=no
13663
13664
13665 # Check whether --enable-shared was given.
13666if test "${enable_shared+set}" = set; then :
13667 enableval=$enable_shared; p=${PACKAGE-default}
13668 case $enableval in
13669 yes) enable_shared=yes ;;
13670 no) enable_shared=no ;;
13671 *)
13672 enable_shared=no
13673 # Look at the argument we got. We use all the common list separators.
13674 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13675 for pkg in $enableval; do
13676 IFS="$lt_save_ifs"
13677 if test "X$pkg" = "X$p"; then
13678 enable_shared=yes
13679 fi
13680 done
13681 IFS="$lt_save_ifs"
13682 ;;
13683 esac
5d47bb02 13684else
43e02a8a 13685 enable_shared=yes
5213506e
RW
13686fi
13687
da0f6381
PB
13688
13689
13690
13691
13692
da0f6381 13693
da0f6381 13694
da0f6381 13695
5213506e
RW
13696 # Check whether --enable-static was given.
13697if test "${enable_static+set}" = set; then :
13698 enableval=$enable_static; p=${PACKAGE-default}
00020c16
ILT
13699 case $enableval in
13700 yes) enable_static=yes ;;
13701 no) enable_static=no ;;
13702 *)
13703 enable_static=no
13704 # Look at the argument we got. We use all the common list separators.
13705 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13706 for pkg in $enableval; do
13707 IFS="$lt_save_ifs"
13708 if test "X$pkg" = "X$p"; then
13709 enable_static=yes
13710 fi
13711 done
13712 IFS="$lt_save_ifs"
13713 ;;
13714 esac
da0f6381 13715else
00020c16 13716 enable_static=yes
5213506e 13717fi
da0f6381
PB
13718
13719
da0f6381 13720
da0f6381 13721
da0f6381 13722
da0f6381
PB
13723
13724
da0f6381 13725
da0f6381 13726
5213506e
RW
13727
13728# Check whether --with-pic was given.
13729if test "${with_pic+set}" = set; then :
13730 withval=$with_pic; pic_mode="$withval"
00020c16
ILT
13731else
13732 pic_mode=default
5213506e
RW
13733fi
13734
da0f6381 13735
00020c16 13736test -z "$pic_mode" && pic_mode=default
da0f6381
PB
13737
13738
13739
13740
13741
13742
13743
5213506e
RW
13744 # Check whether --enable-fast-install was given.
13745if test "${enable_fast_install+set}" = set; then :
13746 enableval=$enable_fast_install; p=${PACKAGE-default}
00020c16
ILT
13747 case $enableval in
13748 yes) enable_fast_install=yes ;;
13749 no) enable_fast_install=no ;;
13750 *)
13751 enable_fast_install=no
13752 # Look at the argument we got. We use all the common list separators.
13753 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
13754 for pkg in $enableval; do
13755 IFS="$lt_save_ifs"
13756 if test "X$pkg" = "X$p"; then
13757 enable_fast_install=yes
13758 fi
13759 done
13760 IFS="$lt_save_ifs"
13761 ;;
13762 esac
13763else
13764 enable_fast_install=yes
5213506e
RW
13765fi
13766
da0f6381 13767
da0f6381 13768
da0f6381 13769
da0f6381 13770
da0f6381 13771
da0f6381
PB
13772
13773
da0f6381 13774
da0f6381 13775
da0f6381 13776
00020c16
ILT
13777# This can be used to rebuild libtool when needed
13778LIBTOOL_DEPS="$ltmain"
da0f6381 13779
00020c16
ILT
13780# Always use our own libtool.
13781LIBTOOL='$(SHELL) $(top_builddir)/libtool'
da0f6381 13782
da0f6381 13783
da0f6381
PB
13784
13785
13786
13787
13788
13789
da0f6381 13790
da0f6381 13791
da0f6381 13792
da0f6381 13793
da0f6381 13794
da0f6381 13795
da0f6381 13796
da0f6381 13797
da0f6381 13798
da0f6381 13799
da0f6381 13800
da0f6381 13801
da0f6381 13802
da0f6381 13803
da0f6381 13804
43e02a8a 13805
da0f6381 13806
da0f6381 13807
00020c16 13808test -z "$LN_S" && LN_S="ln -s"
da0f6381 13809
da0f6381 13810
da0f6381 13811
da0f6381 13812
da0f6381 13813
da0f6381 13814
da0f6381 13815
da0f6381 13816
da0f6381 13817
da0f6381 13818
da0f6381 13819
da0f6381 13820
da0f6381 13821
da0f6381 13822
00020c16
ILT
13823if test -n "${ZSH_VERSION+set}" ; then
13824 setopt NO_GLOB_SUBST
13825fi
da0f6381 13826
5213506e
RW
13827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
13828$as_echo_n "checking for objdir... " >&6; }
13829if test "${lt_cv_objdir+set}" = set; then :
13830 $as_echo_n "(cached) " >&6
00020c16
ILT
13831else
13832 rm -f .libs 2>/dev/null
13833mkdir .libs 2>/dev/null
13834if test -d .libs; then
13835 lt_cv_objdir=.libs
13836else
13837 # MS-DOS does not allow filenames that begin with a dot.
13838 lt_cv_objdir=_libs
13839fi
13840rmdir .libs 2>/dev/null
13841fi
5213506e
RW
13842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
13843$as_echo "$lt_cv_objdir" >&6; }
00020c16 13844objdir=$lt_cv_objdir
da0f6381
PB
13845
13846
13847
13848
da0f6381 13849
00020c16
ILT
13850cat >>confdefs.h <<_ACEOF
13851#define LT_OBJDIR "$lt_cv_objdir/"
13852_ACEOF
da0f6381 13853
da0f6381 13854
da0f6381
PB
13855
13856
00020c16
ILT
13857case $host_os in
13858aix3*)
13859 # AIX sometimes has problems with the GCC collect2 program. For some
13860 # reason, if we set the COLLECT_NAMES environment variable, the problems
13861 # vanish in a puff of smoke.
13862 if test "X${COLLECT_NAMES+set}" != Xset; then
13863 COLLECT_NAMES=
13864 export COLLECT_NAMES
13865 fi
13866 ;;
13867esac
da0f6381 13868
00020c16
ILT
13869# Global variables:
13870ofile=libtool
13871can_build_shared=yes
da0f6381 13872
00020c16
ILT
13873# All known linkers require a `.a' archive for static linking (except MSVC,
13874# which needs '.lib').
13875libext=a
da0f6381 13876
00020c16 13877with_gnu_ld="$lt_cv_prog_gnu_ld"
da0f6381 13878
00020c16
ILT
13879old_CC="$CC"
13880old_CFLAGS="$CFLAGS"
da0f6381 13881
00020c16
ILT
13882# Set sane defaults for various variables
13883test -z "$CC" && CC=cc
13884test -z "$LTCC" && LTCC=$CC
13885test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13886test -z "$LD" && LD=ld
13887test -z "$ac_objext" && ac_objext=o
da0f6381 13888
00020c16
ILT
13889for cc_temp in $compiler""; do
13890 case $cc_temp in
13891 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13892 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13893 \-*) ;;
13894 *) break;;
13895 esac
13896done
43e02a8a 13897cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
da0f6381
PB
13898
13899
00020c16
ILT
13900# Only perform the check for file, if the check method requires it
13901test -z "$MAGIC_CMD" && MAGIC_CMD=file
13902case $deplibs_check_method in
13903file_magic*)
13904 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5213506e
RW
13905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
13906$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
13907if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
13908 $as_echo_n "(cached) " >&6
da0f6381 13909else
00020c16
ILT
13910 case $MAGIC_CMD in
13911[\\/*] | ?:[\\/]*)
13912 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
13913 ;;
13914*)
13915 lt_save_MAGIC_CMD="$MAGIC_CMD"
13916 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13917 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13918 for ac_dir in $ac_dummy; do
13919 IFS="$lt_save_ifs"
13920 test -z "$ac_dir" && ac_dir=.
13921 if test -f $ac_dir/${ac_tool_prefix}file; then
13922 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
13923 if test -n "$file_magic_test_file"; then
13924 case $deplibs_check_method in
13925 "file_magic "*)
13926 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13927 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13928 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13929 $EGREP "$file_magic_regex" > /dev/null; then
13930 :
13931 else
13932 cat <<_LT_EOF 1>&2
da0f6381 13933
00020c16
ILT
13934*** Warning: the command libtool uses to detect shared libraries,
13935*** $file_magic_cmd, produces output that libtool cannot recognize.
13936*** The result is that libtool may fail to recognize shared libraries
13937*** as such. This will affect the creation of libtool libraries that
13938*** depend on shared libraries, but programs linked with such libtool
13939*** libraries will work regardless of this problem. Nevertheless, you
13940*** may want to report the problem to your system manager and/or to
13941*** bug-libtool@gnu.org
da0f6381 13942
00020c16
ILT
13943_LT_EOF
13944 fi ;;
13945 esac
13946 fi
13947 break
13948 fi
13949 done
13950 IFS="$lt_save_ifs"
13951 MAGIC_CMD="$lt_save_MAGIC_CMD"
13952 ;;
13953esac
13954fi
da0f6381 13955
00020c16
ILT
13956MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13957if test -n "$MAGIC_CMD"; then
5213506e
RW
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
13959$as_echo "$MAGIC_CMD" >&6; }
00020c16 13960else
5213506e
RW
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13962$as_echo "no" >&6; }
00020c16 13963fi
da0f6381
PB
13964
13965
13966
da0f6381 13967
da0f6381 13968
00020c16
ILT
13969if test -z "$lt_cv_path_MAGIC_CMD"; then
13970 if test -n "$ac_tool_prefix"; then
5213506e
RW
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
13972$as_echo_n "checking for file... " >&6; }
13973if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
13974 $as_echo_n "(cached) " >&6
00020c16
ILT
13975else
13976 case $MAGIC_CMD in
13977[\\/*] | ?:[\\/]*)
13978 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
13979 ;;
13980*)
13981 lt_save_MAGIC_CMD="$MAGIC_CMD"
13982 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13983 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13984 for ac_dir in $ac_dummy; do
13985 IFS="$lt_save_ifs"
13986 test -z "$ac_dir" && ac_dir=.
13987 if test -f $ac_dir/file; then
13988 lt_cv_path_MAGIC_CMD="$ac_dir/file"
13989 if test -n "$file_magic_test_file"; then
13990 case $deplibs_check_method in
13991 "file_magic "*)
13992 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13993 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
13994 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13995 $EGREP "$file_magic_regex" > /dev/null; then
13996 :
13997 else
13998 cat <<_LT_EOF 1>&2
da0f6381 13999
00020c16
ILT
14000*** Warning: the command libtool uses to detect shared libraries,
14001*** $file_magic_cmd, produces output that libtool cannot recognize.
14002*** The result is that libtool may fail to recognize shared libraries
14003*** as such. This will affect the creation of libtool libraries that
14004*** depend on shared libraries, but programs linked with such libtool
14005*** libraries will work regardless of this problem. Nevertheless, you
14006*** may want to report the problem to your system manager and/or to
14007*** bug-libtool@gnu.org
da0f6381 14008
00020c16
ILT
14009_LT_EOF
14010 fi ;;
14011 esac
14012 fi
14013 break
da0f6381 14014 fi
00020c16
ILT
14015 done
14016 IFS="$lt_save_ifs"
14017 MAGIC_CMD="$lt_save_MAGIC_CMD"
14018 ;;
14019esac
14020fi
da0f6381 14021
00020c16
ILT
14022MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
14023if test -n "$MAGIC_CMD"; then
5213506e
RW
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
14025$as_echo "$MAGIC_CMD" >&6; }
00020c16 14026else
5213506e
RW
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14028$as_echo "no" >&6; }
00020c16 14029fi
da0f6381 14030
da0f6381 14031
00020c16
ILT
14032 else
14033 MAGIC_CMD=:
14034 fi
14035fi
da0f6381 14036
00020c16
ILT
14037 fi
14038 ;;
14039esac
da0f6381 14040
00020c16 14041# Use C for the default configuration in the libtool script
da0f6381 14042
00020c16
ILT
14043lt_save_CC="$CC"
14044ac_ext=c
14045ac_cpp='$CPP $CPPFLAGS'
14046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14048ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 14049
da0f6381 14050
00020c16
ILT
14051# Source file extension for C test sources.
14052ac_ext=c
da0f6381 14053
00020c16
ILT
14054# Object file extension for compiled C test sources.
14055objext=o
14056objext=$objext
da0f6381 14057
00020c16
ILT
14058# Code to be used in simple compile tests
14059lt_simple_compile_test_code="int some_variable = 0;"
5d47bb02 14060
00020c16
ILT
14061# Code to be used in simple link tests
14062lt_simple_link_test_code='int main(){return(0);}'
da0f6381 14063
da0f6381 14064
da0f6381 14065
da0f6381 14066
00020c16
ILT
14067
14068
14069
14070# If no C compiler was specified, use CC.
14071LTCC=${LTCC-"$CC"}
14072
14073# If no C compiler flags were specified, use CFLAGS.
14074LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
14075
14076# Allow CC to be a program name with arguments.
14077compiler=$CC
14078
14079# Save the default compiler, since it gets overwritten when the other
14080# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
14081compiler_DEFAULT=$CC
14082
14083# save warnings/boilerplate of simple test code
14084ac_outfile=conftest.$ac_objext
14085echo "$lt_simple_compile_test_code" >conftest.$ac_ext
14086eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14087_lt_compiler_boilerplate=`cat conftest.err`
14088$RM conftest*
14089
14090ac_outfile=conftest.$ac_objext
14091echo "$lt_simple_link_test_code" >conftest.$ac_ext
14092eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14093_lt_linker_boilerplate=`cat conftest.err`
14094$RM -r conftest*
14095
14096
14097## CAVEAT EMPTOR:
14098## There is no encapsulation within the following macros, do not change
14099## the running order or otherwise move them around unless you know exactly
14100## what you are doing...
14101if test -n "$compiler"; then
14102
14103lt_prog_compiler_no_builtin_flag=
14104
14105if test "$GCC" = yes; then
43e02a8a
RW
14106 case $cc_basename in
14107 nvcc*)
14108 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
14109 *)
14110 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
14111 esac
00020c16 14112
5213506e
RW
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
14114$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
14115if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
14116 $as_echo_n "(cached) " >&6
00020c16
ILT
14117else
14118 lt_cv_prog_compiler_rtti_exceptions=no
14119 ac_outfile=conftest.$ac_objext
14120 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14121 lt_compiler_flag="-fno-rtti -fno-exceptions"
14122 # Insert the option either (1) after the last *FLAGS variable, or
14123 # (2) before a word containing "conftest.", or (3) at the end.
14124 # Note that $ac_compile itself does not contain backslashes and begins
14125 # with a dollar sign (not a hyphen), so the echo should work correctly.
14126 # The option is referenced via a variable to avoid confusing sed.
14127 lt_compile=`echo "$ac_compile" | $SED \
14128 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14129 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14130 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14131 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14132 (eval "$lt_compile" 2>conftest.err)
14133 ac_status=$?
14134 cat conftest.err >&5
43e02a8a 14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14136 if (exit $ac_status) && test -s "$ac_outfile"; then
14137 # The compiler can only warn and ignore the option if not recognized
14138 # So say no if there are warnings other than the usual output.
43e02a8a 14139 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
14140 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14141 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14142 lt_cv_prog_compiler_rtti_exceptions=yes
14143 fi
14144 fi
14145 $RM conftest*
14146
14147fi
5213506e
RW
14148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
14149$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
00020c16
ILT
14150
14151if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
14152 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
14153else
14154 :
14155fi
14156
14157fi
14158
14159
14160
14161
14162
14163
14164 lt_prog_compiler_wl=
14165lt_prog_compiler_pic=
14166lt_prog_compiler_static=
14167
5213506e
RW
14168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
14169$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
14170
14171 if test "$GCC" = yes; then
14172 lt_prog_compiler_wl='-Wl,'
14173 lt_prog_compiler_static='-static'
14174
14175 case $host_os in
14176 aix*)
14177 # All AIX code is PIC.
14178 if test "$host_cpu" = ia64; then
14179 # AIX 5 now supports IA64 processor
14180 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14181 fi
14182 ;;
14183
00020c16
ILT
14184 amigaos*)
14185 case $host_cpu in
14186 powerpc)
14187 # see comment about AmigaOS4 .so support
14188 lt_prog_compiler_pic='-fPIC'
14189 ;;
14190 m68k)
14191 # FIXME: we need at least 68020 code to build shared libraries, but
14192 # adding the `-m68020' flag to GCC prevents building anything better,
14193 # like `-m68040'.
14194 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
14195 ;;
14196 esac
14197 ;;
da0f6381 14198
00020c16
ILT
14199 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14200 # PIC is the default for these OSes.
14201 ;;
da0f6381 14202
00020c16
ILT
14203 mingw* | cygwin* | pw32* | os2* | cegcc*)
14204 # This hack is so that the source file can tell whether it is being
14205 # built for inclusion in a dll (and should export symbols for example).
14206 # Although the cygwin gcc ignores -fPIC, still need this for old-style
14207 # (--disable-auto-import) libraries
14208 lt_prog_compiler_pic='-DDLL_EXPORT'
14209 ;;
14210
14211 darwin* | rhapsody*)
14212 # PIC is the default on this platform
14213 # Common symbols not allowed in MH_DYLIB files
14214 lt_prog_compiler_pic='-fno-common'
14215 ;;
14216
43e02a8a
RW
14217 haiku*)
14218 # PIC is the default for Haiku.
14219 # The "-static" flag exists, but is broken.
14220 lt_prog_compiler_static=
14221 ;;
14222
00020c16
ILT
14223 hpux*)
14224 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
14225 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
14226 # sets the default TLS model and affects inlining.
14227 case $host_cpu in
14228 hppa*64*)
14229 # +Z the default
da0f6381 14230 ;;
00020c16
ILT
14231 *)
14232 lt_prog_compiler_pic='-fPIC'
da0f6381
PB
14233 ;;
14234 esac
14235 ;;
14236
00020c16
ILT
14237 interix[3-9]*)
14238 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14239 # Instead, we relocate shared libraries at runtime.
da0f6381
PB
14240 ;;
14241
00020c16
ILT
14242 msdosdjgpp*)
14243 # Just because we use GCC doesn't mean we suddenly get shared libraries
14244 # on systems that don't support them.
14245 lt_prog_compiler_can_build_shared=no
14246 enable_shared=no
da0f6381 14247 ;;
da0f6381 14248
00020c16
ILT
14249 *nto* | *qnx*)
14250 # QNX uses GNU C++, but need to define -shared option too, otherwise
14251 # it will coredump.
14252 lt_prog_compiler_pic='-fPIC -shared'
14253 ;;
14254
14255 sysv4*MP*)
14256 if test -d /usr/nec; then
14257 lt_prog_compiler_pic=-Kconform_pic
da0f6381
PB
14258 fi
14259 ;;
14260
43e02a8a
RW
14261 *)
14262 lt_prog_compiler_pic='-fPIC'
14263 ;;
14264 esac
14265
14266 case $cc_basename in
14267 nvcc*) # Cuda Compiler Driver 2.2
14268 lt_prog_compiler_wl='-Xlinker '
14269 lt_prog_compiler_pic='-Xcompiler -fPIC'
00020c16
ILT
14270 ;;
14271 esac
14272 else
14273 # PORTME Check for flag to pass linker flags through the system compiler.
14274 case $host_os in
14275 aix*)
14276 lt_prog_compiler_wl='-Wl,'
da0f6381 14277 if test "$host_cpu" = ia64; then
00020c16
ILT
14278 # AIX 5 now supports IA64 processor
14279 lt_prog_compiler_static='-Bstatic'
da0f6381 14280 else
00020c16 14281 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
da0f6381 14282 fi
00020c16 14283 ;;
da0f6381 14284
00020c16
ILT
14285 mingw* | cygwin* | pw32* | os2* | cegcc*)
14286 # This hack is so that the source file can tell whether it is being
14287 # built for inclusion in a dll (and should export symbols for example).
14288 lt_prog_compiler_pic='-DDLL_EXPORT'
14289 ;;
da0f6381 14290
00020c16
ILT
14291 hpux9* | hpux10* | hpux11*)
14292 lt_prog_compiler_wl='-Wl,'
14293 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14294 # not for PA HP-UX.
14295 case $host_cpu in
14296 hppa*64*|ia64*)
14297 # +Z the default
14298 ;;
14299 *)
14300 lt_prog_compiler_pic='+Z'
14301 ;;
14302 esac
14303 # Is there a better lt_prog_compiler_static that works with the bundled CC?
14304 lt_prog_compiler_static='${wl}-a ${wl}archive'
14305 ;;
da0f6381 14306
00020c16
ILT
14307 irix5* | irix6* | nonstopux*)
14308 lt_prog_compiler_wl='-Wl,'
14309 # PIC (with -KPIC) is the default.
14310 lt_prog_compiler_static='-non_shared'
14311 ;;
14312
14313 linux* | k*bsd*-gnu | kopensolaris*-gnu)
14314 case $cc_basename in
14315 # old Intel for x86_64 which still supported -KPIC.
14316 ecc*)
14317 lt_prog_compiler_wl='-Wl,'
14318 lt_prog_compiler_pic='-KPIC'
14319 lt_prog_compiler_static='-static'
14320 ;;
14321 # icc used to be incompatible with GCC.
14322 # ICC 10 doesn't accept -KPIC any more.
14323 icc* | ifort*)
14324 lt_prog_compiler_wl='-Wl,'
14325 lt_prog_compiler_pic='-fPIC'
14326 lt_prog_compiler_static='-static'
14327 ;;
14328 # Lahey Fortran 8.1.
14329 lf95*)
14330 lt_prog_compiler_wl='-Wl,'
14331 lt_prog_compiler_pic='--shared'
14332 lt_prog_compiler_static='--static'
14333 ;;
43e02a8a 14334 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
00020c16
ILT
14335 # Portland Group compilers (*not* the Pentium gcc compiler,
14336 # which looks to be a dead project)
14337 lt_prog_compiler_wl='-Wl,'
14338 lt_prog_compiler_pic='-fpic'
14339 lt_prog_compiler_static='-Bstatic'
14340 ;;
14341 ccc*)
14342 lt_prog_compiler_wl='-Wl,'
14343 # All Alpha code is PIC.
14344 lt_prog_compiler_static='-non_shared'
14345 ;;
43e02a8a
RW
14346 xl* | bgxl* | bgf* | mpixl*)
14347 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
00020c16
ILT
14348 lt_prog_compiler_wl='-Wl,'
14349 lt_prog_compiler_pic='-qpic'
14350 lt_prog_compiler_static='-qstaticlink'
14351 ;;
14352 *)
14353 case `$CC -V 2>&1 | sed 5q` in
43e02a8a
RW
14354 *Sun\ F* | *Sun*Fortran*)
14355 # Sun Fortran 8.3 passes all unrecognized flags to the linker
00020c16
ILT
14356 lt_prog_compiler_pic='-KPIC'
14357 lt_prog_compiler_static='-Bstatic'
43e02a8a 14358 lt_prog_compiler_wl=''
00020c16 14359 ;;
43e02a8a
RW
14360 *Sun\ C*)
14361 # Sun C 5.9
00020c16
ILT
14362 lt_prog_compiler_pic='-KPIC'
14363 lt_prog_compiler_static='-Bstatic'
43e02a8a 14364 lt_prog_compiler_wl='-Wl,'
da0f6381
PB
14365 ;;
14366 esac
00020c16
ILT
14367 ;;
14368 esac
14369 ;;
da0f6381 14370
00020c16
ILT
14371 newsos6)
14372 lt_prog_compiler_pic='-KPIC'
14373 lt_prog_compiler_static='-Bstatic'
14374 ;;
da0f6381 14375
00020c16
ILT
14376 *nto* | *qnx*)
14377 # QNX uses GNU C++, but need to define -shared option too, otherwise
14378 # it will coredump.
14379 lt_prog_compiler_pic='-fPIC -shared'
14380 ;;
da0f6381 14381
00020c16
ILT
14382 osf3* | osf4* | osf5*)
14383 lt_prog_compiler_wl='-Wl,'
14384 # All OSF/1 code is PIC.
14385 lt_prog_compiler_static='-non_shared'
14386 ;;
da0f6381 14387
00020c16
ILT
14388 rdos*)
14389 lt_prog_compiler_static='-non_shared'
da0f6381
PB
14390 ;;
14391
00020c16
ILT
14392 solaris*)
14393 lt_prog_compiler_pic='-KPIC'
14394 lt_prog_compiler_static='-Bstatic'
14395 case $cc_basename in
14396 f77* | f90* | f95*)
14397 lt_prog_compiler_wl='-Qoption ld ';;
14398 *)
14399 lt_prog_compiler_wl='-Wl,';;
5d47bb02 14400 esac
da0f6381
PB
14401 ;;
14402
00020c16
ILT
14403 sunos4*)
14404 lt_prog_compiler_wl='-Qoption ld '
14405 lt_prog_compiler_pic='-PIC'
14406 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14407 ;;
14408
00020c16
ILT
14409 sysv4 | sysv4.2uw2* | sysv4.3*)
14410 lt_prog_compiler_wl='-Wl,'
14411 lt_prog_compiler_pic='-KPIC'
14412 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14413 ;;
14414
00020c16
ILT
14415 sysv4*MP*)
14416 if test -d /usr/nec ;then
14417 lt_prog_compiler_pic='-Kconform_pic'
14418 lt_prog_compiler_static='-Bstatic'
14419 fi
da0f6381
PB
14420 ;;
14421
00020c16
ILT
14422 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14423 lt_prog_compiler_wl='-Wl,'
14424 lt_prog_compiler_pic='-KPIC'
14425 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14426 ;;
14427
00020c16
ILT
14428 unicos*)
14429 lt_prog_compiler_wl='-Wl,'
14430 lt_prog_compiler_can_build_shared=no
da0f6381
PB
14431 ;;
14432
00020c16
ILT
14433 uts4*)
14434 lt_prog_compiler_pic='-pic'
14435 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
14436 ;;
14437
00020c16
ILT
14438 *)
14439 lt_prog_compiler_can_build_shared=no
da0f6381 14440 ;;
00020c16
ILT
14441 esac
14442 fi
da0f6381 14443
00020c16
ILT
14444case $host_os in
14445 # For platforms which do not support PIC, -DPIC is meaningless:
14446 *djgpp*)
14447 lt_prog_compiler_pic=
14448 ;;
14449 *)
14450 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
14451 ;;
14452esac
5213506e
RW
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
14454$as_echo "$lt_prog_compiler_pic" >&6; }
da0f6381 14455
da0f6381 14456
da0f6381 14457
da0f6381 14458
da0f6381 14459
da0f6381 14460
00020c16
ILT
14461#
14462# Check to make sure the PIC flag actually works.
14463#
14464if test -n "$lt_prog_compiler_pic"; then
5213506e
RW
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
14466$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
14467if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
14468 $as_echo_n "(cached) " >&6
00020c16
ILT
14469else
14470 lt_cv_prog_compiler_pic_works=no
14471 ac_outfile=conftest.$ac_objext
14472 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14473 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
14474 # Insert the option either (1) after the last *FLAGS variable, or
14475 # (2) before a word containing "conftest.", or (3) at the end.
14476 # Note that $ac_compile itself does not contain backslashes and begins
14477 # with a dollar sign (not a hyphen), so the echo should work correctly.
14478 # The option is referenced via a variable to avoid confusing sed.
14479 lt_compile=`echo "$ac_compile" | $SED \
14480 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14481 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14482 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14483 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14484 (eval "$lt_compile" 2>conftest.err)
14485 ac_status=$?
14486 cat conftest.err >&5
43e02a8a 14487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14488 if (exit $ac_status) && test -s "$ac_outfile"; then
14489 # The compiler can only warn and ignore the option if not recognized
14490 # So say no if there are warnings other than the usual output.
43e02a8a 14491 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
14492 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14493 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14494 lt_cv_prog_compiler_pic_works=yes
14495 fi
14496 fi
14497 $RM conftest*
da0f6381 14498
00020c16 14499fi
5213506e
RW
14500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
14501$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
da0f6381 14502
00020c16
ILT
14503if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
14504 case $lt_prog_compiler_pic in
14505 "" | " "*) ;;
14506 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
14507 esac
da0f6381 14508else
00020c16
ILT
14509 lt_prog_compiler_pic=
14510 lt_prog_compiler_can_build_shared=no
da0f6381 14511fi
da0f6381 14512
00020c16 14513fi
da0f6381 14514
da0f6381 14515
da0f6381 14516
da0f6381 14517
da0f6381 14518
da0f6381 14519
00020c16
ILT
14520#
14521# Check to make sure the static flag actually works.
14522#
14523wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
5213506e
RW
14524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14525$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
14526if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
14527 $as_echo_n "(cached) " >&6
00020c16
ILT
14528else
14529 lt_cv_prog_compiler_static_works=no
14530 save_LDFLAGS="$LDFLAGS"
14531 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14532 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14533 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14534 # The linker can only warn and ignore the option if not recognized
14535 # So say no if there are warnings
14536 if test -s conftest.err; then
14537 # Append any errors to the config.log.
14538 cat conftest.err 1>&5
43e02a8a 14539 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
00020c16
ILT
14540 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14541 if diff conftest.exp conftest.er2 >/dev/null; then
14542 lt_cv_prog_compiler_static_works=yes
14543 fi
14544 else
14545 lt_cv_prog_compiler_static_works=yes
14546 fi
14547 fi
14548 $RM -r conftest*
14549 LDFLAGS="$save_LDFLAGS"
da0f6381 14550
00020c16 14551fi
5213506e
RW
14552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
14553$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
da0f6381 14554
00020c16
ILT
14555if test x"$lt_cv_prog_compiler_static_works" = xyes; then
14556 :
14557else
14558 lt_prog_compiler_static=
14559fi
da0f6381 14560
da0f6381 14561
da0f6381 14562
da0f6381 14563
da0f6381 14564
da0f6381 14565
da0f6381 14566
5213506e
RW
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14568$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14569if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14570 $as_echo_n "(cached) " >&6
00020c16
ILT
14571else
14572 lt_cv_prog_compiler_c_o=no
14573 $RM -r conftest 2>/dev/null
14574 mkdir conftest
14575 cd conftest
14576 mkdir out
14577 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14578
00020c16
ILT
14579 lt_compiler_flag="-o out/conftest2.$ac_objext"
14580 # Insert the option either (1) after the last *FLAGS variable, or
14581 # (2) before a word containing "conftest.", or (3) at the end.
14582 # Note that $ac_compile itself does not contain backslashes and begins
14583 # with a dollar sign (not a hyphen), so the echo should work correctly.
14584 lt_compile=`echo "$ac_compile" | $SED \
14585 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14586 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14587 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14588 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14589 (eval "$lt_compile" 2>out/conftest.err)
14590 ac_status=$?
14591 cat out/conftest.err >&5
43e02a8a 14592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14593 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14594 then
14595 # The compiler can only warn and ignore the option if not recognized
14596 # So say no if there are warnings
43e02a8a 14597 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
14598 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14599 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14600 lt_cv_prog_compiler_c_o=yes
14601 fi
14602 fi
14603 chmod u+w . 2>&5
14604 $RM conftest*
14605 # SGI C++ compiler will create directory out/ii_files/ for
14606 # template instantiation
14607 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14608 $RM out/* && rmdir out
14609 cd ..
14610 $RM -r conftest
14611 $RM conftest*
da0f6381 14612
00020c16 14613fi
5213506e
RW
14614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14615$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14616
14617
14618
14619
14620
14621
5213506e
RW
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14623$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14624if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
14625 $as_echo_n "(cached) " >&6
00020c16
ILT
14626else
14627 lt_cv_prog_compiler_c_o=no
14628 $RM -r conftest 2>/dev/null
14629 mkdir conftest
14630 cd conftest
14631 mkdir out
14632 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 14633
00020c16
ILT
14634 lt_compiler_flag="-o out/conftest2.$ac_objext"
14635 # Insert the option either (1) after the last *FLAGS variable, or
14636 # (2) before a word containing "conftest.", or (3) at the end.
14637 # Note that $ac_compile itself does not contain backslashes and begins
14638 # with a dollar sign (not a hyphen), so the echo should work correctly.
14639 lt_compile=`echo "$ac_compile" | $SED \
14640 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14641 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14642 -e 's:$: $lt_compiler_flag:'`
43e02a8a 14643 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
14644 (eval "$lt_compile" 2>out/conftest.err)
14645 ac_status=$?
14646 cat out/conftest.err >&5
43e02a8a 14647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
14648 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14649 then
14650 # The compiler can only warn and ignore the option if not recognized
14651 # So say no if there are warnings
43e02a8a 14652 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
14653 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14654 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14655 lt_cv_prog_compiler_c_o=yes
14656 fi
14657 fi
14658 chmod u+w . 2>&5
14659 $RM conftest*
14660 # SGI C++ compiler will create directory out/ii_files/ for
14661 # template instantiation
14662 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14663 $RM out/* && rmdir out
14664 cd ..
14665 $RM -r conftest
14666 $RM conftest*
da0f6381 14667
00020c16 14668fi
5213506e
RW
14669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14670$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
da0f6381
PB
14671
14672
14673
14674
00020c16
ILT
14675hard_links="nottested"
14676if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
14677 # do not overwrite the value of need_locks provided by the user
5213506e
RW
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
14679$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16 14680 hard_links=yes
baafc534 14681 $RM conftest*
00020c16
ILT
14682 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14683 touch conftest.a
14684 ln conftest.a conftest.b 2>&5 || hard_links=no
14685 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
14687$as_echo "$hard_links" >&6; }
00020c16 14688 if test "$hard_links" = no; then
5213506e
RW
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14690$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16 14691 need_locks=warn
da0f6381 14692 fi
00020c16
ILT
14693else
14694 need_locks=no
14695fi
da0f6381
PB
14696
14697
14698
14699
14700
14701
5213506e
RW
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14703$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
da0f6381 14704
00020c16
ILT
14705 runpath_var=
14706 allow_undefined_flag=
14707 always_export_symbols=no
14708 archive_cmds=
14709 archive_expsym_cmds=
14710 compiler_needs_object=no
14711 enable_shared_with_static_runtimes=no
14712 export_dynamic_flag_spec=
14713 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14714 hardcode_automatic=no
14715 hardcode_direct=no
14716 hardcode_direct_absolute=no
14717 hardcode_libdir_flag_spec=
14718 hardcode_libdir_flag_spec_ld=
14719 hardcode_libdir_separator=
14720 hardcode_minus_L=no
14721 hardcode_shlibpath_var=unsupported
14722 inherit_rpath=no
14723 link_all_deplibs=unknown
14724 module_cmds=
14725 module_expsym_cmds=
14726 old_archive_from_new_cmds=
14727 old_archive_from_expsyms_cmds=
14728 thread_safe_flag_spec=
14729 whole_archive_flag_spec=
14730 # include_expsyms should be a list of space-separated symbols to be *always*
14731 # included in the symbol list
14732 include_expsyms=
14733 # exclude_expsyms can be an extended regexp of symbols to exclude
14734 # it will be wrapped by ` (' and `)$', so one must not match beginning or
14735 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
14736 # as well as any symbol that contains `d'.
14737 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
14738 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
14739 # platforms (ab)use it in PIC code, but their linkers get confused if
14740 # the symbol is explicitly referenced. Since portable code cannot
14741 # rely on this symbol name, it's probably fine to never include it in
14742 # preloaded symbol tables.
14743 # Exclude shared library initialization/finalization symbols.
14744 extract_expsyms_cmds=
da0f6381 14745
00020c16
ILT
14746 case $host_os in
14747 cygwin* | mingw* | pw32* | cegcc*)
14748 # FIXME: the MSVC++ port hasn't been tested in a loooong time
14749 # When not using gcc, we currently assume that we are using
14750 # Microsoft Visual C++.
14751 if test "$GCC" != yes; then
14752 with_gnu_ld=no
14753 fi
14754 ;;
14755 interix*)
14756 # we just hope/assume this is gcc and not c89 (= MSVC++)
14757 with_gnu_ld=yes
14758 ;;
14759 openbsd*)
14760 with_gnu_ld=no
14761 ;;
14762 esac
da0f6381 14763
00020c16 14764 ld_shlibs=yes
43e02a8a
RW
14765
14766 # On some targets, GNU ld is compatible enough with the native linker
14767 # that we're better off using the native interface for both.
14768 lt_use_gnu_ld_interface=no
00020c16 14769 if test "$with_gnu_ld" = yes; then
43e02a8a
RW
14770 case $host_os in
14771 aix*)
14772 # The AIX port of GNU ld has always aspired to compatibility
14773 # with the native linker. However, as the warning in the GNU ld
14774 # block says, versions before 2.19.5* couldn't really create working
14775 # shared libraries, regardless of the interface used.
14776 case `$LD -v 2>&1` in
14777 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
14778 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
14779 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
14780 *)
14781 lt_use_gnu_ld_interface=yes
14782 ;;
14783 esac
14784 ;;
14785 *)
14786 lt_use_gnu_ld_interface=yes
14787 ;;
14788 esac
14789 fi
14790
14791 if test "$lt_use_gnu_ld_interface" = yes; then
00020c16
ILT
14792 # If archive_cmds runs LD, not CC, wlarc should be empty
14793 wlarc='${wl}'
da0f6381 14794
00020c16
ILT
14795 # Set some defaults for GNU ld with shared library support. These
14796 # are reset later if shared libraries are not supported. Putting them
14797 # here allows them to be overridden if necessary.
14798 runpath_var=LD_RUN_PATH
14799 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
14800 export_dynamic_flag_spec='${wl}--export-dynamic'
14801 # ancient GNU ld didn't support --whole-archive et. al.
14802 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
14803 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
14804 else
14805 whole_archive_flag_spec=
14806 fi
14807 supports_anon_versioning=no
14808 case `$LD -v 2>&1` in
43e02a8a 14809 *GNU\ gold*) supports_anon_versioning=yes ;;
00020c16
ILT
14810 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
14811 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
14812 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
14813 *\ 2.11.*) ;; # other 2.11 versions
14814 *) supports_anon_versioning=yes ;;
14815 esac
da0f6381 14816
00020c16
ILT
14817 # See if GNU ld supports shared libraries.
14818 case $host_os in
14819 aix[3-9]*)
14820 # On AIX/PPC, the GNU linker is very broken
14821 if test "$host_cpu" != ia64; then
14822 ld_shlibs=no
14823 cat <<_LT_EOF 1>&2
da0f6381 14824
43e02a8a 14825*** Warning: the GNU linker, at least up to release 2.19, is reported
00020c16
ILT
14826*** to be unable to reliably create shared libraries on AIX.
14827*** Therefore, libtool is disabling shared libraries support. If you
43e02a8a
RW
14828*** really care for shared libraries, you may want to install binutils
14829*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
14830*** You will then need to restart the configuration process.
da0f6381 14831
00020c16
ILT
14832_LT_EOF
14833 fi
14834 ;;
da0f6381 14835
00020c16
ILT
14836 amigaos*)
14837 case $host_cpu in
14838 powerpc)
14839 # see comment about AmigaOS4 .so support
14840 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14841 archive_expsym_cmds=''
14842 ;;
14843 m68k)
14844 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)'
14845 hardcode_libdir_flag_spec='-L$libdir'
14846 hardcode_minus_L=yes
14847 ;;
14848 esac
14849 ;;
da0f6381 14850
00020c16
ILT
14851 beos*)
14852 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14853 allow_undefined_flag=unsupported
14854 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14855 # support --undefined. This deserves some investigation. FIXME
14856 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14857 else
14858 ld_shlibs=no
14859 fi
14860 ;;
da0f6381 14861
00020c16
ILT
14862 cygwin* | mingw* | pw32* | cegcc*)
14863 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
14864 # as there is no search path for DLLs.
14865 hardcode_libdir_flag_spec='-L$libdir'
43e02a8a 14866 export_dynamic_flag_spec='${wl}--export-all-symbols'
00020c16
ILT
14867 allow_undefined_flag=unsupported
14868 always_export_symbols=no
14869 enable_shared_with_static_runtimes=yes
14870 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
da0f6381 14871
00020c16
ILT
14872 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
14873 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14874 # If the export-symbols file already is a .def file (1st line
14875 # is EXPORTS), use it as is; otherwise, prepend...
14876 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
14877 cp $export_symbols $output_objdir/$soname.def;
14878 else
14879 echo EXPORTS > $output_objdir/$soname.def;
14880 cat $export_symbols >> $output_objdir/$soname.def;
14881 fi~
14882 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14883 else
14884 ld_shlibs=no
14885 fi
14886 ;;
da0f6381 14887
43e02a8a
RW
14888 haiku*)
14889 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14890 link_all_deplibs=yes
14891 ;;
14892
00020c16
ILT
14893 interix[3-9]*)
14894 hardcode_direct=no
14895 hardcode_shlibpath_var=no
14896 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
14897 export_dynamic_flag_spec='${wl}-E'
14898 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14899 # Instead, shared libraries are loaded at an image base (0x10000000 by
14900 # default) and relocated if they conflict, which is a slow very memory
14901 # consuming and fragmenting process. To avoid this, we pick a random,
14902 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14903 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14904 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14905 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'
14906 ;;
da0f6381 14907
00020c16
ILT
14908 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
14909 tmp_diet=no
14910 if test "$host_os" = linux-dietlibc; then
14911 case $cc_basename in
14912 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
14913 esac
14914 fi
14915 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
14916 && test "$tmp_diet" = no
14917 then
14918 tmp_addflag=
14919 tmp_sharedflag='-shared'
14920 case $cc_basename,$host_cpu in
14921 pgcc*) # Portland Group C compiler
43e02a8a 14922 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
14923 tmp_addflag=' $pic_flag'
14924 ;;
43e02a8a
RW
14925 pgf77* | pgf90* | pgf95* | pgfortran*)
14926 # Portland Group f77 and f90 compilers
14927 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
14928 tmp_addflag=' $pic_flag -Mnomain' ;;
14929 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
14930 tmp_addflag=' -i_dynamic' ;;
14931 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
14932 tmp_addflag=' -i_dynamic -nofor_main' ;;
14933 ifc* | ifort*) # Intel Fortran compiler
14934 tmp_addflag=' -nofor_main' ;;
14935 lf95*) # Lahey Fortran 8.1
14936 whole_archive_flag_spec=
14937 tmp_sharedflag='--shared' ;;
43e02a8a 14938 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
00020c16
ILT
14939 tmp_sharedflag='-qmkshrobj'
14940 tmp_addflag= ;;
43e02a8a
RW
14941 nvcc*) # Cuda Compiler Driver 2.2
14942 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'
14943 compiler_needs_object=yes
14944 ;;
00020c16
ILT
14945 esac
14946 case `$CC -V 2>&1 | sed 5q` in
14947 *Sun\ C*) # Sun C 5.9
43e02a8a 14948 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
14949 compiler_needs_object=yes
14950 tmp_sharedflag='-G' ;;
14951 *Sun\ F*) # Sun Fortran 8.3
14952 tmp_sharedflag='-G' ;;
14953 esac
14954 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
da0f6381 14955
00020c16
ILT
14956 if test "x$supports_anon_versioning" = xyes; then
14957 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14958 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14959 echo "local: *; };" >> $output_objdir/$libname.ver~
14960 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
14961 fi
da0f6381 14962
00020c16 14963 case $cc_basename in
43e02a8a 14964 xlf* | bgf* | bgxlf* | mpixlf*)
00020c16
ILT
14965 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
14966 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
14967 hardcode_libdir_flag_spec=
14968 hardcode_libdir_flag_spec_ld='-rpath $libdir'
14969 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
14970 if test "x$supports_anon_versioning" = xyes; then
14971 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14972 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14973 echo "local: *; };" >> $output_objdir/$libname.ver~
14974 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
14975 fi
14976 ;;
14977 esac
14978 else
14979 ld_shlibs=no
14980 fi
14981 ;;
da0f6381 14982
00020c16
ILT
14983 netbsd*)
14984 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14985 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14986 wlarc=
14987 else
14988 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14989 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14990 fi
14991 ;;
da0f6381 14992
00020c16
ILT
14993 solaris*)
14994 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
14995 ld_shlibs=no
14996 cat <<_LT_EOF 1>&2
da0f6381 14997
00020c16
ILT
14998*** Warning: The releases 2.8.* of the GNU linker cannot reliably
14999*** create shared libraries on Solaris systems. Therefore, libtool
15000*** is disabling shared libraries support. We urge you to upgrade GNU
15001*** binutils to release 2.9.1 or newer. Another option is to modify
15002*** your PATH or compiler configuration so that the native linker is
15003*** used, and then restart.
da0f6381 15004
00020c16
ILT
15005_LT_EOF
15006 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15007 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15008 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15009 else
15010 ld_shlibs=no
15011 fi
15012 ;;
da0f6381 15013
00020c16
ILT
15014 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
15015 case `$LD -v 2>&1` in
15016 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
15017 ld_shlibs=no
15018 cat <<_LT_EOF 1>&2
da0f6381 15019
00020c16
ILT
15020*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
15021*** reliably create shared libraries on SCO systems. Therefore, libtool
15022*** is disabling shared libraries support. We urge you to upgrade GNU
15023*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
15024*** your PATH or compiler configuration so that the native linker is
15025*** used, and then restart.
da0f6381 15026
00020c16
ILT
15027_LT_EOF
15028 ;;
15029 *)
15030 # For security reasons, it is highly recommended that you always
15031 # use absolute paths for naming shared libraries, and exclude the
15032 # DT_RUNPATH tag from executables and libraries. But doing so
15033 # requires that you compile everything twice, which is a pain.
15034 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15035 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15036 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15037 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15038 else
15039 ld_shlibs=no
15040 fi
15041 ;;
15042 esac
15043 ;;
da0f6381 15044
00020c16
ILT
15045 sunos4*)
15046 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15047 wlarc=
15048 hardcode_direct=yes
15049 hardcode_shlibpath_var=no
15050 ;;
da0f6381 15051
00020c16
ILT
15052 *)
15053 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15054 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15055 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15056 else
15057 ld_shlibs=no
15058 fi
15059 ;;
15060 esac
da0f6381 15061
00020c16
ILT
15062 if test "$ld_shlibs" = no; then
15063 runpath_var=
15064 hardcode_libdir_flag_spec=
15065 export_dynamic_flag_spec=
15066 whole_archive_flag_spec=
15067 fi
15068 else
15069 # PORTME fill in a description of your system's linker (not GNU ld)
15070 case $host_os in
15071 aix3*)
15072 allow_undefined_flag=unsupported
15073 always_export_symbols=yes
15074 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'
15075 # Note: this linker hardcodes the directories in LIBPATH if there
15076 # are no directories specified by -L.
15077 hardcode_minus_L=yes
15078 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
15079 # Neither direct hardcoding nor static linking is supported with a
15080 # broken collect2.
15081 hardcode_direct=unsupported
15082 fi
15083 ;;
da0f6381 15084
00020c16
ILT
15085 aix[4-9]*)
15086 if test "$host_cpu" = ia64; then
15087 # On IA64, the linker does run time linking by default, so we don't
15088 # have to do anything special.
15089 aix_use_runtimelinking=no
15090 exp_sym_flag='-Bexport'
15091 no_entry_flag=""
15092 else
15093 # If we're using GNU nm, then we don't want the "-C" option.
15094 # -C means demangle to AIX nm, but means don't demangle with GNU nm
43e02a8a
RW
15095 # Also, AIX nm treats weak defined symbols like other global
15096 # defined symbols, whereas GNU nm marks them as "W".
00020c16 15097 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
43e02a8a 15098 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
15099 else
15100 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'
15101 fi
15102 aix_use_runtimelinking=no
da0f6381 15103
00020c16
ILT
15104 # Test if we are trying to use run time linking or normal
15105 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
15106 # need to do runtime linking.
15107 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
15108 for ld_flag in $LDFLAGS; do
15109 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
15110 aix_use_runtimelinking=yes
15111 break
15112 fi
15113 done
15114 ;;
15115 esac
da0f6381 15116
00020c16
ILT
15117 exp_sym_flag='-bexport'
15118 no_entry_flag='-bnoentry'
15119 fi
da0f6381 15120
00020c16
ILT
15121 # When large executables or shared objects are built, AIX ld can
15122 # have problems creating the table of contents. If linking a library
15123 # or program results in "error TOC overflow" add -mminimal-toc to
15124 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
15125 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
da0f6381 15126
00020c16
ILT
15127 archive_cmds=''
15128 hardcode_direct=yes
15129 hardcode_direct_absolute=yes
15130 hardcode_libdir_separator=':'
15131 link_all_deplibs=yes
15132 file_list_spec='${wl}-f,'
da0f6381 15133
00020c16
ILT
15134 if test "$GCC" = yes; then
15135 case $host_os in aix4.[012]|aix4.[012].*)
15136 # We only want to do this on AIX 4.2 and lower, the check
15137 # below for broken collect2 doesn't work under 4.3+
15138 collect2name=`${CC} -print-prog-name=collect2`
15139 if test -f "$collect2name" &&
15140 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
15141 then
15142 # We have reworked collect2
15143 :
15144 else
15145 # We have old collect2
15146 hardcode_direct=unsupported
15147 # It fails to find uninstalled libraries when the uninstalled
15148 # path is not listed in the libpath. Setting hardcode_minus_L
15149 # to unsupported forces relinking
15150 hardcode_minus_L=yes
15151 hardcode_libdir_flag_spec='-L$libdir'
15152 hardcode_libdir_separator=
15153 fi
15154 ;;
15155 esac
15156 shared_flag='-shared'
15157 if test "$aix_use_runtimelinking" = yes; then
15158 shared_flag="$shared_flag "'${wl}-G'
15159 fi
15160 else
15161 # not using gcc
15162 if test "$host_cpu" = ia64; then
15163 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
15164 # chokes on -Wl,-G. The following line is correct:
15165 shared_flag='-G'
15166 else
15167 if test "$aix_use_runtimelinking" = yes; then
15168 shared_flag='${wl}-G'
15169 else
15170 shared_flag='${wl}-bM:SRE'
15171 fi
15172 fi
15173 fi
da0f6381 15174
00020c16
ILT
15175 export_dynamic_flag_spec='${wl}-bexpall'
15176 # It seems that -bexpall does not export symbols beginning with
15177 # underscore (_), so it is better to generate a list of symbols to export.
15178 always_export_symbols=yes
15179 if test "$aix_use_runtimelinking" = yes; then
15180 # Warning - without using the other runtime loading flags (-brtl),
15181 # -berok will link without error, but may produce a broken library.
15182 allow_undefined_flag='-berok'
15183 # Determine the default libpath from the value encoded in an
15184 # empty executable.
5213506e 15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15186/* end confdefs.h. */
da0f6381 15187
00020c16
ILT
15188int
15189main ()
15190{
da0f6381 15191
00020c16
ILT
15192 ;
15193 return 0;
15194}
15195_ACEOF
5213506e 15196if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15197
00020c16
ILT
15198lt_aix_libpath_sed='
15199 /Import File Strings/,/^$/ {
15200 /^0/ {
15201 s/^0 *\(.*\)$/\1/
15202 p
15203 }
15204 }'
15205aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15206# Check for a 64-bit object if we didn't find anything.
15207if test -z "$aix_libpath"; then
15208 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15209fi
00020c16 15210fi
5213506e
RW
15211rm -f core conftest.err conftest.$ac_objext \
15212 conftest$ac_exeext conftest.$ac_ext
00020c16 15213if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15214
00020c16 15215 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
43e02a8a 15216 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
15217 else
15218 if test "$host_cpu" = ia64; then
15219 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
15220 allow_undefined_flag="-z nodefs"
15221 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"
15222 else
15223 # Determine the default libpath from the value encoded in an
15224 # empty executable.
5213506e 15225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16 15226/* end confdefs.h. */
da0f6381 15227
00020c16
ILT
15228int
15229main ()
15230{
da0f6381 15231
00020c16
ILT
15232 ;
15233 return 0;
15234}
15235_ACEOF
5213506e 15236if ac_fn_c_try_link "$LINENO"; then :
da0f6381 15237
00020c16
ILT
15238lt_aix_libpath_sed='
15239 /Import File Strings/,/^$/ {
15240 /^0/ {
15241 s/^0 *\(.*\)$/\1/
15242 p
15243 }
15244 }'
15245aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15246# Check for a 64-bit object if we didn't find anything.
15247if test -z "$aix_libpath"; then
15248 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15249fi
00020c16 15250fi
5213506e
RW
15251rm -f core conftest.err conftest.$ac_objext \
15252 conftest$ac_exeext conftest.$ac_ext
00020c16 15253if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 15254
00020c16
ILT
15255 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
15256 # Warning - without using the other run time loading flags,
15257 # -berok will link without error, but may produce a broken library.
15258 no_undefined_flag=' ${wl}-bernotok'
15259 allow_undefined_flag=' ${wl}-berok'
43e02a8a
RW
15260 if test "$with_gnu_ld" = yes; then
15261 # We only use this code for GNU lds that support --whole-archive.
15262 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
15263 else
15264 # Exported symbols can be pulled into shared objects from archives
15265 whole_archive_flag_spec='$convenience'
15266 fi
00020c16
ILT
15267 archive_cmds_need_lc=yes
15268 # This is similar to how AIX traditionally builds its shared libraries.
15269 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'
15270 fi
15271 fi
15272 ;;
da0f6381 15273
00020c16
ILT
15274 amigaos*)
15275 case $host_cpu in
15276 powerpc)
15277 # see comment about AmigaOS4 .so support
15278 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15279 archive_expsym_cmds=''
15280 ;;
15281 m68k)
15282 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)'
15283 hardcode_libdir_flag_spec='-L$libdir'
15284 hardcode_minus_L=yes
15285 ;;
15286 esac
15287 ;;
da0f6381 15288
00020c16
ILT
15289 bsdi[45]*)
15290 export_dynamic_flag_spec=-rdynamic
15291 ;;
da0f6381 15292
00020c16
ILT
15293 cygwin* | mingw* | pw32* | cegcc*)
15294 # When not using gcc, we currently assume that we are using
15295 # Microsoft Visual C++.
15296 # hardcode_libdir_flag_spec is actually meaningless, as there is
15297 # no search path for DLLs.
15298 hardcode_libdir_flag_spec=' '
15299 allow_undefined_flag=unsupported
15300 # Tell ltmain to make .lib files, not .a files.
15301 libext=lib
15302 # Tell ltmain to make .dll files, not .so files.
15303 shrext_cmds=".dll"
15304 # FIXME: Setting linknames here is a bad hack.
43e02a8a 15305 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
00020c16
ILT
15306 # The linker will automatically build a .lib file if we build a DLL.
15307 old_archive_from_new_cmds='true'
15308 # FIXME: Should let the user specify the lib program.
15309 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
15310 fix_srcfile_path='`cygpath -w "$srcfile"`'
15311 enable_shared_with_static_runtimes=yes
15312 ;;
da0f6381 15313
00020c16 15314 darwin* | rhapsody*)
da0f6381
PB
15315
15316
00020c16
ILT
15317 archive_cmds_need_lc=no
15318 hardcode_direct=no
15319 hardcode_automatic=yes
15320 hardcode_shlibpath_var=unsupported
43e02a8a
RW
15321 if test "$lt_cv_ld_force_load" = "yes"; then
15322 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\"`'
15323 else
15324 whole_archive_flag_spec=''
15325 fi
00020c16
ILT
15326 link_all_deplibs=yes
15327 allow_undefined_flag="$_lt_dar_allow_undefined"
15328 case $cc_basename in
15329 ifort*) _lt_dar_can_shared=yes ;;
15330 *) _lt_dar_can_shared=$GCC ;;
15331 esac
15332 if test "$_lt_dar_can_shared" = "yes"; then
43e02a8a 15333 output_verbose_link_cmd=func_echo_all
00020c16
ILT
15334 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
15335 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
15336 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}"
15337 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 15338
00020c16
ILT
15339 else
15340 ld_shlibs=no
15341 fi
da0f6381 15342
00020c16 15343 ;;
da0f6381 15344
00020c16
ILT
15345 dgux*)
15346 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15347 hardcode_libdir_flag_spec='-L$libdir'
15348 hardcode_shlibpath_var=no
15349 ;;
da0f6381 15350
00020c16
ILT
15351 freebsd1*)
15352 ld_shlibs=no
15353 ;;
da0f6381 15354
00020c16
ILT
15355 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15356 # support. Future versions do this automatically, but an explicit c++rt0.o
15357 # does not break anything, and helps significantly (at the cost of a little
15358 # extra space).
15359 freebsd2.2*)
15360 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
15361 hardcode_libdir_flag_spec='-R$libdir'
15362 hardcode_direct=yes
15363 hardcode_shlibpath_var=no
15364 ;;
da0f6381 15365
00020c16
ILT
15366 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
15367 freebsd2*)
15368 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15369 hardcode_direct=yes
15370 hardcode_minus_L=yes
15371 hardcode_shlibpath_var=no
15372 ;;
da0f6381 15373
00020c16
ILT
15374 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
15375 freebsd* | dragonfly*)
15376 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
15377 hardcode_libdir_flag_spec='-R$libdir'
15378 hardcode_direct=yes
15379 hardcode_shlibpath_var=no
15380 ;;
da0f6381 15381
00020c16
ILT
15382 hpux9*)
15383 if test "$GCC" = yes; then
15384 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'
15385 else
15386 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'
15387 fi
15388 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15389 hardcode_libdir_separator=:
15390 hardcode_direct=yes
da0f6381 15391
00020c16
ILT
15392 # hardcode_minus_L: Not really in the search PATH,
15393 # but as the default location of the library.
15394 hardcode_minus_L=yes
15395 export_dynamic_flag_spec='${wl}-E'
15396 ;;
da0f6381 15397
00020c16 15398 hpux10*)
43e02a8a 15399 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
00020c16
ILT
15400 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15401 else
15402 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15403 fi
15404 if test "$with_gnu_ld" = no; then
15405 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15406 hardcode_libdir_flag_spec_ld='+b $libdir'
15407 hardcode_libdir_separator=:
15408 hardcode_direct=yes
15409 hardcode_direct_absolute=yes
15410 export_dynamic_flag_spec='${wl}-E'
15411 # hardcode_minus_L: Not really in the search PATH,
15412 # but as the default location of the library.
15413 hardcode_minus_L=yes
15414 fi
15415 ;;
da0f6381 15416
00020c16 15417 hpux11*)
43e02a8a 15418 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
00020c16
ILT
15419 case $host_cpu in
15420 hppa*64*)
15421 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15422 ;;
15423 ia64*)
15424 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15425 ;;
15426 *)
15427 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15428 ;;
15429 esac
15430 else
15431 case $host_cpu in
15432 hppa*64*)
15433 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15434 ;;
15435 ia64*)
15436 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15437 ;;
15438 *)
43e02a8a
RW
15439
15440 # Older versions of the 11.00 compiler do not understand -b yet
15441 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
15442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
15443$as_echo_n "checking if $CC understands -b... " >&6; }
15444if test "${lt_cv_prog_compiler__b+set}" = set; then :
15445 $as_echo_n "(cached) " >&6
15446else
15447 lt_cv_prog_compiler__b=no
15448 save_LDFLAGS="$LDFLAGS"
15449 LDFLAGS="$LDFLAGS -b"
15450 echo "$lt_simple_link_test_code" > conftest.$ac_ext
15451 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15452 # The linker can only warn and ignore the option if not recognized
15453 # So say no if there are warnings
15454 if test -s conftest.err; then
15455 # Append any errors to the config.log.
15456 cat conftest.err 1>&5
15457 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15458 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15459 if diff conftest.exp conftest.er2 >/dev/null; then
15460 lt_cv_prog_compiler__b=yes
15461 fi
15462 else
15463 lt_cv_prog_compiler__b=yes
15464 fi
15465 fi
15466 $RM -r conftest*
15467 LDFLAGS="$save_LDFLAGS"
15468
15469fi
15470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
15471$as_echo "$lt_cv_prog_compiler__b" >&6; }
15472
15473if test x"$lt_cv_prog_compiler__b" = xyes; then
15474 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15475else
15476 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15477fi
15478
00020c16
ILT
15479 ;;
15480 esac
15481 fi
15482 if test "$with_gnu_ld" = no; then
15483 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
15484 hardcode_libdir_separator=:
da0f6381 15485
00020c16
ILT
15486 case $host_cpu in
15487 hppa*64*|ia64*)
15488 hardcode_direct=no
15489 hardcode_shlibpath_var=no
15490 ;;
15491 *)
15492 hardcode_direct=yes
15493 hardcode_direct_absolute=yes
15494 export_dynamic_flag_spec='${wl}-E'
da0f6381 15495
00020c16
ILT
15496 # hardcode_minus_L: Not really in the search PATH,
15497 # but as the default location of the library.
15498 hardcode_minus_L=yes
15499 ;;
15500 esac
15501 fi
15502 ;;
da0f6381 15503
00020c16
ILT
15504 irix5* | irix6* | nonstopux*)
15505 if test "$GCC" = yes; then
43e02a8a 15506 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
15507 # Try to use the -exported_symbol ld option, if it does not
15508 # work, assume that -exports_file does not work either and
15509 # implicitly export all symbols.
15510 save_LDFLAGS="$LDFLAGS"
15511 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5213506e
RW
15512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15513/* end confdefs.h. */
00020c16
ILT
15514int foo(void) {}
15515_ACEOF
5213506e 15516if ac_fn_c_try_link "$LINENO"; then :
43e02a8a 15517 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 15518
00020c16 15519fi
5213506e
RW
15520rm -f core conftest.err conftest.$ac_objext \
15521 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
15522 LDFLAGS="$save_LDFLAGS"
15523 else
43e02a8a
RW
15524 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'
15525 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
15526 fi
15527 archive_cmds_need_lc='no'
15528 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15529 hardcode_libdir_separator=:
15530 inherit_rpath=yes
15531 link_all_deplibs=yes
15532 ;;
da0f6381 15533
00020c16
ILT
15534 netbsd*)
15535 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15536 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
15537 else
15538 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
15539 fi
15540 hardcode_libdir_flag_spec='-R$libdir'
15541 hardcode_direct=yes
15542 hardcode_shlibpath_var=no
15543 ;;
da0f6381 15544
00020c16
ILT
15545 newsos6)
15546 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15547 hardcode_direct=yes
15548 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15549 hardcode_libdir_separator=:
15550 hardcode_shlibpath_var=no
15551 ;;
da0f6381 15552
00020c16
ILT
15553 *nto* | *qnx*)
15554 ;;
da0f6381 15555
00020c16
ILT
15556 openbsd*)
15557 if test -f /usr/libexec/ld.so; then
15558 hardcode_direct=yes
15559 hardcode_shlibpath_var=no
15560 hardcode_direct_absolute=yes
15561 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15562 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15563 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
15564 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15565 export_dynamic_flag_spec='${wl}-E'
15566 else
15567 case $host_os in
15568 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
15569 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15570 hardcode_libdir_flag_spec='-R$libdir'
15571 ;;
15572 *)
15573 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15574 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
15575 ;;
15576 esac
15577 fi
15578 else
15579 ld_shlibs=no
15580 fi
15581 ;;
da0f6381 15582
00020c16
ILT
15583 os2*)
15584 hardcode_libdir_flag_spec='-L$libdir'
15585 hardcode_minus_L=yes
15586 allow_undefined_flag=unsupported
43e02a8a 15587 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
15588 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
15589 ;;
da0f6381 15590
00020c16
ILT
15591 osf3*)
15592 if test "$GCC" = yes; then
15593 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 15594 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
15595 else
15596 allow_undefined_flag=' -expect_unresolved \*'
43e02a8a 15597 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
15598 fi
15599 archive_cmds_need_lc='no'
15600 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15601 hardcode_libdir_separator=:
15602 ;;
da0f6381 15603
00020c16
ILT
15604 osf4* | osf5*) # as osf3* with the addition of -msym flag
15605 if test "$GCC" = yes; then
15606 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 15607 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
15608 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
15609 else
15610 allow_undefined_flag=' -expect_unresolved \*'
43e02a8a 15611 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 15612 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 15613 $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 15614
00020c16
ILT
15615 # Both c and cxx compiler support -rpath directly
15616 hardcode_libdir_flag_spec='-rpath $libdir'
15617 fi
15618 archive_cmds_need_lc='no'
15619 hardcode_libdir_separator=:
15620 ;;
da0f6381 15621
00020c16
ILT
15622 solaris*)
15623 no_undefined_flag=' -z defs'
15624 if test "$GCC" = yes; then
15625 wlarc='${wl}'
15626 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15627 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15628 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15629 else
15630 case `$CC -V 2>&1` in
15631 *"Compilers 5.0"*)
15632 wlarc=''
15633 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15634 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15635 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
15636 ;;
15637 *)
15638 wlarc='${wl}'
15639 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
15640 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15641 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15642 ;;
15643 esac
15644 fi
15645 hardcode_libdir_flag_spec='-R$libdir'
15646 hardcode_shlibpath_var=no
15647 case $host_os in
15648 solaris2.[0-5] | solaris2.[0-5].*) ;;
15649 *)
15650 # The compiler driver will combine and reorder linker options,
15651 # but understands `-z linker_flag'. GCC discards it without `$wl',
15652 # but is careful enough not to reorder.
15653 # Supported since Solaris 2.6 (maybe 2.5.1?)
15654 if test "$GCC" = yes; then
15655 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
15656 else
15657 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
15658 fi
15659 ;;
15660 esac
15661 link_all_deplibs=yes
15662 ;;
da0f6381 15663
00020c16
ILT
15664 sunos4*)
15665 if test "x$host_vendor" = xsequent; then
15666 # Use $CC to link under sequent, because it throws in some extra .o
15667 # files that make .init and .fini sections work.
15668 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15669 else
15670 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15671 fi
15672 hardcode_libdir_flag_spec='-L$libdir'
15673 hardcode_direct=yes
15674 hardcode_minus_L=yes
15675 hardcode_shlibpath_var=no
15676 ;;
da0f6381 15677
00020c16
ILT
15678 sysv4)
15679 case $host_vendor in
15680 sni)
15681 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15682 hardcode_direct=yes # is this really true???
15683 ;;
15684 siemens)
15685 ## LD is ld it makes a PLAMLIB
15686 ## CC just makes a GrossModule.
15687 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15688 reload_cmds='$CC -r -o $output$reload_objs'
15689 hardcode_direct=no
15690 ;;
15691 motorola)
15692 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15693 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
15694 ;;
15695 esac
15696 runpath_var='LD_RUN_PATH'
15697 hardcode_shlibpath_var=no
15698 ;;
da0f6381 15699
00020c16
ILT
15700 sysv4.3*)
15701 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15702 hardcode_shlibpath_var=no
15703 export_dynamic_flag_spec='-Bexport'
15704 ;;
da0f6381 15705
00020c16
ILT
15706 sysv4*MP*)
15707 if test -d /usr/nec; then
15708 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15709 hardcode_shlibpath_var=no
15710 runpath_var=LD_RUN_PATH
15711 hardcode_runpath_var=yes
15712 ld_shlibs=yes
15713 fi
15714 ;;
da0f6381 15715
00020c16
ILT
15716 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15717 no_undefined_flag='${wl}-z,text'
15718 archive_cmds_need_lc=no
15719 hardcode_shlibpath_var=no
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 sysv5* | sco3.2v5* | sco5v6*)
15732 # Note: We can NOT use -z defs as we might desire, because we do not
15733 # link with -lc, and that would cause any symbols used from libc to
15734 # always be unresolved, which means just about no library would
15735 # ever link correctly. If we're not using GNU ld we use -z text
15736 # though, which does catch some bad symbols but isn't as heavy-handed
15737 # as -z defs.
15738 no_undefined_flag='${wl}-z,text'
15739 allow_undefined_flag='${wl}-z,nodefs'
15740 archive_cmds_need_lc=no
15741 hardcode_shlibpath_var=no
15742 hardcode_libdir_flag_spec='${wl}-R,$libdir'
15743 hardcode_libdir_separator=':'
15744 link_all_deplibs=yes
15745 export_dynamic_flag_spec='${wl}-Bexport'
15746 runpath_var='LD_RUN_PATH'
da0f6381 15747
00020c16
ILT
15748 if test "$GCC" = yes; then
15749 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15750 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15751 else
15752 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15753 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15754 fi
15755 ;;
da0f6381 15756
00020c16
ILT
15757 uts4*)
15758 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15759 hardcode_libdir_flag_spec='-L$libdir'
15760 hardcode_shlibpath_var=no
15761 ;;
da0f6381 15762
00020c16
ILT
15763 *)
15764 ld_shlibs=no
15765 ;;
15766 esac
da0f6381 15767
00020c16
ILT
15768 if test x$host_vendor = xsni; then
15769 case $host in
15770 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
15771 export_dynamic_flag_spec='${wl}-Blargedynsym'
15772 ;;
15773 esac
15774 fi
15775 fi
da0f6381 15776
5213506e
RW
15777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
15778$as_echo "$ld_shlibs" >&6; }
00020c16 15779test "$ld_shlibs" = no && can_build_shared=no
da0f6381 15780
00020c16 15781with_gnu_ld=$with_gnu_ld
da0f6381
PB
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
00020c16
ILT
15797#
15798# Do we need to explicitly link libc?
15799#
15800case "x$archive_cmds_need_lc" in
15801x|xyes)
15802 # Assume -lc should be added
15803 archive_cmds_need_lc=yes
da0f6381 15804
00020c16
ILT
15805 if test "$enable_shared" = yes && test "$GCC" = yes; then
15806 case $archive_cmds in
15807 *'~'*)
15808 # FIXME: we may have to deal with multi-command sequences.
15809 ;;
15810 '$CC '*)
15811 # Test whether the compiler implicitly links with -lc since on some
15812 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15813 # to ld, don't add -lc before -lgcc.
5213506e
RW
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
15815$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
15816if test "${lt_cv_archive_cmds_need_lc+set}" = set; then :
15817 $as_echo_n "(cached) " >&6
00020c16
ILT
15818else
15819 $RM conftest*
15820 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 15821
5213506e 15822 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
15823 (eval $ac_compile) 2>&5
15824 ac_status=$?
5213506e
RW
15825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15826 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
15827 soname=conftest
15828 lib=conftest
15829 libobjs=conftest.$ac_objext
15830 deplibs=
15831 wl=$lt_prog_compiler_wl
15832 pic_flag=$lt_prog_compiler_pic
15833 compiler_flags=-v
15834 linker_flags=-v
15835 verstring=
15836 output_objdir=.
15837 libname=conftest
15838 lt_save_allow_undefined_flag=$allow_undefined_flag
15839 allow_undefined_flag=
5213506e 15840 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
15841 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
15842 ac_status=$?
5213506e
RW
15843 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15844 test $ac_status = 0; }
00020c16
ILT
15845 then
15846 lt_cv_archive_cmds_need_lc=no
15847 else
15848 lt_cv_archive_cmds_need_lc=yes
15849 fi
15850 allow_undefined_flag=$lt_save_allow_undefined_flag
15851 else
15852 cat conftest.err 1>&5
15853 fi
15854 $RM conftest*
da0f6381 15855
00020c16 15856fi
5213506e
RW
15857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
15858$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
00020c16
ILT
15859 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
15860 ;;
15861 esac
15862 fi
15863 ;;
15864esac
da0f6381
PB
15865
15866
15867
15868
5d47bb02 15869
da0f6381 15870
da0f6381 15871
da0f6381 15872
da0f6381 15873
00020c16
ILT
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
5213506e
RW
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
16023$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
16024
16025if test "$GCC" = yes; then
16026 case $host_os in
16027 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
16028 *) lt_awk_arg="/^libraries:/" ;;
16029 esac
43e02a8a
RW
16030 case $host_os in
16031 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
16032 *) lt_sed_strip_eq="s,=/,/,g" ;;
16033 esac
16034 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
16035 case $lt_search_path_spec in
16036 *\;*)
00020c16
ILT
16037 # if the path contains ";" then we assume it to be the separator
16038 # otherwise default to the standard path separator (i.e. ":") - it is
16039 # assumed that no part of a normal pathname contains ";" but that should
16040 # okay in the real world where ";" in dirpaths is itself problematic.
43e02a8a
RW
16041 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
16042 ;;
16043 *)
16044 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
16045 ;;
16046 esac
00020c16
ILT
16047 # Ok, now we have the path, separated by spaces, we can step through it
16048 # and add multilib dir if necessary.
16049 lt_tmp_lt_search_path_spec=
16050 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
16051 for lt_sys_path in $lt_search_path_spec; do
16052 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
16053 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
16054 else
16055 test -d "$lt_sys_path" && \
16056 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
16057 fi
16058 done
43e02a8a 16059 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
00020c16
ILT
16060BEGIN {RS=" "; FS="/|\n";} {
16061 lt_foo="";
16062 lt_count=0;
16063 for (lt_i = NF; lt_i > 0; lt_i--) {
16064 if ($lt_i != "" && $lt_i != ".") {
16065 if ($lt_i == "..") {
16066 lt_count++;
16067 } else {
16068 if (lt_count == 0) {
16069 lt_foo="/" $lt_i lt_foo;
16070 } else {
16071 lt_count--;
16072 }
16073 }
16074 }
16075 }
16076 if (lt_foo != "") { lt_freq[lt_foo]++; }
16077 if (lt_freq[lt_foo] == 1) { print lt_foo; }
16078}'`
43e02a8a
RW
16079 # AWK program above erroneously prepends '/' to C:/dos/paths
16080 # for these hosts.
16081 case $host_os in
16082 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
16083 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
16084 esac
16085 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
00020c16
ILT
16086else
16087 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16088fi
16089library_names_spec=
16090libname_spec='lib$name'
16091soname_spec=
16092shrext_cmds=".so"
16093postinstall_cmds=
16094postuninstall_cmds=
16095finish_cmds=
16096finish_eval=
16097shlibpath_var=
16098shlibpath_overrides_runpath=unknown
16099version_type=none
16100dynamic_linker="$host_os ld.so"
16101sys_lib_dlsearch_path_spec="/lib /usr/lib"
16102need_lib_prefix=unknown
16103hardcode_into_libs=no
16104
16105# when you set need_version to no, make sure it does not cause -set_version
16106# flags to be left without arguments
16107need_version=unknown
16108
16109case $host_os in
16110aix3*)
16111 version_type=linux
16112 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
16113 shlibpath_var=LIBPATH
16114
16115 # AIX 3 has no versioning support, so we append a major version to the name.
16116 soname_spec='${libname}${release}${shared_ext}$major'
16117 ;;
16118
16119aix[4-9]*)
16120 version_type=linux
16121 need_lib_prefix=no
16122 need_version=no
16123 hardcode_into_libs=yes
16124 if test "$host_cpu" = ia64; then
16125 # AIX 5 supports IA64
16126 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
16127 shlibpath_var=LD_LIBRARY_PATH
16128 else
16129 # With GCC up to 2.95.x, collect2 would create an import file
16130 # for dependence libraries. The import file would start with
16131 # the line `#! .'. This would cause the generated library to
16132 # depend on `.', always an invalid library. This was fixed in
16133 # development snapshots of GCC prior to 3.0.
16134 case $host_os in
16135 aix4 | aix4.[01] | aix4.[01].*)
16136 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
16137 echo ' yes '
da0f6381
PB
16138 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
16139 :
16140 else
16141 can_build_shared=no
16142 fi
16143 ;;
16144 esac
16145 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
16146 # soname into executable. Probably we can add versioning support to
16147 # collect2, so additional links can be useful in future.
16148 if test "$aix_use_runtimelinking" = yes; then
16149 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
16150 # instead of lib<name>.a to let people know that these are not
16151 # typical AIX shared libraries.
16152 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16153 else
16154 # We preserve .a as extension for shared libraries through AIX4.2
16155 # and later when we are not doing run time linking.
16156 library_names_spec='${libname}${release}.a $libname.a'
16157 soname_spec='${libname}${release}${shared_ext}$major'
16158 fi
16159 shlibpath_var=LIBPATH
16160 fi
16161 ;;
16162
16163amigaos*)
5d47bb02
PG
16164 case $host_cpu in
16165 powerpc)
16166 # Since July 2007 AmigaOS4 officially supports .so libraries.
16167 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
16168 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16169 ;;
16170 m68k)
da0f6381
PB
16171 library_names_spec='$libname.ixlibrary $libname.a'
16172 # Create ${libname}_ixlibrary.a entries in /sys/libs.
43e02a8a 16173 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
16174 ;;
16175 esac
da0f6381
PB
16176 ;;
16177
16178beos*)
16179 library_names_spec='${libname}${shared_ext}'
16180 dynamic_linker="$host_os ld.so"
16181 shlibpath_var=LIBRARY_PATH
16182 ;;
16183
16184bsdi[45]*)
16185 version_type=linux
16186 need_version=no
16187 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16188 soname_spec='${libname}${release}${shared_ext}$major'
16189 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
16190 shlibpath_var=LD_LIBRARY_PATH
16191 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
16192 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
16193 # the default ld.so.conf also contains /usr/contrib/lib and
16194 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
16195 # libtool to hard-code these into programs
16196 ;;
16197
5d47bb02 16198cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
16199 version_type=windows
16200 shrext_cmds=".dll"
16201 need_version=no
16202 need_lib_prefix=no
16203
5d47bb02
PG
16204 case $GCC,$host_os in
16205 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
da0f6381
PB
16206 library_names_spec='$libname.dll.a'
16207 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16208 postinstall_cmds='base_file=`basename \${file}`~
16209 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
16210 dldir=$destdir/`dirname \$dlpath`~
16211 test -d \$dldir || mkdir -p \$dldir~
16212 $install_prog $dir/$dlname \$dldir/$dlname~
16213 chmod a+x \$dldir/$dlname~
16214 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16215 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16216 fi'
16217 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16218 dlpath=$dir/\$dldll~
16219 $RM \$dlpath'
16220 shlibpath_overrides_runpath=yes
16221
16222 case $host_os in
16223 cygwin*)
16224 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
16225 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
43e02a8a
RW
16226
16227 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
da0f6381 16228 ;;
5d47bb02 16229 mingw* | cegcc*)
da0f6381
PB
16230 # MinGW DLLs use traditional 'lib' prefix
16231 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
da0f6381
PB
16232 ;;
16233 pw32*)
16234 # pw32 DLLs use 'pw' prefix rather than 'lib'
16235 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16236 ;;
16237 esac
16238 ;;
16239
16240 *)
16241 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
16242 ;;
16243 esac
16244 dynamic_linker='Win32 ld.exe'
16245 # FIXME: first we should search . and the directory the executable is in
16246 shlibpath_var=PATH
16247 ;;
16248
16249darwin* | rhapsody*)
16250 dynamic_linker="$host_os dyld"
16251 version_type=darwin
16252 need_lib_prefix=no
16253 need_version=no
16254 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
16255 soname_spec='${libname}${release}${major}$shared_ext'
16256 shlibpath_overrides_runpath=yes
16257 shlibpath_var=DYLD_LIBRARY_PATH
16258 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
16259
16260 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
16261 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
16262 ;;
16263
16264dgux*)
16265 version_type=linux
16266 need_lib_prefix=no
16267 need_version=no
16268 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
16269 soname_spec='${libname}${release}${shared_ext}$major'
16270 shlibpath_var=LD_LIBRARY_PATH
16271 ;;
16272
16273freebsd1*)
16274 dynamic_linker=no
16275 ;;
16276
16277freebsd* | dragonfly*)
16278 # DragonFly does not have aout. When/if they implement a new
16279 # versioning mechanism, adjust this.
16280 if test -x /usr/bin/objformat; then
16281 objformat=`/usr/bin/objformat`
16282 else
16283 case $host_os in
16284 freebsd[123]*) objformat=aout ;;
16285 *) objformat=elf ;;
16286 esac
16287 fi
16288 version_type=freebsd-$objformat
16289 case $version_type in
16290 freebsd-elf*)
16291 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16292 need_version=no
16293 need_lib_prefix=no
16294 ;;
16295 freebsd-*)
16296 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
16297 need_version=yes
16298 ;;
16299 esac
16300 shlibpath_var=LD_LIBRARY_PATH
16301 case $host_os in
16302 freebsd2*)
16303 shlibpath_overrides_runpath=yes
16304 ;;
16305 freebsd3.[01]* | freebsdelf3.[01]*)
16306 shlibpath_overrides_runpath=yes
16307 hardcode_into_libs=yes
16308 ;;
16309 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
16310 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
16311 shlibpath_overrides_runpath=no
16312 hardcode_into_libs=yes
16313 ;;
16314 *) # from 4.6 on, and DragonFly
16315 shlibpath_overrides_runpath=yes
16316 hardcode_into_libs=yes
16317 ;;
16318 esac
16319 ;;
16320
16321gnu*)
16322 version_type=linux
16323 need_lib_prefix=no
16324 need_version=no
16325 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
16326 soname_spec='${libname}${release}${shared_ext}$major'
16327 shlibpath_var=LD_LIBRARY_PATH
16328 hardcode_into_libs=yes
16329 ;;
16330
43e02a8a
RW
16331haiku*)
16332 version_type=linux
16333 need_lib_prefix=no
16334 need_version=no
16335 dynamic_linker="$host_os runtime_loader"
16336 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
16337 soname_spec='${libname}${release}${shared_ext}$major'
16338 shlibpath_var=LIBRARY_PATH
16339 shlibpath_overrides_runpath=yes
16340 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
16341 hardcode_into_libs=yes
16342 ;;
16343
da0f6381
PB
16344hpux9* | hpux10* | hpux11*)
16345 # Give a soname corresponding to the major version so that dld.sl refuses to
16346 # link against other versions.
16347 version_type=sunos
16348 need_lib_prefix=no
16349 need_version=no
16350 case $host_cpu in
16351 ia64*)
16352 shrext_cmds='.so'
16353 hardcode_into_libs=yes
16354 dynamic_linker="$host_os dld.so"
16355 shlibpath_var=LD_LIBRARY_PATH
16356 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16357 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16358 soname_spec='${libname}${release}${shared_ext}$major'
16359 if test "X$HPUX_IA64_MODE" = X32; then
16360 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16361 else
16362 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16363 fi
16364 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16365 ;;
16366 hppa*64*)
16367 shrext_cmds='.sl'
16368 hardcode_into_libs=yes
16369 dynamic_linker="$host_os dld.sl"
16370 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16371 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16372 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16373 soname_spec='${libname}${release}${shared_ext}$major'
16374 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16375 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16376 ;;
16377 *)
16378 shrext_cmds='.sl'
16379 dynamic_linker="$host_os dld.sl"
16380 shlibpath_var=SHLIB_PATH
16381 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
16382 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16383 soname_spec='${libname}${release}${shared_ext}$major'
16384 ;;
16385 esac
43e02a8a 16386 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
da0f6381 16387 postinstall_cmds='chmod 555 $lib'
43e02a8a
RW
16388 # or fails outright, so override atomically:
16389 install_override_mode=555
da0f6381
PB
16390 ;;
16391
16392interix[3-9]*)
16393 version_type=linux
16394 need_lib_prefix=no
16395 need_version=no
16396 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16397 soname_spec='${libname}${release}${shared_ext}$major'
16398 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16399 shlibpath_var=LD_LIBRARY_PATH
16400 shlibpath_overrides_runpath=no
16401 hardcode_into_libs=yes
16402 ;;
16403
16404irix5* | irix6* | nonstopux*)
16405 case $host_os in
16406 nonstopux*) version_type=nonstopux ;;
16407 *)
16408 if test "$lt_cv_prog_gnu_ld" = yes; then
16409 version_type=linux
16410 else
16411 version_type=irix
16412 fi ;;
16413 esac
16414 need_lib_prefix=no
16415 need_version=no
16416 soname_spec='${libname}${release}${shared_ext}$major'
16417 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
16418 case $host_os in
16419 irix5* | nonstopux*)
16420 libsuff= shlibsuff=
16421 ;;
16422 *)
16423 case $LD in # libtool.m4 will add one of these switches to LD
16424 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16425 libsuff= shlibsuff= libmagic=32-bit;;
16426 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16427 libsuff=32 shlibsuff=N32 libmagic=N32;;
16428 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16429 libsuff=64 shlibsuff=64 libmagic=64-bit;;
16430 *) libsuff= shlibsuff= libmagic=never-match;;
16431 esac
16432 ;;
16433 esac
16434 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16435 shlibpath_overrides_runpath=no
16436 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
16437 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
16438 hardcode_into_libs=yes
16439 ;;
16440
16441# No shared lib support for Linux oldld, aout, or coff.
16442linux*oldld* | linux*aout* | linux*coff*)
16443 dynamic_linker=no
16444 ;;
16445
16446# This must be Linux ELF.
7a9d3fe8 16447linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
16448 version_type=linux
16449 need_lib_prefix=no
16450 need_version=no
16451 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16452 soname_spec='${libname}${release}${shared_ext}$major'
16453 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16454 shlibpath_var=LD_LIBRARY_PATH
16455 shlibpath_overrides_runpath=no
baafc534 16456
da0f6381 16457 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
16458 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
16459 $as_echo_n "(cached) " >&6
baafc534
RW
16460else
16461 lt_cv_shlibpath_overrides_runpath=no
16462 save_LDFLAGS=$LDFLAGS
16463 save_libdir=$libdir
16464 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
16465 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
5213506e 16466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16467/* end confdefs.h. */
16468
16469int
16470main ()
16471{
16472
16473 ;
16474 return 0;
16475}
16476_ACEOF
5213506e
RW
16477if ac_fn_c_try_link "$LINENO"; then :
16478 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
baafc534 16479 lt_cv_shlibpath_overrides_runpath=yes
da0f6381 16480fi
da0f6381 16481fi
5213506e
RW
16482rm -f core conftest.err conftest.$ac_objext \
16483 conftest$ac_exeext conftest.$ac_ext
baafc534
RW
16484 LDFLAGS=$save_LDFLAGS
16485 libdir=$save_libdir
16486
16487fi
16488
16489 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381
PB
16490
16491 # This implies no fast_install, which is unacceptable.
16492 # Some rework will be needed to allow for fast_install
16493 # before this can be enabled.
16494 hardcode_into_libs=yes
16495
16496 # Append ld.so.conf contents to the search path
16497 if test -f /etc/ld.so.conf; then
43e02a8a 16498 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
16499 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16500 fi
16501
16502 # We used to test for /lib/ld.so.1 and disable shared libraries on
16503 # powerpc, because MkLinux only supported shared libraries with the
16504 # GNU dynamic linker. Since this was broken with cross compilers,
16505 # most powerpc-linux boxes support dynamic linking these days and
16506 # people can always --disable-shared, the test was removed, and we
16507 # assume the GNU/Linux dynamic linker is in use.
16508 dynamic_linker='GNU/Linux ld.so'
16509 ;;
16510
16511netbsd*)
16512 version_type=sunos
16513 need_lib_prefix=no
16514 need_version=no
16515 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16516 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16517 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16518 dynamic_linker='NetBSD (a.out) ld.so'
16519 else
16520 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16521 soname_spec='${libname}${release}${shared_ext}$major'
16522 dynamic_linker='NetBSD ld.elf_so'
16523 fi
16524 shlibpath_var=LD_LIBRARY_PATH
16525 shlibpath_overrides_runpath=yes
16526 hardcode_into_libs=yes
16527 ;;
16528
16529newsos6)
16530 version_type=linux
16531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16532 shlibpath_var=LD_LIBRARY_PATH
16533 shlibpath_overrides_runpath=yes
16534 ;;
16535
16536*nto* | *qnx*)
16537 version_type=qnx
16538 need_lib_prefix=no
16539 need_version=no
16540 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16541 soname_spec='${libname}${release}${shared_ext}$major'
16542 shlibpath_var=LD_LIBRARY_PATH
16543 shlibpath_overrides_runpath=no
16544 hardcode_into_libs=yes
16545 dynamic_linker='ldqnx.so'
16546 ;;
16547
16548openbsd*)
16549 version_type=sunos
16550 sys_lib_dlsearch_path_spec="/usr/lib"
16551 need_lib_prefix=no
16552 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
16553 case $host_os in
16554 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
16555 *) need_version=no ;;
16556 esac
16557 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16558 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16559 shlibpath_var=LD_LIBRARY_PATH
16560 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
16561 case $host_os in
16562 openbsd2.[89] | openbsd2.[89].*)
16563 shlibpath_overrides_runpath=no
16564 ;;
16565 *)
16566 shlibpath_overrides_runpath=yes
16567 ;;
16568 esac
16569 else
16570 shlibpath_overrides_runpath=yes
16571 fi
16572 ;;
16573
16574os2*)
16575 libname_spec='$name'
16576 shrext_cmds=".dll"
16577 need_lib_prefix=no
16578 library_names_spec='$libname${shared_ext} $libname.a'
16579 dynamic_linker='OS/2 ld.exe'
16580 shlibpath_var=LIBPATH
16581 ;;
16582
16583osf3* | osf4* | osf5*)
16584 version_type=osf
16585 need_lib_prefix=no
16586 need_version=no
16587 soname_spec='${libname}${release}${shared_ext}$major'
16588 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16589 shlibpath_var=LD_LIBRARY_PATH
16590 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16591 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
16592 ;;
16593
16594rdos*)
16595 dynamic_linker=no
16596 ;;
16597
16598solaris*)
16599 version_type=linux
16600 need_lib_prefix=no
16601 need_version=no
16602 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16603 soname_spec='${libname}${release}${shared_ext}$major'
16604 shlibpath_var=LD_LIBRARY_PATH
16605 shlibpath_overrides_runpath=yes
16606 hardcode_into_libs=yes
16607 # ldd complains unless libraries are executable
16608 postinstall_cmds='chmod +x $lib'
16609 ;;
16610
16611sunos4*)
16612 version_type=sunos
16613 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16614 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16615 shlibpath_var=LD_LIBRARY_PATH
16616 shlibpath_overrides_runpath=yes
16617 if test "$with_gnu_ld" = yes; then
16618 need_lib_prefix=no
16619 fi
16620 need_version=yes
16621 ;;
16622
16623sysv4 | sysv4.3*)
16624 version_type=linux
16625 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16626 soname_spec='${libname}${release}${shared_ext}$major'
16627 shlibpath_var=LD_LIBRARY_PATH
16628 case $host_vendor in
16629 sni)
16630 shlibpath_overrides_runpath=no
16631 need_lib_prefix=no
16632 runpath_var=LD_RUN_PATH
16633 ;;
16634 siemens)
16635 need_lib_prefix=no
16636 ;;
16637 motorola)
16638 need_lib_prefix=no
16639 need_version=no
16640 shlibpath_overrides_runpath=no
16641 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16642 ;;
16643 esac
16644 ;;
16645
16646sysv4*MP*)
16647 if test -d /usr/nec ;then
16648 version_type=linux
16649 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
16650 soname_spec='$libname${shared_ext}.$major'
16651 shlibpath_var=LD_LIBRARY_PATH
16652 fi
16653 ;;
16654
16655sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16656 version_type=freebsd-elf
16657 need_lib_prefix=no
16658 need_version=no
16659 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16660 soname_spec='${libname}${release}${shared_ext}$major'
16661 shlibpath_var=LD_LIBRARY_PATH
16662 shlibpath_overrides_runpath=yes
16663 hardcode_into_libs=yes
16664 if test "$with_gnu_ld" = yes; then
16665 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16666 else
16667 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16668 case $host_os in
16669 sco3.2v5*)
16670 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16671 ;;
16672 esac
16673 fi
16674 sys_lib_dlsearch_path_spec='/usr/lib'
16675 ;;
16676
16677tpf*)
16678 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
16679 version_type=linux
16680 need_lib_prefix=no
16681 need_version=no
5d47bb02 16682 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
da0f6381
PB
16683 shlibpath_var=LD_LIBRARY_PATH
16684 shlibpath_overrides_runpath=no
16685 hardcode_into_libs=yes
16686 ;;
16687
16688uts4*)
16689 version_type=linux
16690 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16691 soname_spec='${libname}${release}${shared_ext}$major'
16692 shlibpath_var=LD_LIBRARY_PATH
16693 ;;
16694
16695*)
16696 dynamic_linker=no
16697 ;;
16698esac
5213506e
RW
16699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
16700$as_echo "$dynamic_linker" >&6; }
da0f6381
PB
16701test "$dynamic_linker" = no && can_build_shared=no
16702
16703variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16704if test "$GCC" = yes; then
16705 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16706fi
16707
5d47bb02
PG
16708if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
16709 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
16710fi
16711if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
16712 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
16713fi
16714
da0f6381
PB
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
43e02a8a
RW
16795
16796
16797
16798
16799
da0f6381
PB
16800
16801
16802
16803
16804
16805
5213506e
RW
16806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16807$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
da0f6381
PB
16808hardcode_action=
16809if test -n "$hardcode_libdir_flag_spec" ||
16810 test -n "$runpath_var" ||
16811 test "X$hardcode_automatic" = "Xyes" ; then
16812
16813 # We can hardcode non-existent directories.
16814 if test "$hardcode_direct" != no &&
16815 # If the only mechanism to avoid hardcoding is shlibpath_var, we
16816 # have to relink, otherwise we might link with an installed library
16817 # when we should be linking with a yet-to-be-installed one
16818 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
16819 test "$hardcode_minus_L" != no; then
16820 # Linking always hardcodes the temporary library directory.
16821 hardcode_action=relink
16822 else
16823 # We can link without hardcoding, and we can hardcode nonexisting dirs.
16824 hardcode_action=immediate
16825 fi
16826else
16827 # We cannot hardcode anything, or else we can only hardcode existing
16828 # directories.
16829 hardcode_action=unsupported
16830fi
5213506e
RW
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
16832$as_echo "$hardcode_action" >&6; }
da0f6381
PB
16833
16834if test "$hardcode_action" = relink ||
16835 test "$inherit_rpath" = yes; then
16836 # Fast installation is not supported
16837 enable_fast_install=no
16838elif test "$shlibpath_overrides_runpath" = yes ||
16839 test "$enable_shared" = no; then
16840 # Fast installation is not necessary
16841 enable_fast_install=needless
16842fi
16843
16844
16845
16846
16847
16848
16849 if test "x$enable_dlopen" != xyes; then
16850 enable_dlopen=unknown
16851 enable_dlopen_self=unknown
16852 enable_dlopen_self_static=unknown
16853else
16854 lt_cv_dlopen=no
16855 lt_cv_dlopen_libs=
16856
16857 case $host_os in
16858 beos*)
16859 lt_cv_dlopen="load_add_on"
16860 lt_cv_dlopen_libs=
16861 lt_cv_dlopen_self=yes
16862 ;;
16863
5d47bb02 16864 mingw* | pw32* | cegcc*)
da0f6381 16865 lt_cv_dlopen="LoadLibrary"
5213506e
RW
16866 lt_cv_dlopen_libs=
16867 ;;
da0f6381 16868
5213506e
RW
16869 cygwin*)
16870 lt_cv_dlopen="dlopen"
16871 lt_cv_dlopen_libs=
16872 ;;
16873
16874 darwin*)
16875 # if libdl is installed we need to link against it
16876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16877$as_echo_n "checking for dlopen in -ldl... " >&6; }
16878if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
16879 $as_echo_n "(cached) " >&6
da0f6381
PB
16880else
16881 ac_check_lib_save_LIBS=$LIBS
5213506e
RW
16882LIBS="-ldl $LIBS"
16883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16884/* end confdefs.h. */
16885
5213506e
RW
16886/* Override any GCC internal prototype to avoid an error.
16887 Use char because int might match the return type of a GCC
16888 builtin and then its argument prototype would still apply. */
da0f6381
PB
16889#ifdef __cplusplus
16890extern "C"
16891#endif
5213506e 16892char dlopen ();
da0f6381
PB
16893int
16894main ()
16895{
5213506e 16896return dlopen ();
da0f6381
PB
16897 ;
16898 return 0;
16899}
16900_ACEOF
5213506e
RW
16901if ac_fn_c_try_link "$LINENO"; then :
16902 ac_cv_lib_dl_dlopen=yes
da0f6381 16903else
5213506e 16904 ac_cv_lib_dl_dlopen=no
da0f6381 16905fi
5213506e
RW
16906rm -f core conftest.err conftest.$ac_objext \
16907 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
16908LIBS=$ac_check_lib_save_LIBS
16909fi
5213506e
RW
16910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16911$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16912if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
16913 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
da0f6381 16914else
da0f6381 16915
5213506e
RW
16916 lt_cv_dlopen="dyld"
16917 lt_cv_dlopen_libs=
16918 lt_cv_dlopen_self=yes
da0f6381 16919
5213506e 16920fi
da0f6381 16921
5213506e 16922 ;;
da0f6381 16923
5213506e
RW
16924 *)
16925 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
16926if test "x$ac_cv_func_shl_load" = x""yes; then :
16927 lt_cv_dlopen="shl_load"
16928else
16929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
16930$as_echo_n "checking for shl_load in -ldld... " >&6; }
16931if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
16932 $as_echo_n "(cached) " >&6
16933else
16934 ac_check_lib_save_LIBS=$LIBS
16935LIBS="-ldld $LIBS"
16936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16937/* end confdefs.h. */
16938
16939/* Override any GCC internal prototype to avoid an error.
16940 Use char because int might match the return type of a GCC
da0f6381 16941 builtin and then its argument prototype would still apply. */
da0f6381 16942#ifdef __cplusplus
5213506e 16943extern "C"
da0f6381 16944#endif
5213506e 16945char shl_load ();
da0f6381
PB
16946int
16947main ()
16948{
5213506e 16949return shl_load ();
da0f6381
PB
16950 ;
16951 return 0;
16952}
16953_ACEOF
5213506e
RW
16954if ac_fn_c_try_link "$LINENO"; then :
16955 ac_cv_lib_dld_shl_load=yes
da0f6381 16956else
5213506e 16957 ac_cv_lib_dld_shl_load=no
da0f6381 16958fi
5213506e
RW
16959rm -f core conftest.err conftest.$ac_objext \
16960 conftest$ac_exeext conftest.$ac_ext
16961LIBS=$ac_check_lib_save_LIBS
da0f6381 16962fi
5213506e
RW
16963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
16964$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
16965if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
16966 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
16967else
16968 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16969if test "x$ac_cv_func_dlopen" = x""yes; then :
da0f6381
PB
16970 lt_cv_dlopen="dlopen"
16971else
5213506e
RW
16972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16973$as_echo_n "checking for dlopen in -ldl... " >&6; }
16974if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
16975 $as_echo_n "(cached) " >&6
da0f6381
PB
16976else
16977 ac_check_lib_save_LIBS=$LIBS
16978LIBS="-ldl $LIBS"
5213506e 16979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
16980/* end confdefs.h. */
16981
5213506e
RW
16982/* Override any GCC internal prototype to avoid an error.
16983 Use char because int might match the return type of a GCC
16984 builtin and then its argument prototype would still apply. */
da0f6381
PB
16985#ifdef __cplusplus
16986extern "C"
16987#endif
da0f6381
PB
16988char dlopen ();
16989int
16990main ()
16991{
5213506e 16992return dlopen ();
da0f6381
PB
16993 ;
16994 return 0;
16995}
16996_ACEOF
5213506e 16997if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
16998 ac_cv_lib_dl_dlopen=yes
16999else
5213506e 17000 ac_cv_lib_dl_dlopen=no
da0f6381 17001fi
5213506e
RW
17002rm -f core conftest.err conftest.$ac_objext \
17003 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
17004LIBS=$ac_check_lib_save_LIBS
17005fi
5213506e
RW
17006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
17007$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
17008if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
da0f6381
PB
17009 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
17010else
5213506e
RW
17011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
17012$as_echo_n "checking for dlopen in -lsvld... " >&6; }
17013if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
17014 $as_echo_n "(cached) " >&6
da0f6381
PB
17015else
17016 ac_check_lib_save_LIBS=$LIBS
17017LIBS="-lsvld $LIBS"
5213506e 17018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17019/* end confdefs.h. */
17020
5213506e
RW
17021/* Override any GCC internal prototype to avoid an error.
17022 Use char because int might match the return type of a GCC
17023 builtin and then its argument prototype would still apply. */
da0f6381
PB
17024#ifdef __cplusplus
17025extern "C"
17026#endif
da0f6381
PB
17027char dlopen ();
17028int
17029main ()
17030{
5213506e 17031return dlopen ();
da0f6381
PB
17032 ;
17033 return 0;
17034}
17035_ACEOF
5213506e 17036if ac_fn_c_try_link "$LINENO"; then :
da0f6381
PB
17037 ac_cv_lib_svld_dlopen=yes
17038else
5213506e 17039 ac_cv_lib_svld_dlopen=no
da0f6381 17040fi
5213506e
RW
17041rm -f core conftest.err conftest.$ac_objext \
17042 conftest$ac_exeext conftest.$ac_ext
da0f6381
PB
17043LIBS=$ac_check_lib_save_LIBS
17044fi
5213506e
RW
17045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
17046$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
17047if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
da0f6381
PB
17048 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
17049else
5213506e
RW
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
17051$as_echo_n "checking for dld_link in -ldld... " >&6; }
17052if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
17053 $as_echo_n "(cached) " >&6
da0f6381
PB
17054else
17055 ac_check_lib_save_LIBS=$LIBS
17056LIBS="-ldld $LIBS"
5213506e 17057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da0f6381
PB
17058/* end confdefs.h. */
17059
5213506e
RW
17060/* Override any GCC internal prototype to avoid an error.
17061 Use char because int might match the return type of a GCC
17062 builtin and then its argument prototype would still apply. */
da0f6381
PB
17063#ifdef __cplusplus
17064extern "C"
17065#endif
da0f6381
PB
17066char dld_link ();
17067int
17068main ()
17069{
5213506e 17070return dld_link ();
00020c16
ILT
17071 ;
17072 return 0;
17073}
17074_ACEOF
5213506e 17075if ac_fn_c_try_link "$LINENO"; then :
00020c16
ILT
17076 ac_cv_lib_dld_dld_link=yes
17077else
5213506e 17078 ac_cv_lib_dld_dld_link=no
00020c16 17079fi
5213506e
RW
17080rm -f core conftest.err conftest.$ac_objext \
17081 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
17082LIBS=$ac_check_lib_save_LIBS
17083fi
5213506e
RW
17084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
17085$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
17086if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
00020c16
ILT
17087 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
17088fi
17089
17090
17091fi
17092
17093
17094fi
17095
17096
17097fi
17098
17099
17100fi
17101
17102
17103fi
17104
17105 ;;
17106 esac
17107
17108 if test "x$lt_cv_dlopen" != xno; then
17109 enable_dlopen=yes
17110 else
17111 enable_dlopen=no
17112 fi
17113
17114 case $lt_cv_dlopen in
17115 dlopen)
17116 save_CPPFLAGS="$CPPFLAGS"
17117 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
17118
17119 save_LDFLAGS="$LDFLAGS"
17120 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
17121
17122 save_LIBS="$LIBS"
17123 LIBS="$lt_cv_dlopen_libs $LIBS"
17124
5213506e
RW
17125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
17126$as_echo_n "checking whether a program can dlopen itself... " >&6; }
17127if test "${lt_cv_dlopen_self+set}" = set; then :
17128 $as_echo_n "(cached) " >&6
00020c16
ILT
17129else
17130 if test "$cross_compiling" = yes; then :
17131 lt_cv_dlopen_self=cross
17132else
17133 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17134 lt_status=$lt_dlunknown
17135 cat > conftest.$ac_ext <<_LT_EOF
1cd0b716 17136#line 17136 "configure"
00020c16
ILT
17137#include "confdefs.h"
17138
17139#if HAVE_DLFCN_H
17140#include <dlfcn.h>
17141#endif
17142
17143#include <stdio.h>
17144
17145#ifdef RTLD_GLOBAL
17146# define LT_DLGLOBAL RTLD_GLOBAL
17147#else
17148# ifdef DL_GLOBAL
17149# define LT_DLGLOBAL DL_GLOBAL
17150# else
17151# define LT_DLGLOBAL 0
17152# endif
17153#endif
17154
17155/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17156 find out it does not work in some platform. */
17157#ifndef LT_DLLAZY_OR_NOW
17158# ifdef RTLD_LAZY
17159# define LT_DLLAZY_OR_NOW RTLD_LAZY
17160# else
17161# ifdef DL_LAZY
17162# define LT_DLLAZY_OR_NOW DL_LAZY
17163# else
17164# ifdef RTLD_NOW
17165# define LT_DLLAZY_OR_NOW RTLD_NOW
17166# else
17167# ifdef DL_NOW
17168# define LT_DLLAZY_OR_NOW DL_NOW
17169# else
17170# define LT_DLLAZY_OR_NOW 0
17171# endif
17172# endif
17173# endif
17174# endif
17175#endif
17176
43e02a8a
RW
17177/* When -fvisbility=hidden is used, assume the code has been annotated
17178 correspondingly for the symbols needed. */
17179#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17180void fnord () __attribute__((visibility("default")));
17181#endif
17182
17183void fnord () { int i=42; }
00020c16
ILT
17184int main ()
17185{
17186 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17187 int status = $lt_dlunknown;
17188
17189 if (self)
17190 {
17191 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
43e02a8a
RW
17192 else
17193 {
17194 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17195 else puts (dlerror ());
17196 }
00020c16
ILT
17197 /* dlclose (self); */
17198 }
17199 else
17200 puts (dlerror ());
17201
17202 return status;
17203}
17204_LT_EOF
5213506e 17205 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17206 (eval $ac_link) 2>&5
17207 ac_status=$?
5213506e
RW
17208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17209 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17210 (./conftest; exit; ) >&5 2>/dev/null
17211 lt_status=$?
17212 case x$lt_status in
17213 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
17214 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
17215 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
17216 esac
17217 else :
17218 # compilation failed
17219 lt_cv_dlopen_self=no
17220 fi
17221fi
17222rm -fr conftest*
17223
17224
17225fi
5213506e
RW
17226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
17227$as_echo "$lt_cv_dlopen_self" >&6; }
00020c16
ILT
17228
17229 if test "x$lt_cv_dlopen_self" = xyes; then
17230 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
5213506e
RW
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
17232$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
17233if test "${lt_cv_dlopen_self_static+set}" = set; then :
17234 $as_echo_n "(cached) " >&6
00020c16
ILT
17235else
17236 if test "$cross_compiling" = yes; then :
17237 lt_cv_dlopen_self_static=cross
17238else
17239 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17240 lt_status=$lt_dlunknown
17241 cat > conftest.$ac_ext <<_LT_EOF
1cd0b716 17242#line 17242 "configure"
00020c16
ILT
17243#include "confdefs.h"
17244
17245#if HAVE_DLFCN_H
17246#include <dlfcn.h>
17247#endif
17248
17249#include <stdio.h>
17250
17251#ifdef RTLD_GLOBAL
17252# define LT_DLGLOBAL RTLD_GLOBAL
17253#else
17254# ifdef DL_GLOBAL
17255# define LT_DLGLOBAL DL_GLOBAL
17256# else
17257# define LT_DLGLOBAL 0
17258# endif
17259#endif
17260
17261/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17262 find out it does not work in some platform. */
17263#ifndef LT_DLLAZY_OR_NOW
17264# ifdef RTLD_LAZY
17265# define LT_DLLAZY_OR_NOW RTLD_LAZY
17266# else
17267# ifdef DL_LAZY
17268# define LT_DLLAZY_OR_NOW DL_LAZY
17269# else
17270# ifdef RTLD_NOW
17271# define LT_DLLAZY_OR_NOW RTLD_NOW
17272# else
17273# ifdef DL_NOW
17274# define LT_DLLAZY_OR_NOW DL_NOW
17275# else
17276# define LT_DLLAZY_OR_NOW 0
17277# endif
17278# endif
17279# endif
17280# endif
17281#endif
17282
43e02a8a
RW
17283/* When -fvisbility=hidden is used, assume the code has been annotated
17284 correspondingly for the symbols needed. */
17285#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17286void fnord () __attribute__((visibility("default")));
17287#endif
17288
17289void fnord () { int i=42; }
00020c16
ILT
17290int main ()
17291{
17292 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17293 int status = $lt_dlunknown;
17294
17295 if (self)
17296 {
17297 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
43e02a8a
RW
17298 else
17299 {
17300 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17301 else puts (dlerror ());
17302 }
00020c16
ILT
17303 /* dlclose (self); */
17304 }
17305 else
17306 puts (dlerror ());
17307
17308 return status;
17309}
17310_LT_EOF
5213506e 17311 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
00020c16
ILT
17312 (eval $ac_link) 2>&5
17313 ac_status=$?
5213506e
RW
17314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17315 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
00020c16
ILT
17316 (./conftest; exit; ) >&5 2>/dev/null
17317 lt_status=$?
17318 case x$lt_status in
17319 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
17320 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
17321 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
17322 esac
17323 else :
17324 # compilation failed
17325 lt_cv_dlopen_self_static=no
17326 fi
17327fi
17328rm -fr conftest*
17329
17330
17331fi
5213506e
RW
17332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
17333$as_echo "$lt_cv_dlopen_self_static" >&6; }
00020c16
ILT
17334 fi
17335
17336 CPPFLAGS="$save_CPPFLAGS"
17337 LDFLAGS="$save_LDFLAGS"
17338 LIBS="$save_LIBS"
17339 ;;
17340 esac
17341
17342 case $lt_cv_dlopen_self in
17343 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
17344 *) enable_dlopen_self=unknown ;;
17345 esac
17346
17347 case $lt_cv_dlopen_self_static in
17348 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
17349 *) enable_dlopen_self_static=unknown ;;
17350 esac
17351fi
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369striplib=
17370old_striplib=
5213506e
RW
17371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
17372$as_echo_n "checking whether stripping libraries is possible... " >&6; }
00020c16
ILT
17373if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
17374 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
17375 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5213506e
RW
17376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17377$as_echo "yes" >&6; }
00020c16
ILT
17378else
17379# FIXME - insert some real tests, host_os isn't really good enough
17380 case $host_os in
17381 darwin*)
17382 if test -n "$STRIP" ; then
17383 striplib="$STRIP -x"
17384 old_striplib="$STRIP -S"
5213506e
RW
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17386$as_echo "yes" >&6; }
00020c16 17387 else
5213506e
RW
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17389$as_echo "no" >&6; }
00020c16
ILT
17390 fi
17391 ;;
17392 *)
5213506e
RW
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17394$as_echo "no" >&6; }
00020c16
ILT
17395 ;;
17396 esac
17397fi
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410 # Report which library types will actually be built
5213506e
RW
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
17412$as_echo_n "checking if libtool supports shared libraries... " >&6; }
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
17414$as_echo "$can_build_shared" >&6; }
00020c16 17415
5213506e
RW
17416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
17417$as_echo_n "checking whether to build shared libraries... " >&6; }
00020c16
ILT
17418 test "$can_build_shared" = "no" && enable_shared=no
17419
17420 # On AIX, shared libraries and static libraries use the same namespace, and
17421 # are all built from PIC.
17422 case $host_os in
17423 aix3*)
17424 test "$enable_shared" = yes && enable_static=no
17425 if test -n "$RANLIB"; then
17426 archive_cmds="$archive_cmds~\$RANLIB \$lib"
17427 postinstall_cmds='$RANLIB $lib'
17428 fi
17429 ;;
17430
17431 aix[4-9]*)
17432 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
17433 test "$enable_shared" = yes && enable_static=no
17434 fi
17435 ;;
17436 esac
5213506e
RW
17437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
17438$as_echo "$enable_shared" >&6; }
00020c16 17439
5213506e
RW
17440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
17441$as_echo_n "checking whether to build static libraries... " >&6; }
00020c16
ILT
17442 # Make sure either enable_shared or enable_static is yes.
17443 test "$enable_shared" = yes || enable_static=yes
5213506e
RW
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
17445$as_echo "$enable_static" >&6; }
00020c16
ILT
17446
17447
17448
17449
17450fi
17451ac_ext=c
17452ac_cpp='$CPP $CPPFLAGS'
17453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17455ac_compiler_gnu=$ac_cv_c_compiler_gnu
17456
17457CC="$lt_save_CC"
17458
43e02a8a
RW
17459 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
17460 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
17461 (test "X$CXX" != "Xg++"))) ; then
17462 ac_ext=cpp
17463ac_cpp='$CXXCPP $CPPFLAGS'
17464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
17468$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
17469if test -z "$CXXCPP"; then
17470 if test "${ac_cv_prog_CXXCPP+set}" = set; then :
17471 $as_echo_n "(cached) " >&6
17472else
17473 # Double quotes because CXXCPP needs to be expanded
17474 for CXXCPP in "$CXX -E" "/lib/cpp"
17475 do
17476 ac_preproc_ok=false
17477for ac_cxx_preproc_warn_flag in '' yes
17478do
17479 # Use a header file that comes with gcc, so configuring glibc
17480 # with a fresh cross-compiler works.
17481 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17482 # <limits.h> exists even on freestanding compilers.
17483 # On the NeXT, cc -E runs the code through the compiler's parser,
17484 # not just through cpp. "Syntax error" is here to catch this case.
17485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17486/* end confdefs.h. */
17487#ifdef __STDC__
17488# include <limits.h>
17489#else
17490# include <assert.h>
17491#endif
17492 Syntax error
17493_ACEOF
17494if ac_fn_cxx_try_cpp "$LINENO"; then :
17495
17496else
17497 # Broken: fails on valid input.
17498continue
17499fi
17500rm -f conftest.err conftest.$ac_ext
17501
17502 # OK, works on sane cases. Now check whether nonexistent headers
17503 # can be detected and how.
17504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17505/* end confdefs.h. */
17506#include <ac_nonexistent.h>
17507_ACEOF
17508if ac_fn_cxx_try_cpp "$LINENO"; then :
17509 # Broken: success on invalid input.
17510continue
17511else
17512 # Passes both tests.
17513ac_preproc_ok=:
17514break
17515fi
17516rm -f conftest.err conftest.$ac_ext
17517
17518done
17519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17520rm -f conftest.err conftest.$ac_ext
17521if $ac_preproc_ok; then :
17522 break
17523fi
17524
17525 done
17526 ac_cv_prog_CXXCPP=$CXXCPP
17527
17528fi
17529 CXXCPP=$ac_cv_prog_CXXCPP
17530else
17531 ac_cv_prog_CXXCPP=$CXXCPP
17532fi
17533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
17534$as_echo "$CXXCPP" >&6; }
17535ac_preproc_ok=false
17536for ac_cxx_preproc_warn_flag in '' yes
17537do
17538 # Use a header file that comes with gcc, so configuring glibc
17539 # with a fresh cross-compiler works.
17540 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17541 # <limits.h> exists even on freestanding compilers.
17542 # On the NeXT, cc -E runs the code through the compiler's parser,
17543 # not just through cpp. "Syntax error" is here to catch this case.
17544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17545/* end confdefs.h. */
17546#ifdef __STDC__
17547# include <limits.h>
17548#else
17549# include <assert.h>
17550#endif
17551 Syntax error
17552_ACEOF
17553if ac_fn_cxx_try_cpp "$LINENO"; then :
17554
17555else
17556 # Broken: fails on valid input.
17557continue
17558fi
17559rm -f conftest.err conftest.$ac_ext
17560
17561 # OK, works on sane cases. Now check whether nonexistent headers
17562 # can be detected and how.
17563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17564/* end confdefs.h. */
17565#include <ac_nonexistent.h>
17566_ACEOF
17567if ac_fn_cxx_try_cpp "$LINENO"; then :
17568 # Broken: success on invalid input.
17569continue
17570else
17571 # Passes both tests.
17572ac_preproc_ok=:
17573break
17574fi
17575rm -f conftest.err conftest.$ac_ext
17576
17577done
17578# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17579rm -f conftest.err conftest.$ac_ext
17580if $ac_preproc_ok; then :
17581
17582else
17583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17585as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
17586See \`config.log' for more details." "$LINENO" 5; }
17587fi
17588
17589ac_ext=c
17590ac_cpp='$CPP $CPPFLAGS'
17591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17593ac_compiler_gnu=$ac_cv_c_compiler_gnu
17594
17595else
17596 _lt_caught_CXX_error=yes
17597fi
00020c16 17598
5213506e 17599ac_ext=cpp
00020c16
ILT
17600ac_cpp='$CXXCPP $CPPFLAGS'
17601ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17602ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17603ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17604
17605archive_cmds_need_lc_CXX=no
17606allow_undefined_flag_CXX=
17607always_export_symbols_CXX=no
17608archive_expsym_cmds_CXX=
17609compiler_needs_object_CXX=no
17610export_dynamic_flag_spec_CXX=
17611hardcode_direct_CXX=no
17612hardcode_direct_absolute_CXX=no
17613hardcode_libdir_flag_spec_CXX=
17614hardcode_libdir_flag_spec_ld_CXX=
17615hardcode_libdir_separator_CXX=
17616hardcode_minus_L_CXX=no
17617hardcode_shlibpath_var_CXX=unsupported
17618hardcode_automatic_CXX=no
17619inherit_rpath_CXX=no
17620module_cmds_CXX=
17621module_expsym_cmds_CXX=
17622link_all_deplibs_CXX=unknown
17623old_archive_cmds_CXX=$old_archive_cmds
43e02a8a
RW
17624reload_flag_CXX=$reload_flag
17625reload_cmds_CXX=$reload_cmds
00020c16
ILT
17626no_undefined_flag_CXX=
17627whole_archive_flag_spec_CXX=
17628enable_shared_with_static_runtimes_CXX=no
17629
17630# Source file extension for C++ test sources.
17631ac_ext=cpp
17632
17633# Object file extension for compiled C++ test sources.
17634objext=o
17635objext_CXX=$objext
17636
17637# No sense in running all these tests if we already determined that
17638# the CXX compiler isn't working. Some variables (like enable_shared)
17639# are currently assumed to apply to all compilers on this platform,
17640# and will be corrupted by setting them based on a non-working compiler.
17641if test "$_lt_caught_CXX_error" != yes; then
17642 # Code to be used in simple compile tests
17643 lt_simple_compile_test_code="int some_variable = 0;"
17644
17645 # Code to be used in simple link tests
17646 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
17647
17648 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
17649
17650
17651
17652
17653
17654
17655# If no C compiler was specified, use CC.
17656LTCC=${LTCC-"$CC"}
17657
17658# If no C compiler flags were specified, use CFLAGS.
17659LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17660
17661# Allow CC to be a program name with arguments.
17662compiler=$CC
17663
17664
17665 # save warnings/boilerplate of simple test code
17666 ac_outfile=conftest.$ac_objext
17667echo "$lt_simple_compile_test_code" >conftest.$ac_ext
17668eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17669_lt_compiler_boilerplate=`cat conftest.err`
17670$RM conftest*
17671
17672 ac_outfile=conftest.$ac_objext
17673echo "$lt_simple_link_test_code" >conftest.$ac_ext
17674eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17675_lt_linker_boilerplate=`cat conftest.err`
17676$RM -r conftest*
17677
17678
17679 # Allow CC to be a program name with arguments.
17680 lt_save_CC=$CC
17681 lt_save_LD=$LD
17682 lt_save_GCC=$GCC
17683 GCC=$GXX
17684 lt_save_with_gnu_ld=$with_gnu_ld
17685 lt_save_path_LD=$lt_cv_path_LD
17686 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
17687 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
17688 else
17689 $as_unset lt_cv_prog_gnu_ld
17690 fi
17691 if test -n "${lt_cv_path_LDCXX+set}"; then
17692 lt_cv_path_LD=$lt_cv_path_LDCXX
17693 else
17694 $as_unset lt_cv_path_LD
17695 fi
17696 test -z "${LDCXX+set}" || LD=$LDCXX
17697 CC=${CXX-"c++"}
17698 compiler=$CC
17699 compiler_CXX=$CC
17700 for cc_temp in $compiler""; do
17701 case $cc_temp in
17702 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17703 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17704 \-*) ;;
17705 *) break;;
17706 esac
17707done
43e02a8a 17708cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
00020c16
ILT
17709
17710
17711 if test -n "$compiler"; then
17712 # We don't want -fno-exception when compiling C++ code, so set the
17713 # no_builtin_flag separately
17714 if test "$GXX" = yes; then
17715 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
17716 else
17717 lt_prog_compiler_no_builtin_flag_CXX=
17718 fi
17719
17720 if test "$GXX" = yes; then
17721 # Set up default GNU C++ configuration
17722
17723
17724
5213506e
RW
17725# Check whether --with-gnu-ld was given.
17726if test "${with_gnu_ld+set}" = set; then :
17727 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
00020c16
ILT
17728else
17729 with_gnu_ld=no
5213506e
RW
17730fi
17731
00020c16
ILT
17732ac_prog=ld
17733if test "$GCC" = yes; then
17734 # Check if gcc -print-prog-name=ld gives a path.
5213506e
RW
17735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17736$as_echo_n "checking for ld used by $CC... " >&6; }
00020c16
ILT
17737 case $host in
17738 *-*-mingw*)
17739 # gcc leaves a trailing carriage return which upsets mingw
17740 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17741 *)
17742 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17743 esac
17744 case $ac_prog in
17745 # Accept absolute paths.
17746 [\\/]* | ?:[\\/]*)
17747 re_direlt='/[^/][^/]*/\.\./'
17748 # Canonicalize the pathname of ld
17749 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
17750 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
17751 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
17752 done
17753 test -z "$LD" && LD="$ac_prog"
17754 ;;
17755 "")
17756 # If it fails, then pretend we aren't using GCC.
17757 ac_prog=ld
17758 ;;
17759 *)
17760 # If it is relative, then search for the first ld in PATH.
17761 with_gnu_ld=unknown
17762 ;;
17763 esac
17764elif test "$with_gnu_ld" = yes; then
5213506e
RW
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17766$as_echo_n "checking for GNU ld... " >&6; }
00020c16 17767else
5213506e
RW
17768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17769$as_echo_n "checking for non-GNU ld... " >&6; }
00020c16 17770fi
5213506e
RW
17771if test "${lt_cv_path_LD+set}" = set; then :
17772 $as_echo_n "(cached) " >&6
00020c16
ILT
17773else
17774 if test -z "$LD"; then
17775 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17776 for ac_dir in $PATH; do
17777 IFS="$lt_save_ifs"
17778 test -z "$ac_dir" && ac_dir=.
17779 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17780 lt_cv_path_LD="$ac_dir/$ac_prog"
17781 # Check to see if the program is GNU ld. I'd rather use --version,
17782 # but apparently some variants of GNU ld only accept -v.
17783 # Break only if it was the GNU/non-GNU ld that we prefer.
17784 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
17785 *GNU* | *'with BFD'*)
17786 test "$with_gnu_ld" != no && break
17787 ;;
17788 *)
17789 test "$with_gnu_ld" != yes && break
17790 ;;
17791 esac
17792 fi
17793 done
17794 IFS="$lt_save_ifs"
17795else
17796 lt_cv_path_LD="$LD" # Let the user override the test with a path.
17797fi
17798fi
17799
17800LD="$lt_cv_path_LD"
17801if test -n "$LD"; then
5213506e
RW
17802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17803$as_echo "$LD" >&6; }
00020c16 17804else
5213506e
RW
17805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17806$as_echo "no" >&6; }
00020c16 17807fi
5213506e
RW
17808test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
17809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17810$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
17811if test "${lt_cv_prog_gnu_ld+set}" = set; then :
17812 $as_echo_n "(cached) " >&6
00020c16
ILT
17813else
17814 # I'd rather use --version here, but apparently some GNU lds only accept -v.
17815case `$LD -v 2>&1 </dev/null` in
17816*GNU* | *'with BFD'*)
17817 lt_cv_prog_gnu_ld=yes
17818 ;;
17819*)
17820 lt_cv_prog_gnu_ld=no
17821 ;;
17822esac
17823fi
5213506e
RW
17824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
17825$as_echo "$lt_cv_prog_gnu_ld" >&6; }
00020c16
ILT
17826with_gnu_ld=$lt_cv_prog_gnu_ld
17827
17828
17829
17830
17831
17832
17833
17834 # Check if GNU C++ uses GNU ld as the underlying linker, since the
17835 # archiving commands below assume that GNU ld is being used.
17836 if test "$with_gnu_ld" = yes; then
17837 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
17838 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'
17839
17840 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
17841 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
17842
17843 # If archive_cmds runs LD, not CC, wlarc should be empty
17844 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
17845 # investigate it a little bit more. (MM)
17846 wlarc='${wl}'
17847
17848 # ancient GNU ld didn't support --whole-archive et. al.
17849 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
17850 $GREP 'no-whole-archive' > /dev/null; then
17851 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17852 else
17853 whole_archive_flag_spec_CXX=
17854 fi
17855 else
17856 with_gnu_ld=no
17857 wlarc=
17858
17859 # A generic and very simple default shared library creation
17860 # command for GNU C++ for the case where it uses the native
17861 # linker, instead of GNU ld. If possible, this setting should
17862 # overridden to take advantage of the native linker features on
17863 # the platform it is being used on.
17864 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
17865 fi
17866
17867 # Commands to make compiler produce verbose output that lists
17868 # what "hidden" libraries, object files and flags are used when
17869 # linking a shared library.
43e02a8a 17870 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
17871
17872 else
17873 GXX=no
17874 with_gnu_ld=no
17875 wlarc=
17876 fi
17877
17878 # PORTME: fill in a description of your system's C++ link characteristics
5213506e
RW
17879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17880$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
17881 ld_shlibs_CXX=yes
17882 case $host_os in
17883 aix3*)
17884 # FIXME: insert proper C++ library support
17885 ld_shlibs_CXX=no
17886 ;;
17887 aix[4-9]*)
17888 if test "$host_cpu" = ia64; then
17889 # On IA64, the linker does run time linking by default, so we don't
17890 # have to do anything special.
17891 aix_use_runtimelinking=no
17892 exp_sym_flag='-Bexport'
17893 no_entry_flag=""
17894 else
17895 aix_use_runtimelinking=no
17896
17897 # Test if we are trying to use run time linking or normal
17898 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17899 # need to do runtime linking.
17900 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17901 for ld_flag in $LDFLAGS; do
17902 case $ld_flag in
17903 *-brtl*)
17904 aix_use_runtimelinking=yes
17905 break
17906 ;;
17907 esac
17908 done
17909 ;;
17910 esac
17911
17912 exp_sym_flag='-bexport'
17913 no_entry_flag='-bnoentry'
17914 fi
17915
17916 # When large executables or shared objects are built, AIX ld can
17917 # have problems creating the table of contents. If linking a library
17918 # or program results in "error TOC overflow" add -mminimal-toc to
17919 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17920 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17921
17922 archive_cmds_CXX=''
17923 hardcode_direct_CXX=yes
17924 hardcode_direct_absolute_CXX=yes
17925 hardcode_libdir_separator_CXX=':'
17926 link_all_deplibs_CXX=yes
17927 file_list_spec_CXX='${wl}-f,'
17928
17929 if test "$GXX" = yes; then
17930 case $host_os in aix4.[012]|aix4.[012].*)
17931 # We only want to do this on AIX 4.2 and lower, the check
17932 # below for broken collect2 doesn't work under 4.3+
17933 collect2name=`${CC} -print-prog-name=collect2`
17934 if test -f "$collect2name" &&
17935 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17936 then
17937 # We have reworked collect2
17938 :
17939 else
17940 # We have old collect2
17941 hardcode_direct_CXX=unsupported
17942 # It fails to find uninstalled libraries when the uninstalled
17943 # path is not listed in the libpath. Setting hardcode_minus_L
17944 # to unsupported forces relinking
17945 hardcode_minus_L_CXX=yes
17946 hardcode_libdir_flag_spec_CXX='-L$libdir'
17947 hardcode_libdir_separator_CXX=
17948 fi
17949 esac
17950 shared_flag='-shared'
17951 if test "$aix_use_runtimelinking" = yes; then
17952 shared_flag="$shared_flag "'${wl}-G'
17953 fi
17954 else
17955 # not using gcc
17956 if test "$host_cpu" = ia64; then
17957 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17958 # chokes on -Wl,-G. The following line is correct:
17959 shared_flag='-G'
17960 else
17961 if test "$aix_use_runtimelinking" = yes; then
17962 shared_flag='${wl}-G'
17963 else
17964 shared_flag='${wl}-bM:SRE'
17965 fi
17966 fi
17967 fi
17968
17969 export_dynamic_flag_spec_CXX='${wl}-bexpall'
17970 # It seems that -bexpall does not export symbols beginning with
17971 # underscore (_), so it is better to generate a list of symbols to
17972 # export.
17973 always_export_symbols_CXX=yes
17974 if test "$aix_use_runtimelinking" = yes; then
17975 # Warning - without using the other runtime loading flags (-brtl),
17976 # -berok will link without error, but may produce a broken library.
17977 allow_undefined_flag_CXX='-berok'
17978 # Determine the default libpath from the value encoded in an empty
17979 # executable.
5213506e 17980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
17981/* end confdefs.h. */
17982
17983int
17984main ()
17985{
17986
17987 ;
17988 return 0;
17989}
17990_ACEOF
5213506e 17991if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
17992
17993lt_aix_libpath_sed='
17994 /Import File Strings/,/^$/ {
17995 /^0/ {
17996 s/^0 *\(.*\)$/\1/
17997 p
17998 }
17999 }'
18000aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18001# Check for a 64-bit object if we didn't find anything.
18002if test -z "$aix_libpath"; then
18003 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18004fi
00020c16 18005fi
5213506e
RW
18006rm -f core conftest.err conftest.$ac_objext \
18007 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
18008if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
18009
18010 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
18011
43e02a8a 18012 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
18013 else
18014 if test "$host_cpu" = ia64; then
18015 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
18016 allow_undefined_flag_CXX="-z nodefs"
18017 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"
18018 else
18019 # Determine the default libpath from the value encoded in an
18020 # empty executable.
5213506e 18021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
18022/* end confdefs.h. */
18023
18024int
18025main ()
18026{
18027
18028 ;
18029 return 0;
18030}
18031_ACEOF
5213506e 18032if ac_fn_cxx_try_link "$LINENO"; then :
00020c16
ILT
18033
18034lt_aix_libpath_sed='
18035 /Import File Strings/,/^$/ {
18036 /^0/ {
18037 s/^0 *\(.*\)$/\1/
18038 p
18039 }
18040 }'
18041aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18042# Check for a 64-bit object if we didn't find anything.
18043if test -z "$aix_libpath"; then
18044 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
18045fi
00020c16 18046fi
5213506e
RW
18047rm -f core conftest.err conftest.$ac_objext \
18048 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
18049if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
18050
18051 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
18052 # Warning - without using the other run time loading flags,
18053 # -berok will link without error, but may produce a broken library.
18054 no_undefined_flag_CXX=' ${wl}-bernotok'
18055 allow_undefined_flag_CXX=' ${wl}-berok'
43e02a8a
RW
18056 if test "$with_gnu_ld" = yes; then
18057 # We only use this code for GNU lds that support --whole-archive.
18058 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
18059 else
18060 # Exported symbols can be pulled into shared objects from archives
18061 whole_archive_flag_spec_CXX='$convenience'
18062 fi
00020c16
ILT
18063 archive_cmds_need_lc_CXX=yes
18064 # This is similar to how AIX traditionally builds its shared
18065 # libraries.
18066 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'
18067 fi
18068 fi
18069 ;;
18070
18071 beos*)
18072 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18073 allow_undefined_flag_CXX=unsupported
18074 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
18075 # support --undefined. This deserves some investigation. FIXME
18076 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18077 else
18078 ld_shlibs_CXX=no
18079 fi
18080 ;;
18081
18082 chorus*)
18083 case $cc_basename in
18084 *)
18085 # FIXME: insert proper C++ library support
18086 ld_shlibs_CXX=no
18087 ;;
18088 esac
18089 ;;
18090
18091 cygwin* | mingw* | pw32* | cegcc*)
18092 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
18093 # as there is no search path for DLLs.
18094 hardcode_libdir_flag_spec_CXX='-L$libdir'
43e02a8a 18095 export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
00020c16
ILT
18096 allow_undefined_flag_CXX=unsupported
18097 always_export_symbols_CXX=no
18098 enable_shared_with_static_runtimes_CXX=yes
18099
18100 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
18101 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'
18102 # If the export-symbols file already is a .def file (1st line
18103 # is EXPORTS), use it as is; otherwise, prepend...
18104 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
18105 cp $export_symbols $output_objdir/$soname.def;
18106 else
18107 echo EXPORTS > $output_objdir/$soname.def;
18108 cat $export_symbols >> $output_objdir/$soname.def;
18109 fi~
18110 $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'
18111 else
18112 ld_shlibs_CXX=no
18113 fi
18114 ;;
18115 darwin* | rhapsody*)
18116
18117
18118 archive_cmds_need_lc_CXX=no
18119 hardcode_direct_CXX=no
18120 hardcode_automatic_CXX=yes
18121 hardcode_shlibpath_var_CXX=unsupported
43e02a8a
RW
18122 if test "$lt_cv_ld_force_load" = "yes"; then
18123 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\"`'
18124 else
18125 whole_archive_flag_spec_CXX=''
18126 fi
00020c16
ILT
18127 link_all_deplibs_CXX=yes
18128 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
18129 case $cc_basename in
18130 ifort*) _lt_dar_can_shared=yes ;;
18131 *) _lt_dar_can_shared=$GCC ;;
18132 esac
18133 if test "$_lt_dar_can_shared" = "yes"; then
43e02a8a 18134 output_verbose_link_cmd=func_echo_all
00020c16
ILT
18135 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}"
18136 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
18137 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}"
18138 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}"
18139 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
18140 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}"
18141 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}"
18142 fi
18143
18144 else
18145 ld_shlibs_CXX=no
18146 fi
18147
18148 ;;
18149
18150 dgux*)
18151 case $cc_basename in
18152 ec++*)
18153 # FIXME: insert proper C++ library support
18154 ld_shlibs_CXX=no
18155 ;;
18156 ghcx*)
18157 # Green Hills C++ Compiler
18158 # FIXME: insert proper C++ library support
18159 ld_shlibs_CXX=no
18160 ;;
18161 *)
18162 # FIXME: insert proper C++ library support
18163 ld_shlibs_CXX=no
18164 ;;
18165 esac
18166 ;;
18167
18168 freebsd[12]*)
18169 # C++ shared libraries reported to be fairly broken before
18170 # switch to ELF
18171 ld_shlibs_CXX=no
18172 ;;
18173
18174 freebsd-elf*)
18175 archive_cmds_need_lc_CXX=no
18176 ;;
18177
18178 freebsd* | dragonfly*)
18179 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
18180 # conventions
18181 ld_shlibs_CXX=yes
18182 ;;
18183
18184 gnu*)
18185 ;;
18186
43e02a8a
RW
18187 haiku*)
18188 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18189 link_all_deplibs_CXX=yes
18190 ;;
18191
00020c16
ILT
18192 hpux9*)
18193 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18194 hardcode_libdir_separator_CXX=:
18195 export_dynamic_flag_spec_CXX='${wl}-E'
18196 hardcode_direct_CXX=yes
18197 hardcode_minus_L_CXX=yes # Not in the search PATH,
18198 # but as the default
18199 # location of the library.
18200
18201 case $cc_basename in
18202 CC*)
18203 # FIXME: insert proper C++ library support
18204 ld_shlibs_CXX=no
18205 ;;
18206 aCC*)
18207 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'
18208 # Commands to make compiler produce verbose output that lists
18209 # what "hidden" libraries, object files and flags are used when
18210 # linking a shared library.
18211 #
18212 # There doesn't appear to be a way to prevent this compiler from
18213 # explicitly linking system object files so we need to strip them
18214 # from the output so that they don't get included in the library
18215 # dependencies.
43e02a8a 18216 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
18217 ;;
18218 *)
18219 if test "$GXX" = yes; then
18220 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'
18221 else
18222 # FIXME: insert proper C++ library support
18223 ld_shlibs_CXX=no
18224 fi
18225 ;;
18226 esac
18227 ;;
18228
18229 hpux10*|hpux11*)
18230 if test $with_gnu_ld = no; then
18231 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
18232 hardcode_libdir_separator_CXX=:
18233
18234 case $host_cpu in
18235 hppa*64*|ia64*)
18236 ;;
18237 *)
18238 export_dynamic_flag_spec_CXX='${wl}-E'
18239 ;;
18240 esac
18241 fi
18242 case $host_cpu in
18243 hppa*64*|ia64*)
18244 hardcode_direct_CXX=no
18245 hardcode_shlibpath_var_CXX=no
18246 ;;
18247 *)
18248 hardcode_direct_CXX=yes
18249 hardcode_direct_absolute_CXX=yes
18250 hardcode_minus_L_CXX=yes # Not in the search PATH,
18251 # but as the default
18252 # location of the library.
18253 ;;
18254 esac
18255
18256 case $cc_basename in
18257 CC*)
18258 # FIXME: insert proper C++ library support
18259 ld_shlibs_CXX=no
18260 ;;
18261 aCC*)
18262 case $host_cpu in
18263 hppa*64*)
18264 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18265 ;;
18266 ia64*)
18267 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18268 ;;
18269 *)
18270 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18271 ;;
18272 esac
18273 # Commands to make compiler produce verbose output that lists
18274 # what "hidden" libraries, object files and flags are used when
18275 # linking a shared library.
18276 #
18277 # There doesn't appear to be a way to prevent this compiler from
18278 # explicitly linking system object files so we need to strip them
18279 # from the output so that they don't get included in the library
18280 # dependencies.
43e02a8a 18281 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
18282 ;;
18283 *)
18284 if test "$GXX" = yes; then
18285 if test $with_gnu_ld = no; then
18286 case $host_cpu in
18287 hppa*64*)
18288 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18289 ;;
18290 ia64*)
18291 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18292 ;;
18293 *)
18294 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'
18295 ;;
18296 esac
18297 fi
18298 else
18299 # FIXME: insert proper C++ library support
18300 ld_shlibs_CXX=no
18301 fi
18302 ;;
18303 esac
18304 ;;
18305
18306 interix[3-9]*)
18307 hardcode_direct_CXX=no
18308 hardcode_shlibpath_var_CXX=no
18309 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18310 export_dynamic_flag_spec_CXX='${wl}-E'
18311 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
18312 # Instead, shared libraries are loaded at an image base (0x10000000 by
18313 # default) and relocated if they conflict, which is a slow very memory
18314 # consuming and fragmenting process. To avoid this, we pick a random,
18315 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
18316 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
18317 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'
18318 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'
18319 ;;
18320 irix5* | irix6*)
18321 case $cc_basename in
18322 CC*)
18323 # SGI C++
43e02a8a 18324 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
18325
18326 # Archives containing C++ object files must be created using
18327 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
18328 # necessary to make sure instantiated templates are included
18329 # in the archive.
18330 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
18331 ;;
18332 *)
18333 if test "$GXX" = yes; then
18334 if test "$with_gnu_ld" = no; then
43e02a8a 18335 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 18336 else
43e02a8a 18337 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
18338 fi
18339 fi
18340 link_all_deplibs_CXX=yes
18341 ;;
18342 esac
18343 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18344 hardcode_libdir_separator_CXX=:
18345 inherit_rpath_CXX=yes
18346 ;;
18347
18348 linux* | k*bsd*-gnu | kopensolaris*-gnu)
18349 case $cc_basename in
18350 KCC*)
18351 # Kuck and Associates, Inc. (KAI) C++ Compiler
18352
18353 # KCC will only create a shared library if the output file
18354 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18355 # to its proper name (with version) after linking.
18356 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'
18357 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'
18358 # Commands to make compiler produce verbose output that lists
18359 # what "hidden" libraries, object files and flags are used when
18360 # linking a shared library.
18361 #
18362 # There doesn't appear to be a way to prevent this compiler from
18363 # explicitly linking system object files so we need to strip them
18364 # from the output so that they don't get included in the library
18365 # dependencies.
43e02a8a 18366 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
18367
18368 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18369 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18370
18371 # Archives containing C++ object files must be created using
18372 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
18373 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
18374 ;;
18375 icpc* | ecpc* )
18376 # Intel C++
18377 with_gnu_ld=yes
18378 # version 8.0 and above of icpc choke on multiply defined symbols
18379 # if we add $predep_objects and $postdep_objects, however 7.1 and
18380 # earlier do not add the objects themselves.
18381 case `$CC -V 2>&1` in
18382 *"Version 7."*)
18383 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18384 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'
18385 ;;
18386 *) # Version 8.0 or newer
18387 tmp_idyn=
18388 case $host_cpu in
18389 ia64*) tmp_idyn=' -i_dynamic';;
18390 esac
18391 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18392 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'
18393 ;;
18394 esac
18395 archive_cmds_need_lc_CXX=no
18396 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18397 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18398 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
18399 ;;
18400 pgCC* | pgcpp*)
18401 # Portland Group C++ compiler
18402 case `$CC -V` in
43e02a8a 18403 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
00020c16
ILT
18404 prelink_cmds_CXX='tpldir=Template.dir~
18405 rm -rf $tpldir~
18406 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
18407 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
18408 old_archive_cmds_CXX='tpldir=Template.dir~
18409 rm -rf $tpldir~
18410 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
18411 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
18412 $RANLIB $oldlib'
18413 archive_cmds_CXX='tpldir=Template.dir~
18414 rm -rf $tpldir~
18415 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18416 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18417 archive_expsym_cmds_CXX='tpldir=Template.dir~
18418 rm -rf $tpldir~
18419 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18420 $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'
18421 ;;
43e02a8a 18422 *) # Version 6 and above use weak symbols
00020c16
ILT
18423 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
18424 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'
18425 ;;
18426 esac
18427
18428 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
18429 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
43e02a8a 18430 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
18431 ;;
18432 cxx*)
18433 # Compaq C++
18434 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
18435 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'
18436
18437 runpath_var=LD_RUN_PATH
18438 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18439 hardcode_libdir_separator_CXX=:
18440
18441 # Commands to make compiler produce verbose output that lists
18442 # what "hidden" libraries, object files and flags are used when
18443 # linking a shared library.
18444 #
18445 # There doesn't appear to be a way to prevent this compiler from
18446 # explicitly linking system object files so we need to strip them
18447 # from the output so that they don't get included in the library
18448 # dependencies.
43e02a8a 18449 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 18450 ;;
43e02a8a 18451 xl* | mpixl* | bgxl*)
00020c16
ILT
18452 # IBM XL 8.0 on PPC, with GNU ld
18453 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18454 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
18455 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18456 if test "x$supports_anon_versioning" = xyes; then
18457 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
18458 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
18459 echo "local: *; };" >> $output_objdir/$libname.ver~
18460 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
18461 fi
18462 ;;
18463 *)
18464 case `$CC -V 2>&1 | sed 5q` in
18465 *Sun\ C*)
18466 # Sun C++ 5.9
18467 no_undefined_flag_CXX=' -zdefs'
18468 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18469 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'
18470 hardcode_libdir_flag_spec_CXX='-R$libdir'
43e02a8a 18471 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
18472 compiler_needs_object_CXX=yes
18473
18474 # Not sure whether something based on
18475 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
18476 # would be better.
43e02a8a 18477 output_verbose_link_cmd='func_echo_all'
00020c16
ILT
18478
18479 # Archives containing C++ object files must be created using
18480 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18481 # necessary to make sure instantiated templates are included
18482 # in the archive.
18483 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18484 ;;
18485 esac
18486 ;;
18487 esac
18488 ;;
18489
18490 lynxos*)
18491 # FIXME: insert proper C++ library support
18492 ld_shlibs_CXX=no
18493 ;;
18494
18495 m88k*)
18496 # FIXME: insert proper C++ library support
18497 ld_shlibs_CXX=no
18498 ;;
18499
18500 mvs*)
18501 case $cc_basename in
18502 cxx*)
18503 # FIXME: insert proper C++ library support
18504 ld_shlibs_CXX=no
18505 ;;
18506 *)
18507 # FIXME: insert proper C++ library support
18508 ld_shlibs_CXX=no
18509 ;;
18510 esac
18511 ;;
18512
18513 netbsd*)
18514 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18515 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
18516 wlarc=
18517 hardcode_libdir_flag_spec_CXX='-R$libdir'
18518 hardcode_direct_CXX=yes
18519 hardcode_shlibpath_var_CXX=no
18520 fi
18521 # Workaround some broken pre-1.5 toolchains
18522 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
18523 ;;
18524
18525 *nto* | *qnx*)
18526 ld_shlibs_CXX=yes
18527 ;;
18528
18529 openbsd2*)
18530 # C++ shared libraries are fairly broken
18531 ld_shlibs_CXX=no
18532 ;;
18533
18534 openbsd*)
18535 if test -f /usr/libexec/ld.so; then
18536 hardcode_direct_CXX=yes
18537 hardcode_shlibpath_var_CXX=no
18538 hardcode_direct_absolute_CXX=yes
18539 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
18540 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18541 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18542 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
18543 export_dynamic_flag_spec_CXX='${wl}-E'
18544 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
18545 fi
43e02a8a 18546 output_verbose_link_cmd=func_echo_all
00020c16
ILT
18547 else
18548 ld_shlibs_CXX=no
18549 fi
18550 ;;
18551
18552 osf3* | osf4* | osf5*)
18553 case $cc_basename in
18554 KCC*)
18555 # Kuck and Associates, Inc. (KAI) C++ Compiler
18556
18557 # KCC will only create a shared library if the output file
18558 # ends with ".so" (or ".sl" for HP-UX), so rename the library
18559 # to its proper name (with version) after linking.
18560 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'
18561
18562 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
18563 hardcode_libdir_separator_CXX=:
18564
18565 # Archives containing C++ object files must be created using
18566 # the KAI C++ compiler.
18567 case $host in
18568 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
18569 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
18570 esac
18571 ;;
18572 RCC*)
18573 # Rational C++ 2.4.1
18574 # FIXME: insert proper C++ library support
18575 ld_shlibs_CXX=no
18576 ;;
18577 cxx*)
18578 case $host in
18579 osf3*)
18580 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
43e02a8a 18581 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
18582 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18583 ;;
18584 *)
18585 allow_undefined_flag_CXX=' -expect_unresolved \*'
43e02a8a 18586 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
18587 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
18588 echo "-hidden">> $lib.exp~
43e02a8a 18589 $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
18590 $RM $lib.exp'
18591 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18592 ;;
18593 esac
18594
18595 hardcode_libdir_separator_CXX=:
18596
18597 # Commands to make compiler produce verbose output that lists
18598 # what "hidden" libraries, object files and flags are used when
18599 # linking a shared library.
18600 #
18601 # There doesn't appear to be a way to prevent this compiler from
18602 # explicitly linking system object files so we need to strip them
18603 # from the output so that they don't get included in the library
18604 # dependencies.
43e02a8a 18605 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
18606 ;;
18607 *)
18608 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18609 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
18610 case $host in
18611 osf3*)
43e02a8a 18612 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
18613 ;;
18614 *)
43e02a8a 18615 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
18616 ;;
18617 esac
18618
18619 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
18620 hardcode_libdir_separator_CXX=:
18621
18622 # Commands to make compiler produce verbose output that lists
18623 # what "hidden" libraries, object files and flags are used when
18624 # linking a shared library.
43e02a8a 18625 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18626
18627 else
18628 # FIXME: insert proper C++ library support
18629 ld_shlibs_CXX=no
18630 fi
18631 ;;
18632 esac
18633 ;;
18634
18635 psos*)
18636 # FIXME: insert proper C++ library support
18637 ld_shlibs_CXX=no
18638 ;;
18639
18640 sunos4*)
18641 case $cc_basename in
18642 CC*)
18643 # Sun C++ 4.x
18644 # FIXME: insert proper C++ library support
18645 ld_shlibs_CXX=no
18646 ;;
18647 lcc*)
18648 # Lucid
18649 # FIXME: insert proper C++ library support
18650 ld_shlibs_CXX=no
18651 ;;
18652 *)
18653 # FIXME: insert proper C++ library support
18654 ld_shlibs_CXX=no
18655 ;;
18656 esac
18657 ;;
18658
18659 solaris*)
18660 case $cc_basename in
18661 CC*)
18662 # Sun C++ 4.2, 5.x and Centerline C++
18663 archive_cmds_need_lc_CXX=yes
18664 no_undefined_flag_CXX=' -zdefs'
18665 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18666 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18667 $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'
18668
18669 hardcode_libdir_flag_spec_CXX='-R$libdir'
18670 hardcode_shlibpath_var_CXX=no
18671 case $host_os in
18672 solaris2.[0-5] | solaris2.[0-5].*) ;;
18673 *)
18674 # The compiler driver will combine and reorder linker options,
18675 # but understands `-z linker_flag'.
18676 # Supported since Solaris 2.6 (maybe 2.5.1?)
18677 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
18678 ;;
18679 esac
18680 link_all_deplibs_CXX=yes
18681
43e02a8a 18682 output_verbose_link_cmd='func_echo_all'
00020c16
ILT
18683
18684 # Archives containing C++ object files must be created using
18685 # "CC -xar", where "CC" is the Sun C++ compiler. This is
18686 # necessary to make sure instantiated templates are included
18687 # in the archive.
18688 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18689 ;;
18690 gcx*)
18691 # Green Hills C++ Compiler
18692 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18693
18694 # The C++ compiler must be used to create the archive.
18695 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
18696 ;;
18697 *)
18698 # GNU C++ compiler with Solaris linker
18699 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
18700 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
18701 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
18702 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18703 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18704 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18705
18706 # Commands to make compiler produce verbose output that lists
18707 # what "hidden" libraries, object files and flags are used when
18708 # linking a shared library.
43e02a8a 18709 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18710 else
18711 # g++ 2.7 appears to require `-G' NOT `-shared' on this
18712 # platform.
18713 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
18714 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18715 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18716
18717 # Commands to make compiler produce verbose output that lists
18718 # what "hidden" libraries, object files and flags are used when
18719 # linking a shared library.
43e02a8a 18720 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
00020c16
ILT
18721 fi
18722
18723 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
18724 case $host_os in
18725 solaris2.[0-5] | solaris2.[0-5].*) ;;
18726 *)
18727 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
18728 ;;
18729 esac
18730 fi
18731 ;;
18732 esac
18733 ;;
18734
18735 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
18736 no_undefined_flag_CXX='${wl}-z,text'
18737 archive_cmds_need_lc_CXX=no
18738 hardcode_shlibpath_var_CXX=no
18739 runpath_var='LD_RUN_PATH'
18740
18741 case $cc_basename in
18742 CC*)
18743 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18744 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18745 ;;
18746 *)
18747 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18748 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18749 ;;
18750 esac
18751 ;;
18752
18753 sysv5* | sco3.2v5* | sco5v6*)
18754 # Note: We can NOT use -z defs as we might desire, because we do not
18755 # link with -lc, and that would cause any symbols used from libc to
18756 # always be unresolved, which means just about no library would
18757 # ever link correctly. If we're not using GNU ld we use -z text
18758 # though, which does catch some bad symbols but isn't as heavy-handed
18759 # as -z defs.
18760 no_undefined_flag_CXX='${wl}-z,text'
18761 allow_undefined_flag_CXX='${wl}-z,nodefs'
18762 archive_cmds_need_lc_CXX=no
18763 hardcode_shlibpath_var_CXX=no
18764 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
18765 hardcode_libdir_separator_CXX=':'
18766 link_all_deplibs_CXX=yes
18767 export_dynamic_flag_spec_CXX='${wl}-Bexport'
18768 runpath_var='LD_RUN_PATH'
18769
18770 case $cc_basename in
18771 CC*)
18772 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18773 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
43e02a8a
RW
18774 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
18775 '"$old_archive_cmds_CXX"
18776 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
18777 '"$reload_cmds_CXX"
00020c16
ILT
18778 ;;
18779 *)
18780 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18781 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18782 ;;
18783 esac
18784 ;;
18785
18786 tandem*)
18787 case $cc_basename in
18788 NCC*)
18789 # NonStop-UX NCC 3.20
18790 # FIXME: insert proper C++ library support
18791 ld_shlibs_CXX=no
18792 ;;
18793 *)
18794 # FIXME: insert proper C++ library support
18795 ld_shlibs_CXX=no
18796 ;;
18797 esac
18798 ;;
18799
18800 vxworks*)
18801 # FIXME: insert proper C++ library support
18802 ld_shlibs_CXX=no
18803 ;;
18804
18805 *)
18806 # FIXME: insert proper C++ library support
18807 ld_shlibs_CXX=no
18808 ;;
18809 esac
18810
5213506e
RW
18811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
18812$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
18813 test "$ld_shlibs_CXX" = no && can_build_shared=no
18814
18815 GCC_CXX="$GXX"
18816 LD_CXX="$LD"
18817
18818 ## CAVEAT EMPTOR:
18819 ## There is no encapsulation within the following macros, do not change
18820 ## the running order or otherwise move them around unless you know exactly
18821 ## what you are doing...
18822 # Dependencies to place before and after the object being linked:
18823predep_objects_CXX=
18824postdep_objects_CXX=
18825predeps_CXX=
18826postdeps_CXX=
18827compiler_lib_search_path_CXX=
18828
18829cat > conftest.$ac_ext <<_LT_EOF
18830class Foo
18831{
18832public:
18833 Foo (void) { a = 0; }
18834private:
18835 int a;
18836};
18837_LT_EOF
18838
5213506e 18839if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
18840 (eval $ac_compile) 2>&5
18841 ac_status=$?
5213506e
RW
18842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18843 test $ac_status = 0; }; then
00020c16
ILT
18844 # Parse the compiler output and extract the necessary
18845 # objects, libraries and library flags.
18846
18847 # Sentinel used to keep track of whether or not we are before
18848 # the conftest object file.
18849 pre_test_object_deps_done=no
18850
18851 for p in `eval "$output_verbose_link_cmd"`; do
18852 case $p in
18853
18854 -L* | -R* | -l*)
18855 # Some compilers place space between "-{L,R}" and the path.
18856 # Remove the space.
18857 if test $p = "-L" ||
18858 test $p = "-R"; then
18859 prev=$p
18860 continue
18861 else
18862 prev=
18863 fi
18864
18865 if test "$pre_test_object_deps_done" = no; then
18866 case $p in
18867 -L* | -R*)
18868 # Internal compiler library paths should come after those
18869 # provided the user. The postdeps already come after the
18870 # user supplied libs so there is no need to process them.
18871 if test -z "$compiler_lib_search_path_CXX"; then
18872 compiler_lib_search_path_CXX="${prev}${p}"
18873 else
18874 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
18875 fi
18876 ;;
18877 # The "-l" case would never come before the object being
18878 # linked, so don't bother handling this case.
18879 esac
18880 else
18881 if test -z "$postdeps_CXX"; then
18882 postdeps_CXX="${prev}${p}"
18883 else
18884 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
18885 fi
18886 fi
18887 ;;
18888
18889 *.$objext)
18890 # This assumes that the test object file only shows up
18891 # once in the compiler output.
18892 if test "$p" = "conftest.$objext"; then
18893 pre_test_object_deps_done=yes
18894 continue
18895 fi
18896
18897 if test "$pre_test_object_deps_done" = no; then
18898 if test -z "$predep_objects_CXX"; then
18899 predep_objects_CXX="$p"
18900 else
18901 predep_objects_CXX="$predep_objects_CXX $p"
18902 fi
18903 else
18904 if test -z "$postdep_objects_CXX"; then
18905 postdep_objects_CXX="$p"
18906 else
18907 postdep_objects_CXX="$postdep_objects_CXX $p"
18908 fi
18909 fi
18910 ;;
18911
18912 *) ;; # Ignore the rest.
18913
18914 esac
18915 done
18916
18917 # Clean up.
18918 rm -f a.out a.exe
18919else
18920 echo "libtool.m4: error: problem compiling CXX test program"
18921fi
18922
18923$RM -f confest.$objext
18924
18925# PORTME: override above test on systems where it is broken
18926case $host_os in
18927interix[3-9]*)
18928 # Interix 3.5 installs completely hosed .la files for C++, so rather than
18929 # hack all around it, let's just trust "g++" to DTRT.
18930 predep_objects_CXX=
18931 postdep_objects_CXX=
18932 postdeps_CXX=
18933 ;;
18934
18935linux*)
18936 case `$CC -V 2>&1 | sed 5q` in
18937 *Sun\ C*)
18938 # Sun C++ 5.9
18939
18940 # The more standards-conforming stlport4 library is
18941 # incompatible with the Cstd library. Avoid specifying
18942 # it if it's in CXXFLAGS. Ignore libCrun as
18943 # -library=stlport4 depends on it.
18944 case " $CXX $CXXFLAGS " in
18945 *" -library=stlport4 "*)
18946 solaris_use_stlport4=yes
18947 ;;
18948 esac
18949
18950 if test "$solaris_use_stlport4" != yes; then
18951 postdeps_CXX='-library=Cstd -library=Crun'
18952 fi
18953 ;;
18954 esac
18955 ;;
18956
18957solaris*)
18958 case $cc_basename in
18959 CC*)
18960 # The more standards-conforming stlport4 library is
18961 # incompatible with the Cstd library. Avoid specifying
18962 # it if it's in CXXFLAGS. Ignore libCrun as
18963 # -library=stlport4 depends on it.
18964 case " $CXX $CXXFLAGS " in
18965 *" -library=stlport4 "*)
18966 solaris_use_stlport4=yes
18967 ;;
18968 esac
18969
18970 # Adding this requires a known-good setup of shared libraries for
18971 # Sun compiler versions before 5.6, else PIC objects from an old
18972 # archive will be linked into the output, leading to subtle bugs.
18973 if test "$solaris_use_stlport4" != yes; then
18974 postdeps_CXX='-library=Cstd -library=Crun'
18975 fi
18976 ;;
18977 esac
18978 ;;
18979esac
18980
18981
18982case " $postdeps_CXX " in
18983*" -lc "*) archive_cmds_need_lc_CXX=no ;;
18984esac
18985 compiler_lib_search_dirs_CXX=
18986if test -n "${compiler_lib_search_path_CXX}"; then
18987 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
18988fi
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020 lt_prog_compiler_wl_CXX=
19021lt_prog_compiler_pic_CXX=
19022lt_prog_compiler_static_CXX=
19023
5213506e
RW
19024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
19025$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
00020c16
ILT
19026
19027 # C++ specific cases for pic, static, wl, etc.
19028 if test "$GXX" = yes; then
19029 lt_prog_compiler_wl_CXX='-Wl,'
19030 lt_prog_compiler_static_CXX='-static'
19031
19032 case $host_os in
19033 aix*)
19034 # All AIX code is PIC.
19035 if test "$host_cpu" = ia64; then
19036 # AIX 5 now supports IA64 processor
19037 lt_prog_compiler_static_CXX='-Bstatic'
19038 fi
19039 ;;
19040
19041 amigaos*)
19042 case $host_cpu in
19043 powerpc)
19044 # see comment about AmigaOS4 .so support
19045 lt_prog_compiler_pic_CXX='-fPIC'
19046 ;;
19047 m68k)
19048 # FIXME: we need at least 68020 code to build shared libraries, but
19049 # adding the `-m68020' flag to GCC prevents building anything better,
19050 # like `-m68040'.
19051 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
19052 ;;
19053 esac
19054 ;;
19055
19056 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19057 # PIC is the default for these OSes.
19058 ;;
19059 mingw* | cygwin* | os2* | pw32* | cegcc*)
19060 # This hack is so that the source file can tell whether it is being
19061 # built for inclusion in a dll (and should export symbols for example).
19062 # Although the cygwin gcc ignores -fPIC, still need this for old-style
19063 # (--disable-auto-import) libraries
19064 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
19065 ;;
19066 darwin* | rhapsody*)
19067 # PIC is the default on this platform
19068 # Common symbols not allowed in MH_DYLIB files
19069 lt_prog_compiler_pic_CXX='-fno-common'
19070 ;;
19071 *djgpp*)
19072 # DJGPP does not support shared libraries at all
19073 lt_prog_compiler_pic_CXX=
19074 ;;
43e02a8a
RW
19075 haiku*)
19076 # PIC is the default for Haiku.
19077 # The "-static" flag exists, but is broken.
19078 lt_prog_compiler_static_CXX=
19079 ;;
00020c16
ILT
19080 interix[3-9]*)
19081 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19082 # Instead, we relocate shared libraries at runtime.
19083 ;;
19084 sysv4*MP*)
19085 if test -d /usr/nec; then
19086 lt_prog_compiler_pic_CXX=-Kconform_pic
19087 fi
19088 ;;
19089 hpux*)
19090 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19091 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
19092 # sets the default TLS model and affects inlining.
19093 case $host_cpu in
19094 hppa*64*)
19095 ;;
19096 *)
19097 lt_prog_compiler_pic_CXX='-fPIC'
19098 ;;
19099 esac
19100 ;;
19101 *qnx* | *nto*)
19102 # QNX uses GNU C++, but need to define -shared option too, otherwise
19103 # it will coredump.
19104 lt_prog_compiler_pic_CXX='-fPIC -shared'
19105 ;;
19106 *)
19107 lt_prog_compiler_pic_CXX='-fPIC'
19108 ;;
19109 esac
19110 else
19111 case $host_os in
19112 aix[4-9]*)
19113 # All AIX code is PIC.
19114 if test "$host_cpu" = ia64; then
19115 # AIX 5 now supports IA64 processor
19116 lt_prog_compiler_static_CXX='-Bstatic'
19117 else
19118 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
19119 fi
19120 ;;
19121 chorus*)
19122 case $cc_basename in
19123 cxch68*)
19124 # Green Hills C++ Compiler
19125 # _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"
19126 ;;
19127 esac
19128 ;;
19129 dgux*)
19130 case $cc_basename in
19131 ec++*)
19132 lt_prog_compiler_pic_CXX='-KPIC'
19133 ;;
19134 ghcx*)
19135 # Green Hills C++ Compiler
19136 lt_prog_compiler_pic_CXX='-pic'
19137 ;;
19138 *)
19139 ;;
19140 esac
19141 ;;
19142 freebsd* | dragonfly*)
19143 # FreeBSD uses GNU C++
19144 ;;
19145 hpux9* | hpux10* | hpux11*)
19146 case $cc_basename in
19147 CC*)
19148 lt_prog_compiler_wl_CXX='-Wl,'
19149 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19150 if test "$host_cpu" != ia64; then
19151 lt_prog_compiler_pic_CXX='+Z'
19152 fi
19153 ;;
19154 aCC*)
19155 lt_prog_compiler_wl_CXX='-Wl,'
19156 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
19157 case $host_cpu in
19158 hppa*64*|ia64*)
19159 # +Z the default
19160 ;;
19161 *)
19162 lt_prog_compiler_pic_CXX='+Z'
19163 ;;
19164 esac
19165 ;;
19166 *)
19167 ;;
19168 esac
19169 ;;
19170 interix*)
19171 # This is c89, which is MS Visual C++ (no shared libs)
19172 # Anyone wants to do a port?
19173 ;;
19174 irix5* | irix6* | nonstopux*)
19175 case $cc_basename in
19176 CC*)
19177 lt_prog_compiler_wl_CXX='-Wl,'
19178 lt_prog_compiler_static_CXX='-non_shared'
19179 # CC pic flag -KPIC is the default.
19180 ;;
19181 *)
19182 ;;
19183 esac
19184 ;;
19185 linux* | k*bsd*-gnu | kopensolaris*-gnu)
19186 case $cc_basename in
19187 KCC*)
19188 # KAI C++ Compiler
19189 lt_prog_compiler_wl_CXX='--backend -Wl,'
19190 lt_prog_compiler_pic_CXX='-fPIC'
19191 ;;
19192 ecpc* )
19193 # old Intel C++ for x86_64 which still supported -KPIC.
19194 lt_prog_compiler_wl_CXX='-Wl,'
19195 lt_prog_compiler_pic_CXX='-KPIC'
19196 lt_prog_compiler_static_CXX='-static'
19197 ;;
19198 icpc* )
19199 # Intel C++, used to be incompatible with GCC.
19200 # ICC 10 doesn't accept -KPIC any more.
19201 lt_prog_compiler_wl_CXX='-Wl,'
19202 lt_prog_compiler_pic_CXX='-fPIC'
19203 lt_prog_compiler_static_CXX='-static'
19204 ;;
19205 pgCC* | pgcpp*)
19206 # Portland Group C++ compiler
19207 lt_prog_compiler_wl_CXX='-Wl,'
19208 lt_prog_compiler_pic_CXX='-fpic'
19209 lt_prog_compiler_static_CXX='-Bstatic'
19210 ;;
19211 cxx*)
19212 # Compaq C++
19213 # Make sure the PIC flag is empty. It appears that all Alpha
19214 # Linux and Compaq Tru64 Unix objects are PIC.
19215 lt_prog_compiler_pic_CXX=
19216 lt_prog_compiler_static_CXX='-non_shared'
19217 ;;
43e02a8a
RW
19218 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
19219 # IBM XL 8.0, 9.0 on PPC and BlueGene
00020c16
ILT
19220 lt_prog_compiler_wl_CXX='-Wl,'
19221 lt_prog_compiler_pic_CXX='-qpic'
19222 lt_prog_compiler_static_CXX='-qstaticlink'
19223 ;;
19224 *)
19225 case `$CC -V 2>&1 | sed 5q` in
19226 *Sun\ C*)
19227 # Sun C++ 5.9
19228 lt_prog_compiler_pic_CXX='-KPIC'
19229 lt_prog_compiler_static_CXX='-Bstatic'
19230 lt_prog_compiler_wl_CXX='-Qoption ld '
19231 ;;
19232 esac
19233 ;;
19234 esac
19235 ;;
19236 lynxos*)
19237 ;;
19238 m88k*)
19239 ;;
19240 mvs*)
19241 case $cc_basename in
19242 cxx*)
19243 lt_prog_compiler_pic_CXX='-W c,exportall'
19244 ;;
19245 *)
19246 ;;
19247 esac
19248 ;;
19249 netbsd*)
19250 ;;
19251 *qnx* | *nto*)
19252 # QNX uses GNU C++, but need to define -shared option too, otherwise
19253 # it will coredump.
19254 lt_prog_compiler_pic_CXX='-fPIC -shared'
19255 ;;
19256 osf3* | osf4* | osf5*)
19257 case $cc_basename in
19258 KCC*)
19259 lt_prog_compiler_wl_CXX='--backend -Wl,'
19260 ;;
19261 RCC*)
19262 # Rational C++ 2.4.1
19263 lt_prog_compiler_pic_CXX='-pic'
19264 ;;
19265 cxx*)
19266 # Digital/Compaq C++
19267 lt_prog_compiler_wl_CXX='-Wl,'
19268 # Make sure the PIC flag is empty. It appears that all Alpha
19269 # Linux and Compaq Tru64 Unix objects are PIC.
19270 lt_prog_compiler_pic_CXX=
19271 lt_prog_compiler_static_CXX='-non_shared'
19272 ;;
19273 *)
19274 ;;
19275 esac
19276 ;;
19277 psos*)
19278 ;;
19279 solaris*)
19280 case $cc_basename in
19281 CC*)
19282 # Sun C++ 4.2, 5.x and Centerline C++
19283 lt_prog_compiler_pic_CXX='-KPIC'
19284 lt_prog_compiler_static_CXX='-Bstatic'
19285 lt_prog_compiler_wl_CXX='-Qoption ld '
19286 ;;
19287 gcx*)
19288 # Green Hills C++ Compiler
19289 lt_prog_compiler_pic_CXX='-PIC'
19290 ;;
19291 *)
19292 ;;
19293 esac
19294 ;;
19295 sunos4*)
19296 case $cc_basename in
19297 CC*)
19298 # Sun C++ 4.x
19299 lt_prog_compiler_pic_CXX='-pic'
19300 lt_prog_compiler_static_CXX='-Bstatic'
19301 ;;
19302 lcc*)
19303 # Lucid
19304 lt_prog_compiler_pic_CXX='-pic'
19305 ;;
19306 *)
19307 ;;
19308 esac
19309 ;;
19310 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
19311 case $cc_basename in
19312 CC*)
19313 lt_prog_compiler_wl_CXX='-Wl,'
19314 lt_prog_compiler_pic_CXX='-KPIC'
19315 lt_prog_compiler_static_CXX='-Bstatic'
19316 ;;
19317 esac
19318 ;;
19319 tandem*)
19320 case $cc_basename in
19321 NCC*)
19322 # NonStop-UX NCC 3.20
19323 lt_prog_compiler_pic_CXX='-KPIC'
19324 ;;
19325 *)
19326 ;;
19327 esac
19328 ;;
19329 vxworks*)
19330 ;;
19331 *)
19332 lt_prog_compiler_can_build_shared_CXX=no
19333 ;;
19334 esac
19335 fi
19336
19337case $host_os in
19338 # For platforms which do not support PIC, -DPIC is meaningless:
19339 *djgpp*)
19340 lt_prog_compiler_pic_CXX=
19341 ;;
19342 *)
19343 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
19344 ;;
19345esac
5213506e
RW
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
19347$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
00020c16
ILT
19348
19349
19350
19351#
19352# Check to make sure the PIC flag actually works.
19353#
19354if test -n "$lt_prog_compiler_pic_CXX"; then
5213506e
RW
19355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
19356$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
19357if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
19358 $as_echo_n "(cached) " >&6
00020c16
ILT
19359else
19360 lt_cv_prog_compiler_pic_works_CXX=no
19361 ac_outfile=conftest.$ac_objext
19362 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19363 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
19364 # Insert the option either (1) after the last *FLAGS variable, or
19365 # (2) before a word containing "conftest.", or (3) at the end.
19366 # Note that $ac_compile itself does not contain backslashes and begins
19367 # with a dollar sign (not a hyphen), so the echo should work correctly.
19368 # The option is referenced via a variable to avoid confusing sed.
19369 lt_compile=`echo "$ac_compile" | $SED \
19370 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19371 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19372 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19373 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19374 (eval "$lt_compile" 2>conftest.err)
19375 ac_status=$?
19376 cat conftest.err >&5
43e02a8a 19377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19378 if (exit $ac_status) && test -s "$ac_outfile"; then
19379 # The compiler can only warn and ignore the option if not recognized
19380 # So say no if there are warnings other than the usual output.
43e02a8a 19381 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
00020c16
ILT
19382 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19383 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19384 lt_cv_prog_compiler_pic_works_CXX=yes
19385 fi
19386 fi
19387 $RM conftest*
19388
19389fi
5213506e
RW
19390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
19391$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
00020c16
ILT
19392
19393if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
19394 case $lt_prog_compiler_pic_CXX in
19395 "" | " "*) ;;
19396 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
19397 esac
19398else
19399 lt_prog_compiler_pic_CXX=
19400 lt_prog_compiler_can_build_shared_CXX=no
19401fi
19402
19403fi
19404
19405
19406
19407#
19408# Check to make sure the static flag actually works.
19409#
19410wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
5213506e
RW
19411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19412$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19413if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
19414 $as_echo_n "(cached) " >&6
00020c16
ILT
19415else
19416 lt_cv_prog_compiler_static_works_CXX=no
19417 save_LDFLAGS="$LDFLAGS"
19418 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19419 echo "$lt_simple_link_test_code" > conftest.$ac_ext
19420 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19421 # The linker can only warn and ignore the option if not recognized
19422 # So say no if there are warnings
19423 if test -s conftest.err; then
19424 # Append any errors to the config.log.
19425 cat conftest.err 1>&5
43e02a8a 19426 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
00020c16
ILT
19427 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19428 if diff conftest.exp conftest.er2 >/dev/null; then
19429 lt_cv_prog_compiler_static_works_CXX=yes
19430 fi
19431 else
19432 lt_cv_prog_compiler_static_works_CXX=yes
19433 fi
19434 fi
19435 $RM -r conftest*
19436 LDFLAGS="$save_LDFLAGS"
19437
19438fi
5213506e
RW
19439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
19440$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
00020c16
ILT
19441
19442if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
19443 :
19444else
19445 lt_prog_compiler_static_CXX=
19446fi
19447
19448
19449
19450
5213506e
RW
19451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19452$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19453if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19454 $as_echo_n "(cached) " >&6
00020c16
ILT
19455else
19456 lt_cv_prog_compiler_c_o_CXX=no
19457 $RM -r conftest 2>/dev/null
19458 mkdir conftest
19459 cd conftest
19460 mkdir out
19461 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19462
19463 lt_compiler_flag="-o out/conftest2.$ac_objext"
19464 # Insert the option either (1) after the last *FLAGS variable, or
19465 # (2) before a word containing "conftest.", or (3) at the end.
19466 # Note that $ac_compile itself does not contain backslashes and begins
19467 # with a dollar sign (not a hyphen), so the echo should work correctly.
19468 lt_compile=`echo "$ac_compile" | $SED \
19469 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19470 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19471 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19472 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19473 (eval "$lt_compile" 2>out/conftest.err)
19474 ac_status=$?
19475 cat out/conftest.err >&5
43e02a8a 19476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19477 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19478 then
19479 # The compiler can only warn and ignore the option if not recognized
19480 # So say no if there are warnings
43e02a8a 19481 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
19482 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19483 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19484 lt_cv_prog_compiler_c_o_CXX=yes
19485 fi
19486 fi
19487 chmod u+w . 2>&5
19488 $RM conftest*
19489 # SGI C++ compiler will create directory out/ii_files/ for
19490 # template instantiation
19491 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19492 $RM out/* && rmdir out
19493 cd ..
19494 $RM -r conftest
19495 $RM conftest*
19496
19497fi
5213506e
RW
19498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19499$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19500
19501
19502
5213506e
RW
19503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19504$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19505if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
19506 $as_echo_n "(cached) " >&6
00020c16
ILT
19507else
19508 lt_cv_prog_compiler_c_o_CXX=no
19509 $RM -r conftest 2>/dev/null
19510 mkdir conftest
19511 cd conftest
19512 mkdir out
19513 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19514
19515 lt_compiler_flag="-o out/conftest2.$ac_objext"
19516 # Insert the option either (1) after the last *FLAGS variable, or
19517 # (2) before a word containing "conftest.", or (3) at the end.
19518 # Note that $ac_compile itself does not contain backslashes and begins
19519 # with a dollar sign (not a hyphen), so the echo should work correctly.
19520 lt_compile=`echo "$ac_compile" | $SED \
19521 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19522 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19523 -e 's:$: $lt_compiler_flag:'`
43e02a8a 19524 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
00020c16
ILT
19525 (eval "$lt_compile" 2>out/conftest.err)
19526 ac_status=$?
19527 cat out/conftest.err >&5
43e02a8a 19528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
19529 if (exit $ac_status) && test -s out/conftest2.$ac_objext
19530 then
19531 # The compiler can only warn and ignore the option if not recognized
19532 # So say no if there are warnings
43e02a8a 19533 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
00020c16
ILT
19534 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19535 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19536 lt_cv_prog_compiler_c_o_CXX=yes
19537 fi
19538 fi
19539 chmod u+w . 2>&5
19540 $RM conftest*
19541 # SGI C++ compiler will create directory out/ii_files/ for
19542 # template instantiation
19543 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19544 $RM out/* && rmdir out
19545 cd ..
19546 $RM -r conftest
19547 $RM conftest*
19548
19549fi
5213506e
RW
19550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19551$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
00020c16
ILT
19552
19553
19554
19555
19556hard_links="nottested"
19557if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
19558 # do not overwrite the value of need_locks provided by the user
5213506e
RW
19559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19560$as_echo_n "checking if we can lock with hard links... " >&6; }
00020c16
ILT
19561 hard_links=yes
19562 $RM conftest*
19563 ln conftest.a conftest.b 2>/dev/null && hard_links=no
19564 touch conftest.a
19565 ln conftest.a conftest.b 2>&5 || hard_links=no
19566 ln conftest.a conftest.b 2>/dev/null && hard_links=no
5213506e
RW
19567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19568$as_echo "$hard_links" >&6; }
00020c16 19569 if test "$hard_links" = no; then
5213506e
RW
19570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
19571$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
00020c16
ILT
19572 need_locks=warn
19573 fi
19574else
19575 need_locks=no
19576fi
19577
19578
19579
5213506e
RW
19580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19581$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
00020c16
ILT
19582
19583 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19584 case $host_os in
19585 aix[4-9]*)
19586 # If we're using GNU nm, then we don't want the "-C" option.
19587 # -C means demangle to AIX nm, but means don't demangle with GNU nm
43e02a8a
RW
19588 # Also, AIX nm treats weak defined symbols like other global defined
19589 # symbols, whereas GNU nm marks them as "W".
00020c16 19590 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
43e02a8a 19591 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
19592 else
19593 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'
19594 fi
19595 ;;
19596 pw32*)
19597 export_symbols_cmds_CXX="$ltdll_cmds"
19598 ;;
19599 cygwin* | mingw* | cegcc*)
19600 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'
19601 ;;
19602 *)
19603 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19604 ;;
19605 esac
19606 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19607
5213506e
RW
19608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
19609$as_echo "$ld_shlibs_CXX" >&6; }
00020c16
ILT
19610test "$ld_shlibs_CXX" = no && can_build_shared=no
19611
19612with_gnu_ld_CXX=$with_gnu_ld
19613
19614
19615
19616
19617
19618
19619#
19620# Do we need to explicitly link libc?
19621#
19622case "x$archive_cmds_need_lc_CXX" in
19623x|xyes)
19624 # Assume -lc should be added
19625 archive_cmds_need_lc_CXX=yes
19626
19627 if test "$enable_shared" = yes && test "$GCC" = yes; then
19628 case $archive_cmds_CXX in
19629 *'~'*)
19630 # FIXME: we may have to deal with multi-command sequences.
19631 ;;
19632 '$CC '*)
19633 # Test whether the compiler implicitly links with -lc since on some
19634 # systems, -lgcc has to come before -lc. If gcc already passes -lc
19635 # to ld, don't add -lc before -lgcc.
5213506e
RW
19636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
19637$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
19638if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then :
19639 $as_echo_n "(cached) " >&6
00020c16
ILT
19640else
19641 $RM conftest*
19642 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19643
5213506e 19644 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
00020c16
ILT
19645 (eval $ac_compile) 2>&5
19646 ac_status=$?
5213506e
RW
19647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19648 test $ac_status = 0; } 2>conftest.err; then
00020c16
ILT
19649 soname=conftest
19650 lib=conftest
19651 libobjs=conftest.$ac_objext
19652 deplibs=
19653 wl=$lt_prog_compiler_wl_CXX
19654 pic_flag=$lt_prog_compiler_pic_CXX
19655 compiler_flags=-v
19656 linker_flags=-v
19657 verstring=
19658 output_objdir=.
19659 libname=conftest
19660 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
19661 allow_undefined_flag_CXX=
5213506e 19662 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
00020c16
ILT
19663 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
19664 ac_status=$?
5213506e
RW
19665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19666 test $ac_status = 0; }
00020c16
ILT
19667 then
19668 lt_cv_archive_cmds_need_lc_CXX=no
19669 else
19670 lt_cv_archive_cmds_need_lc_CXX=yes
19671 fi
19672 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
19673 else
19674 cat conftest.err 1>&5
19675 fi
19676 $RM conftest*
19677
19678fi
5213506e
RW
19679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
19680$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
00020c16
ILT
19681 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
19682 ;;
19683 esac
19684 fi
19685 ;;
19686esac
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
5213506e
RW
19751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
19752$as_echo_n "checking dynamic linker characteristics... " >&6; }
00020c16
ILT
19753
19754library_names_spec=
19755libname_spec='lib$name'
19756soname_spec=
19757shrext_cmds=".so"
19758postinstall_cmds=
19759postuninstall_cmds=
19760finish_cmds=
19761finish_eval=
19762shlibpath_var=
19763shlibpath_overrides_runpath=unknown
19764version_type=none
19765dynamic_linker="$host_os ld.so"
19766sys_lib_dlsearch_path_spec="/lib /usr/lib"
19767need_lib_prefix=unknown
19768hardcode_into_libs=no
19769
19770# when you set need_version to no, make sure it does not cause -set_version
19771# flags to be left without arguments
19772need_version=unknown
19773
19774case $host_os in
19775aix3*)
19776 version_type=linux
19777 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
19778 shlibpath_var=LIBPATH
19779
19780 # AIX 3 has no versioning support, so we append a major version to the name.
19781 soname_spec='${libname}${release}${shared_ext}$major'
19782 ;;
19783
19784aix[4-9]*)
19785 version_type=linux
19786 need_lib_prefix=no
19787 need_version=no
19788 hardcode_into_libs=yes
19789 if test "$host_cpu" = ia64; then
19790 # AIX 5 supports IA64
19791 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
19792 shlibpath_var=LD_LIBRARY_PATH
19793 else
19794 # With GCC up to 2.95.x, collect2 would create an import file
19795 # for dependence libraries. The import file would start with
19796 # the line `#! .'. This would cause the generated library to
19797 # depend on `.', always an invalid library. This was fixed in
19798 # development snapshots of GCC prior to 3.0.
19799 case $host_os in
19800 aix4 | aix4.[01] | aix4.[01].*)
19801 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19802 echo ' yes '
19803 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
19804 :
19805 else
19806 can_build_shared=no
19807 fi
19808 ;;
19809 esac
19810 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
19811 # soname into executable. Probably we can add versioning support to
19812 # collect2, so additional links can be useful in future.
19813 if test "$aix_use_runtimelinking" = yes; then
19814 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19815 # instead of lib<name>.a to let people know that these are not
19816 # typical AIX shared libraries.
19817 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19818 else
19819 # We preserve .a as extension for shared libraries through AIX4.2
19820 # and later when we are not doing run time linking.
19821 library_names_spec='${libname}${release}.a $libname.a'
19822 soname_spec='${libname}${release}${shared_ext}$major'
19823 fi
19824 shlibpath_var=LIBPATH
19825 fi
19826 ;;
19827
19828amigaos*)
19829 case $host_cpu in
19830 powerpc)
19831 # Since July 2007 AmigaOS4 officially supports .so libraries.
19832 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
19833 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19834 ;;
19835 m68k)
19836 library_names_spec='$libname.ixlibrary $libname.a'
19837 # Create ${libname}_ixlibrary.a entries in /sys/libs.
43e02a8a 19838 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
19839 ;;
19840 esac
19841 ;;
19842
19843beos*)
19844 library_names_spec='${libname}${shared_ext}'
19845 dynamic_linker="$host_os ld.so"
19846 shlibpath_var=LIBRARY_PATH
19847 ;;
19848
19849bsdi[45]*)
19850 version_type=linux
19851 need_version=no
19852 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19853 soname_spec='${libname}${release}${shared_ext}$major'
19854 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19855 shlibpath_var=LD_LIBRARY_PATH
19856 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19857 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19858 # the default ld.so.conf also contains /usr/contrib/lib and
19859 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19860 # libtool to hard-code these into programs
19861 ;;
19862
19863cygwin* | mingw* | pw32* | cegcc*)
19864 version_type=windows
19865 shrext_cmds=".dll"
19866 need_version=no
19867 need_lib_prefix=no
19868
19869 case $GCC,$host_os in
19870 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
19871 library_names_spec='$libname.dll.a'
19872 # DLL is installed to $(libdir)/../bin by postinstall_cmds
19873 postinstall_cmds='base_file=`basename \${file}`~
19874 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
19875 dldir=$destdir/`dirname \$dlpath`~
19876 test -d \$dldir || mkdir -p \$dldir~
19877 $install_prog $dir/$dlname \$dldir/$dlname~
19878 chmod a+x \$dldir/$dlname~
19879 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
19880 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
19881 fi'
19882 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19883 dlpath=$dir/\$dldll~
19884 $RM \$dlpath'
19885 shlibpath_overrides_runpath=yes
19886
19887 case $host_os in
19888 cygwin*)
19889 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
19890 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
43e02a8a 19891
00020c16
ILT
19892 ;;
19893 mingw* | cegcc*)
19894 # MinGW DLLs use traditional 'lib' prefix
19895 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
00020c16
ILT
19896 ;;
19897 pw32*)
19898 # pw32 DLLs use 'pw' prefix rather than 'lib'
19899 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
19900 ;;
19901 esac
19902 ;;
19903
19904 *)
19905 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
19906 ;;
19907 esac
19908 dynamic_linker='Win32 ld.exe'
19909 # FIXME: first we should search . and the directory the executable is in
19910 shlibpath_var=PATH
19911 ;;
19912
19913darwin* | rhapsody*)
19914 dynamic_linker="$host_os dyld"
19915 version_type=darwin
19916 need_lib_prefix=no
19917 need_version=no
19918 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
19919 soname_spec='${libname}${release}${major}$shared_ext'
19920 shlibpath_overrides_runpath=yes
19921 shlibpath_var=DYLD_LIBRARY_PATH
19922 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
19923
19924 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
19925 ;;
19926
19927dgux*)
19928 version_type=linux
19929 need_lib_prefix=no
19930 need_version=no
19931 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
19932 soname_spec='${libname}${release}${shared_ext}$major'
19933 shlibpath_var=LD_LIBRARY_PATH
19934 ;;
19935
19936freebsd1*)
19937 dynamic_linker=no
19938 ;;
19939
19940freebsd* | dragonfly*)
19941 # DragonFly does not have aout. When/if they implement a new
19942 # versioning mechanism, adjust this.
19943 if test -x /usr/bin/objformat; then
19944 objformat=`/usr/bin/objformat`
19945 else
19946 case $host_os in
19947 freebsd[123]*) objformat=aout ;;
19948 *) objformat=elf ;;
19949 esac
19950 fi
19951 version_type=freebsd-$objformat
19952 case $version_type in
19953 freebsd-elf*)
19954 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
19955 need_version=no
19956 need_lib_prefix=no
19957 ;;
19958 freebsd-*)
19959 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
19960 need_version=yes
19961 ;;
19962 esac
19963 shlibpath_var=LD_LIBRARY_PATH
19964 case $host_os in
19965 freebsd2*)
19966 shlibpath_overrides_runpath=yes
19967 ;;
19968 freebsd3.[01]* | freebsdelf3.[01]*)
19969 shlibpath_overrides_runpath=yes
19970 hardcode_into_libs=yes
19971 ;;
19972 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
19973 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
19974 shlibpath_overrides_runpath=no
19975 hardcode_into_libs=yes
19976 ;;
19977 *) # from 4.6 on, and DragonFly
19978 shlibpath_overrides_runpath=yes
19979 hardcode_into_libs=yes
19980 ;;
19981 esac
19982 ;;
19983
19984gnu*)
19985 version_type=linux
19986 need_lib_prefix=no
19987 need_version=no
19988 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
19989 soname_spec='${libname}${release}${shared_ext}$major'
19990 shlibpath_var=LD_LIBRARY_PATH
19991 hardcode_into_libs=yes
19992 ;;
19993
43e02a8a
RW
19994haiku*)
19995 version_type=linux
19996 need_lib_prefix=no
19997 need_version=no
19998 dynamic_linker="$host_os runtime_loader"
19999 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
20000 soname_spec='${libname}${release}${shared_ext}$major'
20001 shlibpath_var=LIBRARY_PATH
20002 shlibpath_overrides_runpath=yes
20003 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
20004 hardcode_into_libs=yes
20005 ;;
20006
00020c16
ILT
20007hpux9* | hpux10* | hpux11*)
20008 # Give a soname corresponding to the major version so that dld.sl refuses to
20009 # link against other versions.
20010 version_type=sunos
20011 need_lib_prefix=no
20012 need_version=no
20013 case $host_cpu in
20014 ia64*)
20015 shrext_cmds='.so'
20016 hardcode_into_libs=yes
20017 dynamic_linker="$host_os dld.so"
20018 shlibpath_var=LD_LIBRARY_PATH
20019 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20020 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20021 soname_spec='${libname}${release}${shared_ext}$major'
20022 if test "X$HPUX_IA64_MODE" = X32; then
20023 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
20024 else
20025 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
20026 fi
20027 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20028 ;;
20029 hppa*64*)
20030 shrext_cmds='.sl'
20031 hardcode_into_libs=yes
20032 dynamic_linker="$host_os dld.sl"
20033 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
20034 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20035 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20036 soname_spec='${libname}${release}${shared_ext}$major'
20037 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
20038 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20039 ;;
20040 *)
20041 shrext_cmds='.sl'
20042 dynamic_linker="$host_os dld.sl"
20043 shlibpath_var=SHLIB_PATH
20044 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
20045 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20046 soname_spec='${libname}${release}${shared_ext}$major'
20047 ;;
20048 esac
43e02a8a 20049 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
00020c16 20050 postinstall_cmds='chmod 555 $lib'
43e02a8a
RW
20051 # or fails outright, so override atomically:
20052 install_override_mode=555
00020c16
ILT
20053 ;;
20054
20055interix[3-9]*)
20056 version_type=linux
20057 need_lib_prefix=no
20058 need_version=no
20059 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20060 soname_spec='${libname}${release}${shared_ext}$major'
20061 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
20062 shlibpath_var=LD_LIBRARY_PATH
20063 shlibpath_overrides_runpath=no
20064 hardcode_into_libs=yes
20065 ;;
20066
20067irix5* | irix6* | nonstopux*)
20068 case $host_os in
20069 nonstopux*) version_type=nonstopux ;;
20070 *)
20071 if test "$lt_cv_prog_gnu_ld" = yes; then
20072 version_type=linux
20073 else
20074 version_type=irix
20075 fi ;;
20076 esac
20077 need_lib_prefix=no
20078 need_version=no
20079 soname_spec='${libname}${release}${shared_ext}$major'
20080 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
20081 case $host_os in
20082 irix5* | nonstopux*)
20083 libsuff= shlibsuff=
20084 ;;
20085 *)
20086 case $LD in # libtool.m4 will add one of these switches to LD
20087 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
20088 libsuff= shlibsuff= libmagic=32-bit;;
20089 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
20090 libsuff=32 shlibsuff=N32 libmagic=N32;;
20091 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
20092 libsuff=64 shlibsuff=64 libmagic=64-bit;;
20093 *) libsuff= shlibsuff= libmagic=never-match;;
20094 esac
20095 ;;
20096 esac
20097 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
20098 shlibpath_overrides_runpath=no
20099 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
20100 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
20101 hardcode_into_libs=yes
20102 ;;
20103
20104# No shared lib support for Linux oldld, aout, or coff.
20105linux*oldld* | linux*aout* | linux*coff*)
20106 dynamic_linker=no
20107 ;;
20108
20109# This must be Linux ELF.
20110linux* | k*bsd*-gnu | kopensolaris*-gnu)
20111 version_type=linux
20112 need_lib_prefix=no
20113 need_version=no
20114 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20115 soname_spec='${libname}${release}${shared_ext}$major'
20116 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
20117 shlibpath_var=LD_LIBRARY_PATH
20118 shlibpath_overrides_runpath=no
20119
20120 # Some binutils ld are patched to set DT_RUNPATH
5213506e
RW
20121 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
20122 $as_echo_n "(cached) " >&6
00020c16
ILT
20123else
20124 lt_cv_shlibpath_overrides_runpath=no
20125 save_LDFLAGS=$LDFLAGS
20126 save_libdir=$libdir
20127 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
20128 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
5213506e 20129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
00020c16
ILT
20130/* end confdefs.h. */
20131
20132int
20133main ()
20134{
20135
da0f6381
PB
20136 ;
20137 return 0;
20138}
20139_ACEOF
5213506e
RW
20140if ac_fn_cxx_try_link "$LINENO"; then :
20141 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
00020c16
ILT
20142 lt_cv_shlibpath_overrides_runpath=yes
20143fi
da0f6381 20144fi
5213506e
RW
20145rm -f core conftest.err conftest.$ac_objext \
20146 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
20147 LDFLAGS=$save_LDFLAGS
20148 libdir=$save_libdir
da0f6381
PB
20149
20150fi
20151
00020c16 20152 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381 20153
00020c16
ILT
20154 # This implies no fast_install, which is unacceptable.
20155 # Some rework will be needed to allow for fast_install
20156 # before this can be enabled.
20157 hardcode_into_libs=yes
da0f6381 20158
00020c16
ILT
20159 # Append ld.so.conf contents to the search path
20160 if test -f /etc/ld.so.conf; then
43e02a8a 20161 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
20162 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
20163 fi
da0f6381 20164
00020c16
ILT
20165 # We used to test for /lib/ld.so.1 and disable shared libraries on
20166 # powerpc, because MkLinux only supported shared libraries with the
20167 # GNU dynamic linker. Since this was broken with cross compilers,
20168 # most powerpc-linux boxes support dynamic linking these days and
20169 # people can always --disable-shared, the test was removed, and we
20170 # assume the GNU/Linux dynamic linker is in use.
20171 dynamic_linker='GNU/Linux ld.so'
20172 ;;
da0f6381 20173
00020c16
ILT
20174netbsd*)
20175 version_type=sunos
20176 need_lib_prefix=no
20177 need_version=no
20178 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20179 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20180 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20181 dynamic_linker='NetBSD (a.out) ld.so'
20182 else
20183 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20184 soname_spec='${libname}${release}${shared_ext}$major'
20185 dynamic_linker='NetBSD ld.elf_so'
20186 fi
20187 shlibpath_var=LD_LIBRARY_PATH
20188 shlibpath_overrides_runpath=yes
20189 hardcode_into_libs=yes
20190 ;;
da0f6381 20191
00020c16
ILT
20192newsos6)
20193 version_type=linux
20194 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20195 shlibpath_var=LD_LIBRARY_PATH
20196 shlibpath_overrides_runpath=yes
20197 ;;
da0f6381 20198
00020c16
ILT
20199*nto* | *qnx*)
20200 version_type=qnx
20201 need_lib_prefix=no
20202 need_version=no
20203 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20204 soname_spec='${libname}${release}${shared_ext}$major'
20205 shlibpath_var=LD_LIBRARY_PATH
20206 shlibpath_overrides_runpath=no
20207 hardcode_into_libs=yes
20208 dynamic_linker='ldqnx.so'
20209 ;;
da0f6381 20210
00020c16
ILT
20211openbsd*)
20212 version_type=sunos
20213 sys_lib_dlsearch_path_spec="/usr/lib"
20214 need_lib_prefix=no
20215 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
20216 case $host_os in
20217 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
20218 *) need_version=no ;;
da0f6381 20219 esac
00020c16
ILT
20220 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20221 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20222 shlibpath_var=LD_LIBRARY_PATH
20223 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
20224 case $host_os in
20225 openbsd2.[89] | openbsd2.[89].*)
20226 shlibpath_overrides_runpath=no
20227 ;;
20228 *)
20229 shlibpath_overrides_runpath=yes
20230 ;;
20231 esac
da0f6381 20232 else
00020c16 20233 shlibpath_overrides_runpath=yes
da0f6381 20234 fi
00020c16 20235 ;;
da0f6381 20236
00020c16
ILT
20237os2*)
20238 libname_spec='$name'
20239 shrext_cmds=".dll"
20240 need_lib_prefix=no
20241 library_names_spec='$libname${shared_ext} $libname.a'
20242 dynamic_linker='OS/2 ld.exe'
20243 shlibpath_var=LIBPATH
20244 ;;
da0f6381 20245
00020c16
ILT
20246osf3* | osf4* | osf5*)
20247 version_type=osf
20248 need_lib_prefix=no
20249 need_version=no
20250 soname_spec='${libname}${release}${shared_ext}$major'
20251 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20252 shlibpath_var=LD_LIBRARY_PATH
20253 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
20254 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
20255 ;;
da0f6381 20256
00020c16
ILT
20257rdos*)
20258 dynamic_linker=no
20259 ;;
da0f6381 20260
00020c16
ILT
20261solaris*)
20262 version_type=linux
20263 need_lib_prefix=no
20264 need_version=no
20265 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20266 soname_spec='${libname}${release}${shared_ext}$major'
20267 shlibpath_var=LD_LIBRARY_PATH
20268 shlibpath_overrides_runpath=yes
20269 hardcode_into_libs=yes
20270 # ldd complains unless libraries are executable
20271 postinstall_cmds='chmod +x $lib'
20272 ;;
da0f6381 20273
00020c16
ILT
20274sunos4*)
20275 version_type=sunos
20276 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20277 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
20278 shlibpath_var=LD_LIBRARY_PATH
20279 shlibpath_overrides_runpath=yes
20280 if test "$with_gnu_ld" = yes; then
20281 need_lib_prefix=no
20282 fi
20283 need_version=yes
20284 ;;
da0f6381 20285
00020c16
ILT
20286sysv4 | sysv4.3*)
20287 version_type=linux
20288 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20289 soname_spec='${libname}${release}${shared_ext}$major'
20290 shlibpath_var=LD_LIBRARY_PATH
20291 case $host_vendor in
20292 sni)
20293 shlibpath_overrides_runpath=no
20294 need_lib_prefix=no
20295 runpath_var=LD_RUN_PATH
20296 ;;
20297 siemens)
20298 need_lib_prefix=no
20299 ;;
20300 motorola)
20301 need_lib_prefix=no
20302 need_version=no
20303 shlibpath_overrides_runpath=no
20304 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
20305 ;;
20306 esac
20307 ;;
da0f6381 20308
00020c16
ILT
20309sysv4*MP*)
20310 if test -d /usr/nec ;then
20311 version_type=linux
20312 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
20313 soname_spec='$libname${shared_ext}.$major'
20314 shlibpath_var=LD_LIBRARY_PATH
20315 fi
20316 ;;
da0f6381 20317
00020c16
ILT
20318sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
20319 version_type=freebsd-elf
20320 need_lib_prefix=no
20321 need_version=no
20322 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
20323 soname_spec='${libname}${release}${shared_ext}$major'
20324 shlibpath_var=LD_LIBRARY_PATH
20325 shlibpath_overrides_runpath=yes
20326 hardcode_into_libs=yes
20327 if test "$with_gnu_ld" = yes; then
20328 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
da0f6381 20329 else
00020c16
ILT
20330 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
20331 case $host_os in
20332 sco3.2v5*)
20333 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
20334 ;;
da0f6381 20335 esac
da0f6381 20336 fi
00020c16
ILT
20337 sys_lib_dlsearch_path_spec='/usr/lib'
20338 ;;
da0f6381 20339
00020c16
ILT
20340tpf*)
20341 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
20342 version_type=linux
20343 need_lib_prefix=no
20344 need_version=no
20345 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20346 shlibpath_var=LD_LIBRARY_PATH
20347 shlibpath_overrides_runpath=no
20348 hardcode_into_libs=yes
20349 ;;
da0f6381 20350
00020c16
ILT
20351uts4*)
20352 version_type=linux
20353 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20354 soname_spec='${libname}${release}${shared_ext}$major'
20355 shlibpath_var=LD_LIBRARY_PATH
20356 ;;
da0f6381 20357
00020c16
ILT
20358*)
20359 dynamic_linker=no
20360 ;;
20361esac
5213506e
RW
20362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
20363$as_echo "$dynamic_linker" >&6; }
00020c16 20364test "$dynamic_linker" = no && can_build_shared=no
da0f6381 20365
00020c16
ILT
20366variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
20367if test "$GCC" = yes; then
20368 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
20369fi
da0f6381 20370
00020c16
ILT
20371if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
20372 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
20373fi
20374if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
20375 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
20376fi
da0f6381 20377
da0f6381 20378
da0f6381 20379
da0f6381 20380
da0f6381 20381
da0f6381
PB
20382
20383
da0f6381 20384
da0f6381 20385
da0f6381 20386
da0f6381
PB
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
da0f6381
PB
20404
20405
20406
20407
20408
20409
43e02a8a
RW
20410
20411
da0f6381
PB
20412
20413
20414
5213506e
RW
20415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
20416$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
00020c16
ILT
20417hardcode_action_CXX=
20418if test -n "$hardcode_libdir_flag_spec_CXX" ||
20419 test -n "$runpath_var_CXX" ||
20420 test "X$hardcode_automatic_CXX" = "Xyes" ; then
da0f6381 20421
00020c16
ILT
20422 # We can hardcode non-existent directories.
20423 if test "$hardcode_direct_CXX" != no &&
20424 # If the only mechanism to avoid hardcoding is shlibpath_var, we
20425 # have to relink, otherwise we might link with an installed library
20426 # when we should be linking with a yet-to-be-installed one
20427 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
20428 test "$hardcode_minus_L_CXX" != no; then
20429 # Linking always hardcodes the temporary library directory.
20430 hardcode_action_CXX=relink
20431 else
20432 # We can link without hardcoding, and we can hardcode nonexisting dirs.
20433 hardcode_action_CXX=immediate
20434 fi
20435else
20436 # We cannot hardcode anything, or else we can only hardcode existing
20437 # directories.
20438 hardcode_action_CXX=unsupported
20439fi
5213506e
RW
20440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
20441$as_echo "$hardcode_action_CXX" >&6; }
da0f6381 20442
00020c16
ILT
20443if test "$hardcode_action_CXX" = relink ||
20444 test "$inherit_rpath_CXX" = yes; then
20445 # Fast installation is not supported
20446 enable_fast_install=no
20447elif test "$shlibpath_overrides_runpath" = yes ||
20448 test "$enable_shared" = no; then
20449 # Fast installation is not necessary
20450 enable_fast_install=needless
20451fi
da0f6381 20452
da0f6381 20453
da0f6381 20454
da0f6381 20455
da0f6381 20456
da0f6381
PB
20457
20458
00020c16 20459 fi # test -n "$compiler"
da0f6381 20460
00020c16
ILT
20461 CC=$lt_save_CC
20462 LDCXX=$LD
20463 LD=$lt_save_LD
20464 GCC=$lt_save_GCC
20465 with_gnu_ld=$lt_save_with_gnu_ld
20466 lt_cv_path_LDCXX=$lt_cv_path_LD
20467 lt_cv_path_LD=$lt_save_path_LD
20468 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
20469 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
20470fi # test "$_lt_caught_CXX_error" != yes
da0f6381 20471
da0f6381
PB
20472ac_ext=c
20473ac_cpp='$CPP $CPPFLAGS'
20474ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20475ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20476ac_compiler_gnu=$ac_cv_c_compiler_gnu
20477
da0f6381
PB
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493# Only expand once:
20494
20495
20496
20497
20498
20499# Identify the assembler which will work hand-in-glove with the newly
20500# built GCC, so that we can examine its features. This is the assembler
20501# which will be driven by the driver program.
20502#
20503# If build != host, and we aren't building gas in-tree, we identify a
20504# build->target assembler and hope that it will have the same features
20505# as the host->target assembler we'll be using.
20506gcc_cv_gas_major_version=
20507gcc_cv_gas_minor_version=
20508gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
20509
5213506e
RW
20510if test "${gcc_cv_as+set}" = set; then :
20511
da0f6381
PB
20512else
20513
20514if test -x "$DEFAULT_ASSEMBLER"; then
20515 gcc_cv_as="$DEFAULT_ASSEMBLER"
20516elif test -f $gcc_cv_as_gas_srcdir/configure.in \
20517 && test -f ../gas/Makefile \
20518 && test x$build = x$host; then
20519 gcc_cv_as=../gas/as-new$build_exeext
20520elif test -x as$build_exeext; then
20521 # Build using assembler in the current directory.
20522 gcc_cv_as=./as$build_exeext
20523elif test -x $AS_FOR_TARGET; then
20524 gcc_cv_as="$AS_FOR_TARGET"
20525else
20526 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
20527set dummy $AS_FOR_TARGET; ac_word=$2
5213506e
RW
20528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20529$as_echo_n "checking for $ac_word... " >&6; }
20530if test "${ac_cv_path_gcc_cv_as+set}" = set; then :
20531 $as_echo_n "(cached) " >&6
da0f6381
PB
20532else
20533 case $gcc_cv_as in
20534 [\\/]* | ?:[\\/]*)
20535 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
20536 ;;
20537 *)
20538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20539for as_dir in $PATH
20540do
20541 IFS=$as_save_IFS
20542 test -z "$as_dir" && as_dir=.
5213506e
RW
20543 for ac_exec_ext in '' $ac_executable_extensions; do
20544 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
da0f6381 20545 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
5213506e 20546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
da0f6381
PB
20547 break 2
20548 fi
20549done
5213506e
RW
20550 done
20551IFS=$as_save_IFS
da0f6381
PB
20552
20553 ;;
20554esac
20555fi
20556gcc_cv_as=$ac_cv_path_gcc_cv_as
da0f6381 20557if test -n "$gcc_cv_as"; then
5213506e
RW
20558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20559$as_echo "$gcc_cv_as" >&6; }
da0f6381 20560else
5213506e
RW
20561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20562$as_echo "no" >&6; }
da0f6381
PB
20563fi
20564
5213506e 20565
da0f6381
PB
20566fi
20567fi
20568
da0f6381
PB
20569ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20570
20571case "$ORIGINAL_AS_FOR_TARGET" in
20572 ./as | ./as$build_exeext) ;;
5213506e 20573 *) ac_config_files="$ac_config_files as:exec-tool.in"
da0f6381
PB
20574 ;;
20575esac
20576
5213506e
RW
20577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5
20578$as_echo_n "checking what assembler to use... " >&6; }
da0f6381
PB
20579if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20580 # Single tree build which includes gas. We want to prefer it
20581 # over whatever linker top-level may have detected, since
20582 # we'll use what we're building after installation anyway.
5213506e
RW
20583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5
20584$as_echo "newly built gas" >&6; }
da0f6381
PB
20585 in_tree_gas=yes
20586 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20587for f in $gcc_cv_as_bfd_srcdir/configure \
20588 $gcc_cv_as_gas_srcdir/configure \
20589 $gcc_cv_as_gas_srcdir/configure.in \
20590 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20591 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20592 if test x$gcc_cv_gas_version != x; then
20593 break
20594 fi
20595done
20596gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20597gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20598gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20599case $gcc_cv_gas_patch_version in
20600 "") gcc_cv_gas_patch_version="0" ;;
20601esac
20602gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20603 + $gcc_cv_gas_minor_version \) \* 1000 \
20604 + $gcc_cv_gas_patch_version`
20605
20606 in_tree_gas_is_elf=no
20607 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20608 || (grep 'obj_format = multi' ../gas/Makefile \
20609 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20610 then
20611 in_tree_gas_is_elf=yes
20612 fi
20613else
5213506e
RW
20614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
20615$as_echo "$gcc_cv_as" >&6; }
da0f6381
PB
20616 in_tree_gas=no
20617fi
20618
20619# Identify the linker which will work hand-in-glove with the newly
20620# built GCC, so that we can examine its features. This is the linker
20621# which will be driven by the driver program.
20622#
20623# If build != host, and we aren't building gas in-tree, we identify a
20624# build->target linker and hope that it will have the same features
20625# as the host->target linker we'll be using.
20626gcc_cv_gld_major_version=
20627gcc_cv_gld_minor_version=
20628gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20629gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20630
5213506e
RW
20631if test "${gcc_cv_ld+set}" = set; then :
20632
da0f6381
PB
20633else
20634
20635if test -x "$DEFAULT_LINKER"; then
20636 gcc_cv_ld="$DEFAULT_LINKER"
20637elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20638 && test -f ../ld/Makefile \
20639 && test x$build = x$host; then
20640 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20641elif test -x collect-ld$build_exeext; then
20642 # Build using linker in the current directory.
20643 gcc_cv_ld=./collect-ld$build_exeext
20644elif test -x $LD_FOR_TARGET; then
20645 gcc_cv_ld="$LD_FOR_TARGET"
20646else
20647 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20648set dummy $LD_FOR_TARGET; ac_word=$2
5213506e
RW
20649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20650$as_echo_n "checking for $ac_word... " >&6; }
20651if test "${ac_cv_path_gcc_cv_ld+set}" = set; then :
20652 $as_echo_n "(cached) " >&6
d739199a 20653else
e8b05380 20654 case $gcc_cv_ld in
d739199a 20655 [\\/]* | ?:[\\/]*)
e8b05380 20656 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20657 ;;
20658 *)
20659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20660for as_dir in $PATH
20661do
20662 IFS=$as_save_IFS
20663 test -z "$as_dir" && as_dir=.
5213506e
RW
20664 for ac_exec_ext in '' $ac_executable_extensions; do
20665 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20666 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
5213506e 20667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20668 break 2
20669 fi
20670done
5213506e
RW
20671 done
20672IFS=$as_save_IFS
d739199a
DJ
20673
20674 ;;
20675esac
20676fi
e8b05380 20677gcc_cv_ld=$ac_cv_path_gcc_cv_ld
e8b05380 20678if test -n "$gcc_cv_ld"; then
5213506e
RW
20679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20680$as_echo "$gcc_cv_ld" >&6; }
d739199a 20681else
5213506e
RW
20682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20683$as_echo "no" >&6; }
d739199a
DJ
20684fi
20685
5213506e 20686
d739199a 20687fi
e8b05380
PB
20688fi
20689
5938f74d
L
20690ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
20691PLUGIN_LD=`basename $gcc_cv_ld`
20692
20693# Check whether --with-plugin-ld was given.
20694if test "${with_plugin_ld+set}" = set; then :
20695 withval=$with_plugin_ld; if test x"$withval" != x; then
20696 ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval"
20697 PLUGIN_LD="$withval"
20698 fi
20699fi
20700
20701
20702
20703cat >>confdefs.h <<_ACEOF
20704#define PLUGIN_LD "$PLUGIN_LD"
20705_ACEOF
20706
20707
1dcc82c2
DK
20708# Check to see if we are using gold instead of ld
20709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gold" >&5
20710$as_echo_n "checking whether we are using gold... " >&6; }
20711ld_is_gold=no
20712if test x$gcc_cv_ld != x; then
20713 if $gcc_cv_ld --version 2>/dev/null | sed 1q \
20714 | grep "GNU gold" > /dev/null; then
20715 ld_is_gold=yes
20716 fi
20717fi
20718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5
20719$as_echo "$ld_is_gold" >&6; }
20720
e8b05380
PB
20721ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20722
be0fe523
PB
20723case "$ORIGINAL_LD_FOR_TARGET" in
20724 ./collect-ld | ./collect-ld$build_exeext) ;;
5213506e 20725 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20726 ;;
20727esac
e8b05380 20728
5213506e
RW
20729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5
20730$as_echo_n "checking what linker to use... " >&6; }
e8b05380
PB
20731if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20732 # Single tree build which includes ld. We want to prefer it
20733 # over whatever linker top-level may have detected, since
20734 # we'll use what we're building after installation anyway.
5213506e
RW
20735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built ld" >&5
20736$as_echo "newly built ld" >&6; }
e8b05380
PB
20737 in_tree_ld=yes
20738 in_tree_ld_is_elf=no
20739 if (grep 'EMUL = .*elf' ../ld/Makefile \
20740 || grep 'EMUL = .*linux' ../ld/Makefile \
20741 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20742 in_tree_ld_is_elf=yes
20743 fi
20744 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
20745 do
20746 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20747 if test x$gcc_cv_gld_version != x; then
20748 break
20749 fi
20750 done
20751 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20752 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20753else
5213506e
RW
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
20755$as_echo "$gcc_cv_ld" >&6; }
e8b05380
PB
20756 in_tree_ld=no
20757fi
20758
20759# Figure out what nm we will be using.
20760gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
5213506e
RW
20761if test "${gcc_cv_nm+set}" = set; then :
20762
e8b05380
PB
20763else
20764
20765if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20766 && test -f ../binutils/Makefile \
20767 && test x$build = x$host; then
e8b05380
PB
20768 gcc_cv_nm=../binutils/nm-new$build_exeext
20769elif test -x nm$build_exeext; then
20770 gcc_cv_nm=./nm$build_exeext
20771elif test -x $NM_FOR_TARGET; then
20772 gcc_cv_nm="$NM_FOR_TARGET"
20773else
20774 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20775set dummy $NM_FOR_TARGET; ac_word=$2
5213506e
RW
20776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20777$as_echo_n "checking for $ac_word... " >&6; }
20778if test "${ac_cv_path_gcc_cv_nm+set}" = set; then :
20779 $as_echo_n "(cached) " >&6
d739199a 20780else
e8b05380 20781 case $gcc_cv_nm in
d739199a 20782 [\\/]* | ?:[\\/]*)
e8b05380 20783 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20784 ;;
20785 *)
20786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20787for as_dir in $PATH
20788do
20789 IFS=$as_save_IFS
20790 test -z "$as_dir" && as_dir=.
5213506e
RW
20791 for ac_exec_ext in '' $ac_executable_extensions; do
20792 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20793 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
5213506e 20794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
d739199a
DJ
20795 break 2
20796 fi
20797done
5213506e
RW
20798 done
20799IFS=$as_save_IFS
d739199a
DJ
20800
20801 ;;
20802esac
20803fi
e8b05380 20804gcc_cv_nm=$ac_cv_path_gcc_cv_nm
e8b05380 20805if test -n "$gcc_cv_nm"; then
5213506e
RW
20806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20807$as_echo "$gcc_cv_nm" >&6; }
d739199a 20808else
5213506e
RW
20809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20810$as_echo "no" >&6; }
d739199a
DJ
20811fi
20812
5213506e 20813
d739199a 20814fi
e8b05380 20815fi
d739199a 20816
5213506e
RW
20817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what nm to use" >&5
20818$as_echo_n "checking what nm to use... " >&6; }
e8b05380
PB
20819if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20820 # Single tree build which includes binutils.
5213506e
RW
20821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built nm" >&5
20822$as_echo "newly built nm" >&6; }
e8b05380
PB
20823 in_tree_nm=yes
20824else
5213506e
RW
20825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nm" >&5
20826$as_echo "$gcc_cv_nm" >&6; }
e8b05380
PB
20827 in_tree_nm=no
20828fi
20829
20830ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20831
be0fe523
PB
20832case "$ORIGINAL_NM_FOR_TARGET" in
20833 ./nm | ./nm$build_exeext) ;;
5213506e 20834 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20835 ;;
20836esac
20837
e8b05380
PB
20838
20839# Figure out what objdump we will be using.
5213506e
RW
20840if test "${gcc_cv_objdump+set}" = set; then :
20841
e8b05380
PB
20842else
20843
20844if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20845 && test -f ../binutils/Makefile \
20846 && test x$build = x$host; then
e8b05380
PB
20847 # Single tree build which includes binutils.
20848 gcc_cv_objdump=../binutils/objdump$build_exeext
20849elif test -x objdump$build_exeext; then
20850 gcc_cv_objdump=./objdump$build_exeext
20851elif test -x $OBJDUMP_FOR_TARGET; then
20852 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20853else
20854 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20855set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
5213506e
RW
20856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20857$as_echo_n "checking for $ac_word... " >&6; }
20858if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then :
20859 $as_echo_n "(cached) " >&6
9f18db39 20860else
e8b05380 20861 case $gcc_cv_objdump in
9f18db39 20862 [\\/]* | ?:[\\/]*)
e8b05380 20863 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20864 ;;
20865 *)
20866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20867for as_dir in $PATH
9f18db39
PB
20868do
20869 IFS=$as_save_IFS
20870 test -z "$as_dir" && as_dir=.
5213506e
RW
20871 for ac_exec_ext in '' $ac_executable_extensions; do
20872 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 20873 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
5213506e 20874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9f18db39
PB
20875 break 2
20876 fi
20877done
5213506e
RW
20878 done
20879IFS=$as_save_IFS
779243f7 20880
9f18db39
PB
20881 ;;
20882esac
20883fi
e8b05380 20884gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
e8b05380 20885if test -n "$gcc_cv_objdump"; then
5213506e
RW
20886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20887$as_echo "$gcc_cv_objdump" >&6; }
9f18db39 20888else
5213506e
RW
20889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20890$as_echo "no" >&6; }
9f18db39
PB
20891fi
20892
5213506e 20893
e8b05380
PB
20894fi
20895fi
9f18db39 20896
5213506e
RW
20897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what objdump to use" >&5
20898$as_echo_n "checking what objdump to use... " >&6; }
e8b05380
PB
20899if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20900 # Single tree build which includes binutils.
5213506e
RW
20901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built objdump" >&5
20902$as_echo "newly built objdump" >&6; }
e8b05380 20903elif test x$gcc_cv_objdump = x; then
5213506e
RW
20904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20905$as_echo "not found" >&6; }
e8b05380 20906else
5213506e
RW
20907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objdump" >&5
20908$as_echo "$gcc_cv_objdump" >&6; }
a2eafc76 20909fi
3cae5780 20910
6e97481b 20911# Figure out what readelf we will be using.
5213506e
RW
20912if test "${gcc_cv_readelf+set}" = set; then :
20913
6e97481b
JJ
20914else
20915
20916if test -f $gcc_cv_binutils_srcdir/configure.in \
20917 && test -f ../binutils/Makefile \
20918 && test x$build = x$host; then
20919 # Single tree build which includes binutils.
20920 gcc_cv_readelf=../binutils/readelf$build_exeext
20921elif test -x readelf$build_exeext; then
20922 gcc_cv_readelf=./readelf$build_exeext
20923else
20924 # Extract the first word of "readelf", so it can be a program name with args.
20925set dummy readelf; ac_word=$2
5213506e
RW
20926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20927$as_echo_n "checking for $ac_word... " >&6; }
20928if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then :
20929 $as_echo_n "(cached) " >&6
6e97481b
JJ
20930else
20931 case $gcc_cv_readelf in
20932 [\\/]* | ?:[\\/]*)
20933 ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path.
20934 ;;
20935 *)
20936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20937for as_dir in $PATH
20938do
20939 IFS=$as_save_IFS
20940 test -z "$as_dir" && as_dir=.
5213506e
RW
20941 for ac_exec_ext in '' $ac_executable_extensions; do
20942 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6e97481b 20943 ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
5213506e 20944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6e97481b
JJ
20945 break 2
20946 fi
20947done
5213506e
RW
20948 done
20949IFS=$as_save_IFS
6e97481b
JJ
20950
20951 ;;
20952esac
20953fi
20954gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
6e97481b 20955if test -n "$gcc_cv_readelf"; then
5213506e
RW
20956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20957$as_echo "$gcc_cv_readelf" >&6; }
6e97481b 20958else
5213506e
RW
20959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20960$as_echo "no" >&6; }
6e97481b
JJ
20961fi
20962
5213506e 20963
6e97481b
JJ
20964fi
20965fi
20966
5213506e
RW
20967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5
20968$as_echo_n "checking what readelf to use... " >&6; }
6e97481b
JJ
20969if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
20970 # Single tree build which includes binutils.
5213506e
RW
20971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" >&5
20972$as_echo "newly built readelf" >&6; }
6e97481b 20973elif test x$gcc_cv_readelf = x; then
5213506e
RW
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20975$as_echo "not found" >&6; }
6e97481b 20976else
5213506e
RW
20977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
20978$as_echo "$gcc_cv_readelf" >&6; }
6e97481b
JJ
20979fi
20980
981d4858 20981# Figure out what assembler alignment features are present.
e0b0fd74
L
20982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5
20983$as_echo_n "checking assembler flags... " >&6; }
20984if test "${gcc_cv_as_flags+set}" = set; then :
20985 $as_echo_n "(cached) " >&6
20986else
20987 case "$target" in
20988 i[34567]86-*-linux*)
20989 gcc_cv_as_flags="--32"
20990 ;;
20991 *)
20992 gcc_cv_as_flags=" "
20993 ;;
20994 esac
20995fi
20996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_flags" >&5
20997$as_echo "$gcc_cv_as_flags" >&6; }
20998
5213506e
RW
20999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .balign and .p2align" >&5
21000$as_echo_n "checking assembler for .balign and .p2align... " >&6; }
21001if test "${gcc_cv_as_balign_and_p2align+set}" = set; then :
21002 $as_echo_n "(cached) " >&6
8ada417f
ZW
21003else
21004 gcc_cv_as_balign_and_p2align=no
21005 if test $in_tree_gas = yes; then
21006 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
21007 then gcc_cv_as_balign_and_p2align=yes
21008fi
21009 elif test x$gcc_cv_as != x; then
6e3f3080 21010 echo '.balign 4
8ada417f 21011.p2align 2' > conftest.s
e0b0fd74 21012 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21013 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21014 (eval $ac_try) 2>&5
21015 ac_status=$?
5213506e
RW
21016 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21017 test $ac_status = 0; }; }
8ada417f
ZW
21018 then
21019 gcc_cv_as_balign_and_p2align=yes
21020 else
21021 echo "configure: failed program was" >&5
21022 cat conftest.s >&5
21023 fi
21024 rm -f conftest.o conftest.s
21025 fi
21026fi
5213506e
RW
21027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_balign_and_p2align" >&5
21028$as_echo "$gcc_cv_as_balign_and_p2align" >&6; }
63cf211a 21029if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2 21030
5213506e 21031$as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h
981d4858 21032
ad9c4d9f
NN
21033fi
21034
5213506e
RW
21035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5
21036$as_echo_n "checking assembler for .p2align with maximum skip... " >&6; }
21037if test "${gcc_cv_as_max_skip_p2align+set}" = set; then :
21038 $as_echo_n "(cached) " >&6
8ada417f
ZW
21039else
21040 gcc_cv_as_max_skip_p2align=no
21041 if test $in_tree_gas = yes; then
21042 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
21043 then gcc_cv_as_max_skip_p2align=yes
21044fi
21045 elif test x$gcc_cv_as != x; then
6e3f3080 21046 echo '.p2align 4,,7' > conftest.s
e0b0fd74 21047 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21048 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21049 (eval $ac_try) 2>&5
21050 ac_status=$?
5213506e
RW
21051 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21052 test $ac_status = 0; }; }
8ada417f
ZW
21053 then
21054 gcc_cv_as_max_skip_p2align=yes
21055 else
21056 echo "configure: failed program was" >&5
21057 cat conftest.s >&5
21058 fi
21059 rm -f conftest.o conftest.s
21060 fi
ad9c4d9f 21061fi
5213506e
RW
21062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_max_skip_p2align" >&5
21063$as_echo "$gcc_cv_as_max_skip_p2align" >&6; }
63cf211a 21064if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2 21065
5213506e 21066$as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h
9e423e6d 21067
9e423e6d 21068fi
ad9c4d9f 21069
5213506e
RW
21070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5
21071$as_echo_n "checking assembler for .literal16... " >&6; }
21072if test "${gcc_cv_as_literal16+set}" = set; then :
21073 $as_echo_n "(cached) " >&6
5708d18d
MS
21074else
21075 gcc_cv_as_literal16=no
21076 if test $in_tree_gas = yes; then
21077 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
21078 then gcc_cv_as_literal16=yes
21079fi
21080 elif test x$gcc_cv_as != x; then
21081 echo '.literal16' > conftest.s
e0b0fd74 21082 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21083 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
5708d18d
MS
21084 (eval $ac_try) 2>&5
21085 ac_status=$?
5213506e
RW
21086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21087 test $ac_status = 0; }; }
5708d18d
MS
21088 then
21089 gcc_cv_as_literal16=yes
21090 else
21091 echo "configure: failed program was" >&5
21092 cat conftest.s >&5
21093 fi
21094 rm -f conftest.o conftest.s
21095 fi
21096fi
5213506e
RW
21097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_literal16" >&5
21098$as_echo "$gcc_cv_as_literal16" >&6; }
5708d18d
MS
21099if test $gcc_cv_as_literal16 = yes; then
21100
5213506e 21101$as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h
5708d18d
MS
21102
21103fi
21104
5213506e
RW
21105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5
21106$as_echo_n "checking assembler for working .subsection -1... " >&6; }
21107if test "${gcc_cv_as_subsection_m1+set}" = set; then :
21108 $as_echo_n "(cached) " >&6
8ada417f
ZW
21109else
21110 gcc_cv_as_subsection_m1=no
21111 if test $in_tree_gas = yes; then
21112 if test $in_tree_gas_is_elf = yes \
21113 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
21114 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 21115fi
8ada417f 21116 elif test x$gcc_cv_as != x; then
6e3f3080 21117 echo 'conftest_label1: .word 0
d1accaa3
JJ
21118.subsection -1
21119conftest_label2: .word 0
8ada417f 21120.previous' > conftest.s
e0b0fd74 21121 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21122 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21123 (eval $ac_try) 2>&5
21124 ac_status=$?
5213506e
RW
21125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21126 test $ac_status = 0; }; }
8ada417f
ZW
21127 then
21128 if test x$gcc_cv_nm != x; then
21129 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
21130 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
21131 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
21132 then :
21133 else gcc_cv_as_subsection_m1=yes
21134 fi
21135 rm -f conftest.nm1 conftest.nm2
21136 fi
21137 else
21138 echo "configure: failed program was" >&5
21139 cat conftest.s >&5
21140 fi
21141 rm -f conftest.o conftest.s
21142 fi
981d4858 21143fi
5213506e
RW
21144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_subsection_m1" >&5
21145$as_echo "$gcc_cv_as_subsection_m1" >&6; }
63cf211a 21146if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2 21147
5213506e 21148$as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h
981d4858 21149
d1accaa3 21150fi
ad9c4d9f 21151
5213506e
RW
21152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5
21153$as_echo_n "checking assembler for .weak... " >&6; }
21154if test "${gcc_cv_as_weak+set}" = set; then :
21155 $as_echo_n "(cached) " >&6
8ada417f
ZW
21156else
21157 gcc_cv_as_weak=no
21158 if test $in_tree_gas = yes; then
21159 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
21160 then gcc_cv_as_weak=yes
ad9c4d9f 21161fi
8ada417f 21162 elif test x$gcc_cv_as != x; then
6e3f3080 21163 echo ' .weak foobar' > conftest.s
e0b0fd74 21164 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21165 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21166 (eval $ac_try) 2>&5
21167 ac_status=$?
5213506e
RW
21168 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21169 test $ac_status = 0; }; }
8ada417f
ZW
21170 then
21171 gcc_cv_as_weak=yes
21172 else
21173 echo "configure: failed program was" >&5
21174 cat conftest.s >&5
21175 fi
21176 rm -f conftest.o conftest.s
21177 fi
981d4858 21178fi
5213506e
RW
21179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weak" >&5
21180$as_echo "$gcc_cv_as_weak" >&6; }
63cf211a 21181if test $gcc_cv_as_weak = yes; then
ba479fd2 21182
5213506e 21183$as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h
981d4858 21184
12822146 21185fi
ad9c4d9f 21186
5213506e
RW
21187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5
21188$as_echo_n "checking assembler for .weakref... " >&6; }
21189if test "${gcc_cv_as_weakref+set}" = set; then :
21190 $as_echo_n "(cached) " >&6
a0203ca7
AO
21191else
21192 gcc_cv_as_weakref=no
21193 if test $in_tree_gas = yes; then
21194 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
21195 then gcc_cv_as_weakref=yes
21196fi
21197 elif test x$gcc_cv_as != x; then
21198 echo ' .weakref foobar, barfnot' > conftest.s
e0b0fd74 21199 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21200 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a0203ca7
AO
21201 (eval $ac_try) 2>&5
21202 ac_status=$?
5213506e
RW
21203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21204 test $ac_status = 0; }; }
a0203ca7
AO
21205 then
21206 gcc_cv_as_weakref=yes
21207 else
21208 echo "configure: failed program was" >&5
21209 cat conftest.s >&5
21210 fi
21211 rm -f conftest.o conftest.s
21212 fi
21213fi
5213506e
RW
21214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_weakref" >&5
21215$as_echo "$gcc_cv_as_weakref" >&6; }
a0203ca7
AO
21216if test $gcc_cv_as_weakref = yes; then
21217
5213506e 21218$as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h
a0203ca7
AO
21219
21220fi
21221
5213506e
RW
21222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5
21223$as_echo_n "checking assembler for .nsubspa comdat... " >&6; }
21224if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then :
21225 $as_echo_n "(cached) " >&6
e41f3691
JDA
21226else
21227 gcc_cv_as_nsubspa_comdat=no
21228 if test $in_tree_gas = yes; then
21229 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21230 then gcc_cv_as_nsubspa_comdat=yes
21231fi
21232 elif test x$gcc_cv_as != x; then
21233 echo ' .SPACE $TEXT$
21234 .NSUBSPA $CODE$,COMDAT' > conftest.s
e0b0fd74 21235 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21236 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e41f3691
JDA
21237 (eval $ac_try) 2>&5
21238 ac_status=$?
5213506e
RW
21239 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21240 test $ac_status = 0; }; }
e41f3691
JDA
21241 then
21242 gcc_cv_as_nsubspa_comdat=yes
21243 else
21244 echo "configure: failed program was" >&5
21245 cat conftest.s >&5
21246 fi
21247 rm -f conftest.o conftest.s
21248 fi
21249fi
5213506e
RW
21250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_nsubspa_comdat" >&5
21251$as_echo "$gcc_cv_as_nsubspa_comdat" >&6; }
e41f3691
JDA
21252if test $gcc_cv_as_nsubspa_comdat = yes; then
21253
5213506e 21254$as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h
e41f3691
JDA
21255
21256fi
21257
8ada417f
ZW
21258# .hidden needs to be supported in both the assembler and the linker,
21259# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
21260# This is irritatingly difficult to feature test for; we have to check the
21261# date string after the version number. If we've got an in-tree
21262# ld, we don't know its patchlevel version, so we set the baseline at 2.13
21263# to be safe.
21264# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
5213506e
RW
21265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .hidden" >&5
21266$as_echo_n "checking assembler for .hidden... " >&6; }
21267if test "${gcc_cv_as_hidden+set}" = set; then :
21268 $as_echo_n "(cached) " >&6
8ada417f
ZW
21269else
21270 gcc_cv_as_hidden=no
21271 if test $in_tree_gas = yes; then
21272 if test $in_tree_gas_is_elf = yes \
21273 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
21274 then gcc_cv_as_hidden=yes
21275fi
21276 elif test x$gcc_cv_as != x; then
6e3f3080 21277 echo ' .hidden foobar
8ada417f 21278foobar:' > conftest.s
e0b0fd74 21279 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21280 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21281 (eval $ac_try) 2>&5
21282 ac_status=$?
5213506e
RW
21283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21284 test $ac_status = 0; }; }
8ada417f 21285 then
ed104137
RO
21286
21287# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with
21288# STV_HIDDEN, so disable .hidden support if so.
21289case "${target}" in
21290 i?86-*-solaris2*)
21291 if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then
21292 cat > conftest.s <<EOF
21293.globl hidden
21294 .hidden hidden
21295hidden:
21296.globl default
21297 .set default,hidden
21298EOF
21299 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
21300 && $gcc_cv_objdump -t conftest.o 2>/dev/null | \
21301 grep '\.hidden default' > /dev/null; then
21302 gcc_cv_as_hidden=no
21303 else
21304 gcc_cv_as_hidden=yes
21305 fi
21306 else
21307 # Assume bug is present if objdump is missing.
21308 gcc_cv_as_hidden=no
21309 fi
21310 ;;
21311 *)
21312 gcc_cv_as_hidden=yes
21313 ;;
21314esac
8ada417f
ZW
21315 else
21316 echo "configure: failed program was" >&5
21317 cat conftest.s >&5
21318 fi
21319 rm -f conftest.o conftest.s
21320 fi
21321fi
5213506e
RW
21322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5
21323$as_echo "$gcc_cv_as_hidden" >&6; }
63cf211a 21324
ad9c4d9f 21325
ba885ec5
NS
21326# gnu_indirect_function type is an extension proposed at
21327# http://groups.google/com/group/generic-abi/files. It allows dynamic runtime
21328# selection of function implementation
f6c5fbfd
NS
21329# Check whether --enable-gnu-indirect-function was given.
21330if test "${enable_gnu_indirect_function+set}" = set; then :
21331 enableval=$enable_gnu_indirect_function; case $enable_gnu_indirect_function in
21332 yes | no) ;;
21333 *) as_fn_error "'$enable_gnu_indirect_function' is an invalid value for --enable-gnu-indirect-function.
21334Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
21335 esac
ba885ec5 21336else
f6c5fbfd 21337 enable_gnu_indirect_function="$default_gnu_indirect_function"
ba885ec5 21338fi
ba885ec5 21339
f6c5fbfd 21340if test x$enable_gnu_indirect_function = xyes; then
ba885ec5 21341
f6c5fbfd 21342$as_echo "#define HAVE_GNU_INDIRECT_FUNCTION 1" >>confdefs.h
ba885ec5
NS
21343
21344fi
21345
10ca6198
JJ
21346if test $in_tree_ld != yes ; then
21347 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
1dcc82c2
DK
21348 if test x"$ld_is_gold" = xyes; then
21349 gcc_cv_ld_hidden=yes
21350 elif echo "$ld_ver" | grep GNU > /dev/null; then
10ca6198
JJ
21351 ld_vers=`echo $ld_ver | sed -n \
21352 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
21353 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'`
21354 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21355 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21356 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
55c4f715
RO
21357 else
21358 case "${target}" in
21359 *-*-solaris2*)
21360 #
21361 # Solaris 2 ld -V output looks like this for a regular version:
21362 #
21363 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
21364 #
21365 # but test versions add stuff at the end:
21366 #
21367 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
21368 #
21369 ld_ver=`$gcc_cv_ld -V 2>&1`
21370 if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
21371 ld_vers=`echo $ld_ver | sed -n \
21372 -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
21373 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21374 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21375 fi
21376 ;;
21377 esac
10ca6198
JJ
21378 fi
21379fi
21380
5213506e
RW
21381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .hidden support" >&5
21382$as_echo_n "checking linker for .hidden support... " >&6; }
21383if test "${gcc_cv_ld_hidden+set}" = set; then :
21384 $as_echo_n "(cached) " >&6
8ada417f
ZW
21385else
21386 if test $in_tree_ld = yes ; then
21387 gcc_cv_ld_hidden=no
21388 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 \
21389 && test $in_tree_ld_is_elf = yes; then
21390 gcc_cv_ld_hidden=yes
21391 fi
21392else
21393 gcc_cv_ld_hidden=yes
8ada417f 21394 if echo "$ld_ver" | grep GNU > /dev/null; then
8ada417f
ZW
21395 if test 0"$ld_date" -lt 20020404; then
21396 if test -n "$ld_date"; then
21397 # If there was date string, but was earlier than 2002-04-04, fail
21398 gcc_cv_ld_hidden=no
21399 elif test -z "$ld_vers"; then
21400 # If there was no date string nor ld version number, something is wrong
21401 gcc_cv_ld_hidden=no
21402 else
8ada417f
ZW
21403 test -z "$ld_vers_patch" && ld_vers_patch=0
21404 if test "$ld_vers_major" -lt 2; then
21405 gcc_cv_ld_hidden=no
21406 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
21407 gcc_cv_ld_hidden="no"
21408 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
21409 gcc_cv_ld_hidden=no
c72931a6 21410 fi
8ada417f 21411 fi
789b7de5 21412 fi
8ada417f 21413 else
28690784 21414 case "${target}" in
b0fd7d27 21415 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
21416 gcc_cv_ld_hidden=yes
21417 ;;
319840d3
RO
21418 *-*-solaris2.8*)
21419 # .hidden support was backported to Solaris 8, starting with ld
21420 # version 1.276.
21421 if test "$ld_vers_minor" -ge 276; then
21422 gcc_cv_ld_hidden=yes
21423 else
21424 gcc_cv_ld_hidden=no
21425 fi
21426 ;;
5e87dc23 21427 *-*-solaris2.9* | *-*-solaris2.1[0-9]*)
a93e1899
RO
21428 # Support for .hidden in Sun ld appeared in Solaris 9 FCS, but
21429 # .symbolic was only added in Solaris 9 12/02.
5e87dc23
RO
21430 gcc_cv_ld_hidden=yes
21431 ;;
28690784
JDA
21432 *)
21433 gcc_cv_ld_hidden=no
21434 ;;
21435 esac
8ada417f
ZW
21436 fi
21437fi
6d07784a 21438fi
5213506e
RW
21439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_hidden" >&5
21440$as_echo "$gcc_cv_ld_hidden" >&6; }
8ada417f 21441libgcc_visibility=no
ad9c4d9f 21442
232b67d9 21443
8e3940b2 21444if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 21445 libgcc_visibility=yes
ba479fd2 21446
5213506e 21447$as_echo "#define HAVE_GAS_HIDDEN 1" >>confdefs.h
ad9c4d9f
NN
21448
21449fi
21450
5213506e
RW
21451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker read-only and read-write section mixing" >&5
21452$as_echo_n "checking linker read-only and read-write section mixing... " >&6; }
e73da78e
RO
21453gcc_cv_ld_ro_rw_mix=unknown
21454if test $in_tree_ld = yes ; then
21455 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 \
21456 && test $in_tree_ld_is_elf = yes; then
21457 gcc_cv_ld_ro_rw_mix=read-write
21458 fi
21459elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
21460 echo '.section myfoosect, "a"' > conftest1.s
21461 echo '.section myfoosect, "aw"' > conftest2.s
21462 echo '.byte 1' >> conftest2.s
21463 echo '.section myfoosect, "a"' > conftest3.s
21464 echo '.byte 0' >> conftest3.s
21465 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
21466 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
21467 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
21468 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
21469 conftest2.o conftest3.o > /dev/null 2>&1; then
21470 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
21471 | sed -e '/myfoosect/!d' -e N`
21472 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
21473 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
21474 gcc_cv_ld_ro_rw_mix=read-only
21475 else
21476 gcc_cv_ld_ro_rw_mix=read-write
21477 fi
21478 fi
21479 fi
21480 rm -f conftest.* conftest[123].*
21481fi
21482if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
21483
5213506e 21484$as_echo "#define HAVE_LD_RO_RW_SECTION_MIXING 1" >>confdefs.h
e73da78e
RO
21485
21486fi
5213506e
RW
21487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5
21488$as_echo "$gcc_cv_ld_ro_rw_mix" >&6; }
e73da78e 21489
8ada417f 21490# Check if we have .[us]leb128, and support symbol arithmetic with it.
5213506e
RW
21491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .sleb128 and .uleb128" >&5
21492$as_echo_n "checking assembler for .sleb128 and .uleb128... " >&6; }
21493if test "${gcc_cv_as_leb128+set}" = set; then :
21494 $as_echo_n "(cached) " >&6
8ada417f
ZW
21495else
21496 gcc_cv_as_leb128=no
21497 if test $in_tree_gas = yes; then
21498 if test $in_tree_gas_is_elf = yes \
21499 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
21500 then gcc_cv_as_leb128=yes
21501fi
21502 elif test x$gcc_cv_as != x; then
6e3f3080 21503 echo ' .data
b7460f24
RH
21504 .uleb128 L2 - L1
21505L1:
21506 .uleb128 1280
21507 .sleb128 -1010
8ada417f 21508L2:' > conftest.s
e0b0fd74 21509 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21510 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21511 (eval $ac_try) 2>&5
21512 ac_status=$?
5213506e
RW
21513 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21514 test $ac_status = 0; }; }
8ada417f
ZW
21515 then
21516 # GAS versions before 2.11 do not support uleb128,
21517 # despite appearing to.
21518 # ??? There exists an elf-specific test that will crash
21519 # the assembler. Perhaps it's better to figure out whether
21520 # arbitrary sections are supported and try the test.
bace148a 21521 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 21522 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 21523 as_vers=`echo $as_ver | sed -n \
115e6e55 21524 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
21525 as_major=`expr "$as_vers" : '\([0-9]*\)'`
21526 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
21527 if test $as_major -eq 2 && test $as_minor -lt 11
21528 then :
21529 else gcc_cv_as_leb128=yes
21530 fi
21531 fi
21532 else
21533 echo "configure: failed program was" >&5
21534 cat conftest.s >&5
21535 fi
21536 rm -f conftest.o conftest.s
21537 fi
b7460f24 21538fi
5213506e
RW
21539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_leb128" >&5
21540$as_echo "$gcc_cv_as_leb128" >&6; }
63cf211a 21541if test $gcc_cv_as_leb128 = yes; then
ba479fd2 21542
5213506e 21543$as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h
b7460f24
RH
21544
21545fi
ad9c4d9f 21546
d4ea4622 21547# Check if we have assembler support for unwind directives.
5213506e
RW
21548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5
21549$as_echo_n "checking assembler for cfi directives... " >&6; }
21550if test "${gcc_cv_as_cfi_directive+set}" = set; then :
21551 $as_echo_n "(cached) " >&6
d4ea4622
RH
21552else
21553 gcc_cv_as_cfi_directive=no
6e60703f 21554 if test x$gcc_cv_as != x; then
d4ea4622
RH
21555 echo ' .text
21556 .cfi_startproc
21557 .cfi_offset 0, 0
21558 .cfi_same_value 1
21559 .cfi_def_cfa 1, 2
21560 .cfi_escape 1, 2, 3, 4, 5
21561 .cfi_endproc' > conftest.s
e0b0fd74 21562 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21563 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d4ea4622
RH
21564 (eval $ac_try) 2>&5
21565 ac_status=$?
5213506e
RW
21566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21567 test $ac_status = 0; }; }
d4ea4622 21568 then
e73da78e
RO
21569 case "$target" in
21570 *-*-solaris*)
21571 # If the linker used on Solaris (like Sun ld) isn't capable of merging
21572 # read-only and read-write sections, we need to make sure that the
21573 # assembler used emits read-write .eh_frame sections.
21574 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then
21575 if test "x$gcc_cv_objdump" != x; then
21576 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21577 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then
21578 gcc_cv_as_cfi_directive=no
21579 else
eb2573ee
RO
21580 case "$target" in
21581 i?86-*-solaris2.1[0-9]*)
21582 # On Solaris/x86, make sure that GCC and gas agree on using
21583 # read-only .eh_frame sections for 64-bit.
21584 if $gcc_cv_as --64 -o conftest.o conftest.s > /dev/null 2>&1 && \
21585 $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21586 sed -e /.eh_frame/!d -e N | \
21587 grep READONLY > /dev/null; then
21588 gcc_cv_as_cfi_directive=yes
21589 else
21590 gcc_cv_as_cfi_directive=no
21591 fi
21592 ;;
21593 *)
21594 gcc_cv_as_cfi_directive=yes
21595 ;;
21596 esac
e73da78e
RO
21597 fi
21598 else
21599 # no objdump, err on the side of caution
21600 gcc_cv_as_cfi_directive=no
21601 fi
21602 else
21603 gcc_cv_as_cfi_directive=yes
21604 fi
21605 ;;
21606 *-*-*)
21607 gcc_cv_as_cfi_directive=yes
21608 ;;
21609esac
d4ea4622
RH
21610 else
21611 echo "configure: failed program was" >&5
21612 cat conftest.s >&5
21613 fi
21614 rm -f conftest.o conftest.s
21615 fi
21616fi
5213506e
RW
21617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5
21618$as_echo "$gcc_cv_as_cfi_directive" >&6; }
d4ea4622 21619
92053f38 21620if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_objdump != x; then
5213506e
RW
21621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5
21622$as_echo_n "checking assembler for working cfi advance... " >&6; }
21623if test "${gcc_cv_as_cfi_advance_working+set}" = set; then :
21624 $as_echo_n "(cached) " >&6
6e97481b
JJ
21625else
21626 gcc_cv_as_cfi_advance_working=no
21627 if test x$gcc_cv_as != x; then
21628 echo ' .text
21629 .cfi_startproc
21630 .cfi_adjust_cfa_offset 64
7ac22e17 21631 .skip 75040, 0
6e97481b
JJ
21632 .cfi_adjust_cfa_offset 128
21633 .cfi_endproc' > conftest.s
e0b0fd74 21634 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21635 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6e97481b
JJ
21636 (eval $ac_try) 2>&5
21637 ac_status=$?
5213506e
RW
21638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21639 test $ac_status = 0; }; }
6e97481b
JJ
21640 then
21641
92053f38 21642if $gcc_cv_objdump -Wf conftest.o 2>/dev/null \
7ac22e17 21643 | grep 'DW_CFA_advance_loc[24]:[ ][ ]*75040[ ]' >/dev/null; then
6e97481b
JJ
21644 gcc_cv_as_cfi_advance_working=yes
21645fi
21646
21647 else
21648 echo "configure: failed program was" >&5
21649 cat conftest.s >&5
21650 fi
21651 rm -f conftest.o conftest.s
21652 fi
21653fi
5213506e
RW
21654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5
21655$as_echo "$gcc_cv_as_cfi_advance_working" >&6; }
6e97481b
JJ
21656
21657else
92053f38 21658 # no objdump, err on the side of caution
66f91112 21659 gcc_cv_as_cfi_advance_working=no
6e97481b 21660fi
d4ea4622 21661
174425ad 21662
d4ea4622 21663cat >>confdefs.h <<_ACEOF
6e97481b
JJ
21664#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \
21665 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`
d4ea4622
RH
21666_ACEOF
21667
21668
174425ad 21669
5213506e
RW
21670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi personality directive" >&5
21671$as_echo_n "checking assembler for cfi personality directive... " >&6; }
21672if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then :
21673 $as_echo_n "(cached) " >&6
058514b3
RH
21674else
21675 gcc_cv_as_cfi_personality_directive=no
6e60703f 21676 if test x$gcc_cv_as != x; then
058514b3 21677 echo ' .text
042628f9 21678 .cfi_startproc
058514b3
RH
21679 .cfi_personality 0, symbol
21680 .cfi_endproc' > conftest.s
e0b0fd74 21681 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21682 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
058514b3
RH
21683 (eval $ac_try) 2>&5
21684 ac_status=$?
5213506e
RW
21685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21686 test $ac_status = 0; }; }
058514b3
RH
21687 then
21688 gcc_cv_as_cfi_personality_directive=yes
21689 else
21690 echo "configure: failed program was" >&5
21691 cat conftest.s >&5
21692 fi
21693 rm -f conftest.o conftest.s
21694 fi
21695fi
5213506e
RW
21696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_personality_directive" >&5
21697$as_echo "$gcc_cv_as_cfi_personality_directive" >&6; }
058514b3
RH
21698
21699
21700cat >>confdefs.h <<_ACEOF
21701#define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
21702 then echo 1; else echo 0; fi`
21703_ACEOF
21704
21705
7d45fb94
JJ
21706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi sections directive" >&5
21707$as_echo_n "checking assembler for cfi sections directive... " >&6; }
21708if test "${gcc_cv_as_cfi_sections_directive+set}" = set; then :
21709 $as_echo_n "(cached) " >&6
21710else
21711 gcc_cv_as_cfi_sections_directive=no
21712 if test x$gcc_cv_as != x; then
21713 echo ' .text
21714 .cfi_sections .debug_frame, .eh_frame
21715 .cfi_startproc
21716 .cfi_endproc' > conftest.s
e0b0fd74 21717 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
7d45fb94
JJ
21718 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
21719 (eval $ac_try) 2>&5
21720 ac_status=$?
21721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21722 test $ac_status = 0; }; }
21723 then
92053f38
RH
21724 case $target_os in
21725 win32 | pe | cygwin* | mingw32* | uwin*)
21726 # Need to check that we generated the correct relocation for the
21727 # .debug_frame section. This was fixed for binutils 2.21.
21728 gcc_cv_as_cfi_sections_directive=no
21729 if test "x$gcc_cv_objdump" != x; then
21730 if $gcc_cv_objdump -j .debug_frame -r conftest.o 2>/dev/null | \
21731 grep secrel > /dev/null; then
21732 gcc_cv_as_cfi_sections_directive=yes
21733 fi
21734 fi
21735 ;;
21736 *)
21737 gcc_cv_as_cfi_sections_directive=yes
21738 ;;
21739esac
7d45fb94
JJ
21740 else
21741 echo "configure: failed program was" >&5
21742 cat conftest.s >&5
21743 fi
21744 rm -f conftest.o conftest.s
21745 fi
21746fi
21747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_sections_directive" >&5
21748$as_echo "$gcc_cv_as_cfi_sections_directive" >&6; }
21749
21750
174425ad 21751
7d45fb94
JJ
21752cat >>confdefs.h <<_ACEOF
21753#define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes;
21754 then echo 1; else echo 0; fi`
21755_ACEOF
21756
21757
8ada417f
ZW
21758# GAS versions up to and including 2.11.0 may mis-optimize
21759# .eh_frame data.
5213506e
RW
21760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for eh_frame optimization" >&5
21761$as_echo_n "checking assembler for eh_frame optimization... " >&6; }
21762if test "${gcc_cv_as_eh_frame+set}" = set; then :
21763 $as_echo_n "(cached) " >&6
8ada417f
ZW
21764else
21765 gcc_cv_as_eh_frame=no
21766 if test $in_tree_gas = yes; then
21767 if test $in_tree_gas_is_elf = yes \
21768 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21769 then gcc_cv_as_eh_frame=yes
ad9c4d9f 21770fi
8ada417f 21771 elif test x$gcc_cv_as != x; then
6e3f3080 21772 echo ' .text
c64688ae
RH
21773.LFB1:
21774 .4byte 0
21775.L1:
21776 .4byte 0
21777.LFE1:
21778 .section .eh_frame,"aw",@progbits
21779__FRAME_BEGIN__:
21780 .4byte .LECIE1-.LSCIE1
21781.LSCIE1:
21782 .4byte 0x0
21783 .byte 0x1
21784 .ascii "z\0"
21785 .byte 0x1
21786 .byte 0x78
21787 .byte 0x1a
21788 .byte 0x0
21789 .byte 0x4
21790 .4byte 1
21791 .p2align 1
21792.LECIE1:
21793.LSFDE1:
21794 .4byte .LEFDE1-.LASFDE1
21795.LASFDE1:
21796 .4byte .LASFDE1-__FRAME_BEGIN__
21797 .4byte .LFB1
21798 .4byte .LFE1-.LFB1
21799 .byte 0x4
21800 .4byte .LFE1-.LFB1
21801 .byte 0x4
21802 .4byte .L1-.LFB1
8ada417f 21803.LEFDE1:' > conftest.s
e0b0fd74 21804 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 21805 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21806 (eval $ac_try) 2>&5
21807 ac_status=$?
5213506e
RW
21808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21809 test $ac_status = 0; }; }
8ada417f
ZW
21810 then
21811 cat > conftest.lit <<EOF
c64688ae
RH
21812 0000 10000000 00000000 017a0001 781a0004 .........z..x...
21813 0010 01000000 12000000 18000000 00000000 ................
093e61a6 21814 0020 08000000 04080000 0044 .........D
01efb963 21815EOF
ba479fd2 21816cat > conftest.big <<EOF
01efb963
AS
21817 0000 00000010 00000000 017a0001 781a0004 .........z..x...
21818 0010 00000001 00000012 00000018 00000000 ................
093e61a6 21819 0020 00000008 04000000 0844 .........D
c64688ae 21820EOF
8ada417f
ZW
21821 # If the assembler didn't choke, and we can objdump,
21822 # and we got the correct data, then succeed.
dbc02e7f
AS
21823 # The text in the here-document typically retains its unix-style line
21824 # endings, while the output of objdump will use host line endings.
21825 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
21826 if test x$gcc_cv_objdump != x \
21827 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
21828 | tail -3 > conftest.got \
dbc02e7f
AS
21829 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
21830 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
21831 then
21832 gcc_cv_as_eh_frame=yes
ba479fd2 21833 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
5213506e 21834 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
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; }; }; then
8ada417f
ZW
21839 gcc_cv_as_eh_frame=buggy
21840 else
21841 # Uh oh, what do we do now?
21842 gcc_cv_as_eh_frame=no
21843 fi
21844 else
21845 echo "configure: failed program was" >&5
21846 cat conftest.s >&5
21847 fi
21848 rm -f conftest.o conftest.s
21849 fi
c64688ae 21850fi
5213506e
RW
21851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_eh_frame" >&5
21852$as_echo "$gcc_cv_as_eh_frame" >&6; }
ad9c4d9f 21853
6e3f3080 21854
63cf211a 21855if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2 21856
5213506e 21857$as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h
ad9c4d9f
NN
21858
21859fi
21860
5213506e
RW
21861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21862$as_echo_n "checking assembler for section merging support... " >&6; }
21863if test "${gcc_cv_as_shf_merge+set}" = set; then :
21864 $as_echo_n "(cached) " >&6
8ada417f
ZW
21865else
21866 gcc_cv_as_shf_merge=no
21867 if test $in_tree_gas = yes; then
21868 if test $in_tree_gas_is_elf = yes \
21869 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21870 then gcc_cv_as_shf_merge=yes
21871fi
21872 elif test x$gcc_cv_as != x; then
6e3f3080 21873 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
e0b0fd74 21874 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21875 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
21876 (eval $ac_try) 2>&5
21877 ac_status=$?
5213506e
RW
21878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21879 test $ac_status = 0; }; }
8ada417f
ZW
21880 then
21881 gcc_cv_as_shf_merge=yes
21882 else
21883 echo "configure: failed program was" >&5
21884 cat conftest.s >&5
21885 fi
21886 rm -f conftest.o conftest.s
21887 fi
201556f0 21888fi
5213506e
RW
21889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21890$as_echo "$gcc_cv_as_shf_merge" >&6; }
8ada417f 21891
c18a5b6c 21892if test $gcc_cv_as_shf_merge = no; then
5213506e
RW
21893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
21894$as_echo_n "checking assembler for section merging support... " >&6; }
21895if test "${gcc_cv_as_shf_merge+set}" = set; then :
21896 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21897else
21898 gcc_cv_as_shf_merge=no
21899 if test $in_tree_gas = yes; then
21900 if test $in_tree_gas_is_elf = yes \
21901 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21902 then gcc_cv_as_shf_merge=yes
21903fi
21904 elif test x$gcc_cv_as != x; then
21905 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
e0b0fd74 21906 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21907 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21908 (eval $ac_try) 2>&5
21909 ac_status=$?
5213506e
RW
21910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21911 test $ac_status = 0; }; }
c18a5b6c
MM
21912 then
21913 gcc_cv_as_shf_merge=yes
21914 else
21915 echo "configure: failed program was" >&5
21916 cat conftest.s >&5
21917 fi
21918 rm -f conftest.o conftest.s
21919 fi
21920fi
5213506e
RW
21921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
21922$as_echo "$gcc_cv_as_shf_merge" >&6; }
c18a5b6c
MM
21923
21924fi
8ad9fb33 21925
ba479fd2 21926cat >>confdefs.h <<_ACEOF
8ad9fb33 21927#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 21928_ACEOF
201556f0 21929
201556f0 21930
5213506e
RW
21931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21932$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21933if test "${gcc_cv_as_comdat_group+set}" = set; then :
21934 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21935else
21936 gcc_cv_as_comdat_group=no
21937 if test $in_tree_gas = yes; then
21938 if test $in_tree_gas_is_elf = yes \
11176d2a 21939 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21940 then gcc_cv_as_comdat_group=yes
21941fi
21942 elif test x$gcc_cv_as != x; then
21943 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
e0b0fd74 21944 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21945 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21946 (eval $ac_try) 2>&5
21947 ac_status=$?
5213506e
RW
21948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21949 test $ac_status = 0; }; }
c18a5b6c
MM
21950 then
21951 gcc_cv_as_comdat_group=yes
21952 else
21953 echo "configure: failed program was" >&5
21954 cat conftest.s >&5
21955 fi
21956 rm -f conftest.o conftest.s
21957 fi
21958fi
5213506e
RW
21959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5
21960$as_echo "$gcc_cv_as_comdat_group" >&6; }
c18a5b6c
MM
21961
21962if test $gcc_cv_as_comdat_group = yes; then
21963 gcc_cv_as_comdat_group_percent=no
21964else
5213506e
RW
21965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support" >&5
21966$as_echo_n "checking assembler for COMDAT group support... " >&6; }
21967if test "${gcc_cv_as_comdat_group_percent+set}" = set; then :
21968 $as_echo_n "(cached) " >&6
c18a5b6c
MM
21969else
21970 gcc_cv_as_comdat_group_percent=no
21971 if test $in_tree_gas = yes; then
21972 if test $in_tree_gas_is_elf = yes \
11176d2a 21973 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21974 then gcc_cv_as_comdat_group_percent=yes
21975fi
21976 elif test x$gcc_cv_as != x; then
21977 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
e0b0fd74 21978 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
5213506e 21979 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c18a5b6c
MM
21980 (eval $ac_try) 2>&5
21981 ac_status=$?
5213506e
RW
21982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21983 test $ac_status = 0; }; }
c18a5b6c
MM
21984 then
21985 gcc_cv_as_comdat_group_percent=yes
21986 else
21987 echo "configure: failed program was" >&5
21988 cat conftest.s >&5
21989 fi
21990 rm -f conftest.o conftest.s
21991 fi
21992fi
5213506e
RW
21993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5
21994$as_echo "$gcc_cv_as_comdat_group_percent" >&6; }
c18a5b6c
MM
21995
21996fi
1dcc82c2
DK
21997if test x"$ld_is_gold" = xyes; then
21998 comdat_group=yes
21999elif test $in_tree_ld = yes ; then
39ba7b7d
JB
22000 comdat_group=no
22001 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 \
22002 && test $in_tree_ld_is_elf = yes; then
22003 comdat_group=yes
22004 fi
55c4f715 22005elif echo "$ld_ver" | grep GNU > /dev/null; then
11176d2a
JB
22006 comdat_group=yes
22007 if test 0"$ld_date" -lt 20050308; then
22008 if test -n "$ld_date"; then
22009 # If there was date string, but was earlier than 2005-03-08, fail
22010 comdat_group=no
22011 elif test "$ld_vers_major" -lt 2; then
22012 comdat_group=no
22013 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
22014 comdat_group=no
22015 fi
22016 fi
1cf0118d 22017else
55c4f715
RO
22018 case "${target}" in
22019 *-*-solaris2.1[1-9]*)
22020 # Sun ld has COMDAT group support since Solaris 9, but it doesn't
22021 # interoperate with GNU as until Solaris 11 build 130, i.e. ld
22022 # version 1.688.
22023 #
22024 # FIXME: Maybe need to refine later when COMDAT group support with
22025 # Sun as is implemented.
22026 if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 1688; then
22027 comdat_group=yes
22028 else
22029 comdat_group=no
22030 fi
22031 ;;
22032 *)
22033 # Assume linkers other than GNU ld don't support COMDAT group.
22034 comdat_group=no
22035 ;;
22036 esac
22037fi
22038# Allow overriding the automatic COMDAT group tests above.
22039# Check whether --enable-comdat was given.
22040if test "${enable_comdat+set}" = set; then :
22041 enableval=$enable_comdat; comdat_group="$enable_comdat"
1cf0118d 22042fi
55c4f715 22043
1cf0118d
RO
22044if test $comdat_group = no; then
22045 gcc_cv_as_comdat_group=no
22046 gcc_cv_as_comdat_group_percent=no
11176d2a 22047fi
c18a5b6c
MM
22048
22049cat >>confdefs.h <<_ACEOF
11176d2a 22050#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
22051_ACEOF
22052
22053
5213506e
RW
22054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for line table discriminator support" >&5
22055$as_echo_n "checking assembler for line table discriminator support... " >&6; }
22056if test "${gcc_cv_as_discriminator+set}" = set; then :
22057 $as_echo_n "(cached) " >&6
6c52e687
CC
22058else
22059 gcc_cv_as_discriminator=no
22060 if test $in_tree_gas = yes; then
22061 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 51`
22062 then gcc_cv_as_discriminator=yes
22063fi
22064 elif test x$gcc_cv_as != x; then
22065 echo ' .text
22066 .file 1 "conf.c"
22067 .loc 1 1 0 discriminator 1' > conftest.s
e0b0fd74 22068 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22069 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6c52e687
CC
22070 (eval $ac_try) 2>&5
22071 ac_status=$?
5213506e
RW
22072 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22073 test $ac_status = 0; }; }
6c52e687
CC
22074 then
22075 gcc_cv_as_discriminator=yes
22076 else
22077 echo "configure: failed program was" >&5
22078 cat conftest.s >&5
22079 fi
22080 rm -f conftest.o conftest.s
22081 fi
22082fi
5213506e
RW
22083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_discriminator" >&5
22084$as_echo "$gcc_cv_as_discriminator" >&6; }
6c52e687
CC
22085if test $gcc_cv_as_discriminator = yes; then
22086
5213506e 22087$as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h
6c52e687
CC
22088
22089fi
22090
6a7a462c 22091# Thread-local storage - the check is heavily parameterized.
f996902d
RH
22092conftest_s=
22093tls_first_major=
22094tls_first_minor=
9739c90c 22095tls_as_opt=
f996902d 22096case "$target" in
6f9b006d
RH
22097 alpha*-*-*)
22098 conftest_s='
22099 .section ".tdata","awT",@progbits
22100foo: .long 25
22101 .text
22102 ldq $27,__tls_get_addr($29) !literal!1
22103 lda $16,foo($29) !tlsgd!1
22104 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
22105 ldq $27,__tls_get_addr($29) !literal!2
22106 lda $16,foo($29) !tlsldm!2
22107 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
22108 ldq $1,foo($29) !gotdtprel
22109 ldah $2,foo($29) !dtprelhi
22110 lda $3,foo($2) !dtprello
22111 lda $4,foo($29) !dtprel
22112 ldq $1,foo($29) !gottprel
22113 ldah $2,foo($29) !tprelhi
22114 lda $3,foo($2) !tprello
22115 lda $4,foo($29) !tprel'
22116 tls_first_major=2
22117 tls_first_minor=13
2f3321ca 22118 tls_as_opt=--fatal-warnings
6f9b006d 22119 ;;
ad9646c7
HPN
22120 cris-*-*|crisv32-*-*)
22121 conftest_s='
22122 .section ".tdata","awT",@progbits
22123x: .long 25
22124 .text
22125 move.d x:IE,$r10
22126 nop'
22127 tls_first_major=2
22128 tls_first_minor=20
22129 tls_as_opt=--fatal-warnings
22130 ;;
e4dd71de
AH
22131 frv*-*-*)
22132 conftest_s='
22133 .section ".tdata","awT",@progbits
22134x: .long 25
22135 .text
22136 call #gettlsoff(x)'
22137 tls_first_major=2
22138 tls_first_minor=14
22139 ;;
51076f96
RC
22140 hppa*-*-linux*)
22141 conftest_s='
22142t1: .reg %r20
22143t2: .reg %r21
22144gp: .reg %r19
22145 .section ".tdata","awT",@progbits
22146foo: .long 25
22147 .text
22148 .align 4
22149 addil LT%foo-$tls_gdidx$,gp
22150 ldo RT%foo-$tls_gdidx$(%r1),%arg0
22151 b __tls_get_addr
22152 nop
22153 addil LT%foo-$tls_ldidx$,gp
22154 b __tls_get_addr
22155 ldo RT%foo-$tls_ldidx$(%r1),%arg0
22156 addil LR%foo-$tls_dtpoff$,%ret0
22157 ldo RR%foo-$tls_dtpoff$(%r1),%t1
22158 mfctl %cr27,%t1
22159 addil LT%foo-$tls_ieoff$,gp
22160 ldw RT%foo-$tls_ieoff$(%r1),%t2
22161 add %t1,%t2,%t3
22162 mfctl %cr27,%t1
22163 addil LR%foo-$tls_leoff$,%t1
22164 ldo RR%foo-$tls_leoff$(%r1),%t2'
22165 tls_first_major=2
22166 tls_first_minor=15
22167 tls_as_opt=--fatal-warnings
22168 ;;
d3585b76
DJ
22169 arm*-*-*)
22170 conftest_s='
22171 .section ".tdata","awT",%progbits
22172foo: .long 25
22173 .text
22174.word foo(gottpoff)
22175.word foo(tpoff)
22176.word foo(tlsgd)
22177.word foo(tlsldm)
22178.word foo(tlsldo)'
22179 tls_first_major=2
22180 tls_first_minor=17
22181 ;;
f996902d 22182 i[34567]86-*-*)
f1c26cad 22183 case "$target" in
f1c26cad
RO
22184 i[34567]86-*-solaris2.*)
22185 on_solaris=yes
16c9d3b1 22186 tga_func=___tls_get_addr
f1c26cad
RO
22187 ;;
22188 *)
22189 on_solaris=no
22190 ;;
22191 esac
22192 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22193 conftest_s='
22194 .section .tdata,"awt",@progbits'
22195 tls_first_major=0
22196 tls_first_minor=0
22197
22198$as_echo "#define TLS_SECTION_ASM_FLAG 't'" >>confdefs.h
22199
22200 else
22201 conftest_s='
22202 .section ".tdata","awT",@progbits'
22203 tls_first_major=2
22204 tls_first_minor=14
22205 tls_as_opt="--fatal-warnings"
22206 fi
22207 conftest_s="$conftest_s
f996902d
RH
22208foo: .long 25
22209 .text
22210 movl %gs:0, %eax
f1c26cad
RO
22211 leal foo@tlsgd(,%ebx,1), %eax
22212 leal foo@tlsldm(%ebx), %eax
22213 leal foo@dtpoff(%eax), %edx
22214 movl foo@gottpoff(%ebx), %eax
22215 subl foo@gottpoff(%ebx), %eax
22216 addl foo@gotntpoff(%ebx), %eax
22217 movl foo@indntpoff, %eax
22218 movl \$foo@tpoff, %eax
22219 subl \$foo@tpoff, %eax
22220 leal foo@ntpoff(%ecx), %eax"
22221 ;;
75d38379
JJ
22222 x86_64-*-*)
22223 conftest_s='
22224 .section ".tdata","awT",@progbits
22225foo: .long 25
22226 .text
22227 movq %fs:0, %rax
22228 leaq foo@TLSGD(%rip), %rdi
22229 leaq foo@TLSLD(%rip), %rdi
22230 leaq foo@DTPOFF(%rax), %rdx
22231 movq foo@GOTTPOFF(%rip), %rax
22232 movq $foo@TPOFF, %rax'
22233 tls_first_major=2
22234 tls_first_minor=14
2f3321ca 22235 tls_as_opt=--fatal-warnings
f996902d 22236 ;;
7b6e506e
RH
22237 ia64-*-*)
22238 conftest_s='
22239 .section ".tdata","awT",@progbits
22240foo: data8 25
22241 .text
22242 addl r16 = @ltoff(@dtpmod(foo#)), gp
22243 addl r17 = @ltoff(@dtprel(foo#)), gp
22244 addl r18 = @ltoff(@tprel(foo#)), gp
22245 addl r19 = @dtprel(foo#), gp
22246 adds r21 = @dtprel(foo#), r13
22247 movl r23 = @dtprel(foo#)
22248 addl r20 = @tprel(foo#), gp
22249 adds r22 = @tprel(foo#), r13
22250 movl r24 = @tprel(foo#)'
22251 tls_first_major=2
22252 tls_first_minor=13
2f3321ca 22253 tls_as_opt=--fatal-warnings
7b6e506e 22254 ;;
69229b81
DJ
22255 mips*-*-*)
22256 conftest_s='
22257 .section .tdata,"awT",@progbits
22258x:
22259 .word 2
22260 .text
22261 addiu $4, $28, %tlsgd(x)
22262 addiu $4, $28, %tlsldm(x)
22263 lui $4, %dtprel_hi(x)
22264 addiu $4, $4, %dtprel_lo(x)
22265 lw $4, %gottprel(x)($28)
22266 lui $4, %tprel_hi(x)
22267 addiu $4, $4, %tprel_lo(x)'
22268 tls_first_major=2
22269 tls_first_minor=16
22270 tls_as_opt='-32 --fatal-warnings'
22271 ;;
75df395f
MK
22272 m68k-*-*)
22273 conftest_s='
22274 .section .tdata,"awT",@progbits
22275x:
22276 .word 2
22277 .text
22278foo:
22279 move.l x@TLSGD(%a5),%a0
22280 move.l x@TLSLDM(%a5),%a0
22281 move.l x@TLSLDO(%a5),%a0
22282 move.l x@TLSIE(%a5),%a0
22283 move.l x@TLSLE(%a5),%a0'
22284 tls_first_major=2
22285 tls_first_minor=19
22286 tls_as_opt='--fatal-warnings'
22287 ;;
c4501e62
JJ
22288 powerpc-*-*)
22289 conftest_s='
22290 .section ".tdata","awT",@progbits
22291 .align 2
22292ld0: .space 4
22293ld1: .space 4
22294x1: .space 4
22295x2: .space 4
22296x3: .space 4
22297 .text
22298 addi 3,31,ld0@got@tlsgd
22299 bl __tls_get_addr
22300 addi 3,31,x1@got@tlsld
22301 bl __tls_get_addr
22302 addi 9,3,x1@dtprel
22303 addis 9,3,x2@dtprel@ha
22304 addi 9,9,x2@dtprel@l
22305 lwz 9,x3@got@tprel(31)
22306 add 9,9,x@tls
22307 addi 9,2,x1@tprel
22308 addis 9,2,x2@tprel@ha
22309 addi 9,9,x2@tprel@l'
22310 tls_first_major=2
22311 tls_first_minor=14
2f3321ca 22312 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
22313 ;;
22314 powerpc64-*-*)
22315 conftest_s='
22316 .section ".tdata","awT",@progbits
22317 .align 3
22318ld0: .space 8
22319ld1: .space 8
22320x1: .space 8
22321x2: .space 8
22322x3: .space 8
22323 .text
22324 addi 3,2,ld0@got@tlsgd
22325 bl .__tls_get_addr
22326 nop
22327 addi 3,2,ld1@toc
22328 bl .__tls_get_addr
22329 nop
22330 addi 3,2,x1@got@tlsld
22331 bl .__tls_get_addr
22332 nop
22333 addi 9,3,x1@dtprel
22334 bl .__tls_get_addr
22335 nop
22336 addis 9,3,x2@dtprel@ha
22337 addi 9,9,x2@dtprel@l
22338 bl .__tls_get_addr
22339 nop
22340 ld 9,x3@got@dtprel(2)
22341 add 9,9,3
22342 bl .__tls_get_addr
22343 nop'
22344 tls_first_major=2
22345 tls_first_minor=14
2f3321ca 22346 tls_as_opt="-a64 --fatal-warnings"
c4501e62 22347 ;;
fd3cd001
UW
22348 s390-*-*)
22349 conftest_s='
22350 .section ".tdata","awT",@progbits
22351foo: .long 25
22352 .text
22353 .long foo@TLSGD
22354 .long foo@TLSLDM
22355 .long foo@DTPOFF
22356 .long foo@NTPOFF
22357 .long foo@GOTNTPOFF
22358 .long foo@INDNTPOFF
22359 l %r1,foo@GOTNTPOFF(%r12)
22360 l %r1,0(%r1):tls_load:foo
22361 bas %r14,0(%r1,%r13):tls_gdcall:foo
22362 bas %r14,0(%r1,%r13):tls_ldcall:foo'
22363 tls_first_major=2
22364 tls_first_minor=14
2f3321ca 22365 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
22366 ;;
22367 s390x-*-*)
22368 conftest_s='
22369 .section ".tdata","awT",@progbits
22370foo: .long 25
22371 .text
22372 .quad foo@TLSGD
22373 .quad foo@TLSLDM
22374 .quad foo@DTPOFF
22375 .quad foo@NTPOFF
22376 .quad foo@GOTNTPOFF
22377 lg %r1,foo@GOTNTPOFF(%r12)
22378 larl %r1,foo@INDNTPOFF
22379 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
22380 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
22381 tls_first_major=2
22382 tls_first_minor=14
2f3321ca 22383 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 22384 ;;
9ff13962
KK
22385 sh-*-* | sh[34]-*-*)
22386 conftest_s='
22387 .section ".tdata","awT",@progbits
22388foo: .long 25
22389 .text
22390 .long foo@TLSGD
22391 .long foo@TLSLDM
22392 .long foo@DTPOFF
22393 .long foo@GOTTPOFF
22394 .long foo@TPOFF'
22395 tls_first_major=2
22396 tls_first_minor=13
2f3321ca 22397 tls_as_opt=--fatal-warnings
9ff13962 22398 ;;
5751a10b 22399 sparc*-*-*)
2f3321ca
EB
22400 case "$target" in
22401 sparc*-sun-solaris2.*)
22402 on_solaris=yes
16c9d3b1 22403 tga_func=__tls_get_addr
2f3321ca
EB
22404 ;;
22405 *)
22406 on_solaris=no
22407 ;;
22408 esac
22409 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22410 conftest_s='
16c9d3b1 22411 .section ".tdata",#alloc,#write,#tls'
2f3321ca
EB
22412 tls_first_major=0
22413 tls_first_minor=0
22414 else
22415 conftest_s='
16c9d3b1
RO
22416 .section ".tdata","awT",@progbits'
22417 tls_first_major=2
22418 tls_first_minor=14
22419 tls_as_opt="-32 --fatal-warnings"
22420 fi
22421 conftest_s="$conftest_s
5751a10b
JJ
22422foo: .long 25
22423 .text
22424 sethi %tgd_hi22(foo), %o0
22425 add %o0, %tgd_lo10(foo), %o1
22426 add %l7, %o1, %o0, %tgd_add(foo)
22427 call __tls_get_addr, %tgd_call(foo)
22428 sethi %tldm_hi22(foo), %l1
22429 add %l1, %tldm_lo10(foo), %l2
22430 add %l7, %l2, %o0, %tldm_add(foo)
22431 call __tls_get_addr, %tldm_call(foo)
22432 sethi %tldo_hix22(foo), %l3
22433 xor %l3, %tldo_lox10(foo), %l4
22434 add %o0, %l4, %l5, %tldo_add(foo)
22435 sethi %tie_hi22(foo), %o3
22436 add %o3, %tie_lo10(foo), %o3
22437 ld [%l7 + %o3], %o2, %tie_ld(foo)
22438 add %g7, %o2, %o4, %tie_add(foo)
22439 sethi %tle_hix22(foo), %l1
22440 xor %l1, %tle_lox10(foo), %o5
16c9d3b1 22441 ld [%g7 + %o5], %o1"
5751a10b 22442 ;;
6a7a462c
BW
22443 xtensa*-*-*)
22444 conftest_s='
22445 .section ".tdata","awT",@progbits
22446foo: .long 25
22447 .text
22448 movi a8, foo@TLSFUNC
22449 movi a10, foo@TLSARG
22450 callx8.tls a8, foo@TLSCALL'
22451 tls_first_major=2
22452 tls_first_minor=19
22453 ;;
f996902d 22454esac
8dea1cca
DD
22455set_have_as_tls=no
22456if test "x$enable_tls" = xno ; then
22457 : # TLS explicitly disabled.
22458elif test "x$enable_tls" = xyes ; then
22459 set_have_as_tls=yes # TLS explicitly enabled.
22460elif test -z "$tls_first_major"; then
8ada417f
ZW
22461 : # If we don't have a check, assume no support.
22462else
5213506e
RW
22463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for thread-local storage support" >&5
22464$as_echo_n "checking assembler for thread-local storage support... " >&6; }
22465if test "${gcc_cv_as_tls+set}" = set; then :
22466 $as_echo_n "(cached) " >&6
8ada417f
ZW
22467else
22468 gcc_cv_as_tls=no
22469 if test $in_tree_gas = yes; then
22470 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
22471 then gcc_cv_as_tls=yes
ad9c4d9f 22472fi
8ada417f 22473 elif test x$gcc_cv_as != x; then
6e3f3080 22474 echo "$conftest_s" > conftest.s
e0b0fd74 22475 if { ac_try='$gcc_cv_as $gcc_cv_as_flags $tls_as_opt -o conftest.o conftest.s >&5'
5213506e 22476 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22477 (eval $ac_try) 2>&5
22478 ac_status=$?
5213506e
RW
22479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22480 test $ac_status = 0; }; }
8ada417f
ZW
22481 then
22482 gcc_cv_as_tls=yes
22483 else
22484 echo "configure: failed program was" >&5
22485 cat conftest.s >&5
22486 fi
22487 rm -f conftest.o conftest.s
f996902d 22488 fi
f996902d 22489fi
5213506e
RW
22490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_tls" >&5
22491$as_echo "$gcc_cv_as_tls" >&6; }
63cf211a 22492if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
22493 set_have_as_tls=yes
22494fi
22495fi
16c9d3b1
RO
22496case "$target" in
22497 # TLS was introduced in the Solaris 9 FCS release and backported to
22498 # Solaris 8 patches. Support for GNU-style TLS on x86 was only
22499 # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun
22500 # ld and GCC don't support any longer.
22501 *-*-solaris2.*)
22502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker and ld.so.1 TLS support" >&5
22503$as_echo_n "checking linker and ld.so.1 TLS support... " >&6; }
22504 ld_tls_support=no
22505 # Check ld and ld.so.1 TLS support.
22506 if echo "$ld_ver" | grep GNU > /dev/null; then
22507 # Assume all interesting versions of GNU ld have TLS support.
22508 # FIXME: still need ld.so.1 support, i.e. ld version checks below.
22509 ld_tls_support=yes
22510 else
22511 case "$target" in
22512 # Solaris 8/x86 ld has GNU style TLS support since version 1.280.
22513 i?86-*-solaris2.8)
22514 min_tls_ld_vers_minor=280
22515 ;;
22516 # Solaris 8/SPARC ld has TLS support since version 1.272.
22517 sparc*-*-solaris2.8)
22518 min_tls_ld_vers_minor=272
22519 ;;
22520 # Solaris 9/x86 ld has GNU style TLS support since version 1.374.
22521 i?86-*-solaris2.9)
22522 min_tls_ld_vers_minor=374
22523 ;;
22524 # Solaris 9/SPARC and Solaris 10+ ld have TLS support since FCS.
22525 sparc*-*-solaris2.9 | *-*-solaris2.1[0-9]*)
22526 min_tls_ld_vers_minor=343
22527 ;;
22528 esac
2b48f20d 22529 if test "$ld_vers_major" -gt 1 || \
16c9d3b1
RO
22530 test "$ld_vers_minor" -ge "$min_tls_ld_vers_minor"; then
22531 ld_tls_support=yes
22532 else
22533 set_have_as_tls=no
22534 fi
22535 fi
22536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_tls_support" >&5
22537$as_echo "$ld_tls_support" >&6; }
22538
22539 save_LIBS="$LIBS"
22540 save_LDFLAGS="$LDFLAGS"
22541 LIBS=
22542 LDFLAGS=
22543
22544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alternate thread library" >&5
22545$as_echo_n "checking alternate thread library... " >&6; }
22546 case "$target" in
22547 # TLS support was backported to Solaris 8 patches, but only lives in
22548 # the alternate thread library which became the default in Solaris 9.
22549 # We want to always use that, irrespective of TLS support.
22550 *-*-solaris2.8)
22551 # Take multilib subdir into account. There's no spec to handle
22552 # this. The 64 symlink exists since Solaris 8.
22553 lwp_dir=/usr/lib/lwp
22554 lwp_spec="-L$lwp_dir%{m64:/64} -R$lwp_dir%{m64:/64}"
22555 LDFLAGS="-L$lwp_dir -R$lwp_dir"
22556 ;;
22557 *-*-solaris2*)
22558 lwp_dir="none"
22559 lwp_spec=""
22560 ;;
22561 esac
22562 # Always define LIB_THREAD_LDFLAGS_SPEC, even without TLS support.
22563
22564cat >>confdefs.h <<_ACEOF
22565#define LIB_THREAD_LDFLAGS_SPEC "$lwp_spec"
22566_ACEOF
22567
22568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lwp_dir" >&5
22569$as_echo "$lwp_dir" >&6; }
22570
22571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking library containing $tga_func" >&5
22572$as_echo_n "checking library containing $tga_func... " >&6; }
22573 # Before Solaris 10, __tls_get_addr (SPARC/x64) resp. ___tls_get_addr
22574 # (32-bit x86) only lived in libthread, so check for that. Keep
22575 # set_have_as_tls if found, disable if not.
22576 as_ac_Search=`$as_echo "ac_cv_search_$tga_func" | $as_tr_sh`
22577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tga_func" >&5
22578$as_echo_n "checking for library containing $tga_func... " >&6; }
22579if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22580 $as_echo_n "(cached) " >&6
22581else
22582 ac_func_search_save_LIBS=$LIBS
22583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22584/* end confdefs.h. */
22585
22586/* Override any GCC internal prototype to avoid an error.
22587 Use char because int might match the return type of a GCC
22588 builtin and then its argument prototype would still apply. */
22589#ifdef __cplusplus
22590extern "C"
22591#endif
22592char $tga_func ();
22593int
22594main ()
22595{
22596return $tga_func ();
22597 ;
22598 return 0;
22599}
22600_ACEOF
22601for ac_lib in '' thread; do
22602 if test -z "$ac_lib"; then
22603 ac_res="none required"
22604 else
22605 ac_res=-l$ac_lib
22606 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22607 fi
22608 if ac_fn_c_try_link "$LINENO"; then :
22609 eval "$as_ac_Search=\$ac_res"
22610fi
22611rm -f core conftest.err conftest.$ac_objext \
22612 conftest$ac_exeext
22613 if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22614 break
22615fi
22616done
22617if { as_var=$as_ac_Search; eval "test \"\${$as_var+set}\" = set"; }; then :
22618
22619else
22620 eval "$as_ac_Search=no"
22621fi
22622rm conftest.$ac_ext
22623LIBS=$ac_func_search_save_LIBS
22624fi
22625eval ac_res=\$$as_ac_Search
22626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22627$as_echo "$ac_res" >&6; }
22628eval ac_res=\$$as_ac_Search
22629if test "$ac_res" != no; then :
22630 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22631
22632else
22633 set_have_as_tls=no
22634fi
22635
22636 # Clear LIBS if we cannot support TLS.
22637 if test $set_have_as_tls = no; then
22638 LIBS=
22639 fi
22640 # Always define LIB_TLS_SPEC, even without TLS support.
22641
22642cat >>confdefs.h <<_ACEOF
22643#define LIB_TLS_SPEC "$LIBS"
22644_ACEOF
22645
22646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBS" >&5
22647$as_echo "$LIBS" >&6; }
22648
22649 LIBS="$save_LIBS"
22650 LDFLAGS="$save_LDFLAGS"
22651 ;;
22652esac
8dea1cca 22653if test $set_have_as_tls = yes ; then
ba479fd2 22654
5213506e 22655$as_echo "#define HAVE_AS_TLS 1" >>confdefs.h
f996902d 22656
8ada417f
ZW
22657fi
22658
22659# Target-specific assembler checks.
f996902d 22660
5213506e
RW
22661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker -Bstatic/-Bdynamic option" >&5
22662$as_echo_n "checking linker -Bstatic/-Bdynamic option... " >&6; }
7e9d8517
L
22663gcc_cv_ld_static_dynamic=no
22664if test $in_tree_ld = yes ; then
83f0ccb8 22665 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
22666 gcc_cv_ld_static_dynamic=yes
22667 fi
22668elif test x$gcc_cv_ld != x; then
22669 # Check if linker supports -Bstatic/-Bdynamic option
22670 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
22671 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
22672 gcc_cv_ld_static_dynamic=yes
22673 fi
22674fi
22675if test x"$gcc_cv_ld_static_dynamic" = xyes; then
22676
5213506e 22677$as_echo "#define HAVE_LD_STATIC_DYNAMIC 1" >>confdefs.h
7e9d8517
L
22678
22679fi
5213506e
RW
22680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_static_dynamic" >&5
22681$as_echo "$gcc_cv_ld_static_dynamic" >&6; }
7e9d8517 22682
d594623a 22683if test x"$demangler_in_ld" = xyes; then
5213506e
RW
22684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --demangle support" >&5
22685$as_echo_n "checking linker --demangle support... " >&6; }
d594623a
L
22686 gcc_cv_ld_demangle=no
22687 if test $in_tree_ld = yes; then
22688 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 \
22689 gcc_cv_ld_demangle=yes
22690 fi
22691 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
22692 # Check if the GNU linker supports --demangle option
22693 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
22694 gcc_cv_ld_demangle=yes
22695 fi
22696 fi
22697 if test x"$gcc_cv_ld_demangle" = xyes; then
22698
5213506e 22699$as_echo "#define HAVE_LD_DEMANGLE 1" >>confdefs.h
d594623a
L
22700
22701 fi
5213506e
RW
22702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_demangle" >&5
22703$as_echo "$gcc_cv_ld_demangle" >&6; }
d594623a
L
22704fi
22705
3a37b08e
RH
22706case "$target" in
22707 # All TARGET_ABI_OSF targets.
22708 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
5213506e
RW
22709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
22710$as_echo_n "checking assembler for explicit relocation support... " >&6; }
22711if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then :
22712 $as_echo_n "(cached) " >&6
3a37b08e 22713else
8ada417f
ZW
22714 gcc_cv_as_alpha_explicit_relocs=no
22715 if test $in_tree_gas = yes; then
22716 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
22717 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 22718fi
8ada417f 22719 elif test x$gcc_cv_as != x; then
6e3f3080 22720 echo ' .set nomacro
3a37b08e
RH
22721 .text
22722 extbl $3, $2, $3 !lituse_bytoff!1
22723 ldq $2, a($29) !literal!1
22724 ldq $4, b($29) !literal!2
22725 ldq_u $3, 0($2) !lituse_base!1
22726 ldq $27, f($29) !literal!5
22727 jsr $26, ($27), f !lituse_jsr!5
22728 ldah $29, 0($26) !gpdisp!3
22729 lda $0, c($29) !gprel
22730 ldah $1, d($29) !gprelhigh
22731 lda $1, d($1) !gprellow
8ada417f 22732 lda $29, 0($29) !gpdisp!3' > conftest.s
e0b0fd74 22733 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22734 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22735 (eval $ac_try) 2>&5
22736 ac_status=$?
5213506e
RW
22737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22738 test $ac_status = 0; }; }
8ada417f
ZW
22739 then
22740 gcc_cv_as_alpha_explicit_relocs=yes
22741 else
22742 echo "configure: failed program was" >&5
22743 cat conftest.s >&5
22744 fi
22745 rm -f conftest.o conftest.s
22746 fi
cafe096b 22747fi
5213506e
RW
22748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_explicit_relocs" >&5
22749$as_echo "$gcc_cv_as_alpha_explicit_relocs" >&6; }
63cf211a 22750if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2 22751
5213506e 22752$as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h
3a37b08e 22753
d006f5eb 22754fi
5213506e
RW
22755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5
22756$as_echo_n "checking assembler for jsrdirect relocation support... " >&6; }
22757if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then :
22758 $as_echo_n "(cached) " >&6
d006f5eb
RH
22759else
22760 gcc_cv_as_alpha_jsrdirect_relocs=no
22761 if test $in_tree_gas = yes; then
22762 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
22763 then gcc_cv_as_alpha_jsrdirect_relocs=yes
22764fi
22765 elif test x$gcc_cv_as != x; then
22766 echo ' .set nomacro
22767 .text
22768 ldq $27, a($29) !literal!1
22769 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
e0b0fd74 22770 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22771 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d006f5eb
RH
22772 (eval $ac_try) 2>&5
22773 ac_status=$?
5213506e
RW
22774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22775 test $ac_status = 0; }; }
d006f5eb
RH
22776 then
22777 gcc_cv_as_alpha_jsrdirect_relocs=yes
22778 else
22779 echo "configure: failed program was" >&5
22780 cat conftest.s >&5
22781 fi
22782 rm -f conftest.o conftest.s
22783 fi
22784fi
5213506e
RW
22785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
22786$as_echo "$gcc_cv_as_alpha_jsrdirect_relocs" >&6; }
d006f5eb
RH
22787if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
22788
5213506e 22789$as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h
d006f5eb 22790
86da66b5
HPN
22791fi
22792 ;;
22793
22794 cris-*-*)
5213506e
RW
22795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -no-mul-bug-abort option" >&5
22796$as_echo_n "checking assembler for -no-mul-bug-abort option... " >&6; }
22797if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then :
22798 $as_echo_n "(cached) " >&6
86da66b5
HPN
22799else
22800 gcc_cv_as_cris_no_mul_bug=no
22801 if test $in_tree_gas = yes; then
22802 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
22803 then gcc_cv_as_cris_no_mul_bug=yes
22804fi
22805 elif test x$gcc_cv_as != x; then
22806 echo '.text' > conftest.s
e0b0fd74 22807 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -no-mul-bug-abort -o conftest.o conftest.s >&5'
5213506e 22808 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
86da66b5
HPN
22809 (eval $ac_try) 2>&5
22810 ac_status=$?
5213506e
RW
22811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22812 test $ac_status = 0; }; }
86da66b5
HPN
22813 then
22814 gcc_cv_as_cris_no_mul_bug=yes
22815 else
22816 echo "configure: failed program was" >&5
22817 cat conftest.s >&5
22818 fi
22819 rm -f conftest.o conftest.s
22820 fi
22821fi
5213506e
RW
22822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cris_no_mul_bug" >&5
22823$as_echo "$gcc_cv_as_cris_no_mul_bug" >&6; }
86da66b5
HPN
22824if test $gcc_cv_as_cris_no_mul_bug = yes; then
22825
5213506e 22826$as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h
86da66b5 22827
8ada417f 22828fi
3a37b08e 22829 ;;
8ada417f 22830
1cb36a98 22831 sparc*-*-*)
5213506e
RW
22832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .register" >&5
22833$as_echo_n "checking assembler for .register... " >&6; }
22834if test "${gcc_cv_as_sparc_register_op+set}" = set; then :
22835 $as_echo_n "(cached) " >&6
5b68c389 22836else
8ada417f
ZW
22837 gcc_cv_as_sparc_register_op=no
22838 if test x$gcc_cv_as != x; then
6e3f3080 22839 echo '.register %g2, #scratch' > conftest.s
e0b0fd74 22840 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 22841 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22842 (eval $ac_try) 2>&5
22843 ac_status=$?
5213506e
RW
22844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22845 test $ac_status = 0; }; }
8ada417f
ZW
22846 then
22847 gcc_cv_as_sparc_register_op=yes
22848 else
22849 echo "configure: failed program was" >&5
22850 cat conftest.s >&5
22851 fi
22852 rm -f conftest.o conftest.s
22853 fi
cafe096b 22854fi
5213506e
RW
22855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_register_op" >&5
22856$as_echo "$gcc_cv_as_sparc_register_op" >&6; }
63cf211a 22857if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2 22858
5213506e 22859$as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
1cb36a98 22860
8ada417f 22861fi
1cb36a98 22862
5213506e
RW
22863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5
22864$as_echo_n "checking assembler for -relax option... " >&6; }
22865if test "${gcc_cv_as_sparc_relax+set}" = set; then :
22866 $as_echo_n "(cached) " >&6
e95b1e6a 22867else
8ada417f
ZW
22868 gcc_cv_as_sparc_relax=no
22869 if test x$gcc_cv_as != x; then
6e3f3080 22870 echo '.text' > conftest.s
e0b0fd74 22871 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -relax -o conftest.o conftest.s >&5'
5213506e 22872 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22873 (eval $ac_try) 2>&5
22874 ac_status=$?
5213506e
RW
22875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22876 test $ac_status = 0; }; }
8ada417f
ZW
22877 then
22878 gcc_cv_as_sparc_relax=yes
22879 else
22880 echo "configure: failed program was" >&5
22881 cat conftest.s >&5
22882 fi
22883 rm -f conftest.o conftest.s
22884 fi
cafe096b 22885fi
5213506e
RW
22886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_relax" >&5
22887$as_echo "$gcc_cv_as_sparc_relax" >&6; }
63cf211a 22888if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2 22889
5213506e 22890$as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h
e95b1e6a 22891
878ee0ab
DM
22892fi
22893
22894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5
22895$as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; }
22896if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then :
22897 $as_echo_n "(cached) " >&6
22898else
22899 gcc_cv_as_sparc_gotdata_op=no
22900 if test x$gcc_cv_as != x; then
22901 echo '.text
22902foo:
22903 nop
22904bar:
22905 sethi %gdop_hix22(foo), %g1
22906 xor %g1, %gdop_lox10(foo), %g1
22907 ld [%l7 + %g1], %g2, %gdop(foo)' > conftest.s
22908 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
22909 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
22910 (eval $ac_try) 2>&5
22911 ac_status=$?
22912 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22913 test $ac_status = 0; }; }
22914 then
22915 if test x$gcc_cv_ld != x \
46bc665f
DM
22916 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22917 if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then
22918 if test x$gcc_cv_objdump != x; then
22919 if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \
22920 | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then
22921 gcc_cv_as_sparc_gotdata_op=no
22922 else
22923 gcc_cv_as_sparc_gotdata_op=yes
22924 fi
22925 fi
22926 else
22927 gcc_cv_as_sparc_gotdata_op=yes
22928 fi
878ee0ab
DM
22929 fi
22930 rm -f conftest
22931 else
22932 echo "configure: failed program was" >&5
22933 cat conftest.s >&5
22934 fi
22935 rm -f conftest.o conftest.s
22936 fi
22937fi
22938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_gotdata_op" >&5
22939$as_echo "$gcc_cv_as_sparc_gotdata_op" >&6; }
22940if test $gcc_cv_as_sparc_gotdata_op = yes; then
22941
22942$as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h
22943
8ada417f 22944fi
e95b1e6a 22945
5213506e
RW
22946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5
22947$as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; }
22948if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then :
22949 $as_echo_n "(cached) " >&6
17e9e88c 22950else
8ada417f
ZW
22951 gcc_cv_as_sparc_ua_pcrel=no
22952 if test x$gcc_cv_as != x; then
6e3f3080 22953 echo '.text
8ada417f
ZW
22954foo:
22955 nop
22956.data
22957.align 4
22958.byte 0
22959.uaword %r_disp32(foo)' > conftest.s
e0b0fd74 22960 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
5213506e 22961 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
22962 (eval $ac_try) 2>&5
22963 ac_status=$?
5213506e
RW
22964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22965 test $ac_status = 0; }; }
8ada417f
ZW
22966 then
22967 if test x$gcc_cv_ld != x \
22968 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22969 gcc_cv_as_sparc_ua_pcrel=yes
22970 fi
22971 rm -f conftest
22972 else
22973 echo "configure: failed program was" >&5
22974 cat conftest.s >&5
22975 fi
22976 rm -f conftest.o conftest.s
22977 fi
cafe096b 22978fi
5213506e
RW
22979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel" >&5
22980$as_echo "$gcc_cv_as_sparc_ua_pcrel" >&6; }
63cf211a 22981if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2 22982
5213506e 22983$as_echo "#define HAVE_AS_SPARC_UA_PCREL 1" >>confdefs.h
17e9e88c 22984
17e9e88c 22985
5213506e
RW
22986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
22987$as_echo_n "checking assembler for unaligned pcrel relocs against hidden symbols... " >&6; }
22988if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then :
22989 $as_echo_n "(cached) " >&6
cf7b8b0d 22990else
8ada417f
ZW
22991 gcc_cv_as_sparc_ua_pcrel_hidden=no
22992 if test x$gcc_cv_as != x; then
6e3f3080 22993 echo '.data
8ada417f
ZW
22994.align 4
22995.byte 0x31
22996.uaword %r_disp32(foo)
22997.byte 0x32, 0x33, 0x34
22998.global foo
22999.hidden foo
23000foo:
23001.skip 4' > conftest.s
e0b0fd74 23002 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -K PIC -o conftest.o conftest.s >&5'
5213506e 23003 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23004 (eval $ac_try) 2>&5
23005 ac_status=$?
5213506e
RW
23006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23007 test $ac_status = 0; }; }
8ada417f
ZW
23008 then
23009 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
23010 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
23011 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
23012 | grep ' 31000000 07323334' > /dev/null 2>&1; then
23013 if $gcc_cv_objdump -R conftest 2> /dev/null \
23014 | grep 'DISP32' > /dev/null 2>&1; then
23015 :
23016 else
23017 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 23018 fi
8ada417f
ZW
23019 fi
23020 rm -f conftest
23021 else
23022 echo "configure: failed program was" >&5
23023 cat conftest.s >&5
23024 fi
23025 rm -f conftest.o conftest.s
23026 fi
cafe096b 23027fi
5213506e
RW
23028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
23029$as_echo "$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; }
63cf211a 23030if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2 23031
5213506e 23032$as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h
cf7b8b0d 23033
8ada417f 23034fi
ba479fd2 23035
8ada417f 23036fi # unaligned pcrel relocs
cf7b8b0d 23037
5213506e
RW
23038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5
23039$as_echo_n "checking assembler for offsetable %lo()... " >&6; }
23040if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then :
23041 $as_echo_n "(cached) " >&6
5b68c389 23042else
8ada417f
ZW
23043 gcc_cv_as_sparc_offsetable_lo10=no
23044 if test x$gcc_cv_as != x; then
6e3f3080 23045 echo '.text
8ada417f
ZW
23046 or %g1, %lo(ab) + 12, %g1
23047 or %g1, %lo(ab + 12), %g1' > conftest.s
e0b0fd74 23048 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xarch=v9 -o conftest.o conftest.s >&5'
5213506e 23049 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23050 (eval $ac_try) 2>&5
23051 ac_status=$?
5213506e
RW
23052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23053 test $ac_status = 0; }; }
8ada417f
ZW
23054 then
23055 if test x$gcc_cv_objdump != x \
ecb0ccbc 23056 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 23057 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 23058 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
23059 fi
23060 else
23061 echo "configure: failed program was" >&5
23062 cat conftest.s >&5
23063 fi
23064 rm -f conftest.o conftest.s
23065 fi
cafe096b 23066fi
5213506e
RW
23067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
23068$as_echo "$gcc_cv_as_sparc_offsetable_lo10" >&6; }
63cf211a 23069if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2 23070
5213506e 23071$as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h
1cb36a98 23072
8ada417f 23073fi
1cb36a98
RH
23074 ;;
23075
c307e6dd 23076 i[34567]86-*-* | x86_64-*-*)
f7e413e2
DK
23077 case $target_os in
23078 cygwin*)
23079 # Full C++ conformance when using a shared libstdc++-v3 requires some
23080 # support from the Cygwin DLL, which in more recent versions exports
23081 # wrappers to aid in interposing and redirecting operators new, delete,
23082 # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we
23083 # are configuring for a version of Cygwin that exports the wrappers.
23084 if test x$host = x$target; then
23085 ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj"
23086if test "x$ac_cv_func___wrap__Znaj" = x""yes; then :
23087 gcc_ac_cygwin_dll_wrappers=yes
23088else
23089 gcc_ac_cygwin_dll_wrappers=no
23090fi
23091
23092 else
23093 # Can't check presence of libc functions during cross-compile, so
23094 # we just have to assume we're building for an up-to-date target.
23095 gcc_ac_cygwin_dll_wrappers=yes
23096 fi
23097
23098cat >>confdefs.h <<_ACEOF
23099#define USE_CYGWIN_LIBSTDCXX_WRAPPERS `if test $gcc_ac_cygwin_dll_wrappers = yes; then echo 1; else echo 0; fi`
23100_ACEOF
23101
23102 esac
d38bc601
BF
23103 case $target_os in
23104 cygwin* | pe | mingw32*)
233215fe
DK
23105 # Recent binutils allows the three-operand form of ".comm" on PE. This
23106 # definition is used unconditionally to initialise the default state of
23107 # the target option variable that governs usage of the feature.
5213506e
RW
23108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .comm with alignment" >&5
23109$as_echo_n "checking assembler for .comm with alignment... " >&6; }
23110if test "${gcc_cv_as_comm_has_align+set}" = set; then :
23111 $as_echo_n "(cached) " >&6
233215fe
DK
23112else
23113 gcc_cv_as_comm_has_align=no
23114 if test $in_tree_gas = yes; then
23115 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
23116 then gcc_cv_as_comm_has_align=yes
23117fi
23118 elif test x$gcc_cv_as != x; then
23119 echo '.comm foo,1,32' > conftest.s
e0b0fd74 23120 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23121 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
233215fe
DK
23122 (eval $ac_try) 2>&5
23123 ac_status=$?
5213506e
RW
23124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23125 test $ac_status = 0; }; }
233215fe
DK
23126 then
23127 gcc_cv_as_comm_has_align=yes
23128 else
23129 echo "configure: failed program was" >&5
23130 cat conftest.s >&5
23131 fi
23132 rm -f conftest.o conftest.s
23133 fi
23134fi
5213506e
RW
23135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comm_has_align" >&5
23136$as_echo "$gcc_cv_as_comm_has_align" >&6; }
233215fe
DK
23137
23138
23139cat >>confdefs.h <<_ACEOF
23140#define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi`
23141_ACEOF
23142
d38bc601 23143 # Used for DWARF 2 in PE
5213506e
RW
23144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .secrel32 relocs" >&5
23145$as_echo_n "checking assembler for .secrel32 relocs... " >&6; }
23146if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then :
23147 $as_echo_n "(cached) " >&6
d38bc601
BF
23148else
23149 gcc_cv_as_ix86_pe_secrel32=no
23150 if test $in_tree_gas = yes; then
23151 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
23152 then gcc_cv_as_ix86_pe_secrel32=yes
23153fi
23154 elif test x$gcc_cv_as != x; then
23155 echo '.text
23156foo: nop
23157.data
23158 .secrel32 foo' > conftest.s
e0b0fd74 23159 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23160 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d38bc601
BF
23161 (eval $ac_try) 2>&5
23162 ac_status=$?
5213506e
RW
23163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23164 test $ac_status = 0; }; }
d38bc601
BF
23165 then
23166 if test x$gcc_cv_ld != x \
23167 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
23168 gcc_cv_as_ix86_pe_secrel32=yes
23169 fi
23170 rm -f conftest
23171 else
23172 echo "configure: failed program was" >&5
23173 cat conftest.s >&5
23174 fi
23175 rm -f conftest.o conftest.s
23176 fi
23177fi
5213506e
RW
23178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_pe_secrel32" >&5
23179$as_echo "$gcc_cv_as_ix86_pe_secrel32" >&6; }
d38bc601
BF
23180if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
23181
5213506e 23182$as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h
d38bc601
BF
23183
23184fi
3bec79c5
DK
23185 # Test if the assembler supports the extended form of the .section
23186 # directive that specifies section alignment. LTO support uses this,
23187 # but normally only after installation, so we warn but don't fail the
23188 # configure if LTO is enabled but the assembler does not support it.
23189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with alignment" >&5
23190$as_echo_n "checking assembler for .section with alignment... " >&6; }
23191if test "${gcc_cv_as_section_has_align+set}" = set; then :
23192 $as_echo_n "(cached) " >&6
23193else
23194 gcc_cv_as_section_has_align=no
23195 if test $in_tree_gas = yes; then
23196 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 1`
23197 then gcc_cv_as_section_has_align=yes
23198fi
23199 elif test x$gcc_cv_as != x; then
23200 echo '.section lto_test,"dr0"' > conftest.s
23201 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -fatal-warnings -o conftest.o conftest.s >&5'
23202 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23203 (eval $ac_try) 2>&5
23204 ac_status=$?
23205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23206 test $ac_status = 0; }; }
23207 then
23208 gcc_cv_as_section_has_align=yes
23209 else
23210 echo "configure: failed program was" >&5
23211 cat conftest.s >&5
23212 fi
23213 rm -f conftest.o conftest.s
23214 fi
23215fi
23216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5
23217$as_echo "$gcc_cv_as_section_has_align" >&6; }
23218
23219 if test x$gcc_cv_as_section_has_align != xyes; then
23220 case ",$enable_languages," in
23221 *,lto,*)
23222 { $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
23223$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;}
23224 ;;
23225 esac
23226 fi
d38bc601
BF
23227 ;;
23228 esac
23229
5213506e
RW
23230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5
23231$as_echo_n "checking assembler for filds and fists mnemonics... " >&6; }
23232if test "${gcc_cv_as_ix86_filds+set}" = set; then :
23233 $as_echo_n "(cached) " >&6
8ada417f 23234else
a3a5e3d1
UB
23235 gcc_cv_as_ix86_filds=no
23236 if test x$gcc_cv_as != x; then
6e3f3080 23237 echo 'filds mem; fists mem' > conftest.s
e0b0fd74 23238 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23239 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23240 (eval $ac_try) 2>&5
23241 ac_status=$?
5213506e
RW
23242 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23243 test $ac_status = 0; }; }
8ada417f 23244 then
a3a5e3d1
UB
23245 gcc_cv_as_ix86_filds=yes
23246 else
23247 echo "configure: failed program was" >&5
23248 cat conftest.s >&5
23249 fi
23250 rm -f conftest.o conftest.s
23251 fi
23252fi
5213506e
RW
23253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_filds" >&5
23254$as_echo "$gcc_cv_as_ix86_filds" >&6; }
a3a5e3d1
UB
23255if test $gcc_cv_as_ix86_filds = yes; then
23256
5213506e 23257$as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h
a3a5e3d1
UB
23258
23259fi
23260
5213506e
RW
23261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5
23262$as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; }
23263if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
23264 $as_echo_n "(cached) " >&6
a3a5e3d1
UB
23265else
23266 gcc_cv_as_ix86_fildq=no
23267 if test x$gcc_cv_as != x; then
23268 echo 'fildq mem; fistpq mem' > conftest.s
e0b0fd74 23269 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23270 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a3a5e3d1
UB
23271 (eval $ac_try) 2>&5
23272 ac_status=$?
5213506e
RW
23273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23274 test $ac_status = 0; }; }
a3a5e3d1
UB
23275 then
23276 gcc_cv_as_ix86_fildq=yes
8ada417f
ZW
23277 else
23278 echo "configure: failed program was" >&5
23279 cat conftest.s >&5
981d4858 23280 fi
8ada417f
ZW
23281 rm -f conftest.o conftest.s
23282 fi
23283fi
5213506e
RW
23284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_fildq" >&5
23285$as_echo "$gcc_cv_as_ix86_fildq" >&6; }
a3a5e3d1 23286if test $gcc_cv_as_ix86_fildq = yes; then
ba479fd2 23287
5213506e 23288$as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h
ad9c4d9f 23289
f6f5dff2
RO
23290fi
23291
5213506e
RW
23292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5
23293$as_echo_n "checking assembler for cmov syntax... " >&6; }
23294if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then :
23295 $as_echo_n "(cached) " >&6
f6f5dff2
RO
23296else
23297 gcc_cv_as_ix86_cmov_sun_syntax=no
23298 if test x$gcc_cv_as != x; then
6e3f3080 23299 echo 'cmovl.l %edx, %eax' > conftest.s
e0b0fd74 23300 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23301 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23302 (eval $ac_try) 2>&5
23303 ac_status=$?
5213506e
RW
23304 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23305 test $ac_status = 0; }; }
f6f5dff2
RO
23306 then
23307 gcc_cv_as_ix86_cmov_sun_syntax=yes
23308 else
23309 echo "configure: failed program was" >&5
23310 cat conftest.s >&5
23311 fi
23312 rm -f conftest.o conftest.s
23313 fi
23314fi
5213506e
RW
23315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
23316$as_echo "$gcc_cv_as_ix86_cmov_sun_syntax" >&6; }
63cf211a 23317if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2 23318
5213506e 23319$as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h
f6f5dff2 23320
b6c03bcd
RS
23321fi
23322
5213506e
RW
23323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5
23324$as_echo_n "checking assembler for ffreep mnemonic... " >&6; }
23325if test "${gcc_cv_as_ix86_ffreep+set}" = set; then :
23326 $as_echo_n "(cached) " >&6
b6c03bcd
RS
23327else
23328 gcc_cv_as_ix86_ffreep=no
23329 if test x$gcc_cv_as != x; then
23330 echo 'ffreep %st(1)' > conftest.s
e0b0fd74 23331 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23332 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b6c03bcd
RS
23333 (eval $ac_try) 2>&5
23334 ac_status=$?
5213506e
RW
23335 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23336 test $ac_status = 0; }; }
b6c03bcd
RS
23337 then
23338 gcc_cv_as_ix86_ffreep=yes
23339 else
23340 echo "configure: failed program was" >&5
23341 cat conftest.s >&5
23342 fi
23343 rm -f conftest.o conftest.s
23344 fi
23345fi
5213506e
RW
23346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_ffreep" >&5
23347$as_echo "$gcc_cv_as_ix86_ffreep" >&6; }
b6c03bcd
RS
23348if test $gcc_cv_as_ix86_ffreep = yes; then
23349
5213506e 23350$as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h
b6c03bcd 23351
ed104137
RO
23352fi
23353
23354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5
23355$as_echo_n "checking assembler for .quad directive... " >&6; }
23356if test "${gcc_cv_as_ix86_quad+set}" = set; then :
23357 $as_echo_n "(cached) " >&6
23358else
23359 gcc_cv_as_ix86_quad=no
23360 if test x$gcc_cv_as != x; then
23361 echo '.quad 0' > conftest.s
23362 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
23363 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23364 (eval $ac_try) 2>&5
23365 ac_status=$?
23366 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23367 test $ac_status = 0; }; }
23368 then
23369 gcc_cv_as_ix86_quad=yes
23370 else
23371 echo "configure: failed program was" >&5
23372 cat conftest.s >&5
23373 fi
23374 rm -f conftest.o conftest.s
23375 fi
23376fi
23377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_quad" >&5
23378$as_echo "$gcc_cv_as_ix86_quad" >&6; }
23379if test $gcc_cv_as_ix86_quad = yes; then
23380
23381$as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h
23382
38ca3765
UB
23383fi
23384
5213506e
RW
23385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5
23386$as_echo_n "checking assembler for sahf mnemonic... " >&6; }
23387if test "${gcc_cv_as_ix86_sahf+set}" = set; then :
23388 $as_echo_n "(cached) " >&6
38ca3765
UB
23389else
23390 gcc_cv_as_ix86_sahf=no
23391 if test x$gcc_cv_as != x; then
953c29f7
UB
23392 echo '.code64
23393 sahf' > conftest.s
e0b0fd74 23394 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23395 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
38ca3765
UB
23396 (eval $ac_try) 2>&5
23397 ac_status=$?
5213506e
RW
23398 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23399 test $ac_status = 0; }; }
38ca3765
UB
23400 then
23401 gcc_cv_as_ix86_sahf=yes
23402 else
23403 echo "configure: failed program was" >&5
23404 cat conftest.s >&5
23405 fi
23406 rm -f conftest.o conftest.s
23407 fi
23408fi
5213506e
RW
23409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_sahf" >&5
23410$as_echo "$gcc_cv_as_ix86_sahf" >&6; }
38ca3765
UB
23411if test $gcc_cv_as_ix86_sahf = yes; then
23412
5213506e 23413$as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h
38ca3765 23414
bad72d7a
RH
23415fi
23416
23417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5
23418$as_echo_n "checking assembler for swap suffix... " >&6; }
23419if test "${gcc_cv_as_ix86_swap+set}" = set; then :
23420 $as_echo_n "(cached) " >&6
23421else
23422 gcc_cv_as_ix86_swap=no
23423 if test x$gcc_cv_as != x; then
23424 echo 'movl.s %esp, %ebp' > conftest.s
e0b0fd74 23425 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
bad72d7a
RH
23426 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23427 (eval $ac_try) 2>&5
23428 ac_status=$?
23429 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23430 test $ac_status = 0; }; }
23431 then
23432 gcc_cv_as_ix86_swap=yes
23433 else
23434 echo "configure: failed program was" >&5
23435 cat conftest.s >&5
23436 fi
23437 rm -f conftest.o conftest.s
23438 fi
23439fi
23440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_swap" >&5
23441$as_echo "$gcc_cv_as_ix86_swap" >&6; }
23442if test $gcc_cv_as_ix86_swap = yes; then
23443
23444$as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h
23445
68b92f78
RS
23446fi
23447
5213506e
RW
23448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5
23449$as_echo_n "checking assembler for different section symbol subtraction... " >&6; }
23450if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then :
23451 $as_echo_n "(cached) " >&6
68b92f78
RS
23452else
23453 gcc_cv_as_ix86_diff_sect_delta=no
23454 if test x$gcc_cv_as != x; then
23455 echo '.section .rodata
23456.L1:
23457 .long .L2-.L1
23458 .long .L3-.L1
23459 .text
23460.L3: nop
23461.L2: nop' > conftest.s
e0b0fd74 23462 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23463 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
68b92f78
RS
23464 (eval $ac_try) 2>&5
23465 ac_status=$?
5213506e
RW
23466 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23467 test $ac_status = 0; }; }
68b92f78
RS
23468 then
23469 gcc_cv_as_ix86_diff_sect_delta=yes
23470 else
23471 echo "configure: failed program was" >&5
23472 cat conftest.s >&5
23473 fi
23474 rm -f conftest.o conftest.s
23475 fi
23476fi
5213506e
RW
23477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
23478$as_echo "$gcc_cv_as_ix86_diff_sect_delta" >&6; }
68b92f78
RS
23479if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
23480
5213506e 23481$as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h
68b92f78 23482
ad9c4d9f
NN
23483fi
23484
2433310d 23485 # These two are used unconditionally by i386.[ch]; it is to be defined
6f3ca281 23486 # to 1 if the feature is present, 0 otherwise.
5213506e
RW
23487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5
23488$as_echo_n "checking assembler for GOTOFF in data... " >&6; }
23489if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then :
23490 $as_echo_n "(cached) " >&6
8ada417f
ZW
23491else
23492 gcc_cv_as_ix86_gotoff_in_data=no
23493 if test $in_tree_gas = yes; then
23494 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23495 then gcc_cv_as_ix86_gotoff_in_data=yes
23496fi
23497 elif test x$gcc_cv_as != x; then
6e3f3080 23498 echo ' .text
f88c65f7
RH
23499.L0:
23500 nop
23501 .data
8ada417f 23502 .long .L0@GOTOFF' > conftest.s
e0b0fd74 23503 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23504 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23505 (eval $ac_try) 2>&5
23506 ac_status=$?
5213506e
RW
23507 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23508 test $ac_status = 0; }; }
8ada417f
ZW
23509 then
23510 gcc_cv_as_ix86_gotoff_in_data=yes
23511 else
23512 echo "configure: failed program was" >&5
23513 cat conftest.s >&5
f88c65f7 23514 fi
8ada417f
ZW
23515 rm -f conftest.o conftest.s
23516 fi
23517fi
5213506e
RW
23518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
23519$as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; }
8ada417f 23520
6f3ca281 23521
ba479fd2 23522cat >>confdefs.h <<_ACEOF
6f3ca281 23523#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 23524_ACEOF
f88c65f7 23525
2433310d
RO
23526
23527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rep and lock prefix" >&5
23528$as_echo_n "checking assembler for rep and lock prefix... " >&6; }
23529if test "${gcc_cv_as_ix86_rep_lock_prefix+set}" = set; then :
23530 $as_echo_n "(cached) " >&6
23531else
23532 gcc_cv_as_ix86_rep_lock_prefix=no
23533 if test x$gcc_cv_as != x; then
23534 echo 'rep movsl
4bade865 23535 lock addl %edi, (%eax,%esi)
2433310d
RO
23536 lock orl $0, (%esp)' > conftest.s
23537 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
23538 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23539 (eval $ac_try) 2>&5
23540 ac_status=$?
23541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23542 test $ac_status = 0; }; }
23543 then
23544 gcc_cv_as_ix86_rep_lock_prefix=yes
23545 else
23546 echo "configure: failed program was" >&5
23547 cat conftest.s >&5
23548 fi
23549 rm -f conftest.o conftest.s
23550 fi
23551fi
23552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_rep_lock_prefix" >&5
23553$as_echo "$gcc_cv_as_ix86_rep_lock_prefix" >&6; }
7085bfb6 23554if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then
2433310d 23555
7085bfb6 23556$as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h
2433310d 23557
7085bfb6 23558fi
2433310d 23559
1cb36a98 23560 ;;
ef1ecf87
RH
23561
23562 ia64*-*-*)
5213506e
RW
23563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ltoffx and ldxmov relocs" >&5
23564$as_echo_n "checking assembler for ltoffx and ldxmov relocs... " >&6; }
23565if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then :
23566 $as_echo_n "(cached) " >&6
ef1ecf87 23567else
8ada417f
ZW
23568 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
23569 if test $in_tree_gas = yes; then
23570 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23571 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 23572fi
8ada417f 23573 elif test x$gcc_cv_as != x; then
6e3f3080 23574 echo ' .text
ef1ecf87
RH
23575 addl r15 = @ltoffx(x#), gp
23576 ;;
cfa9ee99 23577 ld8.mov r16 = [r15], x#' > conftest.s
e0b0fd74 23578 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23579 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23580 (eval $ac_try) 2>&5
23581 ac_status=$?
5213506e
RW
23582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23583 test $ac_status = 0; }; }
8ada417f 23584 then
cfa9ee99 23585 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
23586 else
23587 echo "configure: failed program was" >&5
23588 cat conftest.s >&5
2c4a9cff 23589 fi
8ada417f
ZW
23590 rm -f conftest.o conftest.s
23591 fi
23592fi
5213506e
RW
23593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
23594$as_echo "$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; }
63cf211a 23595if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2 23596
5213506e 23597$as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h
8ada417f 23598
cfa9ee99 23599fi
8ada417f 23600
2c4a9cff 23601 ;;
8ada417f 23602
2c4a9cff 23603 powerpc*-*-*)
8ada417f 23604 case $target in
432218ba
DE
23605 *-*-aix*) conftest_s=' .machine "pwr5"
23606 .csect .text[PR]
6b37db3c 23607 mfcr 3,128';;
8af4d362 23608 *-*-darwin*)
5213506e
RW
23609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine directive support" >&5
23610$as_echo_n "checking assembler for .machine directive support... " >&6; }
23611if test "${gcc_cv_as_machine_directive+set}" = set; then :
23612 $as_echo_n "(cached) " >&6
8af4d362
PB
23613else
23614 gcc_cv_as_machine_directive=no
23615 if test x$gcc_cv_as != x; then
23616 echo ' .machine ppc7400' > conftest.s
e0b0fd74 23617 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23618 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8af4d362
PB
23619 (eval $ac_try) 2>&5
23620 ac_status=$?
5213506e
RW
23621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23622 test $ac_status = 0; }; }
8af4d362
PB
23623 then
23624 gcc_cv_as_machine_directive=yes
23625 else
23626 echo "configure: failed program was" >&5
23627 cat conftest.s >&5
23628 fi
23629 rm -f conftest.o conftest.s
23630 fi
23631fi
5213506e
RW
23632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5
23633$as_echo "$gcc_cv_as_machine_directive" >&6; }
8af4d362
PB
23634
23635 if test x$gcc_cv_as_machine_directive != xyes; then
23636 echo "*** This target requires an assembler supporting \".machine\"" >&2
23637 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
23638 test x$build = x$target && exit 1
23639 fi
23640 conftest_s=' .text
6b37db3c 23641 mfcr r3,128';;
4c67db14 23642 *) conftest_s=' .machine power4
d2ab3e37 23643 .text
6b37db3c 23644 mfcr 3,128';;
8ada417f 23645 esac
8ada417f 23646
5213506e
RW
23647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for mfcr field support" >&5
23648$as_echo_n "checking assembler for mfcr field support... " >&6; }
23649if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then :
23650 $as_echo_n "(cached) " >&6
2c4a9cff 23651else
8ada417f
ZW
23652 gcc_cv_as_powerpc_mfcrf=no
23653 if test $in_tree_gas = yes; then
23654 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23655 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 23656fi
8ada417f 23657 elif test x$gcc_cv_as != x; then
6e3f3080 23658 echo "$conftest_s" > conftest.s
e0b0fd74 23659 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23660 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
23661 (eval $ac_try) 2>&5
23662 ac_status=$?
5213506e
RW
23663 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23664 test $ac_status = 0; }; }
8ada417f
ZW
23665 then
23666 gcc_cv_as_powerpc_mfcrf=yes
23667 else
23668 echo "configure: failed program was" >&5
23669 cat conftest.s >&5
23670 fi
23671 rm -f conftest.o conftest.s
23672 fi
2c4a9cff 23673fi
5213506e
RW
23674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfcrf" >&5
23675$as_echo "$gcc_cv_as_powerpc_mfcrf" >&6; }
63cf211a 23676if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2 23677
5213506e 23678$as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h
ef1ecf87 23679
8ada417f 23680fi
432218ba
DE
23681
23682 case $target in
23683 *-*-aix*) conftest_s=' .machine "pwr5"
23684 .csect .text[PR]
23685 popcntb 3,3';;
23686 *) conftest_s=' .machine power5
23687 .text
23688 popcntb 3,3';;
23689 esac
23690
5213506e
RW
23691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntb support" >&5
23692$as_echo_n "checking assembler for popcntb support... " >&6; }
23693if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then :
23694 $as_echo_n "(cached) " >&6
432218ba
DE
23695else
23696 gcc_cv_as_powerpc_popcntb=no
23697 if test $in_tree_gas = yes; then
23698 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23699 then gcc_cv_as_powerpc_popcntb=yes
23700fi
23701 elif test x$gcc_cv_as != x; then
23702 echo "$conftest_s" > conftest.s
e0b0fd74 23703 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23704 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
432218ba
DE
23705 (eval $ac_try) 2>&5
23706 ac_status=$?
5213506e
RW
23707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23708 test $ac_status = 0; }; }
432218ba
DE
23709 then
23710 gcc_cv_as_powerpc_popcntb=yes
23711 else
23712 echo "configure: failed program was" >&5
23713 cat conftest.s >&5
23714 fi
23715 rm -f conftest.o conftest.s
23716 fi
23717fi
5213506e
RW
23718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntb" >&5
23719$as_echo "$gcc_cv_as_powerpc_popcntb" >&6; }
432218ba
DE
23720if test $gcc_cv_as_powerpc_popcntb = yes; then
23721
5213506e 23722$as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h
432218ba 23723
9719f3b7
DE
23724fi
23725
23726 case $target in
23727 *-*-aix*) conftest_s=' .machine "pwr5x"
23728 .csect .text[PR]
23729 frin 1,1';;
1e04bfdc 23730 *) conftest_s=' .machine power5
9719f3b7
DE
23731 .text
23732 frin 1,1';;
23733 esac
23734
5213506e
RW
23735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fp round support" >&5
23736$as_echo_n "checking assembler for fp round support... " >&6; }
23737if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then :
23738 $as_echo_n "(cached) " >&6
9719f3b7
DE
23739else
23740 gcc_cv_as_powerpc_fprnd=no
23741 if test $in_tree_gas = yes; then
23742 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23743 then gcc_cv_as_powerpc_fprnd=yes
23744fi
23745 elif test x$gcc_cv_as != x; then
23746 echo "$conftest_s" > conftest.s
e0b0fd74 23747 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23748 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9719f3b7
DE
23749 (eval $ac_try) 2>&5
23750 ac_status=$?
5213506e
RW
23751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23752 test $ac_status = 0; }; }
9719f3b7
DE
23753 then
23754 gcc_cv_as_powerpc_fprnd=yes
23755 else
23756 echo "configure: failed program was" >&5
23757 cat conftest.s >&5
23758 fi
23759 rm -f conftest.o conftest.s
23760 fi
23761fi
5213506e
RW
23762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_fprnd" >&5
23763$as_echo "$gcc_cv_as_powerpc_fprnd" >&6; }
9719f3b7
DE
23764if test $gcc_cv_as_powerpc_fprnd = yes; then
23765
5213506e 23766$as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h
9719f3b7 23767
44cd321e
PS
23768fi
23769
23770 case $target in
23771 *-*-aix*) conftest_s=' .machine "pwr6"
23772 .csect .text[PR]
23773 mffgpr 1,3';;
23774 *) conftest_s=' .machine power6
23775 .text
23776 mffgpr 1,3';;
23777 esac
23778
5213506e
RW
23779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for move fp gpr support" >&5
23780$as_echo_n "checking assembler for move fp gpr support... " >&6; }
23781if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then :
23782 $as_echo_n "(cached) " >&6
44cd321e
PS
23783else
23784 gcc_cv_as_powerpc_mfpgpr=no
23785 if test $in_tree_gas = yes; then
cacf1ca8 23786 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
44cd321e
PS
23787 then gcc_cv_as_powerpc_mfpgpr=yes
23788fi
23789 elif test x$gcc_cv_as != x; then
23790 echo "$conftest_s" > conftest.s
e0b0fd74 23791 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 23792 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
44cd321e
PS
23793 (eval $ac_try) 2>&5
23794 ac_status=$?
5213506e
RW
23795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23796 test $ac_status = 0; }; }
44cd321e
PS
23797 then
23798 gcc_cv_as_powerpc_mfpgpr=yes
23799 else
23800 echo "configure: failed program was" >&5
23801 cat conftest.s >&5
23802 fi
23803 rm -f conftest.o conftest.s
23804 fi
23805fi
5213506e
RW
23806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_mfpgpr" >&5
23807$as_echo "$gcc_cv_as_powerpc_mfpgpr" >&6; }
44cd321e
PS
23808if test $gcc_cv_as_powerpc_mfpgpr = yes; then
23809
5213506e 23810$as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h
44cd321e 23811
432218ba
DE
23812fi
23813
7f970b70
AM
23814 case $target in
23815 *-*-aix*) conftest_s=' .csect .text[PR]
23816LCF..0:
23817 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
23818 *-*-darwin*)
23819 conftest_s=' .text
23820LCF0:
23821 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
23822 *) conftest_s=' .text
23823.LCF0:
23824 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
23825 esac
23826
5213506e
RW
23827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rel16 relocs" >&5
23828$as_echo_n "checking assembler for rel16 relocs... " >&6; }
23829if test "${gcc_cv_as_powerpc_rel16+set}" = set; then :
23830 $as_echo_n "(cached) " >&6
695d8830
AS
23831else
23832 gcc_cv_as_powerpc_rel16=no
23833 if test $in_tree_gas = yes; then
23834 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23835 then gcc_cv_as_powerpc_rel16=yes
23836fi
23837 elif test x$gcc_cv_as != x; then
23838 echo "$conftest_s" > conftest.s
e0b0fd74 23839 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23840 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
695d8830
AS
23841 (eval $ac_try) 2>&5
23842 ac_status=$?
5213506e
RW
23843 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23844 test $ac_status = 0; }; }
695d8830
AS
23845 then
23846 gcc_cv_as_powerpc_rel16=yes
23847 else
23848 echo "configure: failed program was" >&5
23849 cat conftest.s >&5
23850 fi
23851 rm -f conftest.o conftest.s
23852 fi
23853fi
5213506e
RW
23854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_rel16" >&5
23855$as_echo "$gcc_cv_as_powerpc_rel16" >&6; }
695d8830
AS
23856if test $gcc_cv_as_powerpc_rel16 = yes; then
23857
5213506e 23858$as_echo "#define HAVE_AS_REL16 1" >>confdefs.h
695d8830
AS
23859
23860fi
23861
b639c3c2
JJ
23862 case $target in
23863 *-*-aix*) conftest_s=' .machine "pwr6"
23864 .csect .text[PR]
23865 cmpb 3,4,5';;
23866 *) conftest_s=' .machine power6
23867 .text
23868 cmpb 3,4,5';;
23869 esac
23870
5213506e
RW
23871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compare bytes support" >&5
23872$as_echo_n "checking assembler for compare bytes support... " >&6; }
23873if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then :
23874 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23875else
23876 gcc_cv_as_powerpc_cmpb=no
23877 if test $in_tree_gas = yes; then
cacf1ca8 23878 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23879 then gcc_cv_as_powerpc_cmpb=yes
23880fi
23881 elif test x$gcc_cv_as != x; then
23882 echo "$conftest_s" > conftest.s
e0b0fd74 23883 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23884 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23885 (eval $ac_try) 2>&5
23886 ac_status=$?
5213506e
RW
23887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23888 test $ac_status = 0; }; }
b639c3c2
JJ
23889 then
23890 gcc_cv_as_powerpc_cmpb=yes
23891 else
23892 echo "configure: failed program was" >&5
23893 cat conftest.s >&5
23894 fi
23895 rm -f conftest.o conftest.s
23896 fi
23897fi
5213506e
RW
23898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_cmpb" >&5
23899$as_echo "$gcc_cv_as_powerpc_cmpb" >&6; }
b639c3c2
JJ
23900if test $gcc_cv_as_powerpc_cmpb = yes; then
23901
5213506e 23902$as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h
b639c3c2
JJ
23903
23904fi
23905
23906 case $target in
23907 *-*-aix*) conftest_s=' .machine "pwr6"
23908 .csect .text[PR]
0d74c0ee 23909 dadd 1,2,3';;
b639c3c2
JJ
23910 *) conftest_s=' .machine power6
23911 .text
0d74c0ee 23912 dadd 1,2,3';;
b639c3c2
JJ
23913 esac
23914
5213506e
RW
23915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for decimal float support" >&5
23916$as_echo_n "checking assembler for decimal float support... " >&6; }
23917if test "${gcc_cv_as_powerpc_dfp+set}" = set; then :
23918 $as_echo_n "(cached) " >&6
b639c3c2
JJ
23919else
23920 gcc_cv_as_powerpc_dfp=no
23921 if test $in_tree_gas = yes; then
cacf1ca8 23922 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
23923 then gcc_cv_as_powerpc_dfp=yes
23924fi
23925 elif test x$gcc_cv_as != x; then
23926 echo "$conftest_s" > conftest.s
e0b0fd74 23927 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23928 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
b639c3c2
JJ
23929 (eval $ac_try) 2>&5
23930 ac_status=$?
5213506e
RW
23931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23932 test $ac_status = 0; }; }
b639c3c2
JJ
23933 then
23934 gcc_cv_as_powerpc_dfp=yes
23935 else
23936 echo "configure: failed program was" >&5
23937 cat conftest.s >&5
23938 fi
23939 rm -f conftest.o conftest.s
23940 fi
23941fi
5213506e
RW
23942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dfp" >&5
23943$as_echo "$gcc_cv_as_powerpc_dfp" >&6; }
b639c3c2
JJ
23944if test $gcc_cv_as_powerpc_dfp = yes; then
23945
5213506e 23946$as_echo "#define HAVE_AS_DFP 1" >>confdefs.h
b639c3c2 23947
d40c9e33
PB
23948fi
23949
23950 case $target in
23951 *-*-aix*) conftest_s=' .machine "pwr7"
23952 .csect .text[PR]
23953 lxvd2x 1,2,3';;
23954 *) conftest_s=' .machine power7
23955 .text
23956 lxvd2x 1,2,3';;
23957 esac
23958
5213506e
RW
23959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for vector-scalar support" >&5
23960$as_echo_n "checking assembler for vector-scalar support... " >&6; }
23961if test "${gcc_cv_as_powerpc_vsx+set}" = set; then :
23962 $as_echo_n "(cached) " >&6
d40c9e33
PB
23963else
23964 gcc_cv_as_powerpc_vsx=no
23965 if test $in_tree_gas = yes; then
cacf1ca8 23966 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
d40c9e33
PB
23967 then gcc_cv_as_powerpc_vsx=yes
23968fi
23969 elif test x$gcc_cv_as != x; then
23970 echo "$conftest_s" > conftest.s
e0b0fd74 23971 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 23972 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
d40c9e33
PB
23973 (eval $ac_try) 2>&5
23974 ac_status=$?
5213506e
RW
23975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23976 test $ac_status = 0; }; }
d40c9e33
PB
23977 then
23978 gcc_cv_as_powerpc_vsx=yes
23979 else
23980 echo "configure: failed program was" >&5
23981 cat conftest.s >&5
23982 fi
23983 rm -f conftest.o conftest.s
23984 fi
23985fi
5213506e
RW
23986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_vsx" >&5
23987$as_echo "$gcc_cv_as_powerpc_vsx" >&6; }
d40c9e33
PB
23988if test $gcc_cv_as_powerpc_vsx = yes; then
23989
5213506e 23990$as_echo "#define HAVE_AS_VSX 1" >>confdefs.h
d40c9e33 23991
cacf1ca8
MM
23992fi
23993
23994 case $target in
23995 *-*-aix*) conftest_s=' .machine "pwr7"
23996 .csect .text[PR]
23997 popcntd 3,3';;
23998 *) conftest_s=' .machine power7
23999 .text
24000 popcntd 3,3';;
24001 esac
24002
5213506e
RW
24003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for popcntd support" >&5
24004$as_echo_n "checking assembler for popcntd support... " >&6; }
24005if test "${gcc_cv_as_powerpc_popcntd+set}" = set; then :
24006 $as_echo_n "(cached) " >&6
cacf1ca8
MM
24007else
24008 gcc_cv_as_powerpc_popcntd=no
24009 if test $in_tree_gas = yes; then
24010 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
24011 then gcc_cv_as_powerpc_popcntd=yes
24012fi
24013 elif test x$gcc_cv_as != x; then
24014 echo "$conftest_s" > conftest.s
e0b0fd74 24015 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 24016 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
24017 (eval $ac_try) 2>&5
24018 ac_status=$?
5213506e
RW
24019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24020 test $ac_status = 0; }; }
cacf1ca8
MM
24021 then
24022 gcc_cv_as_powerpc_popcntd=yes
24023 else
24024 echo "configure: failed program was" >&5
24025 cat conftest.s >&5
24026 fi
24027 rm -f conftest.o conftest.s
24028 fi
24029fi
5213506e
RW
24030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_popcntd" >&5
24031$as_echo "$gcc_cv_as_powerpc_popcntd" >&6; }
cacf1ca8
MM
24032if test $gcc_cv_as_powerpc_popcntd = yes; then
24033
5213506e 24034$as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h
cacf1ca8
MM
24035
24036fi
24037
24038 case $target in
24039 *-*-aix*) conftest_s=' .csect .text[PR]
24040 lwsync';;
24041 *) conftest_s=' .text
24042 lwsync';;
24043 esac
24044
5213506e
RW
24045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for lwsync support" >&5
24046$as_echo_n "checking assembler for lwsync support... " >&6; }
24047if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then :
24048 $as_echo_n "(cached) " >&6
cacf1ca8
MM
24049else
24050 gcc_cv_as_powerpc_lwsync=no
24051 if test $in_tree_gas = yes; then
24052 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
24053 then gcc_cv_as_powerpc_lwsync=yes
24054fi
24055 elif test x$gcc_cv_as != x; then
24056 echo "$conftest_s" > conftest.s
e0b0fd74 24057 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
5213506e 24058 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
cacf1ca8
MM
24059 (eval $ac_try) 2>&5
24060 ac_status=$?
5213506e
RW
24061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24062 test $ac_status = 0; }; }
cacf1ca8
MM
24063 then
24064 gcc_cv_as_powerpc_lwsync=yes
24065 else
24066 echo "configure: failed program was" >&5
24067 cat conftest.s >&5
24068 fi
24069 rm -f conftest.o conftest.s
24070 fi
24071fi
5213506e
RW
24072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_lwsync" >&5
24073$as_echo "$gcc_cv_as_powerpc_lwsync" >&6; }
cacf1ca8
MM
24074if test $gcc_cv_as_powerpc_lwsync = yes; then
24075
5213506e 24076$as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h
cacf1ca8 24077
47f67e51
PB
24078fi
24079
24080 case $target in
24081 *-*-aix*) conftest_s=' .machine "476"
24082 .csect .text[PR]
24083 dci 0';;
24084 *) conftest_s=' .machine "476"
24085 .text
24086 dci 0';;
24087 esac
24088
24089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for data cache invalidate support" >&5
24090$as_echo_n "checking assembler for data cache invalidate support... " >&6; }
24091if test "${gcc_cv_as_powerpc_dci+set}" = set; then :
24092 $as_echo_n "(cached) " >&6
24093else
24094 gcc_cv_as_powerpc_dci=no
24095 if test $in_tree_gas = yes; then
24096 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
24097 then gcc_cv_as_powerpc_dci=yes
24098fi
24099 elif test x$gcc_cv_as != x; then
24100 echo "$conftest_s" > conftest.s
e0b0fd74 24101 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5'
47f67e51
PB
24102 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
24103 (eval $ac_try) 2>&5
24104 ac_status=$?
24105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24106 test $ac_status = 0; }; }
24107 then
24108 gcc_cv_as_powerpc_dci=yes
24109 else
24110 echo "configure: failed program was" >&5
24111 cat conftest.s >&5
24112 fi
24113 rm -f conftest.o conftest.s
24114 fi
24115fi
24116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_dci" >&5
24117$as_echo "$gcc_cv_as_powerpc_dci" >&6; }
24118if test $gcc_cv_as_powerpc_dci = yes; then
24119
24120$as_echo "#define HAVE_AS_DCI 1" >>confdefs.h
24121
e51917ae
JM
24122fi
24123
5213506e
RW
24124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
24125$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
24126if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then :
24127 $as_echo_n "(cached) " >&6
e51917ae
JM
24128else
24129 gcc_cv_as_powerpc_gnu_attribute=no
24130 if test $in_tree_gas = yes; then
24131 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24132 then gcc_cv_as_powerpc_gnu_attribute=yes
24133fi
24134 elif test x$gcc_cv_as != x; then
24135 echo '.gnu_attribute 4,1' > conftest.s
e0b0fd74 24136 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24137 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e51917ae
JM
24138 (eval $ac_try) 2>&5
24139 ac_status=$?
5213506e
RW
24140 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24141 test $ac_status = 0; }; }
e51917ae
JM
24142 then
24143 gcc_cv_as_powerpc_gnu_attribute=yes
24144 else
24145 echo "configure: failed program was" >&5
24146 cat conftest.s >&5
24147 fi
24148 rm -f conftest.o conftest.s
24149 fi
24150fi
5213506e
RW
24151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
24152$as_echo "$gcc_cv_as_powerpc_gnu_attribute" >&6; }
e51917ae
JM
24153if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
24154
5213506e 24155$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
e51917ae 24156
9752c4ad
AM
24157fi
24158
5213506e
RW
24159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5
24160$as_echo_n "checking assembler for tls marker support... " >&6; }
24161if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then :
24162 $as_echo_n "(cached) " >&6
9752c4ad
AM
24163else
24164 gcc_cv_as_powerpc_tls_markers=no
24165 if test $in_tree_gas = yes; then
207bf79d 24166 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0`
9752c4ad
AM
24167 then gcc_cv_as_powerpc_tls_markers=yes
24168fi
24169 elif test x$gcc_cv_as != x; then
24170 echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s
e0b0fd74 24171 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24172 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9752c4ad
AM
24173 (eval $ac_try) 2>&5
24174 ac_status=$?
5213506e
RW
24175 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24176 test $ac_status = 0; }; }
9752c4ad
AM
24177 then
24178 gcc_cv_as_powerpc_tls_markers=yes
24179 else
24180 echo "configure: failed program was" >&5
24181 cat conftest.s >&5
24182 fi
24183 rm -f conftest.o conftest.s
24184 fi
24185fi
5213506e
RW
24186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_powerpc_tls_markers" >&5
24187$as_echo "$gcc_cv_as_powerpc_tls_markers" >&6; }
9752c4ad
AM
24188if test $gcc_cv_as_powerpc_tls_markers = yes; then
24189
5213506e 24190$as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h
9752c4ad 24191
7f970b70 24192fi
636cf8b1
RS
24193
24194 case $target in
24195 *-*-aix*)
24196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5
24197$as_echo_n "checking assembler for .ref support... " >&6; }
24198if test "${gcc_cv_as_aix_ref+set}" = set; then :
24199 $as_echo_n "(cached) " >&6
24200else
24201 gcc_cv_as_aix_ref=no
24202 if test $in_tree_gas = yes; then
24203 if test $gcc_cv_gas_vers -ge `expr \( \( 2.21.0 \* 1000 \) + gcc_cv_as_aix_ref=yes \) \* 1000 + `
24204 then :
24205fi
24206 elif test x$gcc_cv_as != x; then
24207 echo ' .csect stuff[rw]
24208 stuff:
24209 .long 1
24210 .extern sym
24211 .ref sym
24212 ' > conftest.s
24213 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
24214 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
24215 (eval $ac_try) 2>&5
24216 ac_status=$?
24217 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24218 test $ac_status = 0; }; }
24219 then
24220 gcc_cv_as_aix_ref=yes
24221 else
24222 echo "configure: failed program was" >&5
24223 cat conftest.s >&5
24224 fi
24225 rm -f conftest.o conftest.s
24226 fi
24227fi
24228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aix_ref" >&5
24229$as_echo "$gcc_cv_as_aix_ref" >&6; }
24230if test $gcc_cv_as_aix_ref = yes; then
24231
24232$as_echo "#define HAVE_AS_REF 1" >>confdefs.h
24233
24234fi
24235 ;;
24236 esac
8ada417f
ZW
24237 ;;
24238
24239 mips*-*-*)
5213506e
RW
24240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
24241$as_echo_n "checking assembler for explicit relocation support... " >&6; }
24242if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then :
24243 $as_echo_n "(cached) " >&6
8ada417f
ZW
24244else
24245 gcc_cv_as_mips_explicit_relocs=no
24246 if test $in_tree_gas = yes; then
24247 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
24248 then gcc_cv_as_mips_explicit_relocs=yes
24249fi
24250 elif test x$gcc_cv_as != x; then
6e3f3080 24251 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
e0b0fd74 24252 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24253 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24254 (eval $ac_try) 2>&5
24255 ac_status=$?
5213506e
RW
24256 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24257 test $ac_status = 0; }; }
8ada417f
ZW
24258 then
24259 gcc_cv_as_mips_explicit_relocs=yes
24260 else
24261 echo "configure: failed program was" >&5
24262 cat conftest.s >&5
ef1ecf87 24263 fi
8ada417f
ZW
24264 rm -f conftest.o conftest.s
24265 fi
24266fi
5213506e
RW
24267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_explicit_relocs" >&5
24268$as_echo "$gcc_cv_as_mips_explicit_relocs" >&6; }
8ada417f
ZW
24269if test $gcc_cv_as_mips_explicit_relocs = yes; then
24270 if test x$target_cpu_default = x
24271 then target_cpu_default=MASK_EXPLICIT_RELOCS
24272 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
24273 fi
4551169f 24274fi
5213506e
RW
24275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5
24276$as_echo_n "checking assembler for -mno-shared support... " >&6; }
24277if test "${gcc_cv_as_mips_no_shared+set}" = set; then :
24278 $as_echo_n "(cached) " >&6
4551169f
RS
24279else
24280 gcc_cv_as_mips_no_shared=no
24281 if test $in_tree_gas = yes; then
24282 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
24283 then gcc_cv_as_mips_no_shared=yes
24284fi
24285 elif test x$gcc_cv_as != x; then
24286 echo 'nop' > conftest.s
e0b0fd74 24287 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mno-shared -o conftest.o conftest.s >&5'
5213506e 24288 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
4551169f
RS
24289 (eval $ac_try) 2>&5
24290 ac_status=$?
5213506e
RW
24291 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24292 test $ac_status = 0; }; }
4551169f
RS
24293 then
24294 gcc_cv_as_mips_no_shared=yes
24295 else
24296 echo "configure: failed program was" >&5
24297 cat conftest.s >&5
24298 fi
24299 rm -f conftest.o conftest.s
24300 fi
24301fi
5213506e
RW
24302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_no_shared" >&5
24303$as_echo "$gcc_cv_as_mips_no_shared" >&6; }
4551169f
RS
24304if test $gcc_cv_as_mips_no_shared = yes; then
24305
5213506e 24306$as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h
4551169f 24307
dcb957d9
JM
24308fi
24309
5213506e
RW
24310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
24311$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
24312if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then :
24313 $as_echo_n "(cached) " >&6
dcb957d9
JM
24314else
24315 gcc_cv_as_mips_gnu_attribute=no
24316 if test $in_tree_gas = yes; then
24317 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24318 then gcc_cv_as_mips_gnu_attribute=yes
24319fi
24320 elif test x$gcc_cv_as != x; then
24321 echo '.gnu_attribute 4,1' > conftest.s
e0b0fd74 24322 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24323 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
dcb957d9
JM
24324 (eval $ac_try) 2>&5
24325 ac_status=$?
5213506e
RW
24326 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24327 test $ac_status = 0; }; }
dcb957d9
JM
24328 then
24329 gcc_cv_as_mips_gnu_attribute=yes
24330 else
24331 echo "configure: failed program was" >&5
24332 cat conftest.s >&5
24333 fi
24334 rm -f conftest.o conftest.s
24335 fi
24336fi
5213506e
RW
24337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_gnu_attribute" >&5
24338$as_echo "$gcc_cv_as_mips_gnu_attribute" >&6; }
dcb957d9
JM
24339if test $gcc_cv_as_mips_gnu_attribute = yes; then
24340
5213506e 24341$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
dcb957d9 24342
a44380d2
JM
24343fi
24344
5213506e
RW
24345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5
24346$as_echo_n "checking assembler for .dtprelword support... " >&6; }
24347if test "${gcc_cv_as_mips_dtprelword+set}" = set; then :
24348 $as_echo_n "(cached) " >&6
a44380d2
JM
24349else
24350 gcc_cv_as_mips_dtprelword=no
24351 if test $in_tree_gas = yes; then
24352 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
24353 then gcc_cv_as_mips_dtprelword=yes
24354fi
24355 elif test x$gcc_cv_as != x; then
24356 echo '.section .tdata,"awT",@progbits
24357x:
24358 .word 2
24359 .text
24360 .dtprelword x+0x8000' > conftest.s
e0b0fd74 24361 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24362 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
a44380d2
JM
24363 (eval $ac_try) 2>&5
24364 ac_status=$?
5213506e
RW
24365 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24366 test $ac_status = 0; }; }
a44380d2
JM
24367 then
24368 gcc_cv_as_mips_dtprelword=yes
24369 else
24370 echo "configure: failed program was" >&5
24371 cat conftest.s >&5
24372 fi
24373 rm -f conftest.o conftest.s
24374 fi
24375fi
5213506e
RW
24376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mips_dtprelword" >&5
24377$as_echo "$gcc_cv_as_mips_dtprelword" >&6; }
a44380d2
JM
24378if test $gcc_cv_as_mips_dtprelword = yes; then
24379
5213506e 24380$as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h
a44380d2 24381
8ada417f 24382fi
b53da244
AN
24383
24384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5
24385$as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; }
24386 gcc_cv_as_ld_jalr_reloc=no
24387 if test $gcc_cv_as_mips_explicit_relocs = yes; then
24388 if test $in_tree_ld = yes ; then
24389 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 \
24390 && test $in_tree_ld_is_elf = yes; then
24391 gcc_cv_as_ld_jalr_reloc=yes
24392 fi
24393 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then
24394 echo ' .ent x' > conftest.s
24395 echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s
24396 echo ' ld $25,%call16(y)($28)' >> conftest.s
24397 echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s
24398 echo '1: jalr $25' >> conftest.s
24399 echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s
24400 echo '1: jalr $25' >> conftest.s
24401 echo ' .end x' >> conftest.s
24402 if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&5 \
24403 && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&5; then
bc492e47
RO
24404 if $gcc_cv_objdump -d conftest.so | grep jalr >/dev/null 2>&1 \
24405 && $gcc_cv_objdump -d conftest.so | grep "bal.*<x>" >/dev/null 2>&1; then
b53da244
AN
24406 gcc_cv_as_ld_jalr_reloc=yes
24407 fi
24408 fi
24409 rm -f conftest.*
24410 fi
24411 fi
24412 if test $gcc_cv_as_ld_jalr_reloc = yes; then
24413 if test x$target_cpu_default = x; then
24414 target_cpu_default=MASK_RELAX_PIC_CALLS
24415 else
24416 target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
24417 fi
24418 fi
24419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
24420$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
49576e25
RS
24421
24422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .eh_frame personality relaxation" >&5
24423$as_echo_n "checking linker for .eh_frame personality relaxation... " >&6; }
24424if test "${gcc_cv_ld_mips_personality_relaxation+set}" = set; then :
24425 $as_echo_n "(cached) " >&6
24426else
24427 gcc_cv_ld_mips_personality_relaxation=no
24428 if test $in_tree_ld = yes ; then
24429 if test "$gcc_cv_gld_major_version" -eq 2 \
24430 -a "$gcc_cv_gld_minor_version" -ge 21 \
24431 -o "$gcc_cv_gld_major_version" -gt 2; then
24432 gcc_cv_ld_mips_personality_relaxation=yes
24433 fi
24434 elif test x$gcc_cv_as != x \
24435 -a x$gcc_cv_ld != x \
24436 -a x$gcc_cv_readelf != x ; then
24437 cat > conftest.s <<EOF
24438 .cfi_startproc
24439 .cfi_personality 0x80,indirect_ptr
24440 .ent test
24441test:
24442 nop
24443 .end test
24444 .cfi_endproc
24445
24446 .section .data,"aw",@progbits
24447indirect_ptr:
24448 .dc.a personality
24449EOF
24450 if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \
24451 && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then
24452 if $gcc_cv_readelf -d conftest 2>&1 \
24453 | grep TEXTREL > /dev/null 2>&1; then
24454 :
24455 elif $gcc_cv_readelf --relocs conftest 2>&1 \
24456 | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then
24457 :
24458 else
24459 gcc_cv_ld_mips_personality_relaxation=yes
24460 fi
24461 fi
24462 fi
24463 rm -f conftest.s conftest.o conftest
24464fi
24465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_mips_personality_relaxation" >&5
24466$as_echo "$gcc_cv_ld_mips_personality_relaxation" >&6; }
24467 if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then
24468
24469$as_echo "#define HAVE_LD_PERSONALITY_RELAXATION 1" >>confdefs.h
24470
24471 fi
dbad5e72
SE
24472 ;;
24473esac
8ada417f 24474
dbad5e72
SE
24475# Mips and HP-UX need the GNU assembler.
24476# Linux on IA64 might be able to use the Intel assembler.
24477
24478case "$target" in
24479 mips*-*-* | *-*-hpux* )
82563d35
RS
24480 if test x$gas_flag = xyes \
24481 || test x"$host" != x"$build" \
24482 || test ! -x "$gcc_cv_as" \
24483 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
24484 :
24485 else
24486 echo "*** This configuration requires the GNU assembler" >&2
24487 exit 1
24488 fi
ef1ecf87 24489 ;;
1cb36a98 24490esac
dbad5e72 24491
9d147085
RH
24492# ??? Not all targets support dwarf2 debug_line, even within a version
24493# of gas. Moreover, we need to emit a valid instruction to trigger any
24494# info to the output file. So, as supported targets are added to gas 2.11,
24495# add some instruction here to (also) show we expect this might work.
24496# ??? Once 2.11 is released, probably need to add first known working
24497# version to the per-target configury.
24498case "$target" in
80486e06 24499 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
16045c71 24500 | x86_64*-*-* | hppa*-*-* | arm*-*-* | avr*-*-* \
ad9646c7 24501 | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
80920132 24502 | spu-*-* | fido*-*-* | m32c-*-* | microblaze-*-*)
9d147085
RH
24503 insn="nop"
24504 ;;
57116d8d 24505 ia64*-*-* | s390*-*-*)
9d147085
RH
24506 insn="nop 0"
24507 ;;
2853bc5a
HPN
24508 mmix-*-*)
24509 insn="swym 0"
24510 ;;
8ada417f
ZW
24511esac
24512if test x"$insn" != x; then
24513 conftest_s="\
24514 .file 1 \"conftest.s\"
24515 .loc 1 3 0
24516 $insn"
5213506e
RW
24517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for dwarf2 debug_line support" >&5
24518$as_echo_n "checking assembler for dwarf2 debug_line support... " >&6; }
24519if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then :
24520 $as_echo_n "(cached) " >&6
8ada417f
ZW
24521else
24522 gcc_cv_as_dwarf2_debug_line=no
24523 if test $in_tree_gas = yes; then
24524 if test $in_tree_gas_is_elf = yes \
24525 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24526 then gcc_cv_as_dwarf2_debug_line=yes
24527fi
24528 elif test x$gcc_cv_as != x; then
6e3f3080 24529 echo "$conftest_s" > conftest.s
e0b0fd74 24530 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24531 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24532 (eval $ac_try) 2>&5
24533 ac_status=$?
5213506e
RW
24534 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24535 test $ac_status = 0; }; }
8ada417f 24536 then
080a5bb0
EB
24537 if test x$gcc_cv_objdump != x \
24538 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
24539 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
24540 gcc_cv_as_dwarf2_debug_line=yes
24541 fi
24542 else
24543 echo "configure: failed program was" >&5
24544 cat conftest.s >&5
24545 fi
24546 rm -f conftest.o conftest.s
24547 fi
24548fi
5213506e
RW
24549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_debug_line" >&5
24550$as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; }
ad9c4d9f 24551
ad9c4d9f 24552
8ada417f
ZW
24553# The .debug_line file table must be in the exact order that
24554# we specified the files, since these indices are also used
24555# by DW_AT_decl_file. Approximate this test by testing if
24556# the assembler bitches if the same index is assigned twice.
5213506e
RW
24557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for buggy dwarf2 .file directive" >&5
24558$as_echo_n "checking assembler for buggy dwarf2 .file directive... " >&6; }
24559if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then :
24560 $as_echo_n "(cached) " >&6
8ada417f
ZW
24561else
24562 gcc_cv_as_dwarf2_file_buggy=no
24563 if test x$gcc_cv_as != x; then
6e3f3080 24564 echo ' .file 1 "foo.s"
8ada417f 24565 .file 1 "bar.s"' > conftest.s
e0b0fd74 24566 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24567 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24568 (eval $ac_try) 2>&5
24569 ac_status=$?
5213506e
RW
24570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24571 test $ac_status = 0; }; }
8ada417f
ZW
24572 then
24573 gcc_cv_as_dwarf2_file_buggy=yes
24574 else
24575 echo "configure: failed program was" >&5
24576 cat conftest.s >&5
24577 fi
24578 rm -f conftest.o conftest.s
24579 fi
ad9c4d9f 24580fi
5213506e
RW
24581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf2_file_buggy" >&5
24582$as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; }
8ada417f
ZW
24583
24584
24585 if test $gcc_cv_as_dwarf2_debug_line = yes \
24586 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2 24587
5213506e 24588$as_echo "#define HAVE_AS_DWARF2_DEBUG_LINE 1" >>confdefs.h
9d147085 24589
8ada417f 24590 fi
ad9c4d9f 24591
5213506e
RW
24592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf2 option" >&5
24593$as_echo_n "checking assembler for --gdwarf2 option... " >&6; }
24594if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then :
24595 $as_echo_n "(cached) " >&6
8ada417f
ZW
24596else
24597 gcc_cv_as_gdwarf2_flag=no
24598 if test $in_tree_gas = yes; then
24599 if test $in_tree_gas_is_elf = yes \
24600 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24601 then gcc_cv_as_gdwarf2_flag=yes
24602fi
24603 elif test x$gcc_cv_as != x; then
6e3f3080 24604 echo "$insn" > conftest.s
e0b0fd74 24605 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf2 -o conftest.o conftest.s >&5'
5213506e 24606 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24607 (eval $ac_try) 2>&5
24608 ac_status=$?
5213506e
RW
24609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24610 test $ac_status = 0; }; }
8ada417f
ZW
24611 then
24612 gcc_cv_as_gdwarf2_flag=yes
24613 else
24614 echo "configure: failed program was" >&5
24615 cat conftest.s >&5
24616 fi
24617 rm -f conftest.o conftest.s
24618 fi
ad9c4d9f 24619fi
5213506e
RW
24620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gdwarf2_flag" >&5
24621$as_echo "$gcc_cv_as_gdwarf2_flag" >&6; }
63cf211a 24622if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2 24623
5213506e 24624$as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2
GK
24625
24626fi
ad9c4d9f 24627
5213506e
RW
24628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
24629$as_echo_n "checking assembler for --gstabs option... " >&6; }
24630if test "${gcc_cv_as_gstabs_flag+set}" = set; then :
24631 $as_echo_n "(cached) " >&6
8ada417f
ZW
24632else
24633 gcc_cv_as_gstabs_flag=no
24634 if test $in_tree_gas = yes; then
24635 if test $in_tree_gas_is_elf = yes \
24636 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
24637 then gcc_cv_as_gstabs_flag=yes
24638fi
24639 elif test x$gcc_cv_as != x; then
6e3f3080 24640 echo "$insn" > conftest.s
e0b0fd74 24641 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gstabs -o conftest.o conftest.s >&5'
5213506e 24642 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24643 (eval $ac_try) 2>&5
24644 ac_status=$?
5213506e
RW
24645 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24646 test $ac_status = 0; }; }
8ada417f
ZW
24647 then
24648 # The native Solaris 9/Intel assembler doesn't understand --gstabs
24649 # and warns about it, but still exits successfully. So check for
24650 # this.
ba479fd2 24651 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
5213506e 24652 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
ba479fd2
NN
24653 (eval $ac_try) 2>&5
24654 ac_status=$?
5213506e
RW
24655 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24656 test $ac_status = 0; }; }
8ada417f
ZW
24657 then :
24658 else gcc_cv_as_gstabs_flag=yes
24659 fi
24660 else
24661 echo "configure: failed program was" >&5
24662 cat conftest.s >&5
24663 fi
24664 rm -f conftest.o conftest.s
24665 fi
ad9c4d9f 24666fi
5213506e
RW
24667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gstabs_flag" >&5
24668$as_echo "$gcc_cv_as_gstabs_flag" >&6; }
63cf211a 24669if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2 24670
5213506e 24671$as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h
5f0e9ea2 24672
c8aea42c
PB
24673fi
24674
5213506e
RW
24675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5
24676$as_echo_n "checking assembler for --debug-prefix-map option... " >&6; }
24677if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then :
24678 $as_echo_n "(cached) " >&6
c8aea42c
PB
24679else
24680 gcc_cv_as_debug_prefix_map_flag=no
24681 if test $in_tree_gas = yes; then
303a4698 24682 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
24683 then gcc_cv_as_debug_prefix_map_flag=yes
24684fi
24685 elif test x$gcc_cv_as != x; then
24686 echo "$insn" > conftest.s
e0b0fd74 24687 if { ac_try='$gcc_cv_as $gcc_cv_as_flags --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
5213506e 24688 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
c8aea42c
PB
24689 (eval $ac_try) 2>&5
24690 ac_status=$?
5213506e
RW
24691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24692 test $ac_status = 0; }; }
c8aea42c
PB
24693 then
24694 gcc_cv_as_debug_prefix_map_flag=yes
24695 else
24696 echo "configure: failed program was" >&5
24697 cat conftest.s >&5
24698 fi
24699 rm -f conftest.o conftest.s
24700 fi
24701fi
5213506e
RW
24702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_debug_prefix_map_flag" >&5
24703$as_echo "$gcc_cv_as_debug_prefix_map_flag" >&6; }
c8aea42c
PB
24704if test $gcc_cv_as_debug_prefix_map_flag = yes; then
24705
5213506e 24706$as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h
c8aea42c 24707
5f0e9ea2 24708fi
8ada417f 24709fi
5f0e9ea2 24710
5213506e
RW
24711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5
24712$as_echo_n "checking assembler for .lcomm with alignment... " >&6; }
24713if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then :
24714 $as_echo_n "(cached) " >&6
28e6bb13
NC
24715else
24716 gcc_cv_as_lcomm_with_alignment=no
24717 if test x$gcc_cv_as != x; then
24718 echo '.lcomm bar,4,16' > conftest.s
e0b0fd74 24719 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24720 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
28e6bb13
NC
24721 (eval $ac_try) 2>&5
24722 ac_status=$?
5213506e
RW
24723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24724 test $ac_status = 0; }; }
28e6bb13
NC
24725 then
24726 gcc_cv_as_lcomm_with_alignment=yes
24727 else
24728 echo "configure: failed program was" >&5
24729 cat conftest.s >&5
24730 fi
24731 rm -f conftest.o conftest.s
24732 fi
24733fi
5213506e
RW
24734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_lcomm_with_alignment" >&5
24735$as_echo "$gcc_cv_as_lcomm_with_alignment" >&6; }
28e6bb13
NC
24736if test $gcc_cv_as_lcomm_with_alignment = yes; then
24737
5213506e 24738$as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h
28e6bb13
NC
24739
24740fi
24741
5213506e
RW
24742# Check whether --enable-gnu-unique-object was given.
24743if test "${enable_gnu_unique_object+set}" = set; then :
24744 enableval=$enable_gnu_unique_object; case $enable_gnu_unique_object in
e31bcd1b 24745 yes | no) ;;
5213506e
RW
24746 *) as_fn_error "'$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object.
24747Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
e31bcd1b
JM
24748 esac
24749else
5213506e
RW
24750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_unique_object" >&5
24751$as_echo_n "checking assembler for gnu_unique_object... " >&6; }
24752if test "${gcc_cv_as_gnu_unique_object+set}" = set; then :
24753 $as_echo_n "(cached) " >&6
e31bcd1b
JM
24754else
24755 gcc_cv_as_gnu_unique_object=no
24756 if test $in_tree_gas = yes; then
24757 if test $in_tree_gas_is_elf = yes \
24758 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
24759 then gcc_cv_as_gnu_unique_object=yes
24760fi
24761 elif test x$gcc_cv_as != x; then
24762 echo '.type foo, @gnu_unique_object' > conftest.s
e0b0fd74 24763 if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
5213506e 24764 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
e31bcd1b
JM
24765 (eval $ac_try) 2>&5
24766 ac_status=$?
5213506e
RW
24767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24768 test $ac_status = 0; }; }
e31bcd1b 24769 then
e00ded68 24770 gcc_cv_as_gnu_unique_object=yes
e31bcd1b
JM
24771 else
24772 echo "configure: failed program was" >&5
24773 cat conftest.s >&5
24774 fi
24775 rm -f conftest.o conftest.s
24776 fi
24777fi
5213506e
RW
24778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5
24779$as_echo "$gcc_cv_as_gnu_unique_object" >&6; }
e31bcd1b 24780if test $gcc_cv_as_gnu_unique_object = yes; then
e00ded68
JM
24781 # Also check for ld.so support, i.e. glibc 2.11 or higher.
24782 if test x$host = x$build -a x$host = x$target &&
cdf6bfb7 24783 glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
1a242e3c
UB
24784 glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
24785 glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
e00ded68
JM
24786 glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
24787 if test "$glibcnum" -ge 2011 ; then
24788 enable_gnu_unique_object=yes
24789 fi
24790 fi
e31bcd1b 24791fi
5213506e
RW
24792fi
24793
e31bcd1b
JM
24794if test x$enable_gnu_unique_object = xyes; then
24795
5213506e 24796$as_echo "#define HAVE_GAS_GNU_UNIQUE_OBJECT 1" >>confdefs.h
e31bcd1b
JM
24797
24798fi
24799
5213506e
RW
24800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tolerance to line number 0" >&5
24801$as_echo_n "checking assembler for tolerance to line number 0... " >&6; }
24802if test "${gcc_cv_as_line_zero+set}" = set; then :
24803 $as_echo_n "(cached) " >&6
03943c05
AO
24804else
24805 gcc_cv_as_line_zero=no
24806 if test $in_tree_gas = yes; then
cf0eb7a1
AO
24807 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
24808 then gcc_cv_as_line_zero=yes
03943c05
AO
24809fi
24810 elif test "x$gcc_cv_as" != x; then
24811 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
24812 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
5213506e 24813 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
03943c05
AO
24814 (eval $ac_try) 2>&5
24815 ac_status=$?
5213506e
RW
24816 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24817 test $ac_status = 0; }; } &&
03943c05
AO
24818 test "x`cat conftest.out`" = x
24819 then
24820 gcc_cv_as_line_zero=yes
24821 else
24822 echo "configure: failed program was" >&5
24823 cat conftest.s >&5
24824 echo "configure: error output was" >&5
24825 cat conftest.out >&5
24826 fi
24827 rm -f conftest.o conftest.s conftest.out
24828 fi
24829fi
5213506e
RW
24830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_line_zero" >&5
24831$as_echo "$gcc_cv_as_line_zero" >&6; }
03943c05
AO
24832if test "x$gcc_cv_as_line_zero" = xyes; then
24833
5213506e 24834$as_echo "#define HAVE_AS_LINE_ZERO 1" >>confdefs.h
03943c05
AO
24835
24836fi
24837
5213506e
RW
24838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker PT_GNU_EH_FRAME support" >&5
24839$as_echo_n "checking linker PT_GNU_EH_FRAME support... " >&6; }
275b60d6 24840gcc_cv_ld_eh_frame_hdr=no
34a86c2b 24841if test $in_tree_ld = yes ; then
5408ac6c
HPN
24842 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 \
24843 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
24844 gcc_cv_ld_eh_frame_hdr=yes
24845 fi
24846elif test x$gcc_cv_ld != x; then
24847 # Check if linker supports --eh-frame-hdr option
24848 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
24849 gcc_cv_ld_eh_frame_hdr=yes
24850 fi
24851fi
232b67d9 24852
275b60d6 24853if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2 24854
5213506e 24855$as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
275b60d6
JJ
24856
24857fi
5213506e
RW
24858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
24859$as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
275b60d6 24860
5213506e
RW
24861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker position independent executable support" >&5
24862$as_echo_n "checking linker position independent executable support... " >&6; }
24a4dd31
JJ
24863gcc_cv_ld_pie=no
24864if test $in_tree_ld = yes ; then
5408ac6c
HPN
24865 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 \
24866 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
24867 gcc_cv_ld_pie=yes
24868 fi
24869elif test x$gcc_cv_ld != x; then
24870 # Check if linker supports -pie option
24871 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
24872 gcc_cv_ld_pie=yes
24873 fi
24874fi
24875if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2 24876
5213506e 24877$as_echo "#define HAVE_LD_PIE 1" >>confdefs.h
24a4dd31
JJ
24878
24879fi
5213506e
RW
24880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_pie" >&5
24881$as_echo "$gcc_cv_ld_pie" >&6; }
24a4dd31 24882
5213506e
RW
24883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker EH-compatible garbage collection of sections" >&5
24884$as_echo_n "checking linker EH-compatible garbage collection of sections... " >&6; }
22ba88ef 24885gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
24886if test $in_tree_ld = yes ; then
24887 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 \
24888 && test $in_tree_ld_is_elf = yes; then
24889 gcc_cv_ld_eh_gc_sections=yes
24890 fi
24891elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
24892 cat > conftest.s <<EOF
24893 .section .text
24894.globl _start
24895 .type _start, @function
24896_start:
24897 .long foo
24898 .size _start, .-_start
24899 .section .text.foo,"ax",@progbits
24900 .type foo, @function
24901foo:
24902 .long 0
24903 .size foo, .-foo
24904 .section .gcc_except_table.foo,"a",@progbits
24905.L0:
24906 .long 0
24907 .section .eh_frame,"a",@progbits
24908 .long .L0
24909EOF
24910 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24911 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24912 | grep "gc-sections option ignored" > /dev/null; then
24913 gcc_cv_ld_eh_gc_sections=no
2e2b183b
RO
24914 elif $gcc_cv_objdump -h conftest 2> /dev/null \
24915 | grep gcc_except_table > /dev/null; then
b639c3c2
JJ
24916 gcc_cv_ld_eh_gc_sections=yes
24917 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
24918 if test x$gcc_cv_as_comdat_group != xyes; then
24919 gcc_cv_ld_eh_gc_sections=no
24920 cat > conftest.s <<EOF
24921 .section .text
24922.globl _start
24923 .type _start, @function
24924_start:
24925 .long foo
24926 .size _start, .-_start
24927 .section .gnu.linkonce.t.foo,"ax",@progbits
24928 .type foo, @function
24929foo:
24930 .long 0
24931 .size foo, .-foo
24932 .section .gcc_except_table.foo,"a",@progbits
24933.L0:
24934 .long 0
24935 .section .eh_frame,"a",@progbits
24936 .long .L0
24937EOF
24938 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
24939 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
24940 | grep "gc-sections option ignored" > /dev/null; then
24941 gcc_cv_ld_eh_gc_sections=no
2e2b183b
RO
24942 elif $gcc_cv_objdump -h conftest 2> /dev/null \
24943 | grep gcc_except_table > /dev/null; then
b639c3c2
JJ
24944 gcc_cv_ld_eh_gc_sections=yes
24945 fi
24946 fi
24947 fi
24948 fi
24949 fi
24950 rm -f conftest.s conftest.o conftest
24951fi
e9d207d9
EB
24952case "$target" in
24953 hppa*-*-linux*)
24954 # ??? This apparently exposes a binutils bug with PC-relative relocations.
24955 gcc_cv_ld_eh_gc_sections=no
24956 ;;
24957esac
22ba88ef
EB
24958if test x$gcc_cv_ld_eh_gc_sections = xyes; then
24959
5213506e 24960$as_echo "#define HAVE_LD_EH_GC_SECTIONS 1" >>confdefs.h
22ba88ef
EB
24961
24962fi
5213506e
RW
24963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections" >&5
24964$as_echo "$gcc_cv_ld_eh_gc_sections" >&6; }
22ba88ef 24965
8bb915b6
NN
24966# --------
24967# UNSORTED
24968# --------
24969
5213506e
RW
24970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
24971$as_echo_n "checking linker --as-needed support... " >&6; }
24972if test "${gcc_cv_ld_as_needed+set}" = set; then :
24973 $as_echo_n "(cached) " >&6
82e923f6
RS
24974else
24975 gcc_cv_ld_as_needed=no
765f1bf9
AM
24976if test $in_tree_ld = yes ; then
24977 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 \
24978 && test $in_tree_ld_is_elf = yes; then
24979 gcc_cv_ld_as_needed=yes
24980 fi
24981elif test x$gcc_cv_ld != x; then
24982 # Check if linker supports --as-needed and --no-as-needed options
24983 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
24984 gcc_cv_ld_as_needed=yes
24985 fi
24986fi
82e923f6
RS
24987
24988fi
5213506e
RW
24989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_as_needed" >&5
24990$as_echo "$gcc_cv_ld_as_needed" >&6; }
765f1bf9
AM
24991if test x"$gcc_cv_ld_as_needed" = xyes; then
24992
5213506e 24993$as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h
765f1bf9
AM
24994
24995fi
765f1bf9 24996
d82bf747
AM
24997case "$target:$tm_file" in
24998 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
5213506e
RW
24999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5
25000$as_echo_n "checking linker support for omitting dot symbols... " >&6; }
25001if test "${gcc_cv_ld_no_dot_syms+set}" = set; then :
25002 $as_echo_n "(cached) " >&6
85b776df
AM
25003else
25004 gcc_cv_ld_no_dot_syms=no
25005 if test $in_tree_ld = yes ; then
25006 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
25007 gcc_cv_ld_no_dot_syms=yes
25008 fi
25009 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
25010 cat > conftest1.s <<EOF
25011 .text
25012 bl .foo
25013EOF
25014 cat > conftest2.s <<EOF
25015 .section ".opd","aw"
25016 .align 3
25017 .globl foo
25018 .type foo,@function
25019foo:
25020 .quad .LEfoo,.TOC.@tocbase,0
25021 .text
25022.LEfoo:
25023 blr
25024 .size foo,.-.LEfoo
25025EOF
25026 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
25027 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
25028 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
25029 gcc_cv_ld_no_dot_syms=yes
25030 fi
25031 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
25032 fi
25033
25034fi
5213506e
RW
25035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_no_dot_syms" >&5
25036$as_echo "$gcc_cv_ld_no_dot_syms" >&6; }
85b776df
AM
25037 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
25038
5213506e 25039$as_echo "#define HAVE_LD_NO_DOT_SYMS 1" >>confdefs.h
85b776df 25040
070b27da
AM
25041 fi
25042
25043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker large toc support" >&5
25044$as_echo_n "checking linker large toc support... " >&6; }
25045if test "${gcc_cv_ld_large_toc+set}" = set; then :
25046 $as_echo_n "(cached) " >&6
25047else
25048 gcc_cv_ld_large_toc=no
25049 if test $in_tree_ld = yes ; then
25050 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
25051 gcc_cv_ld_large_toc=yes
25052 fi
25053 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
25054 cat > conftest.s <<EOF
25055 .section ".tbss","awT",@nobits
25056 .align 3
25057ie0: .space 8
25058 .global _start
25059 .text
25060_start:
25061 addis 9,13,ie0@got@tprel@ha
25062 ld 9,ie0@got@tprel@l(9)
25063EOF
25064 if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \
25065 && $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then
25066 gcc_cv_ld_large_toc=yes
25067 fi
25068 rm -f conftest conftest.o conftest.s
25069 fi
25070
25071fi
25072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_large_toc" >&5
25073$as_echo "$gcc_cv_ld_large_toc" >&6; }
25074 if test x"$gcc_cv_ld_large_toc" = xyes; then
25075
25076$as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h
25077
85b776df
AM
25078 fi
25079 ;;
25080esac
25081
5213506e
RW
25082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5
25083$as_echo_n "checking linker --build-id support... " >&6; }
25084if test "${gcc_cv_ld_buildid+set}" = set; then :
25085 $as_echo_n "(cached) " >&6
cd533689
PP
25086else
25087 gcc_cv_ld_buildid=no
25088 if test $in_tree_ld = yes ; then
25089 if test "$gcc_cv_gld_major_version" -eq 2 -a \
25090 "$gcc_cv_gld_minor_version" -ge 18 -o \
25091 "$gcc_cv_gld_major_version" -gt 2 \
25092 && test $in_tree_ld_is_elf = yes; then
25093 gcc_cv_ld_buildid=yes
25094 fi
25095 elif test x$gcc_cv_ld != x; then
25096 if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then
25097 gcc_cv_ld_buildid=yes
25098 fi
25099 fi
25100fi
5213506e
RW
25101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_buildid" >&5
25102$as_echo "$gcc_cv_ld_buildid" >&6; }
cd533689
PP
25103if test x"$gcc_cv_ld_buildid" = xyes; then
25104
5213506e 25105$as_echo "#define HAVE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
25106
25107fi
25108
5213506e
RW
25109# Check whether --enable-linker-build-id was given.
25110if test "${enable_linker_build_id+set}" = set; then :
25111 enableval=$enable_linker_build_id;
cd533689
PP
25112else
25113 enable_linker_build_id=no
5213506e
RW
25114fi
25115
cd533689
PP
25116
25117if test x"$enable_linker_build_id" = xyes; then
25118 if test x"$gcc_cv_ld_buildid" = xyes; then
25119
5213506e 25120$as_echo "#define ENABLE_LD_BUILDID 1" >>confdefs.h
cd533689
PP
25121
25122 else
5213506e
RW
25123 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&5
25124$as_echo "$as_me: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&2;}
cd533689
PP
25125 fi
25126fi
25127
a6198222
RO
25128# In binutils 2.21, GNU ld gained support for new emulations fully
25129# supporting the Solaris 2 ABI. Detect their presence in the linker used.
25130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker *_sol2 emulation support" >&5
25131$as_echo_n "checking linker *_sol2 emulation support... " >&6; }
25132if test "${gcc_cv_ld_sol2_emulation+set}" = set; then :
25133 $as_echo_n "(cached) " >&6
25134else
25135 gcc_cv_ld_sol2_emulation=no
25136 if test $in_tree_ld = yes ; then
25137 if test "$gcc_cv_gld_major_version" -eq 2 -a \
25138 "$gcc_cv_gld_minor_version" -ge 21 -o \
25139 "$gcc_cv_gld_major_version" -gt 2 \
25140 && test $in_tree_ld_is_elf = yes; then
25141 gcc_cv_ld_sol2_emulation=yes
25142 fi
25143 elif test x$gcc_cv_ld != x; then
25144 if $gcc_cv_ld -V 2>/dev/null | sed -e '1,/Supported emulations/d;q' | \
25145 grep _sol2 > /dev/null; then
25146 gcc_cv_ld_sol2_emulation=yes
25147 fi
25148 fi
25149fi
25150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sol2_emulation" >&5
25151$as_echo "$gcc_cv_ld_sol2_emulation" >&6; }
25152if test x"$gcc_cv_ld_sol2_emulation" = xyes; then
25153
25154$as_echo "#define HAVE_LD_SOL2_EMULATION 1" >>confdefs.h
25155
25156fi
25157
5213506e
RW
25158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --sysroot support" >&5
25159$as_echo_n "checking linker --sysroot support... " >&6; }
25160if test "${gcc_cv_ld_sysroot+set}" = set; then :
25161 $as_echo_n "(cached) " >&6
380e5ca4
MM
25162else
25163 gcc_cv_ld_sysroot=no
25164 if test $in_tree_ld = yes ; then
25165 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 25166 gcc_cv_ld_sysroot=yes
380e5ca4
MM
25167 fi
25168 elif test x$gcc_cv_ld != x; then
25169 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
25170 gcc_cv_ld_sysroot=yes
25171 fi
25172 fi
25173fi
5213506e
RW
25174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sysroot" >&5
25175$as_echo "$gcc_cv_ld_sysroot" >&6; }
380e5ca4
MM
25176if test x"$gcc_cv_ld_sysroot" = xyes; then
25177
5213506e 25178$as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h
380e5ca4
MM
25179
25180fi
25181
9fb28a67 25182if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
25183 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
25184 && test "$prefix" != "NONE"; then
ba479fd2
NN
25185
25186cat >>confdefs.h <<_ACEOF
793e9558 25187#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 25188_ACEOF
793e9558
PB
25189
25190fi
25191
77008252 25192# Test for stack protector support in target C library.
5213506e
RW
25193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5
25194$as_echo_n "checking __stack_chk_fail in target C library... " >&6; }
25195if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
25196 $as_echo_n "(cached) " >&6
77008252
JJ
25197else
25198 gcc_cv_libc_provides_ssp=no
a6ccdbab 25199 case "$target" in
22f96a0f 25200 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
77008252 25201 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
b0a69d20
MK
25202 if test "x$with_headers" != x; then
25203 glibc_header_dir=$with_headers
25204 elif test "x$with_sysroot" = x; then
77008252 25205 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
25206 elif test "x$with_build_sysroot" != "x"; then
25207 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
25208 elif test "x$with_sysroot" = xyes; then
25209 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
25210 else
25211 glibc_header_dir="${with_sysroot}/usr/include"
25212 fi
25213 else
25214 glibc_header_dir=/usr/include
25215 fi
25216 # glibc 2.4 and later provides __stack_chk_fail and
25217 # either __stack_chk_guard, or TLS access to stack guard canary.
25218 if test -f $glibc_header_dir/features.h \
25219 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
25220 $glibc_header_dir/features.h > /dev/null; then
25221 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
25222 $glibc_header_dir/features.h > /dev/null; then
25223 gcc_cv_libc_provides_ssp=yes
25224 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
25225 $glibc_header_dir/features.h > /dev/null \
25226 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
25227 $glibc_header_dir/features.h > /dev/null; then
25228 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
25229 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
25230 $glibc_header_dir/features.h > /dev/null && \
25231 test -f $glibc_header_dir/bits/uClibc_config.h && \
25232 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
25233 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
25234 gcc_cv_libc_provides_ssp=yes
77008252 25235 fi
fed6d628 25236 fi
a6ccdbab 25237 ;;
4cc115a2
TS
25238 *-*-gnu*)
25239 # Avoid complicated tests (see
25240 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
25241 # simply assert that glibc does provide this, which is true for all
25242 # realistically usable GNU/Hurd configurations.
25243 gcc_cv_libc_provides_ssp=yes;;
61e1d511 25244 *-*-darwin* | *-*-freebsd*)
5213506e
RW
25245 ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
25246if test "x$ac_cv_func___stack_chk_fail" = x""yes; then :
a6ccdbab
EC
25247 gcc_cv_libc_provides_ssp=yes
25248else
25249 echo "no __stack_chk_fail on this target"
77008252 25250fi
a6ccdbab
EC
25251
25252 ;;
77008252 25253 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
25254 esac
25255fi
5213506e
RW
25256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_libc_provides_ssp" >&5
25257$as_echo "$gcc_cv_libc_provides_ssp" >&6; }
a6ccdbab 25258
77008252
JJ
25259if test x$gcc_cv_libc_provides_ssp = xyes; then
25260
5213506e 25261$as_echo "#define TARGET_LIBC_PROVIDES_SSP 1" >>confdefs.h
77008252
JJ
25262
25263fi
25264
ed965309
JJ
25265# Check if TFmode long double should be used by default or not.
25266# Some glibc targets used DFmode long double, but with glibc 2.4
25267# and later they can use TFmode.
25268case "$target" in
f7cc5390
JM
25269 powerpc*-*-linux* | \
25270 powerpc*-*-gnu* | \
ed965309
JJ
25271 sparc*-*-linux* | \
25272 s390*-*-linux* | \
25273 alpha*-*-linux*)
25274
5213506e
RW
25275# Check whether --with-long-double-128 was given.
25276if test "${with_long_double_128+set}" = set; then :
25277 withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
25278else
25279 gcc_cv_target_ldbl128=no
25280 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
25281 if test "x$with_sysroot" = x; then
25282 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
25283 elif test "x$with_build_sysroot" != "x"; then
25284 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
25285 elif test "x$with_sysroot" = xyes; then
25286 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
25287 else
25288 glibc_header_dir="${with_sysroot}/usr/include"
25289 fi
25290 else
25291 glibc_header_dir=/usr/include
25292 fi
65280f6c 25293 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
25294 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
25295 && gcc_cv_target_ldbl128=yes
65280f6c 25296
5213506e
RW
25297fi
25298
ed965309
JJ
25299 ;;
25300esac
25301if test x$gcc_cv_target_ldbl128 = xyes; then
25302
5213506e 25303$as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h
ed965309
JJ
25304
25305fi
25306
81bf3d9e 25307# Find out what GC implementation we want, or may, use.
ba479fd2 25308
5213506e
RW
25309# Check whether --with-gc was given.
25310if test "${with_gc+set}" = set; then :
25311 withval=$with_gc; case "$withval" in
08cee789 25312 page)
81bf3d9e 25313 GGC=ggc-$withval
08cee789
DJ
25314 ;;
25315 zone)
25316 GGC=ggc-$withval
25317
5213506e 25318$as_echo "#define GGC_ZONE 1" >>confdefs.h
08cee789 25319
81bf3d9e
RH
25320 ;;
25321 *)
5213506e 25322 as_fn_error "$withval is an invalid option to --with-gc" "$LINENO" 5
81bf3d9e
RH
25323 ;;
25324esac
25325else
005537df 25326 GGC=ggc-page
5213506e
RW
25327fi
25328
81bf3d9e
RH
25329
25330echo "Using $GGC for garbage collection."
25331
00020c16
ILT
25332# Libraries to use on the host. This will normally be set by the top
25333# level Makefile. Here we simply capture the value for our Makefile.
25334if test -z "${HOST_LIBS+set}"; then
25335 HOST_LIBS=
25336fi
25337
25338
3c809ba4 25339# Use the system's zlib library.
b8dad04b
ZW
25340zlibdir=-L../zlib
25341zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 25342
5213506e
RW
25343# Check whether --with-system-zlib was given.
25344if test "${with_system_zlib+set}" = set; then :
25345 withval=$with_system_zlib; zlibdir=
3c809ba4
AG
25346zlibinc=
25347
5213506e
RW
25348fi
25349
b8ec3cc8 25350
703d89ab 25351
ab22c1fa 25352
1a4b763e 25353
5213506e
RW
25354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
25355$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
25356 # Check whether --enable-maintainer-mode was given.
25357if test "${enable_maintainer_mode+set}" = set; then :
25358 enableval=$enable_maintainer_mode; maintainer_mode=$enableval
dc6746e7
PT
25359else
25360 maintainer_mode=no
5213506e 25361fi
a6ccdbab 25362
5213506e
RW
25363
25364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5
25365$as_echo "$maintainer_mode" >&6; }
dc6746e7
PT
25366
25367if test "$maintainer_mode" = "yes"; then
25368 MAINT=''
25369else
25370 MAINT='#'
25371fi
25372
8bb915b6
NN
25373# --------------
25374# Language hooks
25375# --------------
25376
861bb6c1
JL
25377# Make empty files to contain the specs and options for each language.
25378# Then add #include lines to for a compiler that has specs and/or options.
25379
cc11cc9b 25380subdirs=
d7b42618 25381lang_opt_files=
861bb6c1 25382lang_specs_files=
3103b7db 25383lang_tree_files=
861bb6c1
JL
25384# These (without "all_") are set in each config-lang.in.
25385# `language' must be a single word so is spelled singularly.
25386all_languages=
861bb6c1 25387all_compilers=
47ad7893 25388all_outputs='Makefile gccbug'
861bb6c1 25389# List of language makefile fragments.
2ed26f6b 25390all_lang_makefrags=
703d89ab 25391# Additional files for gengtype
ef69da62 25392all_gtfiles="$target_gtfiles"
861bb6c1 25393
cc11cc9b
PB
25394# These are the languages that are set in --enable-languages,
25395# and are available in the GCC tree.
25396all_selected_languages=
25397
861bb6c1
JL
25398# Add the language fragments.
25399# Languages are added via two mechanisms. Some information must be
25400# recorded in makefile variables, these are defined in config-lang.in.
25401# We accumulate them and plug them into the main Makefile.
25402# The other mechanism is a set of hooks for each of the main targets
25403# like `clean', `install', etc.
25404
861bb6c1 25405language_hooks="Make-hooks"
861bb6c1 25406
cc11cc9b 25407for lang in ${srcdir}/*/config-lang.in
861bb6c1 25408do
1546bb64
PB
25409 test "$lang" = "${srcdir}/*/config-lang.in" && continue
25410
cc11cc9b
PB
25411 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
25412 if test "x$lang_alias" = x
25413 then
25414 echo "$lang doesn't set \$language." 1>&2
25415 exit 1
25416 fi
25417 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
25418 subdirs="$subdirs $subdir"
349c3166
OH
25419
25420 # $gcc_subdir is where the gcc integration files are to be found
25421 # for a language, both for internal compiler purposes (compiler
25422 # sources implementing front-end to GCC tree converters), and for
25423 # build infrastructure purposes (Make-lang.in, etc.)
25424 #
25425 # This will be <subdir> (relative to $srcdir) if a line like
25426 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
25427 # is found in <langdir>/config-lang.in, and will remain <langdir>
25428 # otherwise.
25429 #
25430 # Except for the language alias (fetched above), the regular
25431 # "config-lang.in" contents are always retrieved from $gcc_subdir,
25432 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
25433 # only this and the language alias.
25434
25435 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
25436 if [ "$gcc_subdir" = "" ]; then
25437 gcc_subdir="$subdir"
25438 fi
25439
cc11cc9b
PB
25440 case ",$enable_languages," in
25441 *,$lang_alias,*)
25442 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
25443 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
25444 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
25445 fi
25446 ;;
25447 esac
25448
cc11cc9b
PB
25449 language=
25450 boot_language=
25451 compilers=
cc11cc9b
PB
25452 outputs=
25453 gtfiles=
1546bb64 25454 subdir_requires=
349c3166 25455 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
25456 if test "x$language" = x
25457 then
349c3166 25458 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
25459 exit 1
25460 fi
1546bb64
PB
25461
25462 ok=:
25463 case ",$enable_languages," in
25464 *,$lang_alias,*) ;;
25465 *)
25466 for i in $subdir_requires; do
b6348cb3 25467 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
25468 ok=false
25469 break
25470 done
25471 ;;
25472 esac
25473 $ok || continue
25474
349c3166
OH
25475 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
25476 if test -f $srcdir/$gcc_subdir/lang.opt; then
25477 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 25478 fi
349c3166
OH
25479 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
25480 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 25481 fi
cc11cc9b 25482 all_languages="$all_languages $language"
cc11cc9b 25483 all_compilers="$all_compilers $compilers"
cc11cc9b 25484 all_outputs="$all_outputs $outputs"
703d89ab 25485 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
d7f09764
DN
25486 case ",$enable_languages," in
25487 *,lto,*)
25488
25489$as_echo "#define ENABLE_LTO 1" >>confdefs.h
25490
25491 enable_lto=yes
25492
3bec79c5
DK
25493 # LTO needs to speak the platform's object file format, and has a
25494 # number of implementations of the required binary file access APIs.
25495 # ELF is the most common, and default. We only link libelf if ELF
25496 # is indeed the selected format.
25497 LTO_BINARY_READER=${lto_binary_reader}
25498 LTO_USE_LIBELF=-lelf
25499 if test "x$lto_binary_reader" != "xlto-elf" ; then
25500 LTO_USE_LIBELF=
25501 fi
25502
25503
d7f09764
DN
25504 ;;
25505 *) ;;
25506 esac
861bb6c1
JL
25507done
25508
8ac9d31f
TJ
25509# Pick up gtfiles for c
25510gtfiles=
8ac9d31f 25511. ${srcdir}/c-config-lang.in
703d89ab 25512all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 25513
cbc59f01 25514check_languages=
cc11cc9b 25515for language in $all_selected_languages
cbc59f01 25516do
cc11cc9b 25517 check_languages="$check_languages check-$language"
cbc59f01
DD
25518done
25519
62b81e45 25520# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 25521# lang.${target}. Only do so for selected languages.
861bb6c1
JL
25522
25523rm -f Make-hooks
25524touch Make-hooks
bd97af06 25525target_list="all.cross start.encap rest.encap tags \
55bcd32b
AJ
25526 install-common install-man install-info install-pdf install-html dvi \
25527 pdf html uninstall info man srcextra srcman srcinfo \
2a4c0366 25528 mostlyclean clean distclean maintainer-clean install-plugin"
cc11cc9b 25529
861bb6c1
JL
25530for t in $target_list
25531do
25532 x=
cc11cc9b 25533 for lang in $all_selected_languages
861bb6c1 25534 do
cc11cc9b 25535 x="$x $lang.$t"
861bb6c1
JL
25536 done
25537 echo "lang.$t: $x" >> Make-hooks
25538done
25539
8bb915b6
NN
25540# --------
25541# UNSORTED
25542# --------
25543
cc06d68c 25544# Create .gdbinit.
861bb6c1 25545
cc06d68c
GP
25546echo "dir ." > .gdbinit
25547echo "dir ${srcdir}" >> .gdbinit
25548if test x$gdb_needs_out_file_path = xyes
25549then
25550 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
25551fi
25552if test "x$subdirs" != x; then
25553 for s in $subdirs
25554 do
25555 echo "dir ${srcdir}/$s" >> .gdbinit
25556 done
861bb6c1 25557fi
cc06d68c 25558echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 25559
15c723f3 25560gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
25561
25562
2ce3c6c6 25563
2bbea3a6
RH
25564# Find a directory in which to install a shared libgcc.
25565
5213506e
RW
25566# Check whether --enable-version-specific-runtime-libs was given.
25567if test "${enable_version_specific_runtime_libs+set}" = set; then :
25568 enableval=$enable_version_specific_runtime_libs;
25569fi
ba479fd2 25570
2bbea3a6
RH
25571
25572
5213506e
RW
25573# Check whether --with-slibdir was given.
25574if test "${with_slibdir+set}" = set; then :
25575 withval=$with_slibdir; slibdir="$with_slibdir"
5b15f277
RH
25576else
25577 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 25578 slibdir='$(libsubdir)'
5b15f277 25579elif test "$host" != "$target"; then
2bbea3a6
RH
25580 slibdir='$(build_tooldir)/lib'
25581else
5b15f277 25582 slibdir='$(libdir)'
2bbea3a6 25583fi
5213506e
RW
25584fi
25585
2bbea3a6
RH
25586
25587
703d89ab 25588# Substitute configuration variables
861bb6c1
JL
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
9b16d2c4 25633
e9a25f70 25634
6e26218f 25635
c8724862 25636
11642c3a
ZW
25637
25638
25639
3d9d2476 25640
e2500fed 25641
a0e527e3 25642
aca600aa
AS
25643
25644
25645
9b91e436
KT
25646
25647
c776a6d0 25648
51b9ff45 25649
861bb6c1 25650
6e3f3080
NN
25651# Echo link setup.
25652if test x${build} = x${host} ; then
25653 if test x${host} = x${target} ; then
25654 echo "Links are now set up to build a native compiler for ${target}." 1>&2
25655 else
25656 echo "Links are now set up to build a cross-compiler" 1>&2
25657 echo " from ${host} to ${target}." 1>&2
25658 fi
25659else
25660 if test x${host} = x${target} ; then
25661 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
25662 echo " for ${target}." 1>&2
25663 else
25664 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
25665 echo " from ${host} to ${target}." 1>&2
25666 fi
25667fi
25668
6de9cd9a
DN
25669
25670
25671
f8bf9252
SP
25672
25673
25674
25675
25676
25677if test "x${CLOOGLIBS}" != "x" ; then
25678
5213506e 25679$as_echo "#define HAVE_cloog 1" >>confdefs.h
f8bf9252 25680
f8bf9252
SP
25681fi
25682
d7f09764
DN
25683
25684
25685if test "x${LIBELFLIBS}" != "x" ; then
25686
25687$as_echo "#define HAVE_libelf 1" >>confdefs.h
25688
25689fi
25690
68a607d8 25691# Check for plugin support
5213506e
RW
25692# Check whether --enable-plugin was given.
25693if test "${enable_plugin+set}" = set; then :
25694 enableval=$enable_plugin; enable_plugin=$enableval
68a607d8
DN
25695else
25696 enable_plugin=yes; default_plugin=yes
5213506e
RW
25697fi
25698
68a607d8
DN
25699
25700pluginlibs=
68a607d8 25701
709e26f0
MK
25702case "${host}" in
25703 *-*-darwin*)
25704 if test x$build = x$host; then
25705 export_sym_check="nm${exeext} -g"
515871c7 25706 elif test x$host = x$target; then
9ec69d2e 25707 export_sym_check="$gcc_cv_nm -g"
709e26f0
MK
25708 else
25709 export_sym_check=
25710 fi
25711 ;;
25712 *)
25713 if test x$build = x$host; then
25714 export_sym_check="objdump${exeext} -T"
515871c7 25715 elif test x$host = x$target; then
9ec69d2e 25716 export_sym_check="$gcc_cv_objdump -T"
709e26f0
MK
25717 else
25718 export_sym_check=
25719 fi
25720 ;;
25721esac
25722
25723if test x"$enable_plugin" = x"yes"; then
25724
601fc26e
SE
25725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5
25726$as_echo_n "checking for exported symbols... " >&6; }
709e26f0
MK
25727 if test "x$export_sym_check" != x; then
25728 echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
25729 ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
9ec69d2e 25730 if $export_sym_check conftest | grep foobar > /dev/null; then
709e26f0
MK
25731 : # No need to use a flag
25732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25733$as_echo "yes" >&6; }
601fc26e 25734 else
709e26f0
MK
25735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25736$as_echo "yes" >&6; }
25737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5
25738$as_echo_n "checking for -rdynamic... " >&6; }
25739 ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
25740 if $export_sym_check conftest | grep foobar > /dev/null; then
25741 plugin_rdynamic=yes
25742 pluginlibs="-rdynamic"
25743 else
25744 plugin_rdynamic=no
25745 enable_plugin=no
25746 fi
25747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_rdynamic" >&5
fcf52686 25748$as_echo "$plugin_rdynamic" >&6; }
709e26f0
MK
25749 fi
25750 else
25751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to check" >&5
25752$as_echo "unable to check" >&6; }
68a607d8
DN
25753 fi
25754
25755 # Check -ldl
30ce157e 25756 saved_LIBS="$LIBS"
0c2edd9f
ILT
25757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
25758$as_echo_n "checking for library containing dlopen... " >&6; }
25759if test "${ac_cv_search_dlopen+set}" = set; then :
25760 $as_echo_n "(cached) " >&6
25761else
25762 ac_func_search_save_LIBS=$LIBS
25763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8 25764/* end confdefs.h. */
0c2edd9f
ILT
25765
25766/* Override any GCC internal prototype to avoid an error.
25767 Use char because int might match the return type of a GCC
25768 builtin and then its argument prototype would still apply. */
25769#ifdef __cplusplus
25770extern "C"
25771#endif
25772char dlopen ();
68a607d8
DN
25773int
25774main ()
25775{
0c2edd9f 25776return dlopen ();
68a607d8
DN
25777 ;
25778 return 0;
25779}
25780_ACEOF
0c2edd9f
ILT
25781for ac_lib in '' dl; do
25782 if test -z "$ac_lib"; then
25783 ac_res="none required"
25784 else
25785 ac_res=-l$ac_lib
25786 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25787 fi
25788 if ac_fn_c_try_link "$LINENO"; then :
25789 ac_cv_search_dlopen=$ac_res
68a607d8 25790fi
5213506e 25791rm -f core conftest.err conftest.$ac_objext \
0c2edd9f
ILT
25792 conftest$ac_exeext
25793 if test "${ac_cv_search_dlopen+set}" = set; then :
25794 break
25795fi
25796done
25797if test "${ac_cv_search_dlopen+set}" = set; then :
25798
25799else
25800 ac_cv_search_dlopen=no
25801fi
25802rm conftest.$ac_ext
25803LIBS=$ac_func_search_save_LIBS
25804fi
25805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
25806$as_echo "$ac_cv_search_dlopen" >&6; }
25807ac_res=$ac_cv_search_dlopen
25808if test "$ac_res" != no; then :
25809 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25810
25811fi
25812
25813 if test x"$ac_cv_search_dlopen" = x"-ldl"; then
68a607d8
DN
25814 pluginlibs="$pluginlibs -ldl"
25815 fi
30ce157e 25816 LIBS="$saved_LIBS"
68a607d8
DN
25817
25818 # Check that we can build shared objects with -fPIC -shared
30ce157e 25819 saved_LDFLAGS="$LDFLAGS"
9ec69d2e
JH
25820 case "${host}" in
25821 *-*-darwin*)
25822 LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
25823 ;;
25824 *)
25825 LDFLAGS="$LDFLAGS -fPIC -shared"
25826 ;;
25827 esac
5213506e
RW
25828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
25829$as_echo_n "checking for -fPIC -shared... " >&6; }
25830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68a607d8
DN
25831/* end confdefs.h. */
25832extern int X;
25833int
25834main ()
25835{
25836return X == 0;
25837 ;
25838 return 0;
25839}
25840_ACEOF
5213506e
RW
25841if ac_fn_c_try_link "$LINENO"; then :
25842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25843$as_echo "yes" >&6; }; have_pic_shared=yes
68a607d8 25844else
5213506e
RW
25845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25846$as_echo "no" >&6; }; have_pic_shared=no
68a607d8 25847fi
5213506e
RW
25848rm -f core conftest.err conftest.$ac_objext \
25849 conftest$ac_exeext conftest.$ac_ext
0c2edd9f 25850 if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
68a607d8
DN
25851 pluginlibs=
25852 enable_plugin=no
25853 fi
30ce157e 25854 LDFLAGS="$saved_LDFLAGS"
68a607d8
DN
25855
25856 # If plugin support had been requested but not available, fail.
25857 if test x"$enable_plugin" = x"no" ; then
25858 if test x"$default_plugin" != x"yes"; then
5213506e 25859 as_fn_error "
68a607d8 25860Building GCC with plugin support requires a host that supports
5213506e 25861-fPIC, -shared, -ldl and -rdynamic." "$LINENO" 5
68a607d8
DN
25862 fi
25863 fi
68a607d8
DN
25864fi
25865
25866
25867
25868if test x"$enable_plugin" = x"yes"; then
25869
5213506e 25870$as_echo "#define ENABLE_PLUGIN 1" >>confdefs.h
68a607d8
DN
25871
25872fi
25873
6e3f3080
NN
25874# Configure the subdirectories
25875# AC_CONFIG_SUBDIRS($subdirs)
25876
25877# Create the Makefile
25878# and configure language subdirectories
5213506e 25879ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
25880
25881
5213506e 25882ac_config_commands="$ac_config_commands default"
914c5af7 25883
ba479fd2 25884cat >confcache <<\_ACEOF
6e3f3080
NN
25885# This file is a shell script that caches the results of configure
25886# tests run on this system so they can be shared between configure
ba479fd2
NN
25887# scripts and configure runs, see configure's option --config-cache.
25888# It is not useful on other systems. If it contains results you don't
25889# want to keep, you may remove or edit it.
6e3f3080 25890#
ba479fd2
NN
25891# config.status only pays attention to the cache file if you give it
25892# the --recheck option to rerun configure.
6e3f3080 25893#
ba479fd2
NN
25894# `ac_cv_env_foo' variables (set or unset) will be overridden when
25895# loading this file, other *unset* `ac_cv_foo' will be assigned the
25896# following values.
25897
25898_ACEOF
25899
6e3f3080
NN
25900# The following way of writing the cache mishandles newlines in values,
25901# but we know of no workaround that is simple, portable, and efficient.
5213506e 25902# So, we kill variables containing newlines.
6e3f3080
NN
25903# Ultrix sh set writes to stderr and can't be redirected directly,
25904# and sets the high bit in the cache file unless we assign to the vars.
5213506e
RW
25905(
25906 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25907 eval ac_val=\$$ac_var
25908 case $ac_val in #(
25909 *${as_nl}*)
25910 case $ac_var in #(
25911 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25912$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25913 esac
25914 case $ac_var in #(
25915 _ | IFS | as_nl) ;; #(
25916 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25917 *) { eval $ac_var=; unset $ac_var;} ;;
25918 esac ;;
25919 esac
25920 done
25921
ba479fd2 25922 (set) 2>&1 |
5213506e
RW
25923 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25924 *${as_nl}ac_space=\ *)
25925 # `set' does not quote correctly, so add quotes: double-quote
25926 # substitution turns \\\\ into \\, and sed turns \\ into \.
ba479fd2 25927 sed -n \
86da66b5
HPN
25928 "s/'/'\\\\''/g;
25929 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5213506e 25930 ;; #(
ba479fd2
NN
25931 *)
25932 # `set' quotes correctly as required by POSIX, so do not add quotes.
5213506e 25933 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 25934 ;;
5213506e
RW
25935 esac |
25936 sort
25937) |
ba479fd2 25938 sed '
5213506e 25939 /^ac_cv_env_/b end
ba479fd2 25940 t clear
5213506e 25941 :clear
ba479fd2
NN
25942 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25943 t end
5213506e
RW
25944 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25945 :end' >>confcache
25946if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25947 if test -w "$cache_file"; then
25948 test "x$cache_file" != "x/dev/null" &&
25949 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25950$as_echo "$as_me: updating cache $cache_file" >&6;}
ba479fd2 25951 cat confcache >$cache_file
6e3f3080 25952 else
5213506e
RW
25953 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25954$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6e3f3080
NN
25955 fi
25956fi
25957rm -f confcache
25958
25959test "x$prefix" = xNONE && prefix=$ac_default_prefix
25960# Let make expand exec_prefix.
25961test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25962
63cf211a 25963DEFS=-DHAVE_CONFIG_H
6e3f3080 25964
ba479fd2
NN
25965ac_libobjs=
25966ac_ltlibobjs=
25967for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25968 # 1. Remove the extension, and $U if already installed.
5213506e
RW
25969 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25970 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25971 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25972 # will be set to the directory where LIBOBJS objects are built.
25973 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25974 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
ba479fd2
NN
25975done
25976LIBOBJS=$ac_libobjs
63cf211a 25977
ba479fd2
NN
25978LTLIBOBJS=$ac_ltlibobjs
25979
25980
25981
5213506e 25982
ba479fd2 25983: ${CONFIG_STATUS=./config.status}
5213506e 25984ac_write_fail=0
ba479fd2
NN
25985ac_clean_files_save=$ac_clean_files
25986ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5213506e
RW
25987{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25988$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25989as_write_fail=0
25990cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
ba479fd2
NN
25991#! $SHELL
25992# Generated by $as_me.
6e3f3080
NN
25993# Run this file to recreate the current configuration.
25994# Compiler output produced by configure, useful for debugging
ba479fd2 25995# configure, is in config.log if it exists.
6e3f3080 25996
ba479fd2
NN
25997debug=false
25998ac_cs_recheck=false
25999ac_cs_silent=false
ba479fd2 26000
5213506e
RW
26001SHELL=\${CONFIG_SHELL-$SHELL}
26002export SHELL
26003_ASEOF
26004cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26005## -------------------- ##
26006## M4sh Initialization. ##
26007## -------------------- ##
ba479fd2 26008
5213506e
RW
26009# Be more Bourne compatible
26010DUALCASE=1; export DUALCASE # for MKS sh
26011if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
ba479fd2
NN
26012 emulate sh
26013 NULLCMD=:
5213506e 26014 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
ba479fd2
NN
26015 # is contrary to our usage. Disable this feature.
26016 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
26017 setopt NO_GLOB_SUBST
26018else
26019 case `(set -o) 2>/dev/null` in #(
26020 *posix*) :
26021 set -o posix ;; #(
26022 *) :
26023 ;;
26024esac
2f41c1d6 26025fi
ab22c1fa 26026
5213506e
RW
26027
26028as_nl='
26029'
26030export as_nl
26031# Printing a long string crashes Solaris 7 /usr/bin/printf.
26032as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26033as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26034as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26035# Prefer a ksh shell builtin over an external printf program on Solaris,
26036# but without wasting forks for bash or zsh.
26037if test -z "$BASH_VERSION$ZSH_VERSION" \
26038 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26039 as_echo='print -r --'
26040 as_echo_n='print -rn --'
26041elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26042 as_echo='printf %s\n'
26043 as_echo_n='printf %s'
26044else
26045 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26046 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26047 as_echo_n='/usr/ucb/echo -n'
26048 else
26049 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26050 as_echo_n_body='eval
26051 arg=$1;
26052 case $arg in #(
26053 *"$as_nl"*)
26054 expr "X$arg" : "X\\(.*\\)$as_nl";
26055 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26056 esac;
26057 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26058 '
26059 export as_echo_n_body
26060 as_echo_n='sh -c $as_echo_n_body as_echo'
26061 fi
26062 export as_echo_body
26063 as_echo='sh -c $as_echo_body as_echo'
26064fi
26065
26066# The user is always right.
26067if test "${PATH_SEPARATOR+set}" != set; then
26068 PATH_SEPARATOR=:
26069 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26070 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26071 PATH_SEPARATOR=';'
26072 }
1a4b763e
BS
26073fi
26074
ab22c1fa 26075
5213506e
RW
26076# IFS
26077# We need space, tab and new line, in precisely that order. Quoting is
26078# there to prevent editors from complaining about space-tab.
26079# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26080# splitting by setting IFS to empty value.)
26081IFS=" "" $as_nl"
26082
26083# Find who we are. Look in the path if we contain no directory separator.
26084case $0 in #((
26085 *[\\/]* ) as_myself=$0 ;;
26086 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26087for as_dir in $PATH
26088do
26089 IFS=$as_save_IFS
26090 test -z "$as_dir" && as_dir=.
26091 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26092 done
26093IFS=$as_save_IFS
26094
26095 ;;
26096esac
26097# We did not find ourselves, most probably we were run as `sh COMMAND'
26098# in which case we are not to be found in the path.
26099if test "x$as_myself" = x; then
26100 as_myself=$0
26101fi
26102if test ! -f "$as_myself"; then
26103 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26104 exit 1
26105fi
26106
26107# Unset variables that we do not need and which cause bugs (e.g. in
26108# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
26109# suppresses any "Segmentation fault" message there. '((' could
26110# trigger a bug in pdksh 5.2.14.
26111for as_var in BASH_ENV ENV MAIL MAILPATH
26112do eval test x\${$as_var+set} = xset \
26113 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26114done
1a4b763e
BS
26115PS1='$ '
26116PS2='> '
26117PS4='+ '
26118
26119# NLS nuisances.
5213506e
RW
26120LC_ALL=C
26121export LC_ALL
26122LANGUAGE=C
26123export LANGUAGE
26124
26125# CDPATH.
26126(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26127
26128
26129# as_fn_error ERROR [LINENO LOG_FD]
26130# ---------------------------------
26131# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26132# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26133# script with status $?, using 1 if that was 0.
26134as_fn_error ()
26135{
26136 as_status=$?; test $as_status -eq 0 && as_status=1
26137 if test "$3"; then
26138 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26139 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
1a4b763e 26140 fi
5213506e
RW
26141 $as_echo "$as_me: error: $1" >&2
26142 as_fn_exit $as_status
26143} # as_fn_error
26144
26145
26146# as_fn_set_status STATUS
26147# -----------------------
26148# Set $? to STATUS, without forking.
26149as_fn_set_status ()
26150{
26151 return $1
26152} # as_fn_set_status
26153
26154# as_fn_exit STATUS
26155# -----------------
26156# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26157as_fn_exit ()
26158{
26159 set +e
26160 as_fn_set_status $1
26161 exit $1
26162} # as_fn_exit
26163
26164# as_fn_unset VAR
26165# ---------------
26166# Portably unset VAR.
26167as_fn_unset ()
26168{
26169 { eval $1=; unset $1;}
26170}
26171as_unset=as_fn_unset
26172# as_fn_append VAR VALUE
26173# ----------------------
26174# Append the text in VALUE to the end of the definition contained in VAR. Take
26175# advantage of any shell optimizations that allow amortized linear growth over
26176# repeated appends, instead of the typical quadratic growth present in naive
26177# implementations.
26178if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26179 eval 'as_fn_append ()
26180 {
26181 eval $1+=\$2
26182 }'
26183else
26184 as_fn_append ()
26185 {
26186 eval $1=\$$1\$2
26187 }
26188fi # as_fn_append
26189
26190# as_fn_arith ARG...
26191# ------------------
26192# Perform arithmetic evaluation on the ARGs, and store the result in the
26193# global $as_val. Take advantage of shells that can avoid forks. The arguments
26194# must be portable across $(()) and expr.
26195if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26196 eval 'as_fn_arith ()
26197 {
26198 as_val=$(( $* ))
26199 }'
26200else
26201 as_fn_arith ()
26202 {
26203 as_val=`expr "$@" || test $? -eq 1`
26204 }
26205fi # as_fn_arith
1a4b763e 26206
5213506e
RW
26207
26208if expr a : '\(a\)' >/dev/null 2>&1 &&
26209 test "X`expr 00001 : '.*\(...\)'`" = X001; then
1a4b763e
BS
26210 as_expr=expr
26211else
26212 as_expr=false
26213fi
26214
5213506e 26215if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1a4b763e
BS
26216 as_basename=basename
26217else
26218 as_basename=false
26219fi
26220
5213506e
RW
26221if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26222 as_dirname=dirname
26223else
26224 as_dirname=false
26225fi
1a4b763e 26226
5213506e 26227as_me=`$as_basename -- "$0" ||
1a4b763e
BS
26228$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26229 X"$0" : 'X\(//\)$' \| \
5213506e
RW
26230 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26231$as_echo X/"$0" |
26232 sed '/^.*\/\([^/][^/]*\)\/*$/{
26233 s//\1/
26234 q
26235 }
26236 /^X\/\(\/\/\)$/{
26237 s//\1/
26238 q
26239 }
26240 /^X\/\(\/\).*/{
26241 s//\1/
26242 q
26243 }
26244 s/.*/./; q'`
b61ff9c8 26245
b61ff9c8
BS
26246# Avoid depending upon Character Ranges.
26247as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26248as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26249as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26250as_cr_digits='0123456789'
26251as_cr_alnum=$as_cr_Letters$as_cr_digits
26252
5213506e
RW
26253ECHO_C= ECHO_N= ECHO_T=
26254case `echo -n x` in #(((((
26255-n*)
26256 case `echo 'xy\c'` in
26257 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26258 xy) ECHO_C='\c';;
26259 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
26260 ECHO_T=' ';;
26261 esac;;
26262*)
26263 ECHO_N='-n';;
ba479fd2
NN
26264esac
26265
ba479fd2 26266rm -f conf$$ conf$$.exe conf$$.file
5213506e
RW
26267if test -d conf$$.dir; then
26268 rm -f conf$$.dir/conf$$.file
26269else
26270 rm -f conf$$.dir
26271 mkdir conf$$.dir 2>/dev/null
26272fi
26273if (echo >conf$$.file) 2>/dev/null; then
26274 if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8 26275 as_ln_s='ln -s'
5213506e
RW
26276 # ... but there are two gotchas:
26277 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26278 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26279 # In both cases, we have to default to `cp -p'.
26280 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26281 as_ln_s='cp -p'
26282 elif ln conf$$.file conf$$ 2>/dev/null; then
26283 as_ln_s=ln
26284 else
26285 as_ln_s='cp -p'
b61ff9c8 26286 fi
ba479fd2
NN
26287else
26288 as_ln_s='cp -p'
26289fi
5213506e
RW
26290rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26291rmdir conf$$.dir 2>/dev/null
26292
26293
26294# as_fn_mkdir_p
26295# -------------
26296# Create "$as_dir" as a directory, including parents if necessary.
26297as_fn_mkdir_p ()
26298{
26299
26300 case $as_dir in #(
26301 -*) as_dir=./$as_dir;;
26302 esac
26303 test -d "$as_dir" || eval $as_mkdir_p || {
26304 as_dirs=
26305 while :; do
26306 case $as_dir in #(
26307 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26308 *) as_qdir=$as_dir;;
26309 esac
26310 as_dirs="'$as_qdir' $as_dirs"
26311 as_dir=`$as_dirname -- "$as_dir" ||
26312$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26313 X"$as_dir" : 'X\(//\)[^/]' \| \
26314 X"$as_dir" : 'X\(//\)$' \| \
26315 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26316$as_echo X"$as_dir" |
26317 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26318 s//\1/
26319 q
26320 }
26321 /^X\(\/\/\)[^/].*/{
26322 s//\1/
26323 q
26324 }
26325 /^X\(\/\/\)$/{
26326 s//\1/
26327 q
26328 }
26329 /^X\(\/\).*/{
26330 s//\1/
26331 q
26332 }
26333 s/.*/./; q'`
26334 test -d "$as_dir" && break
26335 done
26336 test -z "$as_dirs" || eval "mkdir $as_dirs"
26337 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
26338
ba479fd2 26339
5213506e 26340} # as_fn_mkdir_p
ba479fd2 26341if mkdir -p . 2>/dev/null; then
5213506e 26342 as_mkdir_p='mkdir -p "$as_dir"'
ba479fd2 26343else
86da66b5 26344 test -d ./-p && rmdir ./-p
ba479fd2
NN
26345 as_mkdir_p=false
26346fi
26347
5213506e
RW
26348if test -x / >/dev/null 2>&1; then
26349 as_test_x='test -x'
26350else
26351 if ls -dL / >/dev/null 2>&1; then
26352 as_ls_L_option=L
26353 else
26354 as_ls_L_option=
26355 fi
26356 as_test_x='
26357 eval sh -c '\''
26358 if test -d "$1"; then
26359 test -d "$1/.";
26360 else
26361 case $1 in #(
26362 -*)set "./$1";;
26363 esac;
26364 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
26365 ???[sx]*):;;*)false;;esac;fi
26366 '\'' sh
26367 '
26368fi
26369as_executable_p=$as_test_x
ba479fd2
NN
26370
26371# Sed expression to map a string onto a valid CPP name.
86da66b5 26372as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
26373
26374# Sed expression to map a string onto a valid variable name.
86da66b5 26375as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
26376
26377
ba479fd2 26378exec 6>&1
5213506e
RW
26379## ----------------------------------- ##
26380## Main body of $CONFIG_STATUS script. ##
26381## ----------------------------------- ##
26382_ASEOF
26383test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
ba479fd2 26384
5213506e
RW
26385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26386# Save the log message, to keep $0 and so on meaningful, and to
ba479fd2 26387# report actual input values of CONFIG_FILES etc. instead of their
5213506e
RW
26388# values after options handling.
26389ac_log="
ba479fd2 26390This file was extended by $as_me, which was
5213506e 26391generated by GNU Autoconf 2.64. Invocation command line was
ba479fd2
NN
26392
26393 CONFIG_FILES = $CONFIG_FILES
26394 CONFIG_HEADERS = $CONFIG_HEADERS
26395 CONFIG_LINKS = $CONFIG_LINKS
26396 CONFIG_COMMANDS = $CONFIG_COMMANDS
26397 $ $0 $@
26398
5213506e
RW
26399on `(hostname || uname -n) 2>/dev/null | sed 1q`
26400"
26401
ba479fd2
NN
26402_ACEOF
26403
5213506e
RW
26404case $ac_config_files in *"
26405"*) set x $ac_config_files; shift; ac_config_files=$*;;
26406esac
2f41c1d6 26407
5213506e
RW
26408case $ac_config_headers in *"
26409"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26410esac
b61ff9c8 26411
b61ff9c8 26412
5213506e
RW
26413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26414# Files that config.status was made for.
26415config_files="$ac_config_files"
26416config_headers="$ac_config_headers"
26417config_commands="$ac_config_commands"
ba479fd2 26418
5213506e 26419_ACEOF
b61ff9c8 26420
5213506e 26421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2 26422ac_cs_usage="\
5213506e
RW
26423\`$as_me' instantiates files and other configuration actions
26424from templates according to the current configuration. Unless the files
26425and actions are specified as TAGs, all are instantiated by default.
ba479fd2 26426
5213506e 26427Usage: $0 [OPTION]... [TAG]...
ba479fd2
NN
26428
26429 -h, --help print this help, then exit
5213506e
RW
26430 -V, --version print version number and configuration settings, then exit
26431 -q, --quiet, --silent
26432 do not print progress messages
ba479fd2
NN
26433 -d, --debug don't remove temporary files
26434 --recheck update $as_me by reconfiguring in the same conditions
5213506e
RW
26435 --file=FILE[:TEMPLATE]
26436 instantiate the configuration file FILE
26437 --header=FILE[:TEMPLATE]
26438 instantiate the configuration header FILE
ba479fd2
NN
26439
26440Configuration files:
26441$config_files
26442
26443Configuration headers:
26444$config_headers
26445
26446Configuration commands:
26447$config_commands
26448
5213506e 26449Report bugs to the package provider."
b61ff9c8 26450
5213506e
RW
26451_ACEOF
26452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2
NN
26453ac_cs_version="\\
26454config.status
5213506e
RW
26455configured by $0, generated by GNU Autoconf 2.64,
26456 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 26457
5213506e 26458Copyright (C) 2009 Free Software Foundation, Inc.
ba479fd2
NN
26459This config.status script is free software; the Free Software Foundation
26460gives unlimited permission to copy, distribute and modify it."
5213506e
RW
26461
26462ac_pwd='$ac_pwd'
26463srcdir='$srcdir'
26464AWK='$AWK'
26465test -n "\$AWK" || AWK=awk
ba479fd2
NN
26466_ACEOF
26467
5213506e
RW
26468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26469# The default lists apply if the user does not specify any file.
ba479fd2
NN
26470ac_need_defaults=:
26471while test $# != 0
26472do
26473 case $1 in
26474 --*=*)
5213506e
RW
26475 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26476 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ba479fd2
NN
26477 ac_shift=:
26478 ;;
5213506e 26479 *)
ba479fd2
NN
26480 ac_option=$1
26481 ac_optarg=$2
26482 ac_shift=shift
26483 ;;
ba479fd2
NN
26484 esac
26485
26486 case $ac_option in
26487 # Handling of the options.
ba479fd2
NN
26488 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26489 ac_cs_recheck=: ;;
5213506e
RW
26490 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26491 $as_echo "$ac_cs_version"; exit ;;
26492 --debug | --debu | --deb | --de | --d | -d )
ba479fd2
NN
26493 debug=: ;;
26494 --file | --fil | --fi | --f )
26495 $ac_shift
5213506e
RW
26496 case $ac_optarg in
26497 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26498 esac
26499 as_fn_append CONFIG_FILES " '$ac_optarg'"
ba479fd2
NN
26500 ac_need_defaults=false;;
26501 --header | --heade | --head | --hea )
26502 $ac_shift
5213506e
RW
26503 case $ac_optarg in
26504 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26505 esac
26506 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ba479fd2 26507 ac_need_defaults=false;;
5213506e
RW
26508 --he | --h)
26509 # Conflict between --help and --header
26510 as_fn_error "ambiguous option: \`$1'
26511Try \`$0 --help' for more information.";;
26512 --help | --hel | -h )
26513 $as_echo "$ac_cs_usage"; exit ;;
ba479fd2
NN
26514 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26515 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26516 ac_cs_silent=: ;;
26517
26518 # This is an error.
5213506e
RW
26519 -*) as_fn_error "unrecognized option: \`$1'
26520Try \`$0 --help' for more information." ;;
ba479fd2 26521
5213506e
RW
26522 *) as_fn_append ac_config_targets " $1"
26523 ac_need_defaults=false ;;
ba479fd2
NN
26524
26525 esac
26526 shift
6e3f3080 26527done
ba479fd2
NN
26528
26529ac_configure_extra_args=
26530
26531if $ac_cs_silent; then
26532 exec 6>/dev/null
26533 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
26534fi
26535
ba479fd2 26536_ACEOF
5213506e 26537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 26538if \$ac_cs_recheck; then
5213506e
RW
26539 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26540 shift
26541 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26542 CONFIG_SHELL='$SHELL'
26543 export CONFIG_SHELL
26544 exec "\$@"
ba479fd2 26545fi
861bb6c1 26546
ba479fd2 26547_ACEOF
5213506e
RW
26548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26549exec 5>>config.log
26550{
26551 echo
26552 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26553## Running $as_me. ##
26554_ASBOX
26555 $as_echo "$ac_log"
26556} >&5
ba479fd2 26557
5213506e
RW
26558_ACEOF
26559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ba479fd2 26560#
5213506e 26561# INIT-COMMANDS
ba479fd2 26562#
ba479fd2 26563subdirs='$subdirs'
ba479fd2
NN
26564
26565_ACEOF
26566
5213506e 26567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1a4b763e 26568
5213506e 26569# Handling of arguments.
ba479fd2
NN
26570for ac_config_target in $ac_config_targets
26571do
5213506e
RW
26572 case $ac_config_target in
26573 "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
26574 "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
26575 "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
26576 "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
26577 "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
26578 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26579
26580 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
861bb6c1 26581 esac
ba479fd2
NN
26582done
26583
5213506e 26584
ba479fd2
NN
26585# If the user did not use the arguments to specify the items to instantiate,
26586# then the envvar interface is used. Set only those that are not.
26587# We use the long form for the default assignment because of an extremely
26588# bizarre bug on SunOS 4.1.3.
26589if $ac_need_defaults; then
26590 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26591 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26592 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26593fi
26594
26595# Have a temporary directory for convenience. Make it in the build tree
5213506e 26596# simply because there is no reason against having it here, and in addition,
ba479fd2 26597# creating and moving files from /tmp can sometimes cause problems.
5213506e
RW
26598# Hook for its removal unless debugging.
26599# Note that there is a small window in which the directory will not be cleaned:
26600# after its creation but before its name has been assigned to `$tmp'.
ba479fd2
NN
26601$debug ||
26602{
5213506e
RW
26603 tmp=
26604 trap 'exit_status=$?
26605 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26606' 0
26607 trap 'as_fn_exit 1' 1 2 13 15
ba479fd2 26608}
ba479fd2 26609# Create a (secure) tmp directory for tmp files.
6e3f3080 26610
ba479fd2 26611{
5213506e 26612 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ba479fd2
NN
26613 test -n "$tmp" && test -d "$tmp"
26614} ||
26615{
5213506e
RW
26616 tmp=./conf$$-$RANDOM
26617 (umask 077 && mkdir "$tmp")
26618} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
26619
26620# Set up the scripts for CONFIG_FILES section.
26621# No need to generate them if there are no CONFIG_FILES.
26622# This happens for instance with `./config.status config.h'.
26623if test -n "$CONFIG_FILES"; then
26624
26625if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
26626 ac_cs_awk_getline=:
26627 ac_cs_awk_pipe_init=
26628 ac_cs_awk_read_file='
26629 while ((getline aline < (F[key])) > 0)
26630 print(aline)
26631 close(F[key])'
26632 ac_cs_awk_pipe_fini=
26633else
26634 ac_cs_awk_getline=false
26635 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
26636 ac_cs_awk_read_file='
26637 print "|#_!!_#|"
26638 print "cat " F[key] " &&"
26639 '$ac_cs_awk_pipe_init
26640 # The final `:' finishes the AND list.
26641 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
26642fi
26643ac_cr=`echo X | tr X '\015'`
26644# On cygwin, bash can eat \r inside `` if the user requested igncr.
26645# But we know of no other shell where ac_cr would be empty at this
26646# point, so we can use a bashism as a fallback.
26647if test "x$ac_cr" = x; then
26648 eval ac_cr=\$\'\\r\'
26649fi
26650ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26651if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26652 ac_cs_awk_cr='\r'
26653else
26654 ac_cs_awk_cr=$ac_cr
26655fi
26656
26657echo 'BEGIN {' >"$tmp/subs1.awk" &&
26658_ACEOF
26659
26660# Create commands to substitute file output variables.
ba479fd2 26661{
5213506e
RW
26662 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
26663 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
26664 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
26665 echo "_ACAWK" &&
26666 echo "_ACEOF"
26667} >conf$$files.sh &&
26668. ./conf$$files.sh ||
26669 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26670rm -f conf$$files.sh
ba479fd2 26671
5213506e
RW
26672{
26673 echo "cat >conf$$subs.awk <<_ACEOF" &&
26674 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26675 echo "_ACEOF"
26676} >conf$$subs.sh ||
26677 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26678ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
26679ac_delim='%!_!# '
26680for ac_last_try in false false false false false :; do
26681 . ./conf$$subs.sh ||
26682 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26683
26684 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26685 if test $ac_delim_n = $ac_delim_num; then
26686 break
26687 elif $ac_last_try; then
26688 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26689 else
26690 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26691 fi
26692done
26693rm -f conf$$subs.sh
26694
26695cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26696cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
26697_ACEOF
26698sed -n '
26699h
26700s/^/S["/; s/!.*/"]=/
26701p
26702g
26703s/^[^!]*!//
26704:repl
26705t repl
26706s/'"$ac_delim"'$//
26707t delim
26708:nl
26709h
26710s/\(.\{148\}\).*/\1/
26711t more1
26712s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26713p
26714n
26715b repl
26716:more1
26717s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26718p
26719g
26720s/.\{148\}//
26721t nl
26722:delim
26723h
26724s/\(.\{148\}\).*/\1/
26725t more2
26726s/["\\]/\\&/g; s/^/"/; s/$/"/
26727p
26728b
26729:more2
26730s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26731p
26732g
26733s/.\{148\}//
26734t delim
26735' <conf$$subs.awk | sed '
26736/^[^""]/{
26737 N
26738 s/\n//
26739}
26740' >>$CONFIG_STATUS || ac_write_fail=1
26741rm -f conf$$subs.awk
26742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26743_ACAWK
26744cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26745 for (key in S) S_is_set[key] = 1
26746 FS = "\a"
26747 \$ac_cs_awk_pipe_init
26748}
26749{
26750 line = $ 0
26751 nfields = split(line, field, "@")
26752 substed = 0
26753 len = length(field[1])
26754 for (i = 2; i < nfields; i++) {
26755 key = field[i]
26756 keylen = length(key)
26757 if (S_is_set[key]) {
26758 value = S[key]
26759 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26760 len += length(value) + length(field[++i])
26761 substed = 1
26762 } else
26763 len += 1 + keylen
26764 }
26765 if (nfields == 3 && !substed) {
26766 key = field[2]
26767 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
26768 \$ac_cs_awk_read_file
26769 next
26770 }
26771 }
26772 print line
26773}
26774\$ac_cs_awk_pipe_fini
26775_ACAWK
26776_ACEOF
26777cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26778if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26779 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26780else
26781 cat
26782fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26783 || as_fn_error "could not setup config files machinery" "$LINENO" 5
b61ff9c8
BS
26784_ACEOF
26785
5213506e
RW
26786# VPATH may cause trouble with some makes, so we remove $(srcdir),
26787# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26788# trailing colons and then remove the whole line if VPATH becomes empty
26789# (actually we leave an empty line to preserve line numbers).
26790if test "x$srcdir" = x.; then
26791 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26792s/:*\$(srcdir):*/:/
26793s/:*\${srcdir}:*/:/
26794s/:*@srcdir@:*/:/
26795s/^\([^=]*=[ ]*\):*/\1/
26796s/:*$//
26797s/^[^=]*=[ ]*$//
26798}'
26799fi
ba479fd2 26800
5213506e
RW
26801cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26802fi # test -n "$CONFIG_FILES"
b61ff9c8 26803
5213506e
RW
26804# Set up the scripts for CONFIG_HEADERS section.
26805# No need to generate them if there are no CONFIG_HEADERS.
26806# This happens for instance with `./config.status Makefile'.
26807if test -n "$CONFIG_HEADERS"; then
26808cat >"$tmp/defines.awk" <<\_ACAWK ||
26809BEGIN {
b61ff9c8
BS
26810_ACEOF
26811
5213506e
RW
26812# Transform confdefs.h into an awk script `defines.awk', embedded as
26813# here-document in config.status, that substitutes the proper values into
26814# config.h.in to produce config.h.
26815
26816# Create a delimiter string that does not exist in confdefs.h, to ease
26817# handling of long lines.
26818ac_delim='%!_!# '
26819for ac_last_try in false false :; do
26820 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26821 if test -z "$ac_t"; then
26822 break
26823 elif $ac_last_try; then
26824 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
26825 else
26826 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1a4b763e 26827 fi
5213506e 26828done
1a4b763e 26829
5213506e
RW
26830# For the awk script, D is an array of macro values keyed by name,
26831# likewise P contains macro parameters if any. Preserve backslash
26832# newline sequences.
26833
26834ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26835sed -n '
26836s/.\{148\}/&'"$ac_delim"'/g
26837t rset
26838:rset
26839s/^[ ]*#[ ]*define[ ][ ]*/ /
26840t def
26841d
26842:def
26843s/\\$//
26844t bsnl
26845s/["\\]/\\&/g
26846s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26847D["\1"]=" \3"/p
26848s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26849d
26850:bsnl
26851s/["\\]/\\&/g
26852s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26853D["\1"]=" \3\\\\\\n"\\/p
26854t cont
26855s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26856t cont
26857d
26858:cont
26859n
26860s/.\{148\}/&'"$ac_delim"'/g
26861t clear
26862:clear
26863s/\\$//
26864t bsnlc
26865s/["\\]/\\&/g; s/^/"/; s/$/"/p
26866d
26867:bsnlc
26868s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26869b cont
26870' <confdefs.h | sed '
26871s/'"$ac_delim"'/"\\\
26872"/g' >>$CONFIG_STATUS || ac_write_fail=1
26873
26874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26875 for (key in D) D_is_set[key] = 1
26876 FS = "\a"
26877}
26878/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26879 line = \$ 0
26880 split(line, arg, " ")
26881 if (arg[1] == "#") {
26882 defundef = arg[2]
26883 mac1 = arg[3]
26884 } else {
26885 defundef = substr(arg[1], 2)
26886 mac1 = arg[2]
26887 }
26888 split(mac1, mac2, "(") #)
26889 macro = mac2[1]
26890 prefix = substr(line, 1, index(line, defundef) - 1)
26891 if (D_is_set[macro]) {
26892 # Preserve the white space surrounding the "#".
26893 print prefix "define", macro P[macro] D[macro]
26894 next
26895 } else {
26896 # Replace #undef with comments. This is necessary, for example,
26897 # in the case of _POSIX_SOURCE, which is predefined and required
26898 # on some systems where configure will not decide to define it.
26899 if (defundef == "undef") {
26900 print "/*", prefix defundef, macro, "*/"
26901 next
26902 }
26903 }
26904}
26905{ print }
26906_ACAWK
1a4b763e 26907_ACEOF
5213506e
RW
26908cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26909 as_fn_error "could not setup config headers machinery" "$LINENO" 5
26910fi # test -n "$CONFIG_HEADERS"
26911
26912
26913eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26914shift
26915for ac_tag
26916do
26917 case $ac_tag in
26918 :[FHLC]) ac_mode=$ac_tag; continue;;
26919 esac
26920 case $ac_mode$ac_tag in
26921 :[FHL]*:*);;
26922 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26923 :[FH]-) ac_tag=-:-;;
26924 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26925 esac
26926 ac_save_IFS=$IFS
26927 IFS=:
26928 set x $ac_tag
26929 IFS=$ac_save_IFS
26930 shift
26931 ac_file=$1
26932 shift
26933
26934 case $ac_mode in
26935 :L) ac_source=$1;;
26936 :[FH])
26937 ac_file_inputs=
26938 for ac_f
26939 do
26940 case $ac_f in
26941 -) ac_f="$tmp/stdin";;
26942 *) # Look for the file first in the build tree, then in the source tree
26943 # (if the path is not absolute). The absolute path cannot be DOS-style,
26944 # because $ac_f cannot contain `:'.
26945 test -f "$ac_f" ||
26946 case $ac_f in
26947 [\\/$]*) false;;
26948 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26949 esac ||
26950 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26951 esac
26952 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26953 as_fn_append ac_file_inputs " '$ac_f'"
26954 done
26955
26956 # Let's still pretend it is `configure' which instantiates (i.e., don't
26957 # use $as_me), people would be surprised to read:
26958 # /* config.h. Generated by config.status. */
26959 configure_input='Generated from '`
26960 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26961 `' by configure.'
26962 if test x"$ac_file" != x-; then
26963 configure_input="$ac_file. $configure_input"
26964 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26965$as_echo "$as_me: creating $ac_file" >&6;}
26966 fi
26967 # Neutralize special characters interpreted by sed in replacement strings.
26968 case $configure_input in #(
26969 *\&* | *\|* | *\\* )
26970 ac_sed_conf_input=`$as_echo "$configure_input" |
26971 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26972 *) ac_sed_conf_input=$configure_input;;
26973 esac
26974
26975 case $ac_tag in
26976 *:-:* | *:-) cat >"$tmp/stdin" \
26977 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26978 esac
26979 ;;
703d89ab
ZW
26980 esac
26981
5213506e 26982 ac_dir=`$as_dirname -- "$ac_file" ||
ba479fd2 26983$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
26984 X"$ac_file" : 'X\(//\)[^/]' \| \
26985 X"$ac_file" : 'X\(//\)$' \| \
5213506e
RW
26986 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26987$as_echo X"$ac_file" |
26988 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26989 s//\1/
26990 q
26991 }
26992 /^X\(\/\/\)[^/].*/{
26993 s//\1/
26994 q
26995 }
26996 /^X\(\/\/\)$/{
26997 s//\1/
26998 q
26999 }
27000 /^X\(\/\).*/{
27001 s//\1/
27002 q
27003 }
27004 s/.*/./; q'`
27005 as_dir="$ac_dir"; as_fn_mkdir_p
ba479fd2
NN
27006 ac_builddir=.
27007
5213506e
RW
27008case "$ac_dir" in
27009.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27010*)
27011 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
27012 # A ".." for each directory in $ac_dir_suffix.
27013 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27014 case $ac_top_builddir_sub in
27015 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27016 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27017 esac ;;
27018esac
27019ac_abs_top_builddir=$ac_pwd
27020ac_abs_builddir=$ac_pwd$ac_dir_suffix
27021# for backward compatibility:
27022ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
27023
27024case $srcdir in
5213506e 27025 .) # We are building in place.
ba479fd2 27026 ac_srcdir=.
5213506e
RW
27027 ac_top_srcdir=$ac_top_builddir_sub
27028 ac_abs_top_srcdir=$ac_pwd ;;
27029 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 27030 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
27031 ac_top_srcdir=$srcdir
27032 ac_abs_top_srcdir=$srcdir ;;
27033 *) # Relative name.
27034 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27035 ac_top_srcdir=$ac_top_build_prefix$srcdir
27036 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
ba479fd2 27037esac
5213506e 27038ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
ba479fd2 27039
703d89ab 27040
5213506e
RW
27041 case $ac_mode in
27042 :F)
27043 #
27044 # CONFIG_FILE
27045 #
ab22c1fa 27046
5213506e 27047_ACEOF
1a4b763e 27048
5213506e
RW
27049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27050# If the template does not know about datarootdir, expand it.
27051# FIXME: This hack should be removed a few years after 2.60.
27052ac_datarootdir_hack=; ac_datarootdir_seen=
27053ac_sed_dataroot='
27054/datarootdir/ {
27055 p
27056 q
27057}
27058/@datadir@/p
27059/@docdir@/p
27060/@infodir@/p
27061/@localedir@/p
27062/@mandir@/p'
27063case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27064*datarootdir*) ac_datarootdir_seen=yes;;
27065*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27067$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27068_ACEOF
27069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27070 ac_datarootdir_hack='
27071 s&@datadir@&$datadir&g
27072 s&@docdir@&$docdir&g
27073 s&@infodir@&$infodir&g
27074 s&@localedir@&$localedir&g
27075 s&@mandir@&$mandir&g
27076 s&\\\${datarootdir}&$datarootdir&g' ;;
27077esac
a6ccdbab 27078_ACEOF
5213506e
RW
27079
27080# Neutralize VPATH when `$srcdir' = `.'.
27081# Shell code in configure.ac might set extrasub.
27082# FIXME: do we really want to maintain this feature?
27083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27084ac_sed_extra="$ac_vpsub
ba479fd2
NN
27085$extrasub
27086_ACEOF
5213506e 27087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ba479fd2
NN
27088:t
27089/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5213506e
RW
27090s|@configure_input@|$ac_sed_conf_input|;t t
27091s&@top_builddir@&$ac_top_builddir_sub&;t t
27092s&@top_build_prefix@&$ac_top_build_prefix&;t t
27093s&@srcdir@&$ac_srcdir&;t t
27094s&@abs_srcdir@&$ac_abs_srcdir&;t t
27095s&@top_srcdir@&$ac_top_srcdir&;t t
27096s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27097s&@builddir@&$ac_builddir&;t t
27098s&@abs_builddir@&$ac_abs_builddir&;t t
27099s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27100$ac_datarootdir_hack
27101"
27102eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
27103if $ac_cs_awk_getline; then
27104 $AWK -f "$tmp/subs.awk"
27105else
27106 $AWK -f "$tmp/subs.awk" | $SHELL
27107fi >$tmp/out \
27108 || as_fn_error "could not create $ac_file" "$LINENO" 5
27109
27110test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27111 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27112 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
27113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27114which seems to be undefined. Please make sure it is defined." >&5
27115$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27116which seems to be undefined. Please make sure it is defined." >&2;}
27117
27118 rm -f "$tmp/stdin"
b61ff9c8 27119 case $ac_file in
5213506e
RW
27120 -) cat "$tmp/out" && rm -f "$tmp/out";;
27121 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27122 esac \
27123 || as_fn_error "could not create $ac_file" "$LINENO" 5
27124 ;;
27125 :H)
27126 #
27127 # CONFIG_HEADER
27128 #
ba479fd2 27129 if test x"$ac_file" != x-; then
5213506e
RW
27130 {
27131 $as_echo "/* $configure_input */" \
27132 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27133 } >"$tmp/config.h" \
27134 || as_fn_error "could not create $ac_file" "$LINENO" 5
27135 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27136 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27137$as_echo "$as_me: $ac_file is unchanged" >&6;}
ba479fd2 27138 else
5213506e
RW
27139 rm -f "$ac_file"
27140 mv "$tmp/config.h" "$ac_file" \
27141 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba479fd2
NN
27142 fi
27143 else
5213506e
RW
27144 $as_echo "/* $configure_input */" \
27145 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27146 || as_fn_error "could not create -" "$LINENO" 5
ba479fd2 27147 fi
5213506e 27148 ;;
b61ff9c8 27149
5213506e
RW
27150 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27151$as_echo "$as_me: executing $ac_file commands" >&6;}
27152 ;;
27153 esac
b61ff9c8
BS
27154
27155
5213506e
RW
27156 case $ac_file$ac_mode in
27157 "as":F) chmod +x as ;;
27158 "collect-ld":F) chmod +x collect-ld ;;
27159 "nm":F) chmod +x nm ;;
27160 "default":C)
f1faaabd
NN
27161case ${CONFIG_HEADERS} in
27162 *auto-host.h:config.in*)
27163 echo > cstamp-h ;;
861bb6c1 27164esac
2ed26f6b 27165# Make sure all the subdirs exist.
39dabefd 27166for d in $subdirs doc build c-family
2ed26f6b 27167do
2ed26f6b 27168 test -d $d || mkdir $d
2ed26f6b 27169done
ba479fd2 27170 ;;
5213506e 27171
ba479fd2 27172 esac
5213506e 27173done # for ac_tag
cafe096b 27174
ba479fd2 27175
5213506e 27176as_fn_exit 0
ba479fd2 27177_ACEOF
ba479fd2
NN
27178ac_clean_files=$ac_clean_files_save
27179
5213506e
RW
27180test $ac_write_fail = 0 ||
27181 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
27182
ba479fd2
NN
27183
27184# configure is writing to config.log, and then calls config.status.
27185# config.status does its own redirection, appending to config.log.
27186# Unfortunately, on DOS this fails, as config.log is still kept open
27187# by configure, so config.status won't be able to write to it; its
27188# output is simply discarded. So we exec the FD to /dev/null,
27189# effectively closing config.log, so it can be properly (re)opened and
27190# appended to by config.status. When coming back to configure, we
27191# need to make the FD available again.
27192if test "$no_create" != yes; then
27193 ac_cs_success=:
27194 ac_config_status_args=
27195 test "$silent" = yes &&
27196 ac_config_status_args="$ac_config_status_args --quiet"
27197 exec 5>/dev/null
27198 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27199 exec 5>>config.log
27200 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27201 # would make configure fail if this is the last instruction.
5213506e
RW
27202 $ac_cs_success || as_fn_exit $?
27203fi
27204if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27206$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
ba479fd2 27207fi
861bb6c1 27208